@clickview/reports 0.4.0 → 0.4.1-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 +3 -3
- package/dist/css/111-reports-884dce9d68.chunk.css +44 -0
- package/dist/css/133-reports-ab0611a823.chunk.css +2 -0
- package/dist/css/173-reports-e5b753449e.chunk.css +48 -0
- package/dist/css/178-reports-e85969c726.chunk.css +2 -0
- package/dist/css/353-reports-65761a5d8d.chunk.css +30 -0
- package/dist/css/356-reports-08a962aba4.chunk.css +22 -0
- package/dist/css/407-reports-f4f0cfbfc5.chunk.css +16 -0
- package/dist/css/457-reports-5d09c748b7.chunk.css +20 -0
- package/dist/css/468-reports-80914b12c2.chunk.css +42 -0
- package/dist/css/548-reports-514f3d493e.chunk.css +24 -0
- package/dist/css/608-reports-9da00eb535.chunk.css +100 -0
- package/dist/css/754-reports-d2cddc8d10.chunk.css +14 -0
- package/dist/css/758-reports-74de8321a7.chunk.css +2 -0
- package/dist/css/760-reports-ead615b62a.chunk.css +18 -0
- package/dist/css/764-reports-d2e943fc46.chunk.css +42 -0
- package/dist/css/895-reports-a1a181f282.chunk.css +10 -0
- package/dist/css/909-reports-cee6e1a66d.chunk.css +18 -0
- package/dist/css/926-reports-017ccb70f1.chunk.css +18 -0
- package/dist/css/reports-app-571b39d122.css +71 -0
- package/dist/en.json +1 -1
- package/dist/scripts/111-afb5c9f62f-reports.chunk.js +1 -0
- package/dist/scripts/133-0389b7b945-reports.chunk.js +1 -0
- package/dist/scripts/173-5b43e6918a-reports.chunk.js +1 -0
- package/dist/scripts/178-c8e03a79be-reports.chunk.js +1 -0
- package/dist/scripts/198-29c07b67e7-reports.chunk.js +1 -0
- package/dist/scripts/271-476d0326fd-reports.chunk.js +1 -0
- package/dist/scripts/312-0b0b8bd043-reports.chunk.js +1 -0
- package/dist/scripts/353-60e9a80290-reports.chunk.js +1 -0
- package/dist/scripts/356-efc98a4c7b-reports.chunk.js +1 -0
- package/dist/scripts/358-fd410ef8b6-reports.chunk.js +1 -0
- package/dist/scripts/407-86c6d7db3a-reports.chunk.js +1 -0
- package/dist/scripts/457-0471c18fc6-reports.chunk.js +1 -0
- package/dist/scripts/459-f27bcae4cb-reports.chunk.js +1 -0
- package/dist/scripts/468-04f725d4e5-reports.chunk.js +1 -0
- package/dist/scripts/475-bbbc5fafcf-reports.chunk.js +1 -0
- package/dist/scripts/509-1a889afa66-reports.chunk.js +1 -0
- package/dist/scripts/511-9409b05677-reports.chunk.js +1 -0
- package/dist/scripts/548-8b1b0aed64-reports.chunk.js +1 -0
- package/dist/scripts/580-9ae666ed2f-reports.chunk.js +2 -0
- package/dist/scripts/580-9ae666ed2f-reports.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/608-c7a7b76425-reports.chunk.js +2 -0
- package/dist/scripts/608-c7a7b76425-reports.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/647-5905ff32d6-reports.chunk.js +1 -0
- package/dist/scripts/648-6965a763b3-reports.chunk.js +1 -0
- package/dist/scripts/754-dba1dc3d2e-reports.chunk.js +1 -0
- package/dist/scripts/758-85c37fa754-reports.chunk.js +1 -0
- package/dist/scripts/760-2a85fa37de-reports.chunk.js +1 -0
- package/dist/scripts/764-86cfd07d15-reports.chunk.js +1 -0
- package/dist/scripts/772-d68a2eaa50-reports.chunk.js +1 -0
- package/dist/scripts/797-4684bb689a-reports.chunk.js +1 -0
- package/dist/scripts/895-83ec38e879-reports.chunk.js +1 -0
- package/dist/scripts/909-976bc2184e-reports.chunk.js +1 -0
- package/dist/scripts/925-bf1e4ea68c-reports.chunk.js +1 -0
- package/dist/scripts/926-ffdb3d4f34-reports.chunk.js +1 -0
- package/dist/scripts/962-8f2c8f214d-reports.chunk.js +1 -0
- package/dist/scripts/978-98a704d231-reports.chunk.js +1 -0
- package/dist/scripts/998-06eb701de3-reports.chunk.js +2 -0
- package/dist/scripts/998-06eb701de3-reports.chunk.js.LICENSE.txt +85 -0
- package/dist/scripts/bundle-86fcd5f5f9.min.js +2 -0
- package/dist/scripts/bundle-86fcd5f5f9.min.js.LICENSE.txt +20 -0
- package/dist/scripts/polyfills-bab4d7e113.min.js +1 -0
- package/package.json +1 -1
- package/tooling/externals.js +3 -3
- package/dist/css/10-reports-fee044dc3f.chunk.css +0 -14
- package/dist/css/11-reports-47a7095b57.chunk.css +0 -10
- package/dist/css/12-reports-e35b8471eb.chunk.css +0 -2
- package/dist/css/16-reports-cd59f61926.chunk.css +0 -102
- package/dist/css/17-reports-d306bd2af5.chunk.css +0 -102
- package/dist/css/18-reports-337109ddaa.chunk.css +0 -24
- package/dist/css/19-reports-249129b3c8.chunk.css +0 -24
- package/dist/css/20-reports-f08d66337b.chunk.css +0 -14
- package/dist/css/21-reports-8c4a2d6270.chunk.css +0 -16
- package/dist/css/22-reports-8f95c3e38d.chunk.css +0 -14
- package/dist/css/23-reports-edbff2446f.chunk.css +0 -14
- package/dist/css/24-reports-b2de28aff4.chunk.css +0 -10
- package/dist/css/25-reports-41ad8a960b.chunk.css +0 -12
- package/dist/css/26-reports-ff40dddbf8.chunk.css +0 -8
- package/dist/css/27-reports-bc37ea2b8e.chunk.css +0 -8
- package/dist/css/28-reports-b09cb132c8.chunk.css +0 -2
- package/dist/css/3-reports-a38402b551.chunk.css +0 -6
- package/dist/css/4-reports-979419ffdf.chunk.css +0 -28
- package/dist/css/7-reports-027e16bc4a.chunk.css +0 -10
- package/dist/css/8-reports-42c0186739.chunk.css +0 -102
- package/dist/css/9-reports-2fd5267209.chunk.css +0 -10
- package/dist/css/reports-app-9b9f2be932.css +0 -71
- package/dist/scripts/0-c514770f41-reports.chunk.js +0 -1
- package/dist/scripts/1-c9d15260a7-reports.chunk.js +0 -1
- package/dist/scripts/10-dfe15b05cb-reports.chunk.js +0 -1
- package/dist/scripts/11-6c57eb7991-reports.chunk.js +0 -1
- package/dist/scripts/12-689b3ab6d2-reports.chunk.js +0 -1
- package/dist/scripts/15-75d7371834-reports.chunk.js +0 -9
- package/dist/scripts/16-ca7061f545-reports.chunk.js +0 -1
- package/dist/scripts/17-cf87cfb3f0-reports.chunk.js +0 -1
- package/dist/scripts/18-a38055e3e5-reports.chunk.js +0 -1
- package/dist/scripts/19-02a366efa6-reports.chunk.js +0 -1
- package/dist/scripts/2-4aa17e2a1c-reports.chunk.js +0 -1
- package/dist/scripts/20-37eec32b6b-reports.chunk.js +0 -1
- package/dist/scripts/21-3cfc24cb86-reports.chunk.js +0 -1
- package/dist/scripts/22-767b61194a-reports.chunk.js +0 -1
- package/dist/scripts/23-13644824ff-reports.chunk.js +0 -1
- package/dist/scripts/24-9688f763a4-reports.chunk.js +0 -1
- package/dist/scripts/25-294fe97457-reports.chunk.js +0 -1
- package/dist/scripts/26-de1692cfb7-reports.chunk.js +0 -1
- package/dist/scripts/27-4dd8ba2b40-reports.chunk.js +0 -1
- package/dist/scripts/28-38200fd0ed-reports.chunk.js +0 -1
- package/dist/scripts/29-83c63c3edb-reports.chunk.js +0 -1
- package/dist/scripts/3-644471fe82-reports.chunk.js +0 -1
- package/dist/scripts/30-beba51a546-reports.chunk.js +0 -1
- package/dist/scripts/31-78dbd2f79a-reports.chunk.js +0 -1
- package/dist/scripts/4-b3fa002781-reports.chunk.js +0 -1
- package/dist/scripts/5-32c494a591-reports.chunk.js +0 -101
- package/dist/scripts/6-9d2ad3c602-reports.chunk.js +0 -1
- package/dist/scripts/7-0bb2965e86-reports.chunk.js +0 -1
- package/dist/scripts/8-dc2ece9d5c-reports.chunk.js +0 -1
- package/dist/scripts/9-b197fac3c8-reports.chunk.js +0 -1
- package/dist/scripts/bundle-7feeeac091.min.js +0 -19
- package/dist/scripts/polyfills-0db830e982.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_reports=window.webpackJsonp_clickview_reports||[]).push([[8,7],{1094:function(t,e,n){"use strict";var r=n(0),o=n(4),i=n(110),a=n(195),c=n(96),u=n(7),l=n(81);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v="shared.privateResourceError",b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(i,t);var e,n,r,o=y(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase(v,"title"))}return e=i,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return u.a.getPhrase(v,"heading")}},{key:"description",get:function(){return u.a.getPhrase(v,"description")}}])&&f(e.prototype,n),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(l.a);function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=C(t);if(e){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&w(t,e)}(i,t);var e,n,r,o=O(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,u.a.getPhrase("shared.regionLockedResourceError","title"))}return e=i,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","heading")}},{key:"description",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","description")}}])&&g(e.prototype,n),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(l.a),S={notFound:a.a,forbidden:{rating:b,yearLevel:b,region:_,privacy:b},badRequest:c.a};function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var r;r="number"==typeof t?t:t.status;var a=Object.assign(Object.assign({},S),e);r&&o.a.ErrorHelper.isStatusCodeError(r)&&(r!==i.a.NotFound?r!==i.a.Forbidden?n.badRequest||o.a.ErrorHelper.throw(new a.badRequest):n.forbidden||o.a.ErrorHelper.throw(new a.forbidden.privacy):n.notFound||o.a.ErrorHelper.throw(new a.notFound))}}function P(t){return t.map((function(t){return t.statusCode})).join(":")}function k(t,e,n){var o=Array.isArray(t)?t:[t];Object(r.useEffect)((function(){o.forEach((function(t){E(t.statusCode,e,n)}))}),[P(o),e,n])}n.d(e,"a",(function(){return k}))},1095:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Login="login",t.VideoView="video_view"}(r||(r={}))},1096:function(t,e,n){"use strict";var r,o;n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),function(t){t.YearGroup="year_group",t.UserType="user_type"}(r||(r={})),function(t){t.ContentType="content_type",t.Subject="subject",t.Topic="topic"}(o||(o={}))},1097:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n.n(r),i=o.a.forwardRef((function(t,e){return o.a.createElement("div",Object.assign({},t,{ref:e,role:"button",tabIndex:0,className:"".concat(t.className?t.className:""," cursor-pointer"),onKeyDown:t.onKeyDown?t.onKeyDown:function(e){return"Enter"===e.key&&t.onClick(e)},onClick:t.onClick,style:t.style?t.style:{}}),t.children)}))},1098:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(80),o=n(36),i=n(35),a=n(1102),c={views:function(t,e,n,o,c,u){var l="video:views";e&&(l+=":".concat(e));var s=Object.assign(Object.assign({objectId:e},t),{timeOffset:i.a.getTimezoneOffset()});return n&&(s.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/video-views",s),key:Object(a.a)(l,t,n),normalize:!1,success:o,error:c,always:u}},individualEngagement:function(t,e,n,o,i,c){var u=Object.assign({objectId:t},e);return n&&(u.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map",u),key:Object(a.a)("engagement:".concat(t),e,n),formatData:function(t){var e;return Object.assign(Object.assign({},t),{data:null===(e=t.data)||void 0===e?void 0:e.map((function(t){var e;return Object.assign(Object.assign({},t),{heatMap:null!==(e=t.heatMap)&&void 0!==e?e:[]})}))})},normalize:!1,success:o,error:i,always:c}},aggregateEngagement:function(t,e,n,o,i,c){var u=Object.assign({objectId:t},e);return n&&(u.sharerId=n),{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map/aggregations",u),key:Object(a.a)("aggregate:engagement:".concat(t),e,n),formatData:function(t){var e;return Object.assign(Object.assign({},t),{heatMap:null!==(e=t.heatMap)&&void 0!==e?e:[]})},normalize:!1,success:o,error:i,always:c}},topVideos:function(t,e,n,i,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/videos/top",Object.assign({"query.video":"thumbnail","query.interactive":"video[thumbnail],clip[video[thumbnail]],thumbnail","query.clip":"video[thumbnail]",limit:e},t)),key:Object(a.a)("top:videos:".concat(null!=e?e:0),t),normalize:!1,formatData:function(t){var e=o.a.sortBy(t.data,"count");return e.reverse(),Object.assign(Object.assign({},t),{data:e})},success:n,error:i,always:c}}}},1099:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(1161),o=n(7),i=n(141),a=n(145),c=o.a.encloseNamespace("reportsShared.utils");function u(t,e){return e?Object(r.c)(function(t){var e=+"".concat(t.id).concat(Math.floor((new Date).getMinutes()/5));return{dictionaries:[r.b,r.a],separator:" ",length:2,style:"capital",seed:e}}(t)):i.a.getFullName(t)}function l(t){switch(t.toLowerCase()){case a.a.Learner:return c("student");case a.a.Staff:return c("staff");default:return t}}},1100:function(t,e,n){"use strict";var r,o,i=n(0),a=n.n(i),c=n(1123),u=n(1110),l=n.n(u);function s(t){var e=t===r.Large?5.8:2,n=t===r.Large?.36:.2;return"".concat(e/2-2*n,"rem")}function f(t){return t>=c.a.HIGH?"text-success":t>=c.a.MODERATE?"text-warning":"text-danger"}function p(t,e){var n="d-inline-block ".concat(l.a.circleContainer);return t===r.Large&&(n+=" ".concat(l.a.lgCircleContainer)),y(e)&&(n+=" ".concat(l.a.pendingCircle)),n}function y(t){return"number"!=typeof t}function h(t){var e,n=a.a.useCallback((function(e){if(e){var n=e.r.baseVal.value,r=2*Math.PI*n,o=r-t.percentage*r;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=o.toString()}}),[]);return a.a.createElement("svg",null,a.a.createElement("circle",{r:s(t.size),className:l.a.backgroundCircle}),!y(t.percentage)&&a.a.createElement("circle",{ref:n,r:s(t.size),className:(e=t.percentage,e>=c.a.HIGH?l.a.circleSuccess:e>=c.a.MODERATE?l.a.circleWarning:l.a.circleDanger)}))}function d(t){var e,n,i=function(t){if(!y(t))return+t.toFixed(2)}(t.percentage),c=t.layout===o.LabelInside?r.Large:r.Small,u=t.customLabel||(y(n=i)?"--%":"".concat(Math.round(100*n),"%"));return t.layout===o.LabelOnly?a.a.createElement("span",{className:f(i)},u):a.a.createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.layout===o.LabelBefore&&a.a.createElement("span",{className:"mr-2"},u),a.a.createElement("div",{className:p(c,i)},a.a.createElement(h,{percentage:i,size:c}),t.layout===o.LabelInside&&a.a.createElement("span",{className:l.a.centredPercentageText},u)))}!function(t){t.Small="small",t.Large="large"}(r||(r={})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return d})),function(t){t.CircleOnly="circle_only",t.LabelOnly="label_only",t.LabelBefore="label_before",t.LabelInside="label_inside"}(o||(o={})),d.defaultProps={layout:o.CircleOnly}},1101:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=a(Object(o.a)(i.a.HEADER_TITLE),2)[1];Object(r.useEffect)((function(){return e(t),function(){e(null)}}),[t])}},1102:function(t,e,n){"use strict";function r(t,e,n){var r="".concat(t,":").concat(e.start,":").concat(e.end),o=Array.isArray(e.userId)?e.userId.sort().join(":"):e.userId,i=Array.isArray(e.groupId)?e.groupId.sort().join(":"):e.groupId;return o&&(r+=":".concat(o)),i&&(r+=":".concat(i)),n&&(r+=":".concat(n)),r}n.d(e,"a",(function(){return r}))},1103:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.RootTopic=1]="RootTopic",t[t.ChildTopic=2]="ChildTopic"}(r||(r={}))},1104:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e,n=a(Object(o.a)(i.a.AUDIENCE_FILTER_SELECTED_COUNT),2)[1];Object(r.useEffect)((function(){t.data?n(t.data.userCount):n(null)}),[null===(e=t.data)||void 0===e?void 0:e.userCount])}},1105:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1094),o={notFound:n(289).a};function i(t){Object(r.a)(t,o)}},1106:function(t,e,n){t.exports={totalCount:"_3a-8G",chartContainer:"_1QY5r"}},1107:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1108),a=n.n(i);function c(){return o.a.createElement("div",{className:"d-flex align-items-start justify-content-between"},o.a.createElement("div",null,o.a.createElement("div",{className:"partial-loading-background mb-2 ".concat(a.a.partialHeading)}),o.a.createElement("div",{className:"partial-loading-background ".concat(a.a.partialCount)})),o.a.createElement("div",{className:"partial-loading-background rounded ".concat(a.a.partialSelector)}))}},1108:function(t,e,n){t.exports={partialHeading:"_6n6Gf",partialSelector:"hK60D",partialCount:"_2jwV2"}},1109:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(9),o=n(52),i=n(83);function a(t){var e,n=null===(e=r.a.useBasicFetch(i.a.userProducts()).data)||void 0===e?void 0:e.find((function(t){return t.id===o.a.Primary}));if(n)return function(e){return t(n,e)}}},1110:function(t,e,n){t.exports={circleContainer:"_3uMQG",backgroundCircle:"_29byp",circleSuccess:"_1leSx",circleWarning:"_1yreR",circleDanger:"_13evQ",lgCircleContainer:"_2gBnl",pendingCircle:"NTTU7",centredPercentageText:"_1wF3E"}},1111:function(t,e,n){"use strict";var r,o,i,a,c,u,l=n(0),s=n.n(l),f=n(1114),p=n.n(f),y=n(1136),h=n.n(y),d=n(14),v=n(7),b=n(1115),m=n(36),g=n(1099),w=n(1116),O=n(1095),j=n(1096);function C(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _=(C(r={},O.a.Login,"login_group_by"),C(r,O.a.VideoView,"video_view_group_by"),r),S=(C(o={},j.a.YearGroup,"yearGroups"),C(o,j.a.UserType,"userType"),C(o,j.b.ContentType,"contentType"),C(o,j.b.Subject,"subject"),C(o,j.b.Topic,"topic"),o),E=j.a.YearGroup,P=(C(c={},O.a.Login,(C(i={},j.a.YearGroup,"totalStudentLogins"),C(i,j.a.UserType,"totalLogins"),i)),C(c,O.a.VideoView,(C(a={},j.a.YearGroup,"totalStudentViews"),C(a,j.a.UserType,"totalViews"),C(a,j.b.ContentType,"totalViews"),C(a,j.b.Subject,"totalViews"),C(a,j.b.Topic,"totalViews"),a)),c),k=(C(u={},O.a.Login,"logins"),C(u,O.a.VideoView,"views"),u),T={title:{text:null},credits:{enabled:!1},chart:{backgroundColor:"transparent",spacing:[0,0,0,0]},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}}};function x(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e){var n=_[t];return e?n+"_single":n}function I(t,e){return Object.assign(Object.assign({},T),{series:[{type:"pie",name:e,data:t}]})}function N(t,e,n,r){var o={},i=t[e];return null==i||i.forEach((function(t){var e;t.name&&!(null==n?void 0:n.includes(t.name.toLowerCase()))&&(o[t.name]=null!==(e=o[t.name])&&void 0!==e?e:0,o[t.name]+=t.count)})),Object(w.a)(m.a.sortBy(Object.keys(o).map((function(t){return{name:r?r(t):t,y:o[t],type:"pie"}})),"name"))}var B=n(1106),A=n.n(B);function M(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(t,e)}(t,e)||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 D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return z}));var F=v.a.encloseNamespace("shared.userActivityPieChart");function G(t){var e=function(t,e){var n=[j.a.YearGroup,j.a.UserType];return t===O.a.VideoView&&n.push(j.b.ContentType),e&&n.push.apply(n,x(e.map((function(t){return t.type})))),n}(t.eventType,t.customGroupBy);return s.a.createElement(d.Dropdown,{alignRight:!0},s.a.createElement(d.Dropdown.Toggle,{id:"group-by-dropdown",variant:"outline-dark",className:"no-caret"},F(S[t.selectedOption])),s.a.createElement(d.Dropdown.Menu,null,e.map((function(e,n){return t.selectedOption!==e&&s.a.createElement(d.Dropdown.Item,{key:n,onSelect:function(){return t.onSelect(e)}},F(S[e]))}))))}function z(t){var e,n,r,o=M(s.a.useState((e=t.eventType,n=!!t.objectId,null!=(r=localStorage.getItem(R(e,n)))?r:E)),2),i=o[0],a=o[1];Object(b.a)();var c,u,l,f=function(t,e){switch(e){case j.a.YearGroup:return N(t,"yearGroupCount",["staff","unknown"]);case j.a.UserType:return N(t,"userTypeCount",null,g.b);case j.b.ContentType:return N(t,"contentTypeCount")}}(t.events,i),y=function(t){var e;return null!==(e=null==t?void 0:t.reduce((function(t,e){return t+e.y}),0))&&void 0!==e?e:null}(f),d=(c=i,u=t.customGroupBy,Array.isArray(u)?null===(l=u.find((function(t){return t.type===c})))||void 0===l?void 0:l.getComponent:void 0);return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"d-flex align-items-start justify-content-between w-100"},s.a.createElement("div",null,s.a.createElement("h3",{className:"h6 m-0"},F(P[t.eventType][i])),"number"==typeof y&&s.a.createElement("strong",{className:A.a.totalCount},y)),s.a.createElement(G,{eventType:t.eventType,selectedOption:i,onSelect:function(e){!function(t,e,n){localStorage.setItem(R(t,n),e)}(t.eventType,e,!!t.objectId),a(e)},customGroupBy:t.customGroupBy})),!!d&&d(),!d&&(f.length?s.a.createElement(h.a,{highcharts:p.a,options:I(f,F(k[t.eventType])),containerProps:{className:"".concat(A.a.chartContainer," position-absolute w-100 h-75 flex-grow-1")}}):t.emptyStateComponent))}},1112:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(9),a=n(32),c=n(1094),u=n(1098),l=n(193),s=n(1104),f=n(1111),p=n(1107),y=n(1095),h=n(1096),d=n(143),v=n(7),b=n(142),m=v.a.encloseNamespace("reportsShared.viewCountPieChartEmptyState");function g(t){return o.a.createElement(d.a,{className:"flex-grow-1 justify-content-center"},o.a.createElement(d.a.Image,{src:b.a.EmptyStates.Shared.ViewCount,className:"w-75 pb-0"}),o.a.createElement(d.a.Heading,null,m("heading")),o.a.createElement(d.a.Info,{className:"w-100"},m(t.singular?"descriptionSingular":"descriptionMultiple")))}var w=n(144),O=n.n(w),j=n(1133),C=n(100),_=n(1125),S=n(1103),E=n(1117),P=n.n(E),k=v.a.encloseNamespace("reportsShared.viewCountByTopicCard");function T(t){var e=Object(l.b)(),n=i.a.useBasicFetch(!!e&&_.a.viewsByTopic(e,t.type));return n.data?n.data.length?o.a.createElement("div",{className:"h-100 mr-n2"},o.a.createElement(O.a,{height:"100%",className:"mt-2"},o.a.createElement("div",{className:"d-flex align-items-center pr-1"},o.a.createElement("div",{className:"d-flex flex-wrap pr-2 ".concat(P.a.topicColumn)},o.a.createElement("strong",{className:"mr-1"},k(t.type===S.a.RootTopic?"subject":"topic")),o.a.createElement("span",{className:"text-muted"},k(t.type===S.a.RootTopic?"multipleSubjects":"multipleTopics"))),o.a.createElement("strong",null,k("views"))),o.a.createElement("ul",{className:"list-unstyled"},n.data.map((function(t,e){return o.a.createElement("li",{key:e},o.a.createElement(C.a,{title:t.collection.name,spanHack:!0,spanHackClassName:"d-flex align-items-center pr-1"},o.a.createElement("div",{className:"py-2 pr-2 ".concat(P.a.topicColumn)},o.a.createElement(j.a,{data:t.collection})),o.a.createElement("strong",null,k("viewCount",{smartCount:t.count}))))}))))):o.a.createElement(g,null):o.a.createElement(o.a.Fragment,null)}function x(t){var e,n=Object(l.b)(),r=i.a.useBasicFetch(!!t.useSharerId&&a.a.currentUser()),d=i.a.useBasicFetch(!!n&&(t.useSharerId?!!r.data&&u.a.views(n,t.objectId,r.data.id):u.a.views(n,t.objectId)));return Object(c.a)(d),Object(s.a)(d),o.a.createElement("div",{className:"bg-white rounded p-3 position-relative d-flex flex-column ".concat(null!==(e=t.className)&&void 0!==e?e:"")},d.data?o.a.createElement(f.a,{eventType:y.a.VideoView,events:d.data,objectId:t.objectId,emptyStateComponent:o.a.createElement(g,{singular:!!t.objectId}),customGroupBy:t.objectId?null:[{type:h.b.Subject,getComponent:function(){return o.a.createElement(T,{type:S.a.RootTopic})}},{type:h.b.Topic,getComponent:function(){return o.a.createElement(T,{type:S.a.ChildTopic})}}]}):o.a.createElement(p.a,null))}n.d(e,"a",(function(){return x}))},1113:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(4),a=n(97),c=n(1097),u=n(38),l=n(1118),s=n.n(l);function f(t){var e;return o.a.createElement("nav",{className:null!==(e=t.className)&&void 0!==e?e:""},o.a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(s.a.pillTabSelector)},t.tabs.map((function(t){return t.appLink||t.onSelect?o.a.createElement("li",{className:"p-0 ".concat(t.active?"btn btn-dark":"btn btn-outline-dark"),key:t.name},t.appLink?o.a.createElement(u.a,{appLink:t.appLink,className:"cursor-pointer d-block text-decoration-none text-reset px-2 ".concat(s.a.pillItem)},t.name):o.a.createElement(c.a,{className:"".concat(s.a.pillItem," px-2"),onClick:function(){return function(t){t.active||t.onSelect()}(t)}},t.name)):o.a.createElement(o.a.Fragment,{key:t.name})}))))}function p(t){var e=t.items.map((function(t){var e,n;return{name:t.label,onSelect:function(){return i.a.AppLinkHelper.trigger(t.appLink)},active:t.appLink.action===(null===(n=null===(e=a.a.getCurrentRoute())||void 0===e?void 0:e.appLink)||void 0===n?void 0:n.action)}}));return o.a.createElement(f,{className:"pb-3",tabs:e})}n.d(e,"a",(function(){return p}))},1115:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(42),o=n(43);function i(){Object(r.a)(o.a.LEFT_NAV_STATE)}},1116:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=["#FF9300","#38A2E8","#7A76E8","#B679C7","#F7847B","#D9584F","#FFCD52","#5DC786","#40BCC3","#40C2BB"];function o(t){return t.map((function(t,e){return Object.assign(Object.assign({},t),{color:r[e%r.length]})}))}},1117:function(t,e,n){t.exports={topicColumn:"_1cZZ-"}},1118:function(t,e,n){t.exports={pillTabSelector:"_3qG1e",pillItem:"_2j2sw"}},1119:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1097),a=n(100);function c(t){function e(){t.disabled||t.onClick.apply(t,arguments)}var n=t.disabled?"disabled":"",r=t.hideOutline?"outline-none":"",c=t.on?"on":"";t.disabled&&!t.showStateWhenDisabled&&(c="");var u="".concat("d-inline-block float-right align-top custom-toggle toggle-option"," ").concat(c," ").concat(n," ").concat(r);return t.tooltipText?o.a.createElement(a.a,{title:t.tooltipText,spanHack:!0},o.a.createElement(i.a,{onClick:e,className:u},o.a.createElement("span",{className:"handle"}))):o.a.createElement(i.a,{onClick:e,className:u},o.a.createElement("span",{className:"handle"}))}},1120:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var r,o,i=n(0),a=n(20),c=n(18),u=n(1137),l=n.n(u);function s(t){var e,n=t.type,u=t.mediaType,s=t.extraClasses,f=function(t){return t===r.Video?l.a.videoFallback:t===r.Playlist?l.a.playlistFallback:t===r.Series||t===r.TallSubject?l.a.posterFallback:t===r.Subject?"".concat(l.a.subjectFallback," svg-container d-inline-block"):""}(n),p=function(t){return t===r.Video?c.b.Play:t===r.Playlist?c.b.Image:t===r.Series?c.b.Series:t===r.Subject||t===r.TallSubject?c.b.Subject:""}(n),y=function(t){return t===r.Subject?a.b.ExtraLarge:a.b.Standard}(n),h="".concat(function(t,e){return e===r.Subject?l.a.subjectFallbackContainer:t===o.Svg?e===r.Video?"".concat(l.a.svgFallbackContainer," rounded"):l.a.svgFallbackContainer:l.a.baseFallbackContainer}(u,n));return s&&(h+=" ".concat(t.extraClasses)),i.createElement("div",{className:h},u===o.Svg?i.createElement(a.a,{svgName:p,className:"".concat(f," ").concat(null!==(e=t.svgContainerClassName)&&void 0!==e?e:""),tagName:"div",size:y}):i.createElement("div",{className:l.a.fallbackThumbnailImage,style:{backgroundImage:"url('".concat(p,"')")}}))}!function(t){t[t.Video=0]="Video",t[t.Playlist=1]="Playlist",t[t.Series=2]="Series",t[t.Subject=3]="Subject",t[t.TallSubject=4]="TallSubject"}(r||(r={})),function(t){t[t.Svg=0]="Svg",t[t.Image=1]="Image"}(o||(o={})),s.defaultProps={mediaType:o.Svg}},1122:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n.n(r),i=n(1128),a=n.n(i);function c(t){var e,n;return o.a.createElement("div",{className:"bg-white rounded ".concat(a.a.table," ").concat(null!==(e=t.className)&&void 0!==e?e:"")},o.a.createElement("div",{className:"border-bottom ".concat(a.a.header," ").concat(null!==(n=t.headerClassName)&&void 0!==n?n:"")}),t.children)}},1123:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r={HIGH:.75,MODERATE:.5}},1124:function(t,e,n){"use strict";var r,o=n(0),i=n.n(o),a=n(1121),c=n(20),u=n(18),l=n(1126),s=n.n(l);!function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(r||(r={}));var f=o.memo((function(t){var e,n,i=t.direction===r.Left,a=i?u.b.ChevronLeft:u.b.ChevronRight,l=(t.contents,e=i,n=s.a.topPos,n+=e?" "+s.a.left:" "+s.a.right);return t.hide?o.createElement(o.Fragment,null):o.createElement(o.Fragment,null,o.createElement("div",{role:"button",className:"".concat(l," ").concat(s.a.button," ").concat(t.className||""),onClick:t.onClick},t.hoverText&&o.createElement("span",{className:"pl-3 pr-2 ".concat(s.a.hoverText)},t.hoverText),o.createElement(c.a,{svgName:a,size:c.b.Medium,className:"svg-container d-inline-block ".concat(s.a.chevron)})),t.useGradientBackdrop&&o.createElement("div",{className:i?s.a.gradientLeft:s.a.gradientRight}),!t.hideExtendedClickableArea&&o.createElement("div",{role:"button",onClick:t.onClick,className:i?s.a.extendedClickableAreaLeft:s.a.extendedClickableAreaRight}))})),p=n(38),y=n(16);function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||v(t,e)||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 d(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t){var e,n,r,o;return{canScrollLeft:(null===(e=t.current)||void 0===e?void 0:e.scrollLeft)>0,canScrollRight:(null===(n=t.current)||void 0===n?void 0:n.scrollLeft)<(null===(r=t.current)||void 0===r?void 0:r.scrollWidth)-(null===(o=t.current)||void 0===o?void 0:o.clientWidth)}}var g=n(1127),w=n.n(g);function O(t){return function(t){if(Array.isArray(t))return j(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return E}));var C=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function _(t){var e,n;return t.column.canSort?i.a.createElement("span",{className:"".concat(w.a.sortIndicator,"\n ").concat(t.column.isSorted?"":"text-muted","\n ").concat(null!==(n=null===(e=t.theme)||void 0===e?void 0:e.sortIndicator)&&void 0!==n?n:"")},i.a.createElement(c.a,{svgName:t.column.isSortedDesc||!t.column.isSorted?u.b.ArrowRight:u.b.ArrowLeft,size:c.b.Small})):i.a.createElement(i.a.Fragment,null)}function S(t){var e,n,r,o,c,u,l,s,f={columns:t.columns,data:t.data,disableSortBy:!t.enableSort,manualSortBy:t.manualSort,autoResetHiddenColumns:t.autoResetHiddenColumns,autoResetSortBy:t.autoResetSortBy};t.initialSelectedRowIds&&(f.initialState={selectedRowIds:(l=t.initialSelectedRowIds,s={},l.forEach((function(t){return s[t]=!0})),s)}),t.getRowId&&(f.getRowId=t.getRowId);var y=a.useTable.apply(void 0,[f].concat(O(function(t){var e=[a.useFlexLayout,a.useSortBy,a.useRowSelect];return t.allowFiltering&&(e=[].concat(d(e),[a.useFilters])),t.allowGlobalFiltering&&(e=[].concat(d(e),[a.useGlobalFilter])),e}(Object.assign({},t))))),h=y.getTableProps,v=y.getTableBodyProps,b=y.headerGroups,m=y.rows,g=y.prepareRow,w=y.toggleAllRowsSelected,j=y.setGlobalFilter,C=y.setHiddenColumns,S=y.state.sortBy;return i.a.useEffect((function(){t.onSort&&t.onSort(S)}),[S]),i.a.useEffect((function(){t.globalFilter&&j(t.globalFilter)}),[t.globalFilter]),i.a.useEffect((function(){t.hiddenColumns&&C(t.hiddenColumns)}),[t.hiddenColumns&&t.hiddenColumns.length]),i.a.createElement("div",Object.assign({},h(),{className:null!==(n=null===(e=t.theme)||void 0===e?void 0:e.table)&&void 0!==n?n:""}),i.a.createElement("div",{className:null!==(o=null===(r=t.theme)||void 0===r?void 0:r.header)&&void 0!==o?o:""},b.map((function(e){var n,r;return i.a.createElement("div",Object.assign({},e.getHeaderGroupProps(),{className:null!==(r=null===(n=t.theme)||void 0===n?void 0:n.headerRow)&&void 0!==r?r:""}),e.headers.map((function(e){var n,r;return i.a.createElement("div",Object.assign({},e.getHeaderProps(e.getSortByToggleProps()),{className:null!==(r=null===(n=t.theme)||void 0===n?void 0:n.headerCell)&&void 0!==r?r:""}),e.render("Header",{renderSortIndicator:function(){return i.a.createElement(_,{column:e,theme:t.theme})}}),!e.hideSortIndicator&&i.a.createElement(_,{column:e,theme:t.theme}))})))}))),i.a.createElement("div",Object.assign({},v(),{className:null!==(u=null===(c=t.theme)||void 0===c?void 0:c.body)&&void 0!==u?u:""}),m.map((function(e){var n,r,o,a;g(e);var c=null!==(r=null===(n=t.theme)||void 0===n?void 0:n.row)&&void 0!==r?r:"";e.isSelected&&(null===(o=t.theme)||void 0===o?void 0:o.selectedRow)&&(c+=" ".concat(null===(a=t.theme)||void 0===a?void 0:a.selectedRow)),t.onSelectRow&&(c+=" cursor-pointer");var u=!!t.getRowAppLink&&t.getRowAppLink(e);function l(){return e.cells.map((function(e){var n,r,o=null!==(r=null===(n=t.theme)||void 0===n?void 0:n.cell)&&void 0!==r?r:"";return t.onSelectCell&&(o+=" cursor-pointer"),i.a.createElement("div",Object.assign({},e.getCellProps(),{className:o,onClick:function(){t.onSelectCell&&t.onSelectCell(e)}}),e.render("Cell"))}))}return u?i.a.createElement(p.a,Object.assign({},e.getRowProps(),{className:c,appLink:u}),l()):i.a.createElement("div",Object.assign({},e.getRowProps(),{className:c,onClick:function(){t.onSelectRow&&(t.allowSelectMultipleRows||w(!1),t.onSelectRow(e),e.toggleRowSelected(!0))},onMouseOver:t.onRowMouseOver&&function(){return t.onRowMouseOver(e)},onMouseLeave:t.onRowMouseLeave&&function(){return t.onRowMouseLeave(e)}}),l())}))))}function E(t){var e=t.enableSlider,n=t.scrollIncrement,o=C(t,["enableSlider","scrollIncrement"]),a=function(){var t=i.a.useRef(),e=h(i.a.useState(m(t)),2),n=e[0],r=e[1];function o(){r(m(t))}return i.a.useEffect((function(){if(t.current){var e=y.a.throttle(o,200);return r(m(t)),t.current.addEventListener("scroll",e),function(){t.current.removeEventListener("scroll",e)}}}),[t.current]),{ref:t,scrollState:n,scroll:function(e){var n;null===(n=t.current)||void 0===n||n.scrollBy({left:e,top:0,behavior:"smooth"})}}}(),c=a.ref,u=a.scrollState,l=a.scroll;if(!e)return i.a.createElement(S,Object.assign({},o));function s(t){c.current&&l(n*("right"===t?1:-1))}return i.a.createElement("div",{className:"mx-n3 overflow-hidden-x"},i.a.createElement("div",{className:"px-3"},i.a.createElement("div",{className:"position-relative"},i.a.createElement(f,{direction:r.Left,onClick:function(){return s("left")},hide:!u.canScrollLeft}),i.a.createElement("div",{className:w.a.scrollContainer,ref:c},i.a.createElement(S,Object.assign({},o))),i.a.createElement(f,{direction:r.Right,onClick:function(){return s("right")},hide:!u.canScrollRight}))))}E.defaultProps={scrollIncrement:250}},1125:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(80),o=n(1102);function i(t,e){return Object.assign(Object.assign({},t),{topicAnalyticsType:e,query:"cover"})}var a={topTopics:function(t,e,n,a,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/topics/top",i(t,e)),key:Object(o.a)("top:topics:".concat(e),t),success:n,error:a,always:c}},viewsByTopic:function(t,e,n,a,c){return{url:r.a.urlBuilder("{gateway}/v1/analytics/topics/count",i(t,e)),key:Object(o.a)("views:topics:".concat(e),t),normalize:!1,success:n,error:a,always:c}}}},1126:function(t,e,n){t.exports={left:"_789pr",right:"_1P8qt",button:"_24q_F",hoverText:"p-vNG",chevron:"_3M27X",gradientLeft:"_3fkiw",gradientRight:"_2RDDy",extendedClickableAreaRight:"_13dgy",extendedClickableAreaLeft:"_37LtK",videoTopPos:"_1XTRO",topPos:"_3_p_J"}},1127:function(t,e,n){t.exports={sortIndicator:"_2fe85",scrollContainer:"_1CRya"}},1128:function(t,e,n){t.exports={table:"_3XPjZ",header:"_1hiMB"}},1130:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n(42),i=n(43);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t,e)||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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){var e=a(Object(o.a)(i.a.HEADER_ACTIONS),2)[1];Object(r.useEffect)((function(){return e(t),function(){e(null)}}),[!!t])}},1133:function(t,e,n){"use strict";var r,o=n(0),i=n(124),a=2,c=n(290),u=n(59),l=n(38),s=n(1120),f=n(241);!function(t){t.Draft="Draft",t.ComingSoon="ComingSoon",t.Published="Published"}(r||(r={}));var p=n(101),y=n(63),h=n(3),d=n(1148),v=n.n(d);n.d(e,"a",(function(){return w}));var b=function(t){var e=t.name,n=t.multiline,r="".concat(v.a.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),i="";return n?i+=" ".concat(v.a.clamped," clamp-2"):(r+=" text-nowrap",i+=" text-truncate"),o.createElement("div",{className:r},o.createElement("small",{className:"text-muted"},o.createElement(f.b,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),o.createElement("p",{className:"".concat(v.a.name," h6 pb-1")},o.createElement("span",{className:i},e)))},m=function(t){var e=t.name,n=t.multiline,r=t.presentationName,i="px-3 text-center d-flex flex-column justify-content-center",a="".concat(v.a.name," h6");return n?a+=" ".concat(v.a.clamped," clamp-2 text-left"):(i+=" text-nowrap text-truncate",a+=" text-truncate"),o.createElement("div",{className:i},r&&o.createElement("div",{className:"text-secondary ".concat(v.a.text)},r),o.createElement("div",{className:a},e))};function g(t){var e,n,i=(null===(e=t.data)||void 0===e?void 0:e.status)===r.ComingSoon,l=c.a.createUrl(null===(n=t.data.cover)||void 0===n?void 0:n.url,{size:u.a.Small}),f=function(t,e){var n,r=(0,Object(p.a)().hasPermissions)(y.a.StudentExperience);if((null==e?void 0:e.length)>=a&&!r)return null===(n=null==e?void 0:e.find((function(e){return e.id===t})))||void 0===n?void 0:n.name}(null==t?void 0:t.data.presentationId,null==t?void 0:t.availablePresentations),h={name:t.data.name,presentationName:f,multiline:t.isLarge};return o.createElement("div",{className:"border d-flex position-relative ".concat(v.a.widgetItem),id:t.data.id},o.createElement("div",{className:"".concat(v.a.imagePanel," ").concat(t.isLarge?v.a.large:"")},o.createElement("div",{className:v.a.image,style:{backgroundImage:"url('".concat(l,"')")}}),o.createElement(s.a,{type:s.b.Subject,extraClasses:t.isLarge?v.a.large:""})),i?o.createElement(b,Object.assign({},h)):o.createElement(m,Object.assign({},h)))}var w=o.memo((function(t){var e,n,a,c,u=!!t.appLink&&Object.assign(Object.assign({},t.appLink),{args:[t.data.id,i.a.slugify(t.data.name)]}),s=(null===(e=t.data)||void 0===e?void 0:e.status)===r.ComingSoon,f=Object.assign(Object.assign({},t.analyticsData),{id:null===(n=t.data)||void 0===n?void 0:n.id,name:null===(a=t.data)||void 0===a?void 0:a.name,presentationId:null===(c=t.data)||void 0===c?void 0:c.presentationId,comingSoon:!!s}),p=Object.assign(Object.assign({},t.analyticsOptions),{actionType:h.UserAction.Click,entity:h.EntityType.Classification,descriptor:h.ClickDescriptor.Cover}),y={data:t.data,isLarge:t.isLarge,availablePresentations:t.availablePresentations};return u?o.createElement(l.a,{appLink:u,analyticsData:f,analyticsOptions:p},o.createElement(g,Object.assign({},y))):o.createElement(g,Object.assign({},y))}))},1134:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n(20),c=n(18),u=n(42),l=n(1119),s=n(43);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||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 p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var y=i.a.encloseNamespace("reportsShared.anonymiseAction");function h(){var t=f(Object(u.a)(s.a.ANONYMISE_USERS,!1),2),e=t[0],n=t[1];return o.a.createElement("div",{className:"d-flex align-items center justify-content-between",onClick:function(){return n(!e)}},o.a.createElement("span",{className:"mr-3"},y("hideNames")),o.a.createElement(l.a,{on:e,onClick:function(){}}))}var d=n(1109),v=n(288);n.d(e,"a",(function(){return m}));var b=i.a.encloseNamespace("reportsShared.utils");function m(t){var e=Object(d.a)(v.a.getPrimaryObjectUrl);if(t){var n=[];return e&&n.push({label:function(){return o.a.createElement("span",{className:"d-flex justify-content-between align-items-center"},o.a.createElement("span",{className:"mr-2"},b("seeVideo")),o.a.createElement(a.a,{svgName:c.b.NewWindow}))},href:e(t),openInNewTab:!0}),n.push({label:function(){return o.a.createElement(h,null)}}),n}}},1137:function(t,e,n){t.exports={baseFallbackContainer:"_3jl1L",svgFallbackContainer:"_2rOm2",subjectFallbackContainer:"nDJRl",videoFallback:"_2GQyA",playlistFallback:"JI1jg",posterFallback:"_1YnF6",subjectFallback:"p7JWY",fallbackThumbnailImage:"_2Av0B"}},1138:function(t,e,n){"use strict";function r(t){var e=[];return Object.keys(t).forEach((function(n){var r=t[n];r&&e.push("".concat(n,":").concat(Array.isArray(r)?r.join(","):r))})),e.join(":")}n.d(e,"a",(function(){return r}))},1139:function(t,e,n){"use strict";n.d(e,"b",(function(){return b})),n.d(e,"a",(function(){return m}));var r=n(0),o=n.n(r),i=n(1271),a=n.n(i),c=n(241),u=n(1154),l=n(1216),s=n.n(l);function f(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var y=a.a.scale(["#daf07d","#08bd1a"]),h=[0,.01,.25,.5,.75,1];function d(t,e){return t?y(t/e).hex():"#f1f1f1"}function v(t,e){for(var n=[],r=0;r<t.length;r++){var o=r>0&&t[r-1],i=t[r],a=r<t.length-1&&t[r+1];i===o&&i===a||n.push("".concat(d(i,e)," ").concat(100/t.length*r,"%"))}return"linear-gradient(to right, ".concat(n.join(","),")")}function b(){var t=Math.max.apply(Math,h),e=100/h.length;return o.a.createElement("div",{className:"d-flex justify-content-between w-100"},o.a.createElement(c.b,{namespace:"shared.engagementHeatMap",phrase:"less"}),o.a.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(s.a.legend)},h.map((function(n,r){return o.a.createElement("div",{key:r,style:{width:"".concat(e,"%"),backgroundColor:d(n,t)}})}))),o.a.createElement(c.b,{namespace:"shared.engagementHeatMap",phrase:"more"}))}function m(t){var e,n,r=Object(u.a)(t.engagement),i=null!==(e=t.max)&&void 0!==e?e:Math.max.apply(Math,f(r));return o.a.createElement("div",{className:"border rounded ".concat(s.a.heatMap," ").concat(null!==(n=t.className)&&void 0!==n?n:""),style:{background:v(r,i)}})}},1140:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(130),a=n(1141);function c(t){if(t)return(t=function(t){if(t)return t.replace(/<a.*?>/g,"").replace("</a>","")}(t=function(t){if(t)return t.replace(/<p>/g,"").replace(/<\/p>/g,"<br>")}(t=function(t,e){if(t&&e)return e.forEach((function(e){t=t.replace("<"+e+">","").replace("</"+e+">","")})),t}(t,["b","i","u","ul","li","old"])))).split("<br>")[0]||"Annotation"}function u(t){var e=a.a.getTypeInfo(t.interaction.typeId),n=e.name,r=e.bgClassName,u=e.Svg,l=t.questionNumber?"".concat(t.questionNumber,". "):"",s="interaction-type-icon ".concat(r);return t.smallIcon&&(s+=" sm"),(t.showQuestion||t.showTypeName)&&(s+=t.smallIcon?" mr-1":" mr-2"),t.iconClassName&&(s+=" ".concat(t.iconClassName)),o.a.createElement(o.a.Fragment,null,!!t.showIcon&&o.a.createElement("span",{className:s},o.a.createElement(u,null)),!!t.showTypeName&&o.a.createElement("span",{className:t.typeNameClassName},o.a.createElement("strong",null,l,n)),!!t.showQuestion&&o.a.createElement("span",{className:t.questionClassName},t.interaction.typeId===i.InteractionTypeId.Annotation?o.a.createElement("span",{dangerouslySetInnerHTML:{__html:c(t.interaction.data.annotation)}}):t.interaction.name))}n.d(e,"a",(function(){return u})),u.defaultProps={showIcon:!0,showQuestion:!0}},1141:function(t,e,n){"use strict";var r=n(4),o=n(7),i=n(0),a=n.n(i);function c(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("g",{transform:"translate(5.000000, 3.000000)"},a.a.createElement("path",{d:"M5.129,4.52970994e-14 C5.80434375,4.52970994e-14 6.35378125,0.5494375 6.35378125,1.22478125 L6.35378125,1.22478125 L6.35378125,4.12053125 C6.35378125,4.795875 5.80434375,5.3453125 5.129,5.3453125 L5.129,5.3453125 L5.01765625,5.3453125 L5.01765625,5.7625625 C5.14371875,5.7230625 5.2778125,5.70175 5.4166875,5.70175 C5.8579375,5.70175 6.24996875,5.9166875 6.4935,6.24740625 C6.6880625,6.13675 6.9129375,6.0735 7.15228125,6.0735 C7.61575,6.0735 8.024875,6.31059375 8.26471875,6.6699375 C8.450875,6.57140625 8.6629375,6.51559375 8.88784375,6.51559375 C9.6248125,6.51559375 10.2244688,7.11515625 10.2244688,7.85209375 L10.2244688,7.85209375 L10.2239688,11.0194063 C10.22375,12.719125 9.73003125,14.3683438 8.79625,15.7887188 C8.7095625,15.9205625 8.562375,15.9999688 8.4045625,15.9999688 L8.4045625,15.9999688 L3.1323125,15.9999688 C3.0124375,15.9999688 2.897125,15.9540625 2.8100625,15.8716563 C2.80745313,15.8691864 2.80274841,15.8647056 2.79608533,15.8582606 L2.73370254,15.7963915 C2.38498908,15.4434944 0.983540179,13.9211451 0.6698125,11.95725 L0.6698125,11.95725 L0.0538125,9.3209375 C-0.03209375,8.95328125 0.043625,8.5848125 0.261625,8.3100625 C0.46915625,8.04846875 0.78865625,7.89309375 1.14465625,7.8788125 C1.47575,7.8150625 1.81340625,7.8773125 2.10134375,8.0561875 C2.19071875,8.1116875 2.272125,8.17646875 2.34459375,8.24915625 L2.34459375,8.24915625 L2.34459375,5.34534375 L2.23325,5.34534375 C1.55790625,5.34534375 1.00846875,4.79590625 1.00846875,4.1205625 L1.00846875,4.1205625 L1.00846875,1.22478125 C1.00846875,0.5494375 1.55790625,4.52970994e-14 2.23325,4.52970994e-14 L2.23325,4.52970994e-14 Z M3.6810625,3.4381875 C3.46103125,3.4381875 3.282,3.61721875 3.282,3.83725 L3.282,3.83725 L3.282,11.2870938 C3.282,11.4215625 3.22428125,11.5495625 3.12346875,11.6385313 C3.02265625,11.7275 2.88853125,11.7689063 2.7550625,11.7522188 L2.7550625,11.7522188 L2.7175,11.7475313 C2.5228125,11.7231875 2.36390625,11.580125 2.31925,11.3890625 L2.31925,11.3890625 L1.78459375,9.10071875 C1.76034375,8.9969375 1.69715625,8.9088125 1.60659375,8.8525625 C1.51603125,8.7963125 1.407,8.78928125 1.30065625,8.79571875 C1.2585,8.79828125 1.23959375,8.8036875 1.194,8.80803125 C1.10340625,8.81665625 1.035625,8.84275 0.996,8.89271875 C0.956375,8.9426875 0.94596875,9.019 0.96665625,9.107625 L0.96665625,9.107625 L1.58653125,11.7605625 C1.5891875,11.7719063 1.59140625,11.7833438 1.59321875,11.794875 C1.83815625,13.3630313 2.95146875,14.6606563 3.32925,15.0625 L3.32925,15.0625 L8.1469375,15.0625 C8.893,13.8445 9.28625,12.4519688 9.2864375,11.0193125 L9.2864375,11.0193125 L9.2869375,7.85203125 C9.2869375,7.63209375 9.10790625,7.4530625 8.887875,7.4530625 C8.66784375,7.4530625 8.4888125,7.63209375 8.4888125,7.852125 L8.4888125,7.852125 L8.4888125,8.61359375 C8.4888125,8.87246875 8.2789375,9.08234375 8.0200625,9.08234375 C7.7611875,9.08234375 7.5513125,8.87246875 7.5513125,8.61359375 L7.5513125,8.61359375 L7.5513125,7.4100625 C7.5513125,7.19003125 7.3723125,7.011 7.15228125,7.011 C6.93225,7.011 6.75321875,7.19003125 6.75321875,7.4100625 L6.75321875,7.4100625 L6.75321875,8.28625 C6.75321875,8.545125 6.54334375,8.755 6.28446875,8.755 C6.02559375,8.755 5.81571875,8.545125 5.81571875,8.28625 L5.81571875,8.28625 L5.81571875,7.0383125 C5.81571875,6.81828125 5.6366875,6.63928125 5.41665625,6.63928125 C5.196625,6.63928125 5.017625,6.81828125 5.017625,7.0383125 L5.017625,7.0383125 L5.017625,8.232875 C5.017625,8.49175 4.80775,8.701625 4.548875,8.701625 C4.29,8.701625 4.080125,8.49175 4.080125,8.232875 L4.080125,8.232875 L4.080125,3.83725 C4.080125,3.61721875 3.90109375,3.4381875 3.6810625,3.4381875 Z M11.131,-1.59872116e-14 C11.8064063,-1.59872116e-14 12.3558125,0.5494375 12.3558125,1.22478125 L12.3558125,1.22478125 L12.3558125,4.1205625 C12.3558125,4.79590625 11.806375,5.34534375 11.131,5.34534375 L11.131,5.34534375 L8.23525,5.34534375 C7.55990625,5.34534375 7.01046875,4.79590625 7.01046875,4.1205625 L7.01046875,4.1205625 L7.01046875,1.22478125 C7.01046875,0.5494375 7.55990625,-1.59872116e-14 8.23525,-1.59872116e-14 L8.23525,-1.59872116e-14 Z M11.1310313,0.9375 L8.23528125,0.9375 C8.076875,0.9375 7.948,1.066375 7.948,1.22478125 L7.948,1.22478125 L7.948,4.1205625 C7.948,4.27896875 8.076875,4.40784375 8.23528125,4.40784375 L8.23528125,4.40784375 L11.1310313,4.40784375 C11.2894375,4.40784375 11.4183438,4.27896875 11.4183438,4.1205625 L11.4183438,4.1205625 L11.4183438,1.22478125 C11.4183438,1.066375 11.2894375,0.9375 11.1310313,0.9375 L11.1310313,0.9375 Z M5.129,0.9375 L2.23325,0.9375 C2.07484375,0.9375 1.94596875,1.066375 1.94596875,1.22478125 L1.94596875,1.22478125 L1.94596875,4.1205625 C1.94596875,4.27896875 2.07484375,4.40784375 2.2331875,4.40784375 L2.2331875,4.40784375 L2.34453125,4.40784375 L2.34453125,3.83721875 C2.34453125,3.10025 2.944125,2.50065625 3.68109375,2.50065625 C4.4180625,2.50065625 5.01765625,3.10025 5.01765625,3.83721875 L5.01765625,3.83721875 L5.01765625,4.40784375 L5.129,4.40784375 C5.28740625,4.40784375 5.41628125,4.27896875 5.41628125,4.1205625 L5.41628125,4.1205625 L5.41628125,1.22478125 C5.41628125,1.066375 5.28740625,0.9375 5.129,0.9375 L5.129,0.9375 Z"}))))}function u(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M16.5547082,3.66666667 C17.0307547,3.66666667 17.4166667,4.10561087 17.4166667,4.65176211 L17.4166667,17.3482379 C17.4166667,17.8922911 17.0325905,18.3333333 16.5547082,18.3333333 L5.44529184,18.3333333 C4.9692453,18.3333333 4.58333333,17.8943891 4.58333333,17.3482379 L4.58333333,4.65176211 C4.58333333,4.10770892 4.96740951,3.66666667 5.44529184,3.66666667 L16.5547082,3.66666667 Z M6.64149485,4.58362946 L5.39188119,4.58333333 L5.39188119,4.58333333 L5.39140886,4.63124366 C5.39133174,4.64701901 5.39125542,4.66659213 5.39117991,4.68981696 L5.39052172,4.99349248 C5.39045096,5.0373129 5.39038099,5.08434682 5.39031181,5.13444817 L5.38951907,5.87355262 C5.38945612,5.94585631 5.38939393,6.02064317 5.38933252,6.09776711 L5.38846857,7.41164942 C5.38841476,7.50849255 5.38836171,7.60694243 5.3883094,7.706853 L5.38744819,9.63144592 C5.38740476,9.7436262 5.38736207,9.85639075 5.3873201,9.96959351 L5.38636125,13.0260679 C5.38633211,13.1353268 5.38630366,13.2437094 5.38627591,13.3510694 L5.38541667,17.4092786 L5.38541667,17.4092786 C5.38541667,17.4094727 5.40139773,17.4096625 5.43215374,17.4098483 L5.66621602,17.410657 C5.70239956,17.4107438 5.74182455,17.4108296 5.78434021,17.4109144 L6.24635879,17.4116506 C6.30606164,17.4117294 6.36840286,17.4118072 6.43323171,17.411884 L7.07978636,17.412549 C7.15818403,17.4126199 7.23861702,17.4126899 7.32093458,17.4127589 L8.38955516,17.4135407 C8.48453695,17.413602 8.58080025,17.4136624 8.67819428,17.4137218 L10.2050643,17.4145426 C10.3099966,17.4145926 10.4153058,17.4146418 10.5208411,17.41469 L12.7186143,17.4155682 C12.8199282,17.4156037 12.9204129,17.4156383 13.0199177,17.4156721 L16.5962838,17.4166643 C16.6041235,17.4166659 16.6081188,17.4166667 16.6081188,17.4166667 L16.6083574,17.404543 L16.6083574,17.404543 L16.6092636,17.1281822 C16.609336,17.0909349 16.6094075,17.0503279 16.6094783,17.0065075 L16.6102897,16.3357629 C16.6103542,16.2685716 16.610418,16.1987511 16.6104809,16.1264474 L16.6111995,15.1489598 C16.6112564,15.059128 16.6113124,14.9673972 16.6113678,14.8739137 L16.6122825,13.0334559 C16.6123288,12.924197 16.6123745,12.8140617 16.6124193,12.703196 L16.6132553,10.3177583 C16.6132901,10.2038252 16.6133242,10.0901843 16.6133575,9.97698153 L16.6143069,6.10515513 C16.6143225,6.02803119 16.6143373,5.95324434 16.6143515,5.88094064 L16.6145833,4.59072136 L16.6145833,4.59072136 L16.6027483,4.59043343 L16.6027483,4.59043343 L16.5107818,4.58987601 C16.4881671,4.58978515 16.4620094,4.5896953 16.4324595,4.58960647 L16.0789915,4.58883422 C16.0304453,4.58875142 15.9789591,4.58866963 15.9246838,4.58858883 L15.1491499,4.58766678 C15.0749737,4.58759388 14.9986113,4.58752196 14.9202136,4.58745101 L14.1637515,4.58683864 C14.0744988,4.5867735 13.983663,4.58670932 13.891395,4.58664609 L12.4188002,4.58576887 C12.3159787,4.5857151 12.2124787,4.58566226 12.108451,4.58561036 L10.2115288,4.58477559 C10.1065966,4.58473469 10.0020412,4.58469469 9.89801354,4.5846556 L6.8573146,4.58368638 C6.78313834,4.58366655 6.71114817,4.58364758 6.64149485,4.58362946 Z M9.80280172,11.9166667 C10.0210177,11.9166667 10.1979167,12.1218695 10.1979167,12.375 C10.1979167,12.6281305 10.0210177,12.8333333 9.80280172,12.8333333 L9.80280172,12.8333333 L7.38469828,12.8333333 C7.16648232,12.8333333 6.98958333,12.6281305 6.98958333,12.375 C6.98958333,12.1218695 7.16648232,11.9166667 7.38469828,11.9166667 L7.38469828,11.9166667 Z M14.5678761,9.16666667 C14.8122845,9.16666667 15.0104167,9.37186949 15.0104167,9.625 C15.0104167,9.87813051 14.8122845,10.0833333 14.5678761,10.0833333 L14.5678761,10.0833333 L7.4321239,10.0833333 C7.18771549,10.0833333 6.98958333,9.87813051 6.98958333,9.625 C6.98958333,9.37186949 7.18771549,9.16666667 7.4321239,9.16666667 L7.4321239,9.16666667 Z M14.5678761,6.41666667 C14.8122845,6.41666667 15.0104167,6.62186949 15.0104167,6.875 C15.0104167,7.12813051 14.8122845,7.33333333 14.5678761,7.33333333 L14.5678761,7.33333333 L7.4321239,7.33333333 C7.18771549,7.33333333 6.98958333,7.12813051 6.98958333,6.875 C6.98958333,6.62186949 7.18771549,6.41666667 7.4321239,6.41666667 L7.4321239,6.41666667 Z"})))}function l(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(2.000000, 2.000000)"},a.a.createElement("g",{transform:"translate(3.500000, 2.000000)"},a.a.createElement("path",{d:"M10.78125,7.53125 C11.0285625,7.53125 11.2715937,7.59621875 11.4840312,7.71909375 C11.7963125,7.89971875 12.1875,7.6735625 12.1875,7.31334375 L12.1875,3.3125 C12.1875,3.053625 11.977625,2.84375 11.71875,2.84375 L8.38675,2.84375 C8.42015625,2.680125 8.4375,2.51184375 8.4375,2.34375 C8.4375,1.05140625 7.38609375,0 6.09375,0 C4.80140625,0 3.75,1.05140625 3.75,2.34375 C3.75,2.51184375 3.76734375,2.680125 3.80075,2.84375 L0.46875,2.84375 C0.209875,2.84375 0,3.053625 0,3.3125 L0,7.31334375 C0,7.674125 0.391625,7.899375 0.70346875,7.71909375 C0.91590625,7.59621875 1.1589375,7.53125 1.40625,7.53125 C2.18165625,7.53125 2.8125,8.16209375 2.8125,8.9375 C2.8125,9.71290625 2.18165625,10.34375 1.40625,10.34375 C1.1589375,10.34375 0.91590625,10.2787812 0.70346875,10.1559062 C0.3911875,9.9753125 0,10.2013437 0,10.5616563 L0,15.53125 C0,15.790125 0.209875,16 0.46875,16 L4.46959375,16 C4.8303125,16 5.05578125,15.608375 4.8753125,15.2965312 C4.7524375,15.0840937 4.6875,14.8410938 4.6875,14.59375 C4.6875,13.8183438 5.31834375,13.1875 6.09375,13.1875 C6.86915625,13.1875 7.5,13.8183438 7.5,14.59375 C7.5,14.8410938 7.4350625,15.0840937 7.31215625,15.2965312 C7.13146875,15.6087812 7.3576875,16 7.717875,16 L11.71875,16 C11.977625,16 12.1875,15.790125 12.1875,15.53125 L12.1875,10.5616563 C12.1875,10.2009375 11.7959375,9.97553125 11.4840312,10.1559063 C11.2715937,10.2787812 11.0285625,10.34375 10.78125,10.34375 C10.0058438,10.34375 9.375,9.71290625 9.375,8.9375 C9.375,8.16209375 10.0058438,7.53125 10.78125,7.53125 Z M10.78125,11.28125 C10.9393125,11.28125 11.096375,11.2652812 11.25,11.234 L11.25,15.0625 L8.39021875,15.0625 C8.42153125,14.9088438 8.4375,14.7518125 8.4375,14.59375 C8.4375,13.3014062 7.38609375,12.25 6.09375,12.25 C4.80140625,12.25 3.75,13.3014062 3.75,14.59375 C3.75,14.7518125 3.76596875,14.9088438 3.79728125,15.0625 L0.9375,15.0625 L0.9375,11.234 C1.091125,11.2652812 1.2481875,11.28125 1.40625,11.28125 C2.69859375,11.28125 3.75,10.2298438 3.75,8.9375 C3.75,7.64515625 2.69859375,6.59375 1.40625,6.59375 C1.2481875,6.59375 1.091125,6.60971875 0.9375,6.641 L0.9375,3.78125 L4.46959375,3.78125 C4.8303125,3.78125 5.05578125,3.389625 4.8753125,3.07778125 C4.75596875,2.87140625 4.6875,2.603875 4.6875,2.34375 C4.6875,1.56834375 5.31834375,0.9375 6.09375,0.9375 C6.86915625,0.9375 7.5,1.56834375 7.5,2.34375 C7.5,2.603875 7.43153125,2.87140625 7.31215625,3.07778125 C7.13146875,3.39003125 7.3576875,3.78125 7.717875,3.78125 L11.25,3.78125 L11.25,6.641 C11.096375,6.60971875 10.9393125,6.59375 10.78125,6.59375 C9.48890625,6.59375 8.4375,7.64515625 8.4375,8.9375 C8.4375,10.2298438 9.48890625,11.28125 10.78125,11.28125 Z"}))))}function s(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.125,3.66666667 C16.8969136,3.66666667 18.3333333,5.10308643 18.3333333,6.875 L18.3333333,15.125 C18.3333333,16.8969136 16.8969136,18.3333333 15.125,18.3333333 L6.875,18.3333333 C5.10308643,18.3333333 3.66666667,16.8969136 3.66666667,15.125 L3.66666667,6.875 C3.66666667,5.10308643 5.10308643,3.66666667 6.875,3.66666667 L15.125,3.66666667 Z M15.125,4.58333333 L6.875,4.58333333 C5.60934745,4.58333333 4.58333333,5.60934745 4.58333333,6.875 L4.58333333,15.125 C4.58333333,16.3906526 5.60934745,17.4166667 6.875,17.4166667 L15.125,17.4166667 C16.3906526,17.4166667 17.4166667,16.3906526 17.4166667,15.125 L17.4166667,6.875 C17.4166667,5.60934745 16.3906526,4.58333333 15.125,4.58333333 Z M7.33333333,13.2916667 C7.83959435,13.2916667 8.25,13.7020723 8.25,14.2083333 C8.25,14.7145944 7.83959435,15.125 7.33333333,15.125 C6.82707231,15.125 6.41666667,14.7145944 6.41666667,14.2083333 C6.41666667,13.7020723 6.82707231,13.2916667 7.33333333,13.2916667 Z M15.0349223,13.75 C15.2880528,13.75 15.4932556,13.9552028 15.4932556,14.2083333 C15.4932556,14.4614638 15.2880528,14.6666667 15.0349223,14.6666667 L9.625,14.6666667 C9.37186949,14.6666667 9.16666667,14.4614638 9.16666667,14.2083333 C9.16666667,13.9552028 9.37186949,13.75 9.625,13.75 L15.0349223,13.75 Z M7.33333333,10.0833333 C7.83959435,10.0833333 8.25,10.493739 8.25,11 C8.25,11.506261 7.83959435,11.9166667 7.33333333,11.9166667 C6.82707231,11.9166667 6.41666667,11.506261 6.41666667,11 C6.41666667,10.493739 6.82707231,10.0833333 7.33333333,10.0833333 Z M15.125,10.5416667 C15.3781305,10.5416667 15.5833333,10.7468695 15.5833333,11 C15.5833333,11.2531305 15.3781305,11.4583333 15.125,11.4583333 L9.625,11.4583333 C9.37186949,11.4583333 9.16666667,11.2531305 9.16666667,11 C9.16666667,10.7468695 9.37186949,10.5416667 9.625,10.5416667 L15.125,10.5416667 Z M7.33333333,6.875 C7.83959435,6.875 8.25,7.28540565 8.25,7.79166667 C8.25,8.29792769 7.83959435,8.70833333 7.33333333,8.70833333 C6.82707231,8.70833333 6.41666667,8.29792769 6.41666667,7.79166667 C6.41666667,7.28540565 6.82707231,6.875 7.33333333,6.875 Z M15.125,7.33333333 C15.3781305,7.33333333 15.5833333,7.53853616 15.5833333,7.79166667 C15.5833333,8.04479718 15.3781305,8.25 15.125,8.25 L9.625,8.25 C9.37186949,8.25 9.16666667,8.04479718 9.16666667,7.79166667 C9.16666667,7.53853616 9.37186949,7.33333333 9.625,7.33333333 L15.125,7.33333333 Z"})))}function f(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M19,5 C19.5522847,5 20,5.44771525 20,6 L20,18 C20,18.5522847 19.5522847,19 19,19 L5,19 C4.44771525,19 4,18.5522847 4,18 L4,6 C4,5.44771525 4.44771525,5 5,5 L19,5 Z M19,6 L5,6 L5,18 L19,18 L19,6 Z M13.5270821,8.72788029 L17.419465,14.7278803 C17.5697525,14.9595444 17.5037838,15.2691774 17.2721197,15.419465 C17.0404556,15.5697525 16.7308226,15.5037838 16.580535,15.2721197 L13.0911139,9.89327406 L11.4091273,12.2874279 C11.2306031,12.5415408 10.866042,12.5731488 10.6464466,12.3535534 L10.0540971,11.7612039 L7.4,15.3 C7.23431458,15.5209139 6.9209139,15.5656854 6.7,15.4 C6.4790861,15.2343146 6.43431458,14.9209139 6.6,14.7 L9.6,10.7 C9.7825648,10.4565803 10.1383987,10.4312919 10.3535534,10.6464466 L10.9328729,11.2257661 L12.6984898,8.71257207 C12.9021272,8.42271292 13.3342903,8.43069712 13.5270821,8.72788029 Z M8,7.5 C8.82842712,7.5 9.5,8.17157288 9.5,9 C9.5,9.82842712 8.82842712,10.5 8,10.5 C7.17157288,10.5 6.5,9.82842712 6.5,9 C6.5,8.17157288 7.17157288,7.5 8,7.5 Z M8,8.5 C7.72385763,8.5 7.5,8.72385763 7.5,9 C7.5,9.27614237 7.72385763,9.5 8,9.5 C8.27614237,9.5 8.5,9.27614237 8.5,9 C8.5,8.72385763 8.27614237,8.5 8,8.5 Z"}))}function p(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.0505278,14.68561 L15.4700891,14.1696106 C16.3000604,13.1488666 16.7599031,11.8782117 16.7599031,10.5341182 C16.7599031,7.34884269 14.1777271,4.76666667 10.9924516,4.76666667 C7.80717602,4.76666667 5.225,7.34884269 5.225,10.5341182 C5.225,13.7193938 7.80717602,16.3015698 10.9924516,16.3015698 C11.8841204,16.3015698 12.744766,16.0998293 13.5263257,15.7168631 L13.9796508,15.4947327 L15.7162646,16.2389957 L15.0505278,14.68561 Z M17.8106022,18.3333333 L14.0103444,16.7046514 C13.0994588,17.1509876 12.0752185,17.4015698 10.9924516,17.4015698 C7.1996628,17.4015698 4.125,14.326907 4.125,10.5341182 C4.125,6.74132946 7.1996628,3.66666667 10.9924516,3.66666667 C14.7852403,3.66666667 17.8599031,6.74132946 17.8599031,10.5341182 C17.8599031,12.175402 17.2841351,13.682208 16.3235621,14.8635731 L17.8106022,18.3333333 Z"})))}var y,h=n(130),d=n(21);function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return w}));var b=o.a.encloseNamespace("shared.interactionTypes"),m=function(t,e){return o.a.isInitialised()?b(t):e},g=(v(y={},h.InteractionTypeId.Annotation,(function(){return{name:m("annotationName","Annotation"),bgClassName:"bg-pink",Svg:p,typeName:"annotation"}})),v(y,h.InteractionTypeId.Image,(function(){return{name:m("imageName","Image"),bgClassName:"bg-orange",Svg:f,typeName:"image"}})),v(y,h.InteractionTypeId.MissingWord,(function(){return{name:m("missingWordName","Missing word"),prompt:m("missingWordPrompt","Fill in the blank by typing the missing word(s)"),bgClassName:"bg-teal",Svg:l,typeName:"missing-word"}})),v(y,h.InteractionTypeId.MultipleChoice,(function(){return{name:m("multipleChoiceName","Multiple choice"),prompt:m("multipleChoicePrompt","Choose the correct answer(s)"),bgClassName:"bg-blue",Svg:s,typeName:"multiple-choice"}})),v(y,h.InteractionTypeId.ShortAnswer,(function(){return{name:m("shortAnswerName","Short answer"),prompt:m("shortAnswerPrompt","Type in your answer to the question"),bgClassName:"bg-green",Svg:u,typeName:"short-answer"}})),v(y,h.InteractionTypeId.TrueOrFalse,(function(){return{name:m("trueOrFalseName","True or false"),prompt:m("trueOrFalsePrompt","Choose the correct answer"),bgClassName:"bg-purple",Svg:c,typeName:"true-or-false"}})),y),w={getTypeInfo:function(t){var e=g[t];if(e)return e();r.a.ErrorHelper.throw(new d.a("No type info defined for typeId: ".concat(t)))}}},1145:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(0),o=n.n(r),i=n(9),a=n(7),c=n(32),u=n(193),l=n(1098),s=n(1100),f=n(1146),p=n(1094),y=a.a.encloseNamespace("shared.engagementOverviewCard");function h(t){var e,n,r=Object(u.a)(),a=Object(u.b)(),h=!r.users&&!r.classrooms&&!r.classroomGroups,d=i.a.useBasicFetch(!!t.useSharerId&&c.a.currentUser()),v=i.a.useBasicFetch(!!a&&(t.useSharerId?!!d.data&&l.a.aggregateEngagement(t.objectId,a,d.data.id):l.a.aggregateEngagement(t.objectId,a)));Object(p.a)(v);var b=(null===(e=v.data)||void 0===e?void 0:e.engagementRate)>0?v.data.engagementRate:null;return o.a.createElement("div",{className:"d-flex flex-column rounded bg-white p-3 ".concat(null!==(n=t.className)&&void 0!==n?n:"")},o.a.createElement("h3",{className:"h6 mb-2"},y("heading")),o.a.createElement("div",{className:"d-flex align-items-center flex-grow-1\n ".concat("vertical"===t.layout?" flex-column justify-content-center text-center":"")},!!v.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{percentage:b,layout:s.b.LabelInside}),o.a.createElement("p",{className:"horizontal"===t.layout?"ml-2":""},"number"==typeof b?y(h?"descriptionEveryone":"descriptionSome",{percentage:Math.round(100*v.data.engagementRate)}):y("descriptionNoData"))),!v.data&&o.a.createElement(o.a.Fragment,null,o.a.createElement(f.a,{layout:s.b.LabelInside}),"vertical"===t.layout&&o.a.createElement("p",null," "))))}},1146:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(1100);function a(t){return o.a.createElement(i.a,{layout:t.layout,className:t.className,percentage:0,customLabel:"--%"})}},1148:function(t,e,n){t.exports={name:"_3csgE",widgetItem:"_1oyw1",text:"_9RS0a",imagePanel:"_1UOVG",image:"_1_BF4",large:"_1EtWs",comingSoonPanel:"_3js2e",editSubjectsItem:"_1yBMf",allSubjectsItem:"_2oBMH",logoContainer:"T3Lym"}},1153:function(t,e,n){},1154:function(t,e,n){"use strict";function r(t){return new Array(Math.ceil(t.videoDuration)).fill(null).map((function(e,n){return t.heatMap[n]||0}))}n.d(e,"a",(function(){return r}))},1155:function(t,e,n){t.exports={playerContainer:"_1-TM0",playerPlaceholder:"_2Gd0W",heatMapContainer:"_2mepP",heatMap:"_3QIok",heatMapTimepointIndicator:"_3EouS",heatMapTimepointIndicatorVisible:"_1472A",partialLoadingContainer:"_1Z2fg"}},1177:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(37),o={createViewKey:function(t,e,n){var o={mediaId:t.toString(),mediaIdType:e};return n&&(o.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(t,":").concat(e),type:r.a.POST,data:o,expiryTime:28800}}}},1178:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Share="share",t.MasterObject="masterobject"}(r||(r={}))},1179:function(t){t.exports=JSON.parse('{"a":"1.2.1-dev.0"}')},1180:function(t,e,n){},1181:function(t,e,n){},1182:function(t,e,n){},1183:function(t,e,n){},1184:function(t,e,n){},1185:function(t,e,n){},1186:function(t,e,n){},1187:function(t,e,n){},1188:function(t,e,n){},1189:function(t,e,n){},1190:function(t,e,n){},1191:function(t,e,n){},1192:function(t,e,n){},1193:function(t,e,n){},1194:function(t,e,n){},1195:function(t,e,n){},1196:function(t,e,n){},1197:function(t,e,n){},1198:function(t,e,n){},1199:function(t,e,n){},1200:function(t,e,n){},1201:function(t,e,n){},1202:function(t,e,n){},1203:function(t,e,n){},1204:function(t,e,n){},1205:function(t,e,n){},1206:function(t,e,n){},1207:function(t,e,n){},1208:function(t,e,n){},1209:function(t,e,n){},1210:function(t,e,n){},1211:function(t,e,n){},1212:function(t,e,n){},1213:function(t,e,n){},1214:function(t,e,n){},1215:function(t,e,n){},1216:function(t,e,n){t.exports={heatMap:"_3eiuN",legend:"_2Ubvw"}},1217:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n.n(r),i=n(7),a=n(1139),c=n(1155),u=n.n(c),l=i.a.encloseNamespace("shared.videoEngagementOverlay");function s(){return o.a.createElement("div",{className:"bg-white rounded d-flex flex-column justify-content-end p-2 ".concat(u.a.partialLoadingContainer)},o.a.createElement("div",{className:u.a.heatMapContainer},o.a.createElement("div",{className:"position-relative"},o.a.createElement(a.a,{engagement:{heatMap:[],videoDuration:0},className:u.a.heatMap}))),o.a.createElement("div",{className:"d-flex justify-content-between mt-2"},o.a.createElement("strong",null,l("engagement")),o.a.createElement("div",{className:"w-33"},o.a.createElement(a.b,null))))}},1218:function(t,e,n){t.exports={heatMap:"_29m1b"}},1219:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(0),o=n(9),i=n(42),a=n(32),c=n(101),u=n(63),l=n(43),s=n(1098),f=n(193);function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(t,e)}(t,e)||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 y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,Object(c.a)().hasPermissions)(u.a.ViewCustomerAnalytics),n=Object(f.b)(),y=o.a.useBasicFetch(a.a.currentUser()),h=e&&!!y.data&&!!n,d=o.a.useBasicFetch(h&&s.a.individualEngagement(t,{start:null==n?void 0:n.start,end:null==n?void 0:n.end},y.data.id)),v=p(Object(i.a)(l.a.AUDIENCE_FILTER_SUGGESTIONS),2)[1];Object(r.useEffect)((function(){var t;d.data&&v("users",null===(t=d.data)||void 0===t?void 0:t.data.map((function(t){return t.userId})))}),[d.isFetching])}},1221:function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return a}));var i={video:"thumbnail",clip:"video[thumbnail]",interactive:"video[thumbnail],thumbnail,clip[video[thumbnail]]"},a={video:function(t,e,n,r){return{url:"{gateway}/v1/objects/".concat(t),key:"video:".concat(t),success:e,error:n,always:r}},videoTypesById:function(t,e,n,o){t.sort();var a=t.map((function(t){return"id=".concat(t)})),c=Object.keys(i).map((function(t){return"query.".concat(t,"=").concat(i[t])}));return{url:"{gateway}/v1/objects?".concat([].concat(r(a),r(c)).join("&")),key:"video:types:".concat(t.join(",")),success:e,error:n,always:o}}}},1222:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n(1093),c=(n(1268),n(1179)),u="cv-persisttest",l=function(){try{return window.localStorage.setItem(u,"cv-player-storage-test"),window.localStorage.removeItem(u),!0}catch(t){return!1}},s=function(t){return window.localStorage.getItem(t)},f=function(t,e){window.localStorage.setItem(t,e)},p=function(t){window.localStorage.removeItem(t)};function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=a.a.getPlugin("plugin"),w="cvplayer-mute",O=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(i,t);var e,n,r,o=v(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).player.ready((function(){return e.initialize()})),e}return e=i,(n=[{key:"initialize",value:function(){var t=this;if(this.player.options_.mobile)this.removeVolumeControl();else if(l()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){t.player.off("volumechange",t.saveVolumeState)}));var e=s("cvplayer-volume"),n=s(w);e&&this.player.volume(+e),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){f("cvplayer-volume",this.player.volume().toString()),f(w,this.player.muted().toString())}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}}])&&h(e.prototype,n),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(g);function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=k(t);if(e){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(t,e){if(e&&("object"===j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return P(t)}function P(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k(t){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerPlugin("persistVolumePlugin",O);var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(i,t);var e,n,r,o=S(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).hasScreenOrientation()&&e.player.supportsFullScreen()?(e.onRotate=e.onRotate.bind(P(e)),e.onFullscreenChange=e.onFullscreenChange.bind(P(e)),e.player.ready((function(){return e.initialize()})),e):E(e)}return e=i,(n=[{key:"initialize",value:function(){var t=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",t.onRotate),t.hasScreenLock()&&t.player.off("fullscreenchange",t.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"hasScreenLock",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&C(e.prototype,n),r&&C(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("fullscreenOnRotatePlugin",T);var x="\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";n(1180);function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function I(t,e){return(I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=M(t);if(e){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(t,e){if(e&&("object"===L(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return A(t)}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(i,t);var e,n,r,o=N(i);function i(t,e){var n,r,a,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).update=(r=n.update.bind(A(n)),a=1e3,c=window.performance.now(),function(){var t=window.performance.now();t-c>=a&&(r.apply(void 0,arguments),c=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return e=i,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:x,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=a.a.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&R(e.prototype,n),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Button"));function F(t){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function z(t,e){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function V(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H(t);if(e){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return U(this,n)}}function U(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function H(t){return(H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}D.prototype.controlText_="Open in ClickView",a.a.registerComponent("OpenExternallyButton",D);var q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(i,t);var e,n,r,o=V(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=i,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&G(e.prototype,n),r&&G(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("openExternallyPlugin",q);n(1181);function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(){return(K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Y(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Y(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=X(t)););return t}function Z(t,e){return(Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=X(t);if(e){var o=X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return J(this,n)}}function J(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function X(t){return(X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Z(t,e)}(i,t);var e,n,r,o=$(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(K(X(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return K(X(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(t,e){var n=this,r=t>0,o=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Q(e.prototype,n),r&&Q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("component"));function et(t){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rt(){return(rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ot(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ot(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}function it(t,e){return(it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function at(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ut(t);if(e){var o=ut(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}function ct(t,e){if(e&&("object"===et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ut(t){return(ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("TouchControls",tt);var lt=a.a.getPlugin("plugin"),st=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(i,t);var e,n,r,o=at(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).doubleTouchCount=0,e.seekStartTime=0,e.directionModifier=0,e.bindFunctions(),e.player.ready((function(){return e.initialize()})),e}return e=i,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){rt(ut(i.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.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))}}])&&nt(e.prototype,n),r&&nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lt);function ft(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}a.a.registerPlugin("touchControls",st);var pt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)}var e,n,r;return e=t,(n=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&ft(e.prototype,n),r&&ft(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yt(t){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dt(t,e){return(dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mt(t);if(e){var o=mt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bt(this,n)}}function bt(t,e){if(e&&("object"===yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function mt(t){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(i,t);var e,n,r,o=vt(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options_=e,n.player.ready((function(){return n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,n=this.getSourceById(t);if(null===n)return this.currentSource;var r=this.player.currentTime(),o=!this.player.paused();this._currentSource=n;var i=this.player.playbackRate();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(i),e.player.currentTime()!==r&&e.player.currentTime(r),o&&e.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new pt(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),t.default&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}])&&ht(e.prototype,n),r&&ht(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ot(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ot=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==wt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function jt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}a.a.registerPlugin("progressiveFiles",gt);var Ct=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},_t=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)}var e,n,r;return e=t,(n=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return Ct(this,void 0,void 0,Ot().mark((function t(){var e,n,r,o;return Ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,n=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return r=t.sent,t.next=9,r.text();case 9:return o=t.sent,clearTimeout(n),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})))}}])&&jt(e.prototype,n),r&&jt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Et=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var o=t[r];o.enabled=n.id===o.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var o=r+1;o<n.length;o++){var i=n[o],a=t.getQualityLevelById(i);if(a)return a}for(var c=r-1;c>0;c--){var u=n[c],l=t.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(t){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */kt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Pt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var xt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Lt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=a.a.log.createLogger("localcache")}var e,n,r;return e=t,(n=[{key:"setSource",value:function(t,e){return xt(this,void 0,void 0,kt().mark((function n(){var r;return kt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.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),t.src=r.getUrl(t.src));case 5:e(null,t);case 6:case"end":return n.stop()}}),n,this)})))}}])&&Tt(e.prototype,n),r&&Tt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();a.a.use("*",(function(t){return new Lt(t)}));n(1182);function Rt(t){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function It(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */It=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Rt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bt(){return(Bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=At(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function At(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zt(t)););return t}function Mt(t,e){return(Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zt(t);if(e){var o=zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ft(this,n)}}function Ft(t,e){if(e&&("object"===Rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Gt(t)}function Gt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zt(t){return(zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Ut='<?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>',Ht=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)}(i,t);var e,n,r,o=Dt(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Gt(n)),t.ready((function(){n.initialize()})),n}return e=i,(n=[{key:"createEl",value:function(){return Bt(zt(i.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Ut,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Vt(this,void 0,void 0,It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})))}}])&&Nt(e.prototype,n),r&&Nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Wt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==qt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Qt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(){return(Kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Yt(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Yt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=te(t)););return t}function Zt(t,e){return(Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $t(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=te(t);if(e){var o=te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jt(this,n)}}function Jt(t,e){if(e&&("object"===qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xt(t)}function Xt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function te(t){return(te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("localCacheIndicator",Ht);var ee=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},ne=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(i,t);var e,n,r,o=$t(i);function i(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).logger_=a.a.log.createLogger("localcache"),void 0===e)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Xt(n)),n.localCaches_=e.localCacheAddresses.map((function(t){return new _t(t)})),n.player.ready((function(){n.initialize(),e.enabled&&n.enable()})),n}return e=i,(n=[{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:"dispose",value:function(){this.player.off("error",this.onPlayerError),Kt(te(i.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var t;(null===(t=this.player.error())||void 0===t?void 0:t.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return ee(this,void 0,void 0,Wt().mark((function t(){var e,n,r,o=this;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],n=function(t){return ee(o,void 0,void 0,Wt().mark((function n(){return Wt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.ping();case 2:if(!n.sent){n.next=4;break}e.push(t);case 4:case"end":return n.stop()}}),n)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return n(t)})));case 4:if(!(e.length>0)){t.next=8;break}return r=e[0],this.onLocalCacheChange(r),t.abrupt("return",r);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),Et.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}])&&Qt(e.prototype,n),r&&Qt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function re(t){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ie(t,e){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ae(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ue(t);if(e){var o=ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(t,e){if(e&&("object"===re(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ue(t){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerPlugin("localCache",ne);var le=a.a.getPlugin("plugin"),se=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ie(t,e)}(i,t);var e,n,r,o=ae(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.initialize(),n}return e=i,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var t=!!this.options.showSubtitles,e=this.safeGet("cvplayer-show-subtitles");if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(t){if(l())return s(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++){var n=t[e];if("showing"===n.mode)return f("cvplayer-show-subtitles","true"),void f("cvplayer-selected-language",n.language)}f("cvplayer-show-subtitles","false"),p("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var t=this;l()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();f("cvplayer-subtitle-size",t)}},{key:"guessWhichTrack",value:function(){for(var t,e,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),o=r.language,i=r.country,a=this.player.textTracks(),c=0;c<a.length;c++){var u=a[c],l=this.getLanguageParts(u.language),s=l.language,f=l.country;if(s===o&&(t=u,f||(e=u),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}}])&&oe(e.prototype,n),r&&oe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(le);function fe(t){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pe=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==fe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function ye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function he(t,e){return(he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function de(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=be(t);if(e){var o=be(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(t,e){if(e&&("object"===fe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function be(t){return(be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerPlugin("persistSubtitleSettingsPlugin",se);var me=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},ge=a.a.getPlugin("plugin"),we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e)}(i,t);var e,n,r,o=de(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.player.ready((function(){return n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){return me(this,void 0,void 0,pe().mark((function t(){var e,n,r,o,i=this;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),l()&&(r=s(this.getStorageKey(!!e)))&&(n=r),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||Et.enableProfileOrNextBest(o,n),l()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){return me(this,void 0,void 0,pe().mark((function t(){var e,n,r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:e=t.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],f(this.getStorageKey(e),r.id);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return me(this,void 0,void 0,pe().mark((function t(){return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&ye(e.prototype,n),r&&ye(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(ge);a.a.registerPlugin("persistQualitySettingsPlugin",we);n(1183);function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function je(t){return function(t){if(Array.isArray(t))return Ce(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ce(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Se(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ee(t,e,n){return e&&Se(t.prototype,e),n&&Se(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ke(t,e)}function ke(t,e){return(ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Te(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Le(t);if(e){var o=Le(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xe(this,n)}}function xe(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Le(t){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Re=a.a.getComponent("Component"),Ie=function(t){Pe(n,t);var e=Te(n);function n(t,r){return _e(this,n),e.call(this,t,r)}return Ee(n,[{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),n=(t.end.time-t.start.time)/e;this.el_.style.width=100*n+"%";var r=t.start.time/e;this.el_.style.left=100*r+"%"}}]),n}(Re),Ne=function(t){Pe(n,t);var e=Te(n);function n(){var t;return _e(this,n),(t=e.apply(this,arguments)).events_=[],t}return Ee(n,[{key:"update",value:function(){for(var t=this,e=this.children(),n=e.length;n>0;n--)this.removeChild(e[n]);this.events_.forEach((function(e){var n=new Ie(t.player(),{event:e});t.addChild(n),n.update()}))}},{key:"addEvents",value:function(t){var e;(e=this.events_).push.apply(e,je(t)),this.update()}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(Re);function Be(t){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Me(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function De(t,e){return(De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ze(t);if(e){var o=ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(t,e){if(e&&("object"===Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ze(t){return(ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ve=a.a.getPlugin("plugin"),Ue="play",He="playing",qe="pause",We="seeking",Qe="seekstart",Ke="seekend",Ye="ended",Ze="pausedseek",$e="timeupdate",Je=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&De(t,e)}(i,t);var e,n,r,o=Fe(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=e,n.player.ready((function(){return n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t,e=this,n=(Ae(t={},Ue,(function(){return e.onPlay()})),Ae(t,qe,(function(){return e.onPause()})),Ae(t,$e,(function(){return e.onTimeUpdate()})),Ae(t,We,(function(){return e.onSeeking()})),Ae(t,Ye,(function(){return e.onEnded()})),Ae(t,He,(function(){return e.onPlaying()})),t),r=Object.keys(n);r.forEach((function(t){return e.player.on(t,n[t])})),this.one("dispose",(function(){r.forEach((function(t){return e.player.off(t,n[t])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,n=this,r="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=e.key)&&n.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){r=""}),500)},i=!1,a=function(){i=!0,e=window.setTimeout((function(){i&&n.addDisplay()}),1e4)};function c(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",c),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=n.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),u.off("touchstart",a),u.off("touchend",c)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Ne(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Ke),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Ue)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(qe),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Ue)),this.isPlaying&&!this.isSeeking&&this.logEvent(He)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(Ze),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Qe))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Ye)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Qe&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===He||t===Ue)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===He||t===qe}},{key:"shouldClearCarriedOverTime",value:function(t){return t===Ye||t===Ze}},{key:"flushBuffer",value:function(){for(var t,e,n=[],r={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:r.start?o.type===He&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),r.end=o,n.push(r),r={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=o)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(n))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),e<n}}])&&Me(e.prototype,n),r&&Me(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ve);a.a.registerPlugin("progressReporterPlugin",Je);n(1184);function Xe(t){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function en(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nn(t,e){return(nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=an(t);if(e){var o=an(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return on(this,n)}}function on(t,e){if(e&&("object"===Xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function an(t){return(an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nn(t,e)}(i,t);var e,n,r,o=rn(i);function i(){return tn(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createEl",value:function(){return a.a.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&en(e.prototype,n),r&&en(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component")),un=["top","left","right","bottom"],ln={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(1185);function sn(t){return(sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yn(t,e,n){return e&&pn(t.prototype,e),n&&pn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function hn(){return(hn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=dn(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function dn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wn(t)););return t}function vn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return(bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wn(t);if(e){var o=wn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gn(this,n)}}function gn(t,e){if(e&&("object"===sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wn(t){return(wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var On=a.a.getComponent("Component"),jn=function(t){vn(n,t);var e=mn(n);function n(t,r){var o;return fn(this,n),(o=e.call(this,t,r)).bindEventListeners(),o}return yn(n,[{key:"createEl",value:function(){return hn(wn(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",o)}))}}]),n}(On),Cn=function(t){vn(n,t);var e=mn(n);function n(t,r){var o;return fn(this,n),(o=e.call(this,t,r)).addChildren(),o}return yn(n,[{key:"addChildren",value:function(){var t=this;un.forEach((function(e){t.addChild(new jn(t.player_,{side:e}))}))}}]),n}(On);function _n(t){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function En(){return(En="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Pn(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Pn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ln(t)););return t}function kn(t,e){return(kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ln(t);if(e){var o=Ln(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xn(this,n)}}function xn(t,e){if(e&&("object"===_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ln(t){return(Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}(i,t);var e,n,r,o=Tn(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"createEl",value:function(){return a.a.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var e=this;En(Ln(i.prototype),"handleClick",this).call(this,t),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&Sn(e.prototype,n),r&&Sn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function In(t){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bn(t,e){return(Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function An(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Dn(t);if(e){var o=Dn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mn(this,n)}}function Mn(t,e){if(e&&("object"===In(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Dn(t){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)}(i,t);var e,n,r,o=An(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Nn(e.prototype,n),r&&Nn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function Gn(t){return(Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Un(){return(Un="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Hn(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Hn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}function qn(t,e){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Wn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kn(t);if(e){var o=Kn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qn(this,n)}}function Qn(t,e){if(e&&("object"===Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kn(t){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Yn=a.a.getComponent("MenuButton"),Zn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)}(i,t);var e,n,r,o=Wn(i);function i(){var t;return zn(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new Rn(this.player_,{label:"Video Controls"})];return un.forEach((function(r){n.push(new Fn(t.player_,{side:r,label:ln[r],selectable:!0,multiSelectable:!1,selected:r===e}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Un(Kn(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ln[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Yn.prototype.handleClick.apply(this)}}])&&Vn(e.prototype,n),r&&Vn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Yn);n(1186);function $n(t){return($n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xn(t,e){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=nr(t);if(e){var o=nr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return er(this,n)}}function er(t,e){if(e&&("object"===$n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nr(t){return(nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rr="cv-whiteboard-side",or=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}(i,t);var e,n,r,o=tr(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).side="bottom",e.player.ready((function(){e.initialize()})),e}return e=i,(n=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(l()){var t=s(rr);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),n=new cn(this.player);this.button=new Zn(this.player),e.addChild(n),e.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){e.el().setAttribute("draggable","true")},o=function(){e.el().setAttribute("draggable","false")},i=function(e){t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle")},a=function(){t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Cn(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),l()&&f(rr,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),a.a.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),a.a.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Jn(e.prototype,n),r&&Jn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function ir(t){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ar(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cr(t,e){return(cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ur(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sr(t);if(e){var o=sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lr(this,n)}}function lr(t,e){if(e&&("object"===ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sr(t){return(sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerPlugin("whiteboardModePlugin",or);var fr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(i,t);var e,n,r,o=ur(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t)}return e=i,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var o=n[r],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];t.push({id:r.id,name:r.id+"p",selected:r.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&ar(e.prototype,n),r&&ar(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("deferMenusPlugin",fr);var pr=n(1269);function yr(t){return(yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vr(){return(vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=br(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function br(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Or(t)););return t}function mr(t,e){return(mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Or(t);if(e){var o=Or(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}function wr(t,e){if(e&&("object"===yr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Or(t){return(Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jr=a.a.getComponent("Menu"),Cr=jr.prototype,_r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e)}(i,t);var e,n,r,o=gr(i);function i(){return hr(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createEl",value:function(){var t=vr(Or(i.prototype),"createEl",this).call(this);return this.simpleBar=new pr.a(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():vr(Or(i.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),vr(Or(i.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(t){vr(Or(i.prototype),"addItem",this).call(this,t),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){vr(Or(i.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||Cr.handleBlur.call(this,t)}}])&&dr(e.prototype,n),r&&dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(jr);function Sr(t){return(Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Er(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kr(t,e){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Lr(t);if(e){var o=Lr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xr(this,n)}}function xr(t,e){if(e&&("object"===Sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Lr(t){return(Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}jr.prototype=_r.prototype,a.a.registerComponent("Menu",_r);var Rr=a.a.getComponent("Component"),Ir=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(i,t);var e,n,r,o=Tr(i);function i(){return Er(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createMenu",value:function(){var t,e=new _r(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=a.a.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new Rr(this.player_,{el:n});e.addItem(r)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Pr(e.prototype,n),r&&Pr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuButton"));a.a.registerComponent("MenuButton",Ir);n(1187);function Nr(t){return(Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Br(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ar(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mr(){return(Mr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Dr(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Dr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vr(t)););return t}function Fr(t,e){return(Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Vr(t);if(e){var o=Vr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zr(this,n)}}function zr(t,e){if(e&&("object"===Nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vr(t){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ur=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)}(i,t);var e,n,r,o=Gr(i);function i(){return Br(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Mr(Vr(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Mr(Vr(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Ar(e.prototype,n),r&&Ar(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));Ur.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},a.a.registerComponent("TimeWrapper",Ur);n(1188);function Hr(t){return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qr(t,e,n){return e&&Wr(t.prototype,e),n&&Wr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kr(){return(Kr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Yr(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Yr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=to(t)););return t}function Zr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$r(t,e)}function $r(t,e){return($r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=to(t);if(e){var o=to(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xr(this,n)}}function Xr(t,e){if(e&&("object"===Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function to(t){return(to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var eo=function(t){Zr(n,t);var e=Jr(n);function n(t,r){return qr(this,n),e.call(this,t,r)}return Qr(n,[{key:"handleClick",value:function(t){var e=this;Kr(to(n.prototype),"handleClick",this).call(this,t),this.requestAnimationFrame((function(){e.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,e,r){if(!this.options_.item)return Kr(to(n.prototype),"createEl",this).call(this,t,e,r);var o=this.options_.item.getCollabsibleName(),i=this.options_.item.getCollabsibleValue(),c='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=a.a.dom.createEl("span",{innerHTML:i});var u=Kr(to(n.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item ".concat(i?"cv-has-cog-value":""),innerHTML:c},r);return u.appendChild(this.valueHolder_),u}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(a.a.getComponent("MenuItem")),no=function(t){Zr(n,t);var e=Jr(n);function n(t,r){return qr(this,n),e.call(this,t,r)}return Qr(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Kr(to(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Kr(to(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),Kr(to(n.prototype),"pressButton",this).call(this))}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var o=this.options_.items[r];o.isCollabsible&&(o.showInCollabsibleMenu()&&o.isCollapsed&&n.push(new eo(this.player_,{item:o})))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var r,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,o)})),n}},{key:"update",value:function(){Kr(to(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}]),n}(a.a.getComponent("MenuButton"));function ro(t){return(ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oo(){return(oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=io(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yo(t)););return t}function ao(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function co(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uo(t,e,n){return e&&co(t.prototype,e),n&&co(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function lo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&so(t,e)}function so(t,e){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yo(t);if(e){var o=yo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return po(this,n)}}function po(t,e){if(e&&("object"===ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yo(t){return(yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("cogButton",no);var ho=a.a.getComponent("MenuItem"),vo=a.a.getComponent("MenuButton"),bo=["large","medium","small"],mo=function(t){lo(n,t);var e=fo(n);function n(t,r){return ao(this,n),e.call(this,t,r)}return uo(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(ho),go=function(t){lo(n,t);var e=fo(n);function n(t,r){var o;return ao(this,n),(o=e.call(this,t,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.player_.ready((function(){o.update()})),o}return uo(n,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new Rn(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return bo.map((function(e){r.push(new mo(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(oo(yo(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){vo.prototype.handleClick.apply(this)}}]),n}(vo);function wo(t,e,n,r){t.kind===e&&(n&&t.label!==n||(t.loaded_?r(t):t.one("loadeddata",(function(){r(t)}))))}a.a.registerComponent("SubtitleSizeButton",go);var Oo=function(t,e,n,r){var o=function(t){wo(t.track,e,n,r)},i=t.textTracks(),a=function(t,e,n){if(t.length)for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.kind===e){if(n&&o.label!==n)continue;return o}}}(i,e,n);a?wo(a,e,n,r):(i.addEventListener("addtrack",o),t.one("dispose",(function(){i.removeEventListener("addtrack",o)})))},jo=function(t){if(!t)return null;for(var e=t.textTracks(),n=0;n<e.length;n++){var r=e[n];if("showing"===r.mode)return r}return null};function Co(t){return(Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function So(t,e){return(So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Eo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ko(t);if(e){var o=ko(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Po(this,n)}}function Po(t,e){if(e&&("object"===Co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ko(t){return(ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var To=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&So(t,e)}(i,t);var e,n,r,o=Eo(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],o=0;t.forEach((function(t){var i=n.options_.label.substr(o,t);i&&r.push(i),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),o=t+e})),r.push(this.options_.label.substring(o,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(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&_o(e.prototype,n),r&&_o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function xo(t){return(xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ro(){return(Ro="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Io(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Do(t)););return t}function No(t,e){return(No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Do(t);if(e){var o=Do(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ao(this,n)}}function Ao(t,e){if(e&&("object"===xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mo(t)}function Mo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Do(t){return(Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&No(t,e)}(i,t);var e,n,r,o=Bo(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).onChange=function(t,e,n){var r,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){i.clearTimeout(r),r=null},c=function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];var l=function(){r=null,l=null,n||t.apply(this,c)};!r&&n&&t.apply(o,c),i.clearTimeout(r),r=i.setTimeout(l,e)};return c.cancel=a,c}(n.onChange,100,!1,Mo(n)),n.bindEventListeners(),n}return e=i,(n=[{key:"createEl",value:function(){return Ro(Do(i.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\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="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.menuButton.search(e.value)}}])&&Lo(e.prototype,n),r&&Lo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));n(1189);function Go(t){return(Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uo(t,e,n){return e&&Vo(t.prototype,e),n&&Vo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ho(){return(Ho="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=qo(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function qo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$o(t)););return t}function Wo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qo(t,e)}function Qo(t,e){return(Qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ko(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$o(t);if(e){var o=$o(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yo(this,n)}}function Yo(t,e){if(e&&("object"===Go(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zo(t)}function Zo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $o(t){return($o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jo=a.a.getComponent("MenuItem"),Xo=a.a.getComponent("MenuButton"),ti=function(t){Wo(n,t);var e=Ko(n);function n(){return zo(this,n),e.apply(this,arguments)}return Uo(n,[{key:"createEl",value:function(t,e,r){return Ho($o(n.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(Jo),ei=function(t){Wo(n,t);var e=Ko(n);function n(t,r){var o;return zo(this,n),(o=e.call(this,t,r)).alwaysCollapsed=!0,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(Zo(o)),o.player_.textTracks().addEventListener("selectedlanguagechange",o.update),o}return Uo(n,[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=jo(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new Fo(this.player_,{menuButton:this})],r=0;r<e.cues.length;r++){var o=e.cues[r];n.push(new To(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new ti(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),n.push(i),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=jo(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],c=void 0;c=r.exec(i);)a.push(c.index);a.length&&(n[o]=a)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Ho($o(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Ho($o(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Ho($o(n.prototype),"pressButton",this).call(this);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Xo.prototype.handleClick.apply(this)}}]),n}(Xo);a.a.registerComponent("subtitleSearchButton",ei);n(1190);function ni(t){return(ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ri(){return(ri="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=oi(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function oi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pi(t)););return t}function ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ci(t,e,n){return e&&ai(t.prototype,e),n&&ai(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ui(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&li(t,e)}function li(t,e){return(li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function si(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pi(t);if(e){var o=pi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fi(this,n)}}function fi(t,e){if(e&&("object"===ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pi(t){return(pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yi=a.a.getComponent("MenuItem"),hi=a.a.getComponent("MenuButton"),di=[{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"}],vi=function(t){ui(n,t);var e=si(n);function n(t,r){return ii(this,n),e.call(this,t,r)}return ci(n,[{key:"createEl",value:function(){return a.a.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}]),n}(yi),bi=function(t){ui(n,t);var e=si(n);function n(){var t;return ii(this,n),(t=e.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return ci(n,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new Rn(this.player_,{label:"Keyboard Shortcuts"})),di.forEach((function(n){e.push(new vi(t.player_,n))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(ri(pi(n.prototype),"buildWrapperCSSClass",this).call(this))}},{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(){hi.prototype.handleClick.apply(this)}}]),n}(hi);a.a.registerComponent("KeyboardShortcutsButton",bi);n(1191),n(1192);function mi(t){return(mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wi(){return(wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Oi(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Oi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ei(t)););return t}function ji(t,e){return(ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ci(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ei(t);if(e){var o=Ei(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _i(this,n)}}function _i(t,e){if(e&&("object"===mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Si(t)}function Si(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ei(t){return(Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ji(t,e)}(i,t);var e,n,r,o=Ci(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(Si(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return e=i,(n=[{key:"togglehidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.el().getBoundingClientRect();if(0!==t.width){this.addClass("cv-collapsorator-ready");var e=t.width<600;this.player_.options_.deferMenus&&(e=!0),this.togglehidden(e)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(wi(Ei(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return wi(Ei(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&gi(e.prototype,n),r&&gi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ki(t){return(ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ti(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Li(t,e){return(Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ri(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ni(t);if(e){var o=Ni(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ii(this,n)}}function Ii(t,e){if(e&&("object"===ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ni(t){return(Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Pi.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},a.a.registerComponent("collapserator",Pi);var Bi=a.a.getComponent("SeekBar"),Ai=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Li(t,e)}(i,t);var e,n,r,o=Ri(i);function i(){return Ti(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleMouseDown",value:function(t){Bi.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseMove",value:function(t){Bi.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Bi.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&xi(e.prototype,n),r&&xi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Bi);a.a.registerComponent("SeekBar",Ai);n(1193);function Mi(t){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Di(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gi(){return(Gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zi(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function zi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qi(t)););return t}function Vi(t,e){return(Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ui(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=qi(t);if(e){var o=qi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hi(this,n)}}function Hi(t,e){if(e&&("object"===Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(i,t);var e,n,r,o=Ui(i);function i(){return Di(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Gi(qi(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Gi(qi(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(function(t){for(var e=t.buffered(),n=t.currentTime(),r=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=n&&a>=n){r=a;break}}return r}(t.player_))}))}}])&&Fi(e.prototype,n),r&&Fi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function Qi(t){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ki(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zi(){return(Zi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=$i(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function $i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ea(t)););return t}function Ji(t,e){return(Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Xi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ea(t);if(e){var o=ea(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ta(this,n)}}function ta(t,e){if(e&&("object"===Qi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ea(t){return(ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var na=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ji(t,e)}(i,t);var e,n,r,o=Xi(i);function i(){return Ki(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Zi(ea(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Zi(ea(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Yi(e.prototype,n),r&&Yi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ra(t){return(ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ia(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function aa(){return(aa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ca(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ca(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fa(t)););return t}function ua(t,e){return(ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function la(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fa(t);if(e){var o=fa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sa(this,n)}}function sa(t,e){if(e&&("object"===ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fa(t){return(fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ua(t,e)}(i,t);var e,n,r,o=la(i);function i(){return oa(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(aa(fa(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return aa(fa(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&ia(e.prototype,n),r&&ia(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ya(t){return(ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ha(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function da(){return(da="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=va(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function va(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wa(t)););return t}function ba(t,e){return(ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ma(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wa(t);if(e){var o=wa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ga(this,n)}}function ga(t,e){if(e&&("object"===ya(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wa(t){return(wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ba(t,e)}(i,t);var e,n,r,o=ma(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).playProgress=new pa(n.player_),n.addChild(n.playProgress),n.loadProgress=new na(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(da(wa(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return da(wa(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&ha(e.prototype,n),r&&ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function ja(t){return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ca(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _a(){return(_a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Sa(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Sa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xa(t)););return t}function Ea(t,e){return(Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xa(t);if(e){var o=xa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ka(this,n)}}function ka(t,e){if(e&&("object"===ja(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ta(t)}function Ta(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xa(t){return(xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var La=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ea(t,e)}(i,t);var e,n,r,o=Pa(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).onDurationChange=n.onDurationChange.bind(Ta(n)),n.createChapterItems=n.createChapterItems.bind(Ta(n)),n.updateBuffered=n.updateBuffered.bind(Ta(n)),Oo(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return e=i,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),_a(xa(i.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=_a(xa(i.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_=t);var r=new Wi(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,c=i.endTime,u=this.player_.duration();u&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(c=this.player_.duration()),c>u&&(c=u));var l=new Oa(this.player_,{startTime:a,endTime:c});if(r.addChild(l),u&&c===u)break}else r.addChild(new Oa(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Ca(e.prototype,n),r&&Ca(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("SeekBar"));La.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},a.a.browser.IS_IOS||a.a.browser.IS_ANDROID||La.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),a.a.registerComponent("ChapterSeekBar",La);n(1194);function Ra(t){return(Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ia(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Na(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ba(){return(Ba="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Aa(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Aa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ga(t)););return t}function Ma(t,e){return(Ma=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Da(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ga(t);if(e){var o=Ga(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fa(this,n)}}function Fa(t,e){if(e&&("object"===Ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ga(t){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var za=a.a.getComponent("ProgressControl"),Va=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ma(t,e)}(i,t);var e,n,r,o=Da(i);function i(){var t;return Ia(this,i),(t=o.apply(this,arguments)).seekBarName_="seekBar",t}return e=i,(n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())==="seekBar".toLowerCase()&&(t=this.seekBarName_),Ba(Ga(i.prototype),"getChild",this).call(this,t)}}])&&Na(e.prototype,n),r&&Na(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(za);function Ua(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=n="-"),(o=o>0||a>0?o+":":"")+(r=((o||i>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}Va.prototype.options_={children:[]},a.a.registerComponent("ProgressControl",Va);n(1195);function Ha(t){return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wa(){return(Wa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Qa(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Qa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$a(t)););return t}function Ka(t,e){return(Ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$a(t);if(e){var o=$a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Za(this,n)}}function Za(t,e){if(e&&("object"===Ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $a(t){return($a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ja=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ka(t,e)}(i,t);var e,n,r,o=Ya(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).hasCustomChapterText=!1,Oo(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return e=i,(n=[{key:"createEl",value:function(){var t=Wa($a(i.prototype),"createEl",this).call(this);return this.chapter_=a.a.dom.createEl("div"),t.appendChild(this.chapter_),this.time_=a.a.dom.createEl("div"),t.appendChild(this.time_),t}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(a.a.dom.textContent(this.time_,Ua(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=r.endTime||e;if(r.startTime<=t&&o>=t)return void a.a.dom.textContent(this.chapter_,r.text)}a.a.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,a.a.dom.textContent(this.chapter_,null!=t?t:"")}}])&&qa(e.prototype,n),r&&qa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("TimeTooltip"));a.a.registerComponent("TimeTooltip",Ja);n(1196);function Xa(t){return(Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ec(){return(ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=nc(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function nc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ac(t)););return t}function rc(t,e){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ac(t);if(e){var o=ac(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ic(this,n)}}function ic(t,e){if(e&&("object"===Xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ac(t){return(ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rc(t,e)}(i,t);var e,n,r,o=oc(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t=ec(ac(i.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=a.a.dom.createEl("img"),t.appendChild(this.img_),t}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=r.substr(5).split(",");return{src:n,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,o=t,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){r=this.parseImageLink(a.text);break}i++}if(null==r?void 0:r.src){this.enable();var c=r,u=c.src,l=c.w,s=c.h,f=c.x,p=c.y,y=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}])&&tc(e.prototype,n),r&&tc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));cc.prototype.options_={scaleFactor:1},a.a.registerComponent("ThumbnailDisplay",cc);n(1197);function uc(t){return(uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function sc(t,e){return(sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=hc(t);if(e){var o=hc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pc(this,n)}}function pc(t,e){if(e&&("object"===uc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yc(t)}function yc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hc(t){return(hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sc(t,e)}(i,t);var e,n,r,o=fc(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),Oo(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(yc(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return e=i,(n=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame((function(){var r=e*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var o=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-o.width/2+"px";var i=t.width*e;i<o.width/2?n.el_.style.left=o.width/2+"px":i>t.width-o.width/2?n.el_.style.left=t.width-o.width/2+"px":n.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&lc(e.prototype,n),r&&lc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MouseTimeDisplay"));dc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},a.a.registerComponent("MouseTimeDisplay",dc);n(1198);function vc(t){return(vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mc(){return(mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=gc(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function gc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cc(t)););return t}function wc(t,e){return(wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Oc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Cc(t);if(e){var o=Cc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jc(this,n)}}function jc(t,e){if(e&&("object"===vc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Cc(t){return(Cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _c=a.a.getComponent("ChaptersTrackMenuItem"),Sc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wc(t,e)}(i,t);var e,n,r,o=Oc(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).nonIconControl=!1,n.thumbnailDisplay=new cc(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Oo(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return e=i,(n=[{key:"update",value:function(){this.player_&&_c.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,e,n){return this.nonIconControl=!0,mc(Cc(i.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},e),n)}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Ua(this.options_.cue.startTime,t),")</p>")+"</span>"}}])&&bc(e.prototype,n),r&&bc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(_c);n(1199);function Ec(t){return(Ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kc(){return(kc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Tc(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Tc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nc(t)););return t}function xc(t,e){return(xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Lc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Nc(t);if(e){var o=Nc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rc(this,n)}}function Rc(t,e){if(e&&("object"===Ec(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ic(t)}function Ic(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nc(t){return(Nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xc(t,e)}(i,t);var e,n,r,o=Lc(i);function i(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Ic(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(kc(Nc(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(kc(Nc(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var o=e[n],i=new Sc(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var e=this;kc(Nc(i.prototype),"setTrack",this).call(this,t),this.track_&&"chapters"===this.track_.kind&&t.one("loadeddata",(function(){e.update()}))}},{key:"update",value:function(t){kc(Nc(i.prototype),"update",this).call(this,t)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Pc(e.prototype,n),r&&Pc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("ChaptersButton"));function Ac(t){return(Ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fc(){return(Fc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Gc(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Gc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hc(t)););return t}function zc(t,e){return(zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Vc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hc(t);if(e){var o=Hc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Uc(this,n)}}function Uc(t,e){if(e&&("object"===Ac(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hc(t){return(Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("ChaptersButton",Bc);var qc=a.a.getComponent("OffTextTrackMenuItem"),Wc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zc(t,e)}(i,t);var e,n,r,o=Vc(i);function i(){return Mc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){qc.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,e,n){return Fc(Hc(i.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},e),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Dc(e.prototype,n),r&&Dc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(qc);function Qc(t){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Kc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zc(t,e){return(Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xc(t);if(e){var o=Xc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jc(this,n)}}function Jc(t,e){if(e&&("object"===Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xc(t){return(Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("OffTextTrackMenuItem",Wc);var tu=a.a.getComponent("TextTrackButton"),eu=a.a.getComponent("TextTrackMenuItem"),nu=a.a.getComponent("OffTextTrackMenuItem"),ru=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zc(t,e)}(i,t);var e,n,r,o=$c(i);function i(){return Kc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eu;this.label_&&(t="".concat(this.label_," off")),e.push(new nu(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<r.length;o++){var i=r[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new n(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(a)}}return e}}])&&Yc(e.prototype,n),r&&Yc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(tu);function ou(t){return(ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function iu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function au(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cu(t,e){return(cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function uu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=su(t);if(e){var o=su(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lu(this,n)}}function lu(t,e){if(e&&("object"===ou(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function su(t){return(su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("TextTrackButton",ru);var fu=a.a.getComponent("SubsCapsMenuItem"),pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cu(t,e)}(i,t);var e,n,r,o=uu(i);function i(){return iu(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){fu.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&au(e.prototype,n),r&&au(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(fu);function yu(t){return(yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function du(t,e){return(du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mu(t);if(e){var o=mu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bu(this,n)}}function bu(t,e){if(e&&("object"===yu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function mu(t){return(mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&du(t,e)}(i,t);var e,n,r,o=vu(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(e=o.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-divider-after-menu-item"),e.addClass("cv-subtitle-size-menu-item"),e.controlText(", opens subtitle size settings"),e}return e=i,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&hu(e.prototype,n),r&&hu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("TextTrackMenuItem"));function wu(t){return(wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ou(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ju(t,e){return(ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Cu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Eu(t);if(e){var o=Eu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _u(this,n)}}function _u(t,e){if(e&&("object"===wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Su(t)}function Su(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Eu(t){return(Eu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ju(t,e)}(i,t);var e,n,r,o=Cu(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(e=o.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-subtitle-search-menu-item"),e.controlText(", opens subtitle search"),e.toggleEnabled=e.toggleEnabled.bind(Su(e));var r=e.player_.textTracks();return r.addEventListener("selectedlanguagechange",e.toggleEnabled),e.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",e.toggleEnabled)})),e.toggleEnabled(),e}return e=i,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=jo(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,n=jo(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Ou(e.prototype,n),r&&Ou(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("TextTrackMenuItem"));n(1200);function ku(t){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lu(){return(Lu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ru(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Ru(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Au(t)););return t}function Iu(t,e){return(Iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Au(t);if(e){var o=Au(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bu(this,n)}}function Bu(t,e){if(e&&("object"===ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Au(t){return(Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Mu=a.a.getComponent("TextTrackButton"),Du=a.a.getComponent("SubsCapsButton"),Fu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Iu(t,e)}(i,t);var e,n,r,o=Nu(i);function i(){var t;return Tu(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Lu(Au(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new Pu(this.player_)),t.push(new gu(this.player_)),this.hideThreshold_=this.hideThreshold_+2),Mu.prototype.createItems.call(this,t,pu)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Du.prototype.handleClick.apply(this)}}])&&xu(e.prototype,n),r&&xu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Du);function Gu(t){return(Gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zu=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Gu(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Vu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uu(t,e){return(Uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Hu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qu(t);if(e){var o=Qu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qu(this,n)}}function qu(t,e){if(e&&("object"===Gu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wu(t)}function Wu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qu(t){return(Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("SubsCapsButton",Fu);var Ku=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Yu="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Ut,"</span>"),Zu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uu(t,e)}(i,t);var e,n,r,o=Hu(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).qualityId=e.qualityId;var r=t.qualityLevels(),a=n.handleQualityChange.bind(Wu(n));return r.on("change",a),t.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(Wu(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return e=i,(n=[{key:"handleLocalCacheChange",value:function(){return Ku(this,void 0,void 0,zu().mark((function t(){var e,n;return zu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(n=t.sent)?void 0:n.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Yu);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Vu(e.prototype,n),r&&Vu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));n(1201);function $u(t){return($u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ju(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xu(){return(Xu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=tl(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function tl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=il(t)););return t}function el(t,e){return(el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=il(t);if(e){var o=il(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rl(this,n)}}function rl(t,e){if(e&&("object"===$u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ol(t)}function ol(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function il(t){return(il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var al={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},cl=a.a.getComponent("MenuButton"),ul=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&el(t,e)}(i,t);var e,n,r,o=nl(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(ol(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),t.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Xu(il(i.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Xu(il(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new Rn(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var o=al[r.id];o&&t.push(new Zu(this.player_,{qualityId:r.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?al[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){cl.prototype.handleClick.apply(this)}}])&&Ju(e.prototype,n),r&&Ju(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(cl);a.a.registerComponent("QualityButton",ul);n(1202);function ll(t){return(ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pl(){return(pl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=yl(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function yl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bl(t)););return t}function hl(t,e){return(hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bl(t);if(e){var o=bl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vl(this,n)}}function vl(t,e){if(e&&("object"===ll(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bl(t){return(bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ml=a.a.getComponent("Menu"),gl=a.a.getComponent("MenuButton"),wl=a.a.getComponent("PlaybackRateMenuItem"),Ol=a.a.getComponent("PlaybackRateMenuButton"),jl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hl(t,e)}(i,t);var e,n,r,o=dl(i);function i(){var t;return sl(this,i),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=i,(n=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=gl.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(pl(bl(i.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var t=new ml(this.player(),{menuButton:this});t.addItem(new Rn(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new wl(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=gl.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Ol.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=a.a.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&fl(e.prototype,n),r&&fl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ol);function Cl(t){return(Cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function El(t,e){return(El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Tl(t);if(e){var o=Tl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kl(this,n)}}function kl(t,e){if(e&&("object"===Cl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tl(t){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("PlaybackRateMenuButton",jl);var xl=a.a.getComponent("TextTrackSettings"),Ll={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Rl={small:Ll,medium:Object.assign(Object.assign({},Ll),{fontPercent:1.5}),large:Object.assign(Object.assign({},Ll),{fontPercent:2})},Il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)}(i,t);var e,n,r,o=Pl(i);function i(){return _l(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){n.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Rl[this.size_]?Rl[this.size_]:Ll}}])&&Sl(e.prototype,n),r&&Sl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(xl);a.a.registerComponent("TextTrackSettings",Il);n(1203);function Nl(t){return(Nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Al(){return(Al="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ml(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Ml(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zl(t)););return t}function Dl(t,e){return(Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zl(t);if(e){var o=zl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gl(this,n)}}function Gl(t,e){if(e&&("object"===Nl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zl(t){return(zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vl=window.navigator&&window.navigator.userAgent||"",Ul=(/iPod/i.test(Vl),/Android/i.test(Vl),a.a.getComponent("Player")),Hl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dl(t,e)}(i,t);var e,n,r,o=Fl(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),e.mobile&&n.addClass("cv-mobile-player"),n}return e=i,(n=[{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,e){var n=this;if("number"!=typeof t||!this.callback_||e)return Al(zl(i.prototype),"currentTime",this).call(this,t);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return Al(zl(i.prototype),"play",this).call(this);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(Ul.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Ul.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&Bl(e.prototype,n),r&&Bl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ul);Hl.prototype.options_=Object.assign(Object.assign({},Ul.prototype.options_),{setMaxHeight:!0}),a.a.registerComponent("player",Hl);n(1204);function ql(t){return(ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ql(t,e){return(Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Kl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$l(t);if(e){var o=$l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(t,e){if(e&&("object"===ql(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zl(t)}function Zl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $l(t){return($l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)}(i,t);var e,n,r,o=Kl(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(Zl(n)),n.player_.one("firstplay",n.onFirstPlay),n}return e=i,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return a.a.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Wl(e.prototype,n),r&&Wl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));a.a.registerComponent("PlayPauseFeedback",Jl);n(1205);function Xl(t){return(Xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ts(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function es(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ns(t,e){return(ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=is(t);if(e){var o=is(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return os(this,n)}}function os(t,e){if(e&&("object"===Xl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function is(t){return(is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var as=a.a.getComponent("PlayToggle"),cs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ns(t,e)}(i,t);var e,n,r,o=rs(i);function i(){return ts(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"handleClick",value:function(t){var e=this;as.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&es(e.prototype,n),r&&es(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(as);a.a.registerComponent("PlayToggle",cs);n(1153);function us(t){return(us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ls(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ss(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fs(t,e){return(fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ps(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=hs(t);if(e){var o=hs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ys(this,n)}}function ys(t,e){if(e&&("object"===us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hs(t){return(hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ds=a.a.getComponent("TextTrackDisplay"),vs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fs(t,e)}(i,t);var e,n,r,o=ps(i);function i(){return ls(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"updateDisplayState",value:function(t){ds.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var o=n[r];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*e.fontPercent+"px"}}}}}])&&ss(e.prototype,n),r&&ss(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(ds);a.a.registerComponent("TextTrackDisplay",vs);n(1206),n(1207),n(1208),n(1209);var bs,ms=n(1237),gs=n.n(ms);function ws(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Os(t){t.paused()?t.play():t.pause()}function js(t,e){t.currentTime(t.currentTime()+e)}function Cs(t,e){t.volume(t.volume()+e)}var _s=(ws(bs={},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),ws(bs,"m",(function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())})),ws(bs,"k",Os),ws(bs,"space",Os),ws(bs,"left",(function(t){return js(t,-5)})),ws(bs,"right",(function(t){return js(t,5)})),ws(bs,"j",(function(t){return js(t,-10)})),ws(bs,"l",(function(t){return js(t,10)})),ws(bs,"up",(function(t){return Cs(t,.05)})),ws(bs,"down",(function(t){return Cs(t,-.05)})),bs);function Ss(t){var e=gs()(t);_s[e]&&(["space"].includes(e)&&(t.preventDefault(),t.stopPropagation()),_s[e](this,t))}function Es(t){return(Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ps(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ks(t,e){if(e&&("object"===Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ts(t){var e="function"==typeof Map?new Map:void 0;return(Ts=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xs(t,arguments,Is(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Rs(r,t)})(t)}function xs(t,e,n){return(xs=Ls()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Rs(o,n.prototype),o}).apply(null,arguments)}function Ls(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Rs(t,e){return(Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Is(t){return(Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rs(t,e)}(c,t);var e,n,r,o,i,a=(e=c,n=Ls(),function(){var t,r=Is(e);if(n){var o=Is(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return ks(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,t)).url=e,n}return r=c,o&&Ps(r.prototype,o),i&&Ps(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(Ts(Error));function Bs(t){return(Bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function As(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */As=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Bs(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ds=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Fs=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}}var e,n,r;return e=t,(n=[{key:"get",value:function(t,e){return Ds(this,void 0,void 0,As().mark((function n(){return As().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});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(t,e){return Ds(this,void 0,void 0,As().mark((function n(){return As().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(t,e,n){return Ds(this,void 0,void 0,As().mark((function r(){return As().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"POST",headers:this.getHeaders(n),body:e,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"put",value:function(t,e,n){return Ds(this,void 0,void 0,As().mark((function r(){return As().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"PUT",headers:this.getHeaders(n),body:e,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return Ds(this,void 0,void 0,As().mark((function e(){var n;return As().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=4;break}throw new Ns("Ajax error",t.url);case 4:return e.next=6,t.json();case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))}}])&&Ms(e.prototype,n),r&&Ms(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),Gs=n(53),zs=n(314),Vs=n(3),Us=n(256);function Hs(t){return(Hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qs=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Hs(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Ws(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Qs=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Ks=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Gs.a.cacheExists(t)||(this.collectionApiClient.log({type:Vs.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Vs.EventVersion.V3}),Gs.a&&Gs.a.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:Vs.UserAction.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:Vs.EventVersion.V2}})))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:{productArea:e.productArea,location:this.getLocationContext(),entity:e.entity,descriptor:e.descriptor,workflowPhase:e.workflowPhase},eventVersion:Vs.EventVersion.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Vs.EntityType.Interactive?t.interactive={id:+this.options.mediaId}:e===Vs.EntityType.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new zs.a({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:Us.a.shouldLog,formatData:Us.a.formatData})}},{key:"getCurrentUser",value:function(){return Qs(this,void 0,void 0,qs().mark((function t(){return qs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Vs.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Vs.EntityType.Video;case"MasterInteractive":return Vs.EntityType.Interactive;case"MasterClip":return Vs.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Vs.LocationContext.Player;case"interactive-player":return Vs.LocationContext.InteractivePlayer;case"create-clip-player":return Vs.LocationContext.CreateClipPlayer}}}])&&Ws(e.prototype,n),r&&Ws(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ys(t){return(Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $s(){return($s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Js(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Js(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nf(t)););return t}function Xs(t,e){return(Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=nf(t);if(e){var o=nf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ef(this,n)}}function ef(t,e){if(e&&("object"===Ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nf(t){return(nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(i,t);var e,n,r,o=tf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options_=e,n}return e=i,(n=[{key:"createEl",value:function(t,e,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return $s(nf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n);var o=this.buildSeasonEpisodeString();return o?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(o,"</div>")+r,$s(nf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,$s(nf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&Zs(e.prototype,n),r&&Zs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function of(t){return(of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function af(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cf(){return(cf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=uf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pf(t)););return t}function lf(t,e){return(lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pf(t);if(e){var o=pf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ff(this,n)}}function ff(t,e){if(e&&("object"===of(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pf(t){return(pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lf(t,e)}(i,t);var e,n,r,o=sf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options_=e,n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(cf(pf(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){var r=cf(pf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var o=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(a.a.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(o),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(a.a.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(t){switch(t){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&af(e.prototype,n),r&&af(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));function hf(t){return(hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function df(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vf(t,e){return(vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=gf(t);if(e){var o=gf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mf(this,n)}}function mf(t,e){if(e&&("object"===hf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gf(t){return(gf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vf(t,e)}(i,t);var e,n,r,o=bf(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"createEl",value:function(){var t=a.a.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&t.appendChild(new rf(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),t.appendChild(new yf(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),t}}])&&df(e.prototype,n),r&&df(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));n(1210);function Of(t){return(Of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cf(){return(Cf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=_f(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function _f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kf(t)););return t}function Sf(t,e){return(Sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ef(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=kf(t);if(e){var o=kf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pf(this,n)}}function Pf(t,e){if(e&&("object"===Of(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kf(t){return(kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sf(t,e)}(i,t);var e,n,r,o=Ef(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).addChild(new wf(n.player_,n.options_)),n}return e=i,(n=[{key:"createEl",value:function(t,e,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(x,"</div>")),Cf(kf(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&jf(e.prototype,n),r&&jf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component")),xf=n(107);function Lf(t){return(Lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Rf=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Lf(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function If(t){return function(t){if(Array.isArray(t))return Nf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Nf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nf(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Af,Mf=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Df=a.a.getComponent("Player"),Ff=450,Gf=function(){function t(e,n){var r=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=a.a.mergeOptions({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),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(t){r.player.error(t.message),r.options.onError&&r.options.onError(t)}))}))}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.options.mobile||this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=Object(a.a)(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var t=Df.prototype.options_.children;return t=t.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.options.mobile?3e3:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(If(t),["collapserator","playPauseFeedback"]),userActions:{hotkeys:Ss},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus}}},{key:"getPlaybackObject",value:function(){return Mf(this,void 0,void 0,Rf().mark((function t(){var e,n,r=this;return Rf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Fs.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(n=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"fetch",value:function(){var t,e,n,r,o,i,a,c;return Mf(this,void 0,void 0,Rf().mark((function u(){var l,s,f=this;return Rf().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.getPlaybackObject();case 2:l=u.sent,(null===(e=null===(t=l.chapters)||void 0===t?void 0:t.list)||void 0===e?void 0:e.length)>0&&(s=this.player.addTextTrack("chapters"),l.chapters.list.forEach((function(t){s.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),s.trigger({type:"loadeddata",target:s})),this.player.localCache({localCacheAddresses:null!==(n=l.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(r=this.options.enableLocalCache)||void 0===r||r}),this.player.progressiveFiles({sources:l.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),(null===(i=null===(o=l.subtitles)||void 0===o?void 0:o.list)||void 0===i?void 0:i.length)>0&&(l.subtitles.list.forEach((function(t){"text/vtt"===t.mimeType&&f.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(a=l.settings)||void 0===a?void 0:a.showSubtitles,subtitleSize:null===(c=l.settings)||void 0===c?void 0:c.playbackSubtitleSizeDefault})),l.posterUrl&&this.player.poster(l.posterUrl),this.setupSplash(l),this.additionalSetup(l),this.options.autoplay&&this.player.ready((function(){f.player.play().catch((function(){f.showSplash()}))})),this.options.startTime&&this.player.currentTime(this.options.startTime),this.player.trigger("cv-playback-data-loaded",l);case 13:case"end":return u.stop()}}),u,this)})))}},{key:"fetchConfig",value:function(){var t=this;if(!(Af||this.options.fetch||this.options.offlinePlaybackObject)){var e="".concat(this.options.playerApi.origin,"/api/config");Fs.get(e).then((function(e){Af=e,t.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(t){var e,n,r,o=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(e=t.settings)||void 0===e?void 0:e.playbackProfile,playbackProfileLocalCache:null===(n=t.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var i=this.options.enableLocalCache&&!!(null===(r=t.localCacheAddresses)||void 0===r?void 0:r.length);Af?this.setupAnalyticsService(t,i):this.one("config:loaded",(function(){return o.setupAnalyticsService(t,i)}))}},{key:"setupAnalyticsService",value:function(t,e){this.analyticsService=new Ks({collectionApiUrls:Af.collectionApi.urls,collectionApiClientId:Af.collectionApi.clientId,productVersion:c.a,videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||xf.a.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"logStream",value:function(){this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=a.a.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=a.a.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];if(t)r.enabled=r.id===t.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),n=0;n<e.length;n++){var r=e[n];if(void 0===t){if("showing"===r.mode)return r.label}else r.label===t?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(){return t.configureMenuDimensions()};if(this.player.ready(e),this.on("resize",e),this.on("fullscreenchange",e),this.one("play",e),this.on("resizemenus",e),this.showSplash=this.showSplash.bind(this),this.player.on("ended",this.showSplash),this.player.one("dispose",(function(){t.off("resize",e),t.off("fullscreenchange",e),t.off("resizemenus",e),t.off("ended",t.showSplash)})),this.options.hotkeyElQuerySelector){var n=a.a.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(n,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){var e=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new Tf(this.player,{embed:this.options.embed,posterUrl:t.posterUrl,title:t.title,ratingCode:t.ratingCode,seriesName:t.seriesName,seasonNumber:t.seasonNumber,episodeNumber:t.episodeNumber});e.addChild(n),this.options.autoplay||this.showSplash()}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var t=this;if(this.player.isFullscreen()&&!this.options.mobile){var e=this.player.whiteboardModePlugin().side;if("top"===e){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),o=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},o),this.player.trigger("volumechange")}else{var i=this.player.getChild("collapserator"),a=i.getChild("volumePanel"),c=i.children_.indexOf(a);i.removeChild(a),i.addChild("volumePanel",{inline:!0},c),this.player.trigger("volumechange")}if("left"===e||"right"===e||"top"===e){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),s=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),p=this.player.el().querySelectorAll(".vjs-menu"),y=f&&f.offsetHeight;y?("CreateClipSeekBar"===this.getSeekBarName()&&(y+=22),p&&p.length&&p.forEach((function(e){e.style.paddingTop="calc(".concat(s,"% - ").concat(y,"px)"),e.style.marginBottom="".concat(y,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(l<=Ff?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return t.configureMenuDimensions()}))}}])&&Bf(e.prototype,n),r&&Bf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();Gf.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};var zf=n(1114),Vf=n.n(zf),Uf=n(1270),Hf=n.n(Uf),qf=n(1140);function Wf(t){var e,n=t.interactive.timepoints.find((function(e){var n=e.visibleAt/1e3;return Math.floor(t.time)===Math.floor(n)||Math.ceil(t.time)===Math.ceil(n)}));if(!(null===(e=null==n?void 0:n.interactions)||void 0===e?void 0:e.length))return o.a.createElement(o.a.Fragment,null);var r=n.interactions.length>3?n.interactions.slice(0,2):n.interactions,i=n.interactions.length-r.length;return o.a.createElement("div",{className:"d-flex justify-content-end ml-2"},r.map((function(t,e){return o.a.createElement(qf.a,{key:e,interaction:t,showQuestion:!1,iconClassName:"ml-1"})})),!!i&&o.a.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ml-1"},"+".concat(i)))}function Qf(t){return function(t){if(Array.isArray(t))return Kf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Kf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kf(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Yf={title:{text:null},xAxis:{visible:!1,minPadding:0,maxPadding:0},legend:{enabled:!1},credits:{enabled:!1},defs:{gradient:{tagName:"linearGradient",id:"area-gradient",x1:0,y1:1,x2:0,y2:0,children:[{tagName:"stop",offset:0},{tagName:"stop",offset:1}]}}};function Zf(t,e){return{styledMode:!0,spacing:[15,0,0,0],width:t,height:e}}function $f(t){return{formatter:function(){var e=t?function(t,e){return Hf.a.renderToStaticMarkup(o.a.createElement(Wf,{time:e,interactive:t}))}(t,this.x):"";return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(Ua(this.x),"</strong>")+"".concat(e)+'</div><div class="d-flex justify-content-between rounded bg-light cv-view-count-container">'+'<strong>Views</strong> <span class="cv-view-count">'.concat(this.y,"</span>")+"</div></div>"},positioner:function(t,e,n){var r=this.chart.plotWidth-t,o=n.plotX-t/2;return{x:Math.min(Math.max(o,0),r),y:this.chart.plotTop}},useHTML:!0,padding:0}}n(1211);function Jf(t){return(Jf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tp(){return(tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ep(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ep(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ip(t)););return t}function np(t,e){return(np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ip(t);if(e){var o=ip(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return op(this,n)}}function op(t,e){if(e&&("object"===Jf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ip(t){return(ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ap=a.a.getComponent("Component");Vf.a.AST.allowedTags.push("g"),Vf.a.AST.allowedAttributes.push("viewBox","transform");var cp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&np(t,e)}(i,t);var e,n,r,o=rp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).initialize(),n.bindListeners(),n}return e=i,(n=[{key:"initialize",value:function(){var t=this;this.player().ready((function(){return t.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(t,e,n){return tp(ip(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n)}},{key:"toggleChart",value:function(t){t?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var t=this;this.handleClick=this.handleClick.bind(this),this.resizeChart=this.resizeChart.bind(this),this.player().on("playerresize",this.resizeChart),this.on(this.el(),"mouseup",this.handleClick),this.player().on("dispose",(function(){t.player().off("playerresize",t.resizeChart),t.off(t.el(),"mouseup",t.handleClick)}))}},{key:"handleClick",value:function(t){a.a.dom.isSingleLeftClick(t)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var t=this;if(!this.chart){var e=this.getChartDimensions();if(e){var n=this.el().querySelector(".cv-engagement-chart");this.chart=Vf.a.chart(n,this.getHighchartOptions(e))}else this.player().one("play",(function(){return t.buildChart()}))}}},{key:"resizeChart",value:function(){var t=this.getChartDimensions();this.chart&&t&&this.chart.setSize(t.width,t.height)}},{key:"destroyChart",value:function(){var t;null===(t=this.chart)||void 0===t||t.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var t=this.player().getChild("collapserator"),e=null==t?void 0:t.currentHeight(),n=this.el().clientWidth;return e&&n?{width:n,height:this.player().currentDimensions().height-e}:null}},{key:"getHighchartOptions",value:function(t){var e,n,r=t.width,o=t.height;return Object.assign(Object.assign({},Yf),{chart:Zf(r,o),yAxis:(n=this.options_.heatMap,{max:1.05*Math.max.apply(Math,Qf(n)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:$f(this.options_.interactive),plotOptions:(e=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){e(this.x)},mouseOut:function(){e(null)}}}},series:{marker:{enabled:!1}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(t){this.options_.onTimepointHover&&this.options_.onTimepointHover(t);var e=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==t?(a.a.dom.addClass(e,"cv-engagement-timepoint-indicator-visible"),e.style.left="".concat(t/this.options_.heatMap.length*100,"%")):a.a.dom.removeClass(e,"cv-engagement-timepoint-indicator-visible")}}])&&Xf(e.prototype,n),r&&Xf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(ap);function up(t){return(up="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function sp(){return(sp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=fp(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function fp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dp(t)););return t}function pp(t,e){return(pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dp(t);if(e){var o=dp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hp(this,n)}}function hp(t,e){if(e&&("object"===up(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dp(t){return(dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("EngagementOverlay",cp);var vp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pp(t,e)}(i,t);var e,n,r,o=yp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).overlayVisible=e.overlayVisible,n.toggle(n.overlayVisible),n}return e=i,(n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){a.a.dom.addClass(this.toggleEl,"on"),this.overlayVisible=!0,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().addClass("cv-reports-player-overlay-visible")}},{key:"toggleOff",value:function(){a.a.dom.removeClass(this.toggleEl,"on"),this.overlayVisible=!1,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().removeClass("cv-reports-player-overlay-visible")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=a.a.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=sp(dp(i.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Heat Map</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&lp(e.prototype,n),r&&lp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("MenuItem"));function bp(t){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gp(t,e){return(gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jp(t);if(e){var o=jp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Op(this,n)}}function Op(t,e){if(e&&("object"===bp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jp(t){return(jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerComponent("EngagementOverlayMenuItem",vp);var Cp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gp(t,e)}(i,t);var e,n,r,o=wp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).options=e,t.ready((function(){n.initialize()})),n}return e=i,(n=[{key:"initialize",value:function(){var t;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:vp,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(t){var e=this.player.getChild("engagementOverlay");null==e||e.toggleChart(t)}},{key:"hasHeatMapData",value:function(){var t;return(null===(t=this.options.heatMap)||void 0===t?void 0:t.reduce((function(t,e){return t+e}),0))>0}}])&&mp(e.prototype,n),r&&mp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));function _p(t){return(_p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ep(){return(Ep="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Pp(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Pp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rp(t)););return t}function kp(t,e){return(kp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Rp(t);if(e){var o=Rp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xp(this,n)}}function xp(t,e){if(e&&("object"===_p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lp(t)}function Lp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rp(t){return(Rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}a.a.registerPlugin("engagementOverlayPlugin",Cp);var Ip=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kp(t,e)}(i,t);var e,n,r,o=Tp(i);function i(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t),void 0===e.startTime)throw Error("Invalid clip start");if(void 0===e.endTime)throw Error("Invalid clip end");if(e.startTime>e.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(e.startTime.toPrecision(4)),n._clipEnd=parseFloat(e.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(Lp(n)),n.player.duration=n.duration.bind(Lp(n)),n.player.currentTime=n.currentTime.bind(Lp(n)),n.player.buffered=n.buffered.bind(Lp(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return e=i,(n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){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"),Ep(Rp(i.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return void 0!==t&&this.playerDurationFn(t),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if(void 0===t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),n=0;return e>=this.clipStart&&(n=e-this.clipStart),this.player.getCache().currentTime=n,t?n:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],n=0;n<t.length;n++)e[n]=[Math.max(0,t.start(n)-this.clipStart),Math.min(Math.max(0,t.end(n)-this.clipStart),this.player.duration())];return a.a.createTimeRanges(e)}}])&&Sp(e.prototype,n),r&&Sp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("clipPlugin",Ip);var Np=n(1141);n(1212);function Bp(t){return(Bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ap(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mp(){return(Mp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Dp(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Dp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vp(t)););return t}function Fp(t,e){return(Fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Vp(t);if(e){var o=Vp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zp(this,n)}}function zp(t,e){if(e&&("object"===Bp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vp(t){return(Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Up=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fp(t,e)}(i,t);var e,n,r,o=Gp(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).timepoint_=e.timepoint,n.time_=e.timepoint.visibleAt/1e3;var r=e.timepoint.interactions[0];r||n.hide();var a=Np.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(a),n.controlText(r.name),n.update(),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(Mp(Vp(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Mp(Vp(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var t=this.player_.duration(),e=this.time_/t;this.el().style.left=100*e+"%",e>100||e<0?this.hide():this.show()}},{key:"handleClick",value:function(t){t.stopPropagation(),this.player_.currentTime(this.time_)}}])&&Ap(e.prototype,n),r&&Ap(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Button"));n(1213);function Hp(t){return(Hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qp(t){return function(t){if(Array.isArray(t))return Wp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Wp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wp(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kp(){return(Kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Yp(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Yp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ty(t)););return t}function Zp(t,e){return(Zp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ty(t);if(e){var o=ty(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jp(this,n)}}function Jp(t,e){if(e&&("object"===Hp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xp(t)}function Xp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ty(t){return(ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ey=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zp(t,e)}(i,t);var e,n,r,o=$p(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).track_=e.track,n.interactive_=e.interactive,n.onDurationChange=n.onDurationChange.bind(Xp(n)),n.createInteractionItems=n.createInteractionItems.bind(Xp(n)),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return e=i,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(Kp(ty(i.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Kp(ty(i.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"createInteractionItems",value:function(){var t,e=this;if(this.track_){qp(this.children_).forEach((function(t){e.removeChild(t)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=this.getTimepointById(r.text);o&&(null===(t=o.interactions)||void 0===t?void 0:t.length)&&this.addChild(new Up(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(t){var e;return null===(e=this.interactive_.timepoints)||void 0===e?void 0:e.find((function(e){return e.id.toString()===t.toString()}))}}])&&Qp(e.prototype,n),r&&Qp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getComponent("Component"));n(1214);function ny(t){return(ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ry(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oy(t,e){return(oy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=uy(t);if(e){var o=uy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ay(this,n)}}function ay(t,e){if(e&&("object"===ny(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cy(t)}function cy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uy(t){return(uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ly=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oy(t,e)}(i,t);var e,n,r,o=iy(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t)).options=e,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(cy(n)))})),n}return e=i,(n=[{key:"initialize",value:function(){Oo(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(t){this.addChildren(t)}},{key:"addChildren",value:function(t){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new ey(this.player,{interactive:this.options.interactive,track:t}))}}])&&ry(e.prototype,n),r&&ry(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(a.a.getPlugin("plugin"));a.a.registerPlugin("interactiveSeekBarPlugin",ly);var sy=function(t,e){var n,r=t.addTextTrack("metadata","interactive"),o=e.additionalData.interactive,i=null===(n=e.additionalData.clipData)||void 0===n?void 0:n.startTime;return o.timepoints.forEach((function(t){var e,n=t.visibleAt/1e3,o=t.visibleFor?n+t.visibleFor/1e3:n+1;i&&(n+=i,o+=i),(null===(e=t.interactions)||void 0===e?void 0:e.length)&&r.addCue({startTime:n-.001,endTime:o,text:t.id})})),r};n(1215);function fy(t){return(fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function py(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */py=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function p(){}function y(){}var h={};c(h,o,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&n.call(v,o)&&(h=v);var b=y.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==fy(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,c(b,"constructor",y),c(y,"constructor",p),p.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},m(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function yy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hy(){return(hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=dy(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function dy(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gy(t)););return t}function vy(t,e){return(vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function by(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=gy(t);if(e){var o=gy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return my(this,n)}}function my(t,e){if(e&&("object"===fy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gy(t){return(gy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wy=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((r=r.apply(t,e||[])).next())}))},Oy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vy(t,e)}(i,t);var e,n,r,o=by(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(t){var e=this,n=Object.create(null,{additionalSetup:{get:function(){return hy(gy(i.prototype),"additionalSetup",e)}}});return wy(this,void 0,void 0,py().mark((function e(){return py().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.additionalSetup.call(this,t),this.setupEngagementOverlayPlugin(t),this.setupUpClipPlugin(t),this.setupInteractiveSeekBarPlugin(t);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"setupEngagementOverlayPlugin",value:function(t){var e;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(e=t.additionalData)||void 0===e?void 0:e.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(t){if("MasterClip"===t.mediaType){var e=t.additionalData;if(null===e)throw Error("Invalid clip data");this.player.clipPlugin({startTime:e.startTime,endTime:e.endTime})}}},{key:"setupInteractiveSeekBarPlugin",value:function(t){var e,n,r=null===(e=t.additionalData)||void 0===e?void 0:e.interactive;(null===(n=t.additionalData)||void 0===n?void 0:n.interactive)&&(this.track=sy(this.player,t),this.player.interactiveSeekBarPlugin({interactive:r}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}])&&yy(e.prototype,n),r&&yy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Gf);function jy(t){var e=o.a.useRef(),n=o.a.useRef();return o.a.useEffect((function(){n.current=new Oy(e.current,t)}),[]),o.a.createElement("div",{ref:e})}var Cy=n(1154),_y=n(1139),Sy=n(1155),Ey=n.n(Sy);n.d(e,"a",(function(){return ky}));var Py=i.a.encloseNamespace("shared.videoEngagementOverlay");function ky(t){var e=o.a.useRef(),n=Object(Cy.a)(t.engagement);return o.a.createElement("div",{className:"bg-white rounded p-2 h-100"},o.a.createElement("div",{className:"mb-2 position-relative"},o.a.createElement("div",{className:Ey.a.playerPlaceholder}),o.a.createElement("div",{className:Ey.a.playerContainer},o.a.createElement(jy,{viewKey:t.viewKey,playerApi:new URL(t.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:n,onTimepointHover:function(t){var r=e.current;r&&(null!==t?(r.classList.add(Ey.a.heatMapTimepointIndicatorVisible),r.style.left="".concat(t/n.length*100,"%")):r.classList.remove(Ey.a.heatMapTimepointIndicatorVisible))},aspectRatio:"16:9"}))),o.a.createElement("div",{className:Ey.a.heatMapContainer},o.a.createElement("div",{className:"position-relative"},o.a.createElement(_y.a,{engagement:t.engagement,className:Ey.a.heatMap}),o.a.createElement("div",{ref:e,className:Ey.a.heatMapTimepointIndicator}))),o.a.createElement("div",{className:"d-flex justify-content-between mt-2"},o.a.createElement("strong",null,Py("engagement")),o.a.createElement("div",{className:"w-33"},o.a.createElement(_y.b,null))))}},1223:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(1124),a=n(7),c=n(42),u=n(43),l=n(1099),s=n(1100),f=n(1139),p=n(1218),y=n.n(p);function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||v(t,e)||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 d(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var m=a.a.encloseNamespace("shared.engagementTable");function g(t){var e;return o.a.createElement("div",{className:"p-2 ".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.children)}function w(t){return o.a.createElement(g,{className:"d-inline-block ".concat(t.column.isSorted?"font-weight-bold":"")},m(t.phraseKey))}function O(t){var e=h(Object(c.a)(u.a.ANONYMISE_USERS),1)[0];return o.a.useMemo((function(){var n=function(t){var e=0;return t.forEach((function(t){var n=Math.max.apply(Math,d(t.heatMap));n>e&&(e=n)})),e}(t);return[{Header:function(t){var e=t.column;return o.a.createElement(w,{column:e,phraseKey:"name"})},width:8,accessor:"user",sortType:function(t,n){return Object(l.a)(t.values.user,e)>Object(l.a)(n.values.user,e)?1:-1},Cell:function(t){var n=t.value;return o.a.createElement(g,{className:"text-truncate"},Object(l.a)(n,e))}},{Header:function(t){var e=t.column;return o.a.createElement(w,{column:e,phraseKey:"views"})},accessor:"viewCount",width:4,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return o.a.createElement(g,null,e)}},{Header:function(t){var e=t.column;return o.a.createElement(w,{column:e,phraseKey:"engagement"})},accessor:"engagementRate",width:8,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return o.a.createElement(g,{className:"w-33"},o.a.createElement(s.a,{percentage:e,layout:s.b.LabelBefore}))}},{Header:function(t){var e=t.column;return o.a.createElement(w,{column:e,phraseKey:"heatMap"})},accessor:"heatMap",width:15,disableSortBy:!0,Cell:function(t){var e=t.row.original;return o.a.createElement(g,{className:"d-flex align-items-center h-100"},o.a.createElement(f.a,{engagement:e,max:n,className:"".concat(y.a.heatMap," flex-grow-1")}))}}]}),[e])}n.d(e,"a",(function(){return C}));var j={table:"bg-white rounded",header:"border-bottom"};function C(t){var e,n,r=O(t.engagement),a=(e=t.engagement,n=t.users,o.a.useMemo((function(){var t=[];return e.forEach((function(e){var r=null==n?void 0:n.find((function(t){return t.id===e.userId}));r&&t.push(Object.assign(Object.assign({},e),{user:r}))})),t}),[]));return a.length?o.a.createElement(i.a,{columns:r,data:a,theme:j,enableSort:!0}):o.a.createElement(o.a.Fragment,null)}},1266:function(t,e){},1267:function(t,e){},1278:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(0),o=n.n(r),i=n(7),a=n(5),c=n(15),u=n(1113),l=n(193),s=i.a.encloseNamespace("reportsVideos.videoNav");function f(t){var e,n,r,i=Object(l.a)(),f=(e=t.id,n=i,r=[e],[{label:s("overview"),appLink:{application:a.a.VIDEOS,action:c.a.Videos.OVERVIEW,args:r,params:n}},{label:s("engagement"),appLink:{application:a.a.VIDEOS,action:c.a.Videos.ENGAGEMENT,args:r,params:n}}]);return o.a.createElement(u.a,{items:f})}},1578:function(t,e,n){t.exports={viewCountContainer:"_2Zg9j",engagementPercentageContainer:"_1rMYQ",engagementGraphContainer:"_2C1c5",partialTable:"_2R4lj"}},1590:function(t,e,n){"use strict";n.r(e),n.d(e,"VideoEngagementView",(function(){return A}));var r=n(0),o=n.n(r),i=n(9),a=n(7),c=n(286),u=n(1177),l=n(95),s=n(32),f=n(1178),p=n(101),y=n(63),h=n(1094),d=n(1221),v=n(1101),b=n(249),m=n(1105),g=n(1098),w=n(193),O=n(1138),j=n(1112),C=n(1104),_=n(1130),S=n(1122),E=n(1145),P=n(1222),k=n(1217),T=n(1223),x=n(1134),L=n(1219),R=n(1278),I=n(1578),N=n.n(I),B=a.a.encloseNamespace("reportsVideos.videoEngagement");function A(t){var e,n,r=Object(w.a)(),a=Object(w.b)(),I=!(0,Object(p.a)().hasPermissions)(y.a.ViewCustomerAnalytics),A=i.a.useBasicFetch(I&&s.a.currentUser()),M=i.a.useBasicFetch(d.a.video(t.id)),D=i.a.useBasicFetch(!!a&&(I?!!A.data&&g.a.aggregateEngagement(t.id,a,A.data.id):g.a.aggregateEngagement(t.id,a))),F=i.a.useBasicFetch(!!a&&(I?!!A.data&&g.a.individualEngagement(t.id,a,A.data.id):g.a.individualEngagement(t.id,a))),G=i.a.useBasicFetch((null===(e=F.data)||void 0===e?void 0:e.data.length)&&b.a.getById(F.data.data.map((function(t){return t.userId})))),z=i.a.useBasicFetch(u.a.createViewKey(t.id,f.a.MasterObject)),V=i.a.useBasicFetch(l.a.config());Object(c.a)(M.data?B("pageTitle",{video:M.data.name}):""),Object(v.a)(null===(n=M.data)||void 0===n?void 0:n.name),Object(_.a)(Object(x.a)(M.data)),Object(L.a)(t.id),Object(C.a)(F),Object(m.a)(M),Object(h.a)([D,F,G,z]);var U=!!(M.data&&D.data&&z.data&&V.data),H=!(!F.data||F.data.data.length&&!G.data);return o.a.createElement("div",{className:"pb-3"},o.a.createElement(R.a,{id:t.id}),o.a.createElement("div",{className:"d-flex pb-3"},o.a.createElement("div",{className:"pr-2 ".concat(N.a.viewCountContainer)},o.a.createElement(j.a,{objectId:t.id,useSharerId:I,className:"h-100"})),o.a.createElement("div",{className:"px-2 ".concat(N.a.engagementPercentageContainer)},o.a.createElement(E.a,{objectId:t.id,useSharerId:I,className:"h-100",layout:"vertical"})),o.a.createElement("div",{className:"pl-2 ".concat(N.a.engagementGraphContainer)},U?o.a.createElement(P.a,{key:Object(O.a)(r),engagement:D.data,viewKey:z.data.viewKey,imageCdnUrl:V.data.imageCdnUrl,playerApiUrl:V.data.playerApiUrl}):o.a.createElement(k.a,null))),H?o.a.createElement(T.a,{key:Object(O.a)(r),engagement:F.data.data,users:G.data}):o.a.createElement(S.a,{className:N.a.partialTable}))}}}]);
|