@clickview/exchange 0.39.0 → 0.40.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 +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{127-fff9e00092-exchange.chunk.js → 127-92dc016a93-exchange.chunk.js} +1 -1
- package/dist/scripts/{156-a369c2a765-exchange.chunk.js → 156-bb118cf50b-exchange.chunk.js} +1 -1
- package/dist/scripts/{212-fe4ed18ba6-exchange.chunk.js → 212-c3bd645e6c-exchange.chunk.js} +1 -1
- package/dist/scripts/{226-310258d590-exchange.chunk.js → 226-f0592dee10-exchange.chunk.js} +1 -1
- package/dist/scripts/{267-a69e20c67b-exchange.chunk.js → 267-ef0b473b5b-exchange.chunk.js} +1 -1
- package/dist/scripts/{332-a15f8f6329-exchange.chunk.js → 332-7b0dc13857-exchange.chunk.js} +1 -1
- package/dist/scripts/{356-ee94674043-exchange.chunk.js → 356-210e55d8fa-exchange.chunk.js} +1 -1
- package/dist/scripts/{442-7d8c06bafa-exchange.chunk.js → 442-fbffc82edc-exchange.chunk.js} +1 -1
- package/dist/scripts/457-ad15c6044e-exchange.chunk.js +1 -0
- package/dist/scripts/{494-6454060c57-exchange.chunk.js → 494-fb999f8f33-exchange.chunk.js} +2 -2
- package/dist/scripts/522-37ac36517c-exchange.chunk.js +2 -0
- package/dist/scripts/538-129609b691-exchange.chunk.js +2 -0
- package/dist/scripts/558-26876df8ca-exchange.chunk.js +1 -0
- package/dist/scripts/{669-f8db61a3b5-exchange.chunk.js → 669-69f6cb92a9-exchange.chunk.js} +1 -1
- package/dist/scripts/75-7581313572-exchange.chunk.js +1 -0
- package/dist/scripts/761-00724e0b59-exchange.chunk.js +2 -0
- package/dist/scripts/{782-c9c274aa02-exchange.chunk.js → 782-bab82c17c1-exchange.chunk.js} +1 -1
- package/dist/scripts/{851-416bd6edca-exchange.chunk.js → 851-a3f5bf925d-exchange.chunk.js} +2 -2
- package/dist/scripts/{881-0889a79d75-exchange.chunk.js → 881-716ddfc816-exchange.chunk.js} +1 -1
- package/dist/scripts/95-24ea1f4f33-exchange.chunk.js +2 -0
- package/dist/scripts/bundle-818d86208c.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/457-3fdb89469c-exchange.chunk.js +0 -1
- package/dist/scripts/497-2c41a372b8-exchange.chunk.js +0 -2
- package/dist/scripts/761-88c0dfbffd-exchange.chunk.js +0 -2
- package/dist/scripts/773-7409ad2920-exchange.chunk.js +0 -2
- package/dist/scripts/88-dff85bddb4-exchange.chunk.js +0 -1
- package/dist/scripts/979-e7bc1b2deb-exchange.chunk.js +0 -2
- package/dist/scripts/bundle-087cf63970.min.js +0 -2
- /package/dist/css/{773-exchange-1387f35e92.chunk.css → 522-exchange-1387f35e92.chunk.css} +0 -0
- /package/dist/css/{497-exchange-4cbfe56ba3.chunk.css → 538-exchange-4cbfe56ba3.chunk.css} +0 -0
- /package/dist/css/{88-exchange-6d2304419c.chunk.css → 75-exchange-6d2304419c.chunk.css} +0 -0
- /package/dist/css/{979-exchange-4cbfe56ba3.chunk.css → 95-exchange-4cbfe56ba3.chunk.css} +0 -0
- /package/dist/scripts/{494-6454060c57-exchange.chunk.js.LICENSE.txt → 494-fb999f8f33-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{497-2c41a372b8-exchange.chunk.js.LICENSE.txt → 522-37ac36517c-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{761-88c0dfbffd-exchange.chunk.js.LICENSE.txt → 538-129609b691-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{726-ceeb7501b9-exchange.chunk.js → 726-0326486cac-exchange.chunk.js} +0 -0
- /package/dist/scripts/{773-7409ad2920-exchange.chunk.js.LICENSE.txt → 761-00724e0b59-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{851-416bd6edca-exchange.chunk.js.LICENSE.txt → 851-a3f5bf925d-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{979-e7bc1b2deb-exchange.chunk.js.LICENSE.txt → 95-24ea1f4f33-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-087cf63970.min.js.LICENSE.txt → bundle-818d86208c.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 761-00724e0b59-exchange.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[761],{66090:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{O:()=>i});var i={isNumber:function(e){return i.isType(e,"number")},isString:function(e){return i.isType(e,"string")},isType:function(e,t){return r(e)===t}}},87611:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(32735),i=n(1048),o=n(28825),a=n(40320),u=n(54610),c=n(67453);const l={image:"vdd4V",thumbnail:"Ez0E7",tallPoster:"H9bQA",cover:"Nudts",banner:"IOvDH",poster:"iiY56",pdf:"aDJiJ",link:"wDpui"};function s(e){var t=l.image,n="";return e.imageType===u.__.Thumbnails&&(n="thumbnail ".concat(l.thumbnail)),e.imageType===u.__.TallPosters&&(n=l.tallPoster),e.imageType===u.__.Covers&&(n=l.cover),e.imageType===u.__.Banners&&(n=l.banner),e.imageType===u.__.Posters&&(n=l.poster),e.imageType===u.__.Pdf&&(n=l.pdf),e.imageType===u.__.Link&&(n=l.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function f(e){var t=e.data,n=e.imageOptions,u=e.appLink,l=e.preload,f=e.preventLoad,p=e.analyticsOptions,h=e.analyticsData,y=e.imageClassName,v=e.alt,d="";"string"==typeof t?d=t:i.t.isObject(t)&&(d=t.url);var m=d&&n?c.j.createUrl(d,n):d;return r.createElement("div",{className:s(e),style:e.imageStyle},r.createElement(o.F,{appLink:u,analyticsData:h,analyticsOptions:p,onClick:e.onClick,preventFocus:e.preventFocus,className:e.appLinkClassName},e.children,m&&r.createElement(a.w,{src:m,alt:v,forceLoad:l,preventLoad:f,extraClasses:y,errorFallbackImageSrc:e.errorFallbackImageSrc,errorFallbackImageClassName:e.errorFallbackImageClassName,onLoad:e.onLoad})))}},40320:(e,t,n)=>{"use strict";n.d(t,{w:()=>u});var r=n(32735),i=n(65294);const o="fVSzb";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=r.memo((function(e){var t,n,u=e.forceLoad,c=e.extraClasses,l=void 0===c?"":c,s=e.errorFallbackImageSrc,f=e.preventLoad,p=void 0!==f&&f,h=e.errorFallbackImageClassName,y=e.src,v=e.alt,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","errorFallbackImageClassName","src","alt"]),m=(0,i.Y)({rootMargin:"500px"}),b=m.ref,g=m.inView,w=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),O=w[0],S=w[1];function k(){return O&&s?s:e.src}if(r.useEffect((function(){if((u||g)&&!p){var e=new Image;return e.onerror=function(){S(!0),s&&(e.src=s)},e.src=y,function(){return e.onerror=null}}}),[g,p]),O&&!s)return r.createElement(r.Fragment,null);if(!b)return r.createElement("img",Object.assign({className:"".concat(o," ").concat(l," ").concat(O&&h||""),alt:v,src:k()},d));var N=Object.assign(Object.assign({alt:v},d),!g&&!u||p?{src:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}:{src:k()});return u||(N.ref=b),r.createElement("img",Object.assign({className:"".concat(o," ").concat(l," ").concat(O&&h||"")},N))}))},7733:(e,t,n)=>{"use strict";n.d(t,{o:()=>r});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},23455:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(32735),i=n(81886),o=n(20470);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.useEffect((function(){t.length&&t.some(i.Q.Ry.isStatusCodeError)&&i.Q.Ry.throw(new o.x)}),t)}},65294:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var r=n(34152);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.prevent,a=n.rootMargin,u=n.triggerOnce,c=void 0===u||u,l=(e=(0,r.YD)({triggerOnce:c,rootMargin:a}),t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],f=l[1],p=l[2];return!0!==o&&void 0!==window.IntersectionObserver||(f=!0,s=null),{ref:s,inView:f,initialized:!!p}}},79967:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var r=n(32735),i=n(49677);function o(){return r.useContext(i.X)}},74237:(e,t,n)=>{"use strict";n.d(t,{T:()=>l});var r=n(97395),i=n(49985),o=n(65858);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),u=new L(r||[]);return i(a,"_invoke",{value:C(e,n,u)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",b={};function g(){}function w(){}function O(){}var S={};f(S,c,(function(){return this}));var k=Object.getPrototypeOf,N=k&&k(k(R([])));N&&N!==n&&r.call(N,c)&&(S=N);var P=O.prototype=g.prototype=Object.create(S);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,u,c){var l=h(e[i],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=y;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=T(u,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===y)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var l=h(t,n,r);if("normal"===l.type){if(i=r.done?m:v,l.arg===b)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,b;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return w.prototype=O,i(P,"constructor",{value:O,configurable:!0}),i(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,f(e,s,"GeneratorFunction")),e.prototype=Object.create(P),e},t.awrap=function(e){return{__await:e}},j(E.prototype),f(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(p(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(P),f(P,s,"Generator"),f(P,c,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}var c=null,l={getVideoDownloadUrl:function(e,t){return r._.safeUrlConcat(r._.makeHttps(e),"/download?token=".concat(t))},downloadResource:function(e,t,n,r){var a,u=c;c||(u=c=document.createElement("iframe"),document.body.appendChild(u),u.style.display="none"),u.src=e.url,r||i.k.logUserAction(Object.assign({id:null==e?void 0:e.id,name:null==e?void 0:e.name,resourceType:null===(a=null==e?void 0:e.metadata)||void 0===a?void 0:a.resourceType},t),Object.assign({actionType:o.Vw.Download,entity:o.py.Resource,workflowPhase:o.eu.Complete},n))},downloadBlob:function(e,t){return n=this,r=void 0,i=void 0,o=u().mark((function n(){var r,i,o;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e);case 2:if((r=n.sent).ok){n.next=5;break}throw new Error("Error downloading file");case 5:return n.t0=URL,n.next=8,r.blob();case 8:n.t1=n.sent,i=n.t0.createObjectURL.call(n.t0,n.t1),(o=document.createElement("a")).href=i,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.setTimeout((function(){return URL.revokeObjectURL(i)}),100);case 17:case"end":return n.stop()}}),n)})),new(i||(i=Promise))((function(e,t){function a(e){try{c(o.next(e))}catch(e){t(e)}}function u(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,u)}c((o=o.apply(n,r||[])).next())}));var n,r,i,o}}},7017:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(32735),i=n(83345);const o={adFreeBadge:"xUXHs",small:"rqFjv"};var a="tv.adFreeBadge";function u(e){return r.createElement("div",{className:"".concat(o.adFreeBadge," ").concat(e.small?o.small:""," ").concat(e.className||""," d-flex align-items-center rounded bg-red text-white fw-semibold px-1 font-size-sm")},r.createElement(i.x,{namespace:a,phrase:"adFree"}))}},69435:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(32735);const i={channelBadge:"Ud_W9",small:"A0WD4"};function o(e){return r.createElement("div",{className:"".concat(i.channelBadge," ").concat(e.small?i.small:""," ").concat(e.className||"")},r.createElement("img",{className:"h-100 align-baseline",src:e.logoUrl}))}},65972:(e,t,n)=>{"use strict";n.d(t,{B:()=>u});var r=n(32735),i=n(14965),o=n(55667);const a={programTimeBadge:"Avu4L",small:"a1Wkd",hover:"fbzDz"};function u(e){var t=e.program.timeZone||e.program.region.timeZone,n=(0,o.h)(e.program.startTime,t),u=(0,o.h)(e.program.stopTime,t);return r.createElement("div",{className:"".concat(a.programTimeBadge," ").concat(e.small?"".concat(a.small," align-items-end"):"align-items-center"," ").concat(e.hover?a.hover:""," ").concat(e.className||""," d-flex bg-white text-nowrap border border-dark rounded-pill px-2")},r.createElement("span",null,e.showDate&&"".concat(i.O.format(n,"D MMM")," @ "),i.O.format(n,"hh:mma"),e.showEndTime&&" - ".concat(i.O.format(u,"hh:mma"))))}},55667:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n(14965),i={"AUS Eastern Standard Time":"Australia/Sydney","W. Australia Standard Time":"Australia/Perth","E. Australia Standard Time":"Australia/Brisbane","Cen. Australia Standard Time":"Australia/Adelaide","New Zealand Standard Time":"Pacific/Auckland","GMT Standard Time":"Europe/London"};function o(e,t){return r.O.getUtcTimeByTimezone(e,"YYYY-MM-DDTHH:mm:ss",i[t])}},1557:(e,t,n)=>{"use strict";n.d(t,{$:()=>c});var r=n(32735),i=n(11607),o=n(83914),a=n(35223);const u={overlay:"Ux3Um",close:"D1Gyv",preview:"IGttc"};function c(e){return r.createElement(r.Fragment,null,r.createElement("div",{className:"".concat(u.overlay," ").concat(u.preview," d-flex align-items-center justify-content-start")},r.createElement(o.x,{svgName:a.vn.VisibleOn,size:o.S.Large})),r.createElement(i.L,{className:"".concat(u.overlay," ").concat(u.close," d-flex align-items-center justify-content-center"),onClick:e.closePopup},r.createElement(o.x,{svgName:a.vn.Close,size:o.S.Large})))}},84034:(e,t,n)=>{"use strict";n.d(t,{d:()=>G});var r=n(32735),i=n(42648),o=n(78259),a=n(65858),u=n(18967),c=n(16831),l=n(17464),s=n(42029),f=n(83345),p=n(49439);const h={copyrightDisclaimer:"z8YoI",overlayContainer:"eJDbJ"};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var v="shared.copyrightDisclaimer",d=150;function m(e){var t,n,i,o=(n=(0,p.L)({}),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(n,i)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];return r.createElement("div",{ref:a,className:e.className},r.createElement("p",{className:"".concat(h.copyrightDisclaimer," ").concat(null!==(t=e.phraseClassName)&&void 0!==t?t:"mb-1")},r.createElement(f.x,{namespace:v,phrase:"copyrightDisclaimer"})),r.createElement(s.Z,{target:a.current,show:u,placement:e.overflowPlacement&&function(){var e;return document.documentElement.clientHeight-(null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect().bottom)<d}()?e.overflowPlacement:e.placement},r.createElement("div",{className:"".concat(h.overlayContainer," mw-100 bg-white border rounded-3 p-2")},r.createElement("p",null,r.createElement(f.x,{namespace:v,phrase:"warning"})),r.createElement("p",{className:"fw-semibold mb-0"},r.createElement(f.x,{namespace:v,phrase:"sharing"})))))}var b=n(82302),g=n(1048),w=n(66090);function O(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e)||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 S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){var t=e.page,n=e.totalPages,r=w.O.isNumber(t)&&t>0&&t<n&&t+1,i=w.O.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!g.t.isEmpty(o))return o}var N={isEmpty:function(e){return e&&!(e.data&&e.data.length)},length:function(e){return e&&e.data&&e.data.length},at:function(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get:function(e,t){if(e&&e.data&&e.data.length)return e.data.find((function(e){return e.id&&e.id.toString()===t}))},flattenCollections:function(e){if(e&&e.length){var t=[];return e.forEach((function(e){t=[].concat(O(t),O(e.data))})),t}},getNextCursor:function(e){return e.pagination&&e.pagination.cursors&&e.pagination.cursors.next},convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:k(e.pagination),limit:e.pagination.pageSize}}},hasData:function(e){return!N.isEmpty(e)}},P=n(23481),j=n(16035),E=n(44829),C=n(2096);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case E.Q.Pedagogy:return 0;case E.Q.Skill:return 1;default:return 2}}function x(e){if(!e.tags)return r.createElement(r.Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return T(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):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.")}()).sort((function(e,t){return _(e)-_(t)}));return r.createElement("div",{className:"".concat(C.Z.tagList," ").concat(e.className)},n.map((function(t){var n="function"==typeof e.getAppLink?e.getAppLink(t):null,i="function"==typeof e.onRemove?function(){return e.onRemove(t)}:null,o="function"==typeof e.onClick?function(){return e.onClick(t)}:null;return r.createElement(j.z,{key:t.id||t.name,tag:t,appLink:n,themeColours:e.themeColours,onRemove:i,onClick:o})})))}function L(e){var t=e.label,n=e.items;if(!(n&&n.data&&n.data.length))return r.createElement(r.Fragment,null);var i=n.data.map((function(e){return e.name})).join(", ");return r.createElement("div",{className:"mb-2"},t,": ",i)}var R="exchange.detailsSection",I=P.T.encloseNamespace(R);function M(e){var t,n,i,o,a,u,c,l,s,p,h=e.video,y=e.hasPPDD,v=e.description;return r.createElement("div",{className:v?"col-md-5 ps-md-3 pt-3 pt-md-0":"col-12"},r.createElement("h2",{className:"h6 mb-2"},r.createElement(f.x,{namespace:R,phrase:"details"})),y&&r.createElement("div",null,r.createElement(L,{label:I("productionCompanies",{smartCount:null===(n=null===(t=h.productionCompanies)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length}),items:h.productionCompanies}),r.createElement(L,{label:I("distributors",{smartCount:null===(o=null===(i=h.distributors)||void 0===i?void 0:i.data)||void 0===o?void 0:o.length}),items:h.distributors}),r.createElement(L,{label:I("producers",{smartCount:null===(u=null===(a=h.producers)||void 0===a?void 0:a.data)||void 0===u?void 0:u.length}),items:h.producers}),r.createElement(L,{label:I("directors",{smartCount:null===(l=null===(c=h.directors)||void 0===c?void 0:c.data)||void 0===l?void 0:l.length}),items:h.directors})),!!(null===(p=null===(s=h.tags)||void 0===s?void 0:s.data)||void 0===p?void 0:p.length)&&r.createElement(x,{tags:h.tags.data}))}var D=n(55215),B=n(7017),A=n(69435),F=n(65972);const z={previewBadge:"JA0mN",previewAlert:"qFT4M"};var Z="exchange.previewVideoDetails",V=200;function G(e){var t,n,s,p,h,y=e.title,v=e.description,d=e.video,g=e.videoActions,w=function(e){return!!e&&!N.isEmpty(e)},O=!!(null==d?void 0:d.series),S=!!(null===(t=null==d?void 0:d.rating)||void 0===t?void 0:t.value)||!!(null==d?void 0:d.productionYear)||e.program,k=w(null==d?void 0:d.productionCompanies)||w(null==d?void 0:d.producers)||w(null==d?void 0:d.distributors)||w(null==d?void 0:d.directors),P=!!v,j=k||!!(null===(s=null===(n=null==d?void 0:d.tags)||void 0===n?void 0:n.data)||void 0===s?void 0:s.length);return r.createElement("div",{className:"p-3"},r.createElement("div",{className:"".concat(O||S?"mb-3":"mb-2"," position-relative")},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"ms-2 float-end"},r.createElement(u.e,{actions:g,actionsDropdownClassName:"btn btn-outline-dark px-1"})),!!d&&r.createElement(b.$,{type:"series",video:d,appLink:(0,D.cL)(d.series),className:"text-wrap",analyticsOptions:{location:a.LZ.PlayPage}}),r.createElement("h1",{className:"h4 mb-1 ".concat(O||S?"":"mb-0 pt-2")},r.createElement("span",{className:"align-self-center"},y))),S&&r.createElement(l.c,null,r.createElement(c.C,{type:c.g.Rating,data:null==d?void 0:d.rating,className:"".concat(z.previewBadge," fw-semibold py-0 font-size-normal align-items-center px-2")}),r.createElement(c.C,{type:c.g.ProductionYear,data:null==d?void 0:d.productionYear,className:"".concat(z.previewBadge," fw-semibold font-size-sm align-items-center px-1")}),(null===(p=e.program)||void 0===p?void 0:p.channelLogoUrl)&&r.createElement(A.J,{logoUrl:e.program.channelLogoUrl,className:"me-1"}),(null===(h=e.program)||void 0===h?void 0:h.hasAdsFree)&&r.createElement(B.Z,{className:"me-1"}),e.program&&r.createElement(F.B,{program:e.program,showDate:!0,showEndTime:!0}))),r.createElement("div",null,r.createElement(i.$B,{autoHeight:!0,autoHeightMax:V},r.createElement("div",{className:"row g-0"},P&&r.createElement("div",{className:j?"border-end pe-3 col-md-7":"col-12"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("h2",{className:"h6 mb-2"},r.createElement(f.x,{namespace:Z,phrase:"description"}))),r.createElement("p",{className:"mb-2",dangerouslySetInnerHTML:{__html:o.O.linkifyText(v,{nl2br:!0})}})),j&&r.createElement(M,{video:d,hasPPDD:k,description:v}))),e.video&&r.createElement("div",{className:"row"},r.createElement("div",{className:"".concat(k?"d-md-block col-7":""," d-none")}),r.createElement("div",{className:"".concat(k?"col-md-5 ps-md-3":"ps-2 "," ")},r.createElement(m,{placement:k?"bottom-end":"bottom-start",overflowPlacement:k?"top-end":"top-start"})))))}},41026:(e,t,n)=>{"use strict";n.d(t,{L:()=>FO});var r=n(32735),i=(n(39682),n(76032));function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t,n){return t=y(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function p(e,t,n,r){var i=h(y(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},h.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var m=function(e){function t(e,n){return a(this,t),s(this,t,[e,n])}return v(t,e),c(t,[{key:"handleClick",value:function(e){var n=this;p(t,"handleClick",this,3)([e]),this.requestAnimationFrame((function(){n.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,n,r){if(!this.options_.item)return p(t,"createEl",this,3)([e,n,r]);var o=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),u=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=i.Z.dom.createEl("span",{innerHTML:a});var l=p(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""," ").concat(u||"").trim(),innerHTML:c},r]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(i.Z.getComponent("MenuItem")),b=function(e){function t(e,n){var r;return a(this,t),(r=s(this,t,[e,n])).controlText("Settings"),r}return v(t,e),c(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(p(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(p(t,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),p(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new m(this.player_,{item:i}))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){p(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}])}(i.Z.getComponent("MenuButton"));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function O(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=N(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},k.apply(null,arguments)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}i.Z.registerComponent("cogButton",b);var j=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=N(t),function(e,t){if(t&&("object"==g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return i.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(e){var n,r,i,o=this;(n=t,r=this,"function"==typeof(i=k(N(1&3?n.prototype:n),"handleClick",r))?function(e){return i.apply(r,e)}:i)([e]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){o.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}],r&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},C.apply(null,arguments)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function x(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function L(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function R(e,t,n){return t=M(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function D(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var A=i.Z.getComponent("MenuItem"),F=i.Z.getComponent("MenuButton"),z=["large","medium","small"],Z=function(e){function t(e,n){return T(this,t),R(this,t,[e,n])}return D(t,e),x(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(A),V=function(e){function t(e,n){var r;return T(this,t),(r=R(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready((function(){r.update()})),r}return D(t,e),x(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new j(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return z.map((function(t){r.push(new Z(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=C(M(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){F.prototype.handleClick.apply(this)}}])}(F);i.Z.registerComponent("SubtitleSizeButton",V);var G=n(28400);function U(e,t,n,r){if(!e.length)return[];for(var i=[],o=e.length-1;o>=0;o--){var a=e[o];if(a.kind===t){if(n&&a.label!==n)continue;if(r&&a.language!==r)continue;i.push(a)}}return i}function K(e,t,n,r,i){e.kind===t&&(n&&e.label!==n||i&&e.language!==i||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}function q(e){if(null==e?void 0:e.cues.length)for(var t=0;t<e.cues.length;t++){var n=e.cues[t];(null==n?void 0:n.text)&&(n.text=G.m.sanitize(n.text))}}function H(e,t,n,r,i){var o=e.textTracks(),a=U(o,t,n,i)[0];if(a)K(a,t,n,r);else{var u=function(e){K(e.track,t,n,r),o.removeEventListener("addtrack",u)};o.addEventListener("addtrack",u),e.one("dispose",(function(){o.removeEventListener("addtrack",u)}))}}function W(e,t,n,r,i){var o=e.textTracks(),a=U(o,t,n,i);a.length&&a.forEach((function(e){return K(e,t,n,r,i)}));var u=function(e){K(e.track,t,n,r,i)};o.addEventListener("addtrack",u),e.one("dispose",(function(){o.removeEventListener("addtrack",u)}))}var Y={getTrack:function(e,t,n,r){return U(e.textTracks(),t,n,r)[0]},useChapters:function(e,t){H(e,"chapters",null,t)},useMetadataTrack:function(e,t,n){H(e,"metadata",t,n,null)},useMetadataTracks:function(e,t,n,r){W(e,"metadata",t,n,r)},useSubtitles:function(e,t,n){W(e,"subtitles",null,t,n)},getCurrentTextTrack:function(e){return this.findTrackByPredicate(e,(function(e){return"showing"===e.mode}))},findTrackByPredicate:function(e,t){if(!e)return null;for(var n=e.textTracks(),r=0;r<n.length;r++){var i=n[r];if(t(i))return i}return null},forEachTrack:function(e,t){if(e)for(var n=e.textTracks(),r=0;r<n.length;r++)t(n[r])},sanitizeTrack:function(e,t){if(e&&t)if(e.loaded)q(e);else{var n=function(){return q(e)};e.addEventListener("loadeddata",n),t.one("dispose",(function(){e.removeEventListener("loadeddata",n)}))}},activeTextTrack:function(e){"disabled"===e.mode&&"subtitles"===e.kind&&(e.mode="hidden")}},Q=function(e,t,n){var r,i=this,o=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(){r=null,s=null,e.apply(this,u)};return!r&&n&&(e.apply(i,u),l=!0),o.clearTimeout(r),r=o.setTimeout(s,t),l};return a.cancel=function(){o.clearTimeout(r),r=null},a};function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&$(e.prototype,t),n&&$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=J(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function ne(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ie(e,t,n,r){var i=oe(ae(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ae(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},oe.apply(null,arguments)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ce(e,t)}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}var le=i.Z.getComponent("MenuItem"),se=function(e){function t(e,n){var r;return X(this,t),(r=ne(this,t,[e,n])).onChange=Q(r.onChange,100,!1,r),r.bindEventListeners(),r}return ue(t,e),ee(t,[{key:"createEl",value:function(){var e=this.localize("Search");return ie(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".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(e,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(e,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.search(t.value)}}])}(le);i.Z.registerComponent("SearchInputMenuItem",se);var fe=function(e){function t(){return X(this,t),ne(this,t,arguments)}return ue(t,e),ee(t,[{key:"createEl",value:function(e,n,r){return ie(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}}])}(le);function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ye(r.key),r)}}function ye(e){var t=function(e){if("object"!=pe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pe(t)?t:t+""}function ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ve=function(){return!!e})()}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}i.Z.registerComponent("NoMatchingResultsMenuItem",fe);var be=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=de(t),function(e,t){if(t&&("object"==pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ve()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&he(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Oe(e){var t=function(e){if("object"!=ge(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Se=function(){return!!e})()}function ke(e,t,n,r){var i=Ne(Pe(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ne(){return Ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pe(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ne.apply(null,arguments)}function Pe(e){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pe(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}var Ee=i.Z.getComponent("MenuButton"),Ce=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pe(t),function(e,t){if(t&&("object"==ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Se()?Reflect.construct(t,n||[],Pe(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),n=t,(r=[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=Y.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new se(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new be(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new fe(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=Y.getCurrentTextTrack(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],u=void 0;u=r.exec(o);)a.push(u.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(ke(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){ke(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){ke(t,"pressButton",this,3)([]);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ee.prototype.handleClick.apply(this)}}])&&we(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ee);function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Be(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_e.apply(null,arguments)}function xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Re(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ie(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}function Me(e,t,n){return t=Be(t),function(e,t){if(t&&("object"==Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,De()?Reflect.construct(t,n||[],Be(e).constructor):t.apply(e,n))}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(De=function(){return!!e})()}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function Ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(e,t)}i.Z.registerComponent("subtitleSearchButton",Ce);var ze=i.Z.getComponent("MenuItem"),Ze=i.Z.getComponent("MenuButton"),Ve=[{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"},{label:"Toggle theatre mode",type:"theatre-mode"}],Ge=function(e){function t(e,n){return xe(this,t),Me(this,t,[e,n])}return Ae(t,e),Re(t,[{key:"createEl",value:function(){return i.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(e){switch(e){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>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(ze),Ue=function(e){function t(){var e;return xe(this,t),(e=Me(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Ae(t,e),Re(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new j(this.player_,{label:"Keyboard Shortcuts"})),Ve.forEach((function(n){t.push(new Ge(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=_e(Be(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{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(){Ze.prototype.handleClick.apply(this)}}])}(Ze);function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,He(r.key),r)}}function He(e){var t=function(e){if("object"!=Ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ke(t)?t:t+""}function We(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(We=function(){return!!e})()}function Ye(e,t,n,r){var i=Qe(Je(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Qe(){return Qe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Je(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Qe.apply(null,arguments)}function Je(e){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Je(e)}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xe(e,t)}i.Z.registerComponent("KeyboardShortcutsButton",Ue);var $e="cv-collapsed",et=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Je(t),function(e,t){if(t&&("object"==Ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,We()?Reflect.construct(t,n||[],Je(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(t,e),n=t,(r=[{key:"toggleHidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass($e)):(n.isCollapsed=!1,n.removeClass($e)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.isFullscreen(),t=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!e||"left"!==t&&"right"!==t?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var i=r<(!e||"left"!==t&&"right"!==t&&"top"!==t?600:1200);this.player_.options_.deferMenus&&(i=!0),this.toggleHidden(i)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Ye(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ye(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&qe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));i.Z.registerComponent("collapserator",et);var tt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],nt=n(67624),rt=n(86790),it=n(65858),ot=n(50873);function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ut(){ut=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==at(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(at(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lt(r.key),r)}}function lt(e){var t=function(e){if("object"!=at(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==at(t)?t:t+""}var st=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()},(t=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);nt.SG.cacheExists(e)||(this.collectionApiClient.log({type:it.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:it.eq.V3}),nt.SG&&nt.SG.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:it.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:it.eq.V2}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e),r=Object.assign(Object.assign({},this.getActionContext()),t);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:r,eventVersion:t.eventVersion||it.eq.V2})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===it.py.Interactive?e.interactive={id:+this.options.mediaId}:t===it.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new rt.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:ot.k.shouldLog,formatData:ot.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=ut().mark((function e(){return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId});case 1:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?it.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return it.py.Video;case"MasterInteractive":return it.py.Interactive;case"MasterClip":return it.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return it.LZ.Player;case"interactive-player":return it.LZ.InteractivePlayer;case"create-clip-player":return it.LZ.CreateClipPlayer}}}])&&ct(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function pt(e){var t="function"==typeof Map?new Map:void 0;return pt=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(ht())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&yt(i,n.prototype),i}(e,arguments,vt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),yt(n,e)},pt(e)}function ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ht=function(){return!!e})()}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}function vt(e){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vt(e)}var dt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=vt(t),function(e,t){if(t&&("object"==ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ht()?Reflect.construct(t,n||[],vt(e).constructor):t.apply(e,n))}(this,t,[(null==n?void 0:n.title)||"Ajax error"])).url=e,r.response=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(pt(Error));function mt(e){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mt(e)}function bt(){bt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==mt(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(mt(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wt(r.key),r)}}function wt(e){var t=function(e){if("object"!=mt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mt(t)?t:t+""}var Ot,St=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},kt=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}},t=[{key:"get",value:function(e,t){return St(this,void 0,void 0,bt().mark((function n(){return bt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return St(this,void 0,void 0,bt().mark((function n(){return bt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return St(this,void 0,void 0,bt().mark((function i(){var o;return bt().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 2:if(o=i.sent,!r){i.next=7;break}return i.next=6,this.parseResponse(o);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),i,this)})))}},{key:"put",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return St(this,void 0,void 0,bt().mark((function i(){var o;return bt().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 2:if(o=i.sent,!r){i.next=7;break}return i.next=6,this.parseResponse(o);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),i,this)})))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return St(this,void 0,void 0,bt().mark((function t(){var n,r;return bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=15;break}return t.prev=3,t.next=6,e.json();case 6:n=t.sent,t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(3),new dt(e.url);case 12:throw t.prev=12,new dt(e.url,n);case 15:return t.next=17,e.json();case 17:return r=t.sent,t.abrupt("return",r);case 19:case"end":return t.stop()}}),t,null,[[3,9,12,15]])})))}}],t&>(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()),Nt=n(19389),Pt=n.n(Nt);function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Et(e,t,n){return(t=function(e){var t=function(e){if("object"!=jt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e){e.paused()?e.play():e.pause()}function Tt(e,t){e.currentTime(e.currentTime()+t)}function _t(e,t){e.volume(e.volume()+t)}var xt,Lt=(Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(Ot={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),"k",Ct),"space",Ct),"t",(function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})})),"left",(function(e){return Tt(e,-5)})),"right",(function(e){return Tt(e,5)})),"j",(function(e){return Tt(e,-10)})),"l",(function(e){return Tt(e,10)})),"up",(function(e){return _t(e,.05)})),Et(Ot,"down",(function(e){return _t(e,-.05)})));!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(xt||(xt={}));var Rt=n(83765);function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}function Dt(e){var t=function(e){if("object"!=It(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==It(t)?t:t+""}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}function At(){return At="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ft(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},At.apply(null,arguments)}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}function zt(e,t){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zt(e,t)}n(35571);var Zt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ft(t),function(e,t){if(t&&("object"==It(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bt()?Reflect.construct(t,n||[],Ft(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zt(e,t)}(t,e),n=t,r=[{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 e,n,r;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(e=t,n=this,"function"==typeof(r=At(Ft(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"configureMenuDimensions",value:function(){var e=this,t=function(t){if(!e.options.mobile){var n=e.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:t},i),e.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(t("top"!==r),"left"===r||"right"===r||"top"===r){var i=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(i,"px - 4em)")}))}}n||t(!0);var o=this.player.currentWidth(),a=this.player.currentHeight()/o*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(t){!n&&e.options.overflowControls?t.style.paddingTop="80%":t.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),t.style.marginBottom="".concat(l,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(o<=450?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}],r&&Mt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("configureMenuDimensionsPlugin",Zt);var Vt="cv-persisttest",Gt=function(){try{return window.localStorage.setItem(Vt,"cv-player-storage-test"),window.localStorage.removeItem(Vt),!0}catch(e){return!1}},Ut=function(e){return window.localStorage.getItem(e)},Kt=function(e,t){window.localStorage.setItem(e,t)};function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function Ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wt(r.key),r)}}function Wt(e){var t=function(e){if("object"!=qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qt(t)?t:t+""}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Yt=function(){return!!e})()}function Qt(){return Qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Qt.apply(null,arguments)}function Jt(e){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jt(e)}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}var $t=i.Z.getPlugin("plugin"),en="cvplayer-volume",tn="cvplayer-mute",nn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Jt(t),function(e,t){if(t&&("object"==qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yt()?Reflect.construct(t,n||[],Jt(e).constructor):t.apply(e,n))}(this,t,[e])).enabled=!0,n.player.ready((function(){return n.initialize()})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():Gt()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=Ut(en),t=Ut(tn);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(Kt(en,this.player.volume().toString()),Kt(tn,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var e=this.player.getChild("collapserator"),t=e.getChild("volumePanel");e.removeChild(t)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var e,n,r;this.player.off("volumechange",this.saveVolumeState),(e=t,n=this,"function"==typeof(r=Qt(Jt(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Ht(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($t);function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,an(r.key),r)}}function an(e){var t=function(e){if("object"!=rn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rn(t)?t:t+""}function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(un=function(){return!!e})()}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cn(e)}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}i.Z.registerPlugin("persistVolumePlugin",nn);var sn=i.Z.getPlugin("plugin"),fn="cvplayer-playback-rate",pn=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=cn(t),function(e,t){if(t&&("object"==rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,un()?Reflect.construct(t,n||[],cn(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.dataLoaded((function(){return r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ln(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(Gt()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){t.player.off("ratechange",t.savePlaybackRate)}));var n=+Ut(fn);(null===(e=this.player.options_.playbackRates)||void 0===e?void 0:e.some((function(e){return e===n})))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();Kt(fn,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeSpeed,entity:it.py.PlaybackSpeed,eventVersion:it.eq.V3})}}])&&on(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(sn);function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vn(r.key),r)}}function vn(e){var t=function(e){if("object"!=hn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hn(t)?t:t+""}function dn(e,t){if(t&&("object"==hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function mn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mn=function(){return!!e})()}function bn(e){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bn(e)}function gn(e,t){return gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gn(e,t)}i.Z.registerPlugin("persistPlaybackRatePlugin",pn);var wn=function(e){function t(e){var n,r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=[e],i=bn(i=t),(n=dn(r,mn()?Reflect.construct(i,o||[],bn(r).constructor):i.apply(r,o))).fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready((function(){return n.initialize()})),n):dn(n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gn(e,t)}(t,e),n=t,(r=[{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 e=this.getAngle();90===e||-90===e||270===e?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&yn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("fullscreenOnRotatePlugin",wn);var On="\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";function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nn(r.key),r)}}function Nn(e){var t=function(e){if("object"!=Sn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sn(t)?t:t+""}function Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pn=function(){return!!e})()}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}function En(e,t){return En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},En(e,t)}var Cn=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=jn(t),function(e,t){if(t&&("object"==Sn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pn()?Reflect.construct(t,n||[],jn(e).constructor):t.apply(e,n))}(this,t,[e,n])).update=(i=r.update.bind(r),o=window.performance.now(),function(){var e=window.performance.now();e-o>=1e3&&(i.apply(void 0,arguments),o=e)}),e.on("timeupdate",r.update),e.one("dispose",(function(){e.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(t,e),n=t,(r=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:On,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=i.Z.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function Tn(e){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tn(e)}function _n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xn(r.key),r)}}function xn(e){var t=function(e){if("object"!=Tn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tn(t)?t:t+""}function Ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ln=function(){return!!e})()}function Rn(e){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rn(e)}function In(e,t){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},In(e,t)}Cn.prototype.controlText_="Open in ClickView",i.Z.registerComponent("OpenExternallyButton",Cn);var Mn=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Rn(t),function(e,t){if(t&&("object"==Tn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ln()?Reflect.construct(t,n||[],Rn(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&In(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&_n(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Dn(e){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dn(e)}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,An(r.key),r)}}function An(e){var t=function(e){if("object"!=Dn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dn(t)?t:t+""}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fn=function(){return!!e})()}function zn(e,t,n,r){var i=Zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Zn(){return Zn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Zn.apply(null,arguments)}function Vn(e){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vn(e)}function Gn(e,t){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gn(e,t)}i.Z.registerPlugin("openExternallyPlugin",Mn);var Un=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Vn(t),function(e,t){if(t&&("object"==Dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fn()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gn(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(zn(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return zn(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Bn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("component"));function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hn(r.key),r)}}function Hn(e){var t=function(e){if("object"!=Kn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kn(t)?t:t+""}function Wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wn=function(){return!!e})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yn.apply(null,arguments)}function Qn(e){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qn(e)}function Jn(e,t){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jn(e,t)}i.Z.registerComponent("TouchControls",Un);var Xn=i.Z.getPlugin("plugin"),$n=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Qn(t),function(e,t){if(t&&("object"==Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wn()?Reflect.construct(t,n||[],Qn(e).constructor):t.apply(e,n))}(this,t,[e])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready((function(){return n.initialize()})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jn(e,t)}(t,e),n=t,r=[{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 e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.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 e,n,r;(e=t,n=this,"function"==typeof(r=Yn(Qn(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.userActive&&t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?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 r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],r&&qn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Xn);function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nr(r.key),r)}}function nr(e){var t=function(e){if("object"!=er(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==er(t)?t:t+""}i.Z.registerPlugin("touchControls",$n);var rr=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)},(t=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&tr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ir(e){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ar(r.key),r)}}function ar(e){var t=function(e){if("object"!=ir(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ir(t)?t:t+""}function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ur=function(){return!!e})()}function cr(e){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cr(e)}function lr(e,t){return lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lr(e,t)}var sr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=cr(t),function(e,t){if(t&&("object"==ir(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ur()?Reflect.construct(t,n||[],cr(e).constructor):t.apply(e,n))}(this,t,[e])).options_=n,r.player.ready((function(){return r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lr(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=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(){e.qualityLevels.off("change",e.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate(),a=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.playbackRate(o),t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play(),a&&t.player.hasStarted(!0)})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new rr(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),null===n?e.default&&(r=e):e.id===n&&(r=e)})),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}],r&&or(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}function pr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hr(r.key),r)}}function hr(e){var t=function(e){if("object"!=fr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fr(t)?t:t+""}i.Z.registerPlugin("progressiveFiles",sr);var yr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var u=r-1;u>0;u--){var c=n[u],l=e.getQualityLevelById(c);if(l)return l}}return null}}],null&&pr(e.prototype,null),t&&pr(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function vr(e){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(e)}function dr(){dr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==vr(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(vr(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,br(r.key),r)}}function br(e){var t=function(e){if("object"!=vr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vr(t)?t:t+""}var gr=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)},(t=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return e=this,t=void 0,n=void 0,r=dr().mark((function e(){var t,n,r,i;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}}])&&mr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}function Or(){Or=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==wr(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(wr(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kr(r.key),r)}}function kr(e){var t=function(e){if("object"!=wr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wr(t)?t:t+""}var Nr=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=i.Z.log.createLogger("localcache")},(t=[{key:"setSource",value:function(e,t){return n=this,r=void 0,i=void 0,o=Or().mark((function n(){var r;return Or().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})),new(i||(i=Promise))((function(e,t){function a(e){try{c(o.next(e))}catch(e){t(e)}}function u(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,u)}c((o=o.apply(n,r||[])).next())}));var n,r,i,o}}])&&Sr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Pr(e){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(e)}function jr(){jr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Pr(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Pr(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cr(r.key),r)}}function Cr(e){var t=function(e){if("object"!=Pr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pr(t)?t:t+""}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tr=function(){return!!e})()}function _r(){return _r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_r.apply(null,arguments)}function xr(e){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xr(e)}function Lr(e,t){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lr(e,t)}i.Z.use("*",(function(e){return new Nr(e)}));var Rr='<?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>',Ir=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xr(t),function(e,t){if(t&&("object"==Pr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tr()?Reflect.construct(t,n||[],xr(e).constructor):t.apply(e,n))}(this,t,[e,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),e.ready((function(){r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lr(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=_r(xr(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Rr,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var e,n,r}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=jr().mark((function e(){return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}}],r&&Er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Mr(e){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mr(e)}function Dr(){Dr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Mr(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Mr(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ar(r.key),r)}}function Ar(e){var t=function(e){if("object"!=Mr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mr(t)?t:t+""}function Fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fr=function(){return!!e})()}function zr(){return zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},zr.apply(null,arguments)}function Zr(e){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zr(e)}function Vr(e,t){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vr(e,t)}i.Z.registerComponent("localCacheIndicator",Ir);var Gr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},Ur=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Zr(t),function(e,t){if(t&&("object"==Mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fr()?Reflect.construct(t,n||[],Zr(e).constructor):t.apply(e,n))}(this,t,[e])).logger_=i.Z.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return r.localCaches_=n.localCacheAddresses.map((function(e){return new gr(e)})),r.player.ready((function(){r.initialize(),n.enabled&&r.enable()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vr(e,t)}(t,e),n=t,r=[{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(e){this.localCaches_=this.localCaches_.filter((function(t){return t!==e}))}},{key:"dispose",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=zr(Zr(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return Gr(this,void 0,void 0,Dr().mark((function e(){var t;return Dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(!(t=e.sent)){e.next=8;break}return e.next=6,t.ping();case 6:e.sent&&this.removeLocalCache(t);case 8:return this.resetActiveLocalCache(),e.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e,this)})))}},{key:"resetSource",value:function(){for(var e=this.player.qualityLevels(),t=0;t<e.length;t++)e[t].enabled&&(e[t].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return Gr(this,void 0,void 0,Dr().mark((function e(){var t,n,r,i=this;return Dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Gr(i,void 0,void 0,Dr().mark((function n(){return Dr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),yr.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],r&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Kr(e){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(e)}function qr(){qr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Kr(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Kr(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wr(r.key),r)}}function Wr(e){var t=function(e){if("object"!=Kr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kr(t)?t:t+""}function Yr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Yr=function(){return!!e})()}function Qr(){return Qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Qr.apply(null,arguments)}function Jr(e){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jr(e)}function Xr(e,t){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xr(e,t)}i.Z.registerPlugin("localCache",Ur);var $r=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},ei=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Jr(t),function(e,t){if(t&&("object"==Kr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yr()?Reflect.construct(t,n||[],Jr(e).constructor):t.apply(e,n))}(this,t,[e])).playerApi=n.playerApi,r.fileToken=n.fileToken,r.logger=i.Z.log.createLogger("video-signature-expiry-plugin"),r.bindErrorHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xr(e,t)}(t,e),n=t,r=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var e,n,r;this.player.off("error",this.onError),(e=t,n=this,"function"==typeof(r=Qr(Jr(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return $r(this,void 0,void 0,qr().mark((function e(){var t,n=this;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||t===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!e.sent){e.next=8;break}return this.callErrorHandler((function(){return n.player.localCache().handleNetworkError()})),e.abrupt("return");case 8:this.callErrorHandler((function(){return n.handleVideoSignatureExpiry()}));case 9:case"end":return e.stop()}}),e,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return $r(this,void 0,void 0,qr().mark((function e(){var t,n;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.playerApi&&this.fileToken){e.next=2;break}return e.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){e.next=4;break}return e.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),t=null,e.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),e.next=11,kt.get(n);case 11:t=e.sent,e.next=18;break;case 14:return e.prev=14,e.t0=e.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),e.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(t.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))),this.fileToken=t.fileToken,e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(e){return $r(this,void 0,void 0,qr().mark((function t(){var n,r,i,o,a=this;return qr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.player.currentTime(),r=!this.player.paused(),i=this.player.playbackRate(),o=function(){a.player.playbackRate(i),a.player.currentTime(n),r&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",o),t.next=7,e();case 7:if(!t.sent){t.next=9;break}return t.abrupt("return");case 9:this.player.off("loadedmetadata",o);case 10:case"end":return t.stop()}}),t,this)})))}}],r&&Hr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function ti(e){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ti(e)}function ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ri(r.key),r)}}function ri(e){var t=function(e){if("object"!=ti(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ti(t)?t:t+""}function ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ii=function(){return!!e})()}function oi(e){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oi(e)}function ai(e,t){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ai(e,t)}i.Z.registerPlugin("handleNetworkErrors",ei);var ui=i.Z.getPlugin("plugin"),ci="cvplayer-show-subtitles",li="cvplayer-selected-language",si="cvplayer-subtitle-size",fi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=oi(t),function(e,t){if(t&&("object"==ti(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ii()?Reflect.construct(t,n||[],oi(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ai(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=!!this.options.showSubtitles,t=this.safeGet(ci);if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}else this.hideSubtitles();var r=this.safeGet(si);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(Gt())return Ut(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e,t,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r];if("showing"===i.mode)return Kt(ci,"true"),Kt(li,i.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:i.language},{actionType:it.Vw.Select,entity:it.py.Subtitle,workflowPhase:it.eu.Complete,descriptor:it.DL.On}))}var o;Kt(ci,"false"),o=li,window.localStorage.removeItem(o),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:it.Vw.Select,entity:it.py.Subtitle,workflowPhase:it.eu.Complete,descriptor:it.DL.Off,eventVersion:it.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;Gt()&&(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(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Kt(si,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(li)||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.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===i&&(e=c,f||(t=c),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}},{key:"hideSubtitles",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++)e[t].mode="hidden"}},{key:"previewModeSubtitles",value:function(){var e=this.guessWhichTrack();e&&(e.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ui);function pi(e){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pi(e)}function hi(){hi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==pi(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(pi(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vi(r.key),r)}}function vi(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}function di(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(di=function(){return!!e})()}function mi(e){return mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mi(e)}function bi(e,t){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bi(e,t)}i.Z.registerPlugin("persistSubtitleSettingsPlugin",fi);var gi=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},wi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=mi(t),function(e,t){if(t&&("object"==pi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,di()?Reflect.construct(t,n||[],mi(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.ready((function(){return r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bi(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){return gi(this,void 0,void 0,hi().mark((function e(){var t,n,r,i,o=this;return hi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Gt()&&(r=Ut(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||yr.enableProfileOrNextBest(i,n),Gt()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){var e;return gi(this,void 0,void 0,hi().mark((function t(){var n,r,i;return hi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:n=t.sent,r=this.player.qualityLevels(),i=r[r.selectedIndex],Kt(this.getStorageKey(n),i.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:i.id},{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeResolution,entity:it.py.Resolution,eventVersion:it.eq.V3});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return gi(this,void 0,void 0,hi().mark((function e(){return hi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&yi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Oi(e){return Oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oi(e)}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ji(r.key),r)}}function Pi(e,t,n){return t&&Ni(e.prototype,t),n&&Ni(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ji(e){var t=function(e){if("object"!=Oi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oi(t)?t:t+""}function Ei(e,t,n){return t=Ti(t),function(e,t){if(t&&("object"==Oi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ci()?Reflect.construct(t,n||[],Ti(e).constructor):t.apply(e,n))}function Ci(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ci=function(){return!!e})()}function Ti(e){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ti(e)}function _i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xi(e,t)}function xi(e,t){return xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xi(e,t)}i.Z.registerPlugin("persistQualitySettingsPlugin",wi);var Li=i.Z.getComponent("Component"),Ri=function(e){function t(e,n){return ki(this,t),Ei(this,t,[e,n])}return _i(t,e),Pi(t,[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}])}(Li),Ii=function(e){function t(){var e;return ki(this,t),(e=Ei(this,t,arguments)).events_=[],e}return _i(t,e),Pi(t,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new Ri(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t,n;(t=this.events_).push.apply(t,function(e){if(Array.isArray(e))return Si(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Si(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}(n)||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 i.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Li);function Mi(e){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(e)}function Di(e,t,n){return(t=Ai(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ai(r.key),r)}}function Ai(e){var t=function(e){if("object"!=Mi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mi(t)?t:t+""}function Fi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fi=function(){return!!e})()}function zi(e){return zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zi(e)}function Zi(e,t){return Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zi(e,t)}var Vi=i.Z.getPlugin("plugin"),Gi="play",Ui="playing",Ki="pause",qi="seekstart",Hi="ended",Wi="pausedseek",Yi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zi(t),function(e,t){if(t&&("object"==Mi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fi()?Reflect.construct(t,n||[],zi(e).constructor):t.apply(e,n))}(this,t,[e,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready((function(){return r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zi(e,t)}(t,e),n=t,r=[{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 e=this,t=Di(Di(Di(Di(Di(Di({},Gi,(function(){return e.onPlay()})),Ki,(function(){return e.onPause()})),"timeupdate",(function(){return e.onTimeUpdate()})),"seeking",(function(){return e.onSeeking()})),Hi,(function(){return e.onEnded()})),Ui,(function(){return e.onPlaying()})),n=Object.keys(t);n.forEach((function(n){return e.player.on(n,t[n])})),this.one("dispose",(function(){n.forEach((function(n){return e.player.off(n,t[n])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,t=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function u(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),c.off("touchstart",a),c.off("touchend",u)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Ii(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.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(Gi)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(Ki),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Gi)),this.isPlaying&&!this.isSeeking&&this.logEvent(Ui)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(Wi),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(qi))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Hi)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===qi&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===Ui||e===Gi)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===Ui||e===Ki}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Hi||e===Wi}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===Ui&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}],r&&Bi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vi);function Qi(e){return Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(e)}function Ji(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xi(r.key),r)}}function Xi(e){var t=function(e){if("object"!=Qi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qi(t)?t:t+""}function $i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($i=function(){return!!e})()}function eo(e){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eo(e)}function to(e,t){return to=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},to(e,t)}i.Z.registerPlugin("progressReporterPlugin",Yi);var no=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=eo(t),function(e,t){if(t&&("object"==Qi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$i()?Reflect.construct(t,n||[],eo(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&to(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Ji(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component")),ro=["top","left","right","bottom"],io={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function oo(e){return oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oo(e)}function ao(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lo(r.key),r)}}function co(e,t,n){return t&&uo(e.prototype,t),n&&uo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lo(e){var t=function(e){if("object"!=oo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oo(t)?t:t+""}function so(e,t,n){return t=ho(t),function(e,t){if(t&&("object"==oo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fo()?Reflect.construct(t,n||[],ho(e).constructor):t.apply(e,n))}function fo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fo=function(){return!!e})()}function po(){return po="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ho(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},po.apply(null,arguments)}function ho(e){return ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ho(e)}function yo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vo(e,t)}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vo(e,t)}var mo=i.Z.getComponent("Component"),bo=function(e){function t(e,n){var r;return ao(this,t),(r=so(this,t,[e,n])).bindEventListeners(),r}return yo(t,e),co(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=po(ho(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var e,n,r}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}])}(mo),go=function(e){function t(e,n){var r;return ao(this,t),(r=so(this,t,[e,n])).addChildren(),r}return yo(t,e),co(t,[{key:"addChildren",value:function(){var e=this;ro.forEach((function(t){e.addChild(new bo(e.player_,{side:t}))}))}}])}(mo);function wo(e){return wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(e)}function Oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,So(r.key),r)}}function So(e){var t=function(e){if("object"!=wo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wo(t)?t:t+""}function ko(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ko=function(){return!!e})()}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},No(e)}function Po(e,t){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Po(e,t)}var jo=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=No(t),function(e,t){if(t&&("object"==wo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ko()?Reflect.construct(t,n||[],No(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Po(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function Eo(e){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eo(e)}function Co(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,To(r.key),r)}}function To(e){var t=function(e){if("object"!=Eo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eo(t)?t:t+""}function _o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_o=function(){return!!e})()}function xo(){return xo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lo(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xo.apply(null,arguments)}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(e)}function Ro(e,t){return Ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ro(e,t)}var Io=i.Z.getComponent("MenuButton"),Mo=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Lo(t),function(e,t){if(t&&("object"==Eo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_o()?Reflect.construct(t,n||[],Lo(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ro(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new j(this.player_,{label:"Video Controls"})];return ro.forEach((function(r){n.push(new jo(e.player_,{side:r,label:io[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=xo(Lo(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return io[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Io.prototype.handleClick.apply(this)}}],r&&Co(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Io);function Do(e){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(e)}function Bo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ao(r.key),r)}}function Ao(e){var t=function(e){if("object"!=Do(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Do(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Do(t)?t:t+""}function Fo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fo=function(){return!!e})()}function zo(e){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zo(e)}function Zo(e,t){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zo(e,t)}var Vo="cv-whiteboard-side",Go=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=zo(t),function(e,t){if(t&&("object"==Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fo()?Reflect.construct(t,n||[],zo(e).constructor):t.apply(e,n))}(this,t,[e])).side="bottom",n.enabled=!0,n.player.ready((function(){n.initialize()})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zo(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(Gt()){var e=Ut(Vo);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var e,t,n=this;if(!(null===(t=(e=this.player).viewTranscriptPlugin)||void 0===t?void 0:t.call(e).isTranscriptOn())){var r=this.player.getChild("collapserator");this.dragHandle=new no(this.player),this.button=new Mo(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},a=function(e){n.player.isFullscreen()&&(n.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},u=function(){n.player.isFullscreen()&&(n.player.removeClass("cv-dragging"),r.el().setAttribute("draggable","false"))};this.dragHandle.el().addEventListener("mousedown",i),this.dragHandle.el().addEventListener("mouseup",o),r.el().addEventListener("dragstart",a),r.el().addEventListener("dragend",u),this.on("dispose",(function(){n.dragHandle.el().removeEventListener("mousedown",i),n.dragHandle.el().removeEventListener("mouseup",o),r.el().removeEventListener("dragstart",a),r.el().removeEventListener("dragend",u)}))}}},{key:"initDragTargets",value:function(){this.player.addChild(new go(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("cv-transcript-toggle",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Gt()&&Kt(Vo,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"setEnabled",value:function(e){this.enabled=e,this.update()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"getSide",value:function(){return this.isEnabled()?this.side:"bottom"}},{key:"update",value:function(){var e,t;if(this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),i.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.isEnabled()){null===(t=this.dragHandle)||void 0===t||t.show();var n=this.getSide();this.player.isFullscreen()&&"bottom"!==n&&(this.player.addClass("cv-whiteboard-".concat(n)),i.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}else null===(e=this.dragHandle)||void 0===e||e.hide()}}],r&&Bo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Uo(e){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uo(e)}function Ko(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qo(r.key),r)}}function qo(e){var t=function(e){if("object"!=Uo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uo(t)?t:t+""}function Ho(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ho=function(){return!!e})()}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wo(e)}function Yo(e,t){return Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yo(e,t)}i.Z.registerPlugin("whiteboardModePlugin",Go);var Qo=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Wo(t),function(e,t){if(t&&("object"==Uo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ho()?Reflect.construct(t,n||[],Wo(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yo(e,t)}(t,e),n=t,(r=[{key:"deferMenu",value:function(){var e={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",e)}},{key:"buildSubtitles",value:function(){for(var e=[],t=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;e.unshift({id:i.label,name:i.label,selected:o}),o&&(t=!0)}return e.push({id:null,name:"Off",selected:!t}),e}},{key:"buildQualities",value:function(){for(var e=[],t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];e.push({id:r.id,name:r.id+"p",selected:r.enabled})}return e}},{key:"buildPlaybackSpeeds",value:function(){var e=this.player.playbackRate();return this.player.options_.playbackRates.map((function(t){return{id:t,name:t+"x"+(1===t?" (Normal)":""),selected:e===t}}))}}])&&Ko(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("deferMenusPlugin",Qo);var Jo="PreventScrubbingTooltip";function Xo(e){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xo(e)}function $o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ea(r.key),r)}}function ea(e){var t=function(e){if("object"!=Xo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xo(t)?t:t+""}function ta(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ta=function(){return!!e})()}function na(e,t,n,r){var i=ra(ia(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ra(){return ra="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ia(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ra.apply(null,arguments)}function ia(e){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ia(e)}function oa(e,t){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oa(e,t)}var aa=i.Z.getComponent("Component"),ua="cv-prevent-scrubbing-tooltip-show",ca="cv-prevent-scrubbing-tooltip-remove-transition",la=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ia(t),function(e,t){if(t&&("object"==Xo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ta()?Reflect.construct(t,n||[],ia(e).constructor):t.apply(e,n))}(this,t,arguments)).isShowing=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oa(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(na(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return na(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(ua),this.isShowing=!0)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(t&&(this.addClass(ca),window.requestAnimationFrame((function(){e.removeClass(ca)}))),this.player_.userActive(!1),this.removeClass(ua),this.isShowing=!1)}}],r&&$o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(aa);function sa(e){return sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sa(e)}function fa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pa(r.key),r)}}function pa(e){var t=function(e){if("object"!=sa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sa(t)?t:t+""}function ha(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ha=function(){return!!e})()}function ya(){return ya="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=va(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ya.apply(null,arguments)}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},va(e)}function da(e,t){return da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},da(e,t)}i.Z.registerComponent(Jo,la);var ma=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=va(t),function(e,t){if(t&&("object"==sa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ha()?Reflect.construct(t,n||[],va(e).constructor):t.apply(e,n))}(this,t,[e])).isEnabled=!1,r.isPreviewing=!1;var i=null!=n?n:{},o=i.furthestVisitedTime,a=void 0===o?0:o,u=i.isEnabled,c=void 0!==u&&u;return r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=a,r.isEnabled=c,c&&r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&da(e,t)}(t,e),n=t,r=[{key:"dispose",value:function(){var e,n,r;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(e=t,n=this,"function"==typeof(r=ya(va(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}},{key:"togglePreview",value:function(e){if(e){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(Jo),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 e=this.playerCurrentTimeFn();e>this.furthestVisitedTime&&(this.furthestVisitedTime=e)}},{key:"currentTime",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if("number"!=typeof e)return this.playerCurrentTimeFn.apply(this,[e].concat(r));if(this.isEnabled){var o=this.getPreventScrubbingTooltip(),a=null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay");if(e>this.furthestVisitedTime)return o.show(),Q(o.hide,1e3,!1,o)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==a||a.show(),o.hide(!0),this.playerCurrentTimeFn(e,r)}else this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(Jo)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}],r&&fa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function ba(e){return ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ba(e)}function ga(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wa(r.key),r)}}function wa(e){var t=function(e){if("object"!=ba(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ba(t)?t:t+""}function Oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oa=function(){return!!e})()}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sa(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ka(e,t)}i.Z.registerPlugin("preventScrubbingPlugin",ma);var Na=i.Z.getComponent("Button"),Pa="cv-muted",ja=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Sa(t),function(e,t){if(t&&("object"==ba(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oa()?Reflect.construct(t,n||[],Sa(e).constructor):t.apply(e,n))}(this,t,[e])).update(),n.update=n.update.bind(n),e.on("volumechange",n.update),e.on("dispose",(function(){return e.off("volumechange",n.update)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ka(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(Pa):this.removeClass(Pa)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&ga(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Na);function Ea(e){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ea(e)}function Ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ta(r.key),r)}}function Ta(e){var t=function(e){if("object"!=Ea(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ea(t)?t:t+""}function _a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_a=function(){return!!e})()}function xa(){return xa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=La(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xa.apply(null,arguments)}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},La(e)}function Ra(e,t){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ra(e,t)}i.Z.registerComponent("muteButton",ja),ja.prototype.controlText_="Mute";var Ia,Ma=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=La(t),function(e,t){if(t&&("object"==Ea(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_a()?Reflect.construct(t,n||[],La(e).constructor):t.apply(e,n))}(this,t,[e,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ra(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(e){"function"==typeof this._onClickHandler&&(e.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var e,n,r;this.off("click",this.handleClick),(e=t,n=this,"function"==typeof(r=xa(La(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],r&&Ca(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Da(e){return Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(e)}function Ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Aa(r.key),r)}}function Aa(e){var t=function(e){if("object"!=Da(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Da(t)?t:t+""}function Fa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fa=function(){return!!e})()}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},za(e)}function Za(e,t){return Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Za(e,t)}i.Z.registerComponent("playerOverlay",Ma),function(e){e.Default="play",e.Hover="hover"}(Ia||(Ia={}));var Va=i.Z.getPlugin("plugin"),Ga="cv-preview-mode",Ua=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=za(t),function(e,t){if(t&&("object"==Da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fa()?Reflect.construct(t,n||[],za(e).constructor):t.apply(e,n))}(this,t,[e])).buttonAdded=!1,n.mode=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Za(e,t)}(t,e),n=t,(r=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(e,t){var n=this.mode;if(this.mode=e,e===Ia.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(Ga),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Ia.Hover&&(this.player.removeClass(Ga),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new ja(this.player),n=new Ma(this.player,{onClickHandler:e});this.player.addChild(t),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var e=this;this.player.dataLoaded((function(){return e.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var e=this;this.player.dataLoaded((function(){return e.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var e=this;this.player.ready((function(){e.player.persistVolumePlugin().disable(),e.player.muted(!0)}))}},{key:"unmute",value:function(){var e=this;this.player.ready((function(){e.player.persistVolumePlugin().applyUserPreferences(),e.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}}])&&Ba(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Va);function Ka(e){return Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ka(e)}function qa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ha(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ya(r.key),r)}}function Wa(e,t,n){return t&&Ha(e.prototype,t),n&&Ha(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ya(e){var t=function(e){if("object"!=Ka(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ka(t)?t:t+""}function Qa(e,t,n){return t=Xa(t),function(e,t){if(t&&("object"==Ka(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ja()?Reflect.construct(t,n||[],Xa(e).constructor):t.apply(e,n))}function Ja(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ja=function(){return!!e})()}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xa(e)}function $a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eu(e,t)}function eu(e,t){return eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eu(e,t)}i.Z.registerPlugin("playerModePlugin",Ua);var tu=i.Z.getComponent("Component"),nu=i.Z.getComponent("ClickableComponent"),ru=function(e){function t(){return qa(this,t),Qa(this,t,arguments)}return $a(t,e),Wa(t,[{key:"createEl",value:function(){return tu.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>")})}}])}(tu),iu=function(e){function t(e,n){var r;return qa(this,t),(r=Qa(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return $a(t,e),Wa(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new ru(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(e,t,n){t=Object.assign({innerHTML:"",className:"cv-favourite-button"},t),n=Object.assign({type:"button"},n);var r=tu.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(nu);function ou(e){return ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ou(e)}function au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uu(r.key),r)}}function uu(e){var t=function(e){if("object"!=ou(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ou(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ou(t)?t:t+""}function cu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cu=function(){return!!e})()}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lu(e)}function su(e,t){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},su(e,t)}iu.prototype.controlText_="Favourite";var fu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=lu(t),function(e,t){if(t&&("object"==ou(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cu()?Reflect.construct(t,n||[],lu(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&su(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new iu(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&au(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function pu(e){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pu(e)}function hu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yu(r.key),r)}}function yu(e){var t=function(e){if("object"!=pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pu(t)?t:t+""}function vu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vu=function(){return!!e})()}function du(e,t,n,r){var i=mu(bu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function mu(){return mu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=bu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mu.apply(null,arguments)}function bu(e){return bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bu(e)}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gu(e,t)}i.Z.registerPlugin("favouritePlugin",fu);var wu=i.Z.getComponent("MenuButton"),Ou="Theatre mode (t)",Su="Default view (t)",ku="cv-theatre-mode-button",Nu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=bu(t),function(e,t){if(t&&("object"==pu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vu()?Reflect.construct(t,n||[],bu(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.updateControlText(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}(t,e),n=t,(r=[{key:"getCollabsibleName",value:function(){return""}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!(window.innerWidth<992)}},{key:"showCollapsibleMenu",value:function(){du(t,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(du(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(du(t,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode(void 0,{shouldLog:!0}),this.updateControlText()}},{key:"updateControlText",value:function(){this.player().theatreModePlugin().getTheatreMode()?this.controlText(Su):this.controlText(Ou)}}])&&hu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(wu);function Pu(e){return Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pu(e)}function ju(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Eu(r.key),r)}}function Eu(e){var t=function(e){if("object"!=Pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pu(t)?t:t+""}function Cu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cu=function(){return!!e})()}function Tu(){return Tu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_u(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Tu.apply(null,arguments)}function _u(e){return _u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_u(e)}function xu(e,t){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xu(e,t)}i.Z.registerComponent("theatreModeButton",Nu);var Lu=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=_u(t),function(e,t){if(t&&("object"==Pu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cu()?Reflect.construct(t,n||[],_u(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindListeners(),e.ready((function(){return r.onReady()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)}(t,e),n=t,r=[{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 e;if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var t=this.options.theatreMode;t&&(null===(e=this.button)||void 0===e||e.addClass(ku),this.options.onRequestTheatreMode(t))}}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(e=t,n=this,"function"==typeof(r=Tu(_u(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"toggleTheatreMode",value:function(e,t){var n,r;if(this.options){var i=this.options.theatreMode,o=void 0!==e?e:!i;if(this.options.onRequestTheatreMode(o),this.options.theatreMode=o,this.button)return i!==o&&(null==t?void 0:t.shouldLog)&&(null===(n=this.analyticsService)||void 0===n||n.logUserAction({id:this.options.playbackObject.videoId,name:this.options.playbackObject.title},{actionType:it.Vw.Click,descriptor:o?it.UX.EnableTheatreMode:it.UX.DisableTheatreMode,entity:it.py.Video})),o?(i||this.player.fill(!0),this.button.addClass(ku),this.button.updateControlText(Ou),o):(i&&this.player.fluid(!0),null===(r=this.button)||void 0===r||r.removeClass(ku),this.button.updateControlText(Su),this.player.viewTranscriptPlugin&&this.player.viewTranscriptPlugin().toggleTranscript(!1,{shouldLog:!1}),o)}}},{key:"onResize",value:function(){var e,t;window.innerWidth<992?null===(e=this.button)||void 0===e||e.hide():this.player.isFullscreen()||(this.button||(this.button=this.createButton()),null===(t=this.button)||void 0===t||t.show())}},{key:"createButton",value:function(){var e=this.getCollapserator();return(null==e?void 0:e.getChild("theatreModeButton"))||e.addChild("theatreModeButton",{},e.children_.length-3),null==e?void 0:e.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var e,t;this.player.isFullscreen()?null===(e=this.button)||void 0===e||e.hide():null===(t=this.button)||void 0===t||t.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}},{key:"getTheatreMode",value:function(){return this.options.theatreMode}},{key:"registerAnalytics",value:function(e){this.analyticsService=e}}],r&&ju(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("theatreModePlugin",Lu);var Ru=n(18204),Iu=i.Z.getComponent("Menu"),Mu=Iu.prototype.createEl;Iu.prototype.createEl=function(){var e=Mu.call(this);return this.simpleBar=new Ru.Z(this.contentEl(),{autoHide:!1}),e};var Du=Iu.prototype.contentEl;Iu.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():Du.call(this)};var Bu=Iu.prototype.dispose;Iu.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),Bu.call(this)};var Au=Iu.prototype.addItem;Iu.prototype.addItem=function(e){Au.call(this,e),this.simpleBar.recalculate()};var Fu=Iu.prototype.lockShowing;Iu.prototype.lockShowing=function(){Fu.call(this),this.simpleBar.recalculate()},Iu.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var zu=Iu.prototype.handleBlur;function Zu(e){return Zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zu(e)}function Vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gu(r.key),r)}}function Gu(e){var t=function(e){if("object"!=Zu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zu(t)?t:t+""}function Uu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Uu=function(){return!!e})()}function Ku(e){return Ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ku(e)}function qu(e,t){return qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qu(e,t)}Iu.prototype.handleBlur=function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||zu.call(this,e)};var Hu=i.Z.getComponent("Menu"),Wu=i.Z.getComponent("Component"),Yu=i.Z.getComponent("MenuButton"),Qu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ku(t),function(e,t){if(t&&("object"==Zu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Uu()?Reflect.construct(t,n||[],Ku(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qu(e,t)}(t,e),n=t,(r=[{key:"createMenu",value:function(){var e,t=new Hu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=i.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new Wu(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)t.addItem(this.items[o]);return t}}])&&Vu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Yu),Ju=Yu.prototype.pressButton;Yu.prototype.pressButton=function(){Ju.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Xu=Yu.prototype.unpressButton;function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function ec(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tc(r.key),r)}}function tc(e){var t=function(e){if("object"!=$u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$u(t)?t:t+""}function nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nc=function(){return!!e})()}function rc(e,t,n,r){var i=ic(oc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ic(){return ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=oc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ic.apply(null,arguments)}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oc(e)}function ac(e,t){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ac(e,t)}Yu.prototype.unpressButton=function(){Xu.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},i.Z.registerComponent("MenuButton",Qu);var uc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=oc(t),function(e,t){if(t&&("object"==$u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nc()?Reflect.construct(t,n||[],oc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ac(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(rc(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return rc(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&ec(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function cc(e){return cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cc(e)}function lc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sc(r.key),r)}}function sc(e){var t=function(e){if("object"!=cc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cc(t)?t:t+""}function fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fc=function(){return!!e})()}function pc(e){return pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pc(e)}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hc(e,t)}uc.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},i.Z.registerComponent("TimeWrapper",uc);var yc=i.Z.getComponent("SeekBar"),vc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=pc(t),function(e,t){if(t&&("object"==cc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fc()?Reflect.construct(t,n||[],pc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(yc.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){yc.prototype.handleMouseMove.call(this,e),this.update()}},{key:"getPercent",value:function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e}},{key:"handleMouseUp",value:function(e){var t=this;yc.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(e,t,n){return Math.min(Math.max(e,t),n)}},{key:"getMouseTime",value:function(e){return this.clamp(yc.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&lc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yc);function dc(e){return dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dc(e)}function mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bc(r.key),r)}}function bc(e){var t=function(e){if("object"!=dc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dc(t)?t:t+""}function gc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gc=function(){return!!e})()}function wc(e,t,n,r){var i=Oc(Sc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Oc(){return Oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Sc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Oc.apply(null,arguments)}function Sc(e){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sc(e)}function kc(e,t){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kc(e,t)}i.Z.registerComponent("SeekBar",vc);var Nc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Sc(t),function(e,t){if(t&&("object"==dc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gc()?Reflect.construct(t,n||[],Sc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(wc(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return wc(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&mc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Pc(e){return Pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pc(e)}function jc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ec(r.key),r)}}function Ec(e){var t=function(e){if("object"!=Pc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pc(t)?t:t+""}function Cc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cc=function(){return!!e})()}function Tc(e,t,n,r){var i=_c(xc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function _c(){return _c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_c.apply(null,arguments)}function xc(e){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xc(e)}function Lc(e,t){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lc(e,t)}var Rc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=xc(t),function(e,t){if(t&&("object"==Pc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cc()?Reflect.construct(t,n||[],xc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Tc(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Tc(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&jc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Ic(e){return Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ic(e)}function Mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dc(r.key),r)}}function Dc(e){var t=function(e){if("object"!=Ic(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ic(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ic(t)?t:t+""}function Bc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bc=function(){return!!e})()}function Ac(e,t,n,r){var i=Fc(zc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Fc(){return Fc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Fc.apply(null,arguments)}function zc(e){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zc(e)}function Zc(e,t){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zc(e,t)}var Vc=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zc(t),function(e,t){if(t&&("object"==Ic(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bc()?Reflect.construct(t,n||[],zc(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new Rc(r.player_),r.addChild(r.playProgress),r.loadProgress=new Nc(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Ac(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ac(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&Mc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Gc(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}function Uc(e){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uc(e)}function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qc(r.key),r)}}function qc(e){var t=function(e){if("object"!=Uc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uc(t)?t:t+""}function Hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hc=function(){return!!e})()}function Wc(e,t,n,r){var i=Yc(Qc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Yc(){return Yc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yc.apply(null,arguments)}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qc(e)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jc(e,t)}var Xc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Qc(t),function(e,t){if(t&&("object"==Uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hc()?Reflect.construct(t,n||[],Qc(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Wc(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Wc(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(Gc(e.player_))}))}}])&&Kc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function $c(e){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(e)}function el(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tl(r.key),r)}}function tl(e){var t=function(e){if("object"!=$c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$c(t)?t:t+""}function nl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nl=function(){return!!e})()}function rl(e,t,n,r){var i=il(ol(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function il(){return il="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ol(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},il.apply(null,arguments)}function ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ol(e)}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}var ul=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ol(t),function(e,t){if(t&&("object"==$c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nl()?Reflect.construct(t,n||[],ol(e).constructor):t.apply(e,n))}(this,t,[e,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),Y.useChapters(r.player_,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&al(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),rl(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return i.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 e=rl(t,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(e){var t=this,n=function(){t.createChapterItems(),t.updateBuffered()};e.addEventListener("cv:cuechange",n),this.player_.one("dispose",(function(){return e.removeEventListener("cv:cuechange",n)}))}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_||this.bindUpdateListener(e),this.track_=e);var r=new Xc(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,u=o.endTime,c=this.player_.duration();c&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new Vc(this.player_,{startTime:a,endTime:u});if(r.addChild(l),c&&u===c)break}else r.addChild(new Vc(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&el(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("SeekBar"));function cl(e){return cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cl(e)}function ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sl(r.key),r)}}function sl(e){var t=function(e){if("object"!=cl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cl(t)?t:t+""}function fl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fl=function(){return!!e})()}function pl(){return pl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pl.apply(null,arguments)}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hl(e)}function yl(e,t){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yl(e,t)}ul.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},i.Z.browser.IS_IOS||i.Z.browser.IS_ANDROID||ul.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),i.Z.registerComponent("ChapterSeekBar",ul);var vl=i.Z.getComponent("ProgressControl"),dl="seekBar",ml=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=hl(t),function(e,t){if(t&&("object"==cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fl()?Reflect.construct(t,n||[],hl(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=dl,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yl(e,t)}(t,e),n=t,r=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())===dl.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(i=pl(hl(1&3?n.prototype:n),"getChild",r))?function(e){return i.apply(r,e)}:i)([e]);var n,r,i}}],r&&ll(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vl);function bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}function gl(e){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(e)}function wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ol(r.key),r)}}function Ol(e){var t=function(e){if("object"!=gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gl(t)?t:t+""}function Sl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Sl=function(){return!!e})()}function kl(){return kl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Nl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},kl.apply(null,arguments)}function Nl(e){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nl(e)}function Pl(e,t){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pl(e,t)}ml.prototype.options_={children:[]},i.Z.registerComponent("ProgressControl",ml);var jl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Nl(t),function(e,t){if(t&&("object"==gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sl()?Reflect.construct(t,n||[],Nl(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,Y.useChapters(r.player_,(function(e){r.track_=e})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){var e,n,r,o=(e=t,n=this,"function"==typeof(r=kl(Nl(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)([]);return this.chapter_=i.Z.dom.createEl("div"),o.appendChild(this.chapter_),this.time_=i.Z.dom.createEl("div"),o.appendChild(this.time_),o}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(i.Z.dom.textContent(this.time_,bl(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=r.endTime||t;if(r.startTime<=e&&o>=e)return void i.Z.dom.textContent(this.chapter_,r.text)}i.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){i.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){i.Z.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,i.Z.dom.textContent(this.chapter_,null!=e?e:"")}}],r&&wl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TimeTooltip"));function El(e){return El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},El(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tl(r.key),r)}}function Tl(e){var t=function(e){if("object"!=El(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=El(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==El(t)?t:t+""}function _l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_l=function(){return!!e})()}function xl(){return xl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ll(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xl.apply(null,arguments)}function Ll(e){return Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ll(e)}function Rl(e,t){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rl(e,t)}i.Z.registerComponent("TimeTooltip",jl);var Il=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ll(t),function(e,t){if(t&&("object"==El(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_l()?Reflect.construct(t,n||[],Ll(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rl(e,t)}(t,e),n=t,r=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e,n,r,o=(e=t,n=this,"function"==typeof(r=xl(Ll(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-thumbnail-display"}]);return this.img_=i.Z.dom.createEl("img"),o.appendChild(this.img_),o}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var u=r,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,h=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(h,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],r&&Cl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Ml(e){return Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ml(e)}function Dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bl(r.key),r)}}function Bl(e){var t=function(e){if("object"!=Ml(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ml(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ml(t)?t:t+""}function Al(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Al=function(){return!!e})()}function Fl(e){return Fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fl(e)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zl(e,t)}Il.prototype.options_={scaleFactor:1},i.Z.registerComponent("ThumbnailDisplay",Il);var Zl=i.Z.getComponent("MouseTimeDisplay"),Vl="cv-mouse-time-display-force-show",Gl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=Fl(t),function(e,t){if(t&&("object"==Ml(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Al()?Reflect.construct(t,n||[],Fl(e).constructor):t.apply(e,n))}(this,t,[e,n]),Y.useMetadataTrack(r.player_,"thumbnails",(function(e){r.getChild("ThumbnailDisplay").setTrack(e)})),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",(function(){r.player_.off("durationchange",r.update)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zl(e,t)}(t,e),n=t,(r=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=n.getChild("TimeTooltip"),i=n.getChild("ThumbnailDisplay"),o=t*n.player_.duration(),a=n.player_.preventScrubbingPlugin(),u=n.player_.controlBar.getChild("progressControl").getChild(Jo),c=!1;a.isEnabled&&(c=o>a.furthestVisitedTime),c?(n.hide(),u.show(),Q(u.hide,1e3,!1,u)()):(n.show(),u&&u.hide(!0),i.update(o),r.updateTime(o));var l=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-l.width/2+"px";var s=e.width*t;s<l.width/2?n.el_.style.left=l.width/2+"px":s>e.width-l.width/2?n.el_.style.left=e.width-l.width/2+"px":n.el_.style.left=e.width*t+"px"}))}},{key:"forceShow",value:function(){this.addClass(Vl)}},{key:"removeForceShow",value:function(){this.removeClass(Vl)}}])&&Dl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Zl);function Ul(e){return Ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul(e)}function Kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ql(r.key),r)}}function ql(e){var t=function(e){if("object"!=Ul(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ul(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ul(t)?t:t+""}function Hl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hl=function(){return!!e})()}function Wl(){return Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Yl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Wl.apply(null,arguments)}function Yl(e){return Yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yl(e)}function Ql(e,t){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ql(e,t)}Gl.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},i.Z.registerComponent("MouseTimeDisplay",Gl);var Jl=i.Z.getComponent("ChaptersTrackMenuItem"),Xl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Yl(t),function(e,t){if(t&&("object"==Ul(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hl()?Reflect.construct(t,n||[],Yl(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new Il(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),Y.useMetadataTrack(r.player_,"thumbnails",(function(e){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(e),r.thumbnailDisplay.update(r.options_.cue.startTime)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ql(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&Jl.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,n,r){return this.nonIconControl=!0,(i=t,o=this,"function"==typeof(a=Wl(Yl(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r]);var i,o,a}},{key:"getInnerHTML",value:function(){var e=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(bl(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&Kl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Jl);function $l(e){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$l(e)}function es(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ts(r.key),r)}}function ts(e){var t=function(e){if("object"!=$l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$l(t)?t:t+""}function ns(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ns=function(){return!!e})()}function rs(e,t,n,r){var i=is(os(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function is(){return is="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=os(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},is.apply(null,arguments)}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},os(e)}function as(e,t){return as=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},as(e,t)}var us=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(e,t,n){return t=os(t),function(e,t){if(t&&("object"==$l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ns()?Reflect.construct(t,n||[],os(e).constructor):t.apply(e,n))}(this,t,[e,n,r])).alwaysCollapsed=!1,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(i),i.player_.on("cv-whiteboard-change",i.update),i.player_.on("fullscreenchange",i.update),i.player_.on("dispose",(function(){i.player_.off("cv-whiteboard-change",i.update),i.player_.off("fullscreenchange",i.update)})),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&as(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(rs(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(rs(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t||t.length<2)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Xl(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var n=this;if(rs(t,"setTrack",this,3)([e]),this.track_&&"chapters"===this.track_.kind){e.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};e.on("cv:cuechange",r),this.player_.one("dispose",(function(){return e.off("cv:cueupdate",r)}))}}},{key:"update",value:function(e){rs(t,"update",this,3)([e])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&es(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ChaptersButton"));function cs(e){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(e)}function ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ss(r.key),r)}}function ss(e){var t=function(e){if("object"!=cs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cs(t)?t:t+""}function fs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fs=function(){return!!e})()}function ps(){return ps="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hs(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ps.apply(null,arguments)}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hs(e)}function ys(e,t){return ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ys(e,t)}i.Z.registerComponent("ChaptersButton",us);var vs=i.Z.getComponent("OffTextTrackMenuItem"),ds=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.track={player:e,kind:n.kind,kinds:n.kinds,default:!1,mode:"hidden"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,function(e,t,n){return t=hs(t),function(e,t){if(t&&("object"==cs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fs()?Reflect.construct(t,n||[],hs(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ys(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){vs.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return(i=t,o=this,"function"==typeof(a=ps(hs(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r]);var i,o,a}}],r&&ls(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vs);function ms(e){return ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(e)}function bs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gs(r.key),r)}}function gs(e){var t=function(e){if("object"!=ms(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ms(t)?t:t+""}function ws(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ws=function(){return!!e})()}function Os(e){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Os(e)}function Ss(e,t){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ss(e,t)}i.Z.registerComponent("OffTextTrackMenuItem",ds);var ks=i.Z.getComponent("TextTrackButton"),Ns=i.Z.getComponent("TextTrackMenuItem"),Ps=i.Z.getComponent("OffTextTrackMenuItem"),js=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Os(t),function(e,t){if(t&&("object"==ms(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ws()?Reflect.construct(t,n||[],Os(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ss(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ns;this.label_&&(e="".concat(this.label_," off")),t.push(new Ps(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return this.player().trigger("resizemenus"),t}}],r&&bs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ks);i.Z.registerComponent("TextTrackButton",js);var Es=n(16951),Cs=n(83983),Ts=n.n(Cs),_s=n(56050),xs=n(81886),Ls=n(23481);const Rs=JSON.parse('{"aa":{"englishName":"Afar","nativeName":"Qafar"},"aa-dj":{"englishName":"Afar (Djibouti)","nativeName":"Qafar (Yabuuti)"},"aa-er":{"englishName":"Afar (Eritrea)","nativeName":"Qafar (Eretria)"},"aa-et":{"englishName":"Afar (Ethiopia)","nativeName":"Qafar (Otobbia)"},"af":{"englishName":"Afrikaans","nativeName":"Afrikaans"},"af-na":{"englishName":"Afrikaans (Namibia)","nativeName":"Afrikaans (Namibië)"},"af-za":{"englishName":"Afrikaans (South Africa)","nativeName":"Afrikaans (Suid-Afrika)"},"agq":{"englishName":"Aghem","nativeName":"Aghem"},"agq-cm":{"englishName":"Aghem (Cameroon)","nativeName":"Aghem (K� m� lûŋ)"},"ak":{"englishName":"Akan","nativeName":"Akan"},"ak-gh":{"englishName":"Akan (Ghana)","nativeName":"Akan (Gaana)"},"am":{"englishName":"Amharic","nativeName":"�� ማáˆáŠ›"},"am-et":{"englishName":"Amharic (Ethiopia)","nativeName":"�� ማáˆáŠ› (ኢትዮጵያ)"},"ar":{"englishName":"Arabic","nativeName":"العربية"},"ar-001":{"englishName":"Arabic (World)","nativeName":"العربية (العالم)"},"ar-ae":{"englishName":"Arabic (United Arab Emirates)","nativeName":"العربية (الإمارات العربية Ø§Ù„Ù…ØªØØ¯Ø©)"},"ar-bh":{"englishName":"Arabic (Bahrain)","nativeName":"العربية (Ø§Ù„Ø¨ØØ±ÙŠÙ†)"},"ar-dj":{"englishName":"Arabic (Djibouti)","nativeName":"العربية (جيبوتي)"},"ar-dz":{"englishName":"Arabic (Algeria)","nativeName":"العربية (الجزائر)"},"ar-eg":{"englishName":"Arabic (Egypt)","nativeName":"العربية (مصر)"},"ar-er":{"englishName":"Arabic (Eritrea)","nativeName":"العربية (إريتريا)"},"ar-il":{"englishName":"Arabic (Israel)","nativeName":"العربية (إسرائيل)"},"ar-iq":{"englishName":"Arabic (Iraq)","nativeName":"العربية (العراق)"},"ar-jo":{"englishName":"Arabic (Jordan)","nativeName":"العربية (الأردن)"},"ar-km":{"englishName":"Arabic (Comoros)","nativeName":"العربية (جزر القمر)"},"ar-kw":{"englishName":"Arabic (Kuwait)","nativeName":"العربية (الكويت)"},"ar-lb":{"englishName":"Arabic (Lebanon)","nativeName":"العربية (لبنان)"},"ar-ly":{"englishName":"Arabic (Libya)","nativeName":"العربية (ليبيا)"},"ar-ma":{"englishName":"Arabic (Morocco)","nativeName":"العربية (المملكة المغربية)"},"ar-mr":{"englishName":"Arabic (Mauritania)","nativeName":"العربية (موريتانيا)"},"ar-om":{"englishName":"Arabic (Oman)","nativeName":"العربية (عمان)"},"ar-ps":{"englishName":"Arabic (Palestinian Authority)","nativeName":"العربية (السلطة الÙلسطينية)"},"ar-qa":{"englishName":"Arabic (Qatar)","nativeName":"العربية (قطر)"},"ar-sa":{"englishName":"Arabic (Saudi Arabia)","nativeName":"العربية (المملكة العربية السعودية)"},"ar-sd":{"englishName":"Arabic (Sudan)","nativeName":"العربية (السودان)"},"ar-so":{"englishName":"Arabic (Somalia)","nativeName":"العربية (الصومال)"},"ar-ss":{"englishName":"Arabic (South Sudan)","nativeName":"العربية (جنوب السودان)"},"ar-sy":{"englishName":"Arabic (Syria)","nativeName":"العربية (سوريا)"},"ar-td":{"englishName":"Arabic (Chad)","nativeName":"العربية (تشاد)"},"ar-tn":{"englishName":"Arabic (Tunisia)","nativeName":"العربية (تونس)"},"ar-ye":{"englishName":"Arabic (Yemen)","nativeName":"العربية (اليمن)"},"arn":{"englishName":"Mapudungun","nativeName":"Mapudungun"},"arn-cl":{"englishName":"Mapudungun (Chile)","nativeName":"Mapudungun (Chile)"},"as":{"englishName":"Assamese","nativeName":"অসমীয়া"},"as-in":{"englishName":"Assamese (India)","nativeName":"অসমীয়া (à¦à¦¾à§°à¦¤)"},"asa":{"englishName":"Asu","nativeName":"Kipare"},"asa-tz":{"englishName":"Asu (Tanzania)","nativeName":"Kipare (Tadhania)"},"ast":{"englishName":"Asturian","nativeName":"asturianu"},"ast-es":{"englishName":"Asturian (Spain)","nativeName":"asturianu (España)"},"az":{"englishName":"Azerbaijani","nativeName":"azÉ™rbaycan dili"},"az-cyrl":{"englishName":"Azerbaijani (Cyrillic)","nativeName":"Ðзәрбајҹан дили"},"az-cyrl-az":{"englishName":"Azerbaijani (Cyrillic, Azerbaijan)","nativeName":"Ðзәрбајҹан дили (Ðзәрбајҹан)"},"az-latn":{"englishName":"Azerbaijani (Latin)","nativeName":"AzÉ™rbaycan dili"},"az-latn-az":{"englishName":"Azerbaijani (Latin, Azerbaijan)","nativeName":"AzÉ™rbaycan dili (AzÉ™rbaycan)"},"ba":{"englishName":"Bashkir","nativeName":"Башҡорт"},"ba-ru":{"englishName":"Bashkir (Russia)","nativeName":"Башҡорт (� Ó™Ñәй)"},"bas":{"englishName":"Basaa","nativeName":"Æï¿½ s� a"},"bas-cm":{"englishName":"Basaa (Cameroon)","nativeName":"Æï¿½ s� a (K� mɛ̀rûn)"},"be":{"englishName":"Belarusian","nativeName":"БеларуÑкаÑ"},"be-by":{"englishName":"Belarusian (Belarus)","nativeName":"БеларуÑÐºÐ°Ñ (БеларуÑÑŒ)"},"bem":{"englishName":"Bemba","nativeName":"Ichibemba"},"bem-zm":{"englishName":"Bemba (Zambia)","nativeName":"Ichibemba (Zambia)"},"bez":{"englishName":"Bena","nativeName":"Hibena"},"bez-tz":{"englishName":"Bena (Tanzania)","nativeName":"Hibena (Hutanzania)"},"bg":{"englishName":"Bulgarian","nativeName":"българÑки"},"bg-bg":{"englishName":"Bulgarian (Bulgaria)","nativeName":"българÑки (БългариÑ)"},"bin":{"englishName":"Edo","nativeName":"Ẹ̀dó"},"bin-ng":{"englishName":"Edo (Nigeria)","nativeName":"Ẹ̀dó (Nigeria)"},"bm":{"englishName":"Bamanankan","nativeName":"bamanakan"},"bm-latn":{"englishName":"Bamanankan (Latin)","nativeName":"bamanakan"},"bm-latn-ml":{"englishName":"Bamanankan (Latin, Mali)","nativeName":"bamanakan (Mali)"},"bn":{"englishName":"Bangla","nativeName":"বাংলা"},"bn-bd":{"englishName":"Bangla (Bangladesh)","nativeName":"বাংলা (বাংলাদেশ)"},"bn-in":{"englishName":"Bangla (India)","nativeName":"বাংলা (à¦à¦¾à¦°à¦¤)"},"bo":{"englishName":"Tibetan","nativeName":"བོད་ཡིག"},"bo-cn":{"englishName":"Tibetan (China)","nativeName":"བོད་ཡིག (ཀྲུང་ཧà¾à¼‹à½˜à½²à¼‹à½‘མངས་སྤྱི་མà½à½´à½“་རྒྱལ་à½à½–à¼)"},"bo-in":{"englishName":"Tibetan (India)","nativeName":"བོད་སà¾à½‘་ (རྒྱ་གར་)"},"br":{"englishName":"Breton","nativeName":"brezhoneg"},"br-fr":{"englishName":"Breton (France)","nativeName":"brezhoneg (Frañs)"},"brx":{"englishName":"Bodo","nativeName":"बड़ो"},"brx-in":{"englishName":"Bodo (India)","nativeName":"बड़ो (à¤à¤¾à¤°à¤¤)"},"bs":{"englishName":"Bosnian","nativeName":"bosanski"},"bs-cyrl":{"englishName":"Bosnian (Cyrillic)","nativeName":"боÑанÑки"},"bs-cyrl-ba":{"englishName":"Bosnian (Cyrillic, Bosnia and Herzegovina)","nativeName":"боÑанÑки (БоÑна и Херцеговина)"},"bs-latn":{"englishName":"Bosnian (Latin)","nativeName":"bosanski"},"bs-latn-ba":{"englishName":"Bosnian (Latin, Bosnia and Herzegovina)","nativeName":"bosanski (Bosna i Hercegovina)"},"byn":{"englishName":"Blin","nativeName":"ብሊን"},"byn-er":{"englishName":"Blin (Eritrea)","nativeName":"ብሊን (ኤáˆá‰µáˆ«)"},"ca":{"englishName":"Catalan","nativeName":"catal� "},"ca-ad":{"englishName":"Catalan (Andorra)","nativeName":"catal� (Andorra)"},"ca-es":{"englishName":"Catalan (Catalan)","nativeName":"catal� (catal� )"},"ca-es-valencia":{"englishName":"Valencian (Spain)","nativeName":"valenci� (Espanya)"},"ca-fr":{"englishName":"Catalan (France)","nativeName":"catal� (França)"},"ca-it":{"englishName":"Catalan (Italy)","nativeName":"catal� (It� lia)"},"ce":{"englishName":"Chechen","nativeName":"нохчийн"},"ce-ru":{"englishName":"Chechen (Russia)","nativeName":"нохчийн (� оÑÑи)"},"cgg":{"englishName":"Chiga","nativeName":"Rukiga"},"cgg-ug":{"englishName":"Chiga (Uganda)","nativeName":"Rukiga (Uganda)"},"chr":{"englishName":"Cherokee","nativeName":"á£áŽ³áŽ©"},"chr-cher":{"englishName":"Cherokee","nativeName":"á£áŽ³áŽ©"},"chr-cher-us":{"englishName":"Cherokee (Cherokee)","nativeName":"á£áŽ³áŽ© (á£áŽ³áŽ©)"},"co":{"englishName":"Corsican","nativeName":"Corsu"},"co-fr":{"englishName":"Corsican (France)","nativeName":"Corsu (Francia)"},"cs":{"englishName":"Czech","nativeName":"ÄeÅ¡tina"},"cs-cz":{"englishName":"Czech (Czech Republic)","nativeName":"ÄeÅ¡tina (ÄŒeská republika)"},"cu":{"englishName":"Church Slavic","nativeName":"церковноÑловеÌнÑкїй"},"cu-ru":{"englishName":"Church Slavic (Russia)","nativeName":"церковноÑловеÌнÑкїй (рѡÑÑÑ–Ìа)"},"cy":{"englishName":"Welsh","nativeName":"Cymraeg"},"cy-gb":{"englishName":"Welsh (United Kingdom)","nativeName":"Cymraeg (Y Deyrnas Unedig)"},"da":{"englishName":"Danish","nativeName":"dansk"},"da-dk":{"englishName":"Danish (Denmark)","nativeName":"dansk (Danmark)"},"da-gl":{"englishName":"Danish (Greenland)","nativeName":"dansk (Grønland)"},"dav":{"englishName":"Taita","nativeName":"Kitaita"},"dav-ke":{"englishName":"Taita (Kenya)","nativeName":"Kitaita (Kenya)"},"de":{"englishName":"German","nativeName":"Deutsch"},"de-at":{"englishName":"German (Austria)","nativeName":"Deutsch (Österreich)"},"de-be":{"englishName":"German (Belgium)","nativeName":"Deutsch (Belgien)"},"de-ch":{"englishName":"German (Switzerland)","nativeName":"Deutsch (Schweiz)"},"de-de":{"englishName":"German (Germany)","nativeName":"Deutsch (Deutschland)"},"de-li":{"englishName":"German (Liechtenstein)","nativeName":"Deutsch (Liechtenstein)"},"de-lu":{"englishName":"German (Luxembourg)","nativeName":"Deutsch (Luxemburg)"},"dje":{"englishName":"Zarma","nativeName":"Zarmaciine"},"dje-ne":{"englishName":"Zarma (Niger)","nativeName":"Zarmaciine (Nižer)"},"dsb":{"englishName":"Lower Sorbian","nativeName":"dolnoserbšćina"},"dsb-de":{"englishName":"Lower Sorbian (Germany)","nativeName":"dolnoserbšćina (Nimska)"},"dua":{"englishName":"Duala","nativeName":"duálá"},"dua-cm":{"englishName":"Duala (Cameroon)","nativeName":"duálá (Cameroun)"},"dv":{"englishName":"Divehi","nativeName":"Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ°"},"dv-mv":{"englishName":"Divehi (Maldives)","nativeName":"Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ° (Þ‹Þ¨ÞˆÞ¬Þ€Þ¨ ÞƒÞ§Þ‡Þ°Þ–Þ¬)"},"dyo":{"englishName":"Jola-Fonyi","nativeName":"joola"},"dyo-sn":{"englishName":"Jola-Fonyi (Senegal)","nativeName":"joola (Senegal)"},"dz":{"englishName":"Dzongkha","nativeName":"རྫོང་à½"},"dz-bt":{"englishName":"Dzongkha (Bhutan)","nativeName":"རྫོང་འ(�� བྲུག)"},"ebu":{"englishName":"Embu","nativeName":"KÄ©embu"},"ebu-ke":{"englishName":"Embu (Kenya)","nativeName":"KÄ©embu (Kenya)"},"ee":{"englishName":"Ewe","nativeName":"EÊ‹egbe"},"ee-gh":{"englishName":"Ewe (Ghana)","nativeName":"EÊ‹egbe (Ghana nutome)"},"ee-tg":{"englishName":"Ewe (Togo)","nativeName":"EÊ‹egbe (Togo nutome)"},"el":{"englishName":"Greek","nativeName":"Ελληνικά"},"el-cy":{"englishName":"Greek (Cyprus)","nativeName":"Ελληνικά (ΚÏÏ€Ïος)"},"el-gr":{"englishName":"Greek (Greece)","nativeName":"Ελληνικά (Ελλάδα)"},"en":{"englishName":"English","nativeName":"English"},"en-001":{"englishName":"English (World)","nativeName":"English (World)"},"en-029":{"englishName":"English (Caribbean)","nativeName":"English (Caribbean)"},"en-150":{"englishName":"English (Europe)","nativeName":"English (Europe)"},"en-ag":{"englishName":"English (Antigua and Barbuda)","nativeName":"English (Antigua and Barbuda)"},"en-ai":{"englishName":"English (Anguilla)","nativeName":"English (Anguilla)"},"en-as":{"englishName":"English (American Samoa)","nativeName":"English (American Samoa)"},"en-at":{"englishName":"English (Austria)","nativeName":"English (Austria)"},"en-au":{"englishName":"English (Australia)","nativeName":"English (Australia)"},"en-bb":{"englishName":"English (Barbados)","nativeName":"English (Barbados)"},"en-be":{"englishName":"English (Belgium)","nativeName":"English (Belgium)"},"en-bi":{"englishName":"English (Burundi)","nativeName":"English (Burundi)"},"en-bm":{"englishName":"English (Bermuda)","nativeName":"English (Bermuda)"},"en-bs":{"englishName":"English (Bahamas)","nativeName":"English (Bahamas)"},"en-bw":{"englishName":"English (Botswana)","nativeName":"English (Botswana)"},"en-bz":{"englishName":"English (Belize)","nativeName":"English (Belize)"},"en-ca":{"englishName":"English (Canada)","nativeName":"English (Canada)"},"en-cc":{"englishName":"English (Cocos (Keeling) Islands)","nativeName":"English (Cocos (Keeling) Islands)"},"en-ch":{"englishName":"English (Switzerland)","nativeName":"English (Switzerland)"},"en-ck":{"englishName":"English (Cook Islands)","nativeName":"English (Cook Islands)"},"en-cm":{"englishName":"English (Cameroon)","nativeName":"English (Cameroon)"},"en-cx":{"englishName":"English (Christmas Island)","nativeName":"English (Christmas Island)"},"en-cy":{"englishName":"English (Cyprus)","nativeName":"English (Cyprus)"},"en-de":{"englishName":"English (Germany)","nativeName":"English (Germany)"},"en-dk":{"englishName":"English (Denmark)","nativeName":"English (Denmark)"},"en-dm":{"englishName":"English (Dominica)","nativeName":"English (Dominica)"},"en-er":{"englishName":"English (Eritrea)","nativeName":"English (Eritrea)"},"en-fi":{"englishName":"English (Finland)","nativeName":"English (Finland)"},"en-fj":{"englishName":"English (Fiji)","nativeName":"English (Fiji)"},"en-fk":{"englishName":"English (Falkland Islands)","nativeName":"English (Falkland Islands)"},"en-fm":{"englishName":"English (Micronesia)","nativeName":"English (Micronesia)"},"en-gb":{"englishName":"English (United Kingdom)","nativeName":"English (United Kingdom)"},"en-gd":{"englishName":"English (Grenada)","nativeName":"English (Grenada)"},"en-gg":{"englishName":"English (Guernsey)","nativeName":"English (Guernsey)"},"en-gh":{"englishName":"English (Ghana)","nativeName":"English (Ghana)"},"en-gi":{"englishName":"English (Gibraltar)","nativeName":"English (Gibraltar)"},"en-gm":{"englishName":"English (Gambia)","nativeName":"English (Gambia)"},"en-gu":{"englishName":"English (Guam)","nativeName":"English (Guam)"},"en-gy":{"englishName":"English (Guyana)","nativeName":"English (Guyana)"},"en-hk":{"englishName":"English (Hong Kong SAR)","nativeName":"English (Hong Kong SAR)"},"en-id":{"englishName":"English (Indonesia)","nativeName":"English (Indonesia)"},"en-ie":{"englishName":"English (Ireland)","nativeName":"English (Ireland)"},"en-il":{"englishName":"English (Israel)","nativeName":"English (Israel)"},"en-im":{"englishName":"English (Isle of Man)","nativeName":"English (Isle of Man)"},"en-in":{"englishName":"English (India)","nativeName":"English (India)"},"en-io":{"englishName":"English (British Indian Ocean Territory)","nativeName":"English (British Indian Ocean Territory)"},"en-je":{"englishName":"English (Jersey)","nativeName":"English (Jersey)"},"en-jm":{"englishName":"English (Jamaica)","nativeName":"English (Jamaica)"},"en-ke":{"englishName":"English (Kenya)","nativeName":"English (Kenya)"},"en-ki":{"englishName":"English (Kiribati)","nativeName":"English (Kiribati)"},"en-kn":{"englishName":"English (Saint Kitts and Nevis)","nativeName":"English (Saint Kitts and Nevis)"},"en-ky":{"englishName":"English (Cayman Islands)","nativeName":"English (Cayman Islands)"},"en-lc":{"englishName":"English (Saint Lucia)","nativeName":"English (Saint Lucia)"},"en-lr":{"englishName":"English (Liberia)","nativeName":"English (Liberia)"},"en-ls":{"englishName":"English (Lesotho)","nativeName":"English (Lesotho)"},"en-mg":{"englishName":"English (Madagascar)","nativeName":"English (Madagascar)"},"en-mh":{"englishName":"English (Marshall Islands)","nativeName":"English (Marshall Islands)"},"en-mo":{"englishName":"English (Macao SAR)","nativeName":"English (Macao SAR)"},"en-mp":{"englishName":"English (Northern Mariana Islands)","nativeName":"English (Northern Mariana Islands)"},"en-ms":{"englishName":"English (Montserrat)","nativeName":"English (Montserrat)"},"en-mt":{"englishName":"English (Malta)","nativeName":"English (Malta)"},"en-mu":{"englishName":"English (Mauritius)","nativeName":"English (Mauritius)"},"en-mw":{"englishName":"English (Malawi)","nativeName":"English (Malawi)"},"en-my":{"englishName":"English (Malaysia)","nativeName":"English (Malaysia)"},"en-na":{"englishName":"English (Namibia)","nativeName":"English (Namibia)"},"en-nf":{"englishName":"English (Norfolk Island)","nativeName":"English (Norfolk Island)"},"en-ng":{"englishName":"English (Nigeria)","nativeName":"English (Nigeria)"},"en-nl":{"englishName":"English (Netherlands)","nativeName":"English (Netherlands)"},"en-nr":{"englishName":"English (Nauru)","nativeName":"English (Nauru)"},"en-nu":{"englishName":"English (Niue)","nativeName":"English (Niue)"},"en-nz":{"englishName":"English (New Zealand)","nativeName":"English (New Zealand)"},"en-pg":{"englishName":"English (Papua New Guinea)","nativeName":"English (Papua New Guinea)"},"en-ph":{"englishName":"English (Philippines)","nativeName":"English (Philippines)"},"en-pk":{"englishName":"English (Pakistan)","nativeName":"English (Pakistan)"},"en-pn":{"englishName":"English (Pitcairn Islands)","nativeName":"English (Pitcairn Islands)"},"en-pr":{"englishName":"English (Puerto Rico)","nativeName":"English (Puerto Rico)"},"en-pw":{"englishName":"English (Palau)","nativeName":"English (Palau)"},"en-rw":{"englishName":"English (Rwanda)","nativeName":"English (Rwanda)"},"en-sb":{"englishName":"English (Solomon Islands)","nativeName":"English (Solomon Islands)"},"en-sc":{"englishName":"English (Seychelles)","nativeName":"English (Seychelles)"},"en-sd":{"englishName":"English (Sudan)","nativeName":"English (Sudan)"},"en-se":{"englishName":"English (Sweden)","nativeName":"English (Sweden)"},"en-sg":{"englishName":"English (Singapore)","nativeName":"English (Singapore)"},"en-sh":{"englishName":"English (St Helena, Ascension, Tristan da Cunha)","nativeName":"English (St Helena, Ascension, Tristan da Cunha)"},"en-si":{"englishName":"English (Slovenia)","nativeName":"English (Slovenia)"},"en-sl":{"englishName":"English (Sierra Leone)","nativeName":"English (Sierra Leone)"},"en-ss":{"englishName":"English (South Sudan)","nativeName":"English (South Sudan)"},"en-sx":{"englishName":"English (Sint Maarten)","nativeName":"English (Sint Maarten)"},"en-sz":{"englishName":"English (Swaziland)","nativeName":"English (Swaziland)"},"en-tc":{"englishName":"English (Turks and Caicos Islands)","nativeName":"English (Turks and Caicos Islands)"},"en-tk":{"englishName":"English (Tokelau)","nativeName":"English (Tokelau)"},"en-to":{"englishName":"English (Tonga)","nativeName":"English (Tonga)"},"en-tt":{"englishName":"English (Trinidad and Tobago)","nativeName":"English (Trinidad and Tobago)"},"en-tv":{"englishName":"English (Tuvalu)","nativeName":"English (Tuvalu)"},"en-tz":{"englishName":"English (Tanzania)","nativeName":"English (Tanzania)"},"en-ug":{"englishName":"English (Uganda)","nativeName":"English (Uganda)"},"en-um":{"englishName":"English (U.S. Outlying Islands)","nativeName":"English (U.S. Outlying Islands)"},"en-us":{"englishName":"English (United States)","nativeName":"English (United States)"},"en-vc":{"englishName":"English (Saint Vincent and the Grenadines)","nativeName":"English (Saint Vincent and the Grenadines)"},"en-vg":{"englishName":"English (British Virgin Islands)","nativeName":"English (British Virgin Islands)"},"en-vi":{"englishName":"English (U.S. Virgin Islands)","nativeName":"English (U.S. Virgin Islands)"},"en-vu":{"englishName":"English (Vanuatu)","nativeName":"English (Vanuatu)"},"en-ws":{"englishName":"English (Samoa)","nativeName":"English (Samoa)"},"en-za":{"englishName":"English (South Africa)","nativeName":"English (South Africa)"},"en-zm":{"englishName":"English (Zambia)","nativeName":"English (Zambia)"},"en-zw":{"englishName":"English (Zimbabwe)","nativeName":"English (Zimbabwe)"},"eo":{"englishName":"Esperanto","nativeName":"esperanto"},"eo-001":{"englishName":"Esperanto (World)","nativeName":"esperanto (World)"},"es":{"englishName":"Spanish","nativeName":"español"},"es-419":{"englishName":"Spanish (Latin America)","nativeName":"español (Latinoamérica)"},"es-ar":{"englishName":"Spanish (Argentina)","nativeName":"español (Argentina)"},"es-bo":{"englishName":"Spanish (Bolivia)","nativeName":"español (Bolivia)"},"es-cl":{"englishName":"Spanish (Chile)","nativeName":"español (Chile)"},"es-co":{"englishName":"Spanish (Colombia)","nativeName":"español (Colombia)"},"es-cr":{"englishName":"Spanish (Costa Rica)","nativeName":"español (Costa Rica)"},"es-cu":{"englishName":"Spanish (Cuba)","nativeName":"español (Cuba)"},"es-do":{"englishName":"Spanish (Dominican Republic)","nativeName":"español (República Dominicana)"},"es-ec":{"englishName":"Spanish (Ecuador)","nativeName":"español (Ecuador)"},"es-es":{"englishName":"Spanish (Spain, International Sort)","nativeName":"español (España, alfabetización internacional)"},"es-gq":{"englishName":"Spanish (Equatorial Guinea)","nativeName":"español (Guinea Ecuatorial)"},"es-gt":{"englishName":"Spanish (Guatemala)","nativeName":"español (Guatemala)"},"es-hn":{"englishName":"Spanish (Honduras)","nativeName":"español (Honduras)"},"es-mx":{"englishName":"Spanish (Mexico)","nativeName":"español (México)"},"es-ni":{"englishName":"Spanish (Nicaragua)","nativeName":"español (Nicaragua)"},"es-pa":{"englishName":"Spanish (Panama)","nativeName":"español (Panamá)"},"es-pe":{"englishName":"Spanish (Peru)","nativeName":"español (Perú)"},"es-ph":{"englishName":"Spanish (Philippines)","nativeName":"español (Filipinas)"},"es-pr":{"englishName":"Spanish (Puerto Rico)","nativeName":"español (Puerto Rico)"},"es-py":{"englishName":"Spanish (Paraguay)","nativeName":"español (Paraguay)"},"es-sv":{"englishName":"Spanish (El Salvador)","nativeName":"español (El Salvador)"},"es-us":{"englishName":"Spanish (United States)","nativeName":"español (Estados Unidos)"},"es-uy":{"englishName":"Spanish (Uruguay)","nativeName":"español (Uruguay)"},"es-ve":{"englishName":"Spanish (Venezuela)","nativeName":"español (Venezuela)"},"et":{"englishName":"Estonian","nativeName":"eesti"},"et-ee":{"englishName":"Estonian (Estonia)","nativeName":"eesti (Eesti)"},"eu":{"englishName":"Basque","nativeName":"euskara"},"eu-es":{"englishName":"Basque (Basque)","nativeName":"euskara (euskara)"},"ewo":{"englishName":"Ewondo","nativeName":"ewondo"},"ewo-cm":{"englishName":"Ewondo (Cameroon)","nativeName":"ewondo (KamÉ™rún)"},"fa":{"englishName":"Persian","nativeName":"ÙØ§Ø±Ø³Ù‰"},"fa-ir":{"englishName":"Persian (Iran)","nativeName":"ÙØ§Ø±Ø³Ù‰ (ایران)"},"ff":{"englishName":"Fulah","nativeName":"Fulah"},"ff-cm":{"englishName":"Fulah (Cameroon)","nativeName":"Pulaar (Kameruun)"},"ff-gn":{"englishName":"Fulah (Guinea)","nativeName":"Pulaar (Gine)"},"ff-latn":{"englishName":"Fulah","nativeName":"Fulah"},"ff-latn-sn":{"englishName":"Fulah (Latin, Senegal)","nativeName":"Fulah (Sénégal)"},"ff-mr":{"englishName":"Fulah (Mauritania)","nativeName":"Pulaar (Muritani)"},"ff-ng":{"englishName":"Fulah (Nigeria)","nativeName":"Pulaar (Nigeria)"},"fi":{"englishName":"Finnish","nativeName":"suomi"},"fi-fi":{"englishName":"Finnish (Finland)","nativeName":"suomi (Suomi)"},"fil":{"englishName":"Filipino","nativeName":"Filipino"},"fil-ph":{"englishName":"Filipino (Philippines)","nativeName":"Filipino (Pilipinas)"},"fo":{"englishName":"Faroese","nativeName":"føroyskt"},"fo-dk":{"englishName":"Faroese (Denmark)","nativeName":"føroyskt (Danmark)"},"fo-fo":{"englishName":"Faroese (Faroe Islands)","nativeName":"føroyskt (Føroyar)"},"fr":{"englishName":"French","nativeName":"français"},"fr-029":{"englishName":"French (Caribbean)","nativeName":"français (caraïbes)"},"fr-be":{"englishName":"French (Belgium)","nativeName":"français (Belgique)"},"fr-bf":{"englishName":"French (Burkina Faso)","nativeName":"français (Burkina Faso)"},"fr-bi":{"englishName":"French (Burundi)","nativeName":"français (Burundi)"},"fr-bj":{"englishName":"French (Benin)","nativeName":"français (Bénin)"},"fr-bl":{"englishName":"French (Saint Barthélemy)","nativeName":"français (Saint-Barthélemy)"},"fr-ca":{"englishName":"French (Canada)","nativeName":"français (Canada)"},"fr-cd":{"englishName":"French (Congo DRC)","nativeName":"français (Congo, République démocratique du)"},"fr-cf":{"englishName":"French (Central African Republic)","nativeName":"français (République centrafricaine)"},"fr-cg":{"englishName":"French (Congo)","nativeName":"français (Congo)"},"fr-ch":{"englishName":"French (Switzerland)","nativeName":"français (Suisse)"},"fr-ci":{"englishName":"French (Côte d’Ivoire)","nativeName":"français (Côte d’Ivoire)"},"fr-cm":{"englishName":"French (Cameroon)","nativeName":"français (Cameroun)"},"fr-dj":{"englishName":"French (Djibouti)","nativeName":"français (Djibouti)"},"fr-dz":{"englishName":"French (Algeria)","nativeName":"français (Algérie)"},"fr-fr":{"englishName":"French (France)","nativeName":"français (France)"},"fr-ga":{"englishName":"French (Gabon)","nativeName":"français (Gabon)"},"fr-gf":{"englishName":"French (French Guiana)","nativeName":"français (Guyane française)"},"fr-gn":{"englishName":"French (Guinea)","nativeName":"français (Guinée)"},"fr-gp":{"englishName":"French (Guadeloupe)","nativeName":"français (Guadeloupe)"},"fr-gq":{"englishName":"French (Equatorial Guinea)","nativeName":"français (Guinée équatoriale)"},"fr-ht":{"englishName":"French (Haiti)","nativeName":"français (Haïti)"},"fr-km":{"englishName":"French (Comoros)","nativeName":"français (Comores)"},"fr-lu":{"englishName":"French (Luxembourg)","nativeName":"français (Luxembourg)"},"fr-ma":{"englishName":"French (Morocco)","nativeName":"français (Maroc)"},"fr-mc":{"englishName":"French (Monaco)","nativeName":"français (Monaco)"},"fr-mf":{"englishName":"French (Saint Martin)","nativeName":"français (Saint-Martin)"},"fr-mg":{"englishName":"French (Madagascar)","nativeName":"français (Madagascar)"},"fr-ml":{"englishName":"French (Mali)","nativeName":"français (Mali)"},"fr-mq":{"englishName":"French (Martinique)","nativeName":"français (Martinique)"},"fr-mr":{"englishName":"French (Mauritania)","nativeName":"français (Mauritanie)"},"fr-mu":{"englishName":"French (Mauritius)","nativeName":"français (Maurice)"},"fr-nc":{"englishName":"French (New Caledonia)","nativeName":"français (Nouvelle-Calédonie)"},"fr-ne":{"englishName":"French (Niger)","nativeName":"français (Niger)"},"fr-pf":{"englishName":"French (French Polynesia)","nativeName":"français (Polynésie française)"},"fr-pm":{"englishName":"French (Saint Pierre and Miquelon)","nativeName":"français (Saint-Pierre-et-Miquelon)"},"fr-re":{"englishName":"French (Réunion)","nativeName":"français (La Réunion)"},"fr-rw":{"englishName":"French (Rwanda)","nativeName":"français (Rwanda)"},"fr-sc":{"englishName":"French (Seychelles)","nativeName":"français (Seychelles)"},"fr-sn":{"englishName":"French (Senegal)","nativeName":"français (Sénégal)"},"fr-sy":{"englishName":"French (Syria)","nativeName":"français (Syrie)"},"fr-td":{"englishName":"French (Chad)","nativeName":"français (Tchad)"},"fr-tg":{"englishName":"French (Togo)","nativeName":"français (Togo)"},"fr-tn":{"englishName":"French (Tunisia)","nativeName":"français (Tunisie)"},"fr-vu":{"englishName":"French (Vanuatu)","nativeName":"français (Vanuatu)"},"fr-wf":{"englishName":"French (Wallis and Futuna)","nativeName":"français (Wallis-et-Futuna)"},"fr-yt":{"englishName":"French (Mayotte)","nativeName":"français (Mayotte)"},"fur":{"englishName":"Friulian","nativeName":"furlan"},"fur-it":{"englishName":"Friulian (Italy)","nativeName":"furlan (Italie)"},"fy":{"englishName":"Western Frisian","nativeName":"Frysk"},"fy-nl":{"englishName":"Western Frisian (Netherlands)","nativeName":"Frysk (Nederlân)"},"ga":{"englishName":"Irish","nativeName":"Gaeilge"},"ga-ie":{"englishName":"Irish (Ireland)","nativeName":"Gaeilge (Éire)"},"gd":{"englishName":"Scottish Gaelic","nativeName":"G� idhlig"},"gd-gb":{"englishName":"Scottish Gaelic (United Kingdom)","nativeName":"G� idhlig (An Rìoghachd Aonaichte)"},"gl":{"englishName":"Galician","nativeName":"galego"},"gl-es":{"englishName":"Galician (Galician)","nativeName":"galego (galego)"},"gn":{"englishName":"Guarani","nativeName":"Avañe’ẽ"},"gn-py":{"englishName":"Guarani (Paraguay)","nativeName":"Avañe’ẽ (Paraguái)"},"gsw":{"englishName":"Alsatian","nativeName":"Elsässisch"},"gsw-ch":{"englishName":"Alsatian (Switzerland)","nativeName":"Elsässisch (Schwiiz)"},"gsw-fr":{"englishName":"Alsatian (France)","nativeName":"Elsässisch (Fr� nkrisch)"},"gsw-li":{"englishName":"Alsatian (Liechtenstein)","nativeName":"Elsässisch (Liächteschtäi)"},"gu":{"englishName":"Gujarati","nativeName":"ગà«àªœàª°àª¾àª¤à«€"},"gu-in":{"englishName":"Gujarati (India)","nativeName":"ગà«àªœàª°àª¾àª¤à«€ (àªàª¾àª°àª¤)"},"guz":{"englishName":"Gusii","nativeName":"Ekegusii"},"guz-ke":{"englishName":"Gusii (Kenya)","nativeName":"Ekegusii (Kenya)"},"gv":{"englishName":"Manx","nativeName":"Gaelg"},"gv-im":{"englishName":"Manx (Isle of Man)","nativeName":"Gaelg (Ellan Vannin)"},"ha":{"englishName":"Hausa","nativeName":"Hausa"},"ha-latn":{"englishName":"Hausa (Latin)","nativeName":"Hausa"},"ha-latn-gh":{"englishName":"Hausa (Latin, Ghana)","nativeName":"Hausa (Gana)"},"ha-latn-ne":{"englishName":"Hausa (Latin, Niger)","nativeName":"Hausa (Nijar)"},"ha-latn-ng":{"englishName":"Hausa (Latin, Nigeria)","nativeName":"Hausa (Najeriya)"},"haw":{"englishName":"Hawaiian","nativeName":"ʻŌlelo HawaiÊ»i"},"haw-us":{"englishName":"Hawaiian (United States)","nativeName":"ʻŌlelo HawaiÊ»i (Ê»Amelika Hui PÅ« Ê»Ia)"},"he":{"englishName":"Hebrew","nativeName":"עברית"},"he-il":{"englishName":"Hebrew (Israel)","nativeName":"עברית (ישר×ל)"},"hi":{"englishName":"Hindi","nativeName":"हिंदी"},"hi-in":{"englishName":"Hindi (India)","nativeName":"हिंदी (à¤à¤¾à¤°à¤¤)"},"hr":{"englishName":"Croatian","nativeName":"hrvatski"},"hr-ba":{"englishName":"Croatian (Bosnia and Herzegovina)","nativeName":"hrvatski (Bosna i Hercegovina)"},"hr-hr":{"englishName":"Croatian (Croatia)","nativeName":"hrvatski (Hrvatska)"},"hsb":{"englishName":"Upper Sorbian","nativeName":"hornjoserbšćina"},"hsb-de":{"englishName":"Upper Sorbian (Germany)","nativeName":"hornjoserbšćina (NÄ›mska)"},"hu":{"englishName":"Hungarian","nativeName":"magyar"},"hu-hu":{"englishName":"Hungarian (Hungary)","nativeName":"magyar (Magyarország)"},"hy":{"englishName":"Armenian","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶"},"hy-am":{"englishName":"Armenian (Armenia)","nativeName":"Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)"},"ia":{"englishName":"Interlingua","nativeName":"interlingua"},"ia-001":{"englishName":"Interlingua (World)","nativeName":"interlingua (World)"},"ia-fr":{"englishName":"Interlingua (France)","nativeName":"interlingua (Francia)"},"ibb":{"englishName":"Ibibio","nativeName":"Ibibio-Efik"},"ibb-ng":{"englishName":"Ibibio (Nigeria)","nativeName":"Ibibio-Efik (Nigeria)"},"id":{"englishName":"Indonesian","nativeName":"Indonesia"},"id-id":{"englishName":"Indonesian (Indonesia)","nativeName":"Indonesia (Indonesia)"},"ig":{"englishName":"Igbo","nativeName":"Igbo"},"ig-ng":{"englishName":"Igbo (Nigeria)","nativeName":"Igbo (Nigeria)"},"ii":{"englishName":"Yi","nativeName":"ꆈ�� ê±ê‚·"},"ii-cn":{"englishName":"Yi (China)","nativeName":"ꆈ�� ê±ê‚· (êꉸê“ꂱê‡ê‰¼ê‡©)"},"is":{"englishName":"Icelandic","nativeName":"Ãslenska"},"is-is":{"englishName":"Icelandic (Iceland)","nativeName":"Ãslenska (Ãsland)"},"it":{"englishName":"Italian","nativeName":"italiano"},"it-ch":{"englishName":"Italian (Switzerland)","nativeName":"italiano (Svizzera)"},"it-it":{"englishName":"Italian (Italy)","nativeName":"italiano (Italia)"},"it-sm":{"englishName":"Italian (San Marino)","nativeName":"italiano (San Marino)"},"iu":{"englishName":"Inuktitut","nativeName":"Inuktitut"},"iu-cans":{"englishName":"Inuktitut (Syllabics)","nativeName":"áƒá“„ᒃᑎá‘ᑦ"},"iu-cans-ca":{"englishName":"Inuktitut (Syllabics, Canada)","nativeName":"áƒá“„ᒃᑎá‘ᑦ (ᑲᓇᑕᒥ)"},"iu-latn":{"englishName":"Inuktitut (Latin)","nativeName":"Inuktitut"},"iu-latn-ca":{"englishName":"Inuktitut (Latin, Canada)","nativeName":"Inuktitut (Kanatami)"},"ja":{"englishName":"Japanese","nativeName":"日本語"},"ja-jp":{"englishName":"Japanese (Japan)","nativeName":"日本語 (日本)"},"jgo":{"englishName":"Ngomba","nativeName":"Ndaꞌa"},"jgo-cm":{"englishName":"Ngomba (Cameroon)","nativeName":"Ndaꞌa (KamÉ›lûn)"},"jmc":{"englishName":"Machame","nativeName":"Kimachame"},"jmc-tz":{"englishName":"Machame (Tanzania)","nativeName":"Kimachame (Tanzania)"},"jv":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-java":{"englishName":"Javanese (Javanese)","nativeName":"ꦧꦱꦗꦮ"},"jv-java-id":{"englishName":"Javanese (Javanese, Indonesia)","nativeName":"ꦧꦱꦗꦮ (Indonesia)"},"jv-latn":{"englishName":"Javanese","nativeName":"Basa Jawa"},"jv-latn-id":{"englishName":"Javanese (Indonesia)","nativeName":"Basa Jawa (Indonesia)"},"ka":{"englishName":"Georgian","nativeName":"ქáƒï¿½ï¿½ თული"},"ka-ge":{"englishName":"Georgian (Georgia)","nativeName":"ქáƒï¿½ï¿½ თული (სáƒáƒ¥áƒï¿½ï¿½ თველáƒ)"},"kab":{"englishName":"Kabyle","nativeName":"Taqbaylit"},"kab-dz":{"englishName":"Kabyle (Algeria)","nativeName":"Taqbaylit (Lezzayer)"},"kam":{"englishName":"Kamba","nativeName":"Kikamba"},"kam-ke":{"englishName":"Kamba (Kenya)","nativeName":"Kikamba (Kenya)"},"kde":{"englishName":"Makonde","nativeName":"Chimakonde"},"kde-tz":{"englishName":"Makonde (Tanzania)","nativeName":"Chimakonde (Tanzania)"},"kea":{"englishName":"Kabuverdianu","nativeName":"kabuverdianu"},"kea-cv":{"englishName":"Kabuverdianu (Cabo Verde)","nativeName":"kabuverdianu (Kabu Verdi)"},"khq":{"englishName":"Koyra Chiini","nativeName":"Koyra ciini"},"khq-ml":{"englishName":"Koyra Chiini (Mali)","nativeName":"Koyra ciini (Maali)"},"ki":{"englishName":"Kikuyu","nativeName":"Gikuyu"},"ki-ke":{"englishName":"Kikuyu (Kenya)","nativeName":"Gikuyu (Kenya)"},"kk":{"englishName":"Kazakh","nativeName":"қазақ тілі"},"kk-kz":{"englishName":"Kazakh (Kazakhstan)","nativeName":"қазақ тілі (ҚазақÑтан)"},"kkj":{"englishName":"Kako","nativeName":"kakÉ”"},"kkj-cm":{"englishName":"Kako (Cameroon)","nativeName":"kakÉ” (KamÉ›run)"},"kl":{"englishName":"Greenlandic","nativeName":"kalaallisut"},"kl-gl":{"englishName":"Greenlandic (Greenland)","nativeName":"kalaallisut (Kalaallit Nunaat)"},"kln":{"englishName":"Kalenjin","nativeName":"Kalenjin"},"kln-ke":{"englishName":"Kalenjin (Kenya)","nativeName":"Kalenjin (Emetab Kenya)"},"km":{"englishName":"Khmer","nativeName":"ភាសាážáŸ’មែរ"},"km-kh":{"englishName":"Khmer (Cambodia)","nativeName":"ភាសាážáŸ’មែរ (កម្ពុជា)"},"kn":{"englishName":"Kannada","nativeName":"ಕನà³à²¨à²¡"},"kn-in":{"englishName":"Kannada (India)","nativeName":"ಕನà³à²¨à²¡ (à²à²¾à²°à²¤)"},"ko":{"englishName":"Korean","nativeName":"한êµì–´"},"ko-kp":{"englishName":"Korean (North Korea)","nativeName":"한êµì–´ (조�� 민주주ì˜ì¸ë¯¼ê³µí™”êµ)"},"ko-kr":{"englishName":"Korean (Korea)","nativeName":"한êµì–´(대한민êµ)"},"kok":{"englishName":"Konkani","nativeName":"कोंकणी"},"kok-in":{"englishName":"Konkani (India)","nativeName":"कोंकणी (à¤à¤¾à¤°à¤¤)"},"kr":{"englishName":"Kanuri","nativeName":"Kanuri"},"kr-ng":{"englishName":"Kanuri (Nigeria)","nativeName":"Kanuri (Nigeria)"},"ks":{"englishName":"Kashmiri","nativeName":"Ú©Ù²Ø´ÙØ±"},"ks-arab":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"Ú©Ù²Ø´ÙØ±"},"ks-arab-in":{"englishName":"Kashmiri (Perso-Arabic)","nativeName":"Ú©Ù²Ø´ÙØ± (اَربی)"},"ks-deva":{"englishName":"Kashmiri (Devanagari)","nativeName":"कॉशà¥à¤°"},"ks-deva-in":{"englishName":"Kashmiri (Devanagari, India)","nativeName":"कॉशà¥à¤° (India)"},"ksb":{"englishName":"Shambala","nativeName":"Kishambaa"},"ksb-tz":{"englishName":"Shambala (Tanzania)","nativeName":"Kishambaa (Tanzania)"},"ksf":{"englishName":"Bafia","nativeName":"rikpa"},"ksf-cm":{"englishName":"Bafia (Cameroon)","nativeName":"rikpa (kamÉ›rún)"},"ksh":{"englishName":"Ripuarian","nativeName":"Kölsch"},"ksh-de":{"englishName":"Ripuarian (Germany)","nativeName":"Kölsch (Doütschland)"},"ku":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab":{"englishName":"Central Kurdish","nativeName":"کوردیی ناوەڕاست"},"ku-arab-iq":{"englishName":"Central Kurdish (Iraq)","nativeName":"کوردیی ناوەڕاست (کوردستان)"},"ku-arab-ir":{"englishName":"Kurdish (Perso-Arabic, Iran)","nativeName":"کوردی (ئێران)"},"kw":{"englishName":"Cornish","nativeName":"kernewek"},"kw-gb":{"englishName":"Cornish (United Kingdom)","nativeName":"kernewek (Rywvaneth Unys)"},"ky":{"englishName":"Kyrgyz","nativeName":"Кыргыз"},"ky-kg":{"englishName":"Kyrgyz (Kyrgyzstan)","nativeName":"Кыргыз (КыргызÑтан)"},"la":{"englishName":"Latin","nativeName":"lingua latÄ«na"},"la-001":{"englishName":"Latin (World)","nativeName":"lingua latÄ«na (World)"},"lag":{"englishName":"Langi","nativeName":"Kɨlaangi"},"lag-tz":{"englishName":"Langi (Tanzania)","nativeName":"Kɨlaangi (TaansanÃa)"},"lb":{"englishName":"Luxembourgish","nativeName":"Lëtzebuergesch"},"lb-lu":{"englishName":"Luxembourgish (Luxembourg)","nativeName":"Lëtzebuergesch (Lëtzebuerg)"},"lg":{"englishName":"Ganda","nativeName":"Luganda"},"lg-ug":{"englishName":"Ganda (Uganda)","nativeName":"Luganda (Yuganda)"},"lkt":{"englishName":"Lakota","nativeName":"Lakȟólʼiyapi"},"lkt-us":{"englishName":"Lakota (United States)","nativeName":"Lakȟólʼiyapi (MÃlahaÅ‹ska TÈŸamákÈŸoÄhe)"},"ln":{"englishName":"Lingala","nativeName":"lingála"},"ln-ao":{"englishName":"Lingala (Angola)","nativeName":"lingála (Angóla)"},"ln-cd":{"englishName":"Lingala (Congo DRC)","nativeName":"lingála (Repibiki demokratiki ya Kongó)"},"ln-cf":{"englishName":"Lingala (Central African Republic)","nativeName":"lingála (Repibiki ya AfrÃka ya Káti)"},"ln-cg":{"englishName":"Lingala (Congo)","nativeName":"lingála (Kongo)"},"lo":{"englishName":"Lao","nativeName":"ລາວ"},"lo-la":{"englishName":"Lao (Laos)","nativeName":"ລາວ (ລາວ)"},"lrc":{"englishName":"Northern Luri","nativeName":"لۊری شومالی"},"lrc-iq":{"englishName":"Northern Luri (Iraq)","nativeName":"لۊری شومالی (Iraq)"},"lrc-ir":{"englishName":"Northern Luri (Iran)","nativeName":"لۊری شومالی (Iran)"},"lt":{"englishName":"Lithuanian","nativeName":"lietuvių"},"lt-lt":{"englishName":"Lithuanian (Lithuania)","nativeName":"lietuvių (Lietuva)"},"lu":{"englishName":"Luba-Katanga","nativeName":"Tshiluba"},"lu-cd":{"englishName":"Luba-Katanga (Congo DRC)","nativeName":"Tshiluba (Ditunga wa Kongu)"},"luo":{"englishName":"Luo","nativeName":"Dholuo"},"luo-ke":{"englishName":"Luo (Kenya)","nativeName":"Dholuo (Kenya)"},"luy":{"englishName":"Luyia","nativeName":"Luluhia"},"luy-ke":{"englishName":"Luyia (Kenya)","nativeName":"Luluhia (Kenya)"},"lv":{"englishName":"Latvian","nativeName":"latvieÅ¡u"},"lv-lv":{"englishName":"Latvian (Latvia)","nativeName":"latvieÅ¡u (Latvija)"},"mas":{"englishName":"Masai","nativeName":"Maa"},"mas-ke":{"englishName":"Masai (Kenya)","nativeName":"Maa (Kenya)"},"mas-tz":{"englishName":"Masai (Tanzania)","nativeName":"Maa (Tansania)"},"mer":{"englishName":"Meru","nativeName":"KÄ©mÄ©rÅ©"},"mer-ke":{"englishName":"Meru (Kenya)","nativeName":"KÄ©mÄ©rÅ© (Kenya)"},"mfe":{"englishName":"Morisyen","nativeName":"kreol morisien"},"mfe-mu":{"englishName":"Morisyen (Mauritius)","nativeName":"kreol morisien (Moris)"},"mg":{"englishName":"Malagasy","nativeName":"Malagasy"},"mg-mg":{"englishName":"Malagasy (Madagascar)","nativeName":"Malagasy (Madagasikara)"},"mgh":{"englishName":"Makhuwa-Meetto","nativeName":"Makua"},"mgh-mz":{"englishName":"Makhuwa-Meetto (Mozambique)","nativeName":"Makua (Umozambiki)"},"mgo":{"englishName":"Metaʼ","nativeName":"metaʼ"},"mgo-cm":{"englishName":"Metaʼ (Cameroon)","nativeName":"metaʼ (Kamalun)"},"mi":{"englishName":"Maori","nativeName":"Reo MÄori"},"mi-nz":{"englishName":"Maori (New Zealand)","nativeName":"Reo MÄori (Aotearoa)"},"mk":{"englishName":"Macedonian","nativeName":"македонÑки"},"mk-mk":{"englishName":"Macedonian (Macedonia, FYRO)","nativeName":"македонÑки (� епублика Македонија)"},"ml":{"englishName":"Malayalam","nativeName":"മലയാളം"},"ml-in":{"englishName":"Malayalam (India)","nativeName":"മലയാളം (ഇനàµà´¤àµà´¯)"},"mn":{"englishName":"Mongolian","nativeName":"Монгол Ñ…Ñл"},"mn-cyrl":{"englishName":"Mongolian","nativeName":"монгол"},"mn-mn":{"englishName":"Mongolian (Mongolia)","nativeName":"монгол (Монгол)"},"mn-mong":{"englishName":"Mongolian (Traditional Mongolian)","nativeName":"� �� �� �� �� �� �� � � �� �� �� �"},"mn-mong-cn":{"englishName":"Mongolian (Traditional Mongolian, China)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� � � �� � �� �� � �� �� � �� � � �� �� �� �� � �� � � � �� � � � �� �� �� �)"},"mn-mong-mn":{"englishName":"Mongolian (Traditional Mongolian, Mongolia)","nativeName":"� �� �� �� �� �� �� � � �� �� �� � (� �� �� �� �� �� �� � � �� �� �� �)"},"mni":{"englishName":"Manipuri","nativeName":"মৈতৈলোনà§"},"mni-in":{"englishName":"Manipuri (India)","nativeName":"মৈতৈলোনৠ(India)"},"moh":{"englishName":"Mohawk","nativeName":"Kanien’kéha"},"moh-ca":{"englishName":"Mohawk (Mohawk)","nativeName":"Kanien\'kéha"},"mr":{"englishName":"Marathi","nativeName":"मरा�� ी"},"mr-in":{"englishName":"Marathi (India)","nativeName":"मरा�� ी (à¤à¤¾à¤°à¤¤)"},"ms":{"englishName":"Malay","nativeName":"Bahasa Melayu"},"ms-bn":{"englishName":"Malay (Brunei)","nativeName":"Bahasa Melayu (Brunei)"},"ms-my":{"englishName":"Malay (Malaysia)","nativeName":"Bahasa Melayu (Malaysia)"},"ms-sg":{"englishName":"Malay (Singapore)","nativeName":"Bahasa Melayu (Singapura)"},"mt":{"englishName":"Maltese","nativeName":"Malti"},"mt-mt":{"englishName":"Maltese (Malta)","nativeName":"Malti (Malta)"},"mua":{"englishName":"Mundang","nativeName":"MUNDAÅŠ"},"mua-cm":{"englishName":"Mundang (Cameroon)","nativeName":"MUNDAÅŠ (kameruÅ‹)"},"my":{"englishName":"Burmese","nativeName":"ဗမာ"},"my-mm":{"englishName":"Burmese (Myanmar)","nativeName":"ဗမာ (မြန်မာ)"},"mzn":{"englishName":"Mazanderani","nativeName":"مازرونی"},"mzn-ir":{"englishName":"Mazanderani (Iran)","nativeName":"مازرونی (ایران)"},"naq":{"englishName":"Nama","nativeName":"Khoekhoegowab"},"naq-na":{"englishName":"Nama (Namibia)","nativeName":"Khoekhoegowab (Namibiab)"},"nb":{"englishName":"Norwegian BokmÃ¥l","nativeName":"norsk bokmÃ¥l"},"nb-no":{"englishName":"Norwegian BokmÃ¥l (Norway)","nativeName":"norsk bokmÃ¥l (Norge)"},"nb-sj":{"englishName":"Norwegian BokmÃ¥l (Svalbard and Jan Mayen)","nativeName":"norsk bokmÃ¥l (Svalbard og Jan Mayen)"},"nd":{"englishName":"North Ndebele","nativeName":"isiNdebele"},"nd-zw":{"englishName":"North Ndebele (Zimbabwe)","nativeName":"isiNdebele (Zimbabwe)"},"ne":{"englishName":"Nepali","nativeName":"नेपाली"},"ne-in":{"englishName":"Nepali (India)","nativeName":"नेपाली (à¤à¤¾à¤°à¤¤)"},"ne-np":{"englishName":"Nepali (Nepal)","nativeName":"नेपाली (नेपाल)"},"nl":{"englishName":"Dutch","nativeName":"Nederlands"},"nl-aw":{"englishName":"Dutch (Aruba)","nativeName":"Nederlands (Aruba)"},"nl-be":{"englishName":"Dutch (Belgium)","nativeName":"Nederlands (België)"},"nl-bq":{"englishName":"Dutch (Bonaire, Sint Eustatius and Saba)","nativeName":"Nederlands (Bonaire, Sint Eustatius en Saba)"},"nl-cw":{"englishName":"Dutch (Curaçao)","nativeName":"Nederlands (Curaçao)"},"nl-nl":{"englishName":"Dutch (Netherlands)","nativeName":"Nederlands (Nederland)"},"nl-sr":{"englishName":"Dutch (Suriname)","nativeName":"Nederlands (Suriname)"},"nl-sx":{"englishName":"Dutch (Sint Maarten)","nativeName":"Nederlands (Sint-Maarten)"},"nmg":{"englishName":"Kwasio","nativeName":"Kwasio"},"nmg-cm":{"englishName":"Kwasio (Cameroon)","nativeName":"Kwasio (Kamerun)"},"nn":{"englishName":"Norwegian Nynorsk","nativeName":"nynorsk"},"nn-no":{"englishName":"Norwegian Nynorsk (Norway)","nativeName":"nynorsk (Noreg)"},"nnh":{"englishName":"Ngiemboon","nativeName":"Shwóŋò ngiembɔɔn"},"nnh-cm":{"englishName":"Ngiemboon (Cameroon)","nativeName":"Shwóŋò ngiembɔɔn (K� malûm)"},"no":{"englishName":"Norwegian","nativeName":"norsk"},"nqo":{"englishName":"N\'ko","nativeName":"ß’ßžß"},"nqo-gn":{"englishName":"N\'ko (Guinea)","nativeName":"ß’ßžß (ߖߌ߬ߣß߬ ߞߊ߲ߓßß²)"},"nr":{"englishName":"South Ndebele","nativeName":"isiNdebele"},"nr-za":{"englishName":"South Ndebele (South Africa)","nativeName":"isiNdebele (South Africa)"},"nso":{"englishName":"Sesotho sa Leboa","nativeName":"Sesotho sa Leboa"},"nso-za":{"englishName":"Sesotho sa Leboa (South Africa)","nativeName":"Sesotho sa Leboa (Afrika Borwa)"},"nus":{"englishName":"Nuer","nativeName":"Thok Nath"},"nus-ss":{"englishName":"Nuer (South Sudan)","nativeName":"Thok Nath (South Sudan)"},"nyn":{"englishName":"Nyankole","nativeName":"Runyankore"},"nyn-ug":{"englishName":"Nyankole (Uganda)","nativeName":"Runyankore (Uganda)"},"oc":{"englishName":"Occitan","nativeName":"Occitan"},"oc-fr":{"englishName":"Occitan (France)","nativeName":"Occitan (França)"},"om":{"englishName":"Oromo","nativeName":"Oromoo"},"om-et":{"englishName":"Oromo (Ethiopia)","nativeName":"Oromoo (Itoophiyaa)"},"om-ke":{"englishName":"Oromo (Kenya)","nativeName":"Oromoo (Keeniyaa)"},"or":{"englishName":"Odia","nativeName":"ଓàœà¬¿à¬†"},"or-in":{"englishName":"Odia (India)","nativeName":"ଓàœà¬¿à¬† (à¬à¬¾à¬°à¬¤)"},"os":{"englishName":"Ossetian","nativeName":"Ирон æвзаг"},"os-ge":{"englishName":"Ossetian (Georgia)","nativeName":"Ирон æвзаг (ГуырдзыÑтон)"},"os-ru":{"englishName":"Ossetian (Russia)","nativeName":"Ирон æвзаг (УӕрӕÑе)"},"pa":{"englishName":"Punjabi","nativeName":"ਪੰਜਾਬੀ"},"pa-arab":{"englishName":"Punjabi","nativeName":"پنجابی"},"pa-arab-pk":{"englishName":"Punjabi (Pakistan)","nativeName":"پنجابی (پاکستان)"},"pa-in":{"englishName":"Punjabi (India)","nativeName":"ਪੰਜਾਬੀ (à¨à¨¾à¨°à¨¤)"},"pap":{"englishName":"Papiamento","nativeName":"Papiamentu"},"pap-029":{"englishName":"Papiamento (Caribbean)","nativeName":"Papiamentu (Caribbean)"},"pl":{"englishName":"Polish","nativeName":"polski"},"pl-pl":{"englishName":"Polish (Poland)","nativeName":"polski (Polska)"},"prg":{"englishName":"Prussian","nativeName":"prÅ«siskan"},"prg-001":{"englishName":"Prussian (World)","nativeName":"prÅ«siskan (swÄ«tai)"},"prs":{"englishName":"Dari","nativeName":"درى"},"prs-af":{"englishName":"Dari (Afghanistan)","nativeName":"درى (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"ps":{"englishName":"Pashto","nativeName":"پښتو"},"ps-af":{"englishName":"Pashto (Afghanistan)","nativeName":"پښتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"pt":{"englishName":"Portuguese","nativeName":"português"},"pt-ao":{"englishName":"Portuguese (Angola)","nativeName":"português (Angola)"},"pt-br":{"englishName":"Portuguese (Brazil)","nativeName":"português (Brasil)"},"pt-cv":{"englishName":"Portuguese (Cabo Verde)","nativeName":"português (Cabo Verde)"},"pt-gw":{"englishName":"Portuguese (Guinea-Bissau)","nativeName":"português (Guiné-Bissau)"},"pt-mo":{"englishName":"Portuguese (Macao SAR)","nativeName":"português (RAE de Macau)"},"pt-mz":{"englishName":"Portuguese (Mozambique)","nativeName":"português (Moçambique)"},"pt-pt":{"englishName":"Portuguese (Portugal)","nativeName":"português (Portugal)"},"pt-st":{"englishName":"Portuguese (São Tomé and PrÃncipe)","nativeName":"português (São Tomé e PrÃncipe)"},"pt-tl":{"englishName":"Portuguese (Timor-Leste)","nativeName":"português (Timor-Leste)"},"quc":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn":{"englishName":"K\'iche\'","nativeName":"K\'iche\'"},"quc-latn-gt":{"englishName":"K\'iche\' (Guatemala)","nativeName":"K\'iche\' (Guatemala)"},"quz":{"englishName":"Quechua","nativeName":"runasimi"},"quz-bo":{"englishName":"Quechua (Bolivia)","nativeName":"runasimi (Qullasuyu)"},"quz-ec":{"englishName":"Quichua (Ecuador)","nativeName":"runa shimi (Ecuador Suyu)"},"quz-pe":{"englishName":"Quechua (Peru)","nativeName":"runasimi (Peru)"},"rm":{"englishName":"Romansh","nativeName":"rumantsch"},"rm-ch":{"englishName":"Romansh (Switzerland)","nativeName":"rumantsch (Svizra)"},"rn":{"englishName":"Rundi","nativeName":"Ikirundi"},"rn-bi":{"englishName":"Rundi (Burundi)","nativeName":"Ikirundi (Uburundi)"},"ro":{"englishName":"Romanian","nativeName":"română"},"ro-md":{"englishName":"Romanian (Moldova)","nativeName":"română (Republica Moldova)"},"ro-ro":{"englishName":"Romanian (Romania)","nativeName":"română (România)"},"rof":{"englishName":"Rombo","nativeName":"Kihorombo"},"rof-tz":{"englishName":"Rombo (Tanzania)","nativeName":"Kihorombo (Tanzania)"},"ru":{"englishName":"Russian","nativeName":"руÑÑкий"},"ru-by":{"englishName":"Russian (Belarus)","nativeName":"руÑÑкий (БеларуÑÑŒ)"},"ru-kg":{"englishName":"Russian (Kyrgyzstan)","nativeName":"руÑÑкий (КиргизиÑ)"},"ru-kz":{"englishName":"Russian (Kazakhstan)","nativeName":"руÑÑкий (КазахÑтан)"},"ru-md":{"englishName":"Russian (Moldova)","nativeName":"руÑÑкий (Молдова)"},"ru-ru":{"englishName":"Russian (Russia)","nativeName":"руÑÑкий (� оÑÑиÑ)"},"ru-ua":{"englishName":"Russian (Ukraine)","nativeName":"руÑÑкий (Украина)"},"rw":{"englishName":"Kinyarwanda","nativeName":"Kinyarwanda"},"rw-rw":{"englishName":"Kinyarwanda (Rwanda)","nativeName":"Kinyarwanda (Rwanda)"},"rwk":{"englishName":"Rwa","nativeName":"Kiruwa"},"rwk-tz":{"englishName":"Rwa (Tanzania)","nativeName":"Kiruwa (Tanzania)"},"sa":{"englishName":"Sanskrit","nativeName":"संसà¥à¤•ृत"},"sa-in":{"englishName":"Sanskrit (India)","nativeName":"संसà¥à¤•ृत (à¤à¤¾à¤°à¤¤à¤®à¥)"},"sah":{"englishName":"Sakha","nativeName":"Саха"},"sah-ru":{"englishName":"Sakha (Russia)","nativeName":"Саха (� оÑÑиÑ)"},"saq":{"englishName":"Samburu","nativeName":"Kisampur"},"saq-ke":{"englishName":"Samburu (Kenya)","nativeName":"Kisampur (Kenya)"},"sbp":{"englishName":"Sangu","nativeName":"Ishisangu"},"sbp-tz":{"englishName":"Sangu (Tanzania)","nativeName":"Ishisangu (Tansaniya)"},"sd":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab":{"englishName":"Sindhi","nativeName":"سنڌي"},"sd-arab-pk":{"englishName":"Sindhi (Pakistan)","nativeName":"سنڌي (پاکستان)"},"sd-deva":{"englishName":"Sindhi (Devanagari)","nativeName":"सिनà¥à¤§à¥€"},"sd-deva-in":{"englishName":"Sindhi (Devanagari, India)","nativeName":"सिनà¥à¤§à¥€ (India)"},"se":{"englishName":"Northern Sami","nativeName":"davvisámegiella"},"se-fi":{"englishName":"Sami, Northern (Finland)","nativeName":"davvisámegiella (Suopma)"},"se-no":{"englishName":"Sami, Northern (Norway)","nativeName":"davvisámegiella (Norga)"},"se-se":{"englishName":"Sami, Northern (Sweden)","nativeName":"davvisámegiella (Ruoŧŧa)"},"seh":{"englishName":"Sena","nativeName":"sena"},"seh-mz":{"englishName":"Sena (Mozambique)","nativeName":"sena (Moçambique)"},"ses":{"englishName":"Koyraboro Senni","nativeName":"Koyraboro senni"},"ses-ml":{"englishName":"Koyraboro Senni (Mali)","nativeName":"Koyraboro senni (Maali)"},"sg":{"englishName":"Sango","nativeName":"Sängö"},"sg-cf":{"englishName":"Sango (Central African Republic)","nativeName":"Sängö (Ködörösêse tî Bêafrîka)"},"shi":{"englishName":"Tachelhit","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ"},"shi-latn":{"englishName":"Tachelhit (Latin)","nativeName":"Tashelḥiyt"},"shi-latn-ma":{"englishName":"Tachelhit (Latin, Morocco)","nativeName":"Tashelḥiyt (lmÉ£rib)"},"shi-tfng":{"englishName":"Tachelhit (Tifinagh)","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ"},"shi-tfng-ma":{"englishName":"Tachelhit (Tifinagh, Morocco)","nativeName":"ⵜⴰⵛâµâµƒâµ‰âµœ (âµâµŽâµ–ⵔⵉⴱ)"},"si":{"englishName":"Sinhala","nativeName":"සිංහල"},"si-lk":{"englishName":"Sinhala (Sri Lanka)","nativeName":"සිංහල (à·à·Šâ€à¶»à·“ ලංකà·à·€)"},"sk":{"englishName":"Slovak","nativeName":"slovenÄina"},"sk-sk":{"englishName":"Slovak (Slovakia)","nativeName":"slovenÄina (Slovensko)"},"sl":{"englishName":"Slovenian","nativeName":"slovenÅ¡Äina"},"sl-si":{"englishName":"Slovenian (Slovenia)","nativeName":"slovenÅ¡Äina (Slovenija)"},"sma":{"englishName":"Sami (Southern)","nativeName":"Ã¥arjelsaemiengïele"},"sma-no":{"englishName":"Sami, Southern (Norway)","nativeName":"Ã¥arjelsaemiengïele (Nöörje)"},"sma-se":{"englishName":"Sami, Southern (Sweden)","nativeName":"Ã¥arjelsaemiengïele (Sveerje)"},"smj":{"englishName":"Sami (Lule)","nativeName":"julevusámegiella"},"smj-no":{"englishName":"Sami, Lule (Norway)","nativeName":"julevusámegiella (Vuodna)"},"smj-se":{"englishName":"Sami, Lule (Sweden)","nativeName":"julevusámegiella (Svierik)"},"smn":{"englishName":"Sami (Inari)","nativeName":"anarâškielâ"},"smn-fi":{"englishName":"Sami, Inari (Finland)","nativeName":"anarâškielâ (Suomâ)"},"sms":{"englishName":"Sami (Skolt)","nativeName":"sää´mÇ©iõll"},"sms-fi":{"englishName":"Sami, Skolt (Finland)","nativeName":"sää´mÇ©iõll (Lää´ddjânnam)"},"sn":{"englishName":"Shona","nativeName":"chiShona"},"sn-latn":{"englishName":"Shona (Latin)","nativeName":"chiShona (Latin)"},"sn-latn-zw":{"englishName":"Shona (Latin, Zimbabwe)","nativeName":"chiShona (Zimbabwe)"},"so":{"englishName":"Somali","nativeName":"Soomaali"},"so-dj":{"englishName":"Somali (Djibouti)","nativeName":"Soomaali (Jabuuti)"},"so-et":{"englishName":"Somali (Ethiopia)","nativeName":"Soomaali (Itoobiya)"},"so-ke":{"englishName":"Somali (Kenya)","nativeName":"Soomaali (Kiiniya)"},"so-so":{"englishName":"Somali (Somalia)","nativeName":"Soomaali (Soomaaliya)"},"sq":{"englishName":"Albanian","nativeName":"shqip"},"sq-al":{"englishName":"Albanian (Albania)","nativeName":"shqip (Shqipëri)"},"sq-mk":{"englishName":"Albanian (Macedonia, FYRO)","nativeName":"shqip (Republika e Maqedonisë)"},"sq-xk":{"englishName":"Albanian (Kosovo)","nativeName":"shqip (Kosovë)"},"sr":{"englishName":"Serbian","nativeName":"srpski"},"sr-cyrl":{"englishName":"Serbian (Cyrillic)","nativeName":"ÑрпÑки"},"sr-cyrl-ba":{"englishName":"Serbian (Cyrillic, Bosnia and Herzegovina)","nativeName":"ÑрпÑки (БоÑна и Херцеговина)"},"sr-cyrl-me":{"englishName":"Serbian (Cyrillic, Montenegro)","nativeName":"ÑрпÑки (Црна Гора)"},"sr-cyrl-rs":{"englishName":"Serbian (Cyrillic, Serbia)","nativeName":"ÑрпÑки (Србија)"},"sr-cyrl-xk":{"englishName":"Serbian (Cyrillic, Kosovo)","nativeName":"ÑрпÑки (КоÑово)"},"sr-latn":{"englishName":"Serbian (Latin)","nativeName":"srpski"},"sr-latn-ba":{"englishName":"Serbian (Latin, Bosnia and Herzegovina)","nativeName":"srpski (Bosna i Hercegovina)"},"sr-latn-me":{"englishName":"Serbian (Latin, Montenegro)","nativeName":"srpski (Crna Gora)"},"sr-latn-rs":{"englishName":"Serbian (Latin, Serbia)","nativeName":"srpski (Srbija)"},"sr-latn-xk":{"englishName":"Serbian (Latin, Kosovo)","nativeName":"srpski (Kosovo)"},"ss":{"englishName":"siSwati","nativeName":"Siswati"},"ss-sz":{"englishName":"siSwati (Swaziland)","nativeName":"siSwati (Swaziland)"},"ss-za":{"englishName":"siSwati (South Africa)","nativeName":"siSwati (South Africa)"},"ssy":{"englishName":"Saho","nativeName":"Saho"},"ssy-er":{"englishName":"Saho (Eritrea)","nativeName":"Saho (Eretria)"},"st":{"englishName":"Sesotho","nativeName":"Sesotho"},"st-ls":{"englishName":"Sesotho (Lesotho)","nativeName":"Sesotho (Lesotho)"},"st-za":{"englishName":"Sesotho (South Africa)","nativeName":"Sesotho (South Africa)"},"sv":{"englishName":"Swedish","nativeName":"svenska"},"sv-ax":{"englishName":"Swedish (Ã…land Islands)","nativeName":"svenska (Ã…land)"},"sv-fi":{"englishName":"Swedish (Finland)","nativeName":"svenska (Finland)"},"sv-se":{"englishName":"Swedish (Sweden)","nativeName":"svenska (Sverige)"},"sw":{"englishName":"Kiswahili","nativeName":"Kiswahili"},"sw-cd":{"englishName":"Kiswahili (Congo DRC)","nativeName":"Kiswahili (Jamhuri ya Kidemokrasia ya Kongo)"},"sw-ke":{"englishName":"Kiswahili (Kenya)","nativeName":"Kiswahili (Kenya)"},"sw-tz":{"englishName":"Kiswahili (Tanzania)","nativeName":"Kiswahili (Tanzania)"},"sw-ug":{"englishName":"Kiswahili (Uganda)","nativeName":"Kiswahili (Uganda)"},"syr":{"englishName":"Syriac","nativeName":"ܣܘܪÜÜÜ"},"syr-sy":{"englishName":"Syriac (Syria)","nativeName":"ܣܘܪÜÜÜ (ܣܘܪÜÜ)"},"ta":{"englishName":"Tamil","nativeName":"தமிழà¯"},"ta-in":{"englishName":"Tamil (India)","nativeName":"தமிழ௠(இநà¯à®¤à®¿à®¯à®¾)"},"ta-lk":{"englishName":"Tamil (Sri Lanka)","nativeName":"தமிழ௠(இலஙà¯à®•ை)"},"ta-my":{"englishName":"Tamil (Malaysia)","nativeName":"தமிழ௠(மலேசியா)"},"ta-sg":{"englishName":"Tamil (Singapore)","nativeName":"தமிழ௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)"},"te":{"englishName":"Telugu","nativeName":"తెలà±à°—à±"},"te-in":{"englishName":"Telugu (India)","nativeName":"తెలà±à°—à± (à°à°¾à°°à°¤ దేశం)"},"teo":{"englishName":"Teso","nativeName":"Kiteso"},"teo-ke":{"englishName":"Teso (Kenya)","nativeName":"Kiteso (Kenia)"},"teo-ug":{"englishName":"Teso (Uganda)","nativeName":"Kiteso (Uganda)"},"tg":{"englishName":"Tajik","nativeName":"Тоҷикӣ"},"tg-cyrl":{"englishName":"Tajik (Cyrillic)","nativeName":"Тоҷикӣ"},"tg-cyrl-tj":{"englishName":"Tajik (Cyrillic, Tajikistan)","nativeName":"Тоҷикӣ (ТоҷикиÑтон)"},"th":{"englishName":"Thai","nativeName":"ไทย"},"th-th":{"englishName":"Thai (Thailand)","nativeName":"ไทย (ไทย)"},"ti":{"englishName":"Tigrinya","nativeName":"ትáŒáˆáŠ›"},"ti-er":{"englishName":"Tigrinya (Eritrea)","nativeName":"ትáŒáˆáŠ› (ኤáˆá‰µáˆ«)"},"ti-et":{"englishName":"Tigrinya (Ethiopia)","nativeName":"ትáŒáˆáŠ› (ኢትዮጵያ)"},"tig":{"englishName":"Tigre","nativeName":"ትáŒáˆ¨"},"tig-er":{"englishName":"Tigre (Eritrea)","nativeName":"ትáŒáˆ¨ (ኤáˆá‰µáˆ«)"},"tk":{"englishName":"Turkmen","nativeName":"Türkmen dili"},"tk-tm":{"englishName":"Turkmen (Turkmenistan)","nativeName":"Türkmen dili (Türkmenistan)"},"tn":{"englishName":"Setswana","nativeName":"Setswana"},"tn-bw":{"englishName":"Setswana (Botswana)","nativeName":"Setswana (Botswana)"},"tn-za":{"englishName":"Setswana (South Africa)","nativeName":"Setswana (Aforika Borwa)"},"to":{"englishName":"Tongan","nativeName":"lea fakatonga"},"to-to":{"englishName":"Tongan (Tonga)","nativeName":"lea fakatonga (Tonga)"},"tr":{"englishName":"Turkish","nativeName":"Türkçe"},"tr-cy":{"englishName":"Turkish (Cyprus)","nativeName":"Türkçe (Kıbrıs)"},"tr-tr":{"englishName":"Turkish (Turkey)","nativeName":"Türkçe (Türkiye)"},"ts":{"englishName":"Tsonga","nativeName":"Xitsonga"},"ts-za":{"englishName":"Xitsonga (South Africa)","nativeName":"Xitsonga (South Africa)"},"tt":{"englishName":"Tatar","nativeName":"Татар"},"tt-ru":{"englishName":"Tatar (Russia)","nativeName":"Татар (� оÑÑиÑ)"},"twq":{"englishName":"Tasawaq","nativeName":"Tasawaq senni"},"twq-ne":{"englishName":"Tasawaq (Niger)","nativeName":"Tasawaq senni (Nižer)"},"tzm":{"englishName":"Central Atlas Tamazight","nativeName":"TamaziÉ£t n laá¹laá¹£"},"tzm-arab":{"englishName":"Central Atlas Tamazight (Arabic)","nativeName":"أطلس المركزية التامازيتية"},"tzm-arab-ma":{"englishName":"Central Atlas Tamazight (Arabic, Morocco)","nativeName":"أطلس المركزية التامازيتية (Morocco)"},"tzm-latn":{"englishName":"Central Atlas Tamazight (Latin)","nativeName":"TamaziÉ£t n laá¹laá¹£"},"tzm-latn-dz":{"englishName":"Central Atlas Tamazight (Latin, Algeria)","nativeName":"TamaziÉ£t n laá¹laá¹£ (Djazaïr)"},"tzm-latn-ma":{"englishName":"Central Atlas Tamazight (Latin, Morocco)","nativeName":"TamaziÉ£t n laá¹laá¹£ (Meṛṛuk)"},"tzm-tfng":{"englishName":"Central Atlas Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"tzm-tfng-ma":{"englishName":"Central Atlas Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (âµâµŽâµ–ⵔⵉⴱ)"},"ug":{"englishName":"Uyghur","nativeName":"ئۇيغۇرچە"},"ug-cn":{"englishName":"Uyghur (China)","nativeName":"ئۇيغۇرچە (Ø¬Û‡ÚØ®Û‡Ø§ خەلق جۇمھۇرىيىتى)"},"uk":{"englishName":"Ukrainian","nativeName":"українÑька"},"uk-ua":{"englishName":"Ukrainian (Ukraine)","nativeName":"українÑька (Україна)"},"ur":{"englishName":"Urdu","nativeName":"Ø§ÙØ±Ø¯Ùˆ"},"ur-in":{"englishName":"Urdu (India)","nativeName":"اردو (بھارت)"},"ur-pk":{"englishName":"Urdu (Pakistan)","nativeName":"Ø§ÙØ±Ø¯Ùˆ (پاکستان)"},"uz":{"englishName":"Uzbek","nativeName":"o‘zbek"},"uz-arab":{"englishName":"Uzbek (Perso-Arabic)","nativeName":"اوزبیک"},"uz-arab-af":{"englishName":"Uzbek (Perso-Arabic, Afghanistan)","nativeName":"اوزبیک (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)"},"uz-cyrl":{"englishName":"Uzbek (Cyrillic)","nativeName":"Ўзбек"},"uz-cyrl-uz":{"englishName":"Uzbek (Cyrillic, Uzbekistan)","nativeName":"Ўзбек (ЎзбекиÑтон)"},"uz-latn":{"englishName":"Uzbek (Latin)","nativeName":"o‘zbek"},"uz-latn-uz":{"englishName":"Uzbek (Latin, Uzbekistan)","nativeName":"o‘zbek (OÊ»zbekiston)"},"vai":{"englishName":"Vai","nativeName":"ꕙꔤ"},"vai-latn":{"englishName":"Vai (Latin)","nativeName":"Vai"},"vai-latn-lr":{"englishName":"Vai (Latin, Liberia)","nativeName":"Vai (Laibhiya)"},"vai-vaii":{"englishName":"Vai (Vai)","nativeName":"ꕙꔤ"},"vai-vaii-lr":{"englishName":"Vai (Vai, Liberia)","nativeName":"ꕙꔤ (ꕞꔤꔫꕩ)"},"ve":{"englishName":"Venda","nativeName":"Tshivenḓa"},"ve-za":{"englishName":"Venda (South Africa)","nativeName":"Tshivenḓa (South Africa)"},"vi":{"englishName":"Vietnamese","nativeName":"TiêÌng Việt"},"vi-vn":{"englishName":"Vietnamese (Vietnam)","nativeName":"TiêÌng Việt (Việt Nam)"},"vo":{"englishName":"Volapük","nativeName":"Volapük"},"vo-001":{"englishName":"Volapük (World)","nativeName":"Volapük (World)"},"vun":{"englishName":"Vunjo","nativeName":"Kyivunjo"},"vun-tz":{"englishName":"Vunjo (Tanzania)","nativeName":"Kyivunjo (Tanzania)"},"wae":{"englishName":"Walser","nativeName":"Walser"},"wae-ch":{"englishName":"Walser (Switzerland)","nativeName":"Walser (Schwiz)"},"wal":{"englishName":"Wolaytta","nativeName":"ወላá‹á‰³á‰±"},"wal-et":{"englishName":"Wolaytta (Ethiopia)","nativeName":"ወላá‹á‰³á‰± (ኢትዮጵያ)"},"wo":{"englishName":"Wolof","nativeName":"Wolof"},"wo-sn":{"englishName":"Wolof (Senegal)","nativeName":"Wolof (Senegaal)"},"xh":{"englishName":"isiXhosa","nativeName":"isiXhosa"},"xh-za":{"englishName":"isiXhosa (South Africa)","nativeName":"isiXhosa (eMzantsi Afrika)"},"xog":{"englishName":"Soga","nativeName":"Olusoga"},"xog-ug":{"englishName":"Soga (Uganda)","nativeName":"Olusoga (Yuganda)"},"yav":{"englishName":"Yangben","nativeName":"nuasue"},"yav-cm":{"englishName":"Yangben (Cameroon)","nativeName":"nuasue (Kemelún)"},"yi":{"englishName":"Yiddish","nativeName":"ייִדיש"},"yi-001":{"englishName":"Yiddish (World)","nativeName":"ייִדיש (וועלט)"},"yo":{"englishName":"Yoruba","nativeName":"Èdè Yorùbá"},"yo-bj":{"englishName":"Yoruba (Benin)","nativeName":"Èdè Yorùbá (OrÃlÉ›Ìède Bɛ̀nɛ̀)"},"yo-ng":{"englishName":"Yoruba (Nigeria)","nativeName":"Èdè Yorùbá (OrÃlẹÌède N� ìjÃrÃ� )"},"zgh":{"englishName":"Standard Moroccan Tamazight","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng":{"englishName":"Standard Moroccan Tamazight (Tifinagh)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ"},"zgh-tfng-ma":{"englishName":"Standard Moroccan Tamazight (Tifinagh, Morocco)","nativeName":"ⵜⴰⵎⴰⵣⵉⵖⵜ (âµâµŽâµ–ⵔⵉⴱ)"},"zh":{"englishName":"Chinese","nativeName":"䏿–‡"},"zh-cn":{"englishName":"Chinese (Simplified, China)","nativeName":"䏿–‡(ä¸å›½)"},"zh-hans":{"englishName":"Chinese (Simplified)","nativeName":"䏿–‡(简体)"},"zh-hans-hk":{"englishName":"Chinese (Simplified Han, Hong Kong SAR)","nativeName":"䏿–‡ (香港特别行政区)"},"zh-hans-mo":{"englishName":"Chinese (Simplified Han, Macao SAR)","nativeName":"䏿–‡ (澳门特别行政区)"},"zh-hant":{"englishName":"Chinese (Traditional)","nativeName":"䏿–‡(ç¹é«”)"},"zh-hk":{"englishName":"Chinese (Traditional, Hong Kong SAR)","nativeName":"䏿–‡(香港特別行政å€)"},"zh-mo":{"englishName":"Chinese (Traditional, Macao SAR)","nativeName":"䏿–‡(澳門特別行政å€)"},"zh-sg":{"englishName":"Chinese (Simplified, Singapore)","nativeName":"䏿–‡(新�� å¡)"},"zh-tw":{"englishName":"Chinese (Traditional, Taiwan)","nativeName":"䏿–‡(å°ç£)"},"zu":{"englishName":"isiZulu","nativeName":"isiZulu"},"zu-za":{"englishName":"isiZulu (South Africa)","nativeName":"isiZulu (i-South Africa)"},"zh-chs":{"englishName":"Chinese (Simplified) Legacy","nativeName":"䏿–‡(简体) 旧版"},"zh-cht":{"englishName":"Chinese (Traditional) Legacy","nativeName":"䏿–‡(ç¹é«”) 舊版"}}');function Is(e){return Rs[e.toLowerCase()]}var Ms=function(e){var t,n,r;return null===(t=Is(-1===(r=(n=e).indexOf("-"))?n:n.substring(0,r)))||void 0===t?void 0:t.englishName},Ds=function(e,t){var n,r,i=e.language;return r=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?function(e){var t;return null===(t=Is(e))||void 0===t?void 0:t.englishName}(i):Ms(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?Ls.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:r}):r},Bs={ALLOWED_TAGS:["i","b","u","ruby","rt"]},As="en-US",Fs=new Map,zs={getLanguagesOptions:function(e){if(!e)return[];var t=e.filter((function(e){return!e.customer}));return t.map((function(e){return{label:Ds(e,t),value:e.language,id:e.id}})).sort((function(e,t){var n=e.value.includes(Vs)?1:0;return(t.value.includes(Vs)?1:0)-n}))},transformVtt:function(e){if(!e)return[];var t=[],n=new(Ts().WebVTT.Parser)(window,Ts().WebVTT.StringDecoder()),r=[];return n.oncue=function(e){r.push(e)},n.onparsingerror=function(e){t.push(e)},n.parse(e),n.flush(),t.length>0&&xs.Q.Ry.throw(new _s.H("Failed to parse vtt, ".concat(t.map((function(e){return e.message}))))),r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?Ms(t):"English",t||As);return e.forEach((function(e){r.addCue(e)})),n.textTracks},attachCuesToPlayer:function(e,t,n){var r;if(t){var i=null===(r=null==e?void 0:e.addTranscript)||void 0===r?void 0:r.call(e,n||As),o=zs.transformVtt(t);return null==o||o.forEach((function(e){null==i||i.addCue(e)})),i}},transformVttToTextTrackList:function(e,t,n){var r="".concat(n,"-").concat(t);if(Fs.has(r))return Fs.get(r);if(!e)return null;var i=zs.transformVtt(e),o=zs.createTextTrackList(i,t);return Fs.set(r,o),o},sanitizeCueText:function(e){return(0,Es.sanitize)(e,Bs)}},Zs="transcript-selected-language",Vs="en";function Gs(e){var t,n;return(null===(t=e.find((function(e){return e.language.includes(Vs)})))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var Us=n(42648),Ks=n(6620),qs=n(74097),Hs=n(75896);function Ws(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ys(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ys(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Qs=/\n/g;var Js=n(49985),Xs=n(11607),$s=n(83914),ef=n(26354),tf=n(35223);function nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rf=Ls.T.encloseNamespace("shared.copyContentIconButton");function of(e){var t,n,i=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return nf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1];return r.useEffect((function(){if(o){var e=window.setTimeout((function(){a(!1)}),1e3);return function(){return window.clearTimeout(e)}}}),[o]),r.createElement(ef.u,{title:rf(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},r.createElement(Xs.L,{"aria-label":"Copy to clipboard",className:e.visible?"QzREy":"_LaKg",onClick:function(t){t.stopPropagation(),navigator.clipboard.writeText(e.copyableContent).then((function(){var t;a(!0),null===(t=e.onClick)||void 0===t||t.call(e)}))}},r.createElement($s.x,{svgName:tf.vn.Copy,size:$s.S.Small})))}var af=n(49439),uf=n(93264);const cf={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};function lf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sf(e){var t,n,i=e.currentTimePoint===e.timePoint,o=(t=(0,af.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return lf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];return r.createElement("div",Object.assign({},e.isAuthenticated&&{role:"button"},{className:"d-flex p-2 align-items-center cursor-pointer rounded text-dark ".concat(e.inPlayer?cf.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(cf.item," ").concat(i?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{descriptor:it.XX.TranscriptTimepoint,actionType:it.Vw.Click}))},ref:a}),r.createElement("div",{className:"d-flex flex-column align-items-center"},r.createElement("div",{className:"bg-light-blue text-info rounded-pill d-inline py-1 text-center ".concat(cf.timePoint," ").concat(e.wideTimeTag?cf.wide:""," ").concat(i?"bg-white":"")},uf.T.ToDisplayDuration(1e3*e.timePoint))),r.createElement("div",{className:"".concat(cf.transcript," ms-3 w-100")},e.nodes.map((function(t,n){var i=zs.sanitizeCueText(t.text);return null===t.searchResultIndex?r.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:i}}):r.createElement("mark",{className:"".concat(cf.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:i}})}))),r.createElement(of,{copyableContent:e.transcript,visible:u,onClick:function(){Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Copy}))}}))}function ff(e){var t,n,i=e.cuesToDisplay.some((function(e){return e.startTime>=3600})),o=new Map;return e.chapters.forEach((function(t,n){var r=e.cuesToDisplay.findIndex((function(e){return e.startTime>t.startTime}));o.set(r,n)})),r.createElement("div",{className:"w-100 position-relative",style:{height:e.virtualizer.getTotalSize()}},r.createElement("div",{className:"w-100 position-absolute top-0 start-0",style:{transform:"translateY(".concat(null!==(n=null===(t=e.items[0])||void 0===t?void 0:t.start)&&void 0!==n?n:0,"px)")}},e.items.map((function(t){var n,a=t.index,u=e.cuesToDisplay[a],c=!1,l="";return o.has(a)&&(c=!0,l=e.chapters[o.get(a)].name),r.createElement("div",{className:e.inPlayer?"":"px-3",key:u.startTime,ref:e.virtualizer.measureElement,"data-index":a},c&&r.createElement("h3",{className:"".concat(0!==o.get(a)?"mt-2":""," my-2 h6 ").concat(e.inPlayer?"px-2":"")},r.createElement("span",null,o.get(a)+1,". ",l)),r.createElement(sf,{timePoint:u.startTime,transcript:u.text,nodes:u.nodes,onClick:function(){return e.onClickTranscriptionItem(u)},currentTimePoint:null===(n=e.timepoint)||void 0===n?void 0:n.startTime,currentSearchResultIndex:e.currentSearchResultIndex,wideTimeTag:!!i,inPlayer:e.inPlayer,analyticsOptions:e.analyticsOptions,analyticsData:e.analyticsData,cueIndex:a,isAuthenticated:e.isAuthenticated}))}))))}n(32102),n(97395);var pf=n(79014),hf=n(31453);function yf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var vf=Ls.T.encloseNamespace("playPage.transcriptSearchBar");function df(e){var t,n,i=r.useRef(null),o=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,n)||function(e,t){if(e){if("string"==typeof e)return yf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],u=o[1];function c(t){Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:t}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:t?it.uG.SearchTranscript:it.uG.ResetResults}))}var l=r.useCallback(pf.q.debounce((function(e){return c(e)}),500),[]);function s(){Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:it.uG.NextResult})),e.currentSearchResultIndex===e.totalSearchResults-1?e.jumpToSearchResult(0):e.jumpToSearchResult(e.currentSearchResultIndex+1)}function f(){Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{query:e.query}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Search,descriptor:it.uG.PreviousResult})),0===e.currentSearchResultIndex?e.jumpToSearchResult(e.totalSearchResults-1):e.jumpToSearchResult(e.currentSearchResultIndex-1)}function p(e){var t;e.keepFocus||null===(t=i.current)||void 0===t||t.focus(),s()}function h(e){var t;e.keepFocus||null===(t=i.current)||void 0===t||t.focus(),f()}function y(e){u("focus"===e)}return r.createElement("div",{className:(0,hf.A)("form-control py-0 px-1 d-flex align-items-center",a?"KFd6d":"QBjyt","XfIEh"),onClick:function(){var e;return null===(e=i.current)||void 0===e?void 0:e.focus()},role:"search"},r.createElement("div",{"aria-hidden":"true"},r.createElement($s.x,{svgName:tf.vn.Search})),r.createElement("input",{className:"form-control border-0 px-1 ".concat("MAoRJ"),value:e.query,onChange:function(t){l(t.target.value),e.onSearch(t.target.value)},autoComplete:"off",placeholder:vf("searchPlaceholder"),ref:i,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?f():s())},onFocus:function(){return y("focus")},onBlur:function(){return y("blur")}}),!!e.query&&r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",null,e.totalSearchResults?"".concat(e.currentSearchResultIndex+1,"/").concat(e.totalSearchResults):"0/0"),r.createElement(Xs.L,{"aria-label":vf("previousResult"),onClick:function(){return h({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||h({keepFocus:!0})}},r.createElement($s.x,{svgName:tf.vn.ChevronUp})),r.createElement(Xs.L,{"aria-label":vf("nextResult"),onClick:function(){return p({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||p({keepFocus:!0})}},r.createElement($s.x,{svgName:tf.vn.ChevronDown})),r.createElement(Xs.L,{"aria-label":vf("clearSearch"),onClick:function(){var t;c(""),null===(t=i.current)||void 0===t||t.focus(),e.onSearch("")}},r.createElement($s.x,{svgName:tf.vn.Close}))))}n(83345);var mf,bf,gf=n(69883),wf=n(79967),Of=n(74237);n(62400),(bf=mf||(mf={})).Resources="resources",bf.Interactives="interactives",bf.Video="video",bf.Clips="clips",bf.CurriculumLinks="curriculum-links",bf.VideoDetails="video-details",bf.RelatedVideos="related-videos",bf.ClippedFrom="clipped-from",bf.Transcript="transcript",Ls.T.encloseNamespace("shared.playPageTranscription");var Sf=n(8935);const kf={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function Nf(e){return Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nf(e)}function Pf(){Pf=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Nf(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Nf(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function jf(e){var t,n,i=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,o=e.track.src,a=(0,gf.Z)();return r.createElement("div",{className:"d-flex px-1 mb-3"},r.createElement(df,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),r.createElement(ef.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(i)},r.createElement(Sf.Z,null,r.createElement(Sf.Z.Toggle,{className:"text-dark ".concat(kf.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},r.createElement($s.x,{svgName:tf.vn.Globe})),r.createElement(Sf.Z.Menu,{className:kf.menu,"aria-labelledby":"language-select"},e.languageOptions.map((function(t,n){return r.createElement(Sf.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),Js.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{language:t.value,previousLanguageName:e.selectedLanguage}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Select}))},className:"cursor-pointer",active:t.value===e.selectedLanguage},t.label)}))))),r.createElement(qs.h,{svgName:tf.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=Pf().mark((function t(){return Pf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Js.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Download})),t.prev=1,t.next=4,Of.T.downloadBlob(o,"Subtitles-".concat(e.selectedLanguage,".vtt"));case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),a.error("Error downloading transcript");case 9:case"end":return t.stop()}}),t,null,[[1,6]])})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function u(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,u)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i},className:"position-relative d-flex align-items-center text-dark"}))}var Ef=n(44645);function Cf(e){return Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cf(e)}function Tf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lf(r.key),r)}}function xf(e,t,n){return t&&_f(e.prototype,t),n&&_f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lf(e){var t=function(e){if("object"!=Cf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cf(t)?t:t+""}function Rf(e,t,n){return t=Df(t),function(e,t){if(t&&("object"==Cf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,If()?Reflect.construct(t,n||[],Df(e).constructor):t.apply(e,n))}function If(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(If=function(){return!!e})()}function Mf(){return Mf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Df(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Mf.apply(null,arguments)}function Df(e){return Df=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Df(e)}function Bf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Af(e,t)}function Af(e,t){return Af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Af(e,t)}var Ff=function(e){function t(e,n){return Tf(this,t),Rf(this,t,[e,n])}return Bf(t,e),xf(t,[{key:"dispose",value:function(){var e,n,r,i=this;setImmediate((function(){var e;null===(e=i.root)||void 0===e||e.unmount()})),(e=t,n=this,"function"==typeof(r=Mf(Df(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}])}(i.Z.getComponent("Component")),zf={tagName:"div"};function Zf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zf;if(!e)throw new Error("componentCtor is required");var n=function(n){function r(){return Tf(this,r),Rf(this,r,arguments)}return Bf(r,n),xf(r,[{key:"createEl",value:function(){var n=i.Z.dom.createEl(t.tagName,t.properties,t.attributes),r=(0,Ef.s)(n);return r.render(e(this.player_,this.options_)),this.root=r,n}}])}(Ff);return n}function Vf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Gf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Uf(e){var t=Ut(Zs)||Gs(e.allTracks),n=r.useState((function(){return e.allTracks.find((function(e){return e.language===t}))||e.allTracks.find((function(t){return t.language===Gs(e.allTracks)}))})),i=Vf(n,2),o=i[0],a=i[1],u=Vf(r.useState(t),2),c=u[0],l=u[1],s=Vf(r.useState(-1),2),f=s[0],p=s[1],h=Vf(r.useState(!0),2),y=h[0],v=h[1],d=Vf(r.useState([]),2),m=d[0],b=d[1],g=r.useMemo((function(){return Array.from((null==o?void 0:o.cues)||[])}),[c]),w={videoId:e.playbackObject.videoId,videoName:e.playbackObject.title,language:c},O={location:it.LZ.Player,entity:it.py.Transcript},S=e.player.hasStarted();!function(e){function t(t){var n=Array.from((null==t?void 0:t.activeCues)||[]);if(n.length){var r=e.cuesToDisplay.findIndex((function(e){return e.startTime===Hs.m.last(n).startTime}));-1!==r?e.setCurrentCueIndex(r):e.setCurrentCueIndex(null)}}function n(){t(e.currentTranscriptTrack)}r.useEffect((function(){e.hasStarted&&t(e.currentTranscriptTrack)}),[e.hasStarted]),r.useEffect((function(){return e.currentTranscriptTrack&&e.currentTranscriptTrack.addEventListener("cuechange",n),function(){var t;return null===(t=e.currentTranscriptTrack)||void 0===t?void 0:t.removeEventListener("cuechange",n)}}),[e.currentTranscriptTrack])}({currentTranscriptTrack:o,cuesToDisplay:g,setCurrentCueIndex:p,hasStarted:S});var k=r.useRef(),N=(0,Ks.MG)({count:m.length,getScrollElement:function(){var e;return null===(e=k.current)||void 0===e?void 0:e.view},estimateSize:function(){return 40},enabled:m.length>0}),P=N.getVirtualItems(),j=function(e,t,n){function i(e){n&&n.scrollToIndex(e,{align:"start"})}return r.useEffect((function(){t&&"number"==typeof e&&i(e)}),[e,t,n]),i}(f,y,N),E=function(e){var t=e.cuesToDisplay,n=e.resetHighlightedCues,i=e.setHighlightedCues,o=e.scrollToCue,a=Ws(r.useState(""),2),u=a[0],c=a[1],l=Ws(r.useState(null),2),s=l[0],f=l[1],p=Ws(r.useState(0),2),h=p[0],y=p[1],v=Ws(r.useTransition(),2)[1];return{isSearching:null!==s,searchQuery:u,onSearch:function(e){c(e),0!==h&&y(0),v((function(){!function(e){if(!e.length)return f(null),void n();var r=new RegExp(e.replace(Qs," "),"gi"),a=[],u=0,c=t.map((function(e,t){var n=e.text,i=n.replace(Qs," ").matchAll(r);if(0===i.length)return Object.assign(e,{nodes:[{text:n,searchResultIndex:null}]});var o=[],c=0;return i.forEach((function(e,r){var i=e[0],l=e.index;l>c&&o.push({text:n.substring(c,l),searchResultIndex:null}),o.push({text:i,searchResultIndex:u}),u++,a.push({cueIndex:t,cueMatchIndex:r}),c=l+i.length})),c<n.length&&o.push({text:n.substring(c),searchResultIndex:null}),Object.assign(e,{nodes:o})}));f(a),i(c),a.length&&o(a[0].cueIndex)}(e)}))},jumpToSearchResult:function(e){var t=s[e];t&&(y(e),o(t.cueIndex))},totalSearchResults:null==s?void 0:s.length,currentSearchResultIndex:h,resetSearchResults:function(){f(null),c(""),y(0),n()}}}({cuesToDisplay:g,resetHighlightedCues:F,setHighlightedCues:b,scrollToCue:j}),C=E.isSearching,T=E.searchQuery,_=E.totalSearchResults,x=E.jumpToSearchResult,L=E.onSearch,R=E.currentSearchResultIndex,I=E.resetSearchResults,M=e.player.paused(),D=Vf((0,af.X)(),2),B=D[0],A=D[1];function F(){b(g.map((function(e){return Object.assign(e,{nodes:[{text:e.text,searchResultIndex:null}]})})))}return r.useEffect((function(){v(!A&&!C&&S&&!M)}),[A,C,S,M]),r.useEffect((function(){F()}),[g]),o&&g.length?r.createElement("div",{ref:B,className:"cv-transcript py-3 px-2 ".concat(e.showTranscript?"cv-open":"")},r.createElement("div",{className:"text-dark d-flex justify-content-between px-1"},r.createElement("h3",null,"Transcript"),r.createElement(qs.h,{svgName:tf.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),r.createElement(jf,{selectedLanguage:c,languageOptions:e.languageOptions,onChangeLanguage:function(t){a(e.allTracks.find((function(e){return e.language===t}))),l(t),Kt(Zs,t),I()},track:o,onSearch:L,searchQuery:T,currentSearchResultIndex:R,totalSearchResults:_,jumpToSearchResult:x,analyticsData:w,analyticsOptions:O}),r.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},r.createElement(Us.ZP,{ref:k},r.createElement(ff,{timepoint:g[f],onClickTranscriptionItem:function(t){var n;null===(n=e.setStartTime)||void 0===n||n.call(e,t.startTime)},cuesToDisplay:m,chapters:e.chapters,currentSearchResultIndex:R,inPlayer:!0,virtualizer:N,items:P,analyticsOptions:O,analyticsData:w,isAuthenticated:!1})))):r.createElement(r.Fragment,null)}function Kf(e){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kf(e)}function qf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hf(r.key),r)}}function Hf(e){var t=function(e){if("object"!=Kf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kf(t)?t:t+""}function Wf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wf=function(){return!!e})()}function Yf(){return Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yf.apply(null,arguments)}function Qf(e){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qf(e)}function Jf(e,t){return Jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jf(e,t)}i.Z.registerComponent("Transcript",Zf((function(e,t){return r.createElement(Uf,Object.assign({player:e},t))})));var Xf=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Qf(t),function(e,t){if(t&&("object"==Kf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wf()?Reflect.construct(t,n||[],Qf(e).constructor):t.apply(e,n))}(this,t,[e])).allClickViewTracks=[],n.player=e,n.bindListeners(),e.ready((function(){return n.initialize()})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jf(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),Y.useMetadataTracks(this.player,"transcript",(function(){return e.player.trigger("resizemenus")})),this.player.on("playerresize",this.onResize)}},{key:"dispose",value:function(){var e,n,r;this.player.off("playerresize",this.onResize),(e=t,n=this,"function"==typeof(r=Yf(Qf(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){Y.useSubtitles(this.player,this.onTrackLoaded.bind(this)),Y.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(e){this.chapterTrack=e}},{key:"onTrackLoaded",value:function(e){var t=e.isClickViewProduced;!this.allClickViewTracks.find((function(t){return t.language===e.language}))&&t&&this.allClickViewTracks.push(e),this.languageOptions=this.buildOptions(this.allClickViewTracks)}},{key:"buildOptions",value:function(e){return e.map((function(e){return{label:e.label,value:e.language}})).sort((function(e,t){var n=e.value.includes(Vs)?1:0;return(t.value.includes(Vs)?1:0)-n}))}},{key:"buildComponentProps",value:function(e,t,n){var r,i=Array.from((null===(r=this.chapterTrack)||void 0===r?void 0:r.cues)||[]).map((function(e){return{endTimeStamp:e.endTime,startTime:e.startTime,name:e.text}}));return{showTranscript:e,languageOptions:this.languageOptions,toggleTranscript:function(e){return t(e,{shouldLog:!0})},allTracks:this.allClickViewTracks,setStartTime:n,chapters:i,playbackObject:this.playbackObject}}},{key:"addChildren",value:function(e){if(this.component)return this.component.show(),this.component;var t=this.toggleTranscript.bind(this),n=this.setStartTime.bind(this),r=this.buildComponentProps(e,t,n);this.component=this.player.addChild("Transcript",r)}},{key:"toggleTranscript",value:function(e,t){var n,r,i,o=void 0!==e?e:!this.showTranscript;this.showTranscript=o,o?(null===(n=this.player.theatreModePlugin())||void 0===n||n.toggleTheatreMode(!0,{shouldLog:!1}),this.addChildren(!0),this.player.addClass("cv-transcript-plugin")):(null===(r=this.component)||void 0===r||r.hide(),this.player.removeClass("cv-transcript-plugin")),this.player.whiteboardModePlugin&&this.player.whiteboardModePlugin().setEnabled(!o),this.player.trigger("cv-transcript-toggle",o),this.player.trigger("resizemenus"),this.player.trigger("playerresize"),(null==t?void 0:t.shouldLog)&&(null===(i=this.analyticsService)||void 0===i||i.logUserAction({videoId:this.playbackObject.videoId,videoName:this.playbackObject.title},{actionType:it.Vw.Click,descriptor:o?it.UX.ShowTranscript:it.UX.HideTranscript,entity:it.py.Transcript}))}},{key:"setStartTime",value:function(e){this.player.currentTime(e)}},{key:"isTranscriptOn",value:function(){return!!this.showTranscript}},{key:"onResize",value:function(){window.innerWidth<992?this.player.addClass("hide-transcript"):this.showTranscript&&this.player.removeClass("hide-transcript")}},{key:"registerAnalytics",value:function(e,t){this.analyticsService=e,this.playbackObject=t}}],r&&qf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function $f(e){return $f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$f(e)}function ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tp(r.key),r)}}function tp(e){var t=function(e){if("object"!=$f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$f(t)?t:t+""}function np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(np=function(){return!!e})()}function rp(e){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rp(e)}function ip(e,t){return ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ip(e,t)}i.Z.registerPlugin("viewTranscriptPlugin",Xf);var op=i.Z.getComponent("SubsCapsMenuItem"),ap=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=rp(t),function(e,t){if(t&&("object"==$f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,np()?Reflect.construct(t,n||[],rp(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ip(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){op.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}}])&&ep(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(op);function up(e){return up="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},up(e)}function cp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lp(r.key),r)}}function lp(e){var t=function(e){if("object"!=up(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=up(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==up(t)?t:t+""}function sp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sp=function(){return!!e})()}function fp(e){return fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fp(e)}function pp(e,t){return pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pp(e,t)}var hp=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};r.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(e,t,n){return t=fp(t),function(e,t){if(t&&("object"==up(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sp()?Reflect.construct(t,n||[],fp(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var i=n.player_.textTracks();return i.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",(function(){i.removeEventListener("selectedlanguagechange",n.toggleEnabled)})),n.toggleEnabled(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pp(e,t)}(t,e),n=t,(r=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=Y.getCurrentTextTrack(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=Y.getCurrentTextTrack(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&cp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function yp(e){return yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yp(e)}function vp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dp(r.key),r)}}function dp(e){var t=function(e){if("object"!=yp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yp(t)?t:t+""}function mp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mp=function(){return!!e})()}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bp(e)}function gp(e,t){return gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gp(e,t)}var wp=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(e,t,n){return t=bp(t),function(e,t){if(t&&("object"==yp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mp()?Reflect.construct(t,n||[],bp(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gp(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&vp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function Op(e){return Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Op(e)}function Sp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kp(r.key),r)}}function kp(e){var t=function(e){if("object"!=Op(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Op(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Op(t)?t:t+""}function Np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Np=function(){return!!e})()}function Pp(e){return Pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pp(e)}function jp(e,t){return jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jp(e,t)}var Ep=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Video Transcript",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="TranscriptMenuItem",(n=function(e,t,n){return t=Pp(t),function(e,t){if(t&&("object"==Op(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Np()?Reflect.construct(t,n||[],Pp(e).constructor):t.apply(e,n))}(this,t,[e,r])).transcriptOn=n.player_.viewTranscriptPlugin&&n.player_.viewTranscriptPlugin().isTranscriptOn(),n.bindEventListeners(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jp(e,t)}(t,e),n=t,(r=[{key:"bindEventListeners",value:function(){var e=this,t=this.toggleListener.bind(this),n=this.onResize.bind(this);this.player_.on("cv-transcript-toggle",t),this.player_.on("playerresize",n),this.on("dispose",(function(){e.player_.off("cv-transcript-toggle",t),e.player_.off("playerresize",n)}))}},{key:"onResize",value:function(){var e=window.innerWidth<992;this.item&&(this.item.style.display=e?"none":"block")}},{key:"handleToggleListener",value:function(){this.transcriptOn?this.toggleOff():this.toggleOn()}},{key:"toggleListener",value:function(e,t){var n,r;t?(this.transcriptOn=!0,i.Z.dom.addClass(this.toggleEl,"on")):(this.transcriptOn=!1,null===(r=(n=i.Z.dom).removeClass)||void 0===r||r.call(n,this.toggleEl,"on"))}},{key:"toggleOn",value:function(){var e,t;this.transcriptOn=!0,i.Z.dom.addClass(this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(t=null===(e=this.player_.viewTranscriptPlugin())||void 0===e?void 0:e.toggleTranscript)||void 0===t||t.call(e,!0,{shouldLog:!0})),this.player_.whiteboardModePlugin&&this.player_.whiteboardModePlugin().setEnabled(!1)}},{key:"toggleOff",value:function(){var e,t,n,r;this.transcriptOn=!1,null===(t=(e=i.Z.dom).removeClass)||void 0===t||t.call(e,this.toggleEl,"on"),this.player_.viewTranscriptPlugin&&(null===(r=null===(n=this.player_.viewTranscriptPlugin())||void 0===n?void 0:n.toggleTranscript)||void 0===r||r.call(n,!1,{shouldLog:!0}))}},{key:"createEl",value:function(e,t,n){return this.handlerBound||(this.handleToggleListener=this.handleToggleListener.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggleListener),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggleListener),this.item=i.Z.dom.createEl("li",{className:"vjs-menu-item cv-transcript-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Video Transcript</span>\n <span class="cv-toggle-container"></span>\n <span class="vjs-control-text" aria-live="polite">, opens transcript</span>\n ',tabIndex:-1},n),this.item.children[1].appendChild(this.toggleEl),this.item}}])&&Sp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("TextTrackMenuItem"));function Cp(e){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cp(e)}function Tp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_p(r.key),r)}}function _p(e){var t=function(e){if("object"!=Cp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cp(t)?t:t+""}function xp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xp=function(){return!!e})()}function Lp(){return Lp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Lp.apply(null,arguments)}function Rp(e){return Rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rp(e)}function Ip(e,t){return Ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ip(e,t)}i.Z.registerComponent("ToggleTranscriptMenuItem",Ep);var Mp=i.Z.getComponent("TextTrackButton"),Dp=i.Z.getComponent("SubsCapsButton"),Bp=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Rp(t),function(e,t){if(t&&("object"==Cp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xp()?Reflect.construct(t,n||[],Rp(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-subs-caps-menu-button",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ip(e,t)}(t,e),n=t,r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=Lp(Rp(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createItems",value:function(){var e=[];if(!this.player_.options_.mobile){var t=this.player().textTracks(),n=Array.from(t||[]).some((function(e){return"subtitles"===e.kind}));this.player_.options_.allowTranscript&&!!n&&this.player_.viewTranscriptPlugin&&window.innerWidth>=992&&e.push(new Ep(this.player_)),this.player_.options_.allowTranscript||e.push(new hp(this.player_)),e.push(new wp(this.player_)),this.hideThreshold_=this.hideThreshold_+2}return this.player().trigger("resizemenus"),Mp.prototype.createItems.call(this,e,ap)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Dp.prototype.handleClick.apply(this)}}],r&&Tp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Dp);function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Fp(){Fp=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Ap(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ap(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function zp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zp(r.key),r)}}function Zp(e){var t=function(e){if("object"!=Ap(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ap(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ap(t)?t:t+""}function Vp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Vp=function(){return!!e})()}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gp(e)}function Up(e,t){return Up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Up(e,t)}i.Z.registerComponent("SubsCapsButton",Bp);var Kp="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Rr,"</span>"),qp=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Gp(t),function(e,t){if(t&&("object"==Ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vp()?Reflect.construct(t,n||[],Gp(e).constructor):t.apply(e,n))}(this,t,[e,n])).qualityId=n.qualityId;var i=e.qualityLevels(),o=r.handleQualityChange.bind(r);return i.on("change",o),e.one("dispose",(function(){i.off("change",o)})),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready((function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",(function(){var e;null===(e=r.player_)||void 0===e||e.off("localcachechanged",r.handleLocalCacheChange)})),r.handleLocalCacheChange())})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Up(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=Fp().mark((function e(){var t,n;return Fp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Kp);case 10:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&zp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function Hp(e){return Hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hp(e)}function Wp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yp(r.key),r)}}function Yp(e){var t=function(e){if("object"!=Hp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hp(t)?t:t+""}function Qp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qp=function(){return!!e})()}function Jp(e,t,n,r){var i=Xp($p(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Xp(){return Xp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xp.apply(null,arguments)}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$p(e)}function eh(e,t){return eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eh(e,t)}var th={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},nh=i.Z.getComponent("MenuButton"),rh=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=$p(t),function(e,t){if(t&&("object"==Hp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qp()?Reflect.construct(t,n||[],$p(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var i=r.player_.qualityLevels(),o=r.update.bind(r);return i.on("addqualitylevel",o),i.on("removequalitylevel",o),e.one("dispose",(function(){i.removeEventListener("addqualitylevel",o),i.removeEventListener("removequalitylevel",o)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eh(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Jp(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Jp(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new j(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=th[r.id];i&&e.push(new qp(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?th[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){nh.prototype.handleClick.apply(this)}}])&&Wp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(nh);function ih(e){return ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ih(e)}function oh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ah(r.key),r)}}function ah(e){var t=function(e){if("object"!=ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ih(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ih(t)?t:t+""}function uh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(uh=function(){return!!e})()}function ch(){return ch="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=lh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ch.apply(null,arguments)}function lh(e){return lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lh(e)}function sh(e,t){return sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sh(e,t)}i.Z.registerComponent("QualityButton",rh);var fh=i.Z.getComponent("Menu"),ph=i.Z.getComponent("MenuButton"),hh=i.Z.getComponent("PlaybackRateMenuItem"),yh=i.Z.getComponent("PlaybackRateMenuButton"),vh=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=lh(t),function(e,t){if(t&&("object"==ih(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uh()?Reflect.construct(t,n||[],lh(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-playback-rate-menu-button",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sh(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ph.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((e=t,n=this,"function"==typeof(r=ch(lh(1&3?e.prototype:e),"buildWrapperCSSClass",n))?function(e){return r.apply(n,e)}:r)([]));var e,n,r}},{key:"createMenu",value:function(){var e=new fh(this.player(),{menuButton:this});e.addItem(new j(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new hh(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ph.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=yh.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=i.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.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)}}],r&&oh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yh);function dh(e){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dh(e)}function mh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bh(r.key),r)}}function bh(e){var t=function(e){if("object"!=dh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dh(t)?t:t+""}function gh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gh=function(){return!!e})()}function wh(e){return wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wh(e)}function Oh(e,t){return Oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oh(e,t)}i.Z.registerComponent("PlaybackRateMenuButton",vh);var Sh=i.Z.getComponent("TextTrackSettings"),kh={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Nh={small:kh,medium:Object.assign(Object.assign({},kh),{fontPercent:1.5}),large:Object.assign(Object.assign({},kh),{fontPercent:2})},Ph=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=wh(t),function(e,t){if(t&&("object"==dh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gh()?Reflect.construct(t,n||[],wh(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oh(e,t)}(t,e),n=t,(r=[{key:"setSizeSetting",value:function(e){var t=this;this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){n.update(),t.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Nh[this.size_]?Nh[this.size_]:kh}}])&&mh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Sh);function jh(e){return jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jh(e)}function Eh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ch(r.key),r)}}function Ch(e){var t=function(e){if("object"!=jh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jh(t)?t:t+""}function Th(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Th=function(){return!!e})()}function _h(e,t,n,r){var i=xh(Lh(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function xh(){return xh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xh.apply(null,arguments)}function Lh(e){return Lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lh(e)}function Rh(e,t){return Rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rh(e,t)}i.Z.registerComponent("TextTrackSettings",Ph);var Ih=window.navigator&&window.navigator.userAgent||"",Mh=(/iPod/i.test(Ih),/Android/i.test(Ih),i.Z.getComponent("Player")),Dh=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Lh(t),function(e,t){if(t&&("object"==jh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Th()?Reflect.construct(t,n||[],Lh(e).constructor):t.apply(e,n))}(this,t,[e,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var i=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",i),r.on("dispose",(function(){return r.off("cv-playback-data-loaded",i)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rh(e,t)}(t,e),n=t,r=[{key:"dataLoaded",value:function(e){var t=this;this._dataLoaded?e():(this.one("cv-playback-data-loaded",e),this.one("dispose",(function(){t.off("cv-playback-data-loaded",e)})))}},{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,n){var r=this;if("number"!=typeof e||!this.callback_||n)return _h(t,"currentTime",this,3)([e]);this.callback_((function(){r.unlock(),r.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return _h(t,"play",this,3)([]);this.callback_((function(){e.unlock(),e.play()}))}},{key:"createEl",value:function(){var e=this,n=_h(t,"createEl",this,3)([]);return this.videoContainer||(this.videoContainer=i.Z.dom.createEl("div",{className:"cv-video-wrapper"}),n.appendChild(this.videoContainer)),Array.from(n.childNodes).forEach((function(t){return t!==e.videoContainer&&e.videoContainer.appendChild(t)})),n}},{key:"addChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=_h(t,"addChild",this,3)([e,n,r]),o=i.el();return o&&this.videoContainer.appendChild(o),i}},{key:"updateStyleEl_",value:function(){if(Mh.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();if(void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Ia.Hover)return e.style.removeProperty("maxWidth"),void e.style.removeProperty("margin");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Mh.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}],r&&Eh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Mh);function Bh(e){return Bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bh(e)}function Ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fh(r.key),r)}}function Fh(e){var t=function(e){if("object"!=Bh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bh(t)?t:t+""}function zh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(zh=function(){return!!e})()}function Zh(e){return Zh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zh(e)}function Vh(e,t){return Vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vh(e,t)}Dh.prototype.options_=Object.assign(Object.assign({},Mh.prototype.options_),{setMaxHeight:!0}),i.Z.registerComponent("player",Dh);var Gh=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Zh(t),function(e,t){if(t&&("object"==Bh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zh()?Reflect.construct(t,n||[],Zh(e).constructor):t.apply(e,n))}(this,t,[e,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("play",r.onFirstPlay),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vh(e,t)}(t,e),n=t,(r=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Ah(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Uh(e){return Uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uh(e)}function Kh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qh(r.key),r)}}function qh(e){var t=function(e){if("object"!=Uh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uh(t)?t:t+""}function Hh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hh=function(){return!!e})()}function Wh(e){return Wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wh(e)}function Yh(e,t){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yh(e,t)}i.Z.registerComponent("PlayPauseFeedback",Gh);var Qh=i.Z.getComponent("PlayToggle"),Jh=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Wh(t),function(e,t){if(t&&("object"==Uh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hh()?Reflect.construct(t,n||[],Wh(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yh(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){var t=this;Qh.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Kh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Qh);function Xh(e){return Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xh(e)}function $h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ey(r.key),r)}}function ey(e){var t=function(e){if("object"!=Xh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xh(t)?t:t+""}function ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ty=function(){return!!e})()}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ny(e)}function ry(e,t){return ry=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ry(e,t)}i.Z.registerComponent("PlayToggle",Jh);var iy=i.Z.getComponent("TextTrackDisplay"),oy=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ny(t),function(e,t){if(t&&("object"==Xh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ty()?Reflect.construct(t,n||[],ny(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ry(e,t)}(t,e),n=t,(r=[{key:"updateDisplayState",value:function(e){iy.prototype.updateDisplayState.call(this,e);for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.fontPercent&&1!==t.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*t.fontPercent+"px"}}}}}])&&$h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(iy);function ay(e){return ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ay(e)}function uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cy(r.key),r)}}function cy(e){var t=function(e){if("object"!=ay(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ay(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ay(t)?t:t+""}function ly(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ly=function(){return!!e})()}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy(e)}function fy(e,t){return fy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fy(e,t)}i.Z.registerComponent("TextTrackDisplay",oy);var py=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=sy(t),function(e,t){if(t&&("object"==ay(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ly()?Reflect.construct(t,n||[],sy(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&uy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function hy(e){return hy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hy(e)}function yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vy(r.key),r)}}function vy(e){var t=function(e){if("object"!=hy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hy(t)?t:t+""}function dy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dy=function(){return!!e})()}function my(e,t,n,r){var i=by(gy(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function by(){return by="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=gy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},by.apply(null,arguments)}function gy(e){return gy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gy(e)}function wy(e,t){return wy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wy(e,t)}i.Z.registerComponent("ControlBarGradient",py);var Oy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=gy(t),function(e,t){if(t&&("object"==hy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dy()?Reflect.construct(t,n||[],gy(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return my(t,"createEl",this,3)(["h1",{innerHTML:e}]);var n=this.buildSeasonEpisodeString();return n?(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+e,my(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,my(t,"createEl",this,3)(["h1",{innerHTML:e}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&yy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Sy(e){return Sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sy(e)}function ky(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ny(r.key),r)}}function Ny(e){var t=function(e){if("object"!=Sy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sy(t)?t:t+""}function Py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Py=function(){return!!e})()}function jy(){return jy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ey(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jy.apply(null,arguments)}function Ey(e){return Ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ey(e)}function Cy(e,t){return Cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cy(e,t)}var Ty=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ey(t),function(e,t){if(t&&("object"==Sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Py()?Reflect.construct(t,n||[],Ey(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cy(e,t)}(t,e),n=t,r=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((e=this.options_.ratingValue)?function(e){switch(!0){case e<32:return"cv-rating-purple";case e<48:return"cv-rating-green";case e<80:return"cv-rating-blue";case e<96:return"cv-rating-red";case e<128:return"cv-rating-pink";case e>=128:return"cv-rating-yellow";default:return""}}(e):"");var e}},{key:"createEl",value:function(e,n,r){return this.options_.ratingCode?(i=t,o=this,"function"==typeof(a=jy(Ey(1&3?i.prototype:i),"createEl",o))?function(e){return a.apply(o,e)}:a)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null;var i,o,a}}],r&&ky(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function _y(e){return _y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_y(e)}function xy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ly(r.key),r)}}function Ly(e){var t=function(e){if("object"!=_y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_y(t)?t:t+""}function Ry(e,t){if(t&&("object"==_y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Iy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Iy=function(){return!!e})()}function My(e){return My=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},My(e)}function Dy(e,t){return Dy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dy(e,t)}var By=function(e){function t(e,n){var r,i,o,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=[e,n],o=My(o=t),r=Ry(i,Iy()?Reflect.construct(o,a||[],My(i).constructor):o.apply(i,a)),n.embed?(r.addChild(new Oy(e,n)),r.addChild(new Ty(e,n)),r):Ry(r,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return i.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&xy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function Ay(e){return Ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ay(e)}function Fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zy(r.key),r)}}function zy(e){var t=function(e){if("object"!=Ay(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ay(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ay(t)?t:t+""}function Zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zy=function(){return!!e})()}function Vy(e){return Vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vy(e)}function Gy(e,t){return Gy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gy(e,t)}var Uy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Vy(t),function(e,t){if(t&&("object"==Ay(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zy()?Reflect.construct(t,n||[],Vy(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new By(e,n)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gy(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e="<div class='cv-splash-mask'></div>";return this.options_.embed&&(e+="<div class='cv-splash-logo'>".concat(On,"</div>")),i.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:e})}},{key:"setSrc",value:function(e){var t="";e&&(t='url("'.concat(e,'")')),this.el_.style.backgroundImage=t}}])&&Fy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("posterImage"));function Ky(e){return Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ky(e)}function qy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hy(r.key),r)}}function Hy(e){var t=function(e){if("object"!=Ky(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ky(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ky(t)?t:t+""}function Wy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wy=function(){return!!e})()}function Yy(e){return Yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yy(e)}function Qy(e,t){return Qy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qy(e,t)}i.Z.registerComponent("posterImage",Uy);var Jy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Yy(t),function(e,t){if(t&&("object"==Ky(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wy()?Reflect.construct(t,n||[],Yy(e).constructor):t.apply(e,n))}(this,t,[e,n])).el().prepend(r.getErrorImage()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qy(e,t)}(t,e),n=t,(r=[{key:"getErrorImage",value:function(){return i.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 '})}}])&&qy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ErrorDisplay"));function Xy(e){return Xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xy(e)}function $y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ev(r.key),r)}}function ev(e){var t=function(e){if("object"!=Xy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xy(t)?t:t+""}function tv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tv=function(){return!!e})()}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nv(e)}function rv(e,t){return rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rv(e,t)}i.Z.registerComponent("ErrorDisplay",Jy);var iv=i.Z.getComponent("FullscreenToggle"),ov="Fullscreen (f)",av=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=nv(t),function(e,t){if(t&&("object"==Xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tv()?Reflect.construct(t,n||[],nv(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rv(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){iv.prototype.handleFullscreenChange.call(this),this.controlText(ov)}}])&&$y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(iv);i.Z.registerComponent("FullscreenToggle",av),av.prototype.controlText_=ov;var uv=n(67453),cv=n(54610);function lv(e){return lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lv(e)}function sv(){sv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==lv(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(lv(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function fv(e){return function(e){if(Array.isArray(e))return pv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pv(e,t):void 0}}(e)||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 pv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yv(r.key),r)}}function yv(e){var t=function(e){if("object"!=lv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lv(t)?t:t+""}var vv,dv=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},mv=i.Z.getComponent("Player"),bv=function(){return e=function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=i.Z.obj.merge({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),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(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch((function(e){return r.handleFetchError(e)}))}))},(t=[{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(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=(0,i.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var e=500;return(this.options.mobile||i.Z.browser.IS_IOS||i.Z.browser.IS_ANDROID)&&(e=3e3),e}},{key:"getFluid",value:function(){return!this.options.theatreMode&&!this.options.embed&&!this.options.mobile}},{key:"getFill",value:function(){return!!this.options.theatreMode||!(!this.options.embed&&!this.options.mobile)}},{key:"getPlayerOptions",value:function(){var e=this,t=mv.prototype.options_.children;return t=t.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:this.getFluid(),fill:this.getFill(),inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(fv(t),[{name:"collapserator",children:tt.filter((function(t){return!("fullscreenToggle"===t&&!e.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var r=Pt()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Lt[r]){Lt[r](t,e);var i=function(e){var t=e.target;return"video"===t.tagName.toLowerCase()||!!["video-js","vjs-tech"].find((function(e){return t.classList.contains(e)}))}(e),o=["space"].includes(r);(i||o)&&(e.preventDefault(),e.stopPropagation())}}}(t,e.player,e.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,allowTheatreMode:this.options.allowTheatreMode,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return dv(this,void 0,void 0,sv().mark((function e(){var t,n,r=this;return sv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.offlinePlaybackObject){e.next=2;break}return e.abrupt("return",this.options.offlinePlaybackObject);case 2:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return kt.get(t)}),this.options.viewKey){e.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return e.next=8,t(this.options.viewKey);case 8:if(n=e.sent){e.next=11;break}throw new Error("Error fetching playback object");case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"setChaptersInternal",value:function(e,t){var n=Y.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),fv(n.cues.cues_).forEach((function(e){return n.removeCue(e)})),e.forEach((function(e){n.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),t&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(e){this.setChaptersInternal(e,!0)}},{key:"setPlayerMode",value:function(e,t){this.player.playerModePlugin().setPlayerMode(e,t)}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"fetch",value:function(){var e,t,n,r,i;return dv(this,void 0,void 0,sv().mark((function o(){var a,u,c,l=this;return sv().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getPlaybackObject();case 2:if(a=o.sent,!this.isDisposed()){o.next=5;break}return o.abrupt("return");case 5:u="MasterClip"===a.mediaType,c=null===(e=a.additionalData)||void 0===e?void 0:e.clipData,(null===(n=null===(t=a.chapters)||void 0===t?void 0:t.list)||void 0===n?void 0:n.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=a.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(i=this.options.enableLocalCache)||void 0===i||i}),this.player.progressiveFiles({sources:a.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(e){if("text/vtt"===e.mimeType){var t=l.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0);t.track.isClickViewProduced=e.isClickViewProduced,Y.sanitizeTrack(t.track,l.player),Y.activeTextTrack(t.track)}})),a.posterUrl&&this.player.poster(uv.j.createUrl(a.posterUrl,{size:cv.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 o.stop()}}),o,this)})))}},{key:"handleFetchError",value:function(e){var t,n=e.message;e instanceof dt&&(null===(t=e.response)||void 0===t?void 0:t.type)===xt.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(e)}},{key:"fetchConfig",value:function(){return dv(this,void 0,void 0,sv().mark((function e(){var t;return sv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(vv||this.options.fetch||this.options.offlinePlaybackObject)){e.next=2;break}return e.abrupt("return");case 2:return t="".concat(this.options.playerApi.origin,"/api/config"),e.next=5,kt.get(t);case 5:if(vv=e.sent,!this.isDisposed()){e.next=8;break}return e.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return e.stop()}}),e,this)})))}},{key:"additionalSetup",value:function(e){var t,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(t=e.localCacheAddresses)||void 0===t?void 0:t.length);vv?this.setupAnalyticsService(e,r):this.one("config:loaded",(function(){return n.setupAnalyticsService(e,r)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(e):this.one("analytics:loaded",(function(){return n.setupAnalyticsDependentPlugins(e)}))}},{key:"setupAnalyticsService",value:function(e,t){this.options.eventLogging&&(this.analyticsService=new st({collectionApiUrls:vv.collectionApi.urls,collectionApiClientId:vv.collectionApi.clientId,productVersion:"1.32.0",authSessionId:e.viewerAuthSessionId,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||Rt.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var t,n,r,i;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=e.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=e.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=e.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(i=e.settings)||void 0===i?void 0:i.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(e){var t=this;this.options.autoplay&&this.player.ready((function(){t.player.play().catch((function(){t.isDisposed()||t.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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=i.Z.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=i.Z.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{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(e){return this.player.currentTime(e)}},{key:"muted",value:function(e){return this.player.muted(e)}},{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(e){return this.player.playbackRate(e)}},{key:"quality",value:function(e){for(var t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(e)r.enabled=r.id===e.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(e){for(var t=this.player.textTracks(),n=0;n<t.length;n++){var r=t[n];if(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="hidden"}}},{key:"bindEventListeners",value:function(){var e=this,t=function(e){return e.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",t),this.player.one("dispose",(function(){e.off("ended",e.showSplash),e.off("play",e.hideSplash),e.player.tech(!0).off("contextmenu",t)})),this.options.hotkeyElQuerySelector){var n=i.Z.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},e)),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"}}])&&hv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function gv(e){return gv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gv(e)}function wv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ov(r.key),r)}}function Ov(e){var t=function(e){if("object"!=gv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gv(t)?t:t+""}function Sv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Sv=function(){return!!e})()}function kv(){return kv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Nv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},kv.apply(null,arguments)}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nv(e)}function Pv(e,t){return Pv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pv(e,t)}bv.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};var jv=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=Nv(t),function(e,t){if(t&&("object"==gv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sv()?Reflect.construct(t,n||[],Nv(e).constructor):t.apply(e,n))}(this,t,[e]),void 0===n.startTime)throw Error("Invalid clip start");if(void 0===n.endTime)throw Error("Invalid clip end");if(n.startTime>n.endTime)throw Error("Clip start cannot be greater than clip end");return r._clipStart=parseFloat(n.startTime.toPrecision(4)),r._clipEnd=parseFloat(n.endTime.toPrecision(4)),r.playerEndedFn=r.player.ended.bind(e),r.playerDurationFn=r.player.duration.bind(e),r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.playerbufferedFn=r.player.buffered.bind(e),r.player.ended=r.ended.bind(r),r.player.duration=r.duration.bind(r),r.player.currentTime=r.currentTime.bind(r),r.player.buffered=r.buffered.bind(r),r.initialize(),r.player.ready((function(){r.player.trigger("durationchange")})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pv(e,t)}(t,e),n=t,r=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return e<=0?this._clipEnd:this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){var e,n,r;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"),(e=t,n=this,"function"==typeof(r=kv(Nv(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{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 e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return e&&e>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(e)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if("number"!=typeof e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn(t,r)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return i.Z.createTimeRanges(t)}}],r&&wv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Ev(e){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(e)}function Cv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tv(r.key),r)}}function Tv(e){var t=function(e){if("object"!=Ev(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ev(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ev(t)?t:t+""}function _v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_v=function(){return!!e})()}function xv(){return xv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xv.apply(null,arguments)}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lv(e)}function Rv(e,t){return Rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rv(e,t)}i.Z.registerPlugin("clipPlugin",jv);var Iv=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Lv(t),function(e,t){if(t&&("object"==Ev(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_v()?Reflect.construct(t,n||[],Lv(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rv(e,t)}(t,e),n=t,r=[{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 e,n,r;(e=t,n=this,"function"==typeof(r=xv(Lv(1&3?e.prototype:e),"handleClick",n))?function(e){return r.apply(n,e)}:r)([null])}}],r&&Cv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function Mv(e){return Mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mv(e)}function Dv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bv(r.key),r)}}function Bv(e){var t=function(e){if("object"!=Mv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mv(t)?t:t+""}function Av(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Av=function(){return!!e})()}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fv(e)}function zv(e,t){return zv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zv(e,t)}Iv.prototype.controlText_="Create clip",i.Z.registerComponent("CreateClipButton",Iv);var Zv=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Fv(t),function(e,t){if(t&&("object"==Mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Av()?Reflect.construct(t,n||[],Fv(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zv(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&Dv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Vv(e){return Vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vv(e)}function Gv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uv(r.key),r)}}function Uv(e){var t=function(e){if("object"!=Vv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vv(t)?t:t+""}function Kv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Kv=function(){return!!e})()}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qv(e)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hv(e,t)}i.Z.registerPlugin("createClipButtonPlugin",Zv);var Wv=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=qv(t),function(e,t){if(t&&("object"==Vv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Kv()?Reflect.construct(t,n||[],qv(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&Gv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("PictureInPictureToggle"));function Yv(e){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yv(e)}function Qv(){Qv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Yv(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Yv(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Jv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xv(r.key),r)}}function Xv(e){var t=function(e){if("object"!=Yv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yv(t)?t:t+""}function $v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($v=function(){return!!e})()}function ed(){return ed="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=td(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ed.apply(null,arguments)}function td(e){return td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},td(e)}function nd(e,t){return nd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nd(e,t)}i.Z.registerComponent("PictureInPictureToggle",Wv);var rd=i.Z.getComponent("PlayToggle"),id=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=td(t),function(e,t){if(t&&("object"==Yv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$v()?Reflect.construct(t,n||[],td(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.bindFunctions(),e.ready((function(){return r.initialize()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nd(e,t)}(t,e),n=t,r=[{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:"initialize",value:function(){var e=this,t=this.player.getChild("collapserator"),n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),this.toggle=t.addChild("pictureInPictureToggle",{},n),this.toggle.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){var e,t;if(!this.player.isInPictureInPicture()){var n=this.player.el().getBoundingClientRect();0!==n.width&&(n.width<800?null===(e=this.toggle)||void 0===e||e.hide():null===(t=this.toggle)||void 0===t||t.show())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new rd(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 e;this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0)}},{key:"exitPictureInPicture",value:function(){return e=this,t=void 0,n=void 0,r=Qv().mark((function e(){return Qv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles();case 3:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"dispose",value:function(){var e,n,r;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(e=t,n=this,"function"==typeof(r=ed(td(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Jv(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function od(e){return od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(e)}function ad(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ud(r.key),r)}}function ud(e){var t=function(e){if("object"!=od(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=od(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==od(t)?t:t+""}i.Z.registerPlugin("pictureInPicture",id);var cd=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}},t=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],t&&ad(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function ld(e){return ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ld(e)}function sd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fd(r.key),r)}}function fd(e){var t=function(e){if("object"!=ld(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ld(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ld(t)?t:t+""}function pd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pd=function(){return!!e})()}function hd(e,t,n,r){var i=yd(vd(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function yd(){return yd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},yd.apply(null,arguments)}function vd(e){return vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vd(e)}function dd(e,t){return dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dd(e,t)}var md=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=vd(t),function(e,t){if(t&&("object"==ld(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pd()?Reflect.construct(t,n||[],vd(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=cd,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dd(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(hd(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return hd(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{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 e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{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(e){e.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 e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=i.Z.dom.findPosition(n),o=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,o)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&sd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function bd(e){return bd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bd(e)}function gd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wd(r.key),r)}}function wd(e){var t=function(e){if("object"!=bd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bd(t)?t:t+""}function Od(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Od=function(){return!!e})()}function Sd(){return Sd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=kd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Sd.apply(null,arguments)}function kd(e){return kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kd(e)}function Nd(e,t){return Nd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nd(e,t)}var Pd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=kd(t),function(e,t){if(t&&("object"==bd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Od()?Reflect.construct(t,n||[],kd(e).constructor):t.apply(e,n))}(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nd(e,t)}(t,e),n=t,r=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){i.Z.dom.addClass(this.toggleEl,"on"),i.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){i.Z.dom.removeClass(this.toggleEl,"on"),i.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),i.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),i.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var o,a,u,c=(o=t,a=this,"function"==typeof(u=Sd(kd(1&3?o.prototype:o),"createEl",a))?function(e){return u.apply(a,e)}:u)([e,{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>'},r]);return c.children[1].appendChild(this.toggleEl),c}}],r&&gd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function jd(e){return jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jd(e)}function Ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cd(r.key),r)}}function Cd(e){var t=function(e){if("object"!=jd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jd(t)?t:t+""}function Td(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Td=function(){return!!e})()}function _d(e){return _d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_d(e)}function xd(e,t){return xd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xd(e,t)}i.Z.registerComponent("PointsOfInterestMenuItem",Pd);var Ld,Rd=i.Z.getPlugin("plugin"),Id="cvplayer-points-of-interest",Md=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=_d(t),function(e,t){if(t&&("object"==jd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Td()?Reflect.construct(t,n||[],_d(e).constructor):t.apply(e,n))}(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",(function(){return r.player.ready(r.initialize)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xd(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(Gt()&&"false"===Ut(Id)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Kt(Id,e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new md(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:Pd,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered(Gc(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&Ed(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Rd);function Dd(e){return Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(e)}function Bd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ad(r.key),r)}}function Ad(e){var t=function(e){if("object"!=Dd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dd(t)?t:t+""}function Fd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fd=function(){return!!e})()}function zd(e){return zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zd(e)}function Zd(e,t){return Zd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zd(e,t)}i.Z.registerPlugin("pointsOfInterestPlugin",Md),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(Ld||(Ld={}));var Vd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zd(t),function(e,t){if(t&&("object"==Dd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fd()?Reflect.construct(t,n||[],zd(e).constructor):t.apply(e,n))}(this,t,[e,n])).update(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zd(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.options_.activityStatus===Ld.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 e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===Ld.None||this.options_.activityStatus===Ld.Incomplete?Ld.Complete:this.options_.activityStatus===Ld.Complete?Ld.Incomplete:void 0}}],r&&Bd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Button"));function Gd(e){return Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(e)}function Ud(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kd(r.key),r)}}function Kd(e){var t=function(e){if("object"!=Gd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gd(t)?t:t+""}function qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qd=function(){return!!e})()}function Hd(e){return Hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hd(e)}function Wd(e,t){return Wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wd(e,t)}Vd.prototype.controlText_="Complete";var Yd=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Hd(t),function(e,t){if(t&&("object"==Gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qd()?Reflect.construct(t,n||[],Hd(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wd(e,t)}(t,e),n=t,(r=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new Vd(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&Ud(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function Qd(e){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qd(e)}function Jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xd(r.key),r)}}function Xd(e){var t=function(e){if("object"!=Qd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qd(t)?t:t+""}function $d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($d=function(){return!!e})()}function em(e,t,n,r){var i=tm(nm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function tm(){return tm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},tm.apply(null,arguments)}function nm(e){return nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nm(e)}function rm(e,t){return rm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rm(e,t)}i.Z.registerPlugin("activityStatusPlugin",Yd);var im=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=nm(t),function(e,t){if(t&&("object"==Qd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$d()?Reflect.construct(t,n||[],nm(e).constructor):t.apply(e,n))}(this,t,[e,n])).initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rm(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(em(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return em(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])&&Jd(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function om(e){return om="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},om(e)}function am(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,um(r.key),r)}}function um(e){var t=function(e){if("object"!=om(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=om(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==om(t)?t:t+""}function cm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cm=function(){return!!e})()}function lm(e,t,n,r){var i=sm(fm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function sm(){return sm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},sm.apply(null,arguments)}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fm(e)}function pm(e,t){return pm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pm(e,t)}var hm=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=fm(t),function(e,t){if(t&&("object"==om(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cm()?Reflect.construct(t,n||[],fm(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pm(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(lm(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return lm(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&am(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("ClickableComponent"));function ym(e){return ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ym(e)}function vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dm(r.key),r)}}function dm(e){var t=function(e){if("object"!=ym(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ym(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ym(t)?t:t+""}function mm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mm=function(){return!!e})()}function bm(e,t,n,r){var i=gm(wm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function gm(){return gm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=wm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gm.apply(null,arguments)}function wm(e){return wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wm(e)}function Om(e,t){return Om=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Om(e,t)}var Sm=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=wm(t),function(e,t){if(t&&("object"==ym(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mm()?Reflect.construct(t,n||[],wm(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Om(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(bm(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var o=bm(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),a=i.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),u=i.Z.dom.createEl("div",{className:"cv-button-container"}),c=new hm(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new hm(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return o.appendChild(a),o.appendChild(u),u.appendChild(c.el()),u.appendChild(l.el()),o}}])&&vm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function km(e){return km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},km(e)}function Nm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pm(r.key),r)}}function Pm(e){var t=function(e){if("object"!=km(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=km(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==km(t)?t:t+""}function jm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jm=function(){return!!e})()}function Em(){return Em="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Cm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Em.apply(null,arguments)}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cm(e)}function Tm(e,t){return Tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tm(e,t)}var _m=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Cm(t),function(e,t){if(t&&("object"==km(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jm()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tm(e,t)}(t,e),n=t,r=[{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 e=this;this.player.one("loadedmetadata",(function(){return e.player.ready(e.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 e=this.player.currentTime();if(!(e<this.startTime))return e>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 e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new im(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new im(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],i=this.player.duration(),o=this.startTime/i*100,a=100-this.endTime/i*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(o,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new Sm(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.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 e,n,r,i,o,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),(i=t,o=this,"function"==typeof(a=Em(Cm(1&3?i.prototype:i),"dispose",o))?function(e){return a.apply(o,e)}:a)([])}}],r&&Nm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("rangeIndicatorPlugin",_m);var xm=function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()};function Lm(e){return Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lm(e)}function Rm(){Rm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Lm(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Lm(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Im(e){return function(e){if(Array.isArray(e))return Mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Mm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mm(e,t):void 0}}(e)||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 Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bm(r.key),r)}}function Bm(e){var t=function(e){if("object"!=Lm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lm(t)?t:t+""}function Am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Am=function(){return!!e})()}function Fm(e,t,n,r){var i=zm(Zm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function zm(){return zm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Zm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},zm.apply(null,arguments)}function Zm(e){return Zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zm(e)}function Vm(e,t){return Vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vm(e,t)}var Gm,Um,Km=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zm(t),function(e,t){if(t&&("object"==Lm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Am()?Reflect.construct(t,n||[],Zm(e).constructor):t.apply(e,n))}(this,t,[e,n])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vm(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=Fm(t,"getPlayerOptions",this,3)([]);return this.options.allowTranscript&&(n.allowTranscript=!0),(null===(e=n.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},n),{techOrder:["devices"].concat(Im(n.techOrder)),devices:{instanceId:xm()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"toggleTheatreMode",value:function(e){var t=this.player.theatreModePlugin();t&&t.toggleTheatreMode(e,{shouldLog:!0})}},{key:"toggleTranscript",value:function(e){if(this.player.viewTranscriptPlugin){var t=this.player.viewTranscriptPlugin();t&&t.toggleTranscript(e)}}},{key:"hasStarted",value:function(){return this.player.hasStarted()}},{key:"additionalSetup",value:function(e){var n,r,i,o,a=this,u=Object.create(null,{additionalSetup:{get:function(){return Fm(t,"additionalSetup",a,1)}}});return n=this,r=void 0,i=void 0,o=Rm().mark((function t(){var n;return Rm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin({onRequestTheatreMode:this.options.onRequestTheatreMode,theatreMode:this.options.theatreMode,playbackObject:e}),u.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=8;break}if(null!==(n=e.additionalData)){t.next=7;break}throw Error("Invalid clip data");case 7:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 8:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 9:case"end":return t.stop()}}),t,this)})),new(i||(i=Promise))((function(e,t){function a(e){try{c(o.next(e))}catch(e){t(e)}}function u(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,u)}c((o=o.apply(n,r||[])).next())}))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var n;Fm(t,"setupAnalyticsDependentPlugins",this,3)([e]),this.options.allowTranscript&&this.player.viewTranscriptPlugin().registerAnalytics(this.analyticsService,e),this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin().registerAnalytics(this.analyticsService),(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)&&this.player.devicesPlugin&&this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}},{key:"addTranscript",value:function(e){return Y.getTrack(this.player,"metadata","transcript",e)?null:this.player.addTextTrack("metadata","transcript",e)}},{key:"useCurrentTranscript",value:function(e,t){return Y.useMetadataTracks(this.player,"transcript",e,t)}}])&&Dm(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(bv),qm=n(33937);function Hm(e){return Hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hm(e)}function Wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ym(r.key),r)}}function Ym(e){var t=function(e){if("object"!=Hm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hm(t)?t:t+""}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(Gm||(Gm={})),function(e){e.Available="available",e.Offline="offline",e.Busy="busy"}(Um||(Um={}));var Qm=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this[Symbol.toStringTag]=t[Symbol.toStringTag],this.innerPromise=t,this.onTimeout=n,this.bindFunctions()}return t=e,r=[{key:"reject",value:function(t){return new e(Promise.reject(t))}},{key:"fromPromise",value:function(t){return new e(t)}}],(n=[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this),this.then=this.then.bind(this),this.catch=this.catch.bind(this),this.finally=this.finally.bind(this)}},{key:"timeout",value:function(e){var t=this;return new Promise((function(n,r){t.then(n).catch(r).finally((function(){return clearTimeout(i)}));var i=setTimeout((function(){var e;null===(e=t.onTimeout)||void 0===e||e.call(t),r(new Error("Promise timed out"))}),e)}))}},{key:"then",value:function(e,t){return this.innerPromise.then(e,t)}},{key:"catch",value:function(e){return this.innerPromise.catch(e)}},{key:"finally",value:function(e){return this.innerPromise.finally(e)}}])&&Wm(t.prototype,n),r&&Wm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function Jm(e){return Jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jm(e)}function Xm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tb(r.key),r)}}function eb(e,t,n){return t&&$m(e.prototype,t),n&&$m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tb(e){var t=function(e){if("object"!=Jm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jm(t)?t:t+""}Symbol.toStringTag;var nb=function(){return eb((function e(){Xm(this,e),this.callbacks=[],this.predicates=[],this.controller=new AbortController,this.signal=this.controller.signal,this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.isDisposed=this.isDisposed.bind(this)}),[{key:"trigger",value:function(e){var t=this;this.callbacks.forEach((function(n,r){var i=t.predicates[r];i&&!i(e)||n(e)}))}},{key:"on",value:function(e){var t=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=e,this.predicates[n]=function(){return!0};var r=function(){t.off(e)};return{off:r,filter:function(e){return t.predicates[n]=e,r}}}},{key:"one",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?Qm.reject(new Error("This EventChannel instance has been disposed")):new Qm(new Promise((function(r,i){e=t.on((function(n){t.signal.removeEventListener("abort",o),e(),r(n)})).filter(n);var o=function(){e(),i(new Error("Aborted while waiting for message"))};t.signal.addEventListener("abort",o,{once:!0})})),(function(){e()}))}},{key:"off",value:function(e){var t=this.callbacks.indexOf(e);-1!==t&&(this.callbacks.splice(t,1),this.predicates.splice(t,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}])}(),rb=function(){return eb((function e(){Xm(this,e),this.channels={},this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.getChannel=this.getChannel.bind(this)}),[{key:"trigger",value:function(e,t){this.getChannel(e).trigger(t)}},{key:"on",value:function(e,t){return this.getChannel(e).on(t)}},{key:"one",value:function(e,t){return this.getChannel(e).one(t)}},{key:"off",value:function(e,t){this.getChannel(e).off(t)}},{key:"dispose",value:function(){this.trigger("dispose",ib.void),Object.values(this.channels).forEach((function(e){return e.dispose()})),this.channels={}}},{key:"getChannel",value:function(e){return this.channels[e]||(this.channels[e]=new nb),this.channels[e]}}])}(),ib={void:void 0};function ob(e){return ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ob(e)}function ab(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ub(r.key),r)}}function ub(e){var t=function(e){if("object"!=ob(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ob(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ob(t)?t:t+""}var cb,lb,sb,fb=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()},(t=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&ab(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),pb=function(e,t){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(n,r,i,o){var a=e._lastModified[r.toString()];return!!(a&&Date.now()<a+t)||Reflect.set(n,r,i,o)}})},hb=function(e){return e._lastModified||(e._lastModified={}),new Proxy(e,{set:function(t,n,r,i){return e._lastModified[n.toString()]=Date.now(),Reflect.set(t,n,r,i)}})};function yb(e){return yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yb(e)}function vb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mb(r.key),r)}}function db(e,t,n){return t&&vb(e.prototype,t),n&&vb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mb(e){var t=function(e){if("object"!=yb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yb(t)?t:t+""}!function(e){e[e.Offline=0]="Offline",e[e.Online=1]="Online",e[e.Locked=2]="Locked",e[e.Suspended=3]="Suspended"}(cb||(cb={})),function(e){e[e.PlaybackStatusChange=0]="PlaybackStatusChange",e[e.PositionChange=1]="PositionChange"}(lb||(lb={})),function(e){e.Begin="BEGIN",e.Play="PLAY",e.Pause="PAUSE",e.Load="LOAD",e.Scan="SCAN",e.Stop="STOP"}(sb||(sb={}));var bb=db((function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.title=t,this.device=n,this.locked=!1,this.position=0,this.playbackStatus=sb.Load,this.debounced=pb(this,2e3),hb(this)}));function gb(e){return gb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gb(e)}function wb(){wb=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==gb(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(gb(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function Ob(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sb(r.key),r)}}function Sb(e){var t=function(e){if("object"!=gb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gb(t)?t:t+""}function kb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kb=function(){return!!e})()}function Nb(){return Nb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Nb.apply(null,arguments)}function Pb(e){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pb(e)}function jb(e,t){return jb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jb(e,t)}var Eb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Pb(t),function(e,t){if(t&&("object"==gb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kb()?Reflect.construct(t,n||[],Pb(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new bb(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jb(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleDisconnected=this.handleDisconnected.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handlePlaybackChange=this.handlePlaybackChange.bind(this),this.handlePositionChange=this.handlePositionChange.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){this.client.on("dispose",this.dispose),this.client.on("disconnected",this.handleDisconnected),this.client.on("message",this.handleAllVideoMessages)}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("disconnected",this.handleDisconnected),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(e){return console.error(e)})),(e=t,n=this,"function"==typeof(r=Nb(Pb(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleDisconnected",value:function(){this.trigger("error",new Error("The connection to the Apple TV has been lost and cannot be recovered"))}},{key:"handleAllVideoMessages",value:function(e){if(e.deviceId===this.getDevice().id){var t=this.localState.debounced;switch(e.event){case lb.PlaybackStatusChange:this.handlePlaybackChange(t,e);break;case lb.PositionChange:this.handlePositionChange(t,e)}}}},{key:"handlePlaybackChange",value:function(e,t){e.playbackStatus!==t.params.playbackStatus&&(e.playbackStatus=t.params.playbackStatus,this.trigger("playingchange",ib.void),e.playbackStatus===sb.Stop&&this.dispose())}},{key:"handlePositionChange",value:function(e,t){e.position!==t.params.position&&(e.position=t.params.position,this.trigger("positionchange",ib.void))}},{key:"loadSource",value:function(){return e=this,t=void 0,n=void 0,r=wb().mark((function e(){return wb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.localState.locked){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.client.lock(this.getDevice().id);case 5:return this.localState.locked=!0,e.next=8,this.client.loadVideo(this.getDevice().id);case 8:this.trigger("sourceloaded",ib.void),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not load video on Apple TV device"));case 15:case"end":return e.stop()}}),e,this,[[0,11]])})),new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"play",value:function(){this.localState.locked&&this.localState.playbackStatus!==sb.Play&&(this.localState.playbackStatus=sb.Play,this.client.play(this.getDevice().id),this.trigger("playingchange",ib.void))}},{key:"pause",value:function(){this.localState.locked&&this.localState.playbackStatus!==sb.Pause&&(this.localState.playbackStatus=sb.Pause,this.client.pause(this.getDevice().id),this.trigger("playingchange",ib.void))}},{key:"seek",value:function(e){this.localState.locked&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",ib.void))}},{key:"setVolume",value:function(){console.info("Setting the volume is not supported on Apple TV")}},{key:"setMuted",value:function(){console.info("Muting is not supported on Apple TV")}},{key:"setSubtitles",value:function(){console.info("Subtitles are not supported on Apple TV")}},{key:"isPlaying",value:function(){return this.localState.playbackStatus===sb.Play||this.localState.playbackStatus===sb.Begin||this.localState.playbackStatus===sb.Load}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackStatus===sb.Stop}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){}},{key:"getVolume",value:function(){return 1}},{key:"getMuted",value:function(){return!1}},{key:"getSubtitles",value:function(){}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&Ob(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(rb);function Cb(e){return Cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cb(e)}function Tb(){Tb=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Cb(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Cb(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function _b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xb(r.key),r)}}function xb(e){var t=function(e){if("object"!=Cb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cb(t)?t:t+""}function Lb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Lb=function(){return!!e})()}function Rb(){return Rb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ib(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rb.apply(null,arguments)}function Ib(e){return Ib=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ib(e)}function Mb(e,t){return Mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mb(e,t)}var Db,Bb,Ab,Fb=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))};!function(e){e.DeviceList="DeviceList",e.DeviceStateChange="DeviceStateChange",e.Paired="Paired",e.Unpaired="Unpaired",e.PlayStatusChange="PlayStatusChange",e.TimeSync="TimeSync"}(Db||(Db={})),function(e){e.Command="Command",e.Pair="Pair",e.Unpair="Unpair",e.RenameDevice="Renamedevice",e.Subscribe="Subscribe",e.Lock="Lock"}(Bb||(Bb={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Reconnecting=2]="Reconnecting",e[e.Disconnected=4]="Disconnected"}(Ab||(Ab={}));var zb=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Ib(t),function(e,t){if(t&&("object"==Cb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Lb()?Reflect.construct(t,n||[],Ib(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken=void 0,n.devices=[],n.heartbeat=new fb,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mb(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.connect=this.connect.bind(this),this.subscribe=this.subscribe.bind(this),this.tryFixConnection=this.tryFixConnection.bind(this),this.invoke=this.invoke.bind(this),this.invokeDebounced=Q(this.invoke,500,!0),this.handleDeviceList=this.handleDeviceList.bind(this),this.handleDeviceStateChange=this.handleDeviceStateChange.bind(this),this.handleDevicePaired=this.handleDevicePaired.bind(this),this.handleDeviceUnpaired=this.handleDeviceUnpaired.bind(this),this.handlePlayStatusChange=this.handlePlayStatusChange.bind(this),this.handleTimeSync=this.handleTimeSync.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.lock=this.lock.bind(this),this.loadVideo=this.loadVideo.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.stop=this.stop.bind(this),this.pair=this.pair.bind(this),this.unpair=this.unpair.bind(this),this.renameDevice=this.renameDevice.bind(this)}},{key:"initialize",value:function(){return Fb(this,void 0,void 0,Tb().mark((function e(){return Tb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,this.connection=(0,qm.OB)(this.accessToken.host,{logging:!1}),this.hubProxy=this.connection.createHubProxy("DeviceUserHub"),this.hubProxy.on(Db.DeviceList,this.handleDeviceList),this.hubProxy.on(Db.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.on(Db.Paired,this.handleDevicePaired),this.hubProxy.on(Db.Unpaired,this.handleDeviceUnpaired),this.hubProxy.on(Db.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.on(Db.TimeSync,this.handleTimeSync),e.next=14,this.connect();case 14:return e.next=16,this.subscribe(this.accessToken.token);case 16:this.heartbeat.schedule(this.tryFixConnection).every(5e3).start(),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Online API"));case 23:case"end":return e.stop()}}),e,this,[[0,19]])})))}},{key:"connect",value:function(){return Fb(this,void 0,void 0,Tb().mark((function e(){var t=this;return Tb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){t.connection.start({jsonp:!1,withCredentials:!1}).done((function(){return e()})).fail((function(){return n(new Error("Could not connect to SignalR hub"))}))})));case 1:case"end":return e.stop()}}),e)})))}},{key:"subscribe",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Subscribe,e);case 2:if(t.sent){t.next=5;break}throw new Error("The subscription request was rejected by Online API");case 5:case"end":return t.stop()}}),t,this)})))}},{key:"tryFixConnection",value:function(){return Fb(this,void 0,void 0,Tb().mark((function e(){return Tb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connection.state===Ab.Disconnected){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,this.heartbeat.stop(),e.next=6,this.options.fetchAccessToken();case 6:return this.accessToken=e.sent,e.next=9,this.connect();case 9:return e.next=11,this.subscribe(this.accessToken.token);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(2),console.warn(e.t0),console.warn("Could not reconnect to Online API");case 17:return e.prev=17,this.heartbeat.start(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[2,13,17,20]])})))}},{key:"invoke",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Fb(this,void 0,void 0,Tb().mark((function t(){var r,i=this;return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(t,r){var o,a;(null===(a=i.hubProxy)||void 0===a?void 0:(o=a).invoke.apply(o,[e].concat(n))).done(t).fail(r)})),t.abrupt("return",Qm.fromPromise(r).timeout(2e4));case 2:case"end":return t.stop()}}),t)})))}},{key:"handleDeviceList",value:function(e){this.devices=e.filter((function(e){return"vivi"!==e.type})).map(t.convertToGenericDevice),this.trigger("deviceschange",ib.void)}},{key:"handleDeviceStateChange",value:function(e){var n=this.devices.findIndex((function(t){return t.id===e.deviceId}));n>=0&&(this.devices[n]=t.convertToGenericDevice(e),this.trigger("deviceschange",ib.void))}},{key:"handleDevicePaired",value:function(e){"vivi"!==e.type&&(this.devices.push(t.convertToGenericDevice(e)),this.trigger("deviceschange",ib.void))}},{key:"handleDeviceUnpaired",value:function(e){this.devices=this.devices.filter((function(t){return t.id!==e})),this.trigger("deviceschange",ib.void)}},{key:"handlePlayStatusChange",value:function(e,t){this.trigger("message",{event:lb.PlaybackStatusChange,deviceId:e,params:{playbackStatus:t.commandType}})}},{key:"handleTimeSync",value:function(e,t){this.trigger("message",{event:lb.PositionChange,deviceId:e,params:{position:t}})}},{key:"dispose",value:function(){var e,n,r;this.hubProxy.off(Db.DeviceList,this.handleDeviceList),this.hubProxy.off(Db.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.off(Db.Paired,this.handleDevicePaired),this.hubProxy.off(Db.Unpaired,this.handleDeviceUnpaired),this.hubProxy.off(Db.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.off(Db.TimeSync,this.handleTimeSync),this.hubProxy.connection.stop(!1,!0),this.heartbeat.stop(),(e=t,n=this,"function"==typeof(r=Rb(Ib(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"canCastToDevice",value:function(e){return e===Gm.AppleTv}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Eb(this,e)}},{key:"lock",value:function(e){var t;return Fb(this,void 0,void 0,Tb().mark((function n(){return Tb().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.invoke(Bb.Lock,e,this.options.userId,null!==(t=this.options.username)&&void 0!==t?t:"");case 2:if(n.sent){n.next=5;break}throw new Error("Could not lock device");case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadVideo",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.options.trackingCode){t.next=2;break}throw new Error("Tracking code must be provided to cast videos");case 2:return t.next=4,this.invoke(Bb.Command,{DeviceId:e,CommandType:sb.Play,Data:this.options.trackingCode});case 4:case"end":return t.stop()}}),t,this)})))}},{key:"play",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Command,{DeviceId:e,CommandType:sb.Play});case 2:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Command,{DeviceId:e,CommandType:sb.Pause});case 2:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){this.invokeDebounced(Bb.Command,{DeviceId:e,CommandType:sb.Play,Params:"1,".concat(Math.trunc(t))})}},{key:"stop",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Command,{DeviceId:e,CommandType:sb.Stop});case 2:case"end":return t.stop()}}),t,this)})))}},{key:"pair",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){var n;return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Pair,e);case 2:if(n=t.sent){t.next=5;break}throw new Error("Could not pair device");case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"unpair",value:function(e){return Fb(this,void 0,void 0,Tb().mark((function t(){return Tb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(Bb.Unpair,e);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"renameDevice",value:function(e){var t=e.deviceId,n=e.deviceName;return Fb(this,void 0,void 0,Tb().mark((function e(){return Tb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(Bb.RenameDevice,t,n);case 2:if(e.sent){e.next=5;break}throw new Error("Could not rename device");case 5:case"end":return e.stop()}}),e,this)})))}}],i=[{key:"convertToGenericDeviceStatus",value:function(e){switch(e){case cb.Online:return Um.Available;case cb.Locked:return Um.Busy;case cb.Suspended:case cb.Offline:return Um.Offline}}},{key:"convertToGenericDevice",value:function(e){return{id:e.deviceId,name:e.name,type:Gm.AppleTv,status:t.convertToGenericDeviceStatus(e.status)}}}],r&&_b(n.prototype,r),i&&_b(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(rb);function Zb(e){return Zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zb(e)}function Vb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gb(r.key),r)}}function Gb(e){var t=function(e){if("object"!=Zb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zb(t)?t:t+""}var Ub={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Kb=function(){return e=function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ub;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions(),this.url=t,this.options=Object.assign(Object.assign({},Ub),r),this.webSocket=this.connect(),this.heartbeat=(new fb).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)},(t=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&Vb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function qb(e){return qb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qb(e)}function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wb(r.key),r)}}function Wb(e){var t=function(e){if("object"!=qb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qb(t)?t:t+""}var Yb,Qb=function(){return e=function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=pb(this,2e3),hb(this)},(t=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&Hb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Jb(e){return Jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jb(e)}function Xb(){Xb=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Jb(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Jb(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function $b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eg(r.key),r)}}function eg(e){var t=function(e){if("object"!=Jb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jb(t)?t:t+""}function tg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tg=function(){return!!e})()}function ng(){return ng="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=rg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ng.apply(null,arguments)}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rg(e)}function ig(e,t){return ig=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ig(e,t)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished",e.Subtitles="subtitles"}(Yb||(Yb={}));var og=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},ag=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=rg(t),function(e,t){if(t&&("object"==Jb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tg()?Reflect.construct(t,n||[],rg(e).constructor):t.apply(e,n))}(this,t)).client=e,r.localState=new Qb(n.title,n.device),r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ig(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){var e,n,r;this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(e){return console.error(e)})),(e=t,n=this,"function"==typeof(r=ng(rg(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"handleClientConnected",value:function(){return og(this,void 0,void 0,Xb().mark((function e(){return Xb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case Yb.Update:this.handleUpdateMessage(t,n);break;case Yb.NewChapter:this.handleNewChapterMessage(t,n);break;case Yb.Volume:this.handleVolumeMessage(t,n);break;case Yb.Playing:this.handlePlayingMessage(t);break;case Yb.Paused:this.handlePausedMessage(t);break;case Yb.Finished:this.handleFinishedMessage(t);break;case Yb.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ib.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ib.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ib.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ib.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ib.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ib.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ib.void))}},{key:"handleNewChapterMessage",value:function(e,t){var n,r=(null!==(n=t.queue)&&void 0!==n?n:[]).find((function(t){return t.url===e.videoSource}));if(!r)return console.info("The device is no longer playing the source we loaded - disposing the session"),void this.dispose();e.subtitleSource!==r.suburl&&(e.subtitleSource=r.suburl,this.trigger("subtitleschange",ib.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return og(this,void 0,void 0,Xb().mark((function n(){var r,i;return Xb().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",ib.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.next=22;break;case 18:n.prev=18,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 22:case"end":return n.stop()}}),n,this,[[2,18]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ib.void))}},{key:"pause",value:function(){this.localState.ready&&!1!==this.localState.playing&&(this.localState.playing=!1,this.client.pause(this.getDevice().id),this.trigger("playingchange",ib.void))}},{key:"seek",value:function(e){this.localState.ready&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",ib.void))}},{key:"setVolume",value:function(e){this.localState.ready&&this.localState.volume!==e&&(this.localState.volume=e,this.client.setVolume(this.getDevice().id,e),this.trigger("volumechange",ib.void))}},{key:"setMuted",value:function(e){this.localState.ready&&this.localState.mute!==e&&(this.localState.mute=e,this.client.setMuted(this.getDevice().id,e),this.trigger("volumechange",ib.void))}},{key:"setSubtitles",value:function(e){return og(this,void 0,void 0,Xb().mark((function t(){var n;return Xb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",ib.void));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}],r&&$b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(rb);function ug(e){return ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ug(e)}function cg(){cg=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),u=new _(r||[]);return i(a,"_invoke",{value:j(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(x([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=g.prototype=m.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ug(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var i=p;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(ug(t)+" is not iterable")}return b.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},N(P.prototype),l(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}function lg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sg(r.key),r)}}function sg(e){var t=function(e){if("object"!=ug(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ug(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ug(t)?t:t+""}function fg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fg=function(){return!!e})()}function pg(){return pg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pg.apply(null,arguments)}function hg(e){return hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hg(e)}function yg(e,t){return yg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yg(e,t)}var vg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},dg=1e4,mg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=hg(t),function(e,t){if(t&&("object"==ug(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fg()?Reflect.construct(t,n||[],hg(e).constructor):t.apply(e,n))}(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new fb,n.bindFunctions(),n.initialize(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=Q(this.sendMessage,500,!0),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.authenticateWithVivi=this.authenticateWithVivi.bind(this),this.getRoomList=this.getRoomList.bind(this),this.joinRoom=this.joinRoom.bind(this),this.query=this.query.bind(this),this.loadQueue=this.loadQueue.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.stop=this.stop.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.setMuted=this.setMuted.bind(this),this.setSubtitles=this.setSubtitles.bind(this)}},{key:"initialize",value:function(){var e=this;this.webSocket=new Kb(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return vg(e,void 0,void 0,cg().mark((function e(){return cg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",ib.void),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Vivi"));case 14:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return vg(e,void 0,void 0,cg().mark((function e(){var n,r,i,o;return cg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(n=e.sent,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:i=new Set(n.map((function(e){var t;return null!==(t=e.organisation)&&void 0!==t?t:""}))).size,o=new Set(n.map((function(e){var t;return null!==(t=e.location)&&void 0!==t?t:""}))).size,this.devices=n.map((function(e){return{id:e.id,name:e.name,schoolName:i>1?e.organisation:"",description:o>1?e.location:"",type:Gm.Vivi,status:Um.Available}})),this.devicesFingerprint=r,this.trigger("deviceschange",ib.void),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.warn(e.t0);case 17:case"end":return e.stop()}}),e,this,[[0,14]])})))})).trigger().start()}},{key:"dispose",value:function(){var e,n,r,i;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),(n=t,r=this,"function"==typeof(i=pg(hg(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}},{key:"canCastToDevice",value:function(e){return e===Gm.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new ag(this,e)}},{key:"authenticateWithVivi",value:function(){return vg(this,void 0,void 0,cg().mark((function e(){return cg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(dg).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return vg(this,void 0,void 0,cg().mark((function e(){var t;return cg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(dg).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return vg(this,void 0,void 0,cg().mark((function t(){return cg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,this.one("message",(function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0})).timeout(dg).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return vg(this,void 0,void 0,cg().mark((function n(){var r;return cg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.next=4,this.one("message",(function(e){return e.message.ack_id===r})).timeout(dg).catch((function(){throw new Error("Failed to fetch query")}));case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return vg(this,void 0,void 0,cg().mark((function e(){return cg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:n,message:{type:"message_with_ack",ack_id:t.createAckId(),name:"queue_load",payload:{urls:[{title:r,url:i,suburl:o}]}}}),e.next=3,this.one("message",(function(e){var t;return e.source===n&&"ready"===(null===(t=e.message.payload)||void 0===t?void 0:t.event)})).timeout(dg).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return vg(this,void 0,void 0,cg().mark((function t(){return cg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return vg(this,void 0,void 0,cg().mark((function t(){return cg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return vg(this,void 0,void 0,cg().mark((function t(){return cg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return vg(this,void 0,void 0,cg().mark((function n(){return cg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return vg(this,void 0,void 0,cg().mark((function n(){return cg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return vg(this,void 0,void 0,cg().mark((function n(){return cg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,this.one("message",(function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,n){return vg(this,void 0,void 0,cg().mark((function r(){var i;return cg().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:i,name:"set_subtitles",payload:{subtitles:n}}}),r.next=4,this.one("message",(function(t){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(dg).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return r.stop()}}),r,this)})))}}],i=[{key:"createAckId",value:function(){return xm()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],r&&lg(n.prototype,r),i&&lg(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(rb);function bg(e){return bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bg(e)}function gg(e){return function(e){if(Array.isArray(e))return wg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return wg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wg(e,t):void 0}}(e)||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 wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Og(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sg(r.key),r)}}function Sg(e){var t=function(e){if("object"!=bg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bg(t)?t:t+""}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kg=function(){return!!e})()}function Ng(){return Ng="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ng.apply(null,arguments)}function Pg(e){return Pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pg(e)}function jg(e,t){return jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jg(e,t)}var Eg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Pg(t),function(e,t){if(t&&("object"==bg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kg()?Reflect.construct(t,n||[],Pg(e).constructor):t.apply(e,n))}(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(gg(e),gg(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e,n,r,i;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],(n=t,r=this,"function"==typeof(i=Ng(Pg(1&3?n.prototype:n),"dispose",r))?function(e){return i.apply(r,e)}:i)([])}}],i=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new t(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],r&&Og(n.prototype,r),i&&Og(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(rb);function Cg(e){return Cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cg(e)}function Tg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_g(r.key),r)}}function _g(e){var t=function(e){if("object"!=Cg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cg(t)?t:t+""}function xg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xg=function(){return!!e})()}function Lg(e,t,n,r){var i=Rg(Ig(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Rg(){return Rg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ig(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rg.apply(null,arguments)}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ig(e)}function Mg(e,t){return Mg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mg(e,t)}Eg.instances={};var Dg=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ig(t),function(e,t){if(t&&("object"==Cg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xg()?Reflect.construct(t,n||[],Ig(e).constructor):t.apply(e,n))}(this,t,[e,n])).isVisible=r.isVisible.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mg(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e,n,r=Lg(t,"createEl",this,3)(["li",{className:"vjs-menu-item cv-device-menu-item"}]),o=i.Z.dom.createEl("div",{className:"cv-device-menu-item-body",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <div>\n <span class="vjs-menu-item-text">').concat(this.options_.label,'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text">').concat(null!==(e=this.options_.schoolName)&&void 0!==e?e:"",'</span>\n <span class="vjs-menu-item-text cv-device-truncated-text cv-device-description">').concat(null!==(n=this.options_.description)&&void 0!==n?n:"","</span>\n </div>\n ")});return r.replaceChildren(o),r}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){Lg(t,"show",this,3)([])}},{key:"hide",value:function(){Lg(t,"hide",this,3)([])}},{key:"isVisible",value:function(){return!Lg(t,"hasClass",this,3)(["vjs-hidden"])}}])&&Tg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function Bg(e){return Bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bg(e)}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fg(r.key),r)}}function Fg(e){var t=function(e){if("object"!=Bg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bg(t)?t:t+""}function zg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(zg=function(){return!!e})()}function Zg(e){return Zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zg(e)}function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vg(e,t)}var Gg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Zg(t),function(e,t){if(t&&("object"==Bg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zg()?Reflect.construct(t,n||[],Zg(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=Mu.apply(this),t=this.contentEl_;return this.contentWrapper=i.Z.dom.createEl("div",{className:"vjs-menu-content"}),e.className="vjs-menu cv-devices-menu",t.className="cv-devices-menu-item-list",e.removeChild(t),e.appendChild(this.contentWrapper),this.contentWrapper.appendChild(t),this.simpleBar=new Ru.Z(t,{autoHide:!1}),e}},{key:"addCta",value:function(e){this.ctaElement?console.warn("CTA has already been added to the menu - this is a no-op"):(this.ctaElement=e.el(),this.contentWrapper.prepend(this.ctaElement),this.el().classList.add("has-cta"))}},{key:"removeCta",value:function(){this.ctaElement&&(this.contentWrapper.removeChild(this.ctaElement),this.el().classList.remove("has-cta"))}}])&&Ag(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Menu"));function Ug(e){var t=e.inactiveIntegrations,n=e.canUserManageIntegrations,i=e.player,o=e.onDismiss,a=e.onInstall,u=e.onLearnMore,c=e.onContactSupport;if(0===t.length)return r.createElement(r.Fragment,null);var l,s=function(e){return i.localize(e)},f=function(e){return-1!==t.indexOf(e)};return l=f(Gm.AppleTv)&&f(Gm.Vivi)?"vivi_and_apple_tv":f(Gm.Vivi)?"vivi":"apple_tv",r.createElement("div",{className:"cv-devices-cta",tabIndex:-1},r.createElement(Kg,{context:l,localize:s,onDismiss:function(){return o(l)}}),r.createElement(qg,{context:l}),r.createElement(Hg,{context:l,canUserManageIntegrations:n,localize:s,onContactSupport:function(){return c(l)},onInstall:function(){return a(l)},onLearnMore:function(){return u(l)}}))}function Kg(e){var t=e.context,n=e.localize,i=e.onDismiss;return r.createElement("div",{className:"cv-devices-cta-header"},r.createElement("span",{className:"cv-devices-badge"},n("New")),r.createElement("span",{className:"cv-devices-title"},"vivi_and_apple_tv"===t&&n("Cast to Vivi and Apple TV"),"vivi"===t&&n("Cast to Vivi"),"apple_tv"===t&&n("Cast to Apple TV")),r.createElement("span",{className:"cv-devices-close",onClick:i},r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"white",d:"M11.9588 10.6413L16.3612 6.34478C16.7361 5.97191 17.3439 5.97191 17.7188 6.34478C18.0937 6.71764 18.0937 7.32218 17.7188 7.69505L13.3165 11.9916L17.7188 16.3701C18.0937 16.7429 18.0937 17.3475 17.7188 17.7203C17.3439 18.0932 16.7361 18.0932 16.3612 17.7203L11.9588 13.3419L7.63882 17.7203C7.26392 18.0932 6.65608 18.0932 6.28118 17.7203C5.90627 17.3475 5.90627 16.7429 6.28118 16.3701L10.6012 11.9916L6.28118 7.62993C5.90627 7.25706 5.90627 6.65252 6.28118 6.27965C6.65608 5.90678 7.26392 5.90678 7.63882 6.27965L11.9588 10.6413Z"}))))}function qg(e){var t=e.context,n="vivi_and_apple_tv"===t?"bg-vivi-and-apple":"vivi"===t?"bg-vivi":"bg-apple";return r.createElement("div",{className:"cv-devices-cta-body ".concat(n)},("vivi_and_apple_tv"===t||"apple_tv"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon apple"})),("vivi_and_apple_tv"===t||"vivi"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon vivi"})))}function Hg(e){var t=e.context,n=e.canUserManageIntegrations,i=e.localize,o=e.onInstall,a=e.onLearnMore,u=e.onContactSupport;return n?r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Discover our new device integrations to make presenting in the classroom easy!"),"vivi"===t&&i("Discover our new Vivi integration."),"apple_tv"===t&&i("Discover our new Apple TV integration.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:o},i("Click here to install"))):r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Cast to Vivi and Apple TV is now available! Please contact "),"vivi"===t&&i("Cast to Vivi is now available! Please contact "),"apple_tv"===t&&i("Cast to Apple TV is now available! Please contact ")),r.createElement("span",{className:"cv-devices-link",onClick:u},"ClickView Support"),r.createElement("span",null,"vivi_and_apple_tv"===t&&i(" or your administrator to set up Apple TV and Vivi."),"vivi"===t&&i(" or your administrator to set up Vivi."),"apple_tv"===t&&i(" or your administrator to set up Apple TV.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:a},"Learn more"))}function Wg(e){return Wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wg(e)}function Yg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qg(r.key),r)}}function Qg(e){var t=function(e){if("object"!=Wg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wg(t)?t:t+""}function Jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jg=function(){return!!e})()}function Xg(e,t,n,r){var i=$g(ew(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function $g(){return $g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ew(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$g.apply(null,arguments)}function ew(e){return ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ew(e)}function tw(e,t){return tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tw(e,t)}i.Z.registerComponent("DevicesMenu",Gg),i.Z.registerComponent("DevicesCta",Zf((function(e,t){return r.createElement(Ug,Object.assign({player:e},t))}),{properties:{className:"cv-devices-cta-wrapper"}}));var nw=i.Z.getComponent("DevicesCta"),rw=i.Z.getComponent("MenuButton"),iw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ew(t),function(e,t){if(t&&("object"==Wg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jg()?Reflect.construct(t,n||[],ew(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-devices-menu-button",r.searchText="",r.devices=[],r.castSession=void 0,r.bindFunctions(),r.bindEventListeners(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.showNotificationBadge=this.showNotificationBadge.bind(this),this.hideNotificationBadge=this.hideNotificationBadge.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){var r;t.removeEventListener("blur",n),null===(r=e.cta)||void 0===r||r.dispose()}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=rw.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Xg(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createMenu",value:function(){var e=this,t=new Gg(this.player_,{menuButton:this});if(!this.options_.ctaOptions.hasBeenDismissed&&this.options_.ctaOptions.inactiveIntegrations.length>0){var n=this.options_.ctaOptions,r=n.onDismiss,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,["onDismiss"]);this.cta=new nw(this.player(),Object.assign(Object.assign({},i),{onDismiss:function(n){e.hideNotificationBadge(),t.removeCta(),r(n)}})),this.showNotificationBadge(),t.addCta(this.cta)}return this.createItems().forEach((function(e){return t.addItem(e)})),t}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new j(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new se(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new fe(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;Xg(t,"pressButton",this,3)([]),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof Dg}))}},{key:"showNotificationBadge",value:function(){this.addClass("notification-badge")}},{key:"hideNotificationBadge",value:function(){this.removeClass("notification-badge")}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){t.menu.removeChild(e),e.dispose()}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort((function(e,t){var n,r,i,o,a="".concat(e.type).concat(null!==(n=e.schoolName)&&void 0!==n?n:"").concat(null!==(r=e.description)&&void 0!==r?r:"").concat(e.name),u="".concat(t.type).concat(null!==(i=t.schoolName)&&void 0!==i?i:"").concat(null!==(o=t.description)&&void 0!==o?o:"").concat(t.name);return a.localeCompare(u)})).forEach((function(e){var n=new Dg(t.player(),{id:e.id,label:e.name,schoolName:e.schoolName,description:e.description,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===Um.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o,a,u=e.devices.find((function(e){return e.id===t.options_.id}));if(u){var c=u.status===Um.Available,l=u.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id),s=!n||-1!=="".concat(u.name," ").concat(null!==(o=u.schoolName)&&void 0!==o?o:""," ").concat(null!==(a=u.description)&&void 0!==a?a:"").trim().toLowerCase().indexOf(r);c?t.enable():t.disable(),s?t.show():t.hide(),l?t.selected(!0):t.selected(!1)}}))}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter((function(e){return e.isVisible()})).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){Xg(t,"handleClick",this,3)([null]),this.options_.onClick()}}],r&&Yg(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(rw);function ow(e){return ow="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ow(e)}function aw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uw(r.key),r)}}function uw(e){var t=function(e){if("object"!=ow(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ow(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ow(t)?t:t+""}function cw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cw=function(){return!!e})()}function lw(){return lw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=sw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},lw.apply(null,arguments)}function sw(e){return sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sw(e)}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fw(e,t)}iw.prototype.controlText_="Devices",i.Z.registerComponent("DevicesButton",iw);var pw=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=sw(t),function(e,t){if(t&&("object"==ow(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cw()?Reflect.construct(t,n||[],sw(e).constructor):t.apply(e,n))}(this,t,[null,e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fw(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=lw(sw(1&3?e.prototype:e),"createEl",n))?function(e){return r.apply(n,e)}:r)(["div",{className:"cv-devices-tech"}]);var e,n,r}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:Gm.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}],r&&aw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("Component"));function hw(e){return hw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hw(e)}function yw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vw(r.key),r)}}function vw(e){var t=function(e){if("object"!=hw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hw(t)?t:t+""}function dw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dw=function(){return!!e})()}function mw(e,t,n,r){var i=bw(gw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function bw(){return bw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=gw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},bw.apply(null,arguments)}function gw(e){return gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gw(e)}function ww(e,t){return ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ww(e,t)}var Ow=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=gw(t),function(e,t){if(t&&("object"==hw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dw()?Reflect.construct(t,n||[],gw(e).constructor):t.apply(e,n))}(this,t,[e,n])).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.featuresMuteControl=!0,r.featuresSourceset=!1,r.videojsPlayer=(0,i.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready((function(){r.setSource(r.options_.source)})),r.triggerReady(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ww(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return Y.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){Y.forEachTrack(this.videojsPlayer.player_,(function(t){t.src===e?t.mode="showing":t.mode="hidden"}))}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),mw(t,"cleanupAutoTextTracks",this,3)([]),mw(t,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new pw({onStopCasting:function(){var t;null===(t=e.getCastSession())||void 0===t||t.dispose()}}),this.ui.el()}},{key:"setSource",value:function(e){var t=this.getCastSession();if(t){this.showUI(t.getDevice()),this.trigger("loadstart");var n=this.getSelectedTextTrack();t.loadSource(e.src,null==n?void 0:n.src)}}},{key:"addRemoteTextTrack",value:function(e){return mw(t,"addRemoteTextTrack",this,3)([e,!0])}},{key:"getCastSession",value:function(){var e;return Eg.getOrCreateInstance(null!==(e=this.options_.instanceId)&&void 0!==e?e:"").getCastSession()}},{key:"play",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.pause()}},{key:"paused",value:function(){var e;return!1===(null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaying())}},{key:"ended",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaybackFinished())&&void 0!==t&&t}},{key:"setCurrentTime",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.seek(null!=e?e:0)}},{key:"currentTime",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}},{key:"duration",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getDuration())&&void 0!==t?t:this.videojsPlayer.duration()}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return i.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}],o=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!Eg.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return Eg.isActive()}}],r&&yw(n.prototype,r),o&&yw(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(i.Z.getComponent("Tech"));function Sw(e){return Sw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sw(e)}function kw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nw(r.key),r)}}function Nw(e){var t=function(e){if("object"!=Sw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sw(t)?t:t+""}function Pw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pw=function(){return!!e})()}function jw(){return jw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ew(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jw.apply(null,arguments)}function Ew(e){return Ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ew(e)}function Cw(e,t){return Cw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cw(e,t)}i.Z.registerTech("devices",Ow);var Tw=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Ew(t),function(e,t){if(t&&("object"==Sw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pw()?Reflect.construct(t,n||[],Ew(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,r.instanceId=null!==(o=null===(i=r.player.options_.devices)||void 0===i?void 0:i.instanceId)&&void 0!==o?o:"",r.bindFunctions(),r.initialize(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cw(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=null==t?void 0:t.children().findIndex((function(e){return"OpenExternallyButton"===e.name()})),i=Math.max(n,r)+1,o=this.getSessionManager();if(t&&n&&-1!==n&&o){o.on("deviceschange",this.onDevicesChanged),o.on("castsessionchange",this.onCastSessionChanged),o.on("error",this.onDevicesError);var a=this.options.ctaOptions,u=this.options.vivi,c=[];this.options.appleTv.enabled||c.push(Gm.AppleTv),u.enabled&&u.accountConnected||c.push(Gm.Vivi);var l={onClick:function(){e.addViviClient(o),e.addAppleTvClient(o)},onDeviceMenuItemClick:function(t,n){var r;o.startCastSession({device:n,title:e.options.title}),null===(r=e.options.analyticsService)||void 0===r||r.logUserAction(n,{actionType:it.Vw.Select,workflowPhase:it.eu.Complete,descriptor:it.UX.ChangeDevice,entity:it.py.Device,eventVersion:it.eq.V3})},ctaOptions:Object.assign(Object.assign({},a),{inactiveIntegrations:c})};this.devicesButton=t.addChild("DevicesButton",l,i)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(Gm.AppleTv)),this.player.removeClass("cv-device-".concat(Gm.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.vivi.enabled&&this.options.vivi.accountConnected&&this.options.vivi.apiUrl&&!e.hasInstanceOfClient(mg)){var t=new mg({url:this.options.vivi.apiUrl,fetchAccessToken:this.options.vivi.fetchAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTv.enabled&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(zb)){var t=new zb({fetchAccessToken:this.options.appleTv.fetchAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",(function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return Eg.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e,n,r,i=this.getSessionManager();i&&(i.off("deviceschange",this.onDevicesChanged),i.off("castsessionchange",this.onCastSessionChanged),i.off("error",this.onDevicesError),Eg.disposeAndRemoveInstance(i),(e=t,n=this,"function"==typeof(r=jw(Ew(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([]))}}],r&&kw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));function _w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xw(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(n,i)||function(e,t){if(e){if("string"==typeof e)return _w(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_w(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],c=a[1];function l(){var t=e.player.duration()-e.player.currentTime();c(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",l),function(){e.player.off("timeupdate",l)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var s=Math.ceil(u),f=1===s?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",s," ",f,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function Lw(e){return Lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lw(e)}function Rw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Iw(r.key),r)}}function Iw(e){var t=function(e){if("object"!=Lw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lw(t)?t:t+""}function Mw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mw=function(){return!!e})()}function Dw(){return Dw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Bw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Dw.apply(null,arguments)}function Bw(e){return Bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bw(e)}function Aw(e,t){return Aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aw(e,t)}i.Z.registerPlugin("devicesPlugin",Tw),i.Z.registerComponent("UpNext",Zf((function(e,t){return r.createElement(xw,Object.assign({player:e},t))})));var Fw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Bw(t),function(e,t){if(t&&("object"==Lw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mw()?Reflect.construct(t,n||[],Bw(e).constructor):t.apply(e,n))}(this,t,[e,n])).playNext=e.nextVideoPlugin().getShouldPlayNext(),r.toggle(r.playNext),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aw(e,t)}(t,e),n=t,r=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,i.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,i.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var o,a,u,c=(o=t,a=this,"function"==typeof(u=Dw(Bw(1&3?o.prototype:o),"createEl",a))?function(e){return u.apply(a,e)}:u)([e,{className:"vjs-menu-item cv-cog-menu-item cv-play-next-toggle",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},r]);return c.children[1].appendChild(this.toggleEl),c}}],r&&Rw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function zw(e){return zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zw(e)}function Zw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vw(r.key),r)}}function Vw(e){var t=function(e){if("object"!=zw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zw(t)?t:t+""}function Gw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gw=function(){return!!e})()}function Uw(){return Uw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Uw.apply(null,arguments)}function Kw(e){return Kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kw(e)}function qw(e,t){return qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qw(e,t)}i.Z.registerComponent("NextVideoMenuItem",Fw);var Hw="cv-persisttest",Ww="cv-play-next-video",Yw=i.Z.getPlugin("plugin"),Qw=(i.Z.getComponent("MenuItem"),i.Z.getComponent("NextVideoMenuItem")),Jw=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Kw(t),function(e,t){if(t&&("object"==zw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gw()?Reflect.construct(t,n||[],Kw(e).constructor):t.apply(e,n))}(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(n),n.getShouldPlayNext=n.getShouldPlayNext.bind(n),n.getChapterTrack=n.getChapterTrack.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(Ww);n.shouldPlayNextVideo="true"===r}return e.ready((function(){n.initialize()})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qw(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return Y.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:Qw,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(Ww,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){var e,n,r;this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),(e=t,n=this,"function"==typeof(r=Uw(Kw(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(Hw,"persistPlayNext"),window.localStorage.removeItem(Hw),!0}catch(e){return!1}}}],r&&Zw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Yw);i.Z.registerPlugin("nextVideoPlugin",Jw);var Xw=n(39202),$w=n(28825),eO=n(86073),tO=n(1164),nO=n(45778),rO=n(87611);var iO={width:200,resizeType:cv.Nq.Cover};function oO(e){var t;return nO.G.isResource(e)?e.metadata.type===tO.L.Pdf||(null===(t=e.pdf)||void 0===t?void 0:t.url)?cv.__.Pdf:cv.__.Thumbnails:cv.__.Link}function aO(e){var t,n,i,o=null,a=0;nO.G.isResource(e.resource)&&(o=e.resource.metadata,a=null!==(i=null===(n=null===(t=e.resource.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var u=function(e,t){var n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:iO,a=oO(t);if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return uv.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},o));var u=eO._.safeUrlConcat(e,"/v1/previews");return nO.G.isResource(t)?a===cv.__.Pdf?t.metadata.type===tO.L.Pdf?uv.j.createResourceImage(u,t.url,Object.assign({},o)):uv.j.createResourceImage(u,null===(i=t.pdf)||void 0===i?void 0:i.url,Object.assign({},o)):t.metadata.type!==tO.L.Zip?uv.j.createUrl(t.url,{size:cv.h2.Medium,resizeType:cv.Nq.Cover}):"/images/zip-resource.png":uv.j.createResourceImage(u,t.url,Object.assign({},o))}(e.imageCdnUrl,e.resource,e.dynamicRatioImageOptions);return r.createElement(rO.Z,{data:u,imageType:oO(e.resource),imageStyle:{transform:"rotate(".concat(a,"deg)")},alt:e.resource.name,errorFallbackImageSrc:e.imageErrorFallbackUrl,errorFallbackImageClassName:"Xy4zX",imageClassName:(null==o?void 0:o.type)===tO.L.Image?"".concat("z4O5p"," ").concat("FFgf3"):"",preload:e.preloadImage,preventLoad:!e.preloadImage})}var uO=n(26117),cO=n(52999),lO=n(71063),sO=n(4594);function fO(e){var t,n,i,o,a=null;"metadata"in e.data&&(a=e.data.metadata);var u=nO.G.isType(e.data,sO.E.Resource);return r.createElement(r.Fragment,null,r.createElement("div",{className:"OnJDH"},r.createElement("div",{className:"CIFy7"},r.createElement("div",{className:function(t){var n,r="\n d-flex flex-column align-items-center justify-content-end rounded-3 h-100\n position-relative ".concat(function(e){switch(e){case"atom-guide":return"X39wU";case"student-activity":return"X9pMl";case"teacher-pack":return"_tdVE";case"additional-materials":return"qRVUo";default:return"_18JaV"}}(t)," ").concat("oUZPD");return(null===(n=e.theme)||void 0===n?void 0:n.containerClass)?r+=" ".concat(e.theme.containerClass):r+=" pt-3 px-3",e.applyHoverState&&(r+=" ".concat("xRYhX")),r}(null==a?void 0:a.resourceType)},"above"===e.titlePosition&&r.createElement(ef.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat("g5NWS")},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"\n ".concat(null!==(n=null===(t=e.theme)||void 0===t?void 0:t.thumbnailContainerClass)&&void 0!==n?n:""," w-75 overflow-hidden \n ").concat("EDiGi"," ").concat("above"===e.titlePosition?"e9ejn":""," \n ").concat("I9E5O","\n ")},r.createElement(aO,{resource:e.data,imageCdnUrl:e.imageCdnUrl,imageErrorFallbackUrl:e.imageErrorFallbackUrl,preloadImage:e.preloadImage})),u&&e.onClickDownload&&"normal"===e.actionBehaviour&&r.createElement("div",{className:"jzGAm"},r.createElement(Xs.L,{onClick:function(t){return e.onClickDownload(t,e.data)},className:"".concat("fbb_e"," d-flex align-items-center justify-content-center")},r.createElement($s.x,{svgName:tf.vn.Download}))),!e.hideTypeBadge&&u&&r.createElement(cO.y,{typeId:sO.E.Resource})))),"below"===e.titlePosition&&r.createElement("div",{className:"mt-1 ".concat("Cpjs3")},nO.G.isType(e.data,sO.E.Resource)&&!!(null===(o=null===(i=e.data)||void 0===i?void 0:i.metadata)||void 0===o?void 0:o.resourceType)&&r.createElement(uO.m,null,function(e){switch(e){case"additional-materials":return"Additional Materials";case"atom-guide":return"ATOM Guide";case"teacher-pack":return"Teacher Pack";case"student-activity":return"Student Activity";default:return"N/A"}}(e.data.metadata.resourceType)),r.createElement("h3",{className:"h6 clamp-2"},e.data.name)))}function pO(e){return pO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pO(e)}function hO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yO(r.key),r)}}function yO(e){var t=function(e){if("object"!=pO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pO(t)?t:t+""}function vO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vO=function(){return!!e})()}function dO(){return dO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=mO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dO.apply(null,arguments)}function mO(e){return mO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mO(e)}function bO(e,t){return bO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bO(e,t)}function gO(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(fO,{data:e.resource,imageCdnUrl:e.imageCdnUrl,titlePosition:"above",hideTypeBadge:!0}))}fO.defaultProps={preloadImage:!0,actionBehaviour:"normal"},r.memo((function(e){var t,n,i,o,a=(t=e.data,n=e.actionBehaviour,o=(0,wf.k)(),"public"===n||!o.xs&&!o.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===tO.L.Image||(t.metadata.type===tO.L.Pdf?!!t.url:!!(null===(i=t.pdf)||void 0===i?void 0:i.url)))),u=Object.assign(Object.assign({},e.analyticsData),e.data),c=Object.assign(Object.assign({},e.analyticsOptions),{actionType:it.Vw.Click,entity:e.data.typeId===sO.E.Resource?it.py.Resource:it.py.Link});function l(){Js.k.logUserAction(u,c)}var s,f=Object.assign(Object.assign({},e),{applyHoverState:a||!!e.data.url});return r.createElement("div",{className:"px-1 flex-shrink-0 ".concat("tqUFn"," ").concat("play-page"===e.location?"V2RwX":"o7j7p"," ").concat(lO.M.RESOURCE_ITEM_SELECTOR)},(s="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:s,onClick:l},r.createElement(fO,Object.assign({},f))):a?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(s," cursor-pointer d-inline"),onClick:function(){l(),Xw.C$.trigger(e.getAppLink(e.data))}},r.createElement(fO,Object.assign({},f))):r.createElement($w.F,{appLink:e.getAppLink(e.data),className:s,analyticsData:u,analyticsOptions:c},r.createElement(fO,Object.assign({},f))):e.data.url?r.createElement("a",{href:e.data.url,className:s,onClick:l},r.createElement(fO,Object.assign({},f))):r.createElement("div",{className:s},r.createElement(fO,Object.assign({},f)))))}));var wO=Zf((function(e,t){return r.createElement(gO,Object.assign({},t))})),OO=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=mO(t),function(e,t){if(t&&("object"==pO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vO()?Reflect.construct(t,n||[],mO(e).constructor):t.apply(e,n))}(this,t,[e,n]);var i=new wO(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bO(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(e){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return(n=t,r=this,"function"==typeof(i=dO(mO(1&3?n.prototype:n),"createEl",r))?function(e){return i.apply(r,e)}:i)([e,Object.assign(Object.assign({},o),{className:"".concat(o.className," cv-resource-menu-item")}),a])}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}],r&&hO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuItem"));function SO(e){return SO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SO(e)}function kO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NO(r.key),r)}}function NO(e){var t=function(e){if("object"!=SO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SO(t)?t:t+""}function PO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(PO=function(){return!!e})()}function jO(e,t,n,r){var i=EO(CO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function EO(){return EO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=CO(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},EO.apply(null,arguments)}function CO(e){return CO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CO(e)}function TO(e,t){return TO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TO(e,t)}var _O=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=CO(t),function(e,t){if(t&&("object"==SO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,PO()?Reflect.construct(t,n||[],CO(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TO(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-resources-button-wrapper ".concat(jO(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(jO(t,"buildCSSClass",this,3)([]))}},{key:"update",value:function(){jO(t,"update",this,3)([])}},{key:"createItems",value:function(){var e=this,t=[];return t.push(new j(this.player_,{label:"Resources"})),this.options_.resources.forEach((function(n){var r=new OO(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)},label:n.name});t.push(r)})),t}},{key:"downloadResource",value:function(e){"link"!==e.type?this.getDownloadIframe().src=e.url:Xw.Ab.PageLoad(e.url,!0)}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=i.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",i.Z.dom.appendContent(i.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){jO(t,"handleClick",this,3)([null])}}])&&kO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getComponent("MenuButton"));function xO(e){return xO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xO(e)}function LO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RO(r.key),r)}}function RO(e){var t=function(e){if("object"!=xO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xO(t)?t:t+""}function IO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(IO=function(){return!!e})()}function MO(e){return MO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},MO(e)}function DO(e,t){return DO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DO(e,t)}_O.prototype.controlText_="Resources",i.Z.registerComponent("ResourcesButton",_O);var BO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=MO(t),function(e,t){if(t&&("object"==xO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,IO()?Reflect.construct(t,n||[],MO(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DO(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-4)}}}])&&LO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Z.getPlugin("plugin"));i.Z.registerPlugin("resourcesPlugin",BO);var AO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function FO(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,u=AO(e,["className","playerApi","onReady","onDispose"]),c=r.useRef(null);return r.useEffect((function(){if(c){var e=new Km(c.current,Object.assign(Object.assign({},u),{playerApi:i}));return o&&e.ready((function(){o(function(e){return new Proxy(e,{get:function(e,t,n){if("off"===t||!e.isDisposed())return Reflect.get(e,t,n)}})}(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}},58421:()=>{}}]);
|