@clickview/player 0.0.22 → 0.0.23-dev.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.
Files changed (36) hide show
  1. package/dist/en.json +1 -1
  2. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +2 -1
  3. package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +2 -1
  4. package/dist/libs/shared/src/enums/SettingName.d.ts +5 -1
  5. package/dist/libs/shared/src/interfaces/models/Config.d.ts +1 -0
  6. package/dist/player-app.js +2 -2
  7. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +3 -3
  8. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +3 -3
  9. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-load-progress.d.ts +3 -3
  10. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-play-progress.d.ts +3 -3
  11. package/dist/projects/player/src/components/chapters-button/chapter-menu-item.d.ts +3 -3
  12. package/dist/projects/player/src/components/landing-splash/landing-splash.d.ts +3 -3
  13. package/dist/projects/player/src/components/landing-splash/metadata/splash-metadata.d.ts +3 -3
  14. package/dist/projects/player/src/components/landing-splash/metadata/splash-title/splash-title.d.ts +3 -3
  15. package/dist/projects/player/src/components/landing-splash/metadata/splash-warning/splash-warning.d.ts +3 -3
  16. package/dist/projects/player/src/components/player/player.d.ts +4 -0
  17. package/dist/projects/player/src/components/subs-caps-button/SubCapsMenuItem.d.ts +3 -3
  18. package/dist/projects/player/src/components/subs-caps-button/subtitle-search-menu-item.d.ts +3 -3
  19. package/dist/projects/player/src/components/subs-caps-button/subtitle-size-menu-item.d.ts +3 -3
  20. package/dist/projects/player/src/components/text-track-settings/text-track-settings.d.ts +3 -3
  21. package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +3 -3
  22. package/dist/projects/player/src/players/base-player.d.ts +1 -0
  23. package/dist/projects/player/src/plugins/activity-status-plugin/activity-status-plugin.d.ts +0 -3
  24. package/dist/projects/player/src/plugins/chromecast-plugin/session-manager.d.ts +3 -3
  25. package/dist/projects/player/src/plugins/chromecast-plugin/tech/chromecast-tech-ui/chromecast-tech-ui.d.ts +3 -3
  26. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector-handle.d.ts +3 -3
  27. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +3 -3
  28. package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-progress-indicator/create-clip-progress-indicator.d.ts +3 -3
  29. package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay/engagement-overlay.d.ts +3 -3
  30. package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +3 -3
  31. package/dist/projects/player/src/plugins/points-of-interest-plugin/components/point-of-interest-indicator/point-of-interest-indicator.d.ts +3 -3
  32. package/dist/projects/player/src/plugins/progress-reporter-plugin/components/progress-reporter-display.d.ts +3 -3
  33. package/dist/projects/player/src/plugins/touch-controls-plugin/components/touch-controls/touch-controls.d.ts +3 -3
  34. package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-handle/drag-handle.d.ts +3 -3
  35. package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-targets/drag-targets.d.ts +3 -3
  36. package/package.json +3 -3
@@ -18,7 +18,7 @@ for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=
18
18
  object-assign
19
19
  (c) Sindre Sorhus
20
20
  @license MIT
21
- */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},g={},b=(v.INDEX_SIZE_ERR=(g[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),v.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));v.INVALID_STATE_ERR=(g[11]="Invalid state",11),v.SYNTAX_ERR=(g[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),v.NAMESPACE_ERR=(g[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,g[e]),this.message=g[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function k(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function R(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function j(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function I(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(I(e,t))return!0}while(e=e.nextSibling)}function L(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function M(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,M(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return M(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function z(){}function q(){}function W(){}function $(){}function G(){}function K(){}function Y(){}function X(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,m=c.length,v=e.firstChild,g=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",g);for(var b=0;b<m;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=c.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}ee(_,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),n&&/^script$/i.test(g))for(;v;)v.data?t.push(v.data):ee(v,t,n,r,i),v=v.nextSibling;else for(;v;)ee(v,t,n,r,i),v=v.nextSibling;t.push("</",g,">")}else t.push("/>");return;case d:case y:for(v=e.firstChild;v;)ee(v,t,n,r,i),v=v.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,j),'"');case s:return t.push(e.data.replace(/[<&]/g,j));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}T.prototype=Error.prototype,n(v,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,S),k.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new T(w);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},R.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new L;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new k,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),L.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return I(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new Y;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new X;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new U,r=t.split(":"),i=n.attributes=new k;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(L,A),U.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,M(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return I(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return I(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},L.prototype.getElementsByTagName=U.prototype.getElementsByTagName,L.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(g[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),z.prototype={nodeName:"#comment",nodeType:h},r(z,V),q.prototype={nodeName:"#cdata-section",nodeType:u},r(q,V),W.prototype.nodeType=p,r(W,A),$.prototype.nodeType=m,r($,A),G.prototype.nodeType=c,r(G,A),K.prototype.nodeType=l,r(K,A),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=y,r(Y,A),X.prototype.nodeType=f,r(X,A),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=R,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";var r,i,o,a,s,u,l,c,f,h,d,p,y,m,v,g,b,_,w,T,S,E,C,k,x,O,P;n.d(t,"i",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return x})),n.d(t,"h",(function(){return O})),n.d(t,"c",(function(){return P})),function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_instant_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.Unshare="cv_product_unshare",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.ManageGroup="cv_product_manage_group",e.Export="cv_product_export",e.SendEmail="cv_product_send_email",e.Publish="cv_product_publish",e.Answer="cv_product_submit",e.Complete="cv_product_complete",e.Archive="cv_product_archive",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.Interaction="interaction",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.DirectShare="direct_share",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share"}(i||(i={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.EditUser="edit_user",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.ArchivedClassrooms="archived_classrooms",e.PreviewInteractive="preview_interactive",e.PreviewSharedInteractive="preview_shared_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.EditInteractiveDetails="edit_interactive_details",e.PlaySharedInteractive="play_shared_interactive",e.PlayInteractive="play_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.NewInteractive="new_interactive",e.CopyInteractive="copy_interactive",e.UnpublishInteractive="unpublish_interactive",e.ShareInteractive="share_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlayClip="play_clip",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.Dashboard="dashboard",e.ProductBanner="product_banner",e.Settings="settings",e.UserOptions="user_options",e.StudentFeed="student_feed",e.SharedByMe="shared_by_me",e.SharedWithMe="shared_with_me",e.TopVideos="top_videos",e.VideoViewsList="video_views_list"}(o||(o={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(a||(a={})),function(e){e.PageLoad="page_load"}(s||(s={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(u||(u={})),function(e){e.Publish="publish",e.Unpublish="unpublish"}(l||(l={})),function(e){e.ActivateUser="activate_user",e.VerifyEmail="verify_email"}(c||(c={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(f||(f={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(h||(h={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(d||(d={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(p||(p={})),function(e){e.Embedded="embedded"}(y||(y={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace"}(m||(m={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.ViewUsage="view_usage",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video"}(v||(v={})),function(e){e.Remove="remove"}(g||(g={})),function(e){e.LibraryReview="library_review"}(b||(b={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(_||(_={})),function(e){e.Edit="edit"}(w||(w={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar",e.Clip="clip",e.Interactive="interactive"}(T||(T={})),function(e){e.On="on",e.Off="off"}(S||(S={})),function(e){e.ContinueSession="continue_session",e.NewSession="new_session"}(E||(E={})),function(e){e.DirectShare="direct_share",e.CopyLink="copy_link",e.CopyEmbedHtml="copy_embed_html",e.PluginEmbed="plugin_embed"}(C||(C={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(k||(k={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(x||(x={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(O||(O={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(P||(P={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(3),i=n(10),o=n(27),a=n(13),s=n(22),u=n(8);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=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(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(f,e);var t,n,o,l=m(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).mergeOptions(e,[].concat(c(t.defaultProps),c(t.props||[]))),r.result(g(t),"name")||u.c.throw(new u.b("BaseApplication must define a name")),r.result(g(t),"channelName")||u.c.throw(new u.b("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),a.a.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=f,(n=[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||u.c.throw(new u.b("Global channel ".concat(t," does not exist"))),i.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=r.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(r.extend(this.layoutOptions,{options:e})),this.layout||u.c.throw(new u.b("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||u.c.throw(new u.b("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r?r.hasView()||this.layout.showChildView("alert",new t({collection:n})):u.c.throw(new u.b("Your application layout must define an alert region"))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=r.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(b(f.prototype),"listenTo",this))}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Application)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(99),l=n(13),c=n(8),f=n(36),h=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=g(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=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(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=/([A-Z])/g,E=/(^|:)(\w)/gi,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(y,e);var t,n,o,d=_(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=d.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=y,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(h.a.SHELL,l.a.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return a.a.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;r.each(r.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],i=e.toEventName(n);e.addRouteLookup(i,t),e.listenTo(e.channelName,i,(function(n,i){i&&i.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var o=r.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=o,f.a.UpdateUrl(t,n,i)}))}))}))}},{key:"triggerNavLocked",value:function(e,t){e.trigger(l.a.NAV_IS_LOCKED,t),a.b.routingEnded()}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&r.each(r.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks."));var r=i.Radio.channel(h.a.SHELL);e.options.shell.isNavLocked()?e.triggerNavLocked(r,t):f.a.PageLoad(a.a.getHref(t))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&r.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var o=this;this.validateAppLink(e);var s=this.toMethodName(e.action);a.b.routingStarted();var f=i.Radio.channel(h.a.SHELL);if(this.options.shell.isNavLocked())this.triggerNavLocked(f,e);else{var d=new u.a;r.each(this.filters,(function(e){return d.use(e)})),d.go({appLink:e,shell:this.options.shell},(function(){f.trigger(l.a.ROUTE,e,t),o.createApp();var i=o.controller;if(r.isFunction(i[s])||(a.b.routingEnded(),c.c.throw(new c.b("".concat(s," does not exist on the ").concat(r.result(i,"name"),".")))),!1===i.triggerMethod("before:action"))return i.triggerMethod("action:cancelled"),void a.b.routingEnded();i.triggerMethod("load:layout"),i[s].apply(i,[].concat(p(e.args||[]),[e.params||{}])),r.isFunction(n)&&n(),a.b.routingEnded()}))}}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var i=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a={application:i.channelName,action:i.toEventName(n),args:t.slice(0,t.length-1),params:f.a.DeserializeQueryParams(t[t.length-1])};i.executeRoute(a,{isAppRoute:!0},(function(){f.a.UpdateQuery(r.extend(i.controller.getAndClearDefaultQueryParams(),a.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(S,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(E,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(a.b.routingEnded(),c.c.throw(new c.b("Invalid AppLink")))}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],v(T(y.prototype),"listenTo",this))}}])&&m(t.prototype,n),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.AppRouter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=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(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,o=f(l);function l(){return a(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Behavior)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(78),i=n(38),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=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(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,a=l(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,r=[{key:"getCacheKey",value:function(e){o.c.throw(new i.a("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(65),o=n(100);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=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(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(y,e);var t,n,c,d=h(y);function y(){return s(this,y),d.apply(this,arguments)}return t=y,(n=[{key:"set",value:function(e,t,n){var i,o;if(null===e)return this;for(i in"object"===a(e)?(o=e,n=t):(o={})[e]=t,n||(n={}),o)r.has(this.associations,i)&&(o[i]=this.setAssociation(i,o[i],n));return l(p(y.prototype),"set",this).call(this,o,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return l(p(y.prototype),"get",this).call(this,e);var n=e.substr(0,t),i=this.attributes[n];if(!i||!r.isFunction(i.get))return l(p(y.prototype),"get",this).call(this,e);var o=e.substr(t+1);return i.get(o)}},{key:"setAssociation",value:function(e,t,n){var a=this.associations[e],s=this.attributes[e];if(!r.isFunction(a))return t;if(n.unset)return s&&delete s.parent,delete this[e],s;if(s)return s instanceof i.a&&s.set(t,n),s instanceof o.a&&s.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),s;var u=t instanceof i.a?t:new a(t,{parse:!0});return u.parent=this,this[e]=u,u}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=l(p(y.prototype),"toJSON",this).apply(this,t);return r.each(this.associations,(function(e,t){r.has(i,t)&&r.isFunction(i[t].toJSON)?i[t]=i[t].toJSON():i[t]=(new e).toJSON()})),i}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.omit(l(p(y.prototype),"toJSON",this).apply(this,t),r.keys(this.associations))}}])&&u(t.prototype,n),c&&u(t,c),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=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(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,a=f(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).name||o.c.throw(new o.b("Your service must be named.")),t}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(27),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=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(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,i,s=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=s.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=c,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||a.c.throw(new a.b("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){r.each(this.requiredRegions,(function(t){r.has(r.result(e.prototype,"regions"),t)||a.c.throw(new a.b("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(c.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(12),l=n(8),c=n(13),f=n(36);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=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(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var T=function(){function e(t,n){b(this,e),this.application=t,this.options=n||{}}return w(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(n,e);var t=m(n);function n(){return b(this,n),t.apply(this,arguments)}return w(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(u.a.SHELL,c.a.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(u.a.SHELL,c.a.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(u.a.SHELL,c.a.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=i.Radio.channel(u.a.SHELL);t.reply(c.a.HAS_ACTIVE_ROUTE,r.bind(this.hasActiveRoute,this)),t.reply(c.a.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){a.b.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=i.Radio.channel(u.a.SHELL);this.listenTo(e,c.a.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;i.Radio.channel(u.a.SHELL).reply(c.a.ROUTE_LOOKUP,(function(t,n,r){return!!e.routeLookup[t]&&e.routeLookup[t](n,r)}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new T(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return u.a}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(){t.runStartUpSteps(t,e,(function(){d(g(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;r.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),f.a.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||l.c.throw(new l.b("An error must have a name in order to register a handler for it.")),r.any(this.errorHandlers,(function(t){return t.errorType===e}))&&l.c.throw(new l.b("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=r.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(g(n.prototype),"listenTo",this))}}]),n}(o.Application)},function(e,t){},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(127),i=n(336);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(127);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(342).XMLReader,c=t.DOMImplementation=n(179).DOMImplementation;t.XMLSerializer=n(179).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(180),i=n(343).handleRollover,o={};o.ts=n(345),o.aac=n(346);var a=n(57).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.22"}')},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,v=C(o,"Map"),g=C(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||w),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=g?g(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(g){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return g?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=g&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return T(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(v||_),string:new b}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},k.Cache=w,e.exports=k}).call(this,n(32))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return v(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):p(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var g=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;t.a=S}).call(this,n(32))},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,y[d]):c(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.39"}')},function(e,t,n){"use strict";t.a=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(48),a=n(42),s=n(17),u=n(145),l=n(11),c=n(33),f=n(51),h=n(18),d=n(24),p=n(21),y=n(28),m=n(60),v=n(59),g=n(62),b=n(72),_=n(110),w=n(148),T=n(113),S=n(46),E=n(26),C=n(79),k=n(29),x=n(41),O=n(70),P=n(80),R=n(71),A=n(81),j=n(16),I=n(149),L=n(220),D=n(52),M=n(35),N=n(43).forEach,B=P("hidden"),U=j("toPrimitive"),F=M.set,V=M.getterFor("Symbol"),H=Object.prototype,z=i.Symbol,q=o("JSON","stringify"),W=S.f,$=E.f,G=w.f,K=C.f,Y=O("symbols"),X=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=g($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,re=function(e,t){var n=Y[e]=g(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===H&&oe(X,t,n),d(e);var r=m(t,!0);return d(n),c(Y,r)?(n.enumerable?(c(e,B)&&e[B][r]&&(e[B][r]=!1),n=g(n,{enumerable:v(0,!1)})):(c(e,B)||$(e,B,v(1,{})),e[B][r]=!0),ne(e,r,n)):$(e,r,n)},ae=function(e,t){d(e);var n=y(t),r=b(n).concat(ce(n));return N(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=K.call(this,t);return!(this===H&&c(Y,t)&&!c(X,t))&&(!(n||!c(this,t)||!c(Y,t)||c(this,B)&&this[B][t])||n)},ue=function(e,t){var n=y(e),r=m(t,!0);if(n!==H||!c(Y,r)||c(X,r)){var i=W(n,r);return!i||!c(Y,r)||c(n,B)&&n[B][r]||(i.enumerable=!0),i}},le=function(e){var t=G(y(e)),n=[];return N(t,(function(e){c(Y,e)||c(R,e)||n.push(e)})),n},ce=function(e){var t=e===H,n=G(t?X:y(e)),r=[];return N(n,(function(e){!c(Y,e)||t&&!c(H,e)||r.push(Y[e])})),r};(u||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=A(e),n=function(e){this===H&&n.call(X,e),c(this,B)&&c(this[B],t)&&(this[B][t]=!1),ne(this,t,v(1,e))};return s&&te&&ne(H,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),C.f=se,E.f=oe,S.f=ue,_.f=w.f=le,T.f=ce,s&&($(z.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||x(H,"propertyIsEnumerable",se,{unsafe:!0})),I.f=function(e){return re(j(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),N(b(Z),(function(e){L(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=z(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?g(e):ae(g(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(e){return T.f(p(e))}}),q)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=z();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,q.apply(null,i)}});z.prototype[U]||k(z.prototype,U,z.prototype.valueOf),D(z,"Symbol"),R[B]=!0},function(e,t,n){var r=n(14),i=n(109),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(33),i=n(142),o=n(46),a=n(26);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(143),i=n(33),o=n(149),a=n(26).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(51),a=n(18),s=n(21),u=n(15),l=n(53),c=n(73),f=n(74),h=n(16),d=n(115),p=h("isConcatSpreadable"),y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=f("concat"),v=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(v(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(5),i=n(223),o=n(39);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(5),i=n(43).every;r({target:"Array",proto:!0,forced:n(44)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(226),o=n(39);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(5),i=n(43).find,o=n(39),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(5),i=n(43).findIndex,o=n(39),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(49),u=n(73);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(34),u=n(73);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(5),i=n(232);r({target:"Array",stat:!0,forced:!n(117)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(63),i=n(21),o=n(154),a=n(155),s=n(15),u=n(53),l=n(156);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,v=void 0!==m,g=0,b=l(d);if(v&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>g;g++)u(n,g,v?m(d[g],g):d[g]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;g++)u(n,g,v?o(f,m,[c.value,g],!0):c.value);return n.length=g,n}},function(e,t,n){"use strict";var r=n(5),i=n(111).includes,o=n(39);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(5),i=n(111).indexOf,o=n(44),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(5)({target:"Array",stat:!0},{isArray:n(51)})},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(5),i=n(69),o=n(28),a=n(44),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(5),i=n(239);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(28),i=n(49),o=n(15),a=n(44),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(5),i=n(43).map;r({target:"Array",proto:!0,forced:!n(74)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(53);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(5),i=n(160).right;r({target:"Array",proto:!0,forced:n(44)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(51),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(18),o=n(51),a=n(61),s=n(15),u=n(28),l=n(53),c=n(74),f=n(16)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),y=s(p.length),m=a(e,y),v=a(void 0===t?y:t,y);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,m,v);for(r=new(void 0===n?Array:n)(d(v-m,0)),c=0;m<v;m++,c++)m in p&&l(r,c,p[m]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(5),i=n(43).some;r({target:"Array",proto:!0,forced:n(44)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(21),a=n(11),s=n(44),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(121)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(61),o=n(49),a=n(15),s=n(21),u=n(73),l=n(53),c=n(74),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,y,m=s(this),v=a(m.length),g=i(e,v),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=v-g):(n=b-2,r=h(f(o(t),0),v-g)),v+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(m,r),d=0;d<r;d++)(p=g+d)in m&&l(c,d,m[p]);if(c.length=r,n<r){for(d=g;d<v-r;d++)y=d+n,(p=d+r)in m?m[y]=m[p]:delete m[y];for(d=v;d>v-r+n;d--)delete m[d-1]}else if(n>r)for(d=v-r;d>g;d--)y=d+n-1,(p=d+r-1)in m?m[y]=m[p]:delete m[y];for(d=0;d<n;d++)m[d+g]=arguments[d+2];return m.length=v-r+n,c}})},function(e,t,n){n(39)("flat")},function(e,t,n){n(39)("flatMap")},function(e,t,n){var r=n(14);n(52)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(161),i=n(254);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i,!0)},function(e,t,n){var r=n(18),i=n(83);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(26).f,i=n(62),o=n(86),a=n(63),s=n(85),u=n(50),l=n(119),c=n(121),f=n(17),h=n(54).fastKey,d=n(35),p=d.set,y=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],e,n)})),d=y(t),m=function(e,t,n){var r,i,o=d(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=h(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=d(e),i=h(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),o=y(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){n(52)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(17),i=n(11),o=n(72),a=n(113),s=n(79),u=n(21),l=n(69),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),y=f?o(p).concat(f(p)):o(p),m=y.length,v=0;m>v;)d=y[v++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(5)({target:"Object",stat:!0,sham:!n(17)},{create:n(62)})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(146)})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(26).f})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(163).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(5),i=n(84),o=n(11),a=n(18),s=n(54).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(5),i=n(50),o=n(53);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(5),i=n(11),o=n(28),a=n(46).f,s=n(17),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(5),i=n(17),o=n(142),a=n(28),s=n(46),u=n(53);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(5),i=n(11),o=n(148).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(5),i=n(11),o=n(21),a=n(64),s=n(158);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(5)({target:"Object",stat:!0},{is:n(164)})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(21),o=n(72);r({target:"Object",stat:!0,forced:n(11)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(5)({target:"Object",stat:!0},{setPrototypeOf:n(83)})},function(e,t,n){"use strict";var r=n(116),i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(5),i=n(163).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(5),u=n(42),l=n(14),c=n(48),f=n(166),h=n(41),d=n(86),p=n(52),y=n(121),m=n(18),v=n(34),g=n(85),b=n(47),_=n(50),w=n(117),T=n(88),S=n(167).set,E=n(282),C=n(168),k=n(283),x=n(76),O=n(89),P=n(35),R=n(114),A=n(16),j=n(115),I=A("species"),L="Promise",D=P.get,M=P.set,N=P.getterFor(L),B=f,U=l.TypeError,F=l.document,V=l.process,H=c("fetch"),z=x.f,q=z,W="process"==b(V),$=!!(F&&F.createEvent&&l.dispatchEvent),G=R(L,(function(){if(66===j)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!B.prototype.finally)return!0;if(j>=51&&/native code/.test(B))return!1;var e=B.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[I]=t,!(e.then((function(){}))instanceof t)})),K=G||!w((function(e){B.all(e).catch((function(){}))})),Y=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(U("Promise-chain cycle")):(u=Y(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){W?V.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=W||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){W?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw U("Promise can't be resolved itself");var i=Y(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};G&&(B=function(e){g(this,B,L),v(e),r.call(this);var t=D(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){M(this,{type:L,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(B.prototype,{then:function(e,t){var n=N(this),r=z(T(this,B));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=D(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=z=function(e){return e===B||e===o?new i(e):q(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new B((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(B,H.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:B}),p(B,L,!1,!0),y(L),o=c(L),s({target:L,stat:!0,forced:G},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:L,stat:!0,forced:u||G},{resolve:function(e){return C(u&&this===o?B:this,e)}}),s({target:L,stat:!0,forced:K},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=v(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=v(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(14),h=n(46).f,d=n(47),p=n(167).set,y=n(82),m=f.MutationObserver||f.WebKitMutationObserver,v=f.process,g=f.Promise,b="process"==d(v),_=h(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=v.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){v.nextTick(r)}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(y)?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):g&&g.resolve?(l=g.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(5),i=n(42),o=n(166),a=n(48),s=n(88),u=n(168),l=n(41);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(5),i=n(77).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(5),i=n(61),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(5),i=n(123),o=n(25);r({target:"String",proto:!0,forced:!n(124)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).end;r({target:"String",proto:!0,forced:n(174)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).start;r({target:"String",proto:!0,forced:n(174)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(28),o=n(15);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(5)({target:"String",proto:!0},{repeat:n(173)})},function(e,t,n){"use strict";var r=n(92),i=n(24),o=n(25),a=n(164),s=n(94);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(92),i=n(91),o=n(24),a=n(25),s=n(88),u=n(93),l=n(15),c=n(94),f=n(90),h=n(11),d=[].push,p=Math.min,y=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,y=new RegExp(e.source,h+"g");(s=f.call(y,r))&&!((u=y.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)y.lastIndex===s.index&&y.lastIndex++;return p===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),m=f.unicode,v=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),g=new d(y?f:"^(?:"+f.source+")",v),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(g,h)?[h]:[];for(var _=0,w=0,T=[];w<h.length;){g.lastIndex=y?w:0;var S,E=c(g,y?h:h.slice(w));if(null===E||(S=p(l(g.lastIndex+(y?0:w)),h.length))===_)w=u(h,w,m);else{if(T.push(h.slice(_,w)),T.length===b)return T;for(var C=1;C<=E.length-1;C++)if(T.push(E[C]),T.length===b)return T;w=_=S}}return T.push(h.slice(_)),T}]}),!y)},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(5),i=n(95).trim;r({target:"String",proto:!0,forced:n(126)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(95).end,o=n(126)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(5),i=n(95).start,o=n(126)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(64),a=n(83),s=n(62),u=n(26),l=n(59),c=n(50),f=n(29),h=n(24),d=n(35),p=d.set,y=d.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};m.prototype=s(Error.prototype,{constructor:l(5,m),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(m.prototype,"errors",{get:function(){return y(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(316)},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(76),a=n(89),s=n(50);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(48),a=n(76),s=n(89),u=n(50);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(76),o=n(89);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(77).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(35),s=n(77),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(322)},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(15),s=n(34),u=n(24),l=n(116),c=n(91),f=n(122),h=n(29),d=n(11),p=n(16),y=n(88),m=n(93),v=n(35),g=n(42),b=p("matchAll"),_=v.set,w=v.getterFor("RegExp String Iterator"),T=RegExp.prototype,S=T.exec,E="".matchAll,C=!!E&&!d((function(){"a".matchAll(/./)})),k=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=w(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=y(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in T)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new k(i,c,o,s)};r({target:"String",proto:!0,forced:C},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in T?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(C)return E.apply(i,arguments);if(void 0===(n=e[b])&&g&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(C)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),g?x.call(r,t):r[b](t)}}),g||b in T||h(T,b,x)},function(e,t,n){"use strict";var r=n(5),i=n(25),o=n(91),a=n(122),s=n(16),u=n(42),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,y,m=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,m,n);if(u&&r)return String(m).replace(t,n)}if(f=String(m),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],y=1;y<d.length;y++)p+=String(n(h,y-1,f)),p+=d[y];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}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(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var v=d.prototype=f.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){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(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){"use strict";
21
+ */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},g={},b=(v.INDEX_SIZE_ERR=(g[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),v.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));v.INVALID_STATE_ERR=(g[11]="Invalid state",11),v.SYNTAX_ERR=(g[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),v.NAMESPACE_ERR=(g[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,g[e]),this.message=g[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function k(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function R(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function j(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function I(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(I(e,t))return!0}while(e=e.nextSibling)}function L(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function M(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,M(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return M(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function z(){}function q(){}function W(){}function $(){}function G(){}function K(){}function Y(){}function X(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,m=c.length,v=e.firstChild,g=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",g);for(var b=0;b<m;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=c.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}ee(_,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),n&&/^script$/i.test(g))for(;v;)v.data?t.push(v.data):ee(v,t,n,r,i),v=v.nextSibling;else for(;v;)ee(v,t,n,r,i),v=v.nextSibling;t.push("</",g,">")}else t.push("/>");return;case d:case y:for(v=e.firstChild;v;)ee(v,t,n,r,i),v=v.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,j),'"');case s:return t.push(e.data.replace(/[<&]/g,j));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}T.prototype=Error.prototype,n(v,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,S),k.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new T(w);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},R.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new L;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new k,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),L.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return I(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new Y;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new X;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new U,r=t.split(":"),i=n.attributes=new k;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(L,A),U.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,M(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return I(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return I(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},L.prototype.getElementsByTagName=U.prototype.getElementsByTagName,L.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(g[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),z.prototype={nodeName:"#comment",nodeType:h},r(z,V),q.prototype={nodeName:"#cdata-section",nodeType:u},r(q,V),W.prototype.nodeType=p,r(W,A),$.prototype.nodeType=m,r($,A),G.prototype.nodeType=c,r(G,A),K.prototype.nodeType=l,r(K,A),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=y,r(Y,A),X.prototype.nodeType=f,r(X,A),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=R,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";var r,i,o,a,s,u,l,c,f,h,d,p,y,m,v,g,b,_,w,T,S,E,C,k,x,O,P;n.d(t,"i",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return x})),n.d(t,"h",(function(){return O})),n.d(t,"c",(function(){return P})),function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_instant_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.Unshare="cv_product_unshare",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.ManageGroup="cv_product_manage_group",e.Export="cv_product_export",e.SendEmail="cv_product_send_email",e.Publish="cv_product_publish",e.Answer="cv_product_submit",e.Complete="cv_product_complete",e.Archive="cv_product_archive",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.Interaction="interaction",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.DirectShare="direct_share",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share"}(i||(i={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.EditUser="edit_user",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.ArchivedClassrooms="archived_classrooms",e.PreviewInteractive="preview_interactive",e.PreviewSharedInteractive="preview_shared_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.EditInteractiveDetails="edit_interactive_details",e.PlaySharedInteractive="play_shared_interactive",e.PlayInteractive="play_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.NewInteractive="new_interactive",e.CopyInteractive="copy_interactive",e.UnpublishInteractive="unpublish_interactive",e.ShareInteractive="share_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlayClip="play_clip",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.Dashboard="dashboard",e.ProductBanner="product_banner",e.Settings="settings",e.UserOptions="user_options",e.StudentFeed="student_feed",e.SharedByMe="shared_by_me",e.SharedWithMe="shared_with_me",e.TopVideos="top_videos",e.VideoViewsList="video_views_list",e.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup"}(o||(o={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(a||(a={})),function(e){e.PageLoad="page_load"}(s||(s={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(u||(u={})),function(e){e.Publish="publish",e.Unpublish="unpublish"}(l||(l={})),function(e){e.ActivateUser="activate_user",e.VerifyEmail="verify_email"}(c||(c={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(f||(f={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(h||(h={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(d||(d={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(p||(p={})),function(e){e.Embedded="embedded"}(y||(y={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace"}(m||(m={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.ViewUsage="view_usage",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video"}(v||(v={})),function(e){e.Remove="remove"}(g||(g={})),function(e){e.LibraryReview="library_review"}(b||(b={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(_||(_={})),function(e){e.Edit="edit"}(w||(w={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar",e.Clip="clip",e.Interactive="interactive"}(T||(T={})),function(e){e.On="on",e.Off="off"}(S||(S={})),function(e){e.ContinueSession="continue_session",e.NewSession="new_session"}(E||(E={})),function(e){e.DirectShare="direct_share",e.CopyLink="copy_link",e.CopyEmbedHtml="copy_embed_html",e.PluginEmbed="plugin_embed"}(C||(C={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(k||(k={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(x||(x={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(O||(O={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(P||(P={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(3),i=n(10),o=n(27),a=n(13),s=n(22),u=n(8);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=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(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(f,e);var t,n,o,l=m(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).mergeOptions(e,[].concat(c(t.defaultProps),c(t.props||[]))),r.result(g(t),"name")||u.c.throw(new u.b("BaseApplication must define a name")),r.result(g(t),"channelName")||u.c.throw(new u.b("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),a.a.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=f,(n=[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||u.c.throw(new u.b("Global channel ".concat(t," does not exist"))),i.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=r.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(r.extend(this.layoutOptions,{options:e})),this.layout||u.c.throw(new u.b("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||u.c.throw(new u.b("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r?r.hasView()||this.layout.showChildView("alert",new t({collection:n})):u.c.throw(new u.b("Your application layout must define an alert region"))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=r.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(b(f.prototype),"listenTo",this))}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Application)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(99),l=n(13),c=n(8),f=n(36),h=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=g(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=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(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=/([A-Z])/g,E=/(^|:)(\w)/gi,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(y,e);var t,n,o,d=_(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=d.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=y,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(h.a.SHELL,l.a.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return a.a.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;r.each(r.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],i=e.toEventName(n);e.addRouteLookup(i,t),e.listenTo(e.channelName,i,(function(n,i){i&&i.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var o=r.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=o,f.a.UpdateUrl(t,n,i)}))}))}))}},{key:"triggerNavLocked",value:function(e,t){e.trigger(l.a.NAV_IS_LOCKED,t),a.b.routingEnded()}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&r.each(r.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks."));var r=i.Radio.channel(h.a.SHELL);e.options.shell.isNavLocked()?e.triggerNavLocked(r,t):f.a.PageLoad(a.a.getHref(t))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&r.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var o=this;this.validateAppLink(e);var s=this.toMethodName(e.action);a.b.routingStarted();var f=i.Radio.channel(h.a.SHELL);if(this.options.shell.isNavLocked())this.triggerNavLocked(f,e);else{var d=new u.a;r.each(this.filters,(function(e){return d.use(e)})),d.go({appLink:e,shell:this.options.shell},(function(){f.trigger(l.a.ROUTE,e,t),o.createApp();var i=o.controller;if(r.isFunction(i[s])||(a.b.routingEnded(),c.c.throw(new c.b("".concat(s," does not exist on the ").concat(r.result(i,"name"),".")))),!1===i.triggerMethod("before:action"))return i.triggerMethod("action:cancelled"),void a.b.routingEnded();i.triggerMethod("load:layout"),i[s].apply(i,[].concat(p(e.args||[]),[e.params||{}])),r.isFunction(n)&&n(),a.b.routingEnded()}))}}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var i=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a={application:i.channelName,action:i.toEventName(n),args:t.slice(0,t.length-1),params:f.a.DeserializeQueryParams(t[t.length-1])};i.executeRoute(a,{isAppRoute:!0},(function(){f.a.UpdateQuery(r.extend(i.controller.getAndClearDefaultQueryParams(),a.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(S,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(E,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(a.b.routingEnded(),c.c.throw(new c.b("Invalid AppLink")))}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],v(T(y.prototype),"listenTo",this))}}])&&m(t.prototype,n),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.AppRouter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=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(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,o=f(l);function l(){return a(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Behavior)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(78),i=n(38),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=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(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,a=l(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,r=[{key:"getCacheKey",value:function(e){o.c.throw(new i.a("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(65),o=n(100);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=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(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(y,e);var t,n,c,d=h(y);function y(){return s(this,y),d.apply(this,arguments)}return t=y,(n=[{key:"set",value:function(e,t,n){var i,o;if(null===e)return this;for(i in"object"===a(e)?(o=e,n=t):(o={})[e]=t,n||(n={}),o)r.has(this.associations,i)&&(o[i]=this.setAssociation(i,o[i],n));return l(p(y.prototype),"set",this).call(this,o,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return l(p(y.prototype),"get",this).call(this,e);var n=e.substr(0,t),i=this.attributes[n];if(!i||!r.isFunction(i.get))return l(p(y.prototype),"get",this).call(this,e);var o=e.substr(t+1);return i.get(o)}},{key:"setAssociation",value:function(e,t,n){var a=this.associations[e],s=this.attributes[e];if(!r.isFunction(a))return t;if(n.unset)return s&&delete s.parent,delete this[e],s;if(s)return s instanceof i.a&&s.set(t,n),s instanceof o.a&&s.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),s;var u=t instanceof i.a?t:new a(t,{parse:!0});return u.parent=this,this[e]=u,u}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=l(p(y.prototype),"toJSON",this).apply(this,t);return r.each(this.associations,(function(e,t){r.has(i,t)&&r.isFunction(i[t].toJSON)?i[t]=i[t].toJSON():i[t]=(new e).toJSON()})),i}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.omit(l(p(y.prototype),"toJSON",this).apply(this,t),r.keys(this.associations))}}])&&u(t.prototype,n),c&&u(t,c),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=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(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,a=f(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).name||o.c.throw(new o.b("Your service must be named.")),t}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(27),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=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(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,i,s=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=s.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=c,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||a.c.throw(new a.b("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){r.each(this.requiredRegions,(function(t){r.has(r.result(e.prototype,"regions"),t)||a.c.throw(new a.b("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(c.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(12),l=n(8),c=n(13),f=n(36);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=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(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var T=function(){function e(t,n){b(this,e),this.application=t,this.options=n||{}}return w(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(n,e);var t=m(n);function n(){return b(this,n),t.apply(this,arguments)}return w(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(u.a.SHELL,c.a.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(u.a.SHELL,c.a.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(u.a.SHELL,c.a.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=i.Radio.channel(u.a.SHELL);t.reply(c.a.HAS_ACTIVE_ROUTE,r.bind(this.hasActiveRoute,this)),t.reply(c.a.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){a.b.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=i.Radio.channel(u.a.SHELL);this.listenTo(e,c.a.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;i.Radio.channel(u.a.SHELL).reply(c.a.ROUTE_LOOKUP,(function(t,n,r){return!!e.routeLookup[t]&&e.routeLookup[t](n,r)}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new T(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return u.a}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(){t.runStartUpSteps(t,e,(function(){d(g(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;r.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),f.a.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||l.c.throw(new l.b("An error must have a name in order to register a handler for it.")),r.any(this.errorHandlers,(function(t){return t.errorType===e}))&&l.c.throw(new l.b("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=r.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(g(n.prototype),"listenTo",this))}}]),n}(o.Application)},function(e,t){},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(127),i=n(336);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(127);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(342).XMLReader,c=t.DOMImplementation=n(179).DOMImplementation;t.XMLSerializer=n(179).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(180),i=n(343).handleRollover,o={};o.ts=n(345),o.aac=n(346);var a=n(57).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.23-dev.0"}')},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,v=C(o,"Map"),g=C(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||w),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=g?g(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(g){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return g?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=g&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return T(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(v||_),string:new b}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},k.Cache=w,e.exports=k}).call(this,n(32))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return v(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):p(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var g=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;t.a=S}).call(this,n(32))},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,y[d]):c(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.40-dev.0"}')},function(e,t,n){"use strict";t.a=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(48),a=n(42),s=n(17),u=n(145),l=n(11),c=n(33),f=n(51),h=n(18),d=n(24),p=n(21),y=n(28),m=n(60),v=n(59),g=n(62),b=n(72),_=n(110),w=n(148),T=n(113),S=n(46),E=n(26),C=n(79),k=n(29),x=n(41),O=n(70),P=n(80),R=n(71),A=n(81),j=n(16),I=n(149),L=n(220),D=n(52),M=n(35),N=n(43).forEach,B=P("hidden"),U=j("toPrimitive"),F=M.set,V=M.getterFor("Symbol"),H=Object.prototype,z=i.Symbol,q=o("JSON","stringify"),W=S.f,$=E.f,G=w.f,K=C.f,Y=O("symbols"),X=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=g($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,re=function(e,t){var n=Y[e]=g(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===H&&oe(X,t,n),d(e);var r=m(t,!0);return d(n),c(Y,r)?(n.enumerable?(c(e,B)&&e[B][r]&&(e[B][r]=!1),n=g(n,{enumerable:v(0,!1)})):(c(e,B)||$(e,B,v(1,{})),e[B][r]=!0),ne(e,r,n)):$(e,r,n)},ae=function(e,t){d(e);var n=y(t),r=b(n).concat(ce(n));return N(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=K.call(this,t);return!(this===H&&c(Y,t)&&!c(X,t))&&(!(n||!c(this,t)||!c(Y,t)||c(this,B)&&this[B][t])||n)},ue=function(e,t){var n=y(e),r=m(t,!0);if(n!==H||!c(Y,r)||c(X,r)){var i=W(n,r);return!i||!c(Y,r)||c(n,B)&&n[B][r]||(i.enumerable=!0),i}},le=function(e){var t=G(y(e)),n=[];return N(t,(function(e){c(Y,e)||c(R,e)||n.push(e)})),n},ce=function(e){var t=e===H,n=G(t?X:y(e)),r=[];return N(n,(function(e){!c(Y,e)||t&&!c(H,e)||r.push(Y[e])})),r};(u||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=A(e),n=function(e){this===H&&n.call(X,e),c(this,B)&&c(this[B],t)&&(this[B][t]=!1),ne(this,t,v(1,e))};return s&&te&&ne(H,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),C.f=se,E.f=oe,S.f=ue,_.f=w.f=le,T.f=ce,s&&($(z.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||x(H,"propertyIsEnumerable",se,{unsafe:!0})),I.f=function(e){return re(j(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),N(b(Z),(function(e){L(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=z(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?g(e):ae(g(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(e){return T.f(p(e))}}),q)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=z();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,q.apply(null,i)}});z.prototype[U]||k(z.prototype,U,z.prototype.valueOf),D(z,"Symbol"),R[B]=!0},function(e,t,n){var r=n(14),i=n(109),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(33),i=n(142),o=n(46),a=n(26);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(143),i=n(33),o=n(149),a=n(26).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(51),a=n(18),s=n(21),u=n(15),l=n(53),c=n(73),f=n(74),h=n(16),d=n(115),p=h("isConcatSpreadable"),y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=f("concat"),v=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(v(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(5),i=n(223),o=n(39);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(5),i=n(43).every;r({target:"Array",proto:!0,forced:n(44)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(226),o=n(39);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(5),i=n(43).find,o=n(39),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(5),i=n(43).findIndex,o=n(39),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(49),u=n(73);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(34),u=n(73);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(5),i=n(232);r({target:"Array",stat:!0,forced:!n(117)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(63),i=n(21),o=n(154),a=n(155),s=n(15),u=n(53),l=n(156);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,v=void 0!==m,g=0,b=l(d);if(v&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>g;g++)u(n,g,v?m(d[g],g):d[g]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;g++)u(n,g,v?o(f,m,[c.value,g],!0):c.value);return n.length=g,n}},function(e,t,n){"use strict";var r=n(5),i=n(111).includes,o=n(39);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(5),i=n(111).indexOf,o=n(44),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(5)({target:"Array",stat:!0},{isArray:n(51)})},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(5),i=n(69),o=n(28),a=n(44),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(5),i=n(239);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(28),i=n(49),o=n(15),a=n(44),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(5),i=n(43).map;r({target:"Array",proto:!0,forced:!n(74)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(53);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(5),i=n(160).right;r({target:"Array",proto:!0,forced:n(44)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(51),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(18),o=n(51),a=n(61),s=n(15),u=n(28),l=n(53),c=n(74),f=n(16)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),y=s(p.length),m=a(e,y),v=a(void 0===t?y:t,y);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,m,v);for(r=new(void 0===n?Array:n)(d(v-m,0)),c=0;m<v;m++,c++)m in p&&l(r,c,p[m]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(5),i=n(43).some;r({target:"Array",proto:!0,forced:n(44)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(21),a=n(11),s=n(44),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(121)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(61),o=n(49),a=n(15),s=n(21),u=n(73),l=n(53),c=n(74),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,y,m=s(this),v=a(m.length),g=i(e,v),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=v-g):(n=b-2,r=h(f(o(t),0),v-g)),v+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(m,r),d=0;d<r;d++)(p=g+d)in m&&l(c,d,m[p]);if(c.length=r,n<r){for(d=g;d<v-r;d++)y=d+n,(p=d+r)in m?m[y]=m[p]:delete m[y];for(d=v;d>v-r+n;d--)delete m[d-1]}else if(n>r)for(d=v-r;d>g;d--)y=d+n-1,(p=d+r-1)in m?m[y]=m[p]:delete m[y];for(d=0;d<n;d++)m[d+g]=arguments[d+2];return m.length=v-r+n,c}})},function(e,t,n){n(39)("flat")},function(e,t,n){n(39)("flatMap")},function(e,t,n){var r=n(14);n(52)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(161),i=n(254);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i,!0)},function(e,t,n){var r=n(18),i=n(83);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(26).f,i=n(62),o=n(86),a=n(63),s=n(85),u=n(50),l=n(119),c=n(121),f=n(17),h=n(54).fastKey,d=n(35),p=d.set,y=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],e,n)})),d=y(t),m=function(e,t,n){var r,i,o=d(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=h(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=d(e),i=h(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),o=y(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){n(52)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(17),i=n(11),o=n(72),a=n(113),s=n(79),u=n(21),l=n(69),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),y=f?o(p).concat(f(p)):o(p),m=y.length,v=0;m>v;)d=y[v++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(5)({target:"Object",stat:!0,sham:!n(17)},{create:n(62)})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(146)})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(26).f})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(163).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(5),i=n(84),o=n(11),a=n(18),s=n(54).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(5),i=n(50),o=n(53);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(5),i=n(11),o=n(28),a=n(46).f,s=n(17),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(5),i=n(17),o=n(142),a=n(28),s=n(46),u=n(53);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(5),i=n(11),o=n(148).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(5),i=n(11),o=n(21),a=n(64),s=n(158);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(5)({target:"Object",stat:!0},{is:n(164)})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(21),o=n(72);r({target:"Object",stat:!0,forced:n(11)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(5)({target:"Object",stat:!0},{setPrototypeOf:n(83)})},function(e,t,n){"use strict";var r=n(116),i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(5),i=n(163).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(5),u=n(42),l=n(14),c=n(48),f=n(166),h=n(41),d=n(86),p=n(52),y=n(121),m=n(18),v=n(34),g=n(85),b=n(47),_=n(50),w=n(117),T=n(88),S=n(167).set,E=n(282),C=n(168),k=n(283),x=n(76),O=n(89),P=n(35),R=n(114),A=n(16),j=n(115),I=A("species"),L="Promise",D=P.get,M=P.set,N=P.getterFor(L),B=f,U=l.TypeError,F=l.document,V=l.process,H=c("fetch"),z=x.f,q=z,W="process"==b(V),$=!!(F&&F.createEvent&&l.dispatchEvent),G=R(L,(function(){if(66===j)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!B.prototype.finally)return!0;if(j>=51&&/native code/.test(B))return!1;var e=B.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[I]=t,!(e.then((function(){}))instanceof t)})),K=G||!w((function(e){B.all(e).catch((function(){}))})),Y=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(U("Promise-chain cycle")):(u=Y(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){W?V.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=W||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){W?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw U("Promise can't be resolved itself");var i=Y(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};G&&(B=function(e){g(this,B,L),v(e),r.call(this);var t=D(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){M(this,{type:L,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(B.prototype,{then:function(e,t){var n=N(this),r=z(T(this,B));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=D(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=z=function(e){return e===B||e===o?new i(e):q(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new B((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(B,H.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:B}),p(B,L,!1,!0),y(L),o=c(L),s({target:L,stat:!0,forced:G},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:L,stat:!0,forced:u||G},{resolve:function(e){return C(u&&this===o?B:this,e)}}),s({target:L,stat:!0,forced:K},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=v(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=v(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(14),h=n(46).f,d=n(47),p=n(167).set,y=n(82),m=f.MutationObserver||f.WebKitMutationObserver,v=f.process,g=f.Promise,b="process"==d(v),_=h(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=v.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){v.nextTick(r)}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(y)?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):g&&g.resolve?(l=g.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(5),i=n(42),o=n(166),a=n(48),s=n(88),u=n(168),l=n(41);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(5),i=n(77).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(5),i=n(61),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(5),i=n(123),o=n(25);r({target:"String",proto:!0,forced:!n(124)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).end;r({target:"String",proto:!0,forced:n(174)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).start;r({target:"String",proto:!0,forced:n(174)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(28),o=n(15);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(5)({target:"String",proto:!0},{repeat:n(173)})},function(e,t,n){"use strict";var r=n(92),i=n(24),o=n(25),a=n(164),s=n(94);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(92),i=n(91),o=n(24),a=n(25),s=n(88),u=n(93),l=n(15),c=n(94),f=n(90),h=n(11),d=[].push,p=Math.min,y=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,y=new RegExp(e.source,h+"g");(s=f.call(y,r))&&!((u=y.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)y.lastIndex===s.index&&y.lastIndex++;return p===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),m=f.unicode,v=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),g=new d(y?f:"^(?:"+f.source+")",v),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(g,h)?[h]:[];for(var _=0,w=0,T=[];w<h.length;){g.lastIndex=y?w:0;var S,E=c(g,y?h:h.slice(w));if(null===E||(S=p(l(g.lastIndex+(y?0:w)),h.length))===_)w=u(h,w,m);else{if(T.push(h.slice(_,w)),T.length===b)return T;for(var C=1;C<=E.length-1;C++)if(T.push(E[C]),T.length===b)return T;w=_=S}}return T.push(h.slice(_)),T}]}),!y)},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(5),i=n(95).trim;r({target:"String",proto:!0,forced:n(126)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(95).end,o=n(126)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(5),i=n(95).start,o=n(126)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(64),a=n(83),s=n(62),u=n(26),l=n(59),c=n(50),f=n(29),h=n(24),d=n(35),p=d.set,y=d.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};m.prototype=s(Error.prototype,{constructor:l(5,m),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(m.prototype,"errors",{get:function(){return y(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(316)},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(76),a=n(89),s=n(50);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(48),a=n(76),s=n(89),u=n(50);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(76),o=n(89);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(77).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(35),s=n(77),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(322)},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(15),s=n(34),u=n(24),l=n(116),c=n(91),f=n(122),h=n(29),d=n(11),p=n(16),y=n(88),m=n(93),v=n(35),g=n(42),b=p("matchAll"),_=v.set,w=v.getterFor("RegExp String Iterator"),T=RegExp.prototype,S=T.exec,E="".matchAll,C=!!E&&!d((function(){"a".matchAll(/./)})),k=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=w(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=y(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in T)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new k(i,c,o,s)};r({target:"String",proto:!0,forced:C},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in T?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(C)return E.apply(i,arguments);if(void 0===(n=e[b])&&g&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(C)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),g?x.call(r,t):r[b](t)}}),g||b in T||h(T,b,x)},function(e,t,n){"use strict";var r=n(5),i=n(25),o=n(91),a=n(122),s=n(16),u=n(42),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,y,m=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,m,n);if(u&&r)return String(m).replace(t,n)}if(f=String(m),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],y=1;y<d.length;y++)p+=String(n(h,y-1,f)),p+=d[y];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}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(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var v=d.prototype=f.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){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(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){"use strict";
22
22
  /** @license React v16.11.0
23
23
  * react.production.min.js
24
24
  *
@@ -86,4 +86,4 @@ var o=null,a=function(){function e(e){var t,n,r;o||(o=function(){var e,t,n,r,i,o
86
86
  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
87
87
  var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,o,s,l,c,f,h,d,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),y=new a(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),v=new Int32Array(m.buffer);for(r=n[0],i=n[1],o=n[2],s=n[3],d=0;d<p.length;d+=4)l=u(p[d]),c=u(p[d+1]),f=u(p[d+2]),h=u(p[d+3]),y.decrypt(l,c,f,h,v,d),v[d]=u(v[d]^r),v[d+1]=u(v[d+1]^i),v[d+2]=u(v[d+2]^o),v[d+3]=u(v[d+3]^s),r=l,i=c,o=f,s=h;return m}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new l(r,i,o,(function(t,r){var i,o;e.postMessage((i={source:n.source,decrypted:r},o={},Object.keys(i).forEach((function(e){var t=i[e];ArrayBuffer.isView(t)?o[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:o[e]=t})),o),[r.buffer])}))}}(n)}()})),vu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},gu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bu=function(e,t){t.activePlaylistLoader=e,e.load()},_u={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;gu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var l in zo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];zo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),gu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},wu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},Tu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master,s=a.mediaGroups,u=a.playlists,l=t.mediaTypes[e],c=l.groups,f=l.tracks,h=t.masterPlaylistLoader;s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}});var d=function(i){c[i]||(c[i]=[]);var a=u.filter((function(t){return t.attributes[e]===i})),l=function(u){var l=s[e][i][u];!a.filter((function(e){return e.resolvedUri!==l.resolvedUri})).length&&a.length&&delete l.resolvedUri;var d=void 0;if(d="vhs-json"===r&&l.playlists?new aa(l.playlists[0],n,o):l.resolvedUri?new aa(l.resolvedUri,n,o):l.playlists&&"dash"===r?new qa(l.playlists[0],n,o,h):null,l=zo.mergeOptions({id:u,playlistLoader:d},l),wu[e](e,l.playlistLoader,t),c[i].push(l),void 0===f[u]){var p=new zo.AudioTrack({id:u,kind:vu(l),enabled:!1,language:l.language,default:l.default,label:u});f[u]=p}};for(var d in s[e][i])l(d)};for(var p in s[e])d(p);i.on("error",_u[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var d in l[h]||(l[h]=[]),s[e][h])if(!s[e][h][d].forced){var p=s[e][h][d],y=void 0;if("hls"===i)y=new aa(p.resolvedUri,r,a);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;y=new qa(p.playlists[0],r,a,f)}else"vhs-json"===i&&(y=new aa(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=zo.mergeOptions({id:d,playlistLoader:y},p),wu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[d]){var m=n.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;c[d]=m}}o.on("error",_u[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var l=r[e][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(zo.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;a[u]=c}}}},Su={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Eu=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Tu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Su[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;gu(r,o),s&&(s.playlistLoader?(r.resyncLoader(),bu(s.playlistLoader,o)):u&&i.resetEverything())}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(gu(r,o),s){if("AUDIO"===e){if(!s.playlistLoader)return i.setAudio(!0),void i.resetEverything();r.setAudio(!0),i.setAudio(!1)}u!==s.playlistLoader?(r.track&&r.track(a),r.resetEverything(),bu(s.playlistLoader,o)):bu(s.playlistLoader,o)}}}(n,e)}));var o=t.AUDIO.activeGroup();if(o){var a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged()}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},Cu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],ku=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},xu=function(e){function t(t){var n;n=e.call(this)||this;var r,i=t.src,o=t.handleManifestRedirects,s=t.withCredentials,u=t.tech,l=t.bandwidth,c=t.externVhs,f=t.useCueTags,d=t.blacklistDuration,p=t.enableLowInitialPlaylist,y=t.sourceType,m=t.cacheEncryptionKeys,v=t.handlePartialData,g=t.experimentalBufferBasedABR;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");zs=c,n.experimentalBufferBasedABR=Boolean(g),n.withCredentials=s,n.tech_=u,n.vhs_=u.vhs,n.sourceType_=y,n.useCueTags_=f,n.blacklistDuration=d,n.enableLowInitialPlaylist=p,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:o,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(r={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hs,activeTrack:Hs,onGroupChanged:Hs,onTrackChanged:Hs}})),r),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(h()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(h()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(h()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=zo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new pu(t),n.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new mu,n.sourceUpdater_=new uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new yu;var b={vhs:n.vhs_,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,handlePartialData:v,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new qa(i,n.vhs_,n.requestOptions_):new aa(i,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Vs(zo.mergeOptions(b,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new Vs(zo.mergeOptions(b,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new fu(zo.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),Cu.forEach((function(e){n[e+"_"]=ku.bind(h()(n),e)})),n.logger_=Cs("MPC"),n.triggeredFmp4Usage=!1,n.masterPlaylistLoader_.load(),n}p()(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Eu({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.masterPlaylistLoader_.media(e.initialMedia_),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),zs.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,o=e.bufferHighWaterLine,a=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return zo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=s?Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Wa.MAX_BUFFER_LOW_WATER_LINE;if(a<c)return u(l+" as duration < max low water line ("+a+" < "+c+")"),!0;var f=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(f<h&&(!s||r<o)){var d=l+" as next bandwidth < current bandwidth ("+f+" < "+h+")";return s&&(d+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+o+")"),u(d),!0}if((!s||f>h)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(p+=" and next bandwidth > current bandwidth ("+f+" > "+h+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything((function(){zo.browser.IE_VERSION||zo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})))},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(zo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=zs.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(_a),o=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return zo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var a=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(a=!0,delete e.excludeUntil)}})),a&&(zo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var s=this.selectPlaylist();if(!s)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:zo.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+s.id+"."),s.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),s.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=s.targetDuration/2*1e3||5e3,f="number"==typeof s.lastRequest&&Date.now()-s.lastRequest<=c;return this.masterPlaylistLoader_.media(s,o||f)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var o=[];(i||"audio"===e)&&o.push("AUDIO"),(i||"subtitle"===e)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ua(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:zs.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master.suggestedPresentationDelay,i=zs.Playlist.seekable(t,n,r);if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=zs.Playlist.seekable(t,n,r)).length)return}var o,a;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=zo.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+ca(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=zs.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=Es(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||Ue.DEFAULT_VIDEO_CODEC),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||Ue.DEFAULT_AUDIO_CODEC)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||Ue.DEFAULT_AUDIO_CODEC,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var o,a={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?Object(Ue.browserSupportsCodec)(s):Object(Ue.muxerSupportsCodec)(s)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(r[e]),"audio"===e&&(o=n)}var i,s})),i&&o&&this.media().attributes.AUDIO){var s=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===s&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+s+" as "+o+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(Object(Ue.parseCodecs)(e.sourceUpdater_.codecs[t]||"")[t]||{}).type,i=(Object(Ue.parseCodecs)(r[t]||"")[t]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var o=Es(e.master,i),a=[];!o.audio||Object(Ue.muxerSupportsCodec)(o.audio)||Object(Ue.browserSupportsCodec)(o.audio)||(i.excludeUntil=1/0,a.push("audio codec "+o.audio)),!o.video||Object(Ue.muxerSupportsCodec)(o.video)||Object(Ue.browserSupportsCodec)(o.video)||(i.excludeUntil=1/0,a.push("video codec "+o.video)),o.text&&"stpp.ttml.im1t"===o.text&&(i.excludeUntil=1/0,a.push("text codec "+o.text)),a.length&&e.logger_("excluding "+i.id+" as codecs "+a.join(", ")+" are unsupported")}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=Object(Ue.parseCodecs)(e),r=Object.keys(n).length;this.master().playlists.forEach((function(e){if(e.excludeUntil!==1/0){var i={},o=2,a=[],s=Es(t.masterPlaylistLoader_.master,e);if(s.audio||s.video){var u=[s.video,s.audio].filter(Boolean).join(",");i=Object(Ue.parseCodecs)(u),o=Object.keys(i).length}o!==r&&(a.push('codec count "'+o+'" !== "'+r+'"'),e.excludeUntil=1/0),t.sourceUpdater_.canChangeType()||(i.video&&n.video&&i.video.type.toLowerCase()!==n.video.type.toLowerCase()&&(a.push('video codec "'+i.video.type+'" !== "'+n.video.type+'"'),e.excludeUntil=1/0),i.audio&&n.audio&&i.audio.type.toLowerCase()!==n.audio.type.toLowerCase()&&(e.excludeUntil=1/0,a.push('audio codec "'+i.audio.type+'" !== "'+n.audio.type+'"'))),a.length&&t.logger_("blacklisting "+e.id+": "+a.join(" && "))}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=hu(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Wa.GOAL_BUFFER_LENGTH,n=Wa.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Wa.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Wa.BUFFER_LOW_WATER_LINE,n=Wa.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Wa.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Wa.BUFFER_HIGH_WATER_LINE},t}(zo.EventTarget),Ou=function(e,t,n){var r,i,o,a=e.masterPlaylistController_,s=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes.RESOLUTION){var u=t.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Es(a.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,o=s,function(e){var t=r.master.playlists[i],n=ba(t),a=_a(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Pu=["seeking","seeked","pause","playing","error"],Ru=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Cs("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},i=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},s=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(Pu,i),this.tech_.on("canplay",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",r),t.tech_.off(Pu,i),t.tech_.off("canplay",n),u.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:fa(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ca(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!!t.length&&(!(t.end(0)-t.start(0)<2*n)&&(!(r>t.start(0))&&t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+.1,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ua(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var o=la(i,t);if(o.length>0){var a=o.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+o.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var o=ua(t,r-3),a=ua(t,r),s=ua(n,r);s.length&&!a.length&&o.length&&(i={start:o.end(0),end:s.end(0)})}else{la(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=la(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return zo.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return zo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null},e}(),Au={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ju=function(e){!function e(t,n){var r=0,i=0,o=zo.mergeOptions(Au,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void zo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)},Iu={PlaylistLoader:aa,Playlist:Sa,utils:Ma,STANDARD_PLAYLIST_SELECTOR:js,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Sa.isEnabled);return Ps(t,(function(e,t){return Rs(e,t)})),t.filter((function(t){return!!Es(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:js,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,As(this.playlists.master,t,parseInt(Os(this.tech_.el(),"width"),10)*n,parseInt(Os(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Rs,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:xa()};Object.keys(Wa).forEach((function(e){Object.defineProperty(Iu,e,{get:function(){return zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Wa[e]},set:function(t){zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?zo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Wa[e]=t}})}));var Lu=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Iu.canPlaySource=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Du=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),a=[],s=[];return o.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(s)])},Mu=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={video:t&&t.attributes&&t.attributes.CODECS,audio:n&&n.attributes&&n.attributes.CODECS};!r.audio&&r.video&&r.video.split(",").length>1&&r.video.split(",").forEach((function(e){e=e.trim(),Object(Ue.isAudioCodec)(e)?r.audio=e:Object(Ue.isVideoCodec)(e)&&(r.video=e)}));var i=r.video?'video/mp4;codecs="'+r.video+'"':null,o=r.audio?'audio/mp4;codecs="'+r.audio+'"':null,a={};for(var s in e)a[s]={audioContentType:o,videoContentType:i},t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(a[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(a[s].url=e[s]);return zo.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(zo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Nu=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Iu.supportsNativeHls=function(){if(!u.a||!u.a.createElement)return!1;var e=u.a.createElement("video");if(!zo.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Iu.supportsNativeDash=!!(u.a&&u.a.createElement&&zo.getTech("Html5").isSupported())&&/maybe|probably/i.test(u.a.createElement("video").canPlayType("application/dash+xml")),Iu.supportsTypeNatively=function(e){return"hls"===e?Iu.supportsNativeHls:"dash"===e&&Iu.supportsNativeDash},Iu.isSupported=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Bu=function(e){function t(t,n,r){var i;if(i=e.call(this,n,zo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&zo.log.warn("Using hls options is deprecated. Use vhs instead."),i.logger_=Cs("VhsHandler"),n.options_&&n.options_.playerId){var o=zo(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return zo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return zo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return zo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),h()(i)},configurable:!0}),i.player_=o}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(u.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=u.a.fullscreenElement||u.a.webkitFullscreenElement||u.a.mozFullScreenElement||u.a.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}p()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Nu();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Wa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Wa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Iu,this.options_.sourceType=Object(N.simpleTypeFromSourceType)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new xu(this.options_);var i=zo.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Ru(i),this.masterPlaylistController_.on("error",(function(){var e=zo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?Iu.movingAverageBandwidthSelector(.55):Iu.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Iu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){zo.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return fa(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fa(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=Nu();t=t?zo.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,t;t=(e=n).playlists,e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter((function(e){return!ba(e)})).map((function(t,n){return new Ou(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Mu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});11!==zo.browser.IE_VERSION&&n?(this.logger_("waiting for EME key session creation"),Du({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=zo.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Lu(t,n.playlists)})),this.playlists.on("mediachange",(function(){Lu(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Na({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ba({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(zo.getComponent("Component")),Uu={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t);return Uu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=zo.mergeOptions(zo.options,n);return t.vhs=new Bu(e,t,r),zo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return zo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=xa(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t).vhs.overrideNative,r=void 0===n?!zo.browser.IS_ANY_SAFARI:n,i=Object(N.simpleTypeFromSourceType)(e);return i&&(!Iu.supportsTypeNatively(i)||r)?"maybe":""}};Object(Ue.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&zo.getTech("Html5").registerSourceHandler(Uu,0),zo.VhsHandler=Bu,Object.defineProperty(zo,"HlsHandler",{get:function(){return zo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Bu},configurable:!0}),zo.VhsSourceHandler=Uu,Object.defineProperty(zo,"HlsSourceHandler",{get:function(){return zo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Uu},configurable:!0}),zo.Vhs=Iu,Object.defineProperty(zo,"Hls",{get:function(){return zo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Iu},configurable:!0}),zo.use||(zo.registerComponent("Hls",Iu),zo.registerComponent("Vhs",Iu)),zo.options.vhs=zo.options.vhs||{},zo.options.hls=zo.options.hls||{},zo.registerPlugin?zo.registerPlugin("reloadSourceOnError",ju):zo.plugin("reloadSourceOnError",ju);var Fu=zo,Vu=n(101),Hu=n.n(Vu);function zu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qu=function e(t){var n=this;if(Fu.browser.IS_IE8)for(var r in n=Hu.a.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},Wu=function(e){
88
88
  /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
89
- var t,n;function r(){var t,n=zu(zu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||zu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new qu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var $u in Wu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},Wu.prototype.allowedEvents_)Wu.prototype["on"+$u]=null;var Gu=Fu.registerPlugin||Fu.plugin,Ku=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new Wu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Gu("qualityLevels",Ku),Ku.VERSION="2.0.9";var Yu=n(211),Xu="cv-persisttest",Qu=function(){try{return window.localStorage.setItem(Xu,"cv-player-storage-test"),window.localStorage.removeItem(Xu),!0}catch(e){return!1}},Ju=function(e){return window.localStorage.getItem(e)},Zu=function(e,t){window.localStorage.setItem(e,t)},el=function(e){window.localStorage.removeItem(e)};function tl(e){return(tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rl(e,t){return(rl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function il(e){var t=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(e){return!1}}();return function(){var n,r=al(e);if(t){var i=al(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ol(this,n)}}function ol(e,t){if(t&&("object"===tl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function al(e){return(al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sl=Fu.getPlugin("plugin"),ul="cvplayer-mute",ll=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rl(e,t)}(o,e);var t,n,r,i=il(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Qu()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){e.player.off("volumechange",e.saveVolumeState)}));var t=Ju("cvplayer-volume"),n=Ju(ul);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){Zu("cvplayer-volume",this.player.volume().toString()),Zu(ul,this.player.muted().toString())}}])&&nl(t.prototype,n),r&&nl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sl);function cl(e){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hl(e,t){return(hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dl(e){var t=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(e){return!1}}();return function(){var n,r=ml(e);if(t){var i=ml(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pl(this,n)}}function pl(e,t){if(t&&("object"===cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yl(e)}function yl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",ll);var vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hl(e,t)}(o,e);var t,n,r,i=dl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(yl(t)),t.onFullscreenChange=t.onFullscreenChange.bind(yl(t)),t.player.ready((function(){return t.initialize()})),t):pl(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.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 e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&fl(t.prototype,n),r&&fl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",vl);var gl="\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(352);function bl(e){return(bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wl(e,t){return(wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tl(e){var t=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(e){return!1}}();return function(){var n,r=Cl(e);if(t){var i=Cl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sl(this,n)}}function Sl(e,t){if(t&&("object"===bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return El(e)}function El(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wl(e,t)}(o,e);var t,n,r,i=Tl(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(El(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.one("dispose",(function(){e.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:gl,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&_l(t.prototype,n),r&&_l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function xl(e){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t){return(Pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e){var t=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(e){return!1}}();return function(){var n,r=jl(e);if(t){var i=jl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Al(this,n)}}function Al(e,t){if(t&&("object"===xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jl(e){return(jl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}kl.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",kl);var Il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)}(o,e);var t,n,r,i=Rl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ol(t.prototype,n),r&&Ol(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("openExternallyPlugin",Il);n(353);function Ll(e){return(Ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ml(){return(Ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nl(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vl(e)););return e}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ul(e){var t=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(e){return!1}}();return function(){var n,r=Vl(e);if(t){var i=Vl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fl(this,n)}}function Fl(e,t){if(t&&("object"===Ll(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vl(e){return(Vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}(o,e);var t,n,r,i=Ul(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Ml(Vl(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ml(Vl(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Dl(t.prototype,n),r&&Dl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("component"));function zl(e){return(zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wl(){return(Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xl(e)););return e}function Gl(e,t){return(Gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kl(e){var t=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(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){if(t&&("object"===zl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Hl);var Ql=Fu.getPlugin("plugin"),Jl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gl(e,t)}(o,e);var t,n,r,i=Kl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.player.ready((function(){return t.initialize()})),t}return t=o,(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 e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.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(){Wl(Xl(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&ql(t.prototype,n),r&&ql(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ql);function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("touchControls",Jl);var ec=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Zl(t.prototype,n),r&&Zl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function tc(e){return(tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=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(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){if(t&&("object"===tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options_=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources)}},{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new ec(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&nc(t.prototype,n),r&&nc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function uc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("progressiveFiles",sc);var lc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},cc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return lc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&uc(t.prototype,n),r&&uc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var hc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&fc(t.prototype,n),r&&fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},yc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return pc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})))}}])&&dc(t.prototype,n),r&&dc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Fu.use("*",(function(e){return new yc(e)}));n(354);function mc(e){return(mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(){return(gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bc(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ec(e)););return e}function _c(e,t){return(_c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=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(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tc(this,n)}}function Tc(e,t){if(t&&("object"===mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sc(e)}function Sc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},kc='<?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>',xc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}(o,e);var t,n,r,i=wc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Sc(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return gc(Ec(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(kc,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Cc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&vc(t.prototype,n),r&&vc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Oc(e){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rc(){return(Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ac(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ac(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}function jc(e,t){return(jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ic(e){var t=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(e){return!1}}();return function(){var n,r=Mc(e);if(t){var i=Mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lc(this,n)}}function Lc(e,t){if(t&&("object"===Oc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dc(e)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",xc);var Nc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)}(o,e);var t,n,r,i=Ic(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Dc(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new cc(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(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),Rc(Mc(o.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 e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Nc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Nc(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),hc.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&Pc(t.prototype,n),r&&Pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function Uc(e){return(Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vc(e,t){return(Vc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hc(e){var t=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(e){return!1}}();return function(){var n,r=qc(e);if(t){var i=qc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zc(this,n)}}function zc(e,t){if(t&&("object"===Uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qc(e){return(qc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("localCache",Bc);var Wc=Fu.getPlugin("plugin"),$c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}(o,e);var t,n,r,i=Hc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Qu())return Ju(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Zu("cvplayer-show-subtitles","true"),void Zu("cvplayer-selected-language",n.language)}Zu("cvplayer-show-subtitles","false"),el("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Qu()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Zu("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],l=this.getLanguageParts(u.language),c=l.language,f=l.country;if(c===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Fc(t.prototype,n),r&&Fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Wc);function Gc(e){return(Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yc(e,t){return(Yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xc(e){var t=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(e){return!1}}();return function(){var n,r=Jc(e);if(t){var i=Jc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qc(this,n)}}function Qc(e,t){if(t&&("object"===Gc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jc(e){return(Jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",$c);var Zc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ef=Fu.getPlugin("plugin"),tf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}(o,e);var t,n,r,i=Xc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Qu()&&(r=Ju(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||hc.enableProfileOrNextBest(i,n),Qu()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Zu(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Kc(t.prototype,n),r&&Kc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ef);Fu.registerPlugin("persistQualitySettingsPlugin",tf);n(355);function nf(e){return(nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rf(e){return function(e){if(Array.isArray(e))return of(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return of(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uf(e,t,n){return t&&sf(e.prototype,t),n&&sf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t)}function cf(e,t){return(cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ff(e){var t=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(e){return!1}}();return function(){var n,r=df(e);if(t){var i=df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hf(this,n)}}function hf(e,t){if(t&&("object"===nf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pf=Fu.getComponent("Component"),yf=function(e){lf(n,e);var t=ff(n);function n(e,r){return af(this,n),t.call(this,e,r)}return uf(n,[{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}]),n}(pf),mf=function(e){lf(n,e);var t=ff(n);function n(){var e;return af(this,n),(e=t.apply(this,arguments)).events_=[],e}return uf(n,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new yf(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t;(t=this.events_).push.apply(t,rf(e)),this.update()}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(pf);function vf(e){return(vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _f(e,t){return(_f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wf(e){var t=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(e){return!1}}();return function(){var n,r=Sf(e);if(t){var i=Sf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){if(t&&("object"===vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sf(e){return(Sf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ef=Fu.getPlugin("plugin"),Cf="play",kf="playing",xf="pause",Of="seeking",Pf="seekstart",Rf="seekend",Af="ended",jf="pausedseek",If="timeupdate",Lf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_f(e,t)}(o,e);var t,n,r,i=wf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(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 e,t=this,n=(gf(e={},Cf,(function(){return t.onPlay()})),gf(e,xf,(function(){return t.onPause()})),gf(e,If,(function(){return t.onTimeUpdate()})),gf(e,Of,(function(){return t.onSeeking()})),gf(e,Af,(function(){return t.onEnded()})),gf(e,kf,(function(){return t.onPlaying()})),e),r=Object.keys(n);r.forEach((function(e){return t.player.on(e,n[e])})),this.one("dispose",(function(){r.forEach((function(e){return t.player.off(e,n[e])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,t=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new mf(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Rf),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Cf)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(xf),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Cf)),this.isPlaying&&!this.isSeeking&&this.logEvent(kf)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(jf),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Pf))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Af)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===Pf&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===kf||e===Cf)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===kf||e===xf}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Af||e===jf}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===kf&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}])&&bf(t.prototype,n),r&&bf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ef);Fu.registerPlugin("progressReporterPlugin",Lf);n(356);function Df(e){return(Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bf(e,t){return(Bf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uf(e){var t=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(e){return!1}}();return function(){var n,r=Vf(e);if(t){var i=Vf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ff(this,n)}}function Ff(e,t){if(t&&("object"===Df(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vf(e){return(Vf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bf(e,t)}(o,e);var t,n,r,i=Uf(o);function o(){return Mf(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Nf(t.prototype,n),r&&Nf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component")),zf=["top","left","right","bottom"],qf={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(357);function Wf(e){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kf(e,t,n){return t&&Gf(e.prototype,t),n&&Gf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yf(){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Xf(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Xf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=th(e)););return e}function Qf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jf(e,t)}function Jf(e,t){return(Jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zf(e){var t=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(e){return!1}}();return function(){var n,r=th(e);if(t){var i=th(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eh(this,n)}}function eh(e,t){if(t&&("object"===Wf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nh=Fu.getComponent("Component"),rh=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Kf(n,[{key:"createEl",value:function(){return Yf(th(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(nh),ih=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).addChildren(),i}return Kf(n,[{key:"addChildren",value:function(){var e=this;zf.forEach((function(t){e.addChild(new rh(e.player_,{side:t}))}))}}]),n}(nh);function oh(e){return(oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sh(){return(sh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=uh(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function uh(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hh(e)););return e}function lh(e,t){return(lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ch(e){var t=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(e){return!1}}();return function(){var n,r=hh(e);if(t){var i=hh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fh(this,n)}}function fh(e,t){if(t&&("object"===oh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hh(e){return(hh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lh(e,t)}(o,e);var t,n,r,i=ch(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var t=this;sh(hh(o.prototype),"handleClick",this).call(this,e),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&ah(t.prototype,n),r&&ah(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function ph(e){return(ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mh(e,t){return(mh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vh(e){var t=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(e){return!1}}();return function(){var n,r=bh(e);if(t){var i=bh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gh(this,n)}}function gh(e,t){if(t&&("object"===ph(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bh(e){return(bh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mh(e,t)}(o,e);var t,n,r,i=vh(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&yh(t.prototype,n),r&&yh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function wh(e){return(wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eh(){return(Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ch(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ch(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ph(e)););return e}function kh(e,t){return(kh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xh(e){var t=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(e){return!1}}();return function(){var n,r=Ph(e);if(t){var i=Ph(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oh(this,n)}}function Oh(e,t){if(t&&("object"===wh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ph(e){return(Ph=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rh=Fu.getComponent("MenuButton"),Ah=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kh(e,t)}(o,e);var t,n,r,i=xh(o);function o(){var e;return Th(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new dh(this.player_,{label:"Video Controls"})];return zf.forEach((function(r){n.push(new _h(e.player_,{side:r,label:qf[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Eh(Ph(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return qf[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Rh.prototype.handleClick.apply(this)}}])&&Sh(t.prototype,n),r&&Sh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Rh);n(358);function jh(e){return(jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ih(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lh(e,t){return(Lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=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(e){return!1}}();return function(){var n,r=Nh(e);if(t){var i=Nh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mh(this,n)}}function Mh(e,t){if(t&&("object"===jh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nh(e){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bh="cv-whiteboard-side",Uh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}(o,e);var t,n,r,i=Dh(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Qu()){var e=Ju(Bh);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Hf(this.player);this.button=new Ah(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new ih(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Qu()&&Zu(Bh,e),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"),Fu.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)),Fu.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Ih(t.prototype,n),r&&Ih(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("whiteboardModePlugin",Uh);n(359);var Fh=n(106),Vh=n.n(Fh),Hh=(n(360),n(362),n(135)),zh=n.n(Hh),qh=n(136),Wh=n.n(qh),$h=n(212),Gh=n.n($h),Kh=n(213),Yh=(n(364),null),Xh=null;function Qh(){if(null===Yh){if("undefined"==typeof document)return Yh=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Yh=n}return Yh}Vh.a&&window.addEventListener("resize",(function(){Xh!==window.devicePixelRatio&&(Xh=window.devicePixelRatio,Yh=null)}));var Jh=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Zh(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function ed(e){return e&&e.ownerDocument?e.ownerDocument:document}var td=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Zh(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=ed(r.el),n=Zh(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=zh()(this.recalculate.bind(this),64),this.onMouseMove=zh()(this.onMouseMove.bind(this),64),this.hideScrollbars=Wh()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Wh()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Gh()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=ed(e),r=Zh(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Vh.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||Kh.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Zh(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=ed(this.el),r=Zh(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Zh(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Qh()}catch(e){return Qh()}},t.removeListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();td.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},td.instances=new WeakMap,td.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))}))},td.removeObserver=function(){this.globalObserver.disconnect()},td.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(td.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},td.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!td.instances.has(e)&&new td(e,Jh(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?td.instances.has(e)&&td.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){td.instances.has(e)&&td.instances.get(e).unMount()})))}))}))},td.getOptions=Jh,Vh.a&&td.initHtmlApi();var nd=td;function rd(e){return(rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function od(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ad(){return(ad="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=sd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function sd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fd(e)););return e}function ud(e,t){return(ud=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ld(e){var t=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(e){return!1}}();return function(){var n,r=fd(e);if(t){var i=fd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cd(this,n)}}function cd(e,t){if(t&&("object"===rd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fd(e){return(fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hd=Fu.getComponent("Menu"),dd=hd.prototype,pd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ud(e,t)}(o,e);var t,n,r,i=ld(o);function o(){return id(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){var e=ad(fd(o.prototype),"createEl",this).call(this);return this.simpleBar=new nd(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():ad(fd(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ad(fd(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(e){ad(fd(o.prototype),"addItem",this).call(this,e),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){ad(fd(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||dd.handleBlur.call(this,e)}}])&&od(t.prototype,n),r&&od(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(hd);function yd(e){return(yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function md(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gd(e,t){return(gd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bd(e){var t=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(e){return!1}}();return function(){var n,r=wd(e);if(t){var i=wd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _d(this,n)}}function _d(e,t){if(t&&("object"===yd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wd(e){return(wd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}hd.prototype=pd.prototype,Fu.registerComponent("Menu",pd);var Td=Fu.getComponent("Component"),Sd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gd(e,t)}(o,e);var t,n,r,i=bd(o);function o(){return md(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new pd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new Td(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&vd(t.prototype,n),r&&vd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",Sd);n(365);function Ed(e){return(Ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xd(){return(xd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Od(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Od(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jd(e)););return e}function Pd(e,t){return(Pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e){var t=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(e){return!1}}();return function(){var n,r=jd(e);if(t){var i=jd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ad(this,n)}}function Ad(e,t){if(t&&("object"===Ed(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jd(e){return(jd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Id=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pd(e,t)}(o,e);var t,n,r,i=Rd(o);function o(){return Cd(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xd(jd(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return xd(jd(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&kd(t.prototype,n),r&&kd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Id.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",Id);n(366);function Ld(e){return(Ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nd(e,t,n){return t&&Md(e.prototype,t),n&&Md(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bd(){return(Bd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ud(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ud(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qd(e)););return e}function Fd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vd(e,t)}function Vd(e,t){return(Vd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hd(e){var t=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(e){return!1}}();return function(){var n,r=qd(e);if(t){var i=qd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}function zd(e,t){if(t&&("object"===Ld(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qd(e){return(qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wd=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"handleClick",value:function(e){var t=this;Bd(qd(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Bd(qd(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=Fu.dom.createEl("span",{innerHTML:o});var s=Bd(qd(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""),innerHTML:a},r);return s.appendChild(this.valueHolder_),s}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(Fu.getComponent("MenuItem")),$d=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Bd(qd(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Bd(qd(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),Bd(qd(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new Wd(this.player_,{item:i})))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){Bd(qd(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}]),n}(Fu.getComponent("MenuButton"));function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(){return(Kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Yd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Yd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rp(e)););return e}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}function ep(e,t){return(ep=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tp(e){var t=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(e){return!1}}();return function(){var n,r=rp(e);if(t){var i=rp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return np(this,n)}}function np(e,t){if(t&&("object"===Gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rp(e){return(rp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",$d);var ip=Fu.getComponent("MenuItem"),op=Fu.getComponent("MenuButton"),ap=["large","medium","small"],sp=function(e){Zd(n,e);var t=tp(n);function n(e,r){return Xd(this,n),t.call(this,e,r)}return Jd(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(ip),up=function(e){Zd(n,e);var t=tp(n);function n(e,r){var i;return Xd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return Jd(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new dh(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return ap.map((function(t){r.push(new sp(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Kd(rp(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(){op.prototype.handleClick.apply(this)}}]),n}(op);function lp(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}Fu.registerComponent("SubtitleSizeButton",up);var cp=function(e,t,n,r){var i=function(e){lp(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?lp(a,t,n,r):(o.addEventListener("addtrack",i),e.one("dispose",(function(){o.removeEventListener("addtrack",i)})))},fp=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function hp(e){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pp(e,t){return(pp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yp(e){var t=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(e){return!1}}();return function(){var n,r=vp(e);if(t){var i=vp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mp(this,n)}}function mp(e,t){if(t&&("object"===hp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vp(e){return(vp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pp(e,t)}(o,e);var t,n,r,i=yp(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&dp(t.prototype,n),r&&dp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wp(){return(wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xp(e)););return e}function Sp(e,t){return(Sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ep(e){var t=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(e){return!1}}();return function(){var n,r=xp(e);if(t){var i=xp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cp(this,n)}}function Cp(e,t){if(t&&("object"===bp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kp(e)}function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xp(e){return(xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Op=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}(o,e);var t,n,r,i=Ep(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(l,t)};return s.cancel=a,s}(n.onChange,100,!1,kp(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return wp(xp(o.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(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&_p(t.prototype,n),r&&_p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(367);function Pp(e){return(Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ap(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jp(e,t,n){return t&&Ap(e.prototype,t),n&&Ap(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ip(){return(Ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Lp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Lp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fp(e)););return e}function Dp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mp(e,t)}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Np(e){var t=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(e){return!1}}();return function(){var n,r=Fp(e);if(t){var i=Fp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(e,t){if(t&&("object"===Pp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Up(e)}function Up(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fp(e){return(Fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vp=Fu.getComponent("MenuItem"),Hp=Fu.getComponent("MenuButton"),zp=function(e){Dp(n,e);var t=Np(n);function n(){return Rp(this,n),t.apply(this,arguments)}return jp(n,[{key:"createEl",value:function(e,t,r){return Ip(Fp(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(Vp),qp=function(e){Dp(n,e);var t=Np(n);function n(e,r){var i;return Rp(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(Up(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return jp(n,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=fp(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new Op(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new gp(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new zp(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=fp(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Ip(Fp(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Ip(Fp(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Ip(Fp(n.prototype),"pressButton",this).call(this);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Hp.prototype.handleClick.apply(this)}}]),n}(Hp);Fu.registerComponent("subtitleSearchButton",qp);n(368);function Wp(e){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $p(){return($p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Gp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Gp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ty(e)););return e}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xp(e,t,n){return t&&Yp(e.prototype,t),n&&Yp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jp(e,t)}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zp(e){var t=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(e){return!1}}();return function(){var n,r=ty(e);if(t){var i=ty(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ey(this,n)}}function ey(e,t){if(t&&("object"===Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ty(e){return(ty=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ny=Fu.getComponent("MenuItem"),ry=Fu.getComponent("MenuButton"),iy=[{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"}],oy=function(e){Qp(n,e);var t=Zp(n);function n(e,r){return Kp(this,n),t.call(this,e,r)}return Xp(n,[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</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}(ny),ay=function(e){Qp(n,e);var t=Zp(n);function n(){var e;return Kp(this,n),(e=t.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Xp(n,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new dh(this.player_,{label:"Keyboard Shortcuts"})),iy.forEach((function(n){t.push(new oy(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat($p(ty(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ry.prototype.handleClick.apply(this)}}]),n}(ry);Fu.registerComponent("KeyboardShortcutsButton",ay);n(369),n(370);function sy(e){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ly(){return(ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=cy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function cy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yy(e)););return e}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hy(e){var t=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(e){return!1}}();return function(){var n,r=yy(e);if(t){var i=yy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dy(this,n)}}function dy(e,t){if(t&&("object"===sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return py(e)}function py(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yy(e){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var my=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fy(e,t)}(o,e);var t,n,r,i=hy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(py(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(e.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(ly(yy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ly(yy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&uy(t.prototype,n),r&&uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function vy(e){return(vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _y(e,t){return(_y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wy(e){var t=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(e){return!1}}();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(e,t){if(t&&("object"===vy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sy(e){return(Sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}my.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",my);var Ey=Fu.getComponent("SeekBar"),Cy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(o,e);var t,n,r,i=wy(o);function o(){return gy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleMouseDown",value:function(e){Ey.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(e){var t=this;Ey.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&by(t.prototype,n),r&&by(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ey);function ky(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}Fu.registerComponent("SeekBar",Cy);n(371);function xy(e){return(xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Py(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ry(){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ay(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ay(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dy(e)););return e}function jy(e,t){return(jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iy(e){var t=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(e){return!1}}();return function(){var n,r=Dy(e);if(t){var i=Dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(e,t){if(t&&("object"===xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var My=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jy(e,t)}(o,e);var t,n,r,i=Iy(o);function o(){return Oy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ry(Dy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ry(Dy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(ky(e.player_))}))}}])&&Py(t.prototype,n),r&&Py(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Ny(e){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fy(){return(Fy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Vy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Vy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wy(e)););return e}function Hy(e,t){return(Hy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zy(e){var t=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(e){return!1}}();return function(){var n,r=Wy(e);if(t){var i=Wy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qy(this,n)}}function qy(e,t){if(t&&("object"===Ny(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wy(e){return(Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hy(e,t)}(o,e);var t,n,r,i=zy(o);function o(){return By(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Fy(Wy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Fy(Wy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Uy(t.prototype,n),r&&Uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Gy(e){return(Gy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xy(){return(Xy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Qy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Qy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tm(e)););return e}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zy(e){var t=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(e){return!1}}();return function(){var n,r=tm(e);if(t){var i=tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return em(this,n)}}function em(e,t){if(t&&("object"===Gy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jy(e,t)}(o,e);var t,n,r,i=Zy(o);function o(){return Ky(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Xy(tm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Xy(tm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Yy(t.prototype,n),r&&Yy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function rm(e){return(rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function im(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function om(){return(om="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=am(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function am(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cm(e)););return e}function sm(e,t){return(sm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function um(e){var t=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(e){return!1}}();return function(){var n,r=cm(e);if(t){var i=cm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lm(this,n)}}function lm(e,t){if(t&&("object"===rm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cm(e){return(cm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sm(e,t)}(o,e);var t,n,r,i=um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new nm(n.player_),n.addChild(n.playProgress),n.loadProgress=new $y(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(om(cm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return om(cm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&im(t.prototype,n),r&&im(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function hm(e){return(hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pm(){return(pm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ym(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ym(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_m(e)););return e}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vm(e){var t=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(e){return!1}}();return function(){var n,r=_m(e);if(t){var i=_m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gm(this,n)}}function gm(e,t){if(t&&("object"===hm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bm(e)}function bm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mm(e,t)}(o,e);var t,n,r,i=vm(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(bm(n)),n.createChapterItems=n.createChapterItems.bind(bm(n)),n.updateBuffered=n.updateBuffered.bind(bm(n)),cp(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),pm(_m(o.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return Fu.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 e=pm(_m(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_=e);var r=new My(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var l=new fm(this.player_,{startTime:a,endTime:s});if(r.addChild(l),u&&s===u)break}else r.addChild(new fm(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&dm(t.prototype,n),r&&dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));wm.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||wm.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",wm);n(372);function Tm(e){return(Tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cm(){return(Cm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=km(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function km(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rm(e)););return e}function xm(e,t){return(xm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Om(e){var t=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(e){return!1}}();return function(){var n,r=Rm(e);if(t){var i=Rm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pm(this,n)}}function Pm(e,t){if(t&&("object"===Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Rm(e){return(Rm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Am=Fu.getComponent("ProgressControl"),jm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xm(e,t)}(o,e);var t,n,r,i=Om(o);function o(){var e;return Sm(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),Cm(Rm(o.prototype),"getChild",this).call(this,e)}}])&&Em(t.prototype,n),r&&Em(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Am);function Im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}jm.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",jm);n(373);function Lm(e){return(Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mm(){return(Mm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nm(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vm(e)););return e}function Bm(e,t){return(Bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Um(e){var t=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(e){return!1}}();return function(){var n,r=Vm(e);if(t){var i=Vm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fm(this,n)}}function Fm(e,t){if(t&&("object"===Lm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vm(e){return(Vm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(o,e);var t,n,r,i=Um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasCustomChapterText=!1,cp(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=Mm(Vm(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,Im(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,Fu.dom.textContent(this.chapter_,null!=e?e:"")}}])&&Dm(t.prototype,n),r&&Dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",Hm);n(374);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(){return(Wm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$m(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xm(e)););return e}function Gm(e,t){return(Gm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Km(e){var t=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(e){return!1}}();return function(){var n,r=Xm(e);if(t){var i=Xm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ym(this,n)}}function Ym(e,t){if(t&&("object"===zm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gm(e,t)}(o,e);var t,n,r,i=Km(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Wm(Xm(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,l=s.w,c=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=l+"px",this.el_.style.height=c+"px"}else this.disable()}}}])&&qm(t.prototype,n),r&&qm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Qm.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",Qm);n(375);function Jm(e){return(Jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ev(e,t){return(ev=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tv(e){var t=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(e){return!1}}();return function(){var n,r=iv(e);if(t){var i=iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nv(this,n)}}function nv(e,t){if(t&&("object"===Jm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rv(e)}function rv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iv(e){return(iv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ov=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ev(e,t)}(o,e);var t,n,r,i=tv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),cp(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(rv(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"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")}}])&&Zm(t.prototype,n),r&&Zm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MouseTimeDisplay"));ov.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",ov);n(376);function av(e){return(av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uv(){return(uv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dv(e)););return e}function cv(e,t){return(cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=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(e){return!1}}();return function(){var n,r=dv(e);if(t){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){if(t&&("object"===av(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pv=Fu.getComponent("ChaptersTrackMenuItem"),yv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cv(e,t)}(o,e);var t,n,r,i=fv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Qm(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),cp(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&pv.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,uv(dv(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Im(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&sv(t.prototype,n),r&&sv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(pv);n(377);function mv(e){return(mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gv(){return(gv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ev(e)););return e}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wv(e){var t=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(e){return!1}}();return function(){var n,r=Ev(e);if(t){var i=Ev(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tv(this,n)}}function Tv(e,t){if(t&&("object"===mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sv(e)}function Sv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_v(e,t)}(o,e);var t,n,r,i=wv(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Sv(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 t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(gv(Ev(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(gv(Ev(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new yv(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;gv(Ev(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){gv(Ev(o.prototype),"update",this).call(this,e)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&vv(t.prototype,n),r&&vv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ChaptersButton"));function kv(e){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pv(){return(Pv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Rv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Rv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Lv(e)););return e}function Av(e,t){return(Av=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=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(e){return!1}}();return function(){var n,r=Lv(e);if(t){var i=Lv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Iv(this,n)}}function Iv(e,t){if(t&&("object"===kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Lv(e){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",Cv);var Dv=Fu.getComponent("OffTextTrackMenuItem"),Mv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Av(e,t)}(o,e);var t,n,r,i=jv(o);function o(){return xv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){Dv.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,t,n){return Pv(Lv(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},t),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Ov(t.prototype,n),r&&Ov(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Dv);function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fv(e,t){return(Fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vv(e){var t=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(e){return!1}}();return function(){var n,r=zv(e);if(t){var i=zv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hv(this,n)}}function Hv(e,t){if(t&&("object"===Nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("OffTextTrackMenuItem",Mv);var qv=Fu.getComponent("TextTrackButton"),Wv=Fu.getComponent("TextTrackMenuItem"),$v=Fu.getComponent("OffTextTrackMenuItem"),Gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fv(e,t)}(o,e);var t,n,r,i=Vv(o);function o(){return Bv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wv;this.label_&&(e="".concat(this.label_," off")),t.push(new $v(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return t}}])&&Uv(t.prototype,n),r&&Uv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qv);function Kv(e){return(Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=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(e){return!1}}();return function(){var n,r=eg(e);if(t){var i=eg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zv(this,n)}}function Zv(e,t){if(t&&("object"===Kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function eg(e){return(eg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TextTrackButton",Gv);var tg=Fu.getComponent("SubsCapsMenuItem"),ng=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qv(e,t)}(o,e);var t,n,r,i=Jv(o);function o(){return Yv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){tg.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Xv(t.prototype,n),r&&Xv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(tg);function rg(e){return(rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function og(e,t){return(og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ag(e){var t=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(e){return!1}}();return function(){var n,r=ug(e);if(t){var i=ug(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sg(this,n)}}function sg(e,t){if(t&&("object"===rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ug(e){return(ug=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&og(e,t)}(o,e);var t,n,r,i=ag(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-divider-after-menu-item"),t.addClass("cv-subtitle-size-menu-item"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&ig(t.prototype,n),r&&ig(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));function cg(e){return(cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hg(e,t){return(hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dg(e){var t=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(e){return!1}}();return function(){var n,r=mg(e);if(t){var i=mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(e,t){if(t&&("object"===cg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yg(e)}function yg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mg(e){return(mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}(o,e);var t,n,r,i=dg(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-subtitle-search-menu-item"),t.controlText(", opens subtitle search"),t.toggleEnabled=t.toggleEnabled.bind(yg(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleEnabled),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleEnabled)})),t.toggleEnabled(),t}return t=o,(n=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=fp(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=fp(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&fg(t.prototype,n),r&&fg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));n(378);function gg(e){return(gg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wg(){return(wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kg(e)););return e}function Sg(e,t){return(Sg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eg(e){var t=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(e){return!1}}();return function(){var n,r=kg(e);if(t){var i=kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cg(this,n)}}function Cg(e,t){if(t&&("object"===gg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kg(e){return(kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xg=Fu.getComponent("TextTrackButton"),Og=Fu.getComponent("SubsCapsButton"),Pg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sg(e,t)}(o,e);var t,n,r,i=Eg(o);function o(){var e;return bg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(wg(kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[new vg(this.player_),new lg(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,xg.prototype.createItems.call(this,e,ng)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Og.prototype.handleClick.apply(this)}}])&&_g(t.prototype,n),r&&_g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Og);function Rg(e){return(Rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jg(e,t){return(jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ig(e){var t=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(e){return!1}}();return function(){var n,r=Mg(e);if(t){var i=Mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lg(this,n)}}function Lg(e,t){if(t&&("object"===Rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dg(e)}function Dg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",Pg);var Ng=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bg="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(kc,"</span>"),Ug=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(o,e);var t,n,r,i=Ig(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Dg(n));return r.on("change",a),e.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(Dg(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var e;null===(e=n.player_)||void 0===e||e.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return t=o,(n=[{key:"handleLocalCacheChange",value:function(){return Ng(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Bg);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Ag(t.prototype,n),r&&Ag(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(379);function Fg(e){return(Fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hg(){return(Hg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kg(e)););return e}function qg(e,t){return(qg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wg(e){var t=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(e){return!1}}();return function(){var n,r=Kg(e);if(t){var i=Kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $g(this,n)}}function $g(e,t){if(t&&("object"===Fg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gg(e)}function Gg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return(Kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yg={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Xg=Fu.getComponent("MenuButton"),Qg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qg(e,t)}(o,e);var t,n,r,i=Wg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(Gg(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Hg(Kg(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Hg(Kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new dh(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=Yg[r.id];i&&e.push(new Ug(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?Yg[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Xg.prototype.handleClick.apply(this)}}])&&Vg(t.prototype,n),r&&Vg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xg);Fu.registerComponent("QualityButton",Qg);n(380);function Jg(e){return(Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tb(){return(tb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ab(e)););return e}function rb(e,t){return(rb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ib(e){var t=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(e){return!1}}();return function(){var n,r=ab(e);if(t){var i=ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ob(this,n)}}function ob(e,t){if(t&&("object"===Jg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ab(e){return(ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sb=Fu.getComponent("Menu"),ub=Fu.getComponent("MenuButton"),lb=Fu.getComponent("PlaybackRateMenuItem"),cb=Fu.getComponent("PlaybackRateMenuButton"),fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rb(e,t)}(o,e);var t,n,r,i=ib(o);function o(){var e;return Zg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(tb(ab(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new sb(this.player(),{menuButton:this});e.addItem(new dh(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new lb(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=cb.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&eb(t.prototype,n),r&&eb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(cb);function hb(e){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yb(e,t){return(yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mb(e){var t=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(e){return!1}}();return function(){var n,r=gb(e);if(t){var i=gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vb(this,n)}}function vb(e,t){if(t&&("object"===hb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gb(e){return(gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",fb);var bb=Fu.getComponent("TextTrackSettings"),_b={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},wb={small:_b,medium:Object.assign(Object.assign({},_b),{fontPercent:1.5}),large:Object.assign(Object.assign({},_b),{fontPercent:2})},Tb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yb(e,t)}(o,e);var t,n,r,i=mb(o);function o(){return db(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return wb[this.size_]?wb[this.size_]:_b}}])&&pb(t.prototype,n),r&&pb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(bb);Fu.registerComponent("TextTrackSettings",Tb);n(381);function Sb(e){return(Sb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kb(){return(kb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=xb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ab(e)););return e}function Ob(e,t){return(Ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pb(e){var t=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(e){return!1}}();return function(){var n,r=Ab(e);if(t){var i=Ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rb(this,n)}}function Rb(e,t){if(t&&("object"===Sb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ab(e){return(Ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jb=window.navigator&&window.navigator.userAgent||"",Ib=(/iPod/i.test(jb),/Android/i.test(jb),Fu.getComponent("Player")),Lb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ob(e,t)}(o,e);var t,n,r,i=Pb(o);function o(){return Eb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return kb(Ab(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return kb(Ab(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Ib.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Ib.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&Cb(t.prototype,n),r&&Cb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ib);Lb.prototype.options_=Object.assign(Object.assign({},Ib.prototype.options_),{setMaxHeight:!0}),Fu.registerComponent("player",Lb);n(382);function Db(e){return(Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bb(e){var t=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(e){return!1}}();return function(){var n,r=Vb(e);if(t){var i=Vb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){if(t&&("object"===Db(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fb(e)}function Fb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nb(e,t)}(o,e);var t,n,r,i=Bb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(Fb(n)),n.player_.one("firstplay",n.onFirstPlay),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Mb(t.prototype,n),r&&Mb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("PlayPauseFeedback",Hb);n(383);function zb(e){return(zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $b(e,t){return($b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){var t=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(e){return!1}}();return function(){var n,r=Yb(e);if(t){var i=Yb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kb(this,n)}}function Kb(e,t){if(t&&("object"===zb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xb=Fu.getComponent("PlayToggle"),Qb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$b(e,t)}(o,e);var t,n,r,i=Gb(o);function o(){return qb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){var t=this;Xb.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Wb(t.prototype,n),r&&Wb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xb);Fu.registerComponent("PlayToggle",Qb);var Jb;n(384),n(385),n(386),n(387),n(388);function Zb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e){e.paused()?e.play():e.pause()}function t_(e,t){e.currentTime(e.currentTime()+t)}function n_(e,t){e.volume(e.volume()+t)}var r_=(Zb(Jb={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),Zb(Jb,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),Zb(Jb,"k",e_),Zb(Jb,"space",e_),Zb(Jb,"left",(function(e){return t_(e,-5)})),Zb(Jb,"right",(function(e){return t_(e,5)})),Zb(Jb,"j",(function(e){return t_(e,-10)})),Zb(Jb,"l",(function(e){return t_(e,10)})),Zb(Jb,"up",(function(e){return n_(e,.05)})),Zb(Jb,"down",(function(e){return n_(e,-.05)})),Jb);function i_(e){var t=g()(e);r_[t]&&(["space"].includes(t)&&(e.preventDefault(),e.stopPropagation()),r_[t](this,e))}function o_(e){return(o_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s_(e,t){if(t&&("object"===o_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u_(e){var t="function"==typeof Map?new Map:void 0;return(u_=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l_(e,arguments,h_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f_(r,e)})(e)}function l_(e,t,n){return(l_=c_()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f_(i,n.prototype),i}).apply(null,arguments)}function c_(){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(e){return!1}}function f_(e,t){return(f_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h_(e){return(h_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f_(e,t)}(s,e);var t,n,r,i,o,a=(t=s,n=c_(),function(){var e,r=h_(t);if(n){var i=h_(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return s_(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e)).url=t,n}return r=s,i&&a_(r.prototype,i),o&&a_(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(u_(Error));function p_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y_,m_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},v_=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,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(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,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(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return m_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new d_("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&p_(t.prototype,n),r&&p_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());function g_(e){return(g_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&__(e,t)}function __(e,t){return(__=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w_(e){var t=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(e){return!1}}();return function(){var n,r=S_(e);if(t){var i=S_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T_(this,n)}}function T_(e,t){if(t&&("object"===g_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S_(e){return(S_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k_(e,t,n){return t&&C_(e.prototype,t),n&&C_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(y_||(y_={}));var x_=function(){function e(t){if(E_(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=t.type,this.hasSupport)try{this.storage=window[this.type]}catch(e){}}return k_(e,[{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!!n&&(!this.isExpired(n)||(this.remove(t),!1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}]),e}(),O_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.LocalStorage}))}}]),n}(x_),P_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.SessionStorage}))}}]),n}(x_),R_=O_.Instance,A_=(P_.Instance,"URLSearchParams"in self),j_="Symbol"in self&&"iterator"in Symbol,I_="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),L_="FormData"in self,D_="ArrayBuffer"in self;if(D_)var M_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],N_=ArrayBuffer.isView||function(e){return e&&M_.indexOf(Object.prototype.toString.call(e))>-1};function B_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function F_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return j_&&(t[Symbol.iterator]=function(){return t}),t}function V_(e){this.map={},e instanceof V_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function H_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function z_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function q_(e){var t=new FileReader,n=z_(t);return t.readAsArrayBuffer(e),n}function W_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function $_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:I_&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L_&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:A_&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():D_&&I_&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=W_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):D_&&(ArrayBuffer.prototype.isPrototypeOf(e)||N_(e))?this._bodyArrayBuffer=W_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A_&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_&&(this.blob=function(){var e=H_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?H_(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(q_)}),this.text=function(){var e,t,n,r=H_(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=z_(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L_&&(this.formData=function(){return this.text().then(Y_)}),this.json=function(){return this.text().then(JSON.parse)},this}V_.prototype.append=function(e,t){e=B_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},V_.prototype.delete=function(e){delete this.map[B_(e)]},V_.prototype.get=function(e){return e=B_(e),this.has(e)?this.map[e]:null},V_.prototype.has=function(e){return this.map.hasOwnProperty(B_(e))},V_.prototype.set=function(e,t){this.map[B_(e)]=U_(t)},V_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},V_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),F_(e)},V_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),F_(e)},V_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),F_(e)},j_&&(V_.prototype[Symbol.iterator]=V_.prototype.entries);var G_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function K_(e,t){var n,r,i=(t=t||{}).body;if(e instanceof K_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new V_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new V_(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),G_.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Y_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function X_(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new V_(t.headers),this.url=t.url||"",this._initBody(e)}K_.prototype.clone=function(){return new K_(this,{body:this._bodyInit})},$_.call(K_.prototype),$_.call(X_.prototype),X_.prototype.clone=function(){return new X_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new V_(this.headers),url:this.url})},X_.error=function(){var e=new X_(null,{status:0,statusText:""});return e.type="error",e};var Q_=[301,302,303,307,308];X_.redirect=function(e,t){if(-1===Q_.indexOf(t))throw new RangeError("Invalid status code");return new X_(null,{status:t,headers:{location:e}})};var J_=self.DOMException;try{new J_}catch(e){(J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function Z_(e,t){return new Promise((function(n,r){var i=new K_(e,t);if(i.signal&&i.signal.aborted)return r(new J_("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new V_,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new X_(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(I_?o.responseType="blob":D_&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Z_.polyfill=!0,self.fetch||(self.fetch=Z_,self.Headers=V_,self.Request=K_,self.Response=X_);var ew=n(214),tw=n.n(ew),nw=n(215);function rw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ow={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function aw(e,t,n){var r=rw(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function sw(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var uw=function(){var e=window.navigator.userAgent;return ow.android.test(e)?sw("Android",ow.androidVersion,e):ow.iphone.test(e)||ow.ipad.test(e)?sw("iOS",ow.iosVersion,e):ow.linux.test(e)?sw("Linux",null,e):ow.unix.test(e)?sw("Unix",null,e):ow.mac.test(e)?sw("Macintosh",ow.osxVersion,e):ow.windows.test(e)?function(e,t){var n={name:e,version:null};return ow.win2000.test(t)&&(n.version="2000"),ow.winXP.test(t)&&(n.version="XP"),ow.winVista.test(t)&&(n.version="Vista"),ow.win7.test(t)&&(n.version="7"),ow.win8.test(t)&&(n.version="8"),ow.win81.test(t)&&(n.version="8.1"),ow.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):ow.blackberry.test(e)?sw("BlackBerry",ow.blackberryVersion,e):ow.windowsPhone.test(e)?sw("Windows Phone",ow.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},lw=function(){var e=window.navigator.userAgent;return ow.chrome.test(e)?aw("Chrome",ow.generalVersion,e):ow.firefox.test(e)?aw("Firefox",ow.generalVersion,e):ow.safari.test(e)?aw("Safari",ow.generalVersion,e):ow.ie.test(e)?aw("Internet Explorer",ow.ieVersion,e):ow.edge.test(e)?aw("Edge",ow.edgeVersion,e):ow.opera.test(e)?aw("Opera",ow.operaVersion,e):{name:"Unknown",version:"Unknown"}};function cw(e){return(cw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fw,hw=function(e){var t=cw(e);return"function"===t||"object"===t&&!!e},dw=function(e){return"function"==typeof e},pw=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},yw=n(97);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(fw||(fw={}));var mw={CvApSoutheast1:{systemName:fw.CvApSoutheast1},CvApSoutheast2:{systemName:fw.CvApSoutheast2},CvEuWest1:{systemName:fw.CvEuWest1},CvNaWest1:{systemName:fw.CvNaWest1}};function vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},bw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!dw(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!dw(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=pw(n,"/v1/ingest"),Array.isArray(e)&&(o=pw(o,"/bulk")),t.prev=7,t.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=t.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),this.logError(t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(e){var t=new tw.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===fw.CvEuWest1?6:t.t0===fw.CvApSoutheast2?7:t.t0===fw.CvNaWest1?8:(t.t0,fw.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){"string"!=typeof e.type&&this.logError(new Error("Event type is required."),!0),hw(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,u=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){s.includes(e)&&u.logError(new Error("".concat(e," is a reserved key.")),!0)})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return dw(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return gw(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||yw.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t10});case 22:n.prev=22,n.t11=n.catch(0),this.logError(n.t11);case 25:case"end":return n.stop()}}),n,this,[[0,22]])})))}},{key:"getRegion",value:function(){return gw(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.regionName,e.prev=1,e.next=4,this.options.getUser();case 4:(null==(n=e.sent)?void 0:n.instanceRegion)&&(t=n.instanceRegion),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logError(e.t0);case 11:return t||this.logError(new Error("RegionName is not set."),!0),e.abrupt("return",this.getRegionByName(t.toLowerCase()));case 13:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:lw(),os:uw(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:nw.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(mw).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}},{key:"logError",value:function(e,t){if(this.options.logError&&this.options.logError(e),t)throw e}}])&&vw(t.prototype,n),r&&vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_w=n(2),ww=function(){return!0},Tw=function(){return!1};var Sw,Ew,Cw,kw,xw=function(e){return e},Ow={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===_w.EntityType.Video)return Ow.formatVideoUpload(e,t);if(n===_w.EntityType.Resource||n===_w.EntityType.Subtitle)return Ow.formatResourceUpload(e);if(n===_w.EntityType.Banner||n===_w.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===_w.WorkflowPhase.Start?Ow.getStartVideoUploadData(e):n===_w.WorkflowPhase.Discard?Ow.getDiscardVideoUploadData(e):n===_w.WorkflowPhase.Complete?Ow.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return hw(e.metadata)&&(t.type=e.metadata.type),t}},Pw=function(e){var t,n,r,i,o={id:e.id};return(null===(t=e.video)||void 0===t?void 0:t.id)&&(o.video={id:e.video.id}),(null===(n=e.clip)||void 0===n?void 0:n.id)&&(o.clip={id:e.clip.id},(null===(r=e.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=e.clip.video)||void 0===i?void 0:i.id})),void 0!==e.shareCount&&(o.shareCount=e.shareCount),e.embedDetails&&(o.embedDetails=o.embedDetails),o};function Rw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aw=(Rw(Sw={},_w.UserAction.Navigate,Tw),Rw(Sw,_w.UserAction.Click,ww),Rw(Sw,_w.UserAction.Search,ww),Rw(Sw,_w.UserAction.InstantSearch,ww),Rw(Sw,_w.UserAction.Play,ww),Rw(Sw,_w.UserAction.Stream,ww),Rw(Sw,_w.UserAction.WebPlayerStream,ww),Rw(Sw,_w.UserAction.StreamProgress,ww),Rw(Sw,_w.UserAction.Rename,ww),Rw(Sw,_w.UserAction.Move,ww),Rw(Sw,_w.UserAction.Create,ww),Rw(Sw,_w.UserAction.Delete,ww),Rw(Sw,_w.UserAction.Associate,ww),Rw(Sw,_w.UserAction.Dissociate,ww),Rw(Sw,_w.UserAction.Filter,ww),Rw(Sw,_w.UserAction.Sort,ww),Rw(Sw,_w.UserAction.Approve,ww),Rw(Sw,_w.UserAction.Reject,ww),Rw(Sw,_w.UserAction.Disable,ww),Rw(Sw,_w.UserAction.Upload,ww),Rw(Sw,_w.UserAction.Download,Tw),Rw(Sw,_w.UserAction.SetAccess,ww),Rw(Sw,_w.UserAction.AddToLocalCache,Tw),Rw(Sw,_w.UserAction.Share,ww),Rw(Sw,_w.UserAction.Unshare,ww),Rw(Sw,_w.UserAction.Edit,ww),Rw(Sw,_w.UserAction.Suggest,ww),Rw(Sw,_w.UserAction.Favourite,ww),Rw(Sw,_w.UserAction.ResolveWarning,ww),Rw(Sw,_w.UserAction.DismissWarning,ww),Rw(Sw,_w.UserAction.EditAssoc,ww),Rw(Sw,_w.UserAction.Follow,ww),Rw(Sw,_w.UserAction.Print,ww),Rw(Sw,_w.UserAction.Copy,ww),Rw(Sw,_w.UserAction.Activate,ww),Rw(Sw,_w.UserAction.VerifyEmail,ww),Rw(Sw,_w.UserAction.ChangePassword,ww),Rw(Sw,_w.UserAction.Export,ww),Rw(Sw,_w.UserAction.SendEmail,ww),Rw(Sw,_w.UserAction.Publish,ww),Rw(Sw,_w.UserAction.Answer,ww),Rw(Sw,_w.UserAction.Complete,ww),Rw(Sw,_w.UserAction.Archive,ww),Sw),jw=(Rw(Ew={},_w.UserAction.Search,xw),Rw(Ew,_w.UserAction.InstantSearch,xw),Rw(Ew,_w.UserAction.Play,xw),Rw(Ew,_w.UserAction.Stream,xw),Rw(Ew,_w.UserAction.StreamProgress,xw),Rw(Ew,_w.UserAction.Click,xw),Rw(Ew,_w.UserAction.Filter,xw),Rw(Ew,_w.UserAction.Sort,xw),Rw(Ew,_w.UserAction.SetAccess,xw),Rw(Ew,_w.UserAction.Approve,xw),Rw(Ew,_w.UserAction.Reject,xw),Rw(Ew,_w.UserAction.Create,xw),Rw(Ew,_w.UserAction.Delete,xw),Rw(Ew,_w.UserAction.Rename,xw),Rw(Ew,_w.UserAction.Move,xw),Rw(Ew,_w.UserAction.Edit,xw),Rw(Ew,_w.UserAction.Share,Pw),Rw(Ew,_w.UserAction.Disable,xw),Rw(Ew,_w.UserAction.Suggest,xw),Rw(Ew,_w.UserAction.Upload,Ow.getUploadData),Rw(Ew,_w.UserAction.ResolveWarning,xw),Rw(Ew,_w.UserAction.DismissWarning,xw),Rw(Ew,_w.UserAction.Follow,xw),Rw(Ew,_w.UserAction.Print,xw),Rw(Ew,_w.UserAction.Copy,xw),Ew),Iw=(Rw(Cw={},_w.UserAction.Search,(function(){return"search"})),Rw(Cw,_w.UserAction.InstantSearch,(function(){return"search"})),Rw(Cw,_w.UserAction.Filter,(function(){return"filter"})),Rw(Cw,_w.UserAction.Stream,(function(){return _w.EntityType.Video})),Cw),Lw={user:"target_user"},Dw=(Rw(kw={},_w.UserAction.StreamProgress,!0),Rw(kw,_w.UserAction.WebPlayerStream,!0),kw),Mw={shouldLog:function(e){return!!Aw[e.type](e)},formatData:function(e){var t=jw[e.type],n=dw(t)?t(e.data,e):e.data;if(Dw[e.type])return n;var r=e.actionContext.entity;return dw(Iw[e.type])&&(r=Iw[e.type](e)),Lw[r]&&(r=Lw[r]),Rw({},r,n)}};function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Bw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Uw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);R_.cacheExists(e)||(this.collectionApiClient.log({type:_w.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:_w.EventVersion.V2}),R_&&R_.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:_w.UserAction.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:_w.EventVersion.V1}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:{productArea:t.productArea,location:this.getLocationContext(),entity:t.entity,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:_w.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===_w.EntityType.Interactive?e.interactive={id:+this.options.mediaId}:t===_w.EntityType.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new bw({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Mw.shouldLog,formatData:Mw.formatData})}},{key:"getCurrentUser",value:function(){return Bw(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?_w.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return _w.EntityType.Video;case"MasterInteractive":return _w.EntityType.Interactive;case"MasterClip":return _w.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return _w.LocationContext.Player;case"interactive-player":return _w.LocationContext.InteractivePlayer;case"create-clip-player":return _w.LocationContext.CreateClipPlayer}}}])&&Nw(t.prototype,n),r&&Nw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fw(e){return(Fw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hw(){return(Hw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gw(e)););return e}function qw(e,t){return(qw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ww(e){var t=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(e){return!1}}();return function(){var n,r=Gw(e);if(t){var i=Gw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $w(this,n)}}function $w(e,t){if(t&&("object"===Fw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Gw(e){return(Gw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qw(e,t)}(o,e);var t,n,r,i=Ww(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&Vw(t.prototype,n),r&&Vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Yw(e){return(Yw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qw(){return(Qw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Jw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Jw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nT(e)););return e}function Zw(e,t){return(Zw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eT(e){var t=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(e){return!1}}();return function(){var n,r=nT(e);if(t){var i=nT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tT(this,n)}}function tT(e,t){if(t&&("object"===Yw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nT(e){return(nT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}(o,e);var t,n,r,i=eT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Qw(nT(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=Qw(nT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){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"}}}])&&Xw(t.prototype,n),r&&Xw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function iT(e){return(iT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aT(e,t){return(aT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sT(e){var t=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(e){return!1}}();return function(){var n,r=lT(e);if(t){var i=lT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uT(this,n)}}function uT(e,t){if(t&&("object"===iT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lT(e){return(lT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aT(e,t)}(o,e);var t,n,r,i=sT(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Kw(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new rT(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&oT(t.prototype,n),r&&oT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(389);function fT(e){return(fT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dT(){return(dT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=pT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function pT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gT(e)););return e}function yT(e,t){return(yT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mT(e){var t=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(e){return!1}}();return function(){var n,r=gT(e);if(t){var i=gT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vT(this,n)}}function vT(e,t){if(t&&("object"===fT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gT(e){return(gT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yT(e,t)}(o,e);var t,n,r,i=mT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new cT(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(gl,"</div>")),dT(gT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&hT(t.prototype,n),r&&hT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function _T(e){return function(e){if(Array.isArray(e))return wT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return wT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ST,ET=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},CT=Fu.getComponent("Player"),kT=450,xT=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),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(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var e=CT.prototype.options_.children;return e=e.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(_T(e),["collapserator","playPauseFeedback"]),userActions:{hotkeys:i_},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0}}},{key:"fetch",value:function(){var e,t,n;return ET(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.options.fetch,void 0===this.options.fetch&&(i=function(e){var t="".concat(s.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return v_.get(t)}),this.options.viewKey){r.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return r.next=6,i(this.options.viewKey);case 6:if(o=r.sent){r.next=9;break}throw new Error("Error fetching playback object");case 9:o.chapters.list.length>0&&(a=this.player.addTextTrack("chapters"),o.chapters.list.forEach((function(e){a.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),a.trigger({type:"loadeddata",target:a})),this.player.localCache({localCacheAddresses:o.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.progressiveFiles({sources:o.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),o.subtitles.list.length>0&&(o.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&s.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=o.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=o.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault})),o.posterUrl&&this.player.poster(o.posterUrl),this.options.autoplay||this.setupSplash(o),this.additionalSetup(o),this.options.autoplay&&this.player.ready((function(){s.player.play().catch((function(){s.setupSplash(o)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!ST&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");v_.get(t).then((function(t){ST=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(t=e.settings)||void 0===t?void 0:t.playbackProfile,playbackProfileLocalCache:null===(n=e.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin();var o=this.options.enableLocalCache&&!!(null===(r=e.localCacheAddresses)||void 0===r?void 0:r.length);ST?this.setupAnalyticsService(e,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(e,o)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Uw({collectionApiUrls:ST.collectionApi.urls,collectionApiClientId:ST.collectionApi.clientId,productVersion:Yu.a,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||fw.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(e){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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.player.ready(t),this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.one("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new bT(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n),t.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i),this.player.trigger("volumechange")}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s),this.player.trigger("volumechange")}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),c=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?("CreateClipSeekBar"===this.getSeekBarName()&&(d+=22),h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(c,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=kT?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&TT(t.prototype,n),r&&TT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function OT(e){return(OT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function RT(){return(RT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=AT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function AT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=MT(e)););return e}function jT(e,t){return(jT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IT(e){var t=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(e){return!1}}();return function(){var n,r=MT(e);if(t){var i=MT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LT(this,n)}}function LT(e,t){if(t&&("object"===OT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return DT(e)}function DT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MT(e){return(MT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xT.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 NT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jT(e,t)}(o,e);var t,n,r,i=IT(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(t.startTime.toPrecision(4)),n._clipEnd=parseFloat(t.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(DT(n)),n.player.duration=n.duration.bind(DT(n)),n.player.currentTime=n.currentTime.bind(DT(n)),n.player.buffered=n.buffered.bind(DT(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e: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"),RT(MT(o.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 e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&PT(t.prototype,n),r&&PT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",NT);var BT=n(37),UT=n.n(BT);function FT(e){return(FT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zT(e,t,n){return t&&HT(e.prototype,t),n&&HT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(){return(qT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=WT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function WT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=XT(e)););return e}function $T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GT(e,t)}function GT(e,t){return(GT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KT(e){var t=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(e){return!1}}();return function(){var n,r=XT(e);if(t){var i=XT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return YT(this,n)}}function YT(e,t){if(t&&("object"===FT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function XT(e){return(XT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QT=function(e){$T(n,e);var t=KT(n);function n(e,r){return VT(this,n),t.call(this,e,r)}return zT(n,[{key:"dispose",value:function(){UT.a.unmountComponentAtNode(this.el()),qT(XT(n.prototype),"dispose",this).call(this)}}]),n}(Fu.getComponent("Component")),JT={tagName:"div"};function ZT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JT;if(!e)throw new Error("componentCtor is required");var n=function(n){$T(i,n);var r=KT(i);function i(){return VT(this,i),r.apply(this,arguments)}return zT(i,[{key:"createEl",value:function(){var n=Fu.dom.createEl(t.tagName,t.properties,t.attributes);return UT.a.render(e(this.player_,this.options_),n),n}}]),i}(QT);return n}n(393);function eS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nS(e){var t,n=r.useRef(e.player.duration()-e.player.currentTime()),i=eS(r.useState(n.current),2),o=i[0],a=i[1];function s(){var t=e.player.duration()-e.player.currentTime();a(t),t>n.current&&(n.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",s),function(){e.player.off("timeupdate",s)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var u=Math.ceil(o),l=1===u?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",u," ",l,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function rS(e){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oS(){return(oS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=aS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function aS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cS(e)););return e}function sS(e,t){return(sS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uS(e){var t=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(e){return!1}}();return function(){var n,r=cS(e);if(t){var i=cS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lS(this,n)}}function lS(e,t){if(t&&("object"===rS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cS(e){return(cS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("UpNext",ZT((function(e,t){return r.createElement(nS,Object.assign({player:e},t))})));var fS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}(o,e);var t,n,r,i=uS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,Fu.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,Fu.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=oS(cS(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&iS(t.prototype,n),r&&iS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function hS(e){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pS(){return(pS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=yS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function yS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_S(e)););return e}function mS(e,t){return(mS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vS(e){var t=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(e){return!1}}();return function(){var n,r=_S(e);if(t){var i=_S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gS(this,n)}}function gS(e,t){if(t&&("object"===hS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bS(e)}function bS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _S(e){return(_S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("NextVideoMenuItem",fS);var wS=Fu.getPlugin("plugin"),TS=(Fu.getComponent("MenuItem"),Fu.getComponent("NextVideoMenuItem")),SS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mS(e,t)}(o,e);var t,n,r,i=vS(o);function o(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(bS(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(bS(t)),t.setChapterTrack=t.setChapterTrack.bind(bS(t)),t.onTimeUpdate=t.onTimeUpdate.bind(bS(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem("cv-play-next-video");t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(cp(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(e,t,n){var r;this.player.isDisposed()||(this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:TS,name:"NextVideoMenuItem"}))}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem("cv-play-next-video",e.toString())}},{key:"setChapterTrack",value:function(e){this.chapterTrack=e}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),pS(_S(o.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(t=null===(e=this.chapterTrack)||void 0===e?void 0:e.activeCues)||void 0===t?void 0:t.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&this.player.removeChild(e)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem("cv-persisttest","persistPlayNext"),window.localStorage.removeItem("cv-persisttest"),!0}catch(e){return!1}}}])&&dS(t.prototype,n),r&&dS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(wS);Fu.registerPlugin("nextVideoPlugin",SS);n(394);function ES(e){return(ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xS(){return(xS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=OS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function OS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jS(e)););return e}function PS(e,t){return(PS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RS(e){var t=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(e){return!1}}();return function(){var n,r=jS(e);if(t){var i=jS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AS(this,n)}}function AS(e,t){if(t&&("object"===ES(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jS(e){return(jS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PS(e,t)}(o,e);var t,n,r,i=RS(o);function o(){var e;return CS(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){xS(jS(o.prototype),"handleClick",this).call(this,null)}}])&&kS(t.prototype,n),r&&kS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function LS(e){return(LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MS(e,t){return(MS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function NS(e){var t=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(e){return!1}}();return function(){var n,r=US(e);if(t){var i=US(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return BS(this,n)}}function BS(e,t){if(t&&("object"===LS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function US(e){return(US=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IS.prototype.controlText_="Create Clip",Fu.registerComponent("CreateClipButton",IS);var FS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MS(e,t)}(o,e);var t,n,r,i=NS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&DS(t.prototype,n),r&&DS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("createClipButtonPlugin",FS);var VS,HS=n(3),zS=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},qS=n(98),WS=n(38),$S=n(12);function GS(e){return(GS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XS(e,t){return(XS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QS(e){var t=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(e){return!1}}();return function(){var n,r=ZS(e);if(t){var i=ZS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}function JS(e,t){if(t&&("object"===GS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ZS(e){return(ZS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(VS||(VS={}));var eE,tE=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}(o,e);var t,n,r,i=QS(o);function o(){var e;return KS(this,o),(e=i.apply(this,arguments)).contextHistory=[],e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return VS.Context}},{key:"initialize",value:function(){this.listenTo($S.a.SHELL,qS.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}}])&&YS(t.prototype,n),r&&YS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qS.Service)),nE=n(10);!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(eE||(eE={}));var rE="global:analytics";function iE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oE=_w.EventVersion.V1,aE=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||oE}var t,n,r;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||qS.ErrorHelper.throw(new WS.a("".concat(e," is not a valid key"))),this[e]&&qS.ErrorHelper.throw(new WS.a("Event already contains an enrichment named ".concat(e)))}}])&&iE(t.prototype,n),r&&iE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),sE=function(e,t,n,r){nE.Radio.channel(rE).trigger(eE.Inlet,new aE(e,t,n,r))};function uE(){var e=tE.getCurrentContext().appLink;return HS.isObject(e)||qS.ErrorHelper.throw(new WS.a("Applink does not exist. Check current context.")),e.application.replace(":","-")}function lE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,r=e.workflowPhase,i=void 0===r?null:r,o=e.descriptor,a=void 0===o?null:o;return t||qS.ErrorHelper.throw(new WS.a("location must be set.")),n||qS.ErrorHelper.throw(new WS.a("entity must be set.")),{productArea:uE(),location:t,entity:n,descriptor:a,workflowPhase:i}}function cE(){return qS.LocationUtils.GetCurrentPath()+qS.LocationUtils.GetCurrentQueryString()}var fE={logUserAction:function(e,t){if(function(e){return!(!HS.isArray(e)||!HS.every(e,(function(e){return HS.isObject(e)})))||!!HS.isObject(e)}(e)&&HS.isObject(t)){var n=fE.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;sE(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:cE(),appLink:e},t);sE(_w.UserAction.Navigate,n)},mergeOptions:function(e,t){return HS.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return lE(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=lE(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return cE()},buildSearchEvent:function(e,t){return{data:{query:e},action:lE({entity:_w.EntityType.Video,location:_w.LocationContext.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===_w.SearchQueryType.Series&&(r=_w.EntityType.Series),n===_w.SearchQueryType.Folder&&(r=_w.EntityType.Folder),n===_w.SearchQueryType.Tags&&(r=_w.EntityType.Tag),n===_w.SearchQueryType.Video&&(r=_w.EntityType.Video),n===_w.SearchQueryType.Subjects&&(r=_w.EntityType.Classification);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:lE({entity:r,location:_w.LocationContext.SearchBar})}},mapInteractionType:function(e){switch(e){case _w.InteractionType.DragDrop:return _w.InteractionTypeDescriptor.DragDrop;case _w.InteractionType.FileSelect:return _w.InteractionTypeDescriptor.FileSelect;default:return}}};function hE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pE={isEmpty:function(e){return HS.isEmpty(e)},values:function(e){return HS.values(e)},keys:function(e){return HS.keys(e)},deepClone:function(e){return(HS.isArray(e)?HS.map:HS.mapObject)(e,(function(e){return HS.isObject(e)||HS.isArray(e)?pE.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return HS.isObject(e)},isEqual:function(e,t){return HS.isEqual(e,t)},omit:function(e,t){return HS.omit(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==hE(e,2)[1]})).reduce((function(e,t){var n=hE(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})}};function yE(e,t){if(!e)throw new Error("Invariant failed")}function mE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(){return(vE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var bE=new Map,_E=new Map,wE=new Map,TE=0;function SE(e,t,n){void 0===n&&(n={}),n.threshold||(n.threshold=0);var r=n,i=r.root,o=r.rootMargin,a=r.threshold;if(bE.has(e)&&yE(!1),e){var s=function(e){return e?wE.has(e)?wE.get(e):(TE+=1,wE.set(e,TE.toString()),wE.get(e)+"_"):""}(i)+(o?a.toString()+"_"+o:a.toString()),u=_E.get(s);u||(u=new IntersectionObserver(CE,n),s&&_E.set(s,u));var l={callback:t,element:e,inView:!1,observerId:s,observer:u,thresholds:u.thresholds||(Array.isArray(a)?a:[a])};return bE.set(e,l),u.observe(e),l}}function EE(e){if(e){var t=bE.get(e);if(t){var n=t.observerId,r=t.observer,i=r.root;r.unobserve(e);var o=!1,a=!1;n&&bE.forEach((function(t,r){r!==e&&(t.observerId===n&&(o=!0,a=!0),t.observer.root===i&&(a=!0))})),!a&&i&&wE.delete(i),r&&!o&&r.disconnect(),bE.delete(e)}}}function CE(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,r=e.target,i=bE.get(r);if(i&&n>=0){var o=i.thresholds.some((function(e){return i.inView?n>e:n>=e}));void 0!==t&&(o=o&&t),i.inView=o,i.callback(o,e)}}))}var kE=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mE(gE(t=e.call.apply(e,[this].concat(r))||this),"state",{inView:!1,entry:void 0}),mE(gE(t),"node",null),mE(gE(t),"handleNode",(function(e){t.node&&EE(t.node),t.node=e||null,t.observeNode()})),mE(gE(t),"handleChange",(function(e,n){(e!==t.state.inView||e)&&t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)})),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){this.node||yE(!1)},o.componentDidUpdate=function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||(EE(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&(EE(this.node),this.node=null)},o.componentWillUnmount=function(){this.node&&(EE(this.node),this.node=null)},o.observeNode=function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin;SE(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r})}},o.render=function(){var e=this.state,t=e.inView,n=e.entry;if(!function(e){return"function"!=typeof e.children}(this.props))return this.props.children({inView:t,entry:n,ref:this.handleNode});var i=this.props,o=i.children,a=i.as,s=i.tag,u=(i.triggerOnce,i.threshold,i.root,i.rootMargin,i.onChange,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange"]));return Object(r.createElement)(a||s||"div",vE({ref:this.handleNode},u),o)},i}(r.Component);function xE(e){void 0===e&&(e={});var t=Object(r.useRef)(),n=Object(r.useState)({inView:!1,entry:void 0}),i=n[0],o=n[1],a=Object(r.useCallback)((function(n){t.current&&EE(t.current),n&&SE(n,(function(t,r){o({inView:t,entry:r}),t&&e.triggerOnce&&EE(n)}),e),t.current=n}),[e.threshold,e.root,e.rootMargin,e.triggerOnce]);return Object(r.useDebugValue)(i.inView),[a,i.inView,i.entry]}mE(kE,"displayName","InView"),mE(kE,"defaultProps",{threshold:0,triggerOnce:!1});function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return PE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RE=n(137),AE=n.n(RE);function jE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LE,DE,ME,NE,BE,UE,FE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},VE=r.memo((function(e){var t=e.forceLoad,n=e.extraClasses,i=void 0===n?"":n,o=e.errorFallbackImageSrc,a=e.src,s=FE(e,["forceLoad","extraClasses","errorFallbackImageSrc","src"]),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prevent,n=e.rootMargin,r=e.triggerOnce,i=void 0===r||r,o=xE({triggerOnce:i,rootMargin:n}),a=OE(o,3),s=a[0],u=a[1],l=a[2];return!0!==t&&void 0!==window.IntersectionObserver||(u=!0,s=null),{ref:s,inView:u,initialized:!!l}}({rootMargin:"500px"}),l=u.ref,c=u.inView,f=jE(r.useState(!1),2),h=f[0],d=f[1];function p(){return h&&o?o:e.src}if(r.useEffect((function(){if(t||c){var e=new Image;return e.onerror=function(){d(!0),o&&(e.src=o)},e.src=a,function(){return e.onerror=null}}}),[c]),h&&!o)return r.createElement(r.Fragment,null);if(!l)return r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i),alt:"",src:p()},s));var y=Object.assign(Object.assign({alt:""},s),c||t?{src:p()}:{});return t||(y.ref=l),r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i)},y))}));function HE(e){var t=e.appLink,n=e.appLinkOptions,i=e.className,o=e.style,a=e.children,s=e.disabled,u=e.tag,l=void 0===u?"a":u;if(!t)return r.createElement("span",{className:i||""},a);var c=qS.AppLinkHelper.getHref(t),f={onClick:function(r){var i;r.preventDefault(),null===(i=e.onClick)||void 0===i||i.call(e,r),e.analyticsData&&e.analyticsOptions&&fE.logUserAction(Object.assign({href:c},e.analyticsData),e.analyticsOptions),e.openInNewTab?qS.LocationUtils.PageLoad(c,!0):qS.AppLinkHelper.trigger(t,n)},href:c,className:i,style:o,disabled:s};return e.title&&(f.title=e.title),r.createElement(l,Object.assign({},f),a)}function zE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HE.defaultProps={appLinkOptions:{}},function(e){e.Small="small",e.Medium="medium",e.Large="large"}(LE||(LE={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.Pdf=8]="Pdf",e[e.Link=9]="Link",e[e.None=99999]="None"}(DE||(DE={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(ME||(ME={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(NE||(NE={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(UE||(UE={}));var qE,WE=(zE(BE={},DE.Banners,UE.Banner),zE(BE,DE.Thumbnails,UE.Thumbnail),BE),$E=function(e){return"/v1/category-map/".concat(e)},GE={createUrl:function(e,t){return GE._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?GE._createUrl(e.url,n):GE._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return GE._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=zS(n,"".concat($E(WE[i]))),a=Object.assign({name:GE.Rfc3986EncodeURIComponent(r)},t);return GE._createUrl(o,a)},_createUrl:function(e,t){if(e){if(pE.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof qS.Model?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:LE.Small,bgColor:"000"},t);return GE._createUrl(n,r)}},getDisplayImageFromObject:function(e){var t,n,r,i,o,a,s,u;return"tallPoster"in e&&(null===(t=e.tallPoster)||void 0===t?void 0:t.url)?e.tallPoster:"cover"in e&&(null===(n=e.cover)||void 0===n?void 0:n.url)?e.cover:"thumbnail"in e&&(null===(r=e.thumbnail)||void 0===r?void 0:r.url)?e.thumbnail:"video"in e&&(null===(o=null===(i=e.video)||void 0===i?void 0:i.thumbnail)||void 0===o?void 0:o.url)?e.video.thumbnail:"clip"in e&&(null===(u=null===(s=null===(a=e.clip)||void 0===a?void 0:a.video)||void 0===s?void 0:s.thumbnail)||void 0===u?void 0:u.url)?e.clip.video.thumbnail:null}},KE=n(45),YE=n.n(KE);function XE(e){var t=YE.a.image,n="";return e.imageType===DE.Thumbnails&&(n="thumbnail ".concat(YE.a.thumbnail)),e.imageType===DE.TallPosters&&(n=YE.a.tallPoster),e.imageType===DE.Covers&&(n=YE.a.cover),e.imageType===DE.Banners&&(n=YE.a.banner),e.imageType===DE.Posters&&(n=YE.a.poster),e.imageType===DE.Pdf&&(n=YE.a.pdf),e.imageType===DE.Link&&(n=YE.a.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function QE(e){var t=e.data,n=e.imageOptions,i=e.appLink,o=e.preload,a=e.analyticsOptions,s=e.analyticsData,u=e.imageClassName,l="";"string"==typeof t?l=t:pE.isObject(t)&&(l=t.url);var c=l&&n?GE.createUrl(l,n):l;return r.createElement("div",{className:XE(e),style:e.imageStyle},i?r.createElement(HE,{appLink:i,analyticsData:s,analyticsOptions:a},e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})):r.createElement(r.Fragment,null,e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})))}function JE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ZE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eC(e){var t=JE(Object(r.useState)(window.matchMedia(e).matches),2),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&i(t.matches);var r=function(){return i(t.matches)};return t.addListener(r),function(){return t.removeListener(r)}}),[e]),n}function tC(){return(tC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nC(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function rC(e,t){return(rC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rC(e,t)}function oC(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function aC(){var e=Object(r.useRef)(!0),t=Object(r.useRef)((function(){return e.current}));return Object(r.useEffect)((function(){return function(){e.current=!1}}),[]),t.current}function sC(e){var t,n,i=(t=e,(n=Object(r.useRef)(t)).current=t,n);Object(r.useEffect)((function(){return function(){return i.current()}}),[])}!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(qE||(qE={}));var uC=Math.pow(2,31)-1;function lC(){var e=aC(),t=Object(r.useRef)();return sC((function(){return clearTimeout(t.current)})),Object(r.useMemo)((function(){var n=function(){return clearTimeout(t.current)};return{set:function(r,i){void 0===i&&(i=0),e()&&(n(),i<=uC?t.current=setTimeout(r,i):function e(t,n,r){var i=r-Date.now();t.current=i<=uC?setTimeout(n,i):setTimeout((function(){return e(t,n,r)}),uC)}(t,r,Date.now()+i))},clear:n}}),[])}function cC(e){return e&&"setState"in e?UT.a.findDOMNode(e):null!=e?e:null}var fC=n(129),hC=n.n(fC);n(130);function dC(e,t,n){var i=Object(r.useRef)(void 0!==e),o=Object(r.useState)(t),a=o[0],s=o[1],u=void 0!==e,l=i.current;return i.current=u,!u&&l&&a!==t&&s(t),[u?e:a,Object(r.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),s(e)}),[n])]}function pC(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function yC(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function mC(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}pC.__suppressDeprecationWarning=!0,yC.__suppressDeprecationWarning=!0,mC.__suppressDeprecationWarning=!0;var vC=n(66),gC=n.n(vC),bC=n(19),_C=n.n(bC);function wC(){return Object(r.useState)(null)}var TC=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};var SC=function(e,t){return Object(r.useMemo)((function(){return function(e,t){var n=TC(e),r=TC(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])},EC="top",CC="bottom",kC="right",xC="left",OC=[EC,CC,kC,xC],PC=OC.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),RC=[].concat(OC,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),AC=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];var jC=function(e){var t=aC();return[e[0],Object(r.useCallback)((function(n){if(t())return e[1](n)}),[t,e[1]])]};function IC(e){return e.split("-")[0]}function LC(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DC(e){return e instanceof LC(e).Element||e instanceof Element}function MC(e){return e instanceof LC(e).HTMLElement||e instanceof HTMLElement}function NC(e){return"undefined"!=typeof ShadowRoot&&(e instanceof LC(e).ShadowRoot||e instanceof ShadowRoot)}var BC=Math.max,UC=Math.min,FC=Math.round;function VC(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(MC(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=FC(n.width)/a||1),o>0&&(i=FC(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function HC(e){var t=VC(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zC(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qC(e){return e?(e.nodeName||"").toLowerCase():null}function WC(e){return LC(e).getComputedStyle(e)}function $C(e){return["table","td","th"].indexOf(qC(e))>=0}function GC(e){return((DC(e)?e.ownerDocument:e.document)||window.document).documentElement}function KC(e){return"html"===qC(e)?e:e.assignedSlot||e.parentNode||(NC(e)?e.host:null)||GC(e)}function YC(e){return MC(e)&&"fixed"!==WC(e).position?e.offsetParent:null}function XC(e){for(var t=LC(e),n=YC(e);n&&$C(n)&&"static"===WC(n).position;)n=YC(n);return n&&("html"===qC(n)||"body"===qC(n)&&"static"===WC(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&MC(e)&&"fixed"===WC(e).position)return null;for(var n=KC(e);MC(n)&&["html","body"].indexOf(qC(n))<0;){var r=WC(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function QC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function JC(e,t,n){return BC(e,UC(t,n))}function ZC(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ek(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var tk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=IC(n.placement),u=QC(s),l=[xC,kC].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return ZC("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ek(e,OC))}(i.padding,n),f=HC(o),h="y"===u?EC:xC,d="y"===u?CC:kC,p=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],y=a[u]-n.rects.reference[u],m=XC(o),v=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=p/2-y/2,b=c[h],_=v-f[l]-c[d],w=v/2-f[l]/2+g,T=JC(b,w,_),S=u;n.modifiersData[r]=((t={})[S]=T,t.centerOffset=T-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&zC(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nk(e){return e.split("-")[1]}var rk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ik(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,f=e.isFixed,h=a.x,d=void 0===h?0:h,p=a.y,y=void 0===p?0:p,m="function"==typeof c?c({x:d,y:y}):{x:d,y:y};d=m.x,y=m.y;var v=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=xC,_=EC,w=window;if(l){var T=XC(n),S="clientHeight",E="clientWidth";if(T===LC(n)&&"static"!==WC(T=GC(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),T=T,i===EC||(i===xC||i===kC)&&"end"===o)_=CC,y-=(f&&w.visualViewport?w.visualViewport.height:T[S])-r.height,y*=u?1:-1;if(i===xC||(i===EC||i===CC)&&"end"===o)b=kC,d-=(f&&w.visualViewport?w.visualViewport.width:T[E])-r.width,d*=u?1:-1}var C,k=Object.assign({position:s},l&&rk),x=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:FC(t*r)/r||0,y:FC(n*r)/r||0}}({x:d,y:y}):{x:d,y:y};return d=x.x,y=x.y,u?Object.assign({},k,((C={})[_]=g?"0":"",C[b]=v?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",C)):Object.assign({},k,((t={})[_]=g?y+"px":"",t[b]=v?d+"px":"",t.transform="",t))}var ok={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,l={placement:IC(t.placement),variation:nk(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ik(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ik(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ak={passive:!0};var sk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,u=LC(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach((function(e){e.addEventListener("scroll",n.update,ak)})),s&&u.addEventListener("resize",n.update,ak),function(){o&&l.forEach((function(e){e.removeEventListener("scroll",n.update,ak)})),s&&u.removeEventListener("resize",n.update,ak)}},data:{}},uk={left:"right",right:"left",bottom:"top",top:"bottom"};function lk(e){return e.replace(/left|right|bottom|top/g,(function(e){return uk[e]}))}var ck={start:"end",end:"start"};function fk(e){return e.replace(/start|end/g,(function(e){return ck[e]}))}function hk(e){var t=LC(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function dk(e){return VC(GC(e)).left+hk(e).scrollLeft}function pk(e){var t=WC(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function yk(e,t){var n;void 0===t&&(t=[]);var r=function e(t){return["html","body","#document"].indexOf(qC(t))>=0?t.ownerDocument.body:MC(t)&&pk(t)?t:e(KC(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=LC(r),a=i?[o].concat(o.visualViewport||[],pk(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(yk(KC(a)))}function mk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vk(e,t){return"viewport"===t?mk(function(e){var t=LC(e),n=GC(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+dk(e),y:s}}(e)):DC(t)?function(e){var t=VC(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):mk(function(e){var t,n=GC(e),r=hk(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=BC(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=BC(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+dk(e),u=-r.scrollTop;return"rtl"===WC(i||n).direction&&(s+=BC(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(GC(e)))}function gk(e,t,n){var r="clippingParents"===t?function(e){var t=yk(KC(e)),n=["absolute","fixed"].indexOf(WC(e).position)>=0&&MC(e)?XC(e):e;return DC(n)?t.filter((function(e){return DC(e)&&zC(e,n)&&"body"!==qC(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=vk(e,n);return t.top=BC(r.top,t.top),t.right=UC(r.right,t.right),t.bottom=UC(r.bottom,t.bottom),t.left=BC(r.left,t.left),t}),vk(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function bk(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?IC(i):null,a=i?nk(i):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case EC:t={x:s,y:n.y-r.height};break;case CC:t={x:s,y:n.y+n.height};break;case kC:t={x:n.x+n.width,y:u};break;case xC:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var l=o?QC(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case"start":t[l]=t[l]-(n[c]/2-r[c]/2);break;case"end":t[l]=t[l]+(n[c]/2-r[c]/2)}}return t}function _k(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.boundary,a=void 0===o?"clippingParents":o,s=n.rootBoundary,u=void 0===s?"viewport":s,l=n.elementContext,c=void 0===l?"popper":l,f=n.altBoundary,h=void 0!==f&&f,d=n.padding,p=void 0===d?0:d,y=ZC("number"!=typeof p?p:ek(p,OC)),m="popper"===c?"reference":"popper",v=e.rects.popper,g=e.elements[h?m:c],b=gk(DC(g)?g:g.contextElement||GC(e.elements.popper),a,u),_=VC(e.elements.reference),w=bk({reference:_,element:v,strategy:"absolute",placement:i}),T=mk(Object.assign({},v,w)),S="popper"===c?T:_,E={top:b.top-S.top+y.top,bottom:S.bottom-b.bottom+y.bottom,left:b.left-S.left+y.left,right:S.right-b.right+y.right},C=e.modifiersData.offset;if("popper"===c&&C){var k=C[i];Object.keys(E).forEach((function(e){var t=[kC,CC].indexOf(e)>=0?1:-1,n=[EC,CC].indexOf(e)>=0?"y":"x";E[e]+=k[n]*t}))}return E}var wk={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,l=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,y=n.allowedAutoPlacements,m=t.options.placement,v=IC(m),g=u||(v===m||!p?[lk(m)]:function(e){if("auto"===IC(e))return[];var t=lk(e);return[fk(e),t,fk(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat("auto"===IC(n)?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?RC:u,c=nk(r),f=c?s?PC:PC.filter((function(e){return nk(e)===c})):OC,h=f.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=f);var d=h.reduce((function(t,n){return t[n]=_k(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[IC(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:y}):n)}),[]),_=t.rects.reference,w=t.rects.popper,T=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var k=b[C],x=IC(k),O="start"===nk(k),P=[EC,CC].indexOf(x)>=0,R=P?"width":"height",A=_k(t,{placement:k,boundary:c,rootBoundary:f,altBoundary:h,padding:l}),j=P?O?kC:xC:O?CC:EC;_[R]>w[R]&&(j=lk(j));var I=lk(j),L=[];if(o&&L.push(A[x]<=0),s&&L.push(A[j]<=0,A[I]<=0),L.every((function(e){return e}))){E=k,S=!1;break}T.set(k,L)}if(S)for(var D=function(e){var t=b.find((function(t){var n=T.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},M=p?3:1;M>0;M--){if("break"===D(M))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Tk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Sk(e){return[EC,kC,CC,xC].some((function(t){return e[t]>=0}))}var Ek={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=_k(t,{elementContext:"reference"}),s=_k(t,{altBoundary:!0}),u=Tk(a,r),l=Tk(s,i,o),c=Sk(u),f=Sk(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}};var Ck={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=RC.reduce((function(e,n){return e[n]=function(e,t,n){var r=IC(e),i=[xC,EC].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[xC,kC].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],u=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var kk={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=bk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var xk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,y=void 0===p?0:p,m=_k(t,{boundary:u,rootBoundary:l,padding:f,altBoundary:c}),v=IC(t.placement),g=nk(t.placement),b=!g,_=QC(v),w="x"===_?"y":"x",T=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,k="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(T){if(o){var P,R="y"===_?EC:xC,A="y"===_?CC:kC,j="y"===_?"height":"width",I=T[_],L=I+m[R],D=I-m[A],M=d?-E[j]/2:0,N="start"===g?S[j]:E[j],B="start"===g?-E[j]:-S[j],U=t.elements.arrow,F=d&&U?HC(U):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[R],z=V[A],q=JC(0,S[j],F[j]),W=b?S[j]/2-M-q-H-k.mainAxis:N-q-H-k.mainAxis,$=b?-S[j]/2+M+q+z+k.mainAxis:B+q+z+k.mainAxis,G=t.elements.arrow&&XC(t.elements.arrow),K=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,Y=null!=(P=null==x?void 0:x[_])?P:0,X=I+$-Y,Q=JC(d?UC(L,I+W-Y-K):L,I,d?BC(D,X):D);T[_]=Q,O[_]=Q-I}if(s){var J,Z="x"===_?EC:xC,ee="x"===_?CC:kC,te=T[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[EC,xC].indexOf(v),ae=null!=(J=null==x?void 0:x[w])?J:0,se=oe?re:te-S[ne]-E[ne]-ae+k.altAxis,ue=oe?te+S[ne]+E[ne]-ae-k.altAxis:ie,le=d&&oe?function(e,t,n){var r=JC(e,t,n);return r>n?n:r}(se,te,ue):JC(d?se:re,te,d?ue:ie);T[w]=le,O[w]=le-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function Ok(e,t,n){void 0===n&&(n=!1);var r,i,o=MC(t),a=MC(t)&&function(e){var t=e.getBoundingClientRect(),n=FC(t.width)/e.offsetWidth||1,r=FC(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=GC(t),u=VC(e,a),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==qC(t)||pk(s))&&(l=(r=t)!==LC(r)&&MC(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:hk(r)),MC(t)?((c=VC(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=dk(s))),{x:u.left+l.scrollLeft-c.x,y:u.top+l.scrollTop-c.y,width:u.width,height:u.height}}function Pk(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=t.get(r);i&&e(i)}})),r.push(i)}(e)})),r}var Rk={placement:"bottom",modifiers:[],strategy:"absolute"};function Ak(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function jk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Rk:i;return function(e,t,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Rk,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,c={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:DC(e)?yk(e):e.contextElement?yk(e.contextElement):[],popper:yk(t)};var a=function(e){var t=Pk(e);return AC.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:c,options:r});u.push(o||function(){})}})),c.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Ak(t,n)){s.rects={reference:Ok(t,XC(n),"fixed"===s.options.strategy),popper:HC(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,u=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:u,name:f,instance:c})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(i())}))}))),a}),destroy:function(){f(),l=!0}};if(!Ak(e,t))return c;function f(){u.forEach((function(e){return e()})),u=[]}return c.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Ik=jk({defaultModifiers:[Ek,kk,ok,sk,Ck,wk,xk,tk]}),Lk=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Dk={name:"applyStyles",enabled:!1},Mk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var i=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));i.length?n.setAttribute("aria-describedby",i.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,i=n.reference,o=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===o&&"setAttribute"in i){var a=i.getAttribute("aria-describedby");if(a&&-1!==a.split(",").indexOf(r.id))return;i.setAttribute("aria-describedby",a?a+","+r.id:r.id)}}},Nk=[];var Bk=function(e,t,n){var i=void 0===n?{}:n,o=i.enabled,a=void 0===o||o,s=i.placement,u=void 0===s?"bottom":s,l=i.strategy,c=void 0===l?"absolute":l,f=i.modifiers,h=void 0===f?Nk:f,d=nC(i,["enabled","placement","strategy","modifiers"]),p=Object(r.useRef)(),y=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.update()}),[]),m=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.forceUpdate()}),[]),v=jC(Object(r.useState)({placement:u,update:y,forceUpdate:m,attributes:{},styles:{popper:Lk(c),arrow:{}}})),g=v[0],b=v[1],_=Object(r.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),b({state:t,styles:n,attributes:r,update:y,forceUpdate:m,placement:t.placement})}}}),[y,m,b]);return Object(r.useEffect)((function(){p.current&&a&&p.current.setOptions({placement:u,strategy:c,modifiers:[].concat(h,[_,Dk])})}),[c,u,_,a]),Object(r.useEffect)((function(){if(a&&null!=e&&null!=t)return p.current=Ik(e,t,tC({},d,{placement:u,strategy:c,modifiers:[].concat(h,[Mk,_])})),function(){null!=p.current&&(p.current.destroy(),p.current=void 0,b((function(e){return tC({},e,{attributes:{},styles:{popper:Lk(c)}})})))}}),[a,e,t]),g},Uk=n(216),Fk=!1,Vk=!1;try{var Hk={get passive(){return Fk=!0},get once(){return Vk=Fk=!0}};Uk.a&&(window.addEventListener("test",Hk,Hk),window.removeEventListener("test",Hk,!0))}catch(e){}var zk=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!Vk){var i=r.once,o=r.capture,a=n;!Vk&&i&&(a=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=a),e.addEventListener(t,a,Fk?r:o)}e.addEventListener(t,n,r)};var qk=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var Wk=function(e,t,n,r){return zk(e,t,n,r),function(){qk(e,t,n,r)}},$k=n(138),Gk=n(67),Kk=function(){};var Yk=function(e){return e&&("current"in e?e.current:e)};var Xk=function(e,t,n){var i=void 0===n?{}:n,o=i.disabled,a=i.clickTrigger,s=void 0===a?"click":a,u=Object(r.useRef)(!1),l=t||Kk,c=Object(r.useCallback)((function(t){var n,r=Yk(e);hC()(!!r,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),u.current=!(r&&(n=t,!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey))&&function(e){return 0===e.button}(t)&&!oC(r,t.target))}),[e]),f=Object($k.a)((function(e){u.current||l(e)})),h=Object($k.a)((function(e){27===e.keyCode&&l(e)}));Object(r.useEffect)((function(){if(!o&&null!=e){var t,n=window.event,r=(t=Yk(e),Object(Gk.a)(cC(t))),i=Wk(r,s,c,!0),a=Wk(r,s,(function(e){e!==n?f(e):n=void 0})),u=Wk(r,"keyup",(function(e){e!==n?h(e):n=void 0})),l=[];return"ontouchstart"in r.documentElement&&(l=[].slice.call(r.body.children).map((function(e){return Wk(e,"mousemove",Kk)}))),function(){i(),a(),u(),l.forEach((function(e){return e()}))}}}),[e,o,s,c,f,h])},Qk=function(e){var t;return"undefined"==typeof document?null:null==e?Object(Gk.a)().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function Jk(e,t){var n=Object(r.useState)((function(){return Qk(e)})),i=n[0],o=n[1];if(!i){var a=Qk(e);a&&o(a)}return Object(r.useEffect)((function(){t&&i&&t(i)}),[t,i]),Object(r.useEffect)((function(){var t=Qk(e);t!==i&&o(t)}),[e,i]),i}function Zk(e){var t,n,r,i,o,a=e.enabled,s=e.enableEvents,u=e.placement,l=e.flip,c=e.offset,f=e.fixed,h=e.containerPadding,d=e.arrowElement,p=e.popperConfig,y=void 0===p?{}:p,m=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(y.modifiers);return tC({},y,{placement:u,enabled:a,strategy:f?"fixed":y.strategy,modifiers:(o=tC({},m,{eventListeners:{enabled:s},preventOverflow:tC({},m.preventOverflow,{options:h?tC({padding:h},null==(t=m.preventOverflow)?void 0:t.options):null==(n=m.preventOverflow)?void 0:n.options}),offset:{options:tC({offset:c},null==(r=m.offset)?void 0:r.options)},arrow:tC({},m.arrow,{enabled:!!d,options:tC({},null==(i=m.arrow)?void 0:i.options,{element:d})}),flip:tC({enabled:!!l},m.flip)}),void 0===o&&(o={}),Array.isArray(o)?o:Object.keys(o).map((function(e){return o[e].name=e,o[e]})))})}var ex=i.a.forwardRef((function(e,t){var n=e.flip,o=e.offset,a=e.placement,s=e.containerPadding,u=void 0===s?5:s,l=e.popperConfig,c=void 0===l?{}:l,f=e.transition,h=wC(),d=h[0],p=h[1],y=wC(),m=y[0],v=y[1],g=SC(p,t),b=Jk(e.container),_=Jk(e.target),w=Object(r.useState)(!e.show),T=w[0],S=w[1],E=Bk(_,d,Zk({placement:a,enableEvents:!!e.show,containerPadding:u||5,flip:n,offset:o,arrowElement:m,popperConfig:c})),C=E.styles,k=E.attributes,x=nC(E,["styles","attributes"]);e.show?T&&S(!1):e.transition||T||S(!0);var O=e.show||f&&!T;if(Xk(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!O)return null;var P=e.children(tC({},x,{show:!!e.show,props:tC({},k.popper,{style:C.popper,ref:g}),arrowProps:tC({},k.arrow,{style:C.arrow,ref:v})}));if(f){var R=e.onExit,A=e.onExiting,j=e.onEnter,I=e.onEntering,L=e.onEntered;P=i.a.createElement(f,{in:e.show,appear:!0,onExit:R,onExiting:A,onExited:function(){S(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:j,onEntering:I,onEntered:L},P)}return b?UT.a.createPortal(P,b):null}));ex.displayName="Overlay",ex.propTypes={show:_C.a.bool,placement:_C.a.oneOf(RC),target:_C.a.any,container:_C.a.any,flip:_C.a.bool,children:_C.a.func.isRequired,containerPadding:_C.a.number,popperConfig:_C.a.object,rootClose:_C.a.bool,rootCloseEvent:_C.a.oneOf(["click","mousedown"]),rootCloseDisabled:_C.a.bool,onHide:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;return e.rootClose?(i=_C.a.func).isRequired.apply(i,[e].concat(n)):_C.a.func.apply(_C.a,[e].concat(n))},transition:_C.a.elementType,onEnter:_C.a.func,onEntering:_C.a.func,onEntered:_C.a.func,onExit:_C.a.func,onExiting:_C.a.func,onExited:_C.a.func};var tx=ex,nx=n(107),rx=i.a.createContext({});rx.Consumer,rx.Provider;function ix(e,t){var n=Object(r.useContext)(rx);return e||n[t]||t}function ox(e){var t=window.getComputedStyle(e);return{top:parseFloat(t.marginTop)||0,right:parseFloat(t.marginRight)||0,bottom:parseFloat(t.marginBottom)||0,left:parseFloat(t.marginLeft)||0}}var ax=!1,sx=i.a.createContext(null),ux=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}iC(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[UT.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||ax?this.safeSetState({status:"entered"},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:"entering"},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:UT.a.findDOMNode(this);t&&!ax?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:UT.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,nC(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(sx.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function lx(){}ux.contextType=sx,ux.propTypes={},ux.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:lx,onEntering:lx,onEntered:lx,onExit:lx,onExiting:lx,onExited:lx},ux.UNMOUNTED="unmounted",ux.EXITED="exited",ux.ENTERING="entering",ux.ENTERED="entered",ux.EXITING="exiting";var cx=ux;function fx(e,t){return function(e){var t=Object(Gk.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var hx=/([A-Z])/g;var dx=/^ms-/;function px(e){return function(e){return e.replace(hx,"-$1").toLowerCase()}(e).replace(dx,"-ms-")}var yx=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;var mx=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(px(t))||fx(e).getPropertyValue(px(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?!function(e){return!(!e||!yx.test(e))}(i)?n+=px(i)+": "+o+";":r+=i+"("+o+") ":e.style.removeProperty(px(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function vx(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)}),t+n),o=Wk(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}function gx(e,t,n,r){var i,o;null==n&&(i=mx(e,"transitionDuration")||"",o=-1===i.indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var a=vx(e,n,r),s=Wk(e,"transitionend",t);return function(){a(),s()}}function bx(e,t){var n=mx(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function _x(e,t){var n=bx(e,"transitionDuration"),r=bx(e,"transitionDelay"),i=gx(e,(function(n){n.target===e&&(i(),t(n))}),n+r)}var wx,Tx=["className","children"],Sx=((wx={}).entering="show",wx.entered="show",wx),Ex=i.a.forwardRef((function(e,t){var n=e.className,o=e.children,a=nC(e,Tx),s=Object(r.useCallback)((function(e){!function(e){e.offsetHeight}(e),a.onEnter&&a.onEnter(e)}),[a]);return i.a.createElement(cx,tC({ref:t,addEndListener:_x},a,{onEnter:s}),(function(e,t){return i.a.cloneElement(o,tC({},t,{className:gC()("fade",n,o.props.className,Sx[e])}))}))}));Ex.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},Ex.displayName="Fade";var Cx=Ex,kx=["children","transition","popperConfig"],xx=["props","arrowProps","show","update","forceUpdate","placement","state"],Ox={transition:Cx,rootClose:!1,show:!1,placement:"top"};function Px(e){var t,n,o,a,s,u=e.children,l=e.transition,c=e.popperConfig,f=void 0===c?{}:c,h=nC(e,kx),d=Object(r.useRef)({}),p=(t=Object(r.useRef)(null),n=Object(r.useRef)(null),o=Object(r.useRef)(null),a=ix(void 0,"popover"),s=ix(void 0,"dropdown-menu"),[Object(r.useCallback)((function(e){e&&(Object(nx.a)(e,a)||Object(nx.a)(e,s))&&(n.current=ox(e),e.style.margin="0",t.current=e)}),[a,s]),[Object(r.useMemo)((function(){return{name:"offset",options:{offset:function(e){var t=e.placement;if(!n.current)return[0,0];var r=n.current,i=r.top,o=r.left,a=r.bottom,s=r.right;switch(t.split("-")[0]){case"top":return[0,a];case"left":return[0,s];case"bottom":return[0,i];case"right":return[0,o];default:return[0,0]}}}}}),[n]),Object(r.useMemo)((function(){return{name:"arrow",options:{padding:function(){if(!o.current)return 0;var e=o.current,t=e.top,n=e.right,r=t||n;return{top:r,left:r,right:r,bottom:r}}}}}),[o]),Object(r.useMemo)((function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",requiresIfExists:["arrow"],effect:function(e){var n=e.state;if(t.current&&n.elements.arrow&&Object(nx.a)(t.current,a)){if(n.modifiersData["arrow#persistent"]){var r=ox(n.elements.arrow),i=r.top,s=r.right,u=i||s;n.modifiersData["arrow#persistent"].padding={top:u,left:u,right:u,bottom:u}}else o.current=ox(n.elements.arrow);return n.elements.arrow.style.margin="0",function(){n.elements.arrow&&(n.elements.arrow.style.margin="")}}}}}),[a])]]),y=p[0],m=p[1],v=!0===l?Cx:l||null;return i.a.createElement(tx,tC({},h,{ref:y,popperConfig:tC({},f,{modifiers:m.concat(f.modifiers||[])}),transition:v}),(function(e){var t,n=e.props,r=e.arrowProps,o=e.show,a=e.update,s=(e.forceUpdate,e.placement),c=e.state,f=nC(e,xx);!function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(cC(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(cC(e))})}(n,r);var h=Object.assign(d.current,{state:c,scheduleUpdate:a,placement:s,outOfBoundaries:(null==c||null==(t=c.modifiersData.hide)?void 0:t.isReferenceHidden)||!1});return"function"==typeof u?u(tC({},f,n,{placement:s,show:o},!l&&o&&{className:"show"},{popper:h,arrowProps:r})):i.a.cloneElement(u,tC({},f,n,{placement:s,arrowProps:r,popper:h,className:gC()(u.props.className,!l&&o&&"show"),style:tC({},u.props.style,n.style)}))}))}Px.defaultProps=Ox;var Rx=Px,Ax=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],jx=function(e){function t(){return e.apply(this,arguments)||this}return iC(t,e),t.prototype.render=function(){return this.props.children},t}(i.a.Component);function Ix(e,t,n){var r=t[0],i=r.currentTarget,o=r.relatedTarget||r.nativeEvent[n];o&&o===i||oC(i,o)||e.apply(void 0,t)}function Lx(e){var t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,s=void 0===a?{}:a,u=e.show,l=e.defaultShow,c=void 0!==l&&l,f=e.onToggle,h=e.delay,d=e.placement,p=e.flip,y=void 0===p?d&&-1!==d.indexOf("auto"):p,m=nC(e,Ax),v=Object(r.useRef)(null),g=lC(),b=Object(r.useRef)(""),_=dC(u,c,f),w=_[0],T=_[1],S=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(h),E="function"!=typeof o?i.a.Children.only(o).props:{},C=E.onFocus,k=E.onBlur,x=E.onClick,O=Object(r.useCallback)((function(){return cC(v.current)}),[]),P=Object(r.useCallback)((function(){g.clear(),b.current="show",S.show?g.set((function(){"show"===b.current&&T(!0)}),S.show):T(!0)}),[S.show,T,g]),R=Object(r.useCallback)((function(){g.clear(),b.current="hide",S.hide?g.set((function(){"hide"===b.current&&T(!1)}),S.hide):T(!1)}),[S.hide,T,g]),A=Object(r.useCallback)((function(){P();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==C||C.apply(void 0,t)}),[P,C]),j=Object(r.useCallback)((function(){R();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==k||k.apply(void 0,t)}),[R,k]),I=Object(r.useCallback)((function(){T(!w),x&&x.apply(void 0,arguments)}),[x,T,w]),L=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(P,t,"fromElement")}),[P]),D=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(R,t,"toElement")}),[R]),M=null==t?[]:[].concat(t),N={};return-1!==M.indexOf("click")&&(N.onClick=I),-1!==M.indexOf("focus")&&(N.onFocus=A,N.onBlur=j),-1!==M.indexOf("hover")&&(N.onMouseOver=L,N.onMouseOut=D),i.a.createElement(i.a.Fragment,null,"function"==typeof o?o(tC({},N,{ref:v})):i.a.createElement(jx,{ref:v},Object(r.cloneElement)(o,N)),i.a.createElement(Rx,tC({},m,{show:w,onHide:R,flip:y,placement:d,popperConfig:s,target:O}),n))}Lx.defaultProps={defaultShow:!1,trigger:["hover","focus"]};var Dx=Lx,Mx=(n(400),["bsPrefix","placement","className","style","children","arrowProps","popper","show"]),Nx=i.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,o=e.className,a=e.style,s=e.children,u=e.arrowProps,l=(e.popper,e.show,nC(e,Mx));n=ix(n,"tooltip");var c=((null==r?void 0:r.split("-"))||[])[0];return i.a.createElement("div",tC({ref:t,style:a,role:"tooltip","x-placement":c,className:gC()(o,n,"bs-tooltip-"+c)},l),i.a.createElement("div",tC({className:"arrow"},u)),i.a.createElement("div",{className:n+"-inner"},s))}));Nx.defaultProps={placement:"right"},Nx.displayName="Tooltip";var Bx,Ux,Fx=Nx,Vx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function Hx(e){var t,n=e.title,i=e.placement,o=e.trigger,a=e.spanHack,s=e.children,u=e.disable;return a?r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement("span",{className:"".concat(null!==(t=e.spanHackClassName)&&void 0!==t?t:"d-flex justify-content-center align-items-center")},s)):r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement(r.Fragment,null,s))}Hx.defaultProps={trigger:["hover","click","focus"],placement:"top"},function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(Bx||(Bx={})),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(Ux||(Ux={}));var zx=n(40),qx=n.n(zx),Wx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},$x={width:200};function Gx(e,t){var n,r=zS(e,"/v1/previews");return"metadata"in t?t.metadata.type===Bx.Pdf?GE.createResourceImage(r,t.url,$x):t.metadata.type===Bx.Image?GE.createUrl(t.url,{size:LE.Medium,resizeType:ME.Cover}):(null===(n=t.pdf)||void 0===n?void 0:n.url)?GE.createResourceImage(r,t.pdf.url,$x):t.metadata.type===Bx.Zip?GE.createUrl(zS(e,"/v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createUrl("".concat(e,"v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createResourceImage(r,t.url,Object.assign({},$x))}function Kx(e){var t;return"metadata"in e?e.metadata.type===Bx.Pdf?DE.Pdf:e.metadata.type===Bx.Image?DE.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?DE.Pdf:(e.metadata.type,Bx.Zip,DE.Thumbnails):DE.Link}function Yx(e){var t,n,r,o=null,a=0;"metadata"in e.data&&(o=e.data.metadata,a=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var s="pt-3 px-3 rounded-lg d-flex flex-column align-items-center"+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return qx.a.atomGuide;case"student-activity":return qx.a.studentActivity;case"teacher-pack":return qx.a.teacherPack;case"additional-materials":return qx.a.additionalMaterials;default:return qx.a.userUploaded}}(null==o?void 0:o.resourceType)," ").concat(qx.a.background);return i.a.createElement("div",{className:s},i.a.createElement(Hx,{title:e.data.name},i.a.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(qx.a.text)},i.a.createElement("span",{className:"clamp-1"},e.data.name))),i.a.createElement("div",{className:"w-75 overflow-hidden ".concat(qx.a.thumbnailContainer)},i.a.createElement(QE,{data:Gx(e.imageCdnUrl,e.data),imageType:Kx(e.data),imageStyle:{transform:"rotate(".concat(a,"deg)")},analyticsOptions:{location:_w.LocationContext.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,preload:!0})))}i.a.memo((function(e){var t,n,r,o,a,s,u,l=Wx(e,[]),c=(t=eC(qE.XS),n=eC(qE.SM),r=eC(qE.MD),o=eC(qE.LG),a=eC(qE.XL),s=eC(qE.XXL),u=qE.LG,t&&(u=qE.XS),n&&(u=qE.SM),r&&(u=qE.MD),o&&(u=qE.LG),a&&(u=qE.XL),s&&(u=qE.XXL),u),f=c===qE.SM||c===qE.XS,h=null;"metadata"in e.data&&(h=e.data.metadata.type);var d=Object.assign(Object.assign({},e.analyticsData),e.data),p=Object.assign(Object.assign({},e.analyticsOptions),{actionType:_w.UserAction.Click,entity:e.data.typeId===Ux.Resource?_w.EntityType.Resource:_w.EntityType.Link});function y(){fE.logUserAction(d,p)}return i.a.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(qx.a.item)},function(){if(!h)return i.a.createElement("a",{href:e.data.url,target:"_blank",className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l)));var t=!!e.data.pdf||h===Bx.Pdf||h===Bx.Image;return f||!t||h===Bx.Zip?i.a.createElement("a",{href:e.data.url,className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l))):i.a.createElement(HE,{appLink:e.getAppLink(e.data),className:"d-block no-decoration",analyticsData:d,analyticsOptions:p},i.a.createElement(Yx,Object.assign({},l)))}())})),n(401);function Xx(e){return(Xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jx(e,t){return(Jx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zx(e){var t=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(e){return!1}}();return function(){var n,r=tO(e);if(t){var i=tO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eO(this,n)}}function eO(e,t){if(t&&("object"===Xx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tO(e){return(tO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nO(e){return i.a.createElement("div",{className:"cv-resource-item"},i.a.createElement(Yx,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var rO=ZT((function(e,t){return i.a.createElement(nO,Object.assign({},t))})),iO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jx(e,t)}(o,e);var t,n,r,i=Zx(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t);var r=new rO(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&Qx(t.prototype,n),r&&Qx(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ClickableComponent"));n(402);function oO(e){return(oO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uO(){return(uO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dO(e)););return e}function cO(e,t){return(cO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fO(e){var t=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(e){return!1}}();return function(){var n,r=dO(e);if(t){var i=dO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hO(this,n)}}function hO(e,t){if(t&&("object"===oO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dO(e){return(dO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cO(e,t)}(o,e);var t,n,r,i=fO(o);function o(){var e;return aO(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(uO(dO(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(uO(dO(o.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){uO(dO(o.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",uO(dO(o.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new iO(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Fu.dom.createEl("iframe"),this.downloadIframe.style.display="none",Fu.dom.appendContent(Fu.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){uO(dO(o.prototype),"handleClick",this).call(this,null)}}])&&sO(t.prototype,n),r&&sO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));function yO(e){return(yO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vO(e,t){return(vO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gO(e){var t=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(e){return!1}}();return function(){var n,r=_O(e);if(t){var i=_O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bO(this,n)}}function bO(e,t){if(t&&("object"===yO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _O(e){return(_O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pO.prototype.controlText_="Resources",Fu.registerComponent("ResourcesButton",pO);var wO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}(o,e);var t,n,r,i=gO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&mO(t.prototype,n),r&&mO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("resourcesPlugin",wO);n(403);function TO(e){return(TO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function EO(){return(EO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=CO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function CO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=PO(e)););return e}function kO(e,t){return(kO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xO(e){var t=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(e){return!1}}();return function(){var n,r=PO(e);if(t){var i=PO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return OO(this,n)}}function OO(e,t){if(t&&("object"===TO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function PO(e){return(PO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var RO=Fu.getComponent("PlayToggle"),AO=Fu.getPlugin("plugin"),jO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kO(e,t)}(o,e);var t,n,r,i=xO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.enablePictureInPicture(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var t=e.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===t&&(t=e.children().length-1),e.addChild("pictureInPictureToggle",{},t);var n=e.getChild("pictureInPictureToggle");null==n||n.enable()}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new RO(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,EO(PO(o.prototype),"dispose",this).call(this)}}])&&SO(t.prototype,n),r&&SO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(AO);Fu.registerPlugin("pictureInPicture",jO);n(404);function IO(e){return(IO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DO(e,t){return(DO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MO(e){var t=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(e){return!1}}();return function(){var n,r=BO(e);if(t){var i=BO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NO(this,n)}}function NO(e,t){if(t&&("object"===IO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BO(e){return(BO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DO(e,t)}(o,e);var t,n,r,i=MO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&LO(t.prototype,n),r&&LO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function FO(e){return(FO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zO(e,t){return(zO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qO(e){var t=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(e){return!1}}();return function(){var n,r=$O(e);if(t){var i=$O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return WO(this,n)}}function WO(e,t){if(t&&("object"===FO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $O(e){return($O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}UO.prototype.controlText_="Favourite";var GO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zO(e,t)}(o,e);var t,n,r,i=qO(o);function o(){return VO(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){var n=this;e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new UO(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&HO(t.prototype,n),r&&HO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function KO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("favouritePlugin",GO);var YO=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n,r;return t=e,(n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}])&&KO(t.prototype,n),r&&KO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());n(405);function XO(e){return(XO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JO(){return(JO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ZO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ZO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=iP(e)););return e}function eP(e,t){return(eP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tP(e){var t=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(e){return!1}}();return function(){var n,r=iP(e);if(t){var i=iP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nP(this,n)}}function nP(e,t){if(t&&("object"===XO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rP(e)}function rP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iP(e){return(iP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eP(e,t)}(o,e);var t,n,r,i=tP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=YO,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(rP(n)),n.onMouseLeave=n.onMouseLeave.bind(rP(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(rP(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(rP(n)),n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(JO(iP(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return JO(iP(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;t!==this.hasBuffered&&(this.hasBuffered=t,this.hasBuffered?this.addClass("cv-point-of-interest-indicator-buffered"):this.removeClass("cv-point-of-interest-indicator-buffered"))}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){e?this.removeClass("cv-point-of-interest-indicator-hidden"):this.addClass("cv-point-of-interest-indicator-hidden")}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=Fu.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&QO(t.prototype,n),r&&QO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function aP(e){return(aP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uP(){return(uP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dP(e)););return e}function cP(e,t){return(cP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fP(e){var t=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(e){return!1}}();return function(){var n,r=dP(e);if(t){var i=dP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hP(this,n)}}function hP(e,t){if(t&&("object"===aP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dP(e){return(dP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cP(e,t)}(o,e);var t,n,r,i=fP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Fu.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){Fu.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=uP(dP(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&sP(t.prototype,n),r&&sP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function yP(e){return(yP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vP(e,t){return(vP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gP(e){var t=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(e){return!1}}();return function(){var n,r=wP(e);if(t){var i=wP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bP(this,n)}}function bP(e,t){if(t&&("object"===yP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _P(e)}function _P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wP(e){return(wP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PointsOfInterestMenuItem",pP);var TP,SP=Fu.getPlugin("plugin"),EP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vP(e,t)}(o,e);var t,n,r,i=gP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(_P(n)),n.updateBuffered=n.updateBuffered.bind(_P(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(_P(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=o,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(Qu()&&"false"===Ju("cvplayer-points-of-interest")&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Zu("cvplayer-points-of-interest",e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new oP(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:pP,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered(ky(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&mP(t.prototype,n),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(SP);Fu.registerPlugin("pointsOfInterestPlugin",EP),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(TP||(TP={}));n(406);function CP(e){return(CP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xP(e,t){return(xP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OP(e){var t=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(e){return!1}}();return function(){var n,r=RP(e);if(t){var i=RP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PP(this,n)}}function PP(e,t){if(t&&("object"===CP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function RP(e){return(RP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xP(e,t)}(o,e);var t,n,r,i=OP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.activityStatus===TP.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===TP.Complete?TP.Incomplete:TP.Complete,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&kP(t.prototype,n),r&&kP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function jP(e){return(jP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DP(e,t){return(DP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MP(e){var t=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(e){return!1}}();return function(){var n,r=BP(e);if(t){var i=BP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NP(this,n)}}function NP(e,t){if(t&&("object"===jP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BP(e){return(BP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}AP.prototype.controlText_="ActivityStatus";var UP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DP(e,t)}(o,e);var t,n,r,i=MP(o);function o(){return IP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new AP(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&LP(t.prototype,n),r&&LP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function FP(e){return(FP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HP(){return(HP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=GP(e)););return e}function qP(e,t){return(qP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WP(e){var t=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(e){return!1}}();return function(){var n,r=GP(e);if(t){var i=GP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $P(this,n)}}function $P(e,t){if(t&&("object"===FP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function GP(e){return(GP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("activityStatusPlugin",UP);var KP=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},YP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qP(e,t)}(o,e);var t,n,r,i=WP(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),this.options.pointsOfInterest&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return HP(GP(o.prototype),"additionalSetup",t)}}});return KP(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&VP(t.prototype,n),r&&VP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT),XP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function QP(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,s=XP(e,["className","playerApi","onReady","onDispose"]),u=i.a.useRef(),l=i.a.useRef();return i.a.useEffect((function(){var e;if(null===(e=l.current)||void 0===e||e.dispose(),u)return l.current=new YP(u.current,Object.assign(Object.assign({},s),{playerApi:r})),o&&l.current.ready((function(){o(l.current)})),a&&l.current.one("dispose",a),function(){var e;null===(e=l.current)||void 0===e||e.dispose()}}),[e.viewKey]),i.a.createElement("div",{ref:u,className:n})}function JP(e){return(JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tR(){return(tR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=aR(e)););return e}function rR(e,t){return(rR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iR(e){var t=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(e){return!1}}();return function(){var n,r=aR(e);if(t){var i=aR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oR(this,n)}}function oR(e,t){if(t&&("object"===JP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function aR(e){return(aR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sR=Fu.getComponent("Component"),uR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rR(e,t)}(o,e);var t,n,r,i=iR(o);function o(){return ZP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(tR(aR(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return tR(aR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14" pointer-events="none"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&eR(t.prototype,n),r&&eR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sR);n(407);function lR(e){return(lR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fR(){return(fR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=hR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function hR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mR(e)););return e}function dR(e,t){return(dR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pR(e){var t=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(e){return!1}}();return function(){var n,r=mR(e);if(t){var i=mR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yR(this,n)}}function yR(e,t){if(t&&("object"===lR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function mR(e){return(mR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dR(e,t)}(o,e);var t,n,r,i=pR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.minDuration=Math.min(e.duration(),n.options_.minDuration),n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new uR(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new uR(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return fR(mR(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.player().duration()-this.minDuration;if(e>r&&(e=r),e<0&&(e=0),this.startTime=e,this.endTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.startTime+n:this.startTime+this.minDuration;this.setEndTime(i)}this.player().currentTime(this.startTime),t&&this.update()}}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.minDuration;if(e<r&&(e=r),e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,this.startTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.endTime-n:this.endTime-this.minDuration;this.setStartTime(i)}t&&this.update()}}},{key:"bindListeners",value:function(){var e=this;this.onTimeupdate=this.onTimeupdate.bind(this),this.player().on("timeupdate",this.onTimeupdate),this.on("mousedown",this.dragStart),this.on("touchstart",this.dragStart),this.player().on("dispose",(function(){e.player().off("timeupdate",e.onTimeupdate),e.off("mousedown",e.dragStart),e.off("touchstart",e.dragStart)}))}},{key:"hasStartTime",value:function(){return"number"==typeof this.startTime}},{key:"hasEndTime",value:function(){return"number"==typeof this.endTime}},{key:"onTimeupdate",value:function(){var e=this.player().currentTime();e>this.endTime&&e<this.endTime+.5&&this.player().pause()}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e));var t=this.el().ownerDocument;this.on(t,"mousemove",this.drag),this.on(t,"mouseup",this.dragEnd),this.on(t,"touchmove",this.drag),this.on(t,"touchend",this.dragEnd),this.drag(e)}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null;var e=this.el().ownerDocument;this.off(e,"mousemove",this.drag),this.off(e,"mouseup",this.dragEnd),this.off(e,"touchmove",this.drag),this.off(e,"touchend",this.dragEnd)}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Fu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Fu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&cR(t.prototype,n),r&&cR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(408);function gR(e){return(gR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _R(){return(_R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=wR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function wR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CR(e)););return e}function TR(e,t){return(TR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SR(e){var t=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(e){return!1}}();return function(){var n,r=CR(e);if(t){var i=CR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ER(this,n)}}function ER(e,t){if(t&&("object"===gR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function CR(e){return(CR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TR(e,t)}(o,e);var t,n,r,i=SR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).seekBar_=t.seekBar,n.playProgressBar_=t.playProgressBar,n.bindListeners(),n.player_.one("dispose",(function(){n.unbindListeners()})),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){return _R(CR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"cv-create-clip-progress-indicator"}),n)}},{key:"bindListeners",value:function(){this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown)}},{key:"unbindListeners",value:function(){var e=this.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp)}},{key:"handleMouseDown",value:function(e){if(Fu.dom.isSingleLeftClick(e)){e.stopPropagation(),"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Fu.browser.IS_CHROME||e.preventDefault(),this.player_.scrubbing(!0),this.videoWasPlaying_=!this.player_.paused(),this.player_.pause(),Fu.dom.blockTextSelection();var t=this.el_.ownerDocument;this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e),this.player_.addClass("cv-hide-mouse-time")}}},{key:"handleMouseMove",value:function(e){if(Fu.dom.isSingleLeftClick(e)){var t=Fu.dom.getPointerPosition(this.seekBar_.el_,e).x*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t),this.playProgressBar_.update()}}},{key:"handleMouseUp",value:function(e){Fu.dom.unblockTextSelection();var t=this.el_.ownerDocument;this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),null==e||e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying_&&this.player_.play(),this.seekBar_.update(),this.player_.removeClass("cv-hide-mouse-time")}}])&&bR(t.prototype,n),r&&bR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("CreateClipProgressIndicator",kR);n(409);function xR(e){return(xR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PR(e,t){return(PR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RR(e){var t=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(e){return!1}}();return function(){var n,r=jR(e);if(t){var i=jR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AR(this,n)}}function AR(e,t){if(t&&("object"===xR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jR(e){return(jR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PR(e,t)}(o,e);var t,n,r,i=RR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new vR(this.player(),e);this.addChild(t);var n=this.getChild("playProgressBar"),r=new kR(this.player_,{seekBar:this,playProgressBar:n});n.addChild(r)}}])&&OR(t.prototype,n),r&&OR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));function LR(e){return(LR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MR(){return(MR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=NR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function NR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HR(e)););return e}function BR(e,t){return(BR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UR(e){var t=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(e){return!1}}();return function(){var n,r=HR(e);if(t){var i=HR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return FR(this,n)}}function FR(e,t){if(t&&("object"===LR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return VR(e)}function VR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HR(e){return(HR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IR.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||IR.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("CreateClipSeekBar",IR);var zR=Fu.getPlugin("plugin"),qR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BR(e,t)}(o,e);var t,n,r,i=UR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(VR(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=Math.min(this.options.minDuration||5,this.player.duration());t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar),MR(HR(o.prototype),"dispose",this).call(this)}}])&&DR(t.prototype,n),r&&DR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(zR);function WR(e){return(WR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GR(){return(GR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=KR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function KR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=JR(e)););return e}function YR(e,t){return(YR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XR(e){var t=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(e){return!1}}();return function(){var n,r=JR(e);if(t){var i=JR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return QR(this,n)}}function QR(e,t){if(t&&("object"===WR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function JR(e){return(JR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("createClipPlugin",qR);var ZR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YR(e,t)}(o,e);var t,n,r,i=XR(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null,enableLocalCache:!1}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getPlayerOptions",value:function(){var e=GR(JR(o.prototype),"getPlayerOptions",this).call(this);return e.inactivityTimeout=0,e}},{key:"getSeekBarName",value:function(){return"CreateClipSeekBar"}},{key:"getAnalyticsPlayerType",value:function(){return"create-clip-player"}}])&&$R(t.prototype,n),r&&$R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT);function eA(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new ZR(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return QP})),n.d(t,"ClickViewCreateClipPlayer",(function(){return eA})),n.d(t,"Player",(function(){return YP}))}])}));
89
+ var t,n;function r(){var t,n=zu(zu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||zu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new qu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var $u in Wu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},Wu.prototype.allowedEvents_)Wu.prototype["on"+$u]=null;var Gu=Fu.registerPlugin||Fu.plugin,Ku=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new Wu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Gu("qualityLevels",Ku),Ku.VERSION="2.0.9";var Yu=n(211),Xu="cv-persisttest",Qu=function(){try{return window.localStorage.setItem(Xu,"cv-player-storage-test"),window.localStorage.removeItem(Xu),!0}catch(e){return!1}},Ju=function(e){return window.localStorage.getItem(e)},Zu=function(e,t){window.localStorage.setItem(e,t)},el=function(e){window.localStorage.removeItem(e)};function tl(e){return(tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rl(e,t){return(rl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function il(e){var t=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(e){return!1}}();return function(){var n,r=al(e);if(t){var i=al(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ol(this,n)}}function ol(e,t){if(t&&("object"===tl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function al(e){return(al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sl=Fu.getPlugin("plugin"),ul="cvplayer-mute",ll=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rl(e,t)}(o,e);var t,n,r,i=il(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Qu()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){e.player.off("volumechange",e.saveVolumeState)}));var t=Ju("cvplayer-volume"),n=Ju(ul);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){Zu("cvplayer-volume",this.player.volume().toString()),Zu(ul,this.player.muted().toString())}}])&&nl(t.prototype,n),r&&nl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sl);function cl(e){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hl(e,t){return(hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dl(e){var t=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(e){return!1}}();return function(){var n,r=ml(e);if(t){var i=ml(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pl(this,n)}}function pl(e,t){if(t&&("object"===cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yl(e)}function yl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",ll);var vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hl(e,t)}(o,e);var t,n,r,i=dl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(yl(t)),t.onFullscreenChange=t.onFullscreenChange.bind(yl(t)),t.player.ready((function(){return t.initialize()})),t):pl(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.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 e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&fl(t.prototype,n),r&&fl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",vl);var gl="\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(352);function bl(e){return(bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wl(e,t){return(wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tl(e){var t=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(e){return!1}}();return function(){var n,r=Cl(e);if(t){var i=Cl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sl(this,n)}}function Sl(e,t){if(t&&("object"===bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return El(e)}function El(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wl(e,t)}(o,e);var t,n,r,i=Tl(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(El(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.one("dispose",(function(){e.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:gl,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&_l(t.prototype,n),r&&_l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function xl(e){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t){return(Pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e){var t=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(e){return!1}}();return function(){var n,r=jl(e);if(t){var i=jl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Al(this,n)}}function Al(e,t){if(t&&("object"===xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jl(e){return(jl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}kl.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",kl);var Il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)}(o,e);var t,n,r,i=Rl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ol(t.prototype,n),r&&Ol(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("openExternallyPlugin",Il);n(353);function Ll(e){return(Ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ml(){return(Ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nl(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vl(e)););return e}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ul(e){var t=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(e){return!1}}();return function(){var n,r=Vl(e);if(t){var i=Vl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fl(this,n)}}function Fl(e,t){if(t&&("object"===Ll(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vl(e){return(Vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}(o,e);var t,n,r,i=Ul(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Ml(Vl(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ml(Vl(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Dl(t.prototype,n),r&&Dl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("component"));function zl(e){return(zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wl(){return(Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xl(e)););return e}function Gl(e,t){return(Gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kl(e){var t=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(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){if(t&&("object"===zl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Hl);var Ql=Fu.getPlugin("plugin"),Jl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gl(e,t)}(o,e);var t,n,r,i=Kl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.player.ready((function(){return t.initialize()})),t}return t=o,(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 e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.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(){Wl(Xl(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&ql(t.prototype,n),r&&ql(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ql);function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("touchControls",Jl);var ec=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Zl(t.prototype,n),r&&Zl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function tc(e){return(tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=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(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){if(t&&("object"===tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options_=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources)}},{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new ec(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&nc(t.prototype,n),r&&nc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function uc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("progressiveFiles",sc);var lc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},cc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return lc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&uc(t.prototype,n),r&&uc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var hc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&fc(t.prototype,n),r&&fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},yc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return pc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})))}}])&&dc(t.prototype,n),r&&dc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Fu.use("*",(function(e){return new yc(e)}));n(354);function mc(e){return(mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(){return(gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bc(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ec(e)););return e}function _c(e,t){return(_c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=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(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tc(this,n)}}function Tc(e,t){if(t&&("object"===mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sc(e)}function Sc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},kc='<?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>',xc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}(o,e);var t,n,r,i=wc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Sc(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return gc(Ec(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(kc,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Cc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&vc(t.prototype,n),r&&vc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Oc(e){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rc(){return(Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ac(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ac(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}function jc(e,t){return(jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ic(e){var t=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(e){return!1}}();return function(){var n,r=Mc(e);if(t){var i=Mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lc(this,n)}}function Lc(e,t){if(t&&("object"===Oc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dc(e)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",xc);var Nc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)}(o,e);var t,n,r,i=Ic(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Dc(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new cc(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(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),Rc(Mc(o.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 e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Nc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Nc(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),hc.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&Pc(t.prototype,n),r&&Pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function Uc(e){return(Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vc(e,t){return(Vc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hc(e){var t=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(e){return!1}}();return function(){var n,r=qc(e);if(t){var i=qc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zc(this,n)}}function zc(e,t){if(t&&("object"===Uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qc(e){return(qc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("localCache",Bc);var Wc=Fu.getPlugin("plugin"),$c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}(o,e);var t,n,r,i=Hc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Qu())return Ju(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Zu("cvplayer-show-subtitles","true"),void Zu("cvplayer-selected-language",n.language)}Zu("cvplayer-show-subtitles","false"),el("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Qu()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Zu("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],l=this.getLanguageParts(u.language),c=l.language,f=l.country;if(c===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Fc(t.prototype,n),r&&Fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Wc);function Gc(e){return(Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yc(e,t){return(Yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xc(e){var t=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(e){return!1}}();return function(){var n,r=Jc(e);if(t){var i=Jc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qc(this,n)}}function Qc(e,t){if(t&&("object"===Gc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jc(e){return(Jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",$c);var Zc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ef=Fu.getPlugin("plugin"),tf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}(o,e);var t,n,r,i=Xc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Qu()&&(r=Ju(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||hc.enableProfileOrNextBest(i,n),Qu()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Zu(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Kc(t.prototype,n),r&&Kc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ef);Fu.registerPlugin("persistQualitySettingsPlugin",tf);n(355);function nf(e){return(nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rf(e){return function(e){if(Array.isArray(e))return of(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return of(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uf(e,t,n){return t&&sf(e.prototype,t),n&&sf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t)}function cf(e,t){return(cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ff(e){var t=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(e){return!1}}();return function(){var n,r=df(e);if(t){var i=df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hf(this,n)}}function hf(e,t){if(t&&("object"===nf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pf=Fu.getComponent("Component"),yf=function(e){lf(n,e);var t=ff(n);function n(e,r){return af(this,n),t.call(this,e,r)}return uf(n,[{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}]),n}(pf),mf=function(e){lf(n,e);var t=ff(n);function n(){var e;return af(this,n),(e=t.apply(this,arguments)).events_=[],e}return uf(n,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new yf(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t;(t=this.events_).push.apply(t,rf(e)),this.update()}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(pf);function vf(e){return(vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _f(e,t){return(_f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wf(e){var t=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(e){return!1}}();return function(){var n,r=Sf(e);if(t){var i=Sf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){if(t&&("object"===vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sf(e){return(Sf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ef=Fu.getPlugin("plugin"),Cf="play",kf="playing",xf="pause",Of="seeking",Pf="seekstart",Rf="seekend",Af="ended",jf="pausedseek",If="timeupdate",Lf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_f(e,t)}(o,e);var t,n,r,i=wf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(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 e,t=this,n=(gf(e={},Cf,(function(){return t.onPlay()})),gf(e,xf,(function(){return t.onPause()})),gf(e,If,(function(){return t.onTimeUpdate()})),gf(e,Of,(function(){return t.onSeeking()})),gf(e,Af,(function(){return t.onEnded()})),gf(e,kf,(function(){return t.onPlaying()})),e),r=Object.keys(n);r.forEach((function(e){return t.player.on(e,n[e])})),this.one("dispose",(function(){r.forEach((function(e){return t.player.off(e,n[e])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,t=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new mf(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Rf),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Cf)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(xf),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Cf)),this.isPlaying&&!this.isSeeking&&this.logEvent(kf)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(jf),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Pf))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Af)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===Pf&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===kf||e===Cf)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===kf||e===xf}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Af||e===jf}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===kf&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}])&&bf(t.prototype,n),r&&bf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ef);Fu.registerPlugin("progressReporterPlugin",Lf);n(356);function Df(e){return(Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bf(e,t){return(Bf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uf(e){var t=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(e){return!1}}();return function(){var n,r=Vf(e);if(t){var i=Vf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ff(this,n)}}function Ff(e,t){if(t&&("object"===Df(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vf(e){return(Vf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bf(e,t)}(o,e);var t,n,r,i=Uf(o);function o(){return Mf(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Nf(t.prototype,n),r&&Nf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component")),zf=["top","left","right","bottom"],qf={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(357);function Wf(e){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kf(e,t,n){return t&&Gf(e.prototype,t),n&&Gf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yf(){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Xf(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Xf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=th(e)););return e}function Qf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jf(e,t)}function Jf(e,t){return(Jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zf(e){var t=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(e){return!1}}();return function(){var n,r=th(e);if(t){var i=th(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eh(this,n)}}function eh(e,t){if(t&&("object"===Wf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nh=Fu.getComponent("Component"),rh=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Kf(n,[{key:"createEl",value:function(){return Yf(th(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(nh),ih=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).addChildren(),i}return Kf(n,[{key:"addChildren",value:function(){var e=this;zf.forEach((function(t){e.addChild(new rh(e.player_,{side:t}))}))}}]),n}(nh);function oh(e){return(oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sh(){return(sh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=uh(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function uh(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hh(e)););return e}function lh(e,t){return(lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ch(e){var t=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(e){return!1}}();return function(){var n,r=hh(e);if(t){var i=hh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fh(this,n)}}function fh(e,t){if(t&&("object"===oh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hh(e){return(hh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lh(e,t)}(o,e);var t,n,r,i=ch(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var t=this;sh(hh(o.prototype),"handleClick",this).call(this,e),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&ah(t.prototype,n),r&&ah(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function ph(e){return(ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mh(e,t){return(mh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vh(e){var t=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(e){return!1}}();return function(){var n,r=bh(e);if(t){var i=bh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gh(this,n)}}function gh(e,t){if(t&&("object"===ph(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bh(e){return(bh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mh(e,t)}(o,e);var t,n,r,i=vh(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&yh(t.prototype,n),r&&yh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function wh(e){return(wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eh(){return(Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ch(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ch(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ph(e)););return e}function kh(e,t){return(kh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xh(e){var t=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(e){return!1}}();return function(){var n,r=Ph(e);if(t){var i=Ph(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oh(this,n)}}function Oh(e,t){if(t&&("object"===wh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ph(e){return(Ph=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rh=Fu.getComponent("MenuButton"),Ah=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kh(e,t)}(o,e);var t,n,r,i=xh(o);function o(){var e;return Th(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new dh(this.player_,{label:"Video Controls"})];return zf.forEach((function(r){n.push(new _h(e.player_,{side:r,label:qf[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Eh(Ph(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return qf[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Rh.prototype.handleClick.apply(this)}}])&&Sh(t.prototype,n),r&&Sh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Rh);n(358);function jh(e){return(jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ih(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lh(e,t){return(Lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=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(e){return!1}}();return function(){var n,r=Nh(e);if(t){var i=Nh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mh(this,n)}}function Mh(e,t){if(t&&("object"===jh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nh(e){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bh="cv-whiteboard-side",Uh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}(o,e);var t,n,r,i=Dh(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Qu()){var e=Ju(Bh);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Hf(this.player);this.button=new Ah(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new ih(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Qu()&&Zu(Bh,e),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"),Fu.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)),Fu.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Ih(t.prototype,n),r&&Ih(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("whiteboardModePlugin",Uh);n(359);var Fh=n(106),Vh=n.n(Fh),Hh=(n(360),n(362),n(135)),zh=n.n(Hh),qh=n(136),Wh=n.n(qh),$h=n(212),Gh=n.n($h),Kh=n(213),Yh=(n(364),null),Xh=null;function Qh(){if(null===Yh){if("undefined"==typeof document)return Yh=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Yh=n}return Yh}Vh.a&&window.addEventListener("resize",(function(){Xh!==window.devicePixelRatio&&(Xh=window.devicePixelRatio,Yh=null)}));var Jh=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Zh(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function ed(e){return e&&e.ownerDocument?e.ownerDocument:document}var td=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Zh(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=ed(r.el),n=Zh(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=zh()(this.recalculate.bind(this),64),this.onMouseMove=zh()(this.onMouseMove.bind(this),64),this.hideScrollbars=Wh()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Wh()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Gh()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=ed(e),r=Zh(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Vh.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||Kh.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Zh(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=ed(this.el),r=Zh(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Zh(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Qh()}catch(e){return Qh()}},t.removeListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();td.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},td.instances=new WeakMap,td.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))}))},td.removeObserver=function(){this.globalObserver.disconnect()},td.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(td.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},td.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!td.instances.has(e)&&new td(e,Jh(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?td.instances.has(e)&&td.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){td.instances.has(e)&&td.instances.get(e).unMount()})))}))}))},td.getOptions=Jh,Vh.a&&td.initHtmlApi();var nd=td;function rd(e){return(rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function od(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ad(){return(ad="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=sd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function sd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fd(e)););return e}function ud(e,t){return(ud=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ld(e){var t=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(e){return!1}}();return function(){var n,r=fd(e);if(t){var i=fd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cd(this,n)}}function cd(e,t){if(t&&("object"===rd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fd(e){return(fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hd=Fu.getComponent("Menu"),dd=hd.prototype,pd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ud(e,t)}(o,e);var t,n,r,i=ld(o);function o(){return id(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){var e=ad(fd(o.prototype),"createEl",this).call(this);return this.simpleBar=new nd(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():ad(fd(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ad(fd(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(e){ad(fd(o.prototype),"addItem",this).call(this,e),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){ad(fd(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||dd.handleBlur.call(this,e)}}])&&od(t.prototype,n),r&&od(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(hd);function yd(e){return(yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function md(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gd(e,t){return(gd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bd(e){var t=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(e){return!1}}();return function(){var n,r=wd(e);if(t){var i=wd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _d(this,n)}}function _d(e,t){if(t&&("object"===yd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wd(e){return(wd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}hd.prototype=pd.prototype,Fu.registerComponent("Menu",pd);var Td=Fu.getComponent("Component"),Sd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gd(e,t)}(o,e);var t,n,r,i=bd(o);function o(){return md(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new pd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new Td(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&vd(t.prototype,n),r&&vd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",Sd);n(365);function Ed(e){return(Ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xd(){return(xd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Od(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Od(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jd(e)););return e}function Pd(e,t){return(Pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e){var t=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(e){return!1}}();return function(){var n,r=jd(e);if(t){var i=jd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ad(this,n)}}function Ad(e,t){if(t&&("object"===Ed(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jd(e){return(jd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Id=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pd(e,t)}(o,e);var t,n,r,i=Rd(o);function o(){return Cd(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xd(jd(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return xd(jd(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&kd(t.prototype,n),r&&kd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Id.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",Id);n(366);function Ld(e){return(Ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nd(e,t,n){return t&&Md(e.prototype,t),n&&Md(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bd(){return(Bd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ud(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ud(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qd(e)););return e}function Fd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vd(e,t)}function Vd(e,t){return(Vd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hd(e){var t=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(e){return!1}}();return function(){var n,r=qd(e);if(t){var i=qd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}function zd(e,t){if(t&&("object"===Ld(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qd(e){return(qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wd=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"handleClick",value:function(e){var t=this;Bd(qd(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Bd(qd(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=Fu.dom.createEl("span",{innerHTML:o});var s=Bd(qd(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""),innerHTML:a},r);return s.appendChild(this.valueHolder_),s}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(Fu.getComponent("MenuItem")),$d=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Bd(qd(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Bd(qd(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),Bd(qd(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new Wd(this.player_,{item:i})))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){Bd(qd(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}]),n}(Fu.getComponent("MenuButton"));function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(){return(Kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Yd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Yd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rp(e)););return e}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}function ep(e,t){return(ep=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tp(e){var t=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(e){return!1}}();return function(){var n,r=rp(e);if(t){var i=rp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return np(this,n)}}function np(e,t){if(t&&("object"===Gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rp(e){return(rp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",$d);var ip=Fu.getComponent("MenuItem"),op=Fu.getComponent("MenuButton"),ap=["large","medium","small"],sp=function(e){Zd(n,e);var t=tp(n);function n(e,r){return Xd(this,n),t.call(this,e,r)}return Jd(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(ip),up=function(e){Zd(n,e);var t=tp(n);function n(e,r){var i;return Xd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return Jd(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new dh(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return ap.map((function(t){r.push(new sp(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Kd(rp(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(){op.prototype.handleClick.apply(this)}}]),n}(op);function lp(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}Fu.registerComponent("SubtitleSizeButton",up);var cp=function(e,t,n,r){var i=function(e){lp(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?lp(a,t,n,r):(o.addEventListener("addtrack",i),e.one("dispose",(function(){o.removeEventListener("addtrack",i)})))},fp=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function hp(e){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pp(e,t){return(pp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yp(e){var t=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(e){return!1}}();return function(){var n,r=vp(e);if(t){var i=vp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mp(this,n)}}function mp(e,t){if(t&&("object"===hp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vp(e){return(vp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pp(e,t)}(o,e);var t,n,r,i=yp(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&dp(t.prototype,n),r&&dp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wp(){return(wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xp(e)););return e}function Sp(e,t){return(Sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ep(e){var t=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(e){return!1}}();return function(){var n,r=xp(e);if(t){var i=xp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cp(this,n)}}function Cp(e,t){if(t&&("object"===bp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kp(e)}function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xp(e){return(xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Op=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}(o,e);var t,n,r,i=Ep(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(l,t)};return s.cancel=a,s}(n.onChange,100,!1,kp(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return wp(xp(o.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(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&_p(t.prototype,n),r&&_p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(367);function Pp(e){return(Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ap(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jp(e,t,n){return t&&Ap(e.prototype,t),n&&Ap(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ip(){return(Ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Lp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Lp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fp(e)););return e}function Dp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mp(e,t)}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Np(e){var t=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(e){return!1}}();return function(){var n,r=Fp(e);if(t){var i=Fp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(e,t){if(t&&("object"===Pp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Up(e)}function Up(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fp(e){return(Fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vp=Fu.getComponent("MenuItem"),Hp=Fu.getComponent("MenuButton"),zp=function(e){Dp(n,e);var t=Np(n);function n(){return Rp(this,n),t.apply(this,arguments)}return jp(n,[{key:"createEl",value:function(e,t,r){return Ip(Fp(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(Vp),qp=function(e){Dp(n,e);var t=Np(n);function n(e,r){var i;return Rp(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(Up(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return jp(n,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=fp(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new Op(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new gp(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new zp(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=fp(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Ip(Fp(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Ip(Fp(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Ip(Fp(n.prototype),"pressButton",this).call(this);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Hp.prototype.handleClick.apply(this)}}]),n}(Hp);Fu.registerComponent("subtitleSearchButton",qp);n(368);function Wp(e){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $p(){return($p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Gp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Gp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ty(e)););return e}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xp(e,t,n){return t&&Yp(e.prototype,t),n&&Yp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jp(e,t)}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zp(e){var t=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(e){return!1}}();return function(){var n,r=ty(e);if(t){var i=ty(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ey(this,n)}}function ey(e,t){if(t&&("object"===Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ty(e){return(ty=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ny=Fu.getComponent("MenuItem"),ry=Fu.getComponent("MenuButton"),iy=[{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"}],oy=function(e){Qp(n,e);var t=Zp(n);function n(e,r){return Kp(this,n),t.call(this,e,r)}return Xp(n,[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</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}(ny),ay=function(e){Qp(n,e);var t=Zp(n);function n(){var e;return Kp(this,n),(e=t.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Xp(n,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new dh(this.player_,{label:"Keyboard Shortcuts"})),iy.forEach((function(n){t.push(new oy(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat($p(ty(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ry.prototype.handleClick.apply(this)}}]),n}(ry);Fu.registerComponent("KeyboardShortcutsButton",ay);n(369),n(370);function sy(e){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ly(){return(ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=cy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function cy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yy(e)););return e}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hy(e){var t=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(e){return!1}}();return function(){var n,r=yy(e);if(t){var i=yy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dy(this,n)}}function dy(e,t){if(t&&("object"===sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return py(e)}function py(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yy(e){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var my=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fy(e,t)}(o,e);var t,n,r,i=hy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(py(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(e.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(ly(yy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ly(yy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&uy(t.prototype,n),r&&uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function vy(e){return(vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _y(e,t){return(_y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wy(e){var t=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(e){return!1}}();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(e,t){if(t&&("object"===vy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sy(e){return(Sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}my.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",my);var Ey=Fu.getComponent("SeekBar"),Cy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(o,e);var t,n,r,i=wy(o);function o(){return gy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleMouseDown",value:function(e){Ey.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(e){var t=this;Ey.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&by(t.prototype,n),r&&by(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ey);function ky(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}Fu.registerComponent("SeekBar",Cy);n(371);function xy(e){return(xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Py(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ry(){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ay(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ay(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dy(e)););return e}function jy(e,t){return(jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iy(e){var t=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(e){return!1}}();return function(){var n,r=Dy(e);if(t){var i=Dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(e,t){if(t&&("object"===xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var My=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jy(e,t)}(o,e);var t,n,r,i=Iy(o);function o(){return Oy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ry(Dy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ry(Dy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(ky(e.player_))}))}}])&&Py(t.prototype,n),r&&Py(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Ny(e){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fy(){return(Fy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Vy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Vy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wy(e)););return e}function Hy(e,t){return(Hy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zy(e){var t=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(e){return!1}}();return function(){var n,r=Wy(e);if(t){var i=Wy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qy(this,n)}}function qy(e,t){if(t&&("object"===Ny(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wy(e){return(Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hy(e,t)}(o,e);var t,n,r,i=zy(o);function o(){return By(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Fy(Wy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Fy(Wy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Uy(t.prototype,n),r&&Uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Gy(e){return(Gy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xy(){return(Xy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Qy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Qy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tm(e)););return e}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zy(e){var t=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(e){return!1}}();return function(){var n,r=tm(e);if(t){var i=tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return em(this,n)}}function em(e,t){if(t&&("object"===Gy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jy(e,t)}(o,e);var t,n,r,i=Zy(o);function o(){return Ky(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Xy(tm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Xy(tm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Yy(t.prototype,n),r&&Yy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function rm(e){return(rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function im(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function om(){return(om="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=am(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function am(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cm(e)););return e}function sm(e,t){return(sm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function um(e){var t=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(e){return!1}}();return function(){var n,r=cm(e);if(t){var i=cm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lm(this,n)}}function lm(e,t){if(t&&("object"===rm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cm(e){return(cm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sm(e,t)}(o,e);var t,n,r,i=um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new nm(n.player_),n.addChild(n.playProgress),n.loadProgress=new $y(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(om(cm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return om(cm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&im(t.prototype,n),r&&im(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function hm(e){return(hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pm(){return(pm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ym(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ym(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_m(e)););return e}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vm(e){var t=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(e){return!1}}();return function(){var n,r=_m(e);if(t){var i=_m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gm(this,n)}}function gm(e,t){if(t&&("object"===hm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bm(e)}function bm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mm(e,t)}(o,e);var t,n,r,i=vm(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(bm(n)),n.createChapterItems=n.createChapterItems.bind(bm(n)),n.updateBuffered=n.updateBuffered.bind(bm(n)),cp(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),pm(_m(o.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return Fu.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 e=pm(_m(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_=e);var r=new My(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var l=new fm(this.player_,{startTime:a,endTime:s});if(r.addChild(l),u&&s===u)break}else r.addChild(new fm(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&dm(t.prototype,n),r&&dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));wm.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||wm.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",wm);n(372);function Tm(e){return(Tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cm(){return(Cm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=km(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function km(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rm(e)););return e}function xm(e,t){return(xm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Om(e){var t=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(e){return!1}}();return function(){var n,r=Rm(e);if(t){var i=Rm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pm(this,n)}}function Pm(e,t){if(t&&("object"===Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Rm(e){return(Rm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Am=Fu.getComponent("ProgressControl"),jm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xm(e,t)}(o,e);var t,n,r,i=Om(o);function o(){var e;return Sm(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),Cm(Rm(o.prototype),"getChild",this).call(this,e)}}])&&Em(t.prototype,n),r&&Em(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Am);function Im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}jm.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",jm);n(373);function Lm(e){return(Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mm(){return(Mm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nm(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vm(e)););return e}function Bm(e,t){return(Bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Um(e){var t=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(e){return!1}}();return function(){var n,r=Vm(e);if(t){var i=Vm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fm(this,n)}}function Fm(e,t){if(t&&("object"===Lm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vm(e){return(Vm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(o,e);var t,n,r,i=Um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasCustomChapterText=!1,cp(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=Mm(Vm(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,Im(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,Fu.dom.textContent(this.chapter_,null!=e?e:"")}}])&&Dm(t.prototype,n),r&&Dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",Hm);n(374);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(){return(Wm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$m(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xm(e)););return e}function Gm(e,t){return(Gm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Km(e){var t=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(e){return!1}}();return function(){var n,r=Xm(e);if(t){var i=Xm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ym(this,n)}}function Ym(e,t){if(t&&("object"===zm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gm(e,t)}(o,e);var t,n,r,i=Km(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Wm(Xm(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,l=s.w,c=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=l+"px",this.el_.style.height=c+"px"}else this.disable()}}}])&&qm(t.prototype,n),r&&qm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Qm.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",Qm);n(375);function Jm(e){return(Jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ev(e,t){return(ev=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tv(e){var t=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(e){return!1}}();return function(){var n,r=iv(e);if(t){var i=iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nv(this,n)}}function nv(e,t){if(t&&("object"===Jm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rv(e)}function rv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iv(e){return(iv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ov=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ev(e,t)}(o,e);var t,n,r,i=tv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),cp(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(rv(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"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")}}])&&Zm(t.prototype,n),r&&Zm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MouseTimeDisplay"));ov.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",ov);n(376);function av(e){return(av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uv(){return(uv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dv(e)););return e}function cv(e,t){return(cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=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(e){return!1}}();return function(){var n,r=dv(e);if(t){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){if(t&&("object"===av(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pv=Fu.getComponent("ChaptersTrackMenuItem"),yv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cv(e,t)}(o,e);var t,n,r,i=fv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Qm(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),cp(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&pv.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,uv(dv(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Im(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&sv(t.prototype,n),r&&sv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(pv);n(377);function mv(e){return(mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gv(){return(gv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ev(e)););return e}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wv(e){var t=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(e){return!1}}();return function(){var n,r=Ev(e);if(t){var i=Ev(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tv(this,n)}}function Tv(e,t){if(t&&("object"===mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sv(e)}function Sv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_v(e,t)}(o,e);var t,n,r,i=wv(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Sv(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 t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(gv(Ev(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(gv(Ev(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new yv(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;gv(Ev(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){gv(Ev(o.prototype),"update",this).call(this,e)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&vv(t.prototype,n),r&&vv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ChaptersButton"));function kv(e){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pv(){return(Pv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Rv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Rv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Lv(e)););return e}function Av(e,t){return(Av=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=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(e){return!1}}();return function(){var n,r=Lv(e);if(t){var i=Lv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Iv(this,n)}}function Iv(e,t){if(t&&("object"===kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Lv(e){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",Cv);var Dv=Fu.getComponent("OffTextTrackMenuItem"),Mv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Av(e,t)}(o,e);var t,n,r,i=jv(o);function o(){return xv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){Dv.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,t,n){return Pv(Lv(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},t),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Ov(t.prototype,n),r&&Ov(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Dv);function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fv(e,t){return(Fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vv(e){var t=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(e){return!1}}();return function(){var n,r=zv(e);if(t){var i=zv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hv(this,n)}}function Hv(e,t){if(t&&("object"===Nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("OffTextTrackMenuItem",Mv);var qv=Fu.getComponent("TextTrackButton"),Wv=Fu.getComponent("TextTrackMenuItem"),$v=Fu.getComponent("OffTextTrackMenuItem"),Gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fv(e,t)}(o,e);var t,n,r,i=Vv(o);function o(){return Bv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wv;this.label_&&(e="".concat(this.label_," off")),t.push(new $v(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return t}}])&&Uv(t.prototype,n),r&&Uv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qv);function Kv(e){return(Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=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(e){return!1}}();return function(){var n,r=eg(e);if(t){var i=eg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zv(this,n)}}function Zv(e,t){if(t&&("object"===Kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function eg(e){return(eg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TextTrackButton",Gv);var tg=Fu.getComponent("SubsCapsMenuItem"),ng=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qv(e,t)}(o,e);var t,n,r,i=Jv(o);function o(){return Yv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){tg.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Xv(t.prototype,n),r&&Xv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(tg);function rg(e){return(rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function og(e,t){return(og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ag(e){var t=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(e){return!1}}();return function(){var n,r=ug(e);if(t){var i=ug(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sg(this,n)}}function sg(e,t){if(t&&("object"===rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ug(e){return(ug=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&og(e,t)}(o,e);var t,n,r,i=ag(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-divider-after-menu-item"),t.addClass("cv-subtitle-size-menu-item"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&ig(t.prototype,n),r&&ig(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));function cg(e){return(cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hg(e,t){return(hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dg(e){var t=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(e){return!1}}();return function(){var n,r=mg(e);if(t){var i=mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(e,t){if(t&&("object"===cg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yg(e)}function yg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mg(e){return(mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}(o,e);var t,n,r,i=dg(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-subtitle-search-menu-item"),t.controlText(", opens subtitle search"),t.toggleEnabled=t.toggleEnabled.bind(yg(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleEnabled),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleEnabled)})),t.toggleEnabled(),t}return t=o,(n=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=fp(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=fp(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&fg(t.prototype,n),r&&fg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));n(378);function gg(e){return(gg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wg(){return(wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kg(e)););return e}function Sg(e,t){return(Sg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eg(e){var t=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(e){return!1}}();return function(){var n,r=kg(e);if(t){var i=kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cg(this,n)}}function Cg(e,t){if(t&&("object"===gg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kg(e){return(kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xg=Fu.getComponent("TextTrackButton"),Og=Fu.getComponent("SubsCapsButton"),Pg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sg(e,t)}(o,e);var t,n,r,i=Eg(o);function o(){var e;return bg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(wg(kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[new vg(this.player_),new lg(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,xg.prototype.createItems.call(this,e,ng)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Og.prototype.handleClick.apply(this)}}])&&_g(t.prototype,n),r&&_g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Og);function Rg(e){return(Rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jg(e,t){return(jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ig(e){var t=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(e){return!1}}();return function(){var n,r=Mg(e);if(t){var i=Mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lg(this,n)}}function Lg(e,t){if(t&&("object"===Rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dg(e)}function Dg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",Pg);var Ng=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bg="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(kc,"</span>"),Ug=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(o,e);var t,n,r,i=Ig(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Dg(n));return r.on("change",a),e.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(Dg(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var e;null===(e=n.player_)||void 0===e||e.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return t=o,(n=[{key:"handleLocalCacheChange",value:function(){return Ng(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Bg);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Ag(t.prototype,n),r&&Ag(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(379);function Fg(e){return(Fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hg(){return(Hg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kg(e)););return e}function qg(e,t){return(qg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wg(e){var t=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(e){return!1}}();return function(){var n,r=Kg(e);if(t){var i=Kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $g(this,n)}}function $g(e,t){if(t&&("object"===Fg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gg(e)}function Gg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return(Kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yg={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Xg=Fu.getComponent("MenuButton"),Qg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qg(e,t)}(o,e);var t,n,r,i=Wg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(Gg(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Hg(Kg(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Hg(Kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new dh(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=Yg[r.id];i&&e.push(new Ug(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?Yg[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Xg.prototype.handleClick.apply(this)}}])&&Vg(t.prototype,n),r&&Vg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xg);Fu.registerComponent("QualityButton",Qg);n(380);function Jg(e){return(Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tb(){return(tb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ab(e)););return e}function rb(e,t){return(rb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ib(e){var t=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(e){return!1}}();return function(){var n,r=ab(e);if(t){var i=ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ob(this,n)}}function ob(e,t){if(t&&("object"===Jg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ab(e){return(ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sb=Fu.getComponent("Menu"),ub=Fu.getComponent("MenuButton"),lb=Fu.getComponent("PlaybackRateMenuItem"),cb=Fu.getComponent("PlaybackRateMenuButton"),fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rb(e,t)}(o,e);var t,n,r,i=ib(o);function o(){var e;return Zg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(tb(ab(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new sb(this.player(),{menuButton:this});e.addItem(new dh(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new lb(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=cb.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&eb(t.prototype,n),r&&eb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(cb);function hb(e){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yb(e,t){return(yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mb(e){var t=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(e){return!1}}();return function(){var n,r=gb(e);if(t){var i=gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vb(this,n)}}function vb(e,t){if(t&&("object"===hb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gb(e){return(gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",fb);var bb=Fu.getComponent("TextTrackSettings"),_b={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},wb={small:_b,medium:Object.assign(Object.assign({},_b),{fontPercent:1.5}),large:Object.assign(Object.assign({},_b),{fontPercent:2})},Tb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yb(e,t)}(o,e);var t,n,r,i=mb(o);function o(){return db(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return wb[this.size_]?wb[this.size_]:_b}}])&&pb(t.prototype,n),r&&pb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(bb);Fu.registerComponent("TextTrackSettings",Tb);n(381);function Sb(e){return(Sb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kb(){return(kb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=xb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ab(e)););return e}function Ob(e,t){return(Ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pb(e){var t=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(e){return!1}}();return function(){var n,r=Ab(e);if(t){var i=Ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rb(this,n)}}function Rb(e,t){if(t&&("object"===Sb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ab(e){return(Ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jb=window.navigator&&window.navigator.userAgent||"",Ib=(/iPod/i.test(jb),/Android/i.test(jb),Fu.getComponent("Player")),Lb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ob(e,t)}(o,e);var t,n,r,i=Pb(o);function o(){return Eb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return kb(Ab(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return kb(Ab(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Ib.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Ib.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&Cb(t.prototype,n),r&&Cb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ib);Lb.prototype.options_=Object.assign(Object.assign({},Ib.prototype.options_),{setMaxHeight:!0}),Fu.registerComponent("player",Lb);n(382);function Db(e){return(Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bb(e){var t=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(e){return!1}}();return function(){var n,r=Vb(e);if(t){var i=Vb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){if(t&&("object"===Db(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fb(e)}function Fb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nb(e,t)}(o,e);var t,n,r,i=Bb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(Fb(n)),n.player_.one("firstplay",n.onFirstPlay),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Mb(t.prototype,n),r&&Mb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("PlayPauseFeedback",Hb);n(383);function zb(e){return(zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $b(e,t){return($b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){var t=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(e){return!1}}();return function(){var n,r=Yb(e);if(t){var i=Yb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kb(this,n)}}function Kb(e,t){if(t&&("object"===zb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xb=Fu.getComponent("PlayToggle"),Qb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$b(e,t)}(o,e);var t,n,r,i=Gb(o);function o(){return qb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){var t=this;Xb.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Wb(t.prototype,n),r&&Wb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xb);Fu.registerComponent("PlayToggle",Qb);var Jb;n(384),n(385),n(386),n(387),n(388);function Zb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e){e.paused()?e.play():e.pause()}function t_(e,t){e.currentTime(e.currentTime()+t)}function n_(e,t){e.volume(e.volume()+t)}var r_=(Zb(Jb={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),Zb(Jb,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),Zb(Jb,"k",e_),Zb(Jb,"space",e_),Zb(Jb,"left",(function(e){return t_(e,-5)})),Zb(Jb,"right",(function(e){return t_(e,5)})),Zb(Jb,"j",(function(e){return t_(e,-10)})),Zb(Jb,"l",(function(e){return t_(e,10)})),Zb(Jb,"up",(function(e){return n_(e,.05)})),Zb(Jb,"down",(function(e){return n_(e,-.05)})),Jb);function i_(e){var t=g()(e);r_[t]&&(["space"].includes(t)&&(e.preventDefault(),e.stopPropagation()),r_[t](this,e))}function o_(e){return(o_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s_(e,t){if(t&&("object"===o_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u_(e){var t="function"==typeof Map?new Map:void 0;return(u_=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l_(e,arguments,h_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f_(r,e)})(e)}function l_(e,t,n){return(l_=c_()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f_(i,n.prototype),i}).apply(null,arguments)}function c_(){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(e){return!1}}function f_(e,t){return(f_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h_(e){return(h_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f_(e,t)}(s,e);var t,n,r,i,o,a=(t=s,n=c_(),function(){var e,r=h_(t);if(n){var i=h_(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return s_(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e)).url=t,n}return r=s,i&&a_(r.prototype,i),o&&a_(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(u_(Error));function p_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y_,m_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},v_=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,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(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,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(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return m_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new d_("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&p_(t.prototype,n),r&&p_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());function g_(e){return(g_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&__(e,t)}function __(e,t){return(__=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w_(e){var t=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(e){return!1}}();return function(){var n,r=S_(e);if(t){var i=S_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T_(this,n)}}function T_(e,t){if(t&&("object"===g_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S_(e){return(S_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k_(e,t,n){return t&&C_(e.prototype,t),n&&C_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(y_||(y_={}));var x_=function(){function e(t){if(E_(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=t.type,this.hasSupport)try{this.storage=window[this.type]}catch(e){}}return k_(e,[{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!!n&&(!this.isExpired(n)||(this.remove(t),!1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}]),e}(),O_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.LocalStorage}))}}]),n}(x_),P_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.SessionStorage}))}}]),n}(x_),R_=O_.Instance,A_=(P_.Instance,"URLSearchParams"in self),j_="Symbol"in self&&"iterator"in Symbol,I_="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),L_="FormData"in self,D_="ArrayBuffer"in self;if(D_)var M_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],N_=ArrayBuffer.isView||function(e){return e&&M_.indexOf(Object.prototype.toString.call(e))>-1};function B_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function F_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return j_&&(t[Symbol.iterator]=function(){return t}),t}function V_(e){this.map={},e instanceof V_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function H_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function z_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function q_(e){var t=new FileReader,n=z_(t);return t.readAsArrayBuffer(e),n}function W_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function $_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:I_&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L_&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:A_&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():D_&&I_&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=W_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):D_&&(ArrayBuffer.prototype.isPrototypeOf(e)||N_(e))?this._bodyArrayBuffer=W_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A_&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_&&(this.blob=function(){var e=H_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?H_(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(q_)}),this.text=function(){var e,t,n,r=H_(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=z_(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L_&&(this.formData=function(){return this.text().then(Y_)}),this.json=function(){return this.text().then(JSON.parse)},this}V_.prototype.append=function(e,t){e=B_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},V_.prototype.delete=function(e){delete this.map[B_(e)]},V_.prototype.get=function(e){return e=B_(e),this.has(e)?this.map[e]:null},V_.prototype.has=function(e){return this.map.hasOwnProperty(B_(e))},V_.prototype.set=function(e,t){this.map[B_(e)]=U_(t)},V_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},V_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),F_(e)},V_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),F_(e)},V_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),F_(e)},j_&&(V_.prototype[Symbol.iterator]=V_.prototype.entries);var G_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function K_(e,t){var n,r,i=(t=t||{}).body;if(e instanceof K_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new V_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new V_(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),G_.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Y_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function X_(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new V_(t.headers),this.url=t.url||"",this._initBody(e)}K_.prototype.clone=function(){return new K_(this,{body:this._bodyInit})},$_.call(K_.prototype),$_.call(X_.prototype),X_.prototype.clone=function(){return new X_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new V_(this.headers),url:this.url})},X_.error=function(){var e=new X_(null,{status:0,statusText:""});return e.type="error",e};var Q_=[301,302,303,307,308];X_.redirect=function(e,t){if(-1===Q_.indexOf(t))throw new RangeError("Invalid status code");return new X_(null,{status:t,headers:{location:e}})};var J_=self.DOMException;try{new J_}catch(e){(J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function Z_(e,t){return new Promise((function(n,r){var i=new K_(e,t);if(i.signal&&i.signal.aborted)return r(new J_("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new V_,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new X_(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(I_?o.responseType="blob":D_&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Z_.polyfill=!0,self.fetch||(self.fetch=Z_,self.Headers=V_,self.Request=K_,self.Response=X_);var ew=n(214),tw=n.n(ew),nw=n(215);function rw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ow={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function aw(e,t,n){var r=rw(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function sw(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var uw=function(){var e=window.navigator.userAgent;return ow.android.test(e)?sw("Android",ow.androidVersion,e):ow.iphone.test(e)||ow.ipad.test(e)?sw("iOS",ow.iosVersion,e):ow.linux.test(e)?sw("Linux",null,e):ow.unix.test(e)?sw("Unix",null,e):ow.mac.test(e)?sw("Macintosh",ow.osxVersion,e):ow.windows.test(e)?function(e,t){var n={name:e,version:null};return ow.win2000.test(t)&&(n.version="2000"),ow.winXP.test(t)&&(n.version="XP"),ow.winVista.test(t)&&(n.version="Vista"),ow.win7.test(t)&&(n.version="7"),ow.win8.test(t)&&(n.version="8"),ow.win81.test(t)&&(n.version="8.1"),ow.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):ow.blackberry.test(e)?sw("BlackBerry",ow.blackberryVersion,e):ow.windowsPhone.test(e)?sw("Windows Phone",ow.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},lw=function(){var e=window.navigator.userAgent;return ow.chrome.test(e)?aw("Chrome",ow.generalVersion,e):ow.firefox.test(e)?aw("Firefox",ow.generalVersion,e):ow.safari.test(e)?aw("Safari",ow.generalVersion,e):ow.ie.test(e)?aw("Internet Explorer",ow.ieVersion,e):ow.edge.test(e)?aw("Edge",ow.edgeVersion,e):ow.opera.test(e)?aw("Opera",ow.operaVersion,e):{name:"Unknown",version:"Unknown"}};function cw(e){return(cw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fw,hw=function(e){var t=cw(e);return"function"===t||"object"===t&&!!e},dw=function(e){return"function"==typeof e},pw=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},yw=n(97);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(fw||(fw={}));var mw={CvApSoutheast1:{systemName:fw.CvApSoutheast1},CvApSoutheast2:{systemName:fw.CvApSoutheast2},CvEuWest1:{systemName:fw.CvEuWest1},CvNaWest1:{systemName:fw.CvNaWest1}};function vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},bw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!dw(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!dw(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=pw(n,"/v1/ingest"),Array.isArray(e)&&(o=pw(o,"/bulk")),t.prev=7,t.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=t.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),this.logError(t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(e){var t=new tw.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===fw.CvEuWest1?6:t.t0===fw.CvApSoutheast2?7:t.t0===fw.CvNaWest1?8:(t.t0,fw.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){"string"!=typeof e.type&&this.logError(new Error("Event type is required."),!0),hw(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,u=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){s.includes(e)&&u.logError(new Error("".concat(e," is a reserved key.")),!0)})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return dw(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return gw(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||yw.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t10});case 22:n.prev=22,n.t11=n.catch(0),this.logError(n.t11);case 25:case"end":return n.stop()}}),n,this,[[0,22]])})))}},{key:"getRegion",value:function(){return gw(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.regionName,e.prev=1,e.next=4,this.options.getUser();case 4:(null==(n=e.sent)?void 0:n.instanceRegion)&&(t=n.instanceRegion),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logError(e.t0);case 11:return t||this.logError(new Error("RegionName is not set."),!0),e.abrupt("return",this.getRegionByName(t.toLowerCase()));case 13:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:lw(),os:uw(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:nw.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(mw).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}},{key:"logError",value:function(e,t){if(this.options.logError&&this.options.logError(e),t)throw e}}])&&vw(t.prototype,n),r&&vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_w=n(2),ww=function(){return!0},Tw=function(){return!1};var Sw,Ew,Cw,kw,xw=function(e){return e},Ow={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===_w.EntityType.Video)return Ow.formatVideoUpload(e,t);if(n===_w.EntityType.Resource||n===_w.EntityType.Subtitle)return Ow.formatResourceUpload(e);if(n===_w.EntityType.Banner||n===_w.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===_w.WorkflowPhase.Start?Ow.getStartVideoUploadData(e):n===_w.WorkflowPhase.Discard?Ow.getDiscardVideoUploadData(e):n===_w.WorkflowPhase.Complete?Ow.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return hw(e.metadata)&&(t.type=e.metadata.type),t}},Pw=function(e){var t,n,r,i,o={id:e.id};return(null===(t=e.video)||void 0===t?void 0:t.id)&&(o.video={id:e.video.id}),(null===(n=e.clip)||void 0===n?void 0:n.id)&&(o.clip={id:e.clip.id},(null===(r=e.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=e.clip.video)||void 0===i?void 0:i.id})),void 0!==e.shareCount&&(o.shareCount=e.shareCount),e.embedDetails&&(o.embedDetails=o.embedDetails),o};function Rw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aw=(Rw(Sw={},_w.UserAction.Navigate,Tw),Rw(Sw,_w.UserAction.Click,ww),Rw(Sw,_w.UserAction.Search,ww),Rw(Sw,_w.UserAction.InstantSearch,ww),Rw(Sw,_w.UserAction.Play,ww),Rw(Sw,_w.UserAction.Stream,ww),Rw(Sw,_w.UserAction.WebPlayerStream,ww),Rw(Sw,_w.UserAction.StreamProgress,ww),Rw(Sw,_w.UserAction.Rename,ww),Rw(Sw,_w.UserAction.Move,ww),Rw(Sw,_w.UserAction.Create,ww),Rw(Sw,_w.UserAction.Delete,ww),Rw(Sw,_w.UserAction.Associate,ww),Rw(Sw,_w.UserAction.Dissociate,ww),Rw(Sw,_w.UserAction.Filter,ww),Rw(Sw,_w.UserAction.Sort,ww),Rw(Sw,_w.UserAction.Approve,ww),Rw(Sw,_w.UserAction.Reject,ww),Rw(Sw,_w.UserAction.Disable,ww),Rw(Sw,_w.UserAction.Upload,ww),Rw(Sw,_w.UserAction.Download,Tw),Rw(Sw,_w.UserAction.SetAccess,ww),Rw(Sw,_w.UserAction.AddToLocalCache,Tw),Rw(Sw,_w.UserAction.Share,ww),Rw(Sw,_w.UserAction.Unshare,ww),Rw(Sw,_w.UserAction.Edit,ww),Rw(Sw,_w.UserAction.Suggest,ww),Rw(Sw,_w.UserAction.Favourite,ww),Rw(Sw,_w.UserAction.ResolveWarning,ww),Rw(Sw,_w.UserAction.DismissWarning,ww),Rw(Sw,_w.UserAction.EditAssoc,ww),Rw(Sw,_w.UserAction.Follow,ww),Rw(Sw,_w.UserAction.Print,ww),Rw(Sw,_w.UserAction.Copy,ww),Rw(Sw,_w.UserAction.Activate,ww),Rw(Sw,_w.UserAction.VerifyEmail,ww),Rw(Sw,_w.UserAction.ChangePassword,ww),Rw(Sw,_w.UserAction.Export,ww),Rw(Sw,_w.UserAction.SendEmail,ww),Rw(Sw,_w.UserAction.Publish,ww),Rw(Sw,_w.UserAction.Answer,ww),Rw(Sw,_w.UserAction.Complete,ww),Rw(Sw,_w.UserAction.Archive,ww),Sw),jw=(Rw(Ew={},_w.UserAction.Search,xw),Rw(Ew,_w.UserAction.InstantSearch,xw),Rw(Ew,_w.UserAction.Play,xw),Rw(Ew,_w.UserAction.Stream,xw),Rw(Ew,_w.UserAction.StreamProgress,xw),Rw(Ew,_w.UserAction.Click,xw),Rw(Ew,_w.UserAction.Filter,xw),Rw(Ew,_w.UserAction.Sort,xw),Rw(Ew,_w.UserAction.SetAccess,xw),Rw(Ew,_w.UserAction.Approve,xw),Rw(Ew,_w.UserAction.Reject,xw),Rw(Ew,_w.UserAction.Create,xw),Rw(Ew,_w.UserAction.Delete,xw),Rw(Ew,_w.UserAction.Rename,xw),Rw(Ew,_w.UserAction.Move,xw),Rw(Ew,_w.UserAction.Edit,xw),Rw(Ew,_w.UserAction.Share,Pw),Rw(Ew,_w.UserAction.Disable,xw),Rw(Ew,_w.UserAction.Suggest,xw),Rw(Ew,_w.UserAction.Upload,Ow.getUploadData),Rw(Ew,_w.UserAction.ResolveWarning,xw),Rw(Ew,_w.UserAction.DismissWarning,xw),Rw(Ew,_w.UserAction.Follow,xw),Rw(Ew,_w.UserAction.Print,xw),Rw(Ew,_w.UserAction.Copy,xw),Ew),Iw=(Rw(Cw={},_w.UserAction.Search,(function(){return"search"})),Rw(Cw,_w.UserAction.InstantSearch,(function(){return"search"})),Rw(Cw,_w.UserAction.Filter,(function(){return"filter"})),Rw(Cw,_w.UserAction.Stream,(function(){return _w.EntityType.Video})),Cw),Lw={user:"target_user"},Dw=(Rw(kw={},_w.UserAction.StreamProgress,!0),Rw(kw,_w.UserAction.WebPlayerStream,!0),kw),Mw={shouldLog:function(e){return!!Aw[e.type](e)},formatData:function(e){var t=jw[e.type],n=dw(t)?t(e.data,e):e.data;if(Dw[e.type])return n;var r=e.actionContext.entity;return dw(Iw[e.type])&&(r=Iw[e.type](e)),Lw[r]&&(r=Lw[r]),Rw({},r,n)}};function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Bw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Uw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);R_.cacheExists(e)||(this.collectionApiClient.log({type:_w.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:_w.EventVersion.V2}),R_&&R_.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:_w.UserAction.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:_w.EventVersion.V1}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:{productArea:t.productArea,location:this.getLocationContext(),entity:t.entity,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:_w.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===_w.EntityType.Interactive?e.interactive={id:+this.options.mediaId}:t===_w.EntityType.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new bw({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Mw.shouldLog,formatData:Mw.formatData})}},{key:"getCurrentUser",value:function(){return Bw(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?_w.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return _w.EntityType.Video;case"MasterInteractive":return _w.EntityType.Interactive;case"MasterClip":return _w.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return _w.LocationContext.Player;case"interactive-player":return _w.LocationContext.InteractivePlayer;case"create-clip-player":return _w.LocationContext.CreateClipPlayer}}}])&&Nw(t.prototype,n),r&&Nw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fw(e){return(Fw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hw(){return(Hw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gw(e)););return e}function qw(e,t){return(qw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ww(e){var t=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(e){return!1}}();return function(){var n,r=Gw(e);if(t){var i=Gw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $w(this,n)}}function $w(e,t){if(t&&("object"===Fw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Gw(e){return(Gw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qw(e,t)}(o,e);var t,n,r,i=Ww(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&Vw(t.prototype,n),r&&Vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Yw(e){return(Yw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qw(){return(Qw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Jw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Jw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nT(e)););return e}function Zw(e,t){return(Zw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eT(e){var t=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(e){return!1}}();return function(){var n,r=nT(e);if(t){var i=nT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tT(this,n)}}function tT(e,t){if(t&&("object"===Yw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nT(e){return(nT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}(o,e);var t,n,r,i=eT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Qw(nT(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=Qw(nT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){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"}}}])&&Xw(t.prototype,n),r&&Xw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function iT(e){return(iT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aT(e,t){return(aT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sT(e){var t=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(e){return!1}}();return function(){var n,r=lT(e);if(t){var i=lT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uT(this,n)}}function uT(e,t){if(t&&("object"===iT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lT(e){return(lT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aT(e,t)}(o,e);var t,n,r,i=sT(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Kw(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new rT(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&oT(t.prototype,n),r&&oT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(389);function fT(e){return(fT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dT(){return(dT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=pT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function pT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gT(e)););return e}function yT(e,t){return(yT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mT(e){var t=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(e){return!1}}();return function(){var n,r=gT(e);if(t){var i=gT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vT(this,n)}}function vT(e,t){if(t&&("object"===fT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gT(e){return(gT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yT(e,t)}(o,e);var t,n,r,i=mT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new cT(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(gl,"</div>")),dT(gT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&hT(t.prototype,n),r&&hT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function _T(e){return function(e){if(Array.isArray(e))return wT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return wT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ST,ET=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},CT=Fu.getComponent("Player"),kT=450,xT=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),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(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var e=CT.prototype.options_.children;return e=e.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(_T(e),["collapserator","playPauseFeedback"]),userActions:{hotkeys:i_},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio}}},{key:"fetch",value:function(){var e,t,n;return ET(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.options.fetch,void 0===this.options.fetch&&(i=function(e){var t="".concat(s.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return v_.get(t)}),this.options.viewKey){r.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return r.next=6,i(this.options.viewKey);case 6:if(o=r.sent){r.next=9;break}throw new Error("Error fetching playback object");case 9:o.chapters.list.length>0&&(a=this.player.addTextTrack("chapters"),o.chapters.list.forEach((function(e){a.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),a.trigger({type:"loadeddata",target:a})),this.player.localCache({localCacheAddresses:o.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.progressiveFiles({sources:o.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),o.subtitles.list.length>0&&(o.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&s.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=o.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=o.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault})),o.posterUrl&&this.player.poster(o.posterUrl),this.options.autoplay||this.setupSplash(o),this.additionalSetup(o),this.options.autoplay&&this.player.ready((function(){s.player.play().catch((function(){s.setupSplash(o)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!ST&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");v_.get(t).then((function(t){ST=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(t=e.settings)||void 0===t?void 0:t.playbackProfile,playbackProfileLocalCache:null===(n=e.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin();var o=this.options.enableLocalCache&&!!(null===(r=e.localCacheAddresses)||void 0===r?void 0:r.length);ST?this.setupAnalyticsService(e,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(e,o)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Uw({collectionApiUrls:ST.collectionApi.urls,collectionApiClientId:ST.collectionApi.clientId,productVersion:Yu.a,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||fw.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(e){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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.player.ready(t),this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.one("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new bT(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n),t.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i),this.player.trigger("volumechange")}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s),this.player.trigger("volumechange")}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),c=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?("CreateClipSeekBar"===this.getSeekBarName()&&(d+=22),h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(c,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=kT?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&TT(t.prototype,n),r&&TT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function OT(e){return(OT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function RT(){return(RT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=AT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function AT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=MT(e)););return e}function jT(e,t){return(jT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IT(e){var t=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(e){return!1}}();return function(){var n,r=MT(e);if(t){var i=MT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LT(this,n)}}function LT(e,t){if(t&&("object"===OT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return DT(e)}function DT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MT(e){return(MT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xT.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 NT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jT(e,t)}(o,e);var t,n,r,i=IT(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(t.startTime.toPrecision(4)),n._clipEnd=parseFloat(t.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(DT(n)),n.player.duration=n.duration.bind(DT(n)),n.player.currentTime=n.currentTime.bind(DT(n)),n.player.buffered=n.buffered.bind(DT(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e: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"),RT(MT(o.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 e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&PT(t.prototype,n),r&&PT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",NT);var BT=n(37),UT=n.n(BT);function FT(e){return(FT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zT(e,t,n){return t&&HT(e.prototype,t),n&&HT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(){return(qT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=WT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function WT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=XT(e)););return e}function $T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GT(e,t)}function GT(e,t){return(GT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KT(e){var t=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(e){return!1}}();return function(){var n,r=XT(e);if(t){var i=XT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return YT(this,n)}}function YT(e,t){if(t&&("object"===FT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function XT(e){return(XT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QT=function(e){$T(n,e);var t=KT(n);function n(e,r){return VT(this,n),t.call(this,e,r)}return zT(n,[{key:"dispose",value:function(){UT.a.unmountComponentAtNode(this.el()),qT(XT(n.prototype),"dispose",this).call(this)}}]),n}(Fu.getComponent("Component")),JT={tagName:"div"};function ZT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JT;if(!e)throw new Error("componentCtor is required");var n=function(n){$T(i,n);var r=KT(i);function i(){return VT(this,i),r.apply(this,arguments)}return zT(i,[{key:"createEl",value:function(){var n=Fu.dom.createEl(t.tagName,t.properties,t.attributes);return UT.a.render(e(this.player_,this.options_),n),n}}]),i}(QT);return n}n(393);function eS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nS(e){var t,n=r.useRef(e.player.duration()-e.player.currentTime()),i=eS(r.useState(n.current),2),o=i[0],a=i[1];function s(){var t=e.player.duration()-e.player.currentTime();a(t),t>n.current&&(n.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",s),function(){e.player.off("timeupdate",s)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var u=Math.ceil(o),l=1===u?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",u," ",l,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function rS(e){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oS(){return(oS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=aS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function aS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cS(e)););return e}function sS(e,t){return(sS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uS(e){var t=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(e){return!1}}();return function(){var n,r=cS(e);if(t){var i=cS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lS(this,n)}}function lS(e,t){if(t&&("object"===rS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cS(e){return(cS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("UpNext",ZT((function(e,t){return r.createElement(nS,Object.assign({player:e},t))})));var fS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}(o,e);var t,n,r,i=uS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,Fu.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,Fu.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=oS(cS(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&iS(t.prototype,n),r&&iS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function hS(e){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pS(){return(pS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=yS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function yS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_S(e)););return e}function mS(e,t){return(mS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vS(e){var t=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(e){return!1}}();return function(){var n,r=_S(e);if(t){var i=_S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gS(this,n)}}function gS(e,t){if(t&&("object"===hS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bS(e)}function bS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _S(e){return(_S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("NextVideoMenuItem",fS);var wS=Fu.getPlugin("plugin"),TS=(Fu.getComponent("MenuItem"),Fu.getComponent("NextVideoMenuItem")),SS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mS(e,t)}(o,e);var t,n,r,i=vS(o);function o(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(bS(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(bS(t)),t.setChapterTrack=t.setChapterTrack.bind(bS(t)),t.onTimeUpdate=t.onTimeUpdate.bind(bS(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem("cv-play-next-video");t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(cp(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(e,t,n){var r;this.player.isDisposed()||(this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:TS,name:"NextVideoMenuItem"}))}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem("cv-play-next-video",e.toString())}},{key:"setChapterTrack",value:function(e){this.chapterTrack=e}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),pS(_S(o.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(t=null===(e=this.chapterTrack)||void 0===e?void 0:e.activeCues)||void 0===t?void 0:t.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&this.player.removeChild(e)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem("cv-persisttest","persistPlayNext"),window.localStorage.removeItem("cv-persisttest"),!0}catch(e){return!1}}}])&&dS(t.prototype,n),r&&dS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(wS);Fu.registerPlugin("nextVideoPlugin",SS);n(394);function ES(e){return(ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xS(){return(xS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=OS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function OS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jS(e)););return e}function PS(e,t){return(PS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RS(e){var t=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(e){return!1}}();return function(){var n,r=jS(e);if(t){var i=jS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AS(this,n)}}function AS(e,t){if(t&&("object"===ES(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jS(e){return(jS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PS(e,t)}(o,e);var t,n,r,i=RS(o);function o(){var e;return CS(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){xS(jS(o.prototype),"handleClick",this).call(this,null)}}])&&kS(t.prototype,n),r&&kS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function LS(e){return(LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MS(e,t){return(MS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function NS(e){var t=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(e){return!1}}();return function(){var n,r=US(e);if(t){var i=US(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return BS(this,n)}}function BS(e,t){if(t&&("object"===LS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function US(e){return(US=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IS.prototype.controlText_="Create Clip",Fu.registerComponent("CreateClipButton",IS);var FS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MS(e,t)}(o,e);var t,n,r,i=NS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&DS(t.prototype,n),r&&DS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("createClipButtonPlugin",FS);var VS,HS=n(3),zS=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},qS=n(98),WS=n(38),$S=n(12);function GS(e){return(GS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XS(e,t){return(XS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QS(e){var t=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(e){return!1}}();return function(){var n,r=ZS(e);if(t){var i=ZS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}function JS(e,t){if(t&&("object"===GS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ZS(e){return(ZS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(VS||(VS={}));var eE,tE=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}(o,e);var t,n,r,i=QS(o);function o(){var e;return KS(this,o),(e=i.apply(this,arguments)).contextHistory=[],e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return VS.Context}},{key:"initialize",value:function(){this.listenTo($S.a.SHELL,qS.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}}])&&YS(t.prototype,n),r&&YS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qS.Service)),nE=n(10);!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(eE||(eE={}));var rE="global:analytics";function iE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oE=_w.EventVersion.V1,aE=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||oE}var t,n,r;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||qS.ErrorHelper.throw(new WS.a("".concat(e," is not a valid key"))),this[e]&&qS.ErrorHelper.throw(new WS.a("Event already contains an enrichment named ".concat(e)))}}])&&iE(t.prototype,n),r&&iE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),sE=function(e,t,n,r){nE.Radio.channel(rE).trigger(eE.Inlet,new aE(e,t,n,r))};function uE(){var e=tE.getCurrentContext().appLink;return HS.isObject(e)||qS.ErrorHelper.throw(new WS.a("Applink does not exist. Check current context.")),e.application.replace(":","-")}function lE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,r=e.workflowPhase,i=void 0===r?null:r,o=e.descriptor,a=void 0===o?null:o;return t||qS.ErrorHelper.throw(new WS.a("location must be set.")),n||qS.ErrorHelper.throw(new WS.a("entity must be set.")),{productArea:uE(),location:t,entity:n,descriptor:a,workflowPhase:i}}function cE(){return qS.LocationUtils.GetCurrentPath()+qS.LocationUtils.GetCurrentQueryString()}var fE={logUserAction:function(e,t){if(function(e){return!(!HS.isArray(e)||!HS.every(e,(function(e){return HS.isObject(e)})))||!!HS.isObject(e)}(e)&&HS.isObject(t)){var n=fE.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;sE(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:cE(),appLink:e},t);sE(_w.UserAction.Navigate,n)},mergeOptions:function(e,t){return HS.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return lE(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=lE(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return cE()},buildSearchEvent:function(e,t){return{data:{query:e},action:lE({entity:_w.EntityType.Video,location:_w.LocationContext.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===_w.SearchQueryType.Series&&(r=_w.EntityType.Series),n===_w.SearchQueryType.Folder&&(r=_w.EntityType.Folder),n===_w.SearchQueryType.Tags&&(r=_w.EntityType.Tag),n===_w.SearchQueryType.Video&&(r=_w.EntityType.Video),n===_w.SearchQueryType.Subjects&&(r=_w.EntityType.Classification);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:lE({entity:r,location:_w.LocationContext.SearchBar})}},mapInteractionType:function(e){switch(e){case _w.InteractionType.DragDrop:return _w.InteractionTypeDescriptor.DragDrop;case _w.InteractionType.FileSelect:return _w.InteractionTypeDescriptor.FileSelect;default:return}}};function hE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pE={isEmpty:function(e){return HS.isEmpty(e)},values:function(e){return HS.values(e)},keys:function(e){return HS.keys(e)},deepClone:function(e){return(HS.isArray(e)?HS.map:HS.mapObject)(e,(function(e){return HS.isObject(e)||HS.isArray(e)?pE.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return HS.isObject(e)},isEqual:function(e,t){return HS.isEqual(e,t)},omit:function(e,t){return HS.omit(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==hE(e,2)[1]})).reduce((function(e,t){var n=hE(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})}};function yE(e,t){if(!e)throw new Error("Invariant failed")}function mE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(){return(vE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var bE=new Map,_E=new Map,wE=new Map,TE=0;function SE(e,t,n){void 0===n&&(n={}),n.threshold||(n.threshold=0);var r=n,i=r.root,o=r.rootMargin,a=r.threshold;if(bE.has(e)&&yE(!1),e){var s=function(e){return e?wE.has(e)?wE.get(e):(TE+=1,wE.set(e,TE.toString()),wE.get(e)+"_"):""}(i)+(o?a.toString()+"_"+o:a.toString()),u=_E.get(s);u||(u=new IntersectionObserver(CE,n),s&&_E.set(s,u));var l={callback:t,element:e,inView:!1,observerId:s,observer:u,thresholds:u.thresholds||(Array.isArray(a)?a:[a])};return bE.set(e,l),u.observe(e),l}}function EE(e){if(e){var t=bE.get(e);if(t){var n=t.observerId,r=t.observer,i=r.root;r.unobserve(e);var o=!1,a=!1;n&&bE.forEach((function(t,r){r!==e&&(t.observerId===n&&(o=!0,a=!0),t.observer.root===i&&(a=!0))})),!a&&i&&wE.delete(i),r&&!o&&r.disconnect(),bE.delete(e)}}}function CE(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,r=e.target,i=bE.get(r);if(i&&n>=0){var o=i.thresholds.some((function(e){return i.inView?n>e:n>=e}));void 0!==t&&(o=o&&t),i.inView=o,i.callback(o,e)}}))}var kE=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mE(gE(t=e.call.apply(e,[this].concat(r))||this),"state",{inView:!1,entry:void 0}),mE(gE(t),"node",null),mE(gE(t),"handleNode",(function(e){t.node&&EE(t.node),t.node=e||null,t.observeNode()})),mE(gE(t),"handleChange",(function(e,n){(e!==t.state.inView||e)&&t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)})),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){this.node||yE(!1)},o.componentDidUpdate=function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||(EE(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&(EE(this.node),this.node=null)},o.componentWillUnmount=function(){this.node&&(EE(this.node),this.node=null)},o.observeNode=function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin;SE(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r})}},o.render=function(){var e=this.state,t=e.inView,n=e.entry;if(!function(e){return"function"!=typeof e.children}(this.props))return this.props.children({inView:t,entry:n,ref:this.handleNode});var i=this.props,o=i.children,a=i.as,s=i.tag,u=(i.triggerOnce,i.threshold,i.root,i.rootMargin,i.onChange,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange"]));return Object(r.createElement)(a||s||"div",vE({ref:this.handleNode},u),o)},i}(r.Component);function xE(e){void 0===e&&(e={});var t=Object(r.useRef)(),n=Object(r.useState)({inView:!1,entry:void 0}),i=n[0],o=n[1],a=Object(r.useCallback)((function(n){t.current&&EE(t.current),n&&SE(n,(function(t,r){o({inView:t,entry:r}),t&&e.triggerOnce&&EE(n)}),e),t.current=n}),[e.threshold,e.root,e.rootMargin,e.triggerOnce]);return Object(r.useDebugValue)(i.inView),[a,i.inView,i.entry]}mE(kE,"displayName","InView"),mE(kE,"defaultProps",{threshold:0,triggerOnce:!1});function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return PE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RE=n(137),AE=n.n(RE);function jE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LE,DE,ME,NE,BE,UE,FE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},VE=r.memo((function(e){var t=e.forceLoad,n=e.extraClasses,i=void 0===n?"":n,o=e.errorFallbackImageSrc,a=e.src,s=FE(e,["forceLoad","extraClasses","errorFallbackImageSrc","src"]),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prevent,n=e.rootMargin,r=e.triggerOnce,i=void 0===r||r,o=xE({triggerOnce:i,rootMargin:n}),a=OE(o,3),s=a[0],u=a[1],l=a[2];return!0!==t&&void 0!==window.IntersectionObserver||(u=!0,s=null),{ref:s,inView:u,initialized:!!l}}({rootMargin:"500px"}),l=u.ref,c=u.inView,f=jE(r.useState(!1),2),h=f[0],d=f[1];function p(){return h&&o?o:e.src}if(r.useEffect((function(){if(t||c){var e=new Image;return e.onerror=function(){d(!0),o&&(e.src=o)},e.src=a,function(){return e.onerror=null}}}),[c]),h&&!o)return r.createElement(r.Fragment,null);if(!l)return r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i),alt:"",src:p()},s));var y=Object.assign(Object.assign({alt:""},s),c||t?{src:p()}:{});return t||(y.ref=l),r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i)},y))}));function HE(e){var t=e.appLink,n=e.appLinkOptions,i=e.className,o=e.style,a=e.children,s=e.disabled,u=e.tag,l=void 0===u?"a":u;if(!t)return r.createElement("span",{className:i||""},a);var c=qS.AppLinkHelper.getHref(t),f={onClick:function(r){var i;r.preventDefault(),null===(i=e.onClick)||void 0===i||i.call(e,r),e.analyticsData&&e.analyticsOptions&&fE.logUserAction(Object.assign({href:c},e.analyticsData),e.analyticsOptions),e.openInNewTab?qS.LocationUtils.PageLoad(c,!0):qS.AppLinkHelper.trigger(t,n)},href:c,className:i,style:o,disabled:s};return e.title&&(f.title=e.title),r.createElement(l,Object.assign({},f),a)}function zE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HE.defaultProps={appLinkOptions:{}},function(e){e.Small="small",e.Medium="medium",e.Large="large"}(LE||(LE={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.Pdf=8]="Pdf",e[e.Link=9]="Link",e[e.None=99999]="None"}(DE||(DE={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(ME||(ME={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(NE||(NE={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(UE||(UE={}));var qE,WE=(zE(BE={},DE.Banners,UE.Banner),zE(BE,DE.Thumbnails,UE.Thumbnail),BE),$E=function(e){return"/v1/category-map/".concat(e)},GE={createUrl:function(e,t){return GE._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?GE._createUrl(e.url,n):GE._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return GE._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=zS(n,"".concat($E(WE[i]))),a=Object.assign({name:GE.Rfc3986EncodeURIComponent(r)},t);return GE._createUrl(o,a)},_createUrl:function(e,t){if(e){if(pE.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof qS.Model?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:LE.Small,bgColor:"000"},t);return GE._createUrl(n,r)}},getDisplayImageFromObject:function(e){var t,n,r,i,o,a,s,u;return"tallPoster"in e&&(null===(t=e.tallPoster)||void 0===t?void 0:t.url)?e.tallPoster:"cover"in e&&(null===(n=e.cover)||void 0===n?void 0:n.url)?e.cover:"thumbnail"in e&&(null===(r=e.thumbnail)||void 0===r?void 0:r.url)?e.thumbnail:"video"in e&&(null===(o=null===(i=e.video)||void 0===i?void 0:i.thumbnail)||void 0===o?void 0:o.url)?e.video.thumbnail:"clip"in e&&(null===(u=null===(s=null===(a=e.clip)||void 0===a?void 0:a.video)||void 0===s?void 0:s.thumbnail)||void 0===u?void 0:u.url)?e.clip.video.thumbnail:null}},KE=n(45),YE=n.n(KE);function XE(e){var t=YE.a.image,n="";return e.imageType===DE.Thumbnails&&(n="thumbnail ".concat(YE.a.thumbnail)),e.imageType===DE.TallPosters&&(n=YE.a.tallPoster),e.imageType===DE.Covers&&(n=YE.a.cover),e.imageType===DE.Banners&&(n=YE.a.banner),e.imageType===DE.Posters&&(n=YE.a.poster),e.imageType===DE.Pdf&&(n=YE.a.pdf),e.imageType===DE.Link&&(n=YE.a.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function QE(e){var t=e.data,n=e.imageOptions,i=e.appLink,o=e.preload,a=e.analyticsOptions,s=e.analyticsData,u=e.imageClassName,l="";"string"==typeof t?l=t:pE.isObject(t)&&(l=t.url);var c=l&&n?GE.createUrl(l,n):l;return r.createElement("div",{className:XE(e),style:e.imageStyle},i?r.createElement(HE,{appLink:i,analyticsData:s,analyticsOptions:a},e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})):r.createElement(r.Fragment,null,e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})))}function JE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ZE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eC(e){var t=JE(Object(r.useState)(window.matchMedia(e).matches),2),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&i(t.matches);var r=function(){return i(t.matches)};return t.addListener(r),function(){return t.removeListener(r)}}),[e]),n}function tC(){return(tC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nC(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function rC(e,t){return(rC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rC(e,t)}function oC(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function aC(){var e=Object(r.useRef)(!0),t=Object(r.useRef)((function(){return e.current}));return Object(r.useEffect)((function(){return function(){e.current=!1}}),[]),t.current}function sC(e){var t,n,i=(t=e,(n=Object(r.useRef)(t)).current=t,n);Object(r.useEffect)((function(){return function(){return i.current()}}),[])}!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(qE||(qE={}));var uC=Math.pow(2,31)-1;function lC(){var e=aC(),t=Object(r.useRef)();return sC((function(){return clearTimeout(t.current)})),Object(r.useMemo)((function(){var n=function(){return clearTimeout(t.current)};return{set:function(r,i){void 0===i&&(i=0),e()&&(n(),i<=uC?t.current=setTimeout(r,i):function e(t,n,r){var i=r-Date.now();t.current=i<=uC?setTimeout(n,i):setTimeout((function(){return e(t,n,r)}),uC)}(t,r,Date.now()+i))},clear:n}}),[])}function cC(e){return e&&"setState"in e?UT.a.findDOMNode(e):null!=e?e:null}var fC=n(129),hC=n.n(fC);n(130);function dC(e,t,n){var i=Object(r.useRef)(void 0!==e),o=Object(r.useState)(t),a=o[0],s=o[1],u=void 0!==e,l=i.current;return i.current=u,!u&&l&&a!==t&&s(t),[u?e:a,Object(r.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),s(e)}),[n])]}function pC(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function yC(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function mC(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}pC.__suppressDeprecationWarning=!0,yC.__suppressDeprecationWarning=!0,mC.__suppressDeprecationWarning=!0;var vC=n(66),gC=n.n(vC),bC=n(19),_C=n.n(bC);function wC(){return Object(r.useState)(null)}var TC=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};var SC=function(e,t){return Object(r.useMemo)((function(){return function(e,t){var n=TC(e),r=TC(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])},EC="top",CC="bottom",kC="right",xC="left",OC=[EC,CC,kC,xC],PC=OC.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),RC=[].concat(OC,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),AC=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];var jC=function(e){var t=aC();return[e[0],Object(r.useCallback)((function(n){if(t())return e[1](n)}),[t,e[1]])]};function IC(e){return e.split("-")[0]}function LC(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DC(e){return e instanceof LC(e).Element||e instanceof Element}function MC(e){return e instanceof LC(e).HTMLElement||e instanceof HTMLElement}function NC(e){return"undefined"!=typeof ShadowRoot&&(e instanceof LC(e).ShadowRoot||e instanceof ShadowRoot)}var BC=Math.max,UC=Math.min,FC=Math.round;function VC(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(MC(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=FC(n.width)/a||1),o>0&&(i=FC(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function HC(e){var t=VC(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zC(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qC(e){return e?(e.nodeName||"").toLowerCase():null}function WC(e){return LC(e).getComputedStyle(e)}function $C(e){return["table","td","th"].indexOf(qC(e))>=0}function GC(e){return((DC(e)?e.ownerDocument:e.document)||window.document).documentElement}function KC(e){return"html"===qC(e)?e:e.assignedSlot||e.parentNode||(NC(e)?e.host:null)||GC(e)}function YC(e){return MC(e)&&"fixed"!==WC(e).position?e.offsetParent:null}function XC(e){for(var t=LC(e),n=YC(e);n&&$C(n)&&"static"===WC(n).position;)n=YC(n);return n&&("html"===qC(n)||"body"===qC(n)&&"static"===WC(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&MC(e)&&"fixed"===WC(e).position)return null;for(var n=KC(e);MC(n)&&["html","body"].indexOf(qC(n))<0;){var r=WC(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function QC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function JC(e,t,n){return BC(e,UC(t,n))}function ZC(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ek(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var tk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=IC(n.placement),u=QC(s),l=[xC,kC].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return ZC("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ek(e,OC))}(i.padding,n),f=HC(o),h="y"===u?EC:xC,d="y"===u?CC:kC,p=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],y=a[u]-n.rects.reference[u],m=XC(o),v=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=p/2-y/2,b=c[h],_=v-f[l]-c[d],w=v/2-f[l]/2+g,T=JC(b,w,_),S=u;n.modifiersData[r]=((t={})[S]=T,t.centerOffset=T-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&zC(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nk(e){return e.split("-")[1]}var rk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ik(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,f=e.isFixed,h=a.x,d=void 0===h?0:h,p=a.y,y=void 0===p?0:p,m="function"==typeof c?c({x:d,y:y}):{x:d,y:y};d=m.x,y=m.y;var v=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=xC,_=EC,w=window;if(l){var T=XC(n),S="clientHeight",E="clientWidth";if(T===LC(n)&&"static"!==WC(T=GC(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),T=T,i===EC||(i===xC||i===kC)&&"end"===o)_=CC,y-=(f&&w.visualViewport?w.visualViewport.height:T[S])-r.height,y*=u?1:-1;if(i===xC||(i===EC||i===CC)&&"end"===o)b=kC,d-=(f&&w.visualViewport?w.visualViewport.width:T[E])-r.width,d*=u?1:-1}var C,k=Object.assign({position:s},l&&rk),x=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:FC(t*r)/r||0,y:FC(n*r)/r||0}}({x:d,y:y}):{x:d,y:y};return d=x.x,y=x.y,u?Object.assign({},k,((C={})[_]=g?"0":"",C[b]=v?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",C)):Object.assign({},k,((t={})[_]=g?y+"px":"",t[b]=v?d+"px":"",t.transform="",t))}var ok={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,l={placement:IC(t.placement),variation:nk(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ik(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ik(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ak={passive:!0};var sk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,u=LC(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach((function(e){e.addEventListener("scroll",n.update,ak)})),s&&u.addEventListener("resize",n.update,ak),function(){o&&l.forEach((function(e){e.removeEventListener("scroll",n.update,ak)})),s&&u.removeEventListener("resize",n.update,ak)}},data:{}},uk={left:"right",right:"left",bottom:"top",top:"bottom"};function lk(e){return e.replace(/left|right|bottom|top/g,(function(e){return uk[e]}))}var ck={start:"end",end:"start"};function fk(e){return e.replace(/start|end/g,(function(e){return ck[e]}))}function hk(e){var t=LC(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function dk(e){return VC(GC(e)).left+hk(e).scrollLeft}function pk(e){var t=WC(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function yk(e,t){var n;void 0===t&&(t=[]);var r=function e(t){return["html","body","#document"].indexOf(qC(t))>=0?t.ownerDocument.body:MC(t)&&pk(t)?t:e(KC(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=LC(r),a=i?[o].concat(o.visualViewport||[],pk(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(yk(KC(a)))}function mk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vk(e,t){return"viewport"===t?mk(function(e){var t=LC(e),n=GC(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+dk(e),y:s}}(e)):DC(t)?function(e){var t=VC(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):mk(function(e){var t,n=GC(e),r=hk(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=BC(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=BC(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+dk(e),u=-r.scrollTop;return"rtl"===WC(i||n).direction&&(s+=BC(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(GC(e)))}function gk(e,t,n){var r="clippingParents"===t?function(e){var t=yk(KC(e)),n=["absolute","fixed"].indexOf(WC(e).position)>=0&&MC(e)?XC(e):e;return DC(n)?t.filter((function(e){return DC(e)&&zC(e,n)&&"body"!==qC(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=vk(e,n);return t.top=BC(r.top,t.top),t.right=UC(r.right,t.right),t.bottom=UC(r.bottom,t.bottom),t.left=BC(r.left,t.left),t}),vk(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function bk(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?IC(i):null,a=i?nk(i):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case EC:t={x:s,y:n.y-r.height};break;case CC:t={x:s,y:n.y+n.height};break;case kC:t={x:n.x+n.width,y:u};break;case xC:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var l=o?QC(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case"start":t[l]=t[l]-(n[c]/2-r[c]/2);break;case"end":t[l]=t[l]+(n[c]/2-r[c]/2)}}return t}function _k(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.boundary,a=void 0===o?"clippingParents":o,s=n.rootBoundary,u=void 0===s?"viewport":s,l=n.elementContext,c=void 0===l?"popper":l,f=n.altBoundary,h=void 0!==f&&f,d=n.padding,p=void 0===d?0:d,y=ZC("number"!=typeof p?p:ek(p,OC)),m="popper"===c?"reference":"popper",v=e.rects.popper,g=e.elements[h?m:c],b=gk(DC(g)?g:g.contextElement||GC(e.elements.popper),a,u),_=VC(e.elements.reference),w=bk({reference:_,element:v,strategy:"absolute",placement:i}),T=mk(Object.assign({},v,w)),S="popper"===c?T:_,E={top:b.top-S.top+y.top,bottom:S.bottom-b.bottom+y.bottom,left:b.left-S.left+y.left,right:S.right-b.right+y.right},C=e.modifiersData.offset;if("popper"===c&&C){var k=C[i];Object.keys(E).forEach((function(e){var t=[kC,CC].indexOf(e)>=0?1:-1,n=[EC,CC].indexOf(e)>=0?"y":"x";E[e]+=k[n]*t}))}return E}var wk={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,l=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,y=n.allowedAutoPlacements,m=t.options.placement,v=IC(m),g=u||(v===m||!p?[lk(m)]:function(e){if("auto"===IC(e))return[];var t=lk(e);return[fk(e),t,fk(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat("auto"===IC(n)?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?RC:u,c=nk(r),f=c?s?PC:PC.filter((function(e){return nk(e)===c})):OC,h=f.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=f);var d=h.reduce((function(t,n){return t[n]=_k(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[IC(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:y}):n)}),[]),_=t.rects.reference,w=t.rects.popper,T=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var k=b[C],x=IC(k),O="start"===nk(k),P=[EC,CC].indexOf(x)>=0,R=P?"width":"height",A=_k(t,{placement:k,boundary:c,rootBoundary:f,altBoundary:h,padding:l}),j=P?O?kC:xC:O?CC:EC;_[R]>w[R]&&(j=lk(j));var I=lk(j),L=[];if(o&&L.push(A[x]<=0),s&&L.push(A[j]<=0,A[I]<=0),L.every((function(e){return e}))){E=k,S=!1;break}T.set(k,L)}if(S)for(var D=function(e){var t=b.find((function(t){var n=T.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},M=p?3:1;M>0;M--){if("break"===D(M))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Tk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Sk(e){return[EC,kC,CC,xC].some((function(t){return e[t]>=0}))}var Ek={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=_k(t,{elementContext:"reference"}),s=_k(t,{altBoundary:!0}),u=Tk(a,r),l=Tk(s,i,o),c=Sk(u),f=Sk(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}};var Ck={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=RC.reduce((function(e,n){return e[n]=function(e,t,n){var r=IC(e),i=[xC,EC].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[xC,kC].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],u=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var kk={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=bk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var xk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,y=void 0===p?0:p,m=_k(t,{boundary:u,rootBoundary:l,padding:f,altBoundary:c}),v=IC(t.placement),g=nk(t.placement),b=!g,_=QC(v),w="x"===_?"y":"x",T=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,k="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(T){if(o){var P,R="y"===_?EC:xC,A="y"===_?CC:kC,j="y"===_?"height":"width",I=T[_],L=I+m[R],D=I-m[A],M=d?-E[j]/2:0,N="start"===g?S[j]:E[j],B="start"===g?-E[j]:-S[j],U=t.elements.arrow,F=d&&U?HC(U):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[R],z=V[A],q=JC(0,S[j],F[j]),W=b?S[j]/2-M-q-H-k.mainAxis:N-q-H-k.mainAxis,$=b?-S[j]/2+M+q+z+k.mainAxis:B+q+z+k.mainAxis,G=t.elements.arrow&&XC(t.elements.arrow),K=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,Y=null!=(P=null==x?void 0:x[_])?P:0,X=I+$-Y,Q=JC(d?UC(L,I+W-Y-K):L,I,d?BC(D,X):D);T[_]=Q,O[_]=Q-I}if(s){var J,Z="x"===_?EC:xC,ee="x"===_?CC:kC,te=T[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[EC,xC].indexOf(v),ae=null!=(J=null==x?void 0:x[w])?J:0,se=oe?re:te-S[ne]-E[ne]-ae+k.altAxis,ue=oe?te+S[ne]+E[ne]-ae-k.altAxis:ie,le=d&&oe?function(e,t,n){var r=JC(e,t,n);return r>n?n:r}(se,te,ue):JC(d?se:re,te,d?ue:ie);T[w]=le,O[w]=le-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function Ok(e,t,n){void 0===n&&(n=!1);var r,i,o=MC(t),a=MC(t)&&function(e){var t=e.getBoundingClientRect(),n=FC(t.width)/e.offsetWidth||1,r=FC(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=GC(t),u=VC(e,a),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==qC(t)||pk(s))&&(l=(r=t)!==LC(r)&&MC(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:hk(r)),MC(t)?((c=VC(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=dk(s))),{x:u.left+l.scrollLeft-c.x,y:u.top+l.scrollTop-c.y,width:u.width,height:u.height}}function Pk(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=t.get(r);i&&e(i)}})),r.push(i)}(e)})),r}var Rk={placement:"bottom",modifiers:[],strategy:"absolute"};function Ak(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function jk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Rk:i;return function(e,t,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Rk,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,c={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:DC(e)?yk(e):e.contextElement?yk(e.contextElement):[],popper:yk(t)};var a=function(e){var t=Pk(e);return AC.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:c,options:r});u.push(o||function(){})}})),c.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Ak(t,n)){s.rects={reference:Ok(t,XC(n),"fixed"===s.options.strategy),popper:HC(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,u=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:u,name:f,instance:c})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(i())}))}))),a}),destroy:function(){f(),l=!0}};if(!Ak(e,t))return c;function f(){u.forEach((function(e){return e()})),u=[]}return c.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Ik=jk({defaultModifiers:[Ek,kk,ok,sk,Ck,wk,xk,tk]}),Lk=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Dk={name:"applyStyles",enabled:!1},Mk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var i=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));i.length?n.setAttribute("aria-describedby",i.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,i=n.reference,o=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===o&&"setAttribute"in i){var a=i.getAttribute("aria-describedby");if(a&&-1!==a.split(",").indexOf(r.id))return;i.setAttribute("aria-describedby",a?a+","+r.id:r.id)}}},Nk=[];var Bk=function(e,t,n){var i=void 0===n?{}:n,o=i.enabled,a=void 0===o||o,s=i.placement,u=void 0===s?"bottom":s,l=i.strategy,c=void 0===l?"absolute":l,f=i.modifiers,h=void 0===f?Nk:f,d=nC(i,["enabled","placement","strategy","modifiers"]),p=Object(r.useRef)(),y=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.update()}),[]),m=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.forceUpdate()}),[]),v=jC(Object(r.useState)({placement:u,update:y,forceUpdate:m,attributes:{},styles:{popper:Lk(c),arrow:{}}})),g=v[0],b=v[1],_=Object(r.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),b({state:t,styles:n,attributes:r,update:y,forceUpdate:m,placement:t.placement})}}}),[y,m,b]);return Object(r.useEffect)((function(){p.current&&a&&p.current.setOptions({placement:u,strategy:c,modifiers:[].concat(h,[_,Dk])})}),[c,u,_,a]),Object(r.useEffect)((function(){if(a&&null!=e&&null!=t)return p.current=Ik(e,t,tC({},d,{placement:u,strategy:c,modifiers:[].concat(h,[Mk,_])})),function(){null!=p.current&&(p.current.destroy(),p.current=void 0,b((function(e){return tC({},e,{attributes:{},styles:{popper:Lk(c)}})})))}}),[a,e,t]),g},Uk=n(216),Fk=!1,Vk=!1;try{var Hk={get passive(){return Fk=!0},get once(){return Vk=Fk=!0}};Uk.a&&(window.addEventListener("test",Hk,Hk),window.removeEventListener("test",Hk,!0))}catch(e){}var zk=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!Vk){var i=r.once,o=r.capture,a=n;!Vk&&i&&(a=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=a),e.addEventListener(t,a,Fk?r:o)}e.addEventListener(t,n,r)};var qk=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var Wk=function(e,t,n,r){return zk(e,t,n,r),function(){qk(e,t,n,r)}},$k=n(138),Gk=n(67),Kk=function(){};var Yk=function(e){return e&&("current"in e?e.current:e)};var Xk=function(e,t,n){var i=void 0===n?{}:n,o=i.disabled,a=i.clickTrigger,s=void 0===a?"click":a,u=Object(r.useRef)(!1),l=t||Kk,c=Object(r.useCallback)((function(t){var n,r=Yk(e);hC()(!!r,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),u.current=!(r&&(n=t,!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey))&&function(e){return 0===e.button}(t)&&!oC(r,t.target))}),[e]),f=Object($k.a)((function(e){u.current||l(e)})),h=Object($k.a)((function(e){27===e.keyCode&&l(e)}));Object(r.useEffect)((function(){if(!o&&null!=e){var t,n=window.event,r=(t=Yk(e),Object(Gk.a)(cC(t))),i=Wk(r,s,c,!0),a=Wk(r,s,(function(e){e!==n?f(e):n=void 0})),u=Wk(r,"keyup",(function(e){e!==n?h(e):n=void 0})),l=[];return"ontouchstart"in r.documentElement&&(l=[].slice.call(r.body.children).map((function(e){return Wk(e,"mousemove",Kk)}))),function(){i(),a(),u(),l.forEach((function(e){return e()}))}}}),[e,o,s,c,f,h])},Qk=function(e){var t;return"undefined"==typeof document?null:null==e?Object(Gk.a)().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function Jk(e,t){var n=Object(r.useState)((function(){return Qk(e)})),i=n[0],o=n[1];if(!i){var a=Qk(e);a&&o(a)}return Object(r.useEffect)((function(){t&&i&&t(i)}),[t,i]),Object(r.useEffect)((function(){var t=Qk(e);t!==i&&o(t)}),[e,i]),i}function Zk(e){var t,n,r,i,o,a=e.enabled,s=e.enableEvents,u=e.placement,l=e.flip,c=e.offset,f=e.fixed,h=e.containerPadding,d=e.arrowElement,p=e.popperConfig,y=void 0===p?{}:p,m=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(y.modifiers);return tC({},y,{placement:u,enabled:a,strategy:f?"fixed":y.strategy,modifiers:(o=tC({},m,{eventListeners:{enabled:s},preventOverflow:tC({},m.preventOverflow,{options:h?tC({padding:h},null==(t=m.preventOverflow)?void 0:t.options):null==(n=m.preventOverflow)?void 0:n.options}),offset:{options:tC({offset:c},null==(r=m.offset)?void 0:r.options)},arrow:tC({},m.arrow,{enabled:!!d,options:tC({},null==(i=m.arrow)?void 0:i.options,{element:d})}),flip:tC({enabled:!!l},m.flip)}),void 0===o&&(o={}),Array.isArray(o)?o:Object.keys(o).map((function(e){return o[e].name=e,o[e]})))})}var ex=i.a.forwardRef((function(e,t){var n=e.flip,o=e.offset,a=e.placement,s=e.containerPadding,u=void 0===s?5:s,l=e.popperConfig,c=void 0===l?{}:l,f=e.transition,h=wC(),d=h[0],p=h[1],y=wC(),m=y[0],v=y[1],g=SC(p,t),b=Jk(e.container),_=Jk(e.target),w=Object(r.useState)(!e.show),T=w[0],S=w[1],E=Bk(_,d,Zk({placement:a,enableEvents:!!e.show,containerPadding:u||5,flip:n,offset:o,arrowElement:m,popperConfig:c})),C=E.styles,k=E.attributes,x=nC(E,["styles","attributes"]);e.show?T&&S(!1):e.transition||T||S(!0);var O=e.show||f&&!T;if(Xk(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!O)return null;var P=e.children(tC({},x,{show:!!e.show,props:tC({},k.popper,{style:C.popper,ref:g}),arrowProps:tC({},k.arrow,{style:C.arrow,ref:v})}));if(f){var R=e.onExit,A=e.onExiting,j=e.onEnter,I=e.onEntering,L=e.onEntered;P=i.a.createElement(f,{in:e.show,appear:!0,onExit:R,onExiting:A,onExited:function(){S(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:j,onEntering:I,onEntered:L},P)}return b?UT.a.createPortal(P,b):null}));ex.displayName="Overlay",ex.propTypes={show:_C.a.bool,placement:_C.a.oneOf(RC),target:_C.a.any,container:_C.a.any,flip:_C.a.bool,children:_C.a.func.isRequired,containerPadding:_C.a.number,popperConfig:_C.a.object,rootClose:_C.a.bool,rootCloseEvent:_C.a.oneOf(["click","mousedown"]),rootCloseDisabled:_C.a.bool,onHide:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;return e.rootClose?(i=_C.a.func).isRequired.apply(i,[e].concat(n)):_C.a.func.apply(_C.a,[e].concat(n))},transition:_C.a.elementType,onEnter:_C.a.func,onEntering:_C.a.func,onEntered:_C.a.func,onExit:_C.a.func,onExiting:_C.a.func,onExited:_C.a.func};var tx=ex,nx=n(107),rx=i.a.createContext({});rx.Consumer,rx.Provider;function ix(e,t){var n=Object(r.useContext)(rx);return e||n[t]||t}function ox(e){var t=window.getComputedStyle(e);return{top:parseFloat(t.marginTop)||0,right:parseFloat(t.marginRight)||0,bottom:parseFloat(t.marginBottom)||0,left:parseFloat(t.marginLeft)||0}}var ax=!1,sx=i.a.createContext(null),ux=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}iC(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[UT.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||ax?this.safeSetState({status:"entered"},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:"entering"},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:UT.a.findDOMNode(this);t&&!ax?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:UT.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,nC(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(sx.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function lx(){}ux.contextType=sx,ux.propTypes={},ux.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:lx,onEntering:lx,onEntered:lx,onExit:lx,onExiting:lx,onExited:lx},ux.UNMOUNTED="unmounted",ux.EXITED="exited",ux.ENTERING="entering",ux.ENTERED="entered",ux.EXITING="exiting";var cx=ux;function fx(e,t){return function(e){var t=Object(Gk.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var hx=/([A-Z])/g;var dx=/^ms-/;function px(e){return function(e){return e.replace(hx,"-$1").toLowerCase()}(e).replace(dx,"-ms-")}var yx=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;var mx=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(px(t))||fx(e).getPropertyValue(px(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?!function(e){return!(!e||!yx.test(e))}(i)?n+=px(i)+": "+o+";":r+=i+"("+o+") ":e.style.removeProperty(px(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function vx(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)}),t+n),o=Wk(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}function gx(e,t,n,r){var i,o;null==n&&(i=mx(e,"transitionDuration")||"",o=-1===i.indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var a=vx(e,n,r),s=Wk(e,"transitionend",t);return function(){a(),s()}}function bx(e,t){var n=mx(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function _x(e,t){var n=bx(e,"transitionDuration"),r=bx(e,"transitionDelay"),i=gx(e,(function(n){n.target===e&&(i(),t(n))}),n+r)}var wx,Tx=["className","children"],Sx=((wx={}).entering="show",wx.entered="show",wx),Ex=i.a.forwardRef((function(e,t){var n=e.className,o=e.children,a=nC(e,Tx),s=Object(r.useCallback)((function(e){!function(e){e.offsetHeight}(e),a.onEnter&&a.onEnter(e)}),[a]);return i.a.createElement(cx,tC({ref:t,addEndListener:_x},a,{onEnter:s}),(function(e,t){return i.a.cloneElement(o,tC({},t,{className:gC()("fade",n,o.props.className,Sx[e])}))}))}));Ex.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},Ex.displayName="Fade";var Cx=Ex,kx=["children","transition","popperConfig"],xx=["props","arrowProps","show","update","forceUpdate","placement","state"],Ox={transition:Cx,rootClose:!1,show:!1,placement:"top"};function Px(e){var t,n,o,a,s,u=e.children,l=e.transition,c=e.popperConfig,f=void 0===c?{}:c,h=nC(e,kx),d=Object(r.useRef)({}),p=(t=Object(r.useRef)(null),n=Object(r.useRef)(null),o=Object(r.useRef)(null),a=ix(void 0,"popover"),s=ix(void 0,"dropdown-menu"),[Object(r.useCallback)((function(e){e&&(Object(nx.a)(e,a)||Object(nx.a)(e,s))&&(n.current=ox(e),e.style.margin="0",t.current=e)}),[a,s]),[Object(r.useMemo)((function(){return{name:"offset",options:{offset:function(e){var t=e.placement;if(!n.current)return[0,0];var r=n.current,i=r.top,o=r.left,a=r.bottom,s=r.right;switch(t.split("-")[0]){case"top":return[0,a];case"left":return[0,s];case"bottom":return[0,i];case"right":return[0,o];default:return[0,0]}}}}}),[n]),Object(r.useMemo)((function(){return{name:"arrow",options:{padding:function(){if(!o.current)return 0;var e=o.current,t=e.top,n=e.right,r=t||n;return{top:r,left:r,right:r,bottom:r}}}}}),[o]),Object(r.useMemo)((function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",requiresIfExists:["arrow"],effect:function(e){var n=e.state;if(t.current&&n.elements.arrow&&Object(nx.a)(t.current,a)){if(n.modifiersData["arrow#persistent"]){var r=ox(n.elements.arrow),i=r.top,s=r.right,u=i||s;n.modifiersData["arrow#persistent"].padding={top:u,left:u,right:u,bottom:u}}else o.current=ox(n.elements.arrow);return n.elements.arrow.style.margin="0",function(){n.elements.arrow&&(n.elements.arrow.style.margin="")}}}}}),[a])]]),y=p[0],m=p[1],v=!0===l?Cx:l||null;return i.a.createElement(tx,tC({},h,{ref:y,popperConfig:tC({},f,{modifiers:m.concat(f.modifiers||[])}),transition:v}),(function(e){var t,n=e.props,r=e.arrowProps,o=e.show,a=e.update,s=(e.forceUpdate,e.placement),c=e.state,f=nC(e,xx);!function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(cC(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(cC(e))})}(n,r);var h=Object.assign(d.current,{state:c,scheduleUpdate:a,placement:s,outOfBoundaries:(null==c||null==(t=c.modifiersData.hide)?void 0:t.isReferenceHidden)||!1});return"function"==typeof u?u(tC({},f,n,{placement:s,show:o},!l&&o&&{className:"show"},{popper:h,arrowProps:r})):i.a.cloneElement(u,tC({},f,n,{placement:s,arrowProps:r,popper:h,className:gC()(u.props.className,!l&&o&&"show"),style:tC({},u.props.style,n.style)}))}))}Px.defaultProps=Ox;var Rx=Px,Ax=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],jx=function(e){function t(){return e.apply(this,arguments)||this}return iC(t,e),t.prototype.render=function(){return this.props.children},t}(i.a.Component);function Ix(e,t,n){var r=t[0],i=r.currentTarget,o=r.relatedTarget||r.nativeEvent[n];o&&o===i||oC(i,o)||e.apply(void 0,t)}function Lx(e){var t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,s=void 0===a?{}:a,u=e.show,l=e.defaultShow,c=void 0!==l&&l,f=e.onToggle,h=e.delay,d=e.placement,p=e.flip,y=void 0===p?d&&-1!==d.indexOf("auto"):p,m=nC(e,Ax),v=Object(r.useRef)(null),g=lC(),b=Object(r.useRef)(""),_=dC(u,c,f),w=_[0],T=_[1],S=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(h),E="function"!=typeof o?i.a.Children.only(o).props:{},C=E.onFocus,k=E.onBlur,x=E.onClick,O=Object(r.useCallback)((function(){return cC(v.current)}),[]),P=Object(r.useCallback)((function(){g.clear(),b.current="show",S.show?g.set((function(){"show"===b.current&&T(!0)}),S.show):T(!0)}),[S.show,T,g]),R=Object(r.useCallback)((function(){g.clear(),b.current="hide",S.hide?g.set((function(){"hide"===b.current&&T(!1)}),S.hide):T(!1)}),[S.hide,T,g]),A=Object(r.useCallback)((function(){P();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==C||C.apply(void 0,t)}),[P,C]),j=Object(r.useCallback)((function(){R();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==k||k.apply(void 0,t)}),[R,k]),I=Object(r.useCallback)((function(){T(!w),x&&x.apply(void 0,arguments)}),[x,T,w]),L=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(P,t,"fromElement")}),[P]),D=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(R,t,"toElement")}),[R]),M=null==t?[]:[].concat(t),N={};return-1!==M.indexOf("click")&&(N.onClick=I),-1!==M.indexOf("focus")&&(N.onFocus=A,N.onBlur=j),-1!==M.indexOf("hover")&&(N.onMouseOver=L,N.onMouseOut=D),i.a.createElement(i.a.Fragment,null,"function"==typeof o?o(tC({},N,{ref:v})):i.a.createElement(jx,{ref:v},Object(r.cloneElement)(o,N)),i.a.createElement(Rx,tC({},m,{show:w,onHide:R,flip:y,placement:d,popperConfig:s,target:O}),n))}Lx.defaultProps={defaultShow:!1,trigger:["hover","focus"]};var Dx=Lx,Mx=(n(400),["bsPrefix","placement","className","style","children","arrowProps","popper","show"]),Nx=i.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,o=e.className,a=e.style,s=e.children,u=e.arrowProps,l=(e.popper,e.show,nC(e,Mx));n=ix(n,"tooltip");var c=((null==r?void 0:r.split("-"))||[])[0];return i.a.createElement("div",tC({ref:t,style:a,role:"tooltip","x-placement":c,className:gC()(o,n,"bs-tooltip-"+c)},l),i.a.createElement("div",tC({className:"arrow"},u)),i.a.createElement("div",{className:n+"-inner"},s))}));Nx.defaultProps={placement:"right"},Nx.displayName="Tooltip";var Bx,Ux,Fx=Nx,Vx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function Hx(e){var t,n=e.title,i=e.placement,o=e.trigger,a=e.spanHack,s=e.children,u=e.disable;return a?r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement("span",{className:"".concat(null!==(t=e.spanHackClassName)&&void 0!==t?t:"d-flex justify-content-center align-items-center")},s)):r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement(r.Fragment,null,s))}Hx.defaultProps={trigger:["hover","click","focus"],placement:"top"},function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(Bx||(Bx={})),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(Ux||(Ux={}));var zx=n(40),qx=n.n(zx),Wx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},$x={width:200};function Gx(e,t){var n,r=zS(e,"/v1/previews");return"metadata"in t?t.metadata.type===Bx.Pdf?GE.createResourceImage(r,t.url,$x):t.metadata.type===Bx.Image?GE.createUrl(t.url,{size:LE.Medium,resizeType:ME.Cover}):(null===(n=t.pdf)||void 0===n?void 0:n.url)?GE.createResourceImage(r,t.pdf.url,$x):t.metadata.type===Bx.Zip?GE.createUrl(zS(e,"/v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createUrl("".concat(e,"v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createResourceImage(r,t.url,Object.assign({},$x))}function Kx(e){var t;return"metadata"in e?e.metadata.type===Bx.Pdf?DE.Pdf:e.metadata.type===Bx.Image?DE.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?DE.Pdf:(e.metadata.type,Bx.Zip,DE.Thumbnails):DE.Link}function Yx(e){var t,n,r,o=null,a=0;"metadata"in e.data&&(o=e.data.metadata,a=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var s="pt-3 px-3 rounded-lg d-flex flex-column align-items-center"+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return qx.a.atomGuide;case"student-activity":return qx.a.studentActivity;case"teacher-pack":return qx.a.teacherPack;case"additional-materials":return qx.a.additionalMaterials;default:return qx.a.userUploaded}}(null==o?void 0:o.resourceType)," ").concat(qx.a.background);return i.a.createElement("div",{className:s},i.a.createElement(Hx,{title:e.data.name},i.a.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(qx.a.text)},i.a.createElement("span",{className:"clamp-1"},e.data.name))),i.a.createElement("div",{className:"w-75 overflow-hidden ".concat(qx.a.thumbnailContainer)},i.a.createElement(QE,{data:Gx(e.imageCdnUrl,e.data),imageType:Kx(e.data),imageStyle:{transform:"rotate(".concat(a,"deg)")},analyticsOptions:{location:_w.LocationContext.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,preload:!0})))}i.a.memo((function(e){var t,n,r,o,a,s,u,l=Wx(e,[]),c=(t=eC(qE.XS),n=eC(qE.SM),r=eC(qE.MD),o=eC(qE.LG),a=eC(qE.XL),s=eC(qE.XXL),u=qE.LG,t&&(u=qE.XS),n&&(u=qE.SM),r&&(u=qE.MD),o&&(u=qE.LG),a&&(u=qE.XL),s&&(u=qE.XXL),u),f=c===qE.SM||c===qE.XS,h=null;"metadata"in e.data&&(h=e.data.metadata.type);var d=Object.assign(Object.assign({},e.analyticsData),e.data),p=Object.assign(Object.assign({},e.analyticsOptions),{actionType:_w.UserAction.Click,entity:e.data.typeId===Ux.Resource?_w.EntityType.Resource:_w.EntityType.Link});function y(){fE.logUserAction(d,p)}return i.a.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(qx.a.item)},function(){if(!h)return i.a.createElement("a",{href:e.data.url,target:"_blank",className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l)));var t=!!e.data.pdf||h===Bx.Pdf||h===Bx.Image;return f||!t||h===Bx.Zip?i.a.createElement("a",{href:e.data.url,className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l))):i.a.createElement(HE,{appLink:e.getAppLink(e.data),className:"d-block no-decoration",analyticsData:d,analyticsOptions:p},i.a.createElement(Yx,Object.assign({},l)))}())})),n(401);function Xx(e){return(Xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jx(e,t){return(Jx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zx(e){var t=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(e){return!1}}();return function(){var n,r=tO(e);if(t){var i=tO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eO(this,n)}}function eO(e,t){if(t&&("object"===Xx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tO(e){return(tO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nO(e){return i.a.createElement("div",{className:"cv-resource-item"},i.a.createElement(Yx,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var rO=ZT((function(e,t){return i.a.createElement(nO,Object.assign({},t))})),iO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jx(e,t)}(o,e);var t,n,r,i=Zx(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t);var r=new rO(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&Qx(t.prototype,n),r&&Qx(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ClickableComponent"));n(402);function oO(e){return(oO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uO(){return(uO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dO(e)););return e}function cO(e,t){return(cO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fO(e){var t=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(e){return!1}}();return function(){var n,r=dO(e);if(t){var i=dO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hO(this,n)}}function hO(e,t){if(t&&("object"===oO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dO(e){return(dO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cO(e,t)}(o,e);var t,n,r,i=fO(o);function o(){var e;return aO(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(uO(dO(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(uO(dO(o.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){uO(dO(o.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",uO(dO(o.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new iO(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Fu.dom.createEl("iframe"),this.downloadIframe.style.display="none",Fu.dom.appendContent(Fu.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){uO(dO(o.prototype),"handleClick",this).call(this,null)}}])&&sO(t.prototype,n),r&&sO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));function yO(e){return(yO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vO(e,t){return(vO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gO(e){var t=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(e){return!1}}();return function(){var n,r=_O(e);if(t){var i=_O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bO(this,n)}}function bO(e,t){if(t&&("object"===yO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _O(e){return(_O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pO.prototype.controlText_="Resources",Fu.registerComponent("ResourcesButton",pO);var wO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}(o,e);var t,n,r,i=gO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&mO(t.prototype,n),r&&mO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("resourcesPlugin",wO);n(403);function TO(e){return(TO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function EO(){return(EO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=CO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function CO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=PO(e)););return e}function kO(e,t){return(kO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xO(e){var t=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(e){return!1}}();return function(){var n,r=PO(e);if(t){var i=PO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return OO(this,n)}}function OO(e,t){if(t&&("object"===TO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function PO(e){return(PO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var RO=Fu.getComponent("PlayToggle"),AO=Fu.getPlugin("plugin"),jO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kO(e,t)}(o,e);var t,n,r,i=xO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.enablePictureInPicture(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var t=e.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===t&&(t=e.children().length-1),e.addChild("pictureInPictureToggle",{},t);var n=e.getChild("pictureInPictureToggle");null==n||n.enable()}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new RO(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,EO(PO(o.prototype),"dispose",this).call(this)}}])&&SO(t.prototype,n),r&&SO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(AO);Fu.registerPlugin("pictureInPicture",jO);n(404);function IO(e){return(IO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DO(e,t){return(DO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MO(e){var t=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(e){return!1}}();return function(){var n,r=BO(e);if(t){var i=BO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NO(this,n)}}function NO(e,t){if(t&&("object"===IO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BO(e){return(BO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DO(e,t)}(o,e);var t,n,r,i=MO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&LO(t.prototype,n),r&&LO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function FO(e){return(FO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zO(e,t){return(zO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qO(e){var t=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(e){return!1}}();return function(){var n,r=$O(e);if(t){var i=$O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return WO(this,n)}}function WO(e,t){if(t&&("object"===FO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $O(e){return($O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}UO.prototype.controlText_="Favourite";var GO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zO(e,t)}(o,e);var t,n,r,i=qO(o);function o(){return VO(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){var n=this;e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new UO(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&HO(t.prototype,n),r&&HO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function KO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("favouritePlugin",GO);var YO=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n,r;return t=e,(n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}])&&KO(t.prototype,n),r&&KO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());n(405);function XO(e){return(XO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JO(){return(JO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ZO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ZO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=iP(e)););return e}function eP(e,t){return(eP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tP(e){var t=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(e){return!1}}();return function(){var n,r=iP(e);if(t){var i=iP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nP(this,n)}}function nP(e,t){if(t&&("object"===XO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rP(e)}function rP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iP(e){return(iP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eP(e,t)}(o,e);var t,n,r,i=tP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=YO,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(rP(n)),n.onMouseLeave=n.onMouseLeave.bind(rP(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(rP(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(rP(n)),n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(JO(iP(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return JO(iP(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;t!==this.hasBuffered&&(this.hasBuffered=t,this.hasBuffered?this.addClass("cv-point-of-interest-indicator-buffered"):this.removeClass("cv-point-of-interest-indicator-buffered"))}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){e?this.removeClass("cv-point-of-interest-indicator-hidden"):this.addClass("cv-point-of-interest-indicator-hidden")}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=Fu.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&QO(t.prototype,n),r&&QO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function aP(e){return(aP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uP(){return(uP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dP(e)););return e}function cP(e,t){return(cP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fP(e){var t=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(e){return!1}}();return function(){var n,r=dP(e);if(t){var i=dP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hP(this,n)}}function hP(e,t){if(t&&("object"===aP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dP(e){return(dP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cP(e,t)}(o,e);var t,n,r,i=fP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Fu.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){Fu.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=uP(dP(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&sP(t.prototype,n),r&&sP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function yP(e){return(yP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vP(e,t){return(vP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gP(e){var t=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(e){return!1}}();return function(){var n,r=wP(e);if(t){var i=wP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bP(this,n)}}function bP(e,t){if(t&&("object"===yP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _P(e)}function _P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wP(e){return(wP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PointsOfInterestMenuItem",pP);var TP,SP=Fu.getPlugin("plugin"),EP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vP(e,t)}(o,e);var t,n,r,i=gP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(_P(n)),n.updateBuffered=n.updateBuffered.bind(_P(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(_P(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=o,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(Qu()&&"false"===Ju("cvplayer-points-of-interest")&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Zu("cvplayer-points-of-interest",e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new oP(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:pP,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered(ky(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&mP(t.prototype,n),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(SP);Fu.registerPlugin("pointsOfInterestPlugin",EP),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(TP||(TP={}));n(406);function CP(e){return(CP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xP(e,t){return(xP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OP(e){var t=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(e){return!1}}();return function(){var n,r=RP(e);if(t){var i=RP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PP(this,n)}}function PP(e,t){if(t&&("object"===CP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function RP(e){return(RP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xP(e,t)}(o,e);var t,n,r,i=OP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.activityStatus===TP.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===TP.Complete?TP.Incomplete:TP.Complete,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&kP(t.prototype,n),r&&kP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function jP(e){return(jP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DP(e,t){return(DP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MP(e){var t=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(e){return!1}}();return function(){var n,r=BP(e);if(t){var i=BP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NP(this,n)}}function NP(e,t){if(t&&("object"===jP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BP(e){return(BP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}AP.prototype.controlText_="ActivityStatus";var UP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DP(e,t)}(o,e);var t,n,r,i=MP(o);function o(){return IP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new AP(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&LP(t.prototype,n),r&&LP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function FP(e){return(FP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HP(){return(HP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=GP(e)););return e}function qP(e,t){return(qP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WP(e){var t=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(e){return!1}}();return function(){var n,r=GP(e);if(t){var i=GP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $P(this,n)}}function $P(e,t){if(t&&("object"===FP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function GP(e){return(GP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("activityStatusPlugin",UP);var KP=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},YP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qP(e,t)}(o,e);var t,n,r,i=WP(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),this.options.pointsOfInterest&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return HP(GP(o.prototype),"additionalSetup",t)}}});return KP(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&VP(t.prototype,n),r&&VP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT),XP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function QP(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,s=XP(e,["className","playerApi","onReady","onDispose"]),u=i.a.useRef(),l=i.a.useRef();return i.a.useEffect((function(){var e;if(null===(e=l.current)||void 0===e||e.dispose(),u)return l.current=new YP(u.current,Object.assign(Object.assign({},s),{playerApi:r})),o&&l.current.ready((function(){o(l.current)})),a&&l.current.one("dispose",a),function(){var e;null===(e=l.current)||void 0===e||e.dispose()}}),[e.viewKey]),i.a.createElement("div",{ref:u,className:n})}function JP(e){return(JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tR(){return(tR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=aR(e)););return e}function rR(e,t){return(rR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iR(e){var t=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(e){return!1}}();return function(){var n,r=aR(e);if(t){var i=aR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oR(this,n)}}function oR(e,t){if(t&&("object"===JP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function aR(e){return(aR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sR=Fu.getComponent("Component"),uR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rR(e,t)}(o,e);var t,n,r,i=iR(o);function o(){return ZP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(tR(aR(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return tR(aR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14" pointer-events="none"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&eR(t.prototype,n),r&&eR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sR);n(407);function lR(e){return(lR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fR(){return(fR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=hR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function hR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mR(e)););return e}function dR(e,t){return(dR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pR(e){var t=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(e){return!1}}();return function(){var n,r=mR(e);if(t){var i=mR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yR(this,n)}}function yR(e,t){if(t&&("object"===lR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function mR(e){return(mR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dR(e,t)}(o,e);var t,n,r,i=pR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.minDuration=Math.min(e.duration(),n.options_.minDuration),n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new uR(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new uR(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return fR(mR(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.player().duration()-this.minDuration;if(e>r&&(e=r),e<0&&(e=0),this.startTime=e,this.endTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.startTime+n:this.startTime+this.minDuration;this.setEndTime(i)}this.player().currentTime(this.startTime),t&&this.update()}}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.minDuration;if(e<r&&(e=r),e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,this.startTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.endTime-n:this.endTime-this.minDuration;this.setStartTime(i)}t&&this.update()}}},{key:"bindListeners",value:function(){var e=this;this.onTimeupdate=this.onTimeupdate.bind(this),this.player().on("timeupdate",this.onTimeupdate),this.on("mousedown",this.dragStart),this.on("touchstart",this.dragStart),this.player().on("dispose",(function(){e.player().off("timeupdate",e.onTimeupdate),e.off("mousedown",e.dragStart),e.off("touchstart",e.dragStart)}))}},{key:"hasStartTime",value:function(){return"number"==typeof this.startTime}},{key:"hasEndTime",value:function(){return"number"==typeof this.endTime}},{key:"onTimeupdate",value:function(){var e=this.player().currentTime();e>this.endTime&&e<this.endTime+.5&&this.player().pause()}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e));var t=this.el().ownerDocument;this.on(t,"mousemove",this.drag),this.on(t,"mouseup",this.dragEnd),this.on(t,"touchmove",this.drag),this.on(t,"touchend",this.dragEnd),this.drag(e)}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null;var e=this.el().ownerDocument;this.off(e,"mousemove",this.drag),this.off(e,"mouseup",this.dragEnd),this.off(e,"touchmove",this.drag),this.off(e,"touchend",this.dragEnd)}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Fu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Fu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&cR(t.prototype,n),r&&cR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(408);function gR(e){return(gR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _R(){return(_R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=wR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function wR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CR(e)););return e}function TR(e,t){return(TR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SR(e){var t=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(e){return!1}}();return function(){var n,r=CR(e);if(t){var i=CR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ER(this,n)}}function ER(e,t){if(t&&("object"===gR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function CR(e){return(CR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TR(e,t)}(o,e);var t,n,r,i=SR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).seekBar_=t.seekBar,n.playProgressBar_=t.playProgressBar,n.bindListeners(),n.player_.one("dispose",(function(){n.unbindListeners()})),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){return _R(CR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"cv-create-clip-progress-indicator"}),n)}},{key:"bindListeners",value:function(){this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown)}},{key:"unbindListeners",value:function(){var e=this.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp)}},{key:"handleMouseDown",value:function(e){if(Fu.dom.isSingleLeftClick(e)){e.stopPropagation(),"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Fu.browser.IS_CHROME||e.preventDefault(),this.player_.scrubbing(!0),this.videoWasPlaying_=!this.player_.paused(),this.player_.pause(),Fu.dom.blockTextSelection();var t=this.el_.ownerDocument;this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e),this.player_.addClass("cv-hide-mouse-time")}}},{key:"handleMouseMove",value:function(e){if(Fu.dom.isSingleLeftClick(e)){var t=Fu.dom.getPointerPosition(this.seekBar_.el_,e).x*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t),this.playProgressBar_.update()}}},{key:"handleMouseUp",value:function(e){Fu.dom.unblockTextSelection();var t=this.el_.ownerDocument;this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),null==e||e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying_&&this.player_.play(),this.seekBar_.update(),this.player_.removeClass("cv-hide-mouse-time")}}])&&bR(t.prototype,n),r&&bR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("CreateClipProgressIndicator",kR);n(409);function xR(e){return(xR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PR(e,t){return(PR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RR(e){var t=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(e){return!1}}();return function(){var n,r=jR(e);if(t){var i=jR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AR(this,n)}}function AR(e,t){if(t&&("object"===xR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jR(e){return(jR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PR(e,t)}(o,e);var t,n,r,i=RR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new vR(this.player(),e);this.addChild(t);var n=this.getChild("playProgressBar"),r=new kR(this.player_,{seekBar:this,playProgressBar:n});n.addChild(r)}}])&&OR(t.prototype,n),r&&OR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));function LR(e){return(LR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MR(){return(MR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=NR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function NR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HR(e)););return e}function BR(e,t){return(BR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UR(e){var t=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(e){return!1}}();return function(){var n,r=HR(e);if(t){var i=HR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return FR(this,n)}}function FR(e,t){if(t&&("object"===LR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return VR(e)}function VR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HR(e){return(HR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IR.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||IR.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("CreateClipSeekBar",IR);var zR=Fu.getPlugin("plugin"),qR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BR(e,t)}(o,e);var t,n,r,i=UR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(VR(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=Math.min(this.options.minDuration||5,this.player.duration());t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar),MR(HR(o.prototype),"dispose",this).call(this)}}])&&DR(t.prototype,n),r&&DR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(zR);function WR(e){return(WR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GR(){return(GR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=KR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function KR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=JR(e)););return e}function YR(e,t){return(YR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XR(e){var t=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(e){return!1}}();return function(){var n,r=JR(e);if(t){var i=JR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return QR(this,n)}}function QR(e,t){if(t&&("object"===WR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function JR(e){return(JR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("createClipPlugin",qR);var ZR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YR(e,t)}(o,e);var t,n,r,i=XR(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null,enableLocalCache:!1}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getPlayerOptions",value:function(){var e=GR(JR(o.prototype),"getPlayerOptions",this).call(this);return e.inactivityTimeout=0,e}},{key:"getSeekBarName",value:function(){return"CreateClipSeekBar"}},{key:"getAnalyticsPlayerType",value:function(){return"create-clip-player"}}])&&$R(t.prototype,n),r&&$R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT);function eA(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new ZR(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return QP})),n.d(t,"ClickViewCreateClipPlayer",(function(){return eA})),n.d(t,"Player",(function(){return YP}))}])}));