PageSourceSearch

https://playerscript.zee5.com/zee5Videojs/4.0.3/webPlayer.bundle.js

js zee5.com collected 2026-10-01 10:38:21 UTC 1,791,664 bytes, 3 lines download raw bytes

1/*! For license information please see webPlayer.bundle.js.LICENSE.txt */
2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.webPlayer=t():e.webPlayer=t()}(self,(()=>(()=>{var e={495:(e,t,i)=>{"use strict";var n=i(840);e.exports=function(e,t){return void 0===t&&(t=!1),function(i,r,s){if(i)e(i);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(n.TextDecoder){var o=(void 0===(l=r.headers&&r.headers["content-type"])&&(l=""),l.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),n=i[0],r=i[1];return"charset"===n.trim()?r.trim():e}),"utf-8"));try{a=new TextDecoder(o).decode(s)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s);var l}}},36:(e,t,i)=>{"use strict";var n=i(840),r=i(634),s=i(56);l.httpHandler=i(495);var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),r=e.slice(i+1).trim();void 0===t[n]?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]})),t):t};function o(e,t,i){var n=e;return s(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function l(e,t,i){return d(t=o(e,t,i))}function d(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,n,r){t||(t=!0,e.callback(i,n,r))};function n(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,y)}function s(){if(!d){var t;clearTimeout(c),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=y,s=null;return 0!==t?(r={body:n(),statusCode:t,method:p,headers:{},url:h,rawRequest:u},u.getAllResponseHeaders&&(r.headers=a(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),i(s,r,r.body)}}var o,d,u=e.xhr||null;u||(u=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var c,h=u.url=e.uri||e.url,p=u.method=e.method||"GET",f=e.body||e.data,g=u.headers=e.headers||{},m=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(s,0)},u.onload=s,u.onerror=r,u.onprogress=function(){},u.onabort=function(){d=!0},u.ontimeout=r,u.open(p,h,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!d){d=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),u.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&u.setRequestHeader(o,g[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(f||null),u}e.exports=l,e.exports.default=l,l.XMLHttpRequest=n.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],(function(e){l["delete"===e?"del":e]=function(t,i,n){return(i=o(t,i,n)).method=e.toUpperCase(),d(i)}}))},582:(e,t)=>{"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=i({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(t.call(void 0,r,n,e))return r}},t.freeze=i,t.MIME_TYPE=n,t.NAMESPACE=r},752:(e,t,i)=>{var n=i(582),r=i(722),s=i(559),a=i(466),o=r.DOMImplementation,l=n.NAMESPACE,d=a.ParseError,u=a.XMLReader;function c(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function f(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}
vendor: 4,147 bytes, line 2
2function g(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function m(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}c.prototype.parseFromString=function(e,t){var i=this.options,n=new u,r=i.domBuilder||new h,a=i.errorHandler,o=i.locator,d=i.xmlns||{},c=/\/x?html?$/.test(t),p=c?s.HTML_ENTITIES:s.XML_ENTITIES;return o&&r.setDocumentLocator(o),n.errorHandler=function(e,t,i){if(!e){if(t instanceof h)return t;e=t}var n={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(i){e(t,i)}:e),n[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+f(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(a,r,o),n.domBuilder=i.domBuilder||r,c&&(d[""]=l.HTML),d.xml=d.xml||l.XML,e&&"string"==typeof e?n.parse(e,d,p):n.errorHandler.error("invalid doc source"),r.doc},h.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,s=r.createElementNS(e,i||t),a=n.length;m(this,s),this.currentElement=s,this.locator&&p(this.locator,s);for(var o=0;o<a;o++){e=n.getURI(o);var l=n.getValue(o),d=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&p(n.getLocator(o),d),d.value=d.nodeValue=l,s.setAttributeNode(d)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&p(this.locator,i),m(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&p(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&p(this.locator,n),m(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&p(this.locator,r),m(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,f(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,f(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.DOMParser=c,r.DOMImplementation,r.XMLSerializer},722:(e,t,i)=>{var n=i(582),r=n.find,s=n.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function d(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function u(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,d(i,n=new n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var c={},h=c.ELEMENT_NODE=1,p=c.ATTRIBUTE_NODE=2,f=c.TEXT_NODE=3,g=c.CDATA_SECTION_NODE=4,m=c.ENTITY_REFERENCE_NODE=5,v=c.ENTITY_NODE=6,y=c.PROCESSING_INSTRUCTION_NODE=7,_=c.COMMENT_NODE=8,b=c.DOCUMENT_NODE=9,T=c.DOCUMENT_TYPE_NODE=10,S=c.DOCUMENT_FRAGMENT_NODE=11,E=c.NOTATION_NODE=12,A={},w={},P=(A.INDEX_SIZE_ERR=(w[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(w[2]="DOMString size error",2),A.HIERARCHY_REQUEST_ERR=(w[3]="Hierarchy request error",3)),C=(A.WRONG_DOCUMENT_ERR=(w[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(w[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(w[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ER
vendor: 6,783 bytes, line 2
2R=(w[7]="No modification allowed",7),A.NOT_FOUND_ERR=(w[8]="Not found",8)),L=(A.NOT_SUPPORTED_ERR=(w[9]="Not supported",9),A.INUSE_ATTRIBUTE_ERR=(w[10]="Attribute in use",10));function D(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,w[e]),this.message=w[e],Error.captureStackTrace&&Error.captureStackTrace(this,D);return i.code=e,t&&(this.message=this.message+": "+t),i}function k(){}function I(e,t){this._node=e,this._refresh=t,R(this)}function R(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(ye(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var n=i.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];d(i,e),e._inc=t}}function N(){}function O(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function M(e,t,i,n){if(n?t[O(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&j(r,e,n),function(e,t,i){e&&e._inc++,i.namespaceURI===s.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(r,e,i))}}function x(e,t,i){var n=O(t,i);if(!(n>=0))throw new D(C,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var s=e.ownerDocument;s&&(j(s,e,i),i.ownerElement=null)}}function B(){}function U(){}function V(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function j(e,t,i,n){e&&e._inc++,i.namespaceURI===s.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function H(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s,delete n[n.length]}}}function G(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function W(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function X(e){return e&&e.nodeType===U.ELEMENT_NODE}function K(e){return e&&e.nodeType===U.TEXT_NODE}function z(e,t){var i=e.childNodes||[];if(r(i,X)||W(t))return!1;var n=r(i,W);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function Y(e,t){var i=e.childNodes||[];if(r(i,(function(e){return X(e)&&e!==t})))return!1;var n=r(i,W);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function Q(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(X);if(a.length>1||r(s,K))throw new D(P,"More than one element or text in fragment");if(1===a.length&&!z(e,i))throw new D(P,"Element in fragment can not be inserted before doctype")}if(X(t)&&!z(e,i))throw new D(P,"Only one element can be added and only after doctype");if(W(t)){if(r(n,W))throw new D(P,"Only one doctype is allowed");var o=r(n,X);if(i&&n.indexOf(o)<n.indexOf(i))throw new D(P,"Doctype can only be inserted before an element");if(!i&&o)throw new D(P,"Doctype can not be appended since element is present")}}function J(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(X);if(a.length>1||r(s,K))throw new D(P,"More than one element or text in fragment");if(1===a.length&&!Y(e,i))throw new D(P,"Element in fragment can not be inserted before doctype")}if(X(t)&&!Y(e,i))throw new D(P,"Only one element can be added and only after doctype");if(W(t)){if(r(n,(function(e){return W(e)&&e!==i})))throw new D(P,"Only one doctype is allowed");var o=r(n,X);if(i&&n.indexOf(o)<n.indexOf(i))throw new D(P,"Doctype can only be inserted before an element")}}function $(e,t,i,n){(function(e,t,i){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new D(P,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new D(C,"child not in parent");if(!function(e){return e&&(X(e)||K(e)||W(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||W(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new D(P,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,i),e.nodeType===U.DOCUMENT_NODE&&(n||Q)(e,t,i);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===S){var s=t.firstChild;if(null==s)return t;var a=t.lastChild}else s=a=t;var o=i?i.previousSibling:e.lastChild;s.previousSibling=o,a.nextSibling=i,o?o.nextSibling=s:e.firstChild=s,null==i?e.lastChild=a:i.previousSibling=a;do{s.parentNode=e}while(s!==a&&(s=s.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==S&&(t.firstChild=t.lastChild=null),t}function Z(){this._nsMap={}}function ee(){}function te(){}function ie(){}function ne(){}function re(){}function se(){}function ae(){}function oe(){}function le(){}function de(){}function ue(){}function ce(){}function he(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return ge(this,i,e,t,a),i.join("")}function pe(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===n&&r===s.XML||r===s.XMLNS)return!1;for(var a=i.length;a--;){var o=i[a];if(o.prefix===n)return o.namespace!==r}return!0}function fe(e,t,i){e.push(" ",t,'="',i.replace(/[<&"]/g,V),'"')}function ge(e,t,i,n,r){if(r||(r=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var a=e.attributes,o=a.length,l=e.firstChild,d=e.tagName,u=d;if(!(i=s.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,v=0;v<a.length;v++)if("xmlns"===a.item(v).name){c=a.item(v).value;break}if(!c)for(var E=r.length-1;E>=0;E--)if(""===(A=r[E]).prefix&&A.namespace===e.namespaceURI){c=A.namespace;break}if(c!==e.namespaceURI)for(E=r.length-1;E>=0;E--){var A;if((A=r[E]).namespace===e.namespaceURI){A.prefix&&(u=A.prefix+":"+d);break}}}t.push("<",u);for(var w=0;w<o;w++)"xmlns"==(P=a.item(w)).prefix?r.push({prefix:P.localName,namespace:P.value}):"xmlns"==P.nodeName&&r.push({prefix:"",namespace:P.value});for(w=0;w<o;w++){var P,C,L;pe(P=a.item(w),0,r)&&(fe(t,(C=P.prefix||"")?"xmlns:"+C:"xmlns",L=P.namespaceURI),r.push({prefix:C,namespace:L})),ge(P,t,i,n,r)}if(d===u&&pe(e,0,r)&&(fe(t,(C=e.prefix||"")?"xmlns:"+C:"xmlns",L=e.namespaceURI),r.push({prefix:C,namespace:L})),l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(d)){if(t.push(">"),i&&/^script$/i.test(d))for(;l;)l.data?t.push(l.data):ge(l,t,i,n,r.slice()),l=l.nextSibling;else for(;l;)ge(l,t,i,n,r.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case b:case S:for(l=e.firstChild;l;)ge(l,t,i,n,r.slice()),l=l.nextSibling;return;case p:return fe(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&]/g,V).replace(/]]>/g,"]]&gt;"));
vendor: 7,174 bytes, line 2
2case g:return t.push("<![CDATA[",e.data,"]]>");case _:return t.push("\x3c!--",e.data,"--\x3e");case T:var D=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),D)t.push(" PUBLIC ",D),k&&"."!=k&&t.push(" ",k),t.push(">");else if(k&&"."!=k)t.push(" SYSTEM ",k,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function me(e,t,i){var n;switch(t.nodeType){case h:(n=t.cloneNode(!1)).ownerDocument=e;case S:break;case p:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var r=t.firstChild;r;)n.appendChild(me(e,r,i)),r=r.nextSibling;return n}function ve(e,t,i){var n=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=t[r];"object"!=typeof s&&s!=n[r]&&(n[r]=s)}switch(t.childNodes&&(n.childNodes=new k),n.ownerDocument=e,n.nodeType){case h:var a=t.attributes,o=n.attributes=new N,l=a.length;o._ownerElement=n;for(var d=0;d<l;d++)n.setAttributeNode(ve(e,a.item(d),!0));break;case p:i=!0}if(i)for(var u=t.firstChild;u;)n.appendChild(ve(e,u,i)),u=u.nextSibling;return n}function ye(e,t,i){e[t]=i}A.INVALID_STATE_ERR=(w[11]="Invalid state",11),A.SYNTAX_ERR=(w[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(w[13]="Invalid modification",13),A.NAMESPACE_ERR=(w[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(w[15]="Invalid access",15),D.prototype=Error.prototype,d(A,D),k.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)ge(this[n],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},I.prototype.item=function(e){return R(this),this[e]||null},u(I,k),N.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new D(L);var i=this.getNamedItem(e.nodeName);return M(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new D(L);return t=this.getNamedItemNS(e.namespaceURI,e.localName),M(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return x(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return x(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new q;if(n.implementation=this,n.childNodes=new k,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new se;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},U.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 $(this,e,t)},replaceChild:function(e,t){$(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return G(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ve(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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 i=t._nsMap;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e)return n;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},d(c,U),d(c,U.prototype),q.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return $(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),G(this,e)},replaceChild:function(e,t){$(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),X(e)&&(this.documentElement=e)},importNode:function(e,t){return me(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(i){if(i.nodeType==h&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=l(e);return new I(this,(function(i){var n=[];return t.length>0&&F(i.documentElement,(function(r){if(r!==i&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=l(s);a=t.every((d=o,function(e){return d&&-1!==d.indexOf(e)}))}a&&n.push(r)}}var d})),n}))},createElement:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new k,(t.attributes=new N)._ownerElement=t,t},createDocumentFragment:function(){var e=new de;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new ue;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new Z,n=t.split(":"),r=i.attributes=new N;return i.childNodes=new k,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new ee,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},u(q,U),Z.prototype={nodeType:h,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 i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
vendor: 3,643 bytes, line 2
2,appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(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 i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new I(this,(function(t){var i=[];return F(t,(function(n){n===t||n.nodeType!=h||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new I(this,(function(i){var n=[];return F(i,(function(r){r===i||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},q.prototype.getElementsByTagName=Z.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=Z.prototype.getElementsByTagNameNS,u(Z,U),ee.prototype.nodeType=p,u(ee,U),te.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(w[P])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},u(te,U),ie.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},u(ie,te),ne.prototype={nodeName:"#comment",nodeType:_},u(ne,te),re.prototype={nodeName:"#cdata-section",nodeType:g},u(re,te),se.prototype.nodeType=T,u(se,U),ae.prototype.nodeType=E,u(ae,U),oe.prototype.nodeType=v,u(oe,U),le.prototype.nodeType=m,u(le,U),de.prototype.nodeName="#document-fragment",de.prototype.nodeType=S,u(de,U),ue.prototype.nodeType=y,u(ue,U),ce.prototype.serializeToString=function(e,t,i){return he.call(e,t,i)},U.prototype.toString=he;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case h:case S:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(_e(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(I.prototype,"length",{get:function(){return R(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case h:case S: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}}}),ye=function(e,t,i){e["$$"+t]=i}}}catch(be){}t.DocumentType=se,t.DOMException=D,t.DOMImplementation=B,t.Element=Z,t.Node=U,t.NodeList=k,t.XMLSerializer=ce},559:(e,t,i)=>{"use strict";var n=i(582).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n
vendor: 28,727 bytes, line 2
2({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),
vendor: 1,441 bytes, line 2
2t.entityMap=t.HTML_ENTITIES},978:(e,t,i)=>{var n=i(722);n.DOMImplementation,n.XMLSerializer,t.DOMParser=i(752).DOMParser},466:(e,t,i)=>{var n=i(582).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function d(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,i,r,s,a){function o(e,t,n){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t,n)}for(var l,d=++t,u=0;;){var c=e.charAt(d);switch(c){case"=":if(1===u)l=e.slice(t,d),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(a.warning('attribute value must after "="'),l=e.slice(t,d)),t=d+1,!((d=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(l,h=e.slice(t,d).replace(/&#?\w+;/g,s),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');o(l,h=e.slice(t,d).replace(/&#?\w+;/g,s),t),a.warning('attribute "'+l+'" missed start quot('+c+")!!"),t=d+1,u=5}break;case"/":switch(u){case 0:i.setTagName(e.slice(t,d));
vendor: 4,969 bytes, line 2
2case 5:case 6:case 7:u=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==u&&i.setTagName(e.slice(t,d)),d;case">":switch(u){case 0:i.setTagName(e.slice(t,d));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,d)).slice(-1)&&(i.closed=!0,h=h.slice(0,-1));case 2:2===u&&(h=l),4==u?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h.replace(/&#?\w+;/g,s),t)):(n.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return d;case"€":c=" ";default:if(c<=" ")switch(u){case 0:i.setTagName(e.slice(t,d)),u=6;break;case 1:l=e.slice(t,d),u=2;break;case 4:var h=e.slice(t,d).replace(/&#?\w+;/g,s);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:u=6}else switch(u){case 2:i.tagName,n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=d,u=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:u=1,t=d;break;case 3:u=4,t=d;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function c(e,t,i){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,d=o.value;if((p=l.indexOf(":"))>0)var u=o.prefix=l.slice(0,p),c=l.slice(p+1),h="xmlns"===u&&c;else c=l,u=null,h="xmlns"===l&&"";o.localName=c,!1!==h&&(null==s&&(s={},f(i,i={})),i[h]=s[h]=d,o.uri=n.XMLNS,t.startPrefixMapping(h,d))}for(a=e.length;a--;)(u=(o=e[a]).prefix)&&("xml"===u&&(o.uri=n.XML),"xmlns"!==u&&(o.uri=i[u||""]));var p;(p=r.indexOf(":"))>0?(u=e.prefix=r.slice(0,p),c=e.localName=r.slice(p+1)):(u=null,c=e.localName=r);var g=e.uri=i[u||""];if(t.startElement(g,c,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=s,!0;if(t.endElement(g,c,r),s)for(u in s)Object.prototype.hasOwnProperty.call(s,u)&&t.endPrefixMapping(u)}function h(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=e.indexOf("</"+i+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s)}return t+1}function p(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function f(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function g(e,t,i,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var s=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=t,r.exec(e);i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,d=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],d=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(d=s[3][0]));var u=s[a-1];return i.startDTD(o,l,d),i.endDTD(),u.index+u[0].length}return-1}function m(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,i.processingInstruction(r[1],r[2]),n+2):-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,i,r,s){function a(e){var t=e.slice(1,-1);return t in i?i[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>A){var i=e.substring(A,t).replace(/&#?\w+;/g,a);T&&f(A),r.characters(i,0,t-A),A=t}}function f(t,i){for(;t>=_&&(i=b.exec(e));)y=i.index,_=y+i[0].length,T.lineNumber++;T.columnNumber=t-y+1}for(var y=0,_=0,b=/.*(?:\r\n?|\n)|.*$/g,T=r.locator,S=[{currentNSMap:t}],E={},A=0;;){try{var w=e.indexOf("<",A);if(w<0){if(!e.substr(A).match(/^\s*$/)){var P=r.doc,C=P.createTextNode(e.substr(A));P.appendChild(C),r.currentElement=C}return}switch(w>A&&l(w),e.charAt(w+1)){case"/":var L=e.indexOf(">",w+3),D=e.substring(w+2,L).replace(/[ \t\n\r]+$/g,""),k=S.pop();L<0?(D=e.substring(w+2).replace(/[\s<].*/,""),s.error("end tag name: "+D+" is not complete:"+k.tagName),L=w+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),s.error("end tag name: "+D+" maybe not complete"),L=w+1+D.length);var I=k.localNSMap,R=k.tagName==D;if(R||k.tagName&&k.tagName.toLowerCase()==D.toLowerCase()){if(r.endElement(k.uri,k.localName,D),I)for(var N in I)Object.prototype.hasOwnProperty.call(I,N)&&r.endPrefixMapping(N);R||s.fatalError("end tag name: "+D+" is not match the current start tagName:"+k.tagName)}else S.push(k);L++;break;case"?":T&&f(w),L=m(e,w,r);break;
vendor: 4,012 bytes, line 2
2case"!":T&&f(w),L=g(e,w,r,s);break;default:T&&f(w);var O=new v,M=S[S.length-1].currentNSMap,x=(L=u(e,w,O,M,a,s),O.length);if(!O.closed&&p(e,L,O.tagName,E)&&(O.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),T&&x){for(var B=d(T,{}),U=0;U<x;U++){var V=O[U];f(V.offset),V.locator=d(T,{})}r.locator=B,c(O,r,M)&&S.push(O),r.locator=T}else c(O,r,M)&&S.push(O);n.isHTML(O.uri)&&!O.closed?L=h(e,L,O.tagName,a,r):L++}}catch(e){if(e instanceof o)throw e;s.error("element parse error: "+e),L=-1}L>A?A=L:l(Math.max(w,A)+1)}}(e,t,i,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},7:e=>{"use strict";var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,s),n(i)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,r)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,s,a,d;if(o(i),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),a=s[t]),void 0===a)a=s[t]=i,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=l(e))>0&&a.length>r&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,d=u,console&&console.warn&&console.warn(d)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=u.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function g(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(s){n.once&&e.removeEventListener(t,r),i(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
2,set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var d=l.length,u=f(l,d);for(i=0;i<d;++i)n(u[i],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,n,r,s,a;if(o(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,s=i.length-1;s>=0;s--)if(i[s]===t||i[s].listener===t){a=i[s].listener,r=s;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,s=Object.keys(i);for(n=0;n<s.length;++n)"removeListener"!==(r=s[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},697:(e,t,i)=>{var n,r=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},s=i(542);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=n},840:(e,t,i)=>{var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},56:e=>{e.exports=function(e){if(!e)return!1;var i=t.call(e);return"[object Function]"===i||"function"==typeof e&&"[object RegExp]"!==i||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},647:function(e){e.exports=function(){"use strict";function e(){return void 0!==navigator.brave&&void 0!==navigator.brave.isBrave}function t(){return"string"==typeof navigator.userAgent&&navigator.userAgent.match(/Opera|OPR\//)}function i(){return new Promise((function(e,t){var i=new XMLHttpRequest;i.onreadystatechange=function(){4==i.readyState&&e(i)},i.open("GET","https://raw.githubusercontent.com/wmcmurray/just-detect-adblock/master/baits/pagead2.googlesyndication.com",!0),i.send()}))}function n(e){return 200===e.status&&!e.responseText.match(/^thistextshouldbethere(\n|)$/)}function r(e){return 0===e.status&&!e.responseText.match(/^thistextshouldbethere(\n|)$/)}function s(){if(null!==window.document.body.getAttribute("abp"))return!0;var e=function(){var e=document.createElement("div");return e.setAttribute("class","pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links ad-text adSense adBlock adContent adBanner"),e.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;"),e}();window.document.body.appendChild(e);var t=function(e){if(null===e.offsetParent||0==e.offsetHeight||0==e.offsetLeft||0==e.offsetTop||0==e.offsetWidth||0==e.clientHeight||0==e.clientWidth)return!0;
2if(void 0!==window.getComputedStyle){var t=window.getComputedStyle(e,null);if(t&&("none"==t.getPropertyValue("display")||"hidden"==t.getPropertyValue("visibility")))return!0}return!1}(e);return window.document.body.removeChild(e),t}var a;return{detectAnyAdblocker:function(){return new Promise((function(a,o){if(s())return a(!0);e()||t()?i().then((function(i){return e()?a(n(i)):t()?a(r(i)):void a(!1)})):a(!1)}))},detectDomAdblocker:(a=s,function(){var e=arguments;return new Promise((function(t,i){t(a.apply(this,e))}))}),detectBraveShields:function(){return new Promise((function(t,r){e()?i().then((function(e){t(n(e))})):t(!1)}))},detectOperaAdblocker:function(){return new Promise((function(e,n){t()?i().then((function(t){e(r(t))})):e(!1)}))},isDetected:function(e,t){return function(){return console.warn("just-detect-adblock : The `isDetected()` method is now deprecated, please use `detectAnyAdblocker()` instead, which returns a Promise and can detect more stuff (like Brave Shields)."),e.apply(this,arguments)}}(s)}}()},545:(e,t)=>{function i(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var i,s=String(e);return(i=n[s.toLowerCase()])?i:(i=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if("string"==typeof t){var s;if(s=n[t.toLowerCase()])return s===i;if(s=r[t.toLowerCase()])return s===i}else if("number"==typeof t)return t===i;return!1}};var n=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(s=97;s<123;s++)n[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)n[s-48]=s;for(s=1;s<13;s++)n["f"+s]=s+111;for(s=0;s<10;s++)n["numpad "+s]=s+96;var a=t.names=t.title={};for(s in n)a[n[s]]=s;for(var o in r)n[o]=r[o]},962:(e,t,i)=>{var n=i(626).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===i.version?(i.earliestPresentationTime=t.getUint32(r),i.firstOffset=t.getUint32(r+4),r+=8):(i.earliestPresentationTime=n(e.subarray(r)),i.firstOffset=n(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)i.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return i}},622:e=>{var t,i,n,r,s,a,o,l=9e4;t=function(e){return e*l},i=function(e,t){return e*t},n=function(e){return e/l},r=function(e,t){return e/t},s=function(e,i){return t(r(e,i))},a=function(e,t){return i(n(e),t)},o=function(e,t,i){return n(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:t,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:r,audioTsToVideoTs:s,videoTsToAudioTs:a,metadataTsToSeconds:o}},626:e=>{var t=Math.pow(2,32);e.exports={getUint64:function(e){var i,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(i=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(i):i:n.getUint32(0)*t+n.getUint32(4)},MAX_UINT32:t}},989:e=>{var t;self,t=()=>(()=>{var e={61:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});class n{}n.Products={VIDEO_ANALYTICS:"videoAnalytics",BALANCER:"balancer",DEVICE_ANALYTICS:"deviceAnalytics"},n.AnalyticsVariables={VIEW_CODE:"viewCode",METHOD_OPTION:"methodOption"},n.BalancerVariables={AS_ENABLED:"activeSwitchingEnabled",PROFILE_NAME:"profileName",BUCKET:"bucket",DECISION_FINISHED:"decisionFinished",LAST_USED_CDN:"lastUsedCdn",BALANCER_TRAFFIC:"balancerTraffic",BALANCER_BITRATE:"balancerBitrate"},n.Consumer={NQS:"NQS",PERSISTENT:"PERSISTENT",BLACK_HOLE:"BLACK_HOLE"},n.DeviceVariables={APP_ANALYTICS_DEVICE_STRING:"deviceString"}},108:(e,t,i)=>{"use strict";var n;i.d(t,{A:()=>s});class r{}n=r,r.VideoService={INIT:"/init",START:"/start",JOIN:"/joinTime",PAUSE:"/pause",RESUME:"/resume",SEEK:"/seek",BUFFER:"/bufferUnderrun",ERROR:"/error",STOP:"/stop",PING:"/ping",DATA_OBJECT:"/data"},r.Service=Object.assign(Object.assign({DATA:"/data",ADAPTERS:"/adapters",CONFIGURATION:"/configuration",APP_ANALYTICS_PLUGIN_LOGS:"/infinity/session/pluginLogs",VIDEO_PLUGIN_LOGS:"/infinity/video/pluginLogs"},n.VideoService),{CDN:"/cdn",VIDEO_EVENT:"/infinity/video/event",AD_INIT:"/adInit",AD_START:"/adStart",AD_JOIN:"/adJoin",AD_PAUSE:"/adPause",AD_RESUME:"/adResume",AD_BUFFER:"/adBufferUnderrun",AD_STOP:"/adStop",AD_CLICK:"/adClick",AD_ERROR:"/adError",AD_MANIFEST:"/adManifest",AD_POD_START:"/adBreakStart",AD_POD_STOP:"/adBreakStop",AD_QUARTILE:"/adQuartile",EVENT:"/infinity/session/event",SESSION_START:"/infinity/session/start",SESSION_STOP:"/infinity/session/stop",NAV:"/infinity/session/nav",BEAT:"/infinity/session/beat",OFFLINE_EVENTS:"/offlineEvents"});const s=r},245:(e,t,i)=>{var n=i(3948).extend({constructor:function(e){this.plugin=e},getAllData:function(){var e=this.getNonRandomData();return e.timestamp=this.getTimestamp(),e},getNonRandomData:function(){var e={};return e.userAgent=this.getUserAgent(),e.threads=this.getVirtualCores(),e.language=this.getLanguage(),e.langList=this.getAvailableLanguages(),e.resolution=this.getResolution(),e.colorDepth=this.getColorDepth(),e.deviceMemory=this.getMemory(),e.touchscreen=this.getTouchscreen(),e.localStorage=this.getLocalStorage(),e.sessionStorage=this.getSessionStorage(),e.cookiesAvailable=this.getCookiesAvailable(),e.flashAvailable=this.getHasFlash(),e.t
2imeZone=this.getTimeZone(),e.plugins=this.getPluginList(),e},getUserAgent:function(){return this._getNavigatorValue("userAgent")},getVirtualCores:function(){return this._getNavigatorValue("hardwareConcurrency")},getLanguage:function(){return this._getNavigatorValue("language")},getAvailableLanguages:function(){return this._getNavigatorValue("languages")},getResolution:function(){var e=null;try{this._getNavigatorValue("screen")&&(e=navigator.screen.width.toString()+navigator.screen.height.toString())}catch(e){}return e},getColorDepth:function(){var e=null;try{this._getNavigatorValue("screen")&&(e=navigator.screen.colorDepth)}catch(e){}return e},getMemory:function(){return this._getNavigatorValue("deviceMemory")},getTouchscreen:function(){return this._getNavigatorValue("maxTouchPoints")||!1},getLocalStorage:function(){var e=!1;try{e="undefined"!=typeof localStorage}catch(e){}return e},getSessionStorage:function(){var e=!1;try{e="undefined"!=typeof sessionStorage}catch(e){}return e},getCookiesAvailable:function(){return this._getNavigatorValue("cookieEnabled")||!1},getHasFlash:function(){var e=!1;try{var t=this._getNavigatorValue("plugins");e=t&&"object"==typeof t["Shockwave Flash"]||"undefined"!=typeof window&&window.ActiveXObject&&!1!==new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}return e},getPluginList:function(){var e=null;try{var t=this._getNavigatorValue("plugins");if(t&&0!==t.length){for(var i="",n=0;n<navigator.plugins.length;n++)i+=navigator.plugins[n].description+" "+navigator.plugins[n].filename+" "+navigator.plugins[n].name+" ";e=i}}catch(e){}return e},getTimeZone:function(){var e=null;try{e=(new Date).getTimezoneOffset().toString()}catch(e){}return e},getTimestamp:function(){return(new Date).getTime()},_navigatorCheck:function(){return"undefined"!=typeof navigator},_getNavigatorValue:function(e){var t=null;try{this._navigatorCheck()&&(t=navigator[e])}catch(e){}return t}});e.exports=n},470:(e,t,i)=>{var n=i(3948);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a=n.extend({constructor:function(e,t,i,n){this.prefix=e||"npaw",this.disableCookies=t,this.forceCookies=i,this.disabled=n},updateStorageOptions:function(e,t,i){this.disableCookies=e,this.forceCookies=t,this.disabled=i},isEnabled:function(){if(this.disabled)return!1;var e=!0;if(!this.forceCookies)try{localStorage.setItem(this.prefix+".test","true"),localStorage.removeItem(this.prefix+".test")}catch(t){e=!1}return e},setLocal:function(e,t){if(this.disabled)return null;var i=null;try{!this.forceCookies&&("undefined"!=typeof localStorage&&localStorage||this.disableCookies)?"undefined"!=typeof localStorage&&localStorage&&(i=localStorage.setItem(this.prefix+"."+e,t)):i=this._setCookie(this.prefix+".local."+e,t)}catch(e){r.error(s,"Npaw App Analytics needs localStorage or cookies, not supported by your browser.")}return i},getLocal:function(e){return this.disabled?null:this._localGetRemove("getItem","_getCookie",e)},removeLocal:function(e){return this.disabled?null:this._localGetRemove("removeItem","_removeCookie",e)},_localGetRemove:function(e,t,i){var n=null;try{!this.forceCookies&&("undefined"!=typeof localStorage&&localStorage||this.disableCookies)?"undefined"!=typeof localStorage&&localStorage&&(n=localStorage[e](this.prefix+"."+i)):n=this[t](this.prefix+".local."+i)}catch(e){r.error(s,"Npaw App Analytics needs localStorage or cookies, not supported by your browser.")}return n},setSession:function(e,t){if(this.disabled)return null;var i=null;try{i=!this.forceCookies&&("undefined"!=typeof sessionStorage&&sessionStorage||this.disableCookies)?sessionStorage.setItem(this.prefix+"."+e,t):this._setCookie(this.prefix+".session."+e,t)}catch(e){r.error(s,"Npaw App Analytics needs sessionStorage or cookies, not supported by your browser.")}return i},getSession:function(e){return this.disabled?null:this._sessionGetRemove("getItem","_getCookie",e)},removeSession:function(e){return this.disabled?null:this._sessionGetRemove("removeItem","_removeCookie",e)},_sessionGetRemove:function(e,t,i){var n=null;try{n=!this.forceCookies&&("undefined"!=typeof sessionStorage&&sessionStorage||this.disableCookies)?sessionStorage[e](this.prefix+"."+i):this[t](this.prefix+".session."+i)}catch(e){r.error(s,"Npaw App Analytics needs sessionStorage or cookies, not supported by your browser.")}return n},getStorages:function(e){return this.disabled?null:this.getSession(e)||this.getLocal(e)},setStorages:function(e,t){if(this.disabled)return null;this.setSession(e,t),this.setLocal(e,t)},removeStorages:function(e){if(this.disabled)return null;this.removeSession(e),this.removeLocal(e)}
2,_setCookie:function(e,t){if("undefined"!=typeof document){var i=";";"undefined"!=typeof location&&(i+="domain="+location.host.split(".").reverse().splice(0,2).reverse().join(".")+";path=/;"),document.cookie=e+"="+t+i}},_getCookie:function(e){if("undefined"!=typeof document)for(var t=e+"=",i=decodeURIComponent(document.cookie).split(";"),n=0;n<i.length;n++){for(var r=i[n];" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},_removeCookie:function(e){this._setCookie(e,"")}});e.exports=a},525:(e,t)=>{"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=i({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(t.call(void 0,r,n,e))return r}},t.freeze=i,t.MIME_TYPE=n,t.NAMESPACE=r},563:e=>{e.exports={cdnName:"FASTLY",parsers:[{element:"host",headerName:"X-Served-By",regex:/([^,\s]+)$/},{element:"type",headerName:"X-Cache",regex:/([^,\s]+)$/}],parseType:function(e){switch(e){case"HIT":return 1;case"MISS":return 2;default:return 0}}}},594:(e,t,i)=>{var n=i(7086);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a={getPlayrate:function(){return this.flags.isPaused?0:1},getFramesPerSecond:function(){},getDroppedFrames:function(){},getThroughput:function(){},getRendition:function(){},getTitle2:function(){},getIsLive:function(){},getCdnTraffic:function(){},getP2PTraffic:function(){},getUploadTraffic:function(){},getIsP2PEnabled:function(){},getSegmentDuration:function(){},getHouseholdId:function(){},getLatency:function(){},getPacketLoss:function(){},getPacketSent:function(){},getMetrics:function(){},getAudioCodec:function(){},getVideoCodec:function(){},setUrlToParse:function(e){this._urlToParse=e},getURLToParse:function(){return this._urlToParse||void 0},fireSeekBegin:function(e,t,i){if(this._discardFalseBuffers(),!(this.getVideo()&&this.getVideo().getIsLive()&&this.plugin.options["content.isLive.noSeek"])&&this.flags.isJoined&&!this.flags.isSeeking){if(this.flags.isBuffering){if(!1===t)return;r.notice(s,"Converting current buffer to seek"),this.chronos.seek=this.chronos.buffer.clone(),this.chronos.buffer.reset(),this.flags.isBuffering=!1}else this.chronos.seek.start();try{this.fireEventsStruct.seek=[],i?this.fireEventsStruct.seek.push(i):this.fireEventsStruct.seek.push("undefinedEvent")}catch(e){}this.flags.isSeeking=!0,this.emit(n.Event.SEEK_BEGIN,{params:e})}},fireSeekEnd:function(e,t){if(!(this.getVideo()&&this.getVideo().getIsLive()&&this.plugin.options["content.isLive.noSeek"])&&this.flags.isJoined&&this.flags.isSeeking){try{t?this.fireEventsStruct.seek.push(t):this.fireEventsStruct.seek.push("undefinedEvent")}catch(e){}(e=e||{}).triggeredEvents=this.fireEventsStruct.seek,this.cancelSeek(),this.emit(n.Event.SEEK_END,{params:e});try{this.chronos.pause.getDeltaTime(!1)>0&&this.chronos.pause.resume()}catch(e){}}},cancelSeek:function(e){this.flags.isJoined&&this.flags.isSeeking&&(this.flags.isSeeking=!1,this.chronos.seek.stop(),this.monitor&&this.monitor.skipNextTick())},fireEvent:function(e,t,i,r,s){if("data"===e)this.emit(n.Event.DATA_OBJECT,{params:r});else{var a=r||{};a.name=e||"",a.dimensions=t||{},a.values=i||{},s&&(a.hasEndDatetime=s||!1),this.emit(n.Event.VIDEO_EVENT,{params:a})}},fireEventEnd:function(e){var t={};t.name=e||"",this.emit(n.Event.VIDEO_EVENT_END,{params:t})},storeNewRendition:function(e){this.getVideo().triggerUpdateRendition(e)}};e.exports=a},703:e=>{e.exports={Preroll:"pre",Midroll:"mid",Postroll:"post"}},825:e=>{e.exports={WILL_SEND_LOG_PLUGIN_INIT:"will-send-log-plugin-init",WILL_SEND_LOG_PLUGIN_SET_OPTIONS:"will-send-log-plugin-set-options",WILL_SEND_LOG_PLUGIN_RECEIVE_DATA:"will-send-log-plugin-receive-data",WILL_SEND_LOG_INFINITY_BEGIN:"will-send-log-infinity-begin",WILL_SEND_LOG_INFINITY_START:"will-send-log-infinity-start",WILL_SEND_LOG_INFINITY_EVENT:"will-send-log-infinity-event",WILL_SEND_LOG_INFINITY_EVENT_END:"will-send-log-infinity-event-end",WILL_SEND_LOG_INFINITY_NAV:"will-send-log-infinity-nav",WILL_SEND_LOG_INFINITY_NEW_SESSION:"will-send-log-infinity-new-session"}},1048:(e,t,i)=>{"use strict";const n=i(7991),r=i(9318),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=l,t.IS=50;const a=2147483647;function o(e){if(e>
vendor: 4,688 bytes, line 2
2a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return d(e,t,i)}function d(e,t,i){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const i=0|g(e,t);let n=o(i);const r=n.write(e,t);return r!==i&&(n=n.slice(0,r)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return p(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return p(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,i);const r=function(e){if(l.isBuffer(e)){const t=0|f(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),i=o(t);for(let n=0;n<t;n+=1)i[n]=255&e[n];return i}function p(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(n,l.prototype),n}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return K(e).length;default:if(r)return n?-1:X(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,i){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,i);case"utf8":case"utf-8":return P(this,t,i);case"ascii":return L(this,t,i);case"latin1":case"binary":return D(this,t,i);case"base64":return w(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function y(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),Q(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:_(e,t,i,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):_(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function _(e,t,i,n,r){let s,a=1,o=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,i/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){let n=-1;for(s=i;s<o;
vendor: 4,744 bytes, line 2
2s++)if(d(e,s)===d(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===l)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(i+l>o&&(i=o-l),s=i;s>=0;s--){let i=!0;for(let n=0;n<l;n++)if(d(e,s+n)!==d(t,n)){i=!1;break}if(i)return s}return-1}function b(e,t,i,n){i=Number(i)||0;const r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Q(n))return a;e[i+a]=n}return a}function T(e,t,i,n){return z(X(t,e.length-i),e,i,n)}function S(e,t,i,n){return z(function(e){const t=[];for(let i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function E(e,t,i,n){return z(K(t),e,i,n)}function A(e,t,i,n){return z(function(e,t){let i,n,r;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)i=e.charCodeAt(a),n=i>>8,r=i%256,s.push(r),s.push(n);return s}(t,e.length-i),e,i,n)}function w(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function P(e,t,i){i=Math.min(e.length,i);const n=[];let r=t;for(;r<i;){const t=e[r];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(r+a<=i){let i,n,o,l;switch(a){case 1:t<128&&(s=t);break;case 2:i=e[r+1],128==(192&i)&&(l=(31&t)<<6|63&i,l>127&&(s=l));break;case 3:i=e[r+1],n=e[r+2],128==(192&i)&&128==(192&n)&&(l=(15&t)<<12|(63&i)<<6|63&n,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:i=e[r+1],n=e[r+2],o=e[r+3],128==(192&i)&&128==(192&n)&&128==(192&o)&&(l=(15&t)<<18|(63&i)<<12|(63&n)<<6|63&o,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),r+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=C));return i}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,i){return d(e,t,i)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,i){return function(e,t,i){return u(e),e<=0?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},l.allocUnsafe=function(e){return c(e)},l.allocUnsafeSlow=function(e){return c(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,n=t.length;for(let r=0,s=Math.min(i,n);r<s;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const n=l.allocUnsafe(t);let r=0;for(i=0;i<e.length;++i){let t=e[i];if(Y(t,Uint8Array))r+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,r)):Uint8Array.prototype.set.call(n,t,r);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,r)}r+=t.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):m.apply(this,arguments)}
vendor: 12,004 bytes, line 2
2,l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,i,n,r){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;let s=(r>>>=0)-(n>>>=0),a=(i>>>=0)-(t>>>=0);const o=Math.min(s,a),d=this.slice(n,r),u=e.slice(t,i);for(let e=0;e<o;++e)if(d[e]!==u[e]){s=d[e],a=u[e];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return y(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return y(this,e,t,i,!1)},l.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}const r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return b(this,e,t,i);case"utf8":case"utf-8":return T(this,e,t,i);case"ascii":case"latin1":case"binary":return S(this,e,t,i);case"base64":return E(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function L(e,t,i){let n="";i=Math.min(e.length,i);for(let r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function D(e,t,i){let n="";i=Math.min(e.length,i);for(let r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function k(e,t,i){const n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);let r="";for(let n=t;n<i;++n)r+=J[e[n]];return r}function I(e,t,i){const n=e.slice(t,i);let r="";for(let e=0;e<n.length-1;e+=2)r+=String.fromCharCode(n[e]+256*n[e+1]);return r}function R(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,i,n,r,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<s)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function O(e,t,i,n,r){j(t,n,r,e,i,7);let s=Number(t&BigInt(4294967295));e[i++]=s,s>>=8,e[i++]=s,s>>=8,e[i++]=s,s>>=8,e[i++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a,i}function M(e,t,i,n,r){j(t,n,r,e,i,7);let s=Number(t&BigInt(4294967295));e[i+7]=s,s>>=8,e[i+6]=s,s>>=8,e[i+5]=s,s>>=8,e[i+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[i+3]=a,a>>=8,e[i+2]=a,a>>=8,e[i+1]=a,a>>=8,e[i]=a,i+8}function x(e,t,i,n,r,s){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function B(e,t,i,n,s){return t=+t,i>>>=0,s||x(e,0,i,4),r.write(e,t,i,n,23,4),i+4}function U(e,t,i,n,s){return t=+t,i>>>=0,s||x(e,0,i,8),r.write(e,t,i,n,52,8),i+8}l.prototype.slice=function(e,t){const i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||R(e,t,this.length);let n=this[e],r=1,s=0;for(;++s<t&&(r*=256);)n+=this[e+s]*r;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||R(e,t,this.length);let n=this[e+--t],r=1;for(;t>0&&(r*=256);)n+=this[e+--t]*r;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=$((function(e){H(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+i*2**24;return BigInt(n)+(BigInt(r)<<BigInt(32))})),l.prototype.readBigUInt64BE=$((function(e){H(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+i;return(BigInt(n)<<BigInt(32))+BigInt(r)})),l.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||R(e,t,this.length);let n=this[e],r=1,s=0;for(;++s<t&&(r*=256);)n+=this[e+s]*r;return r*=128,n>=r&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||R(e,t,this.length);let n=t,r=1,s=this[e+--n];for(;n>0&&(r*=256);)s+=this[e+--n]*r;return r*=128,s>=r&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=$((function(e){H(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=$((function(e){H(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+i)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||N(this,e,t,i,Math.pow(2,8*i)-1,0);let r=1,s=0;for(this[t]=255&e;++s<i&&(r*=256);)this[t+s]=e/r&255;return t+i},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,i,n){e=+e,t>>>=0,i>>>=0,n||N(this,e,t,i,Math.pow(2,8*i)-1,0);let r=i-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+i},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=$((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*i-1);N(this,e,t,i,n-1,-n)}let r=0,s=1,a=0;for(this[t]=255&e;++r<i&&(s*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/s|0)-a&255;return t+i},l.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*i-1);N(this,e,t,i,n-1,-n)}let r=i-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s|0)-a&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=$((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,i){return B(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return B(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return U(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return U(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);const r=n-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),t),r},l.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;let r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(r=t;r<i;++r)this[r]=e;else{const s=l.isBuffer(e)?e:l.from(e,n),a=s.length;
2if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<i-t;++r)this[r+t]=s[r%a]}return this};const V={};function F(e,t,i){V[e]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",i=e.length;const n="-"===e[0]?1:0;for(;i>=n+4;i-=3)t=`_${e.slice(i-3,i)}${t}`;return`${e.slice(0,i)}${t}`}function j(e,t,i,n,r,s){if(e>i||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${i}${n}`,new V.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,i){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+i]||G(t,e.length-(i+1))}(n,r,s)}function H(e,t){if("number"!=typeof e)throw new V.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,i){if(Math.floor(e)!==e)throw H(e,i),new V.ERR_OUT_OF_RANGE(i||"offset","an integer",e);if(t<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,i){let n=`The value of "${e}" is out of range.`,r=i;return Number.isInteger(i)&&Math.abs(i)>2**32?r=q(String(i)):"bigint"==typeof i&&(r=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(r=q(r)),r+="n"),n+=` It must be ${t}. Received ${r}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function X(e,t){let i;t=t||1/0;const n=e.length;let r=null;const s=[];for(let a=0;a<n;++a){if(i=e.charCodeAt(a),i>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,i,n){let r;for(r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let i=0;i<16;++i){const n=16*i;for(let r=0;r<16;++r)t[n+r]=e[i]+e[r]}return t}();function $(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},1083:e=>{e.exports={ClientSide:"csai",ServerSide:"ssai"}},1129:(e,t,i)=>{var n=i(525),r=n.find,s=n.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function d(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function u(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,d(i,n=new n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var c={},h=c.ELEMENT_NODE=1,p=c.ATTRIBUTE_NODE=2,f=c.TEXT_NODE=3,g=c.CDATA_SECTION_NODE=4,m=c.ENTITY_REFERENCE_NODE=5,v=c.ENTITY_NODE=6,y=c.PROCESSING_INSTRUCTION_NODE=7,_=c.COMMENT_NODE=8,b=c.DOCUMENT_NODE=9,T=c.DOCUMENT_TYPE_NODE=10,S=c.DOCUMENT_FRAGMENT_NODE=11,E=c.NOTATION_NODE=12,A={},w={},P=(A.INDEX_SIZE_ERR=(w[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(w[2]="DOMString size error",2),A.HIERARCHY_REQUEST_ERR=(w[3]="Hierarchy request error",3)),C=(A.WRONG_DOCUMENT_ERR=(w[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(w[5]="Invalid character",5),A.NO_DATA_ALLOWED_ER
vendor: 2,505 bytes, line 2
2R=(w[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(w[7]="No modification allowed",7),A.NOT_FOUND_ERR=(w[8]="Not found",8)),L=(A.NOT_SUPPORTED_ERR=(w[9]="Not supported",9),A.INUSE_ATTRIBUTE_ERR=(w[10]="Attribute in use",10));function D(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,w[e]),this.message=w[e],Error.captureStackTrace&&Error.captureStackTrace(this,D);return i.code=e,t&&(this.message=this.message+": "+t),i}function k(){}function I(e,t){this._node=e,this._refresh=t,R(this)}function R(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(_e(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var n=i.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];d(i,e),e._inc=t}}function N(){}function O(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function M(e,t,i,n){if(n?t[O(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&j(r,e,n),function(e,t,i){e&&e._inc++,i.namespaceURI===s.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(r,e,i))}}function x(e,t,i){var n=O(t,i);if(!(n>=0))throw new D(C,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var s=e.ownerDocument;s&&(j(s,e,i),i.ownerElement=null)}}function B(){}function U(){}function V(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function j(e,t,i,n){e&&e._inc++,i.namespaceURI===s.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function H(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s,delete n[n.length]}}}function G(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function W(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function X(e){return e&&e.nodeType===U.ELEMENT_NODE}function K(e){return e&&e.nodeType===U.TEXT_NODE}function z(e,t){var i=e.childNodes||[];if(r(i,X)||W(t))return!1;var n=r(i,W);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function Y(e,t){var i=e.childNodes||[];if(r(i,(function(e){return X(e)&&e!==t})))return!1;var n=r(i,W);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function Q(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];
vendor: 4,572 bytes, line 2
2if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(X);if(a.length>1||r(s,K))throw new D(P,"More than one element or text in fragment");if(1===a.length&&!z(e,i))throw new D(P,"Element in fragment can not be inserted before doctype")}if(X(t)&&!z(e,i))throw new D(P,"Only one element can be added and only after doctype");if(W(t)){if(r(n,W))throw new D(P,"Only one doctype is allowed");var o=r(n,X);if(i&&n.indexOf(o)<n.indexOf(i))throw new D(P,"Doctype can only be inserted before an element");if(!i&&o)throw new D(P,"Doctype can not be appended since element is present")}}function J(e,t,i){var n=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(X);if(a.length>1||r(s,K))throw new D(P,"More than one element or text in fragment");if(1===a.length&&!Y(e,i))throw new D(P,"Element in fragment can not be inserted before doctype")}if(X(t)&&!Y(e,i))throw new D(P,"Only one element can be added and only after doctype");if(W(t)){if(r(n,(function(e){return W(e)&&e!==i})))throw new D(P,"Only one doctype is allowed");var o=r(n,X);if(i&&n.indexOf(o)<n.indexOf(i))throw new D(P,"Doctype can only be inserted before an element")}}function $(e,t,i,n){(function(e,t,i){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new D(P,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new D(C,"child not in parent");if(!function(e){return e&&(X(e)||K(e)||W(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||W(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new D(P,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,i),e.nodeType===U.DOCUMENT_NODE&&(n||Q)(e,t,i);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===S){var s=t.firstChild;if(null==s)return t;var a=t.lastChild}else s=a=t;var o=i?i.previousSibling:e.lastChild;s.previousSibling=o,a.nextSibling=i,o?o.nextSibling=s:e.firstChild=s,null==i?e.lastChild=a:i.previousSibling=a;do{s.parentNode=e,Z(s,e.ownerDocument||e)}while(s!==a&&(s=s.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==S&&(t.firstChild=t.lastChild=null),t}function Z(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===h&&e.attributes)for(var i=0;i<e.attributes.length;i++){var n=e.attributes.item(i);n&&(n.ownerDocument=t)}for(var r=e.firstChild;r;)Z(r,t),r=r.nextSibling}}function ee(){this._nsMap={}}function te(){}function ie(){}function ne(){}function re(){}function se(){}function ae(){}function oe(){}function le(){}function de(){}function ue(){}function ce(){}function he(){}function pe(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return me(this,i,e,t,a),i.join("")}function fe(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===n&&r===s.XML||r===s.XMLNS)return!1;for(var a=i.length;a--;){var o=i[a];if(o.prefix===n)return o.namespace!==r}return!0}function ge(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,V),'"')}function me(e,t,i,n,r){if(r||(r=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var a=e.attributes,o=a.length,l=e.firstChild,d=e.tagName,u=d;if(!(i=s.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,v=0;v<a.length;v++)if("xmlns"===a.item(v).name){c=a.item(v).value;break}if(!c)for(var E=r.length-1;E>=0;E--)if(""===(A=r[E]).prefix&&A.namespace===e.namespaceURI){c=A.namespace;break}if(c!==e.namespaceURI)for(E=r.length-1;E>=0;E--){var A;if((A=r[E]).namespace===e.namespaceURI){A.prefix&&(u=A.prefix+":"+d);break}}}t.push("<",u);for(var w=0;w<o;w++)"xmlns"==(P=a.item(w)).prefix?r.push({prefix:P.localName,namespace:P.value}):"xmlns"==P.nodeName&&r.push({prefix:"",namespace:P.value});for(w=0;w<o;w++){var P,C,L;fe(P=a.item(w),0,r)&&(ge(t,(C=P.prefix||"")?"xmlns:"+C:"xmlns",L=P.namespaceURI),r.push({prefix:C,namespace:L})),me(P,t,i,n,r)}if(d===u&&fe(e,0,r)&&(ge(t,(C=e.prefix||"")?"xmlns:"+C:"xmlns",L=e.namespaceURI),r.push({prefix:C,namespace:L})),l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(d)){if(t.push(">"),i&&/^script$/i.test(d))for(;l;)l.data?t.push(l.data):me(l,t,i,n,r.slice()),l=l.nextSibling;else for(;l;)me(l,t,i,n,r.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case b:case S:for(l=e.firstChild;l;)me(l,t,i,n,r.slice()),l=l.nextSibling;return;case p:return ge(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,V));
vendor: 7,147 bytes, line 2
2case g:return t.push("<![CDATA[",e.data,"]]>");case _:return t.push("\x3c!--",e.data,"--\x3e");case T:var D=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),D)t.push(" PUBLIC ",D),k&&"."!=k&&t.push(" ",k),t.push(">");else if(k&&"."!=k)t.push(" SYSTEM ",k,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,i){var n;switch(t.nodeType){case h:(n=t.cloneNode(!1)).ownerDocument=e;case S:break;case p:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var r=t.firstChild;r;)n.appendChild(ve(e,r,i)),r=r.nextSibling;return n}function ye(e,t,i){var n=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=t[r];"object"!=typeof s&&s!=n[r]&&(n[r]=s)}switch(t.childNodes&&(n.childNodes=new k),n.ownerDocument=e,n.nodeType){case h:var a=t.attributes,o=n.attributes=new N,l=a.length;o._ownerElement=n;for(var d=0;d<l;d++)n.setAttributeNode(ye(e,a.item(d),!0));break;case p:i=!0}if(i)for(var u=t.firstChild;u;)n.appendChild(ye(e,u,i)),u=u.nextSibling;return n}function _e(e,t,i){e[t]=i}A.INVALID_STATE_ERR=(w[11]="Invalid state",11),A.SYNTAX_ERR=(w[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(w[13]="Invalid modification",13),A.NAMESPACE_ERR=(w[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(w[15]="Invalid access",15),D.prototype=Error.prototype,d(A,D),k.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)me(this[n],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},I.prototype.item=function(e){return R(this),this[e]||null},u(I,k),N.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new D(L);var i=this.getNamedItem(e.nodeName);return M(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new D(L);return t=this.getNamedItemNS(e.namespaceURI,e.localName),M(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return x(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return x(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new q;if(n.implementation=this,n.childNodes=new k,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new ae;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},U.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 $(this,e,t)},replaceChild:function(e,t){$(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return G(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ye(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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 i=t._nsMap;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e)return n;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},d(c,U),d(c,U.prototype),q.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return $(this,e,t),Z(e,this),null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),G(this,e)},replaceChild:function(e,t){$(this,e,t,J),Z(e,this),t&&this.removeChild(t),X(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(i){if(i.nodeType==h&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=l(e);return new I(this,(function(i){var n=[];return t.length>0&&F(i.documentElement,(function(r){if(r!==i&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=l(s);a=t.every((d=o,function(e){return d&&-1!==d.indexOf(e)}))}a&&n.push(r)}}var d})),n}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new k,(t.attributes=new N)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new ce;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new de;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new ee,n=t.split(":"),r=i.attributes=new N;return i.childNodes=new k,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new te,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},u(q,U),ee.prototype={nodeType:h,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 i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
2,appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),Z(t,e.ownerDocument||e),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 i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new I(this,(function(t){var i=[];return F(t,(function(n){n===t||n.nodeType!=h||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new I(this,(function(i){var n=[];return F(i,(function(r){r===i||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},q.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,U),te.prototype.nodeType=p,u(te,U),ie.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(w[P])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},u(ie,U),ne.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},u(ne,ie),re.prototype={nodeName:"#comment",nodeType:_},u(re,ie),se.prototype={nodeName:"#cdata-section",nodeType:g},u(se,ie),ae.prototype.nodeType=T,u(ae,U),oe.prototype.nodeType=E,u(oe,U),le.prototype.nodeType=v,u(le,U),de.prototype.nodeType=m,u(de,U),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=S,u(ue,U),ce.prototype.nodeType=y,u(ce,U),he.prototype.serializeToString=function(e,t,i){return pe.call(e,t,i)},U.prototype.toString=pe;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case h:case S:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(I.prototype,"length",{get:function(){return R(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case h:case S: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}}}),_e=function(e,t,i){e["$$"+t]=i}}}catch(Te){}t.DocumentType=ae,t.DOMException=D,t.DOMImplementation=B,t.Element=ee,t.Node=U,t.NodeList=k,t.XMLSerializer=he},1146:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(9065),r=i(1577),s=i(9835),a=i.n(s),o=i(9637),l=i.n(o),d=i(5804),u=i.n(d);class c{constructor(e){this.options=e}getUsername(){return this.options.userId?this.options.userId:this.options["user.name"]}getProfileId(){return this.options.profileId}getPluginVersion(){return n.default.getPluginVersion()}getRequestNumber(){return Math.random()}getUserType(){return this.options["user.type"]}getAnonymousUser(){return this.options["user.anonymousId"]}getReferer(){let e=this.options.referer||"";return!e&&"undefined"!=typeof window&&window.location&&(e=window.location.href),e}getReferral(){let e=this.options.referral||"";return e||"undefined"==typeof document||(e=document.referrer),e}getPageName(){let e=this.options.title||"";return e||"undefined"==typeof document||(e=document.title),e}getLanguage(){return"undefined"!=typeof navigator?navigator.language:void 0}getScreenResolution(){let e;try{if(window&&window.screen){const t=window.devicePixelRatio||1;e=window.screen.width*t+"x"+window.screen.height*t}}catch(e){}return e}getDeviceInfo(){let e={};return this.getDeviceCode()&&(e.deviceCode=this.getDeviceCode()),this.getModel()&&(e.model=this.getModel()),this.getBrand()&&(e.brand=this.getBrand()),this.getDeviceType()&&(e.deviceType=this.getDeviceType()),this.getDeviceName()&&(e.deviceName=this.getDeviceName()),this.getOsName()&&(e.osName=this.getOsName()),this.getOsVersion()&&(e.osVersion=this.getOsVersion()),this.getBrowserName()&&(e.browserName=this.getBrowserName()),this.getBrowserVersion()&&(e.browserVersion=this.getBrowserVersion()),this.getBrowserType()&&(e.browserType=this.getBrowserType()),this.getBrowserEngine()&&(e.browserEngine=this.getBrowserEngine()),0!==Object.keys(e).length?e:void 0}getDeviceCode(){return this.options["device.code"]}getModel(){return this.options["device.model"]}getBrand(){return this.options["device.brand"]}getDeviceType(){return this.options["device.type"]}getDeviceName(){return this.options["device.name"]}getOsName(){return this.options["device.osName"]}getOsVersion(){return this.options["device.osVersion"]}getBrowserName(){return this.options["device.browserName"]}getBrowserVersion(){return this.options["device.browserVersion"]}getBrowserType(){return this.options["device.browserType"]}getBrowserEngine(){return this.options["device.browserEngine"]}getIsBlocked(){return this.options["ad.blockerDetected"]}isMethodPostEnabled(){return this.options.method&&this.options.method.toUpperCase()===l().POST}getDeviceUUID(){let e;return this.options["device.isAnonymous"]||(e=this.options["device.id"]||(new(u())).getKey()),e}getLibVersion(){return a()}getAppName(){return this.options["app.name"]}getAppReleaseVersion(){return this.options["app.releaseVersion"]}getIp(){return this.options["network.ip"]}getIsp(){return this.options["network.isp"]}getConnectionType(){return this.options["network.connectionType"]}getEDID(){const e=this.options["device.EDID"];return e?e.toString():void 0}getObfuscateIp(){return this.options["user.obfuscateIp"]}getPrivacyProtocol(){let e=this.options["user.privacyProtocol"];return"string"==typeof e&&(e=e.toLowerCase()),"optin"===e||"optout"===e?e:void 0}getCustomDimensions(){const e=this.options["content.customDimensions"];return"object"==typeof e?e:void 0}getExtraparam1(){return this.options["content.customDimension.1"]}getExtraparam2(){return this.options["content.customDimension.2"]}getExtraparam3(){return this.options["content.customDimension.3"]}getExtraparam4(){return this.options["content.customDimension.4"]}getExtraparam5(){return this.options["content.customDimension.5"]}getExtraparam6(){return this.options["content.customDimension.6"]}getExtraparam7(){return this.options["content.customDimension.7"]}getExtraparam8(){return this.options["content.customDimension.8"]}getExtraparam9(){return this.options["content.customDimension.9"]}getExtraparam10(){return this.options["content.customDimension.10"]}getExtraparam11(){return this.options["content.customDimension.11"]}getExtraparam12(){return this.options["content.customDimension.12"]}getExtraparam13(){return this.options["content.customDimension.13"]}getExtraparam14(){return this.options["content.customDimension.14"]}getExtraparam15(){return this.options["content.customDimension.15"]}getExtraparam16(){return this.options["content.customDimension.16"]}getExtraparam17(){return this.options["content.customDimension.17"]}getExtraparam18(){return this.options["content.customDimension.18"]}getExtraparam19(){return this.options["content.customDimension.19"]}getExtraparam20(){return this.options["content.customDimension.20"]}isParseManifest(){return this.options["parse.manifest"]}
2isParseLocationHeaderGetRequest(){return this.options["parse.locationHeader.get"]}isParseCdnNode(){return this.options["parse.cdnNode"]}isCdnSwitch(){return this.options["parse.cdnSwitchHeader"]}getParseCdnNodeList(){return this.options["parse.cdnNode.list"]}getParseCdnNodeNameHeader(){return this.options["parse.cdnNameHeader"]}getParseNodeHeader(){return this.options["parse.cdnNodeHeader"]}canOverwriteAdapters(){return r.default.parseBoolean(this.options["adapters.overwrite"])}getAdaptersProperties(){return this.options["adapters.properties"]}isAppAnalyticsAutoBegin(){return r.default.parseBoolean(this.options["check.appAnalytics.autoBegin"])}isAppAnalyticsEnabled(){return r.default.parseBoolean(this.options["check.appAnalytics.enabled"])}isVideoAnalyticsEnabled(){return r.default.parseBoolean(this.options["check.videoAnalytics.enabled"])}isRefreshLMAConfigurationEnabled(){return r.default.parseBoolean(this.options["lma.refresh.configuration.enabled"])}isPluginLogsEnabled(){return r.default.parseBoolean(this.options["debug.pluginLogs.enabled"])}isPlayerLogsEnabled(){return r.default.parseBoolean(this.options["debug.playerLogs.enabled"])}refreshLMAConfigurationSeconds(){return this.options["lma.refresh.configuration.seconds"]}getPlayheadMonitorEnabled(){return this.options["playhead.monitor"]}getReadyStateMonitorEnabled(){return this.options["readyState.monitor"]}}},1151:(e,t,i)=>{var n=i(2503),r=i(3168),s=i(3908),a=i(8187),o=i(3831),l=i(4387),d=i(1657),u=i(3782);const{AnalyticsTag:c}=i(2784),{default:h}=i(7276);var p=n.extend({constructor:function(e){p.__super__.constructor.apply(this,arguments),this.plugin=e,this._realResource=void 0,this._transportFormat=void 0,this._initResource=void 0,this._cdnName=void 0,this._cdnNodeHost=void 0,this._cdnNodeTypeString=void 0,this._cdnNodeType=void 0,this._responses={},this._processedResponses={},this._isBusy=!1,this.transformName="Resource"},getResource:function(){return this._realResource},_getInitialCdnResource:function(){return this._realResource||this._initResource},getTransportFormat:function(){return this._transportFormat},getCdnName:function(){return this._cdnName},getNodeHost:function(){return this._cdnNodeHost},getNodeTypeString:function(){return this._cdnNodeTypeString},getNodeType:function(){return this._cdnNodeType},getWaitParams:function(){if(this.isBlocking()){var e=[];return this.plugin.options["parse.cdnNode"]&&e.push("cdn"),this.plugin.options["parse.manifest"]&&e.push("parsedResource","transportFormat"),e}return[]},init:function(e){e?this._isBusy||(this._isBusy=!0,this._cdnName=void 0,this._cdnNodeHost=void 0,this._cdnNodeTypeString=void 0,this._cdnNodeType=void 0,this._initResource=e,this._parseManifestEnabled=this.plugin.isParseManifest(),this._cdnEnabled=this.plugin.isParseCdnNode(),this._cdnList=this.plugin.getParseCdnNodeList().slice(),s.setBalancerHeaderName(this.plugin.getParseCdnNodeNameHeader(),this.plugin.getParseNodeHeader()),this._setTimeout(),this._parseManifestEnabled?this._isFinalUrl(this._initResource)?(this._realResource=this._initResource,this.done()):this.parseManifest():this._parseCDN()):this.done()},_isFinalUrl:function(e){const t=[".ts",".mp4",".m4s",".cmfv",".mp3"];e=e||"";for(const i in t){const n=t[i];if(e.lastIndexOf(n)===e.length-n.length)return!0}return!1},_setTimeout:function(){const e=()=>{this._isBusy&&(this.done(),h.warn(c,"ResourceTransform has exceded the maximum execution time (3s) and will be aborted."))};try{this._parseTimeout=setTimeout(e,3e3)}catch(t){"undefined"!=typeof atv?this._parseTimeout=atv.setTimeout(e,3e3):h.error(c,t)}},parseManifest:function(e,t){const i=this.plugin.options["parse.manifest.auth"],n=this.plugin.isParseLocationHeaderGetRequest(),s=this.plugin.isParseManifest(),a=this.plugin.options["parse.manifest.lastChunk"]||!1,l=new d(i);l.setGetRequest(s||n);const u=new o(i);u.setParseLastChunk(a);const c=new r(i);c.setParseLastChunk(a);const h=[l,u,c];this._parseManifest(h,e,t||this._initResource)},_parseManifest:function(e,t,i,n){if(e.length>0){const r=e[0];r.shouldExecute(t)?(r.on(l.Event.DONE,(()=>{this._parseManifest(e.slice(1,e.length),r.getLastManifest(),r.getResource(),r.getTransportFormat()||n)})),r.parse(i,t)):this._parseManifest(e.slice(1,e.length),t,i,n)}else this._transportFormat=n,this._realResource=i,this._parseCDN()},_parseCDN:function(){if(this.plugin.isCdnSwitch())this.switchDetector=new a(this.plugin),this.switchDetector.on(a.Events.DONE,(e=>{this._cdnName=e.data,this.done()})),this.switchDetector.on(a.Events.ERROR,(()=>{this.done()})),this.switchDetector.init();else if(this._cdnEnabled&&this._cdnList.length>0){const e=this._cdnList.shift(),t=s.create(e);if(t){this._cleanExpiredResponses();
2const e=this.plugin.isCDNParserHeaderGetRequest()?"GET":"HEAD";t.setRequestMethod(e),t.on(s.Event.DONE,(()=>{this._responses[this._getInitialCdnResource()]=t.getResponses(),this._processedResponses[this._getInitialCdnResource()]=(new Date).getTime(),this._cdnName=t.getParsedCdnName(),this._cdnNodeHost=t.getParsedNodeHost(),this._cdnNodeTypeString=t.getParsedNodeTypeString(),this._cdnNodeType=t.getParsedNodeType(),this.getNodeHost()?this.done():this._parseCDN()})),t.parse(this._getInitialCdnResource(),this._responses[this._getInitialCdnResource()]||{})}else this._parseCDN()}else this.done()},_cleanExpiredResponses:function(){try{Object.keys(this._processedResponses).forEach((e=>{const t=this._processedResponses[e];(new Date).getTime()-t>6e4&&(delete this._processedResponses[e],delete this._responses[e])}))}catch(e){}},parse:function(e){if(e.service===u.Service.START){const t=this.plugin.requestBuilder.lastSent;t.parsedResource=e.params.parsedResource=this.getResource()||e.params.parsedResource,t.transportFormat=e.params.transportFormat=this.getTransportFormat()||e.params.transportFormat,this._cdnEnabled&&(t.cdn=e.params.cdn=e.params.cdn||this.getCdnName(),t.nodeHost=e.params.nodeHost=this.getNodeHost()||e.params.nodeHost,t.nodeType=e.params.nodeType=this.getNodeType()||e.params.nodeType,t.nodeTypeString=e.params.nodeTypeString=this.getNodeTypeString()||e.params.nodeTypeString)}}});e.exports=p},1516:(e,t,i)=>{var n=i(1593),r=i(7680),s=i(7061);const{default:a}=i(7276);var o=i(3782),l=i(2507);const{default:d}=i(1577);var u=i(5292),c=i(2071),h=i(2995),p=i(6424);const{default:f}=i(3473),{default:g}=i(9065),{default:m}=i(3555),{default:v}=i(61),{ExpireDefault:y,Method:_,AnalyticsTag:b,CoreEvents:T}=i(2784);var S=n.extend({constructor:function(e,t,i,n){this._key=e,this.plugin=t,this.isInitiated=!1,this.isAdsManifestSent=!1,this.isAdsPreFinished=!1,this.isAdsPreJoined=!1,this.playedPostrolls=0,this.isBreakStarted=!1,this.initChrono=new r,this.options=new s(i),this._adNumber=0,this._adNumberInBreak=0,this._initialPrerollTime=0,this.expirationManager=new f(y.DEFAULT_VIEW_TIMEOUT_MS,y.DEFAULT_MAX_DURATION_VIEW_MS),g.getInstance().subscribeListener(this._coreEventListener.bind(this)),this._currentPingTime=void 0,this.requestBuilder=new c,this.hybridNetwork=new h,this.resizeScrollDetector=new p(t,this),this._adapter=null,this._adsAdapter=null,this._chronos=[],this._chronosObject={},n&&this.setAdapter(n,t),this._pluginLogsQueue=[],this.lastEventTime=null,this.lastKnownLocation=void 0,this.isFetchingLocation=!1,this._previousVideoMetrics=null,this.sendingPings=!1,this._startPings()},mergeOptions:function(e){e&&this.options.setOptions(e,this.options)},setVideoOptions:function(e){e&&this.options.setOptions(e)},updateCustomMetrics:function(e){e&&this.options.setOptions(e,void 0,!0)},getVideoKey:function(){return this._key},nextView:function(){return this._viewIndex=(new Date).getTime(),this._viewCode=g.getInstance().getFastDataSessionToken(),g.getInstance().registerCommonVariable(v.Products.VIDEO_ANALYTICS,v.AnalyticsVariables.VIEW_CODE,this._viewIndex),this.getViewCode()},getViewCode:function(){const e=g.getInstance().getFastDataSessionToken();return 0===e.length||this._viewCode&&this._viewCode===e||(this._viewCode=e),this._viewCode+(this._viewIndex?`_${this._viewIndex}`:"")},startChrono:function(e){e&&this._chronos&&Array.isArray(this._chronos)&&(this.removeChrono(e),this._chronos.push({event:e,start:(new Date).getTime()}))},stopChrono:function(e){if(e&&this._chronos&&Array.isArray(this._chronos))for(let i=0;i<this._chronos.length;i++)if(this._chronos[i].event===e){var t=(new Date).getTime();this._chronos[i].end=t,this._chronos[i].start&&(this._chronos[i].duration=t-this._chronos[i].start);break}},removeChrono:function(e){if(e&&this._chronos&&Array.isArray(this._chronos))for(let t=0;t<this._chronos.length;t++)if(this._chronos[t].event===e){this._chronos.splice(t,1);break}},setChronoDuration:function(e,t){if(e&&t&&this._chronos&&Array.isArray(this._chronos)){var i=!1;for(let n=0;n<this._chronos.length;n++)if(this._chronos[n].event===e){this._chronos[n].duration=t,i=!0;break}i||this._chronos.push({event:e,start:(new Date).getTime(),duration:t})}},getChronosEventParam:function(){const e=this._chronosObject||{};try{if(Object.keys(e).length>0)return e;if(!this._chronos||0===this._chronos.length)return e;for(let t=0;t<this._chronos.length;t++){const i=this._chronos[t],n=this._chronos[t+1],r=i.duration?i.duration:i.end&&i.end>0?i.end-i.start:n?n.start-i.start:Date.now()-i.start;e[i.event]=r}this._chronosObject=e}catch(e){}return e},resetChronos:function(e){Array.isArray(this._chronos)||(this._chronos=[]),e&&e>0?this._chronos.length>0&&(this._chronos=this._chronos.filter((t=>t.start>=e))):this._chronos=[],this._chronosObject={}}
2,setAdapter:function(e,t){for(var i in this.plugin=t,this._adapter=e,this._adapter.setIsAds(!1),this._adapter._setAdapter=!0,this.contentAdapterListeners={},this.contentAdapterListeners[u.Event.START]=this._startListener.bind(this),this.contentAdapterListeners[u.Event.JOIN]=this._joinListener.bind(this),this.contentAdapterListeners[u.Event.DATA_OBJECT]=this._advancedDataListener.bind(this),this.contentAdapterListeners[u.Event.PAUSE]=this._pauseListener.bind(this),this.contentAdapterListeners[u.Event.RESUME]=this._resumeListener.bind(this),this.contentAdapterListeners[u.Event.SEEK_BEGIN]=this._seekBufferBeginListener.bind(this),this.contentAdapterListeners[u.Event.SEEK_END]=this._seekEndListener.bind(this),this.contentAdapterListeners[u.Event.BUFFER_BEGIN]=this._seekBufferBeginListener.bind(this),this.contentAdapterListeners[u.Event.BUFFER_END]=this._bufferEndListener.bind(this),this.contentAdapterListeners[u.Event.ERROR]=this._errorListener.bind(this),this.contentAdapterListeners[u.Event.STOP]=this._stopListener.bind(this),this.contentAdapterListeners[u.Event.VIDEO_EVENT]=this._videoEventListener.bind(this),this.contentAdapterListeners[u.Event.VIDEO_EVENT_END]=this._videoEventEndListener.bind(this),this.contentAdapterListeners)this._adapter.on(i,this.contentAdapterListeners[i]);this.options.enableExtraMetricCollection&&this.shouldStartRenditionTimer()},getAdapter:function(){return this._adapter},removeAdapter:function(){try{if(this._adapter){if(this._adapter.dispose(),this.contentAdapterListeners){for(var e in this.contentAdapterListeners)this._adapter.off(e,this.contentAdapterListeners[e]);delete this.contentAdapterListeners}this._adapter=null}}catch(e){a.error(b,"Is not possible to remove adapter for video: "+this._key)}},getAdsAdapter:function(){return this._adsAdapter},fetchLocation:function(){if(this.isFetchingLocation=!0,navigator&&navigator.geolocation){const e={enableHighAccuracy:!0,timeout:1e4};this.lastKnownLocation=void 0,navigator.geolocation.getCurrentPosition((e=>{this.lastKnownLocation={latitude:e.coords.latitude,longitude:e.coords.longitude},this.isFetchingLocation=!1}),(e=>{this.isFetchingLocation=!1}),e)}else this.lastKnownLocation=void 0,this.isFetchingLocation=!1},shouldStartRenditionTimer:function(){if(!this._adapter.getAdapterClass("detectQualityChange")&&!this.renditionInterval){const e=this.options.renditionQueryInterval<100?100:this.options.renditionQueryInterval;this.renditionInterval=setInterval((()=>{const e=this._adapter.getRendition();e&&this.triggerUpdateRendition(e)}),e||250)}},triggerUpdateRendition:function(e){this.lastObservedRendition?this.lastObservedRendition!=e&&(this.lastObservedRendition=e):this.lastObservedRendition=e},fireInit:function(e,t){this.isInitiated||(!this.getAdapter()||this.getAdapter()&&!this.getAdapter().flags.isStarted)&&(this._viewIndex||this.plugin.getNextViewIndex(this),this._startPings(),this.initChrono.start(),this.isInitiated=!0,e=e||{},t&&(e.triggeredEvents=[t]),this._send(o.WillSendEvent.WILL_SEND_INIT,o.Service.INIT,e),this._adSavedError(),this._adSavedManifest(),a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+o.Service.INIT+", title/res: "+(e.title||e.mediaResource)+(e.triggeredEvents?", eventsTriggered: "+e.triggeredEvents:"")))},fireError:function(e,t,i,n,r,s,d){this.fireInit();var u=l.buildErrorParams(e,t,i,d);u.entities=this.requestBuilder.getChangedEntities([this,this.plugin],this.options),u.code&&delete u.code,r&&(u.triggeredEvents=[r]);try{(s=s||!1)&&this._adapter&&this._adapter.flags&&this._adapter.flags.isJoined&&((u=u||{}).errorType="fatal")}catch(e){}this._send(o.WillSendEvent.WILL_SEND_ERROR,o.Service.ERROR,u),this._adSavedError(),this._adSavedManifest(),a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+o.Service.ERROR+", errorType: "+u.errorType+", errorCode: "+u.errorCode+(u.triggeredEvents?", eventsTriggered: "+u.triggeredEvents:"")),"fatal"===u.errorType&&this.fireStop()},fireFatalError:function(e,t,i,n,r,s){this.fireError(e,t,i,n,r,!0,s)},fireStop:function(e,t){if(this.isInitiated||this.isStarted){this._adapter&&(this._adapter.flags.isStopped=!0,this._adapter.monitor&&this._adapter.monitor.stop()),this._adsAdapter&&this.isBreakStarted&&(this._adsAdapter.fireStop(),this._adsAdapter.fireAdBreakStop()),this.expirationManager&&this.expirationManager.reset(),(e=e||{}).entities=this.requestBuilder.getChangedEntities([this,this.plugin],this.options),t&&(e.triggeredEvents=[t]),this._send(o.WillSendEvent.WILL_SEND_STOP,o.Service.STOP,e,void 0,void 0,(()=>{}));var i=this._adapter?this._adapter.chronos:null;i&&(i.total.stop(),i.join.reset(),i.pause.reset(),i.buffer.reset(),i.seek.reset()),this.lastKnownLocation=void 0,this.observedRenditions=[],this.renditionInterval&&(clearInterval(this.renditionInterval),this.renditionInterval=void 0),a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+o.Service.STOP+" at "+e.playhead+"s"+(e.triggeredEvents?", eventsTriggered: "+e.triggeredEvents:"")),this._reset()}},fireOfflineEvents:function(e){this.options&&!this.options.offline?this.isInitiated||this._adapter&&this._adapter.flags.isStarted||this._adsAdapter&&this._adsAdapter.flags.isStarted?a.error(b,"Adapters have to be stopped"):(this._offlineParams=e,g.getInstance().getFastDataService().getAccountCode()&&g.getInstance().getFastDataSessionToken()?this._generateAndSendOffline():this.offlineReference=this._generateAndSendOffline.bind(this)):a.error(b,"To send offline events, offline option must be disabled")},_generateAndSendOffline:function(){if(this.options.disableStorage)return null;const e=this._offlineParams;for(;;){var t=this.requestBuilder.buildBody(o.Service.OFFLINE_EVENTS,[this,this.plugin]).viewJson;if(null===t[0])break;var i=this.plugin.getNextViewIndex(this),n=t[0].replace(/CODE_PLACEHOLDER/g,i.toString()).replace(/,"sessionId":"SESSION_PLACEHOLDER"/g,"").replace(/,"sessionRoot":"ROOT_PLACEHOLDER"/g,"");this._send(o.WillSendEvent.WILL_SEND_OFFLINE_EVENTS,o.Service.OFFLINE_EVENTS,e,n,"POST",function(e,t){this.plugin.offlineStorage.removeView(t.offlineId)}.bind(this),{offlineId:t[1]})}this.plugin.offlineStorage.sent(),this._offlineParams=null},_reset:function(){try{this._stopPings(),this.resetExpirationManager(),this._adapter&&this._adapter.flags.reset(),this._viewIndex=void 0,this.isInitiated=!1,this.isStarted=!1,this.startDelayed=!1,this.isAdsManifestSent=!1,this.isAdsPreFinished=!1,this.isAdsPreJoined=!1,this.initChrono.reset(),this._totalPrerollsTime=0,this._initialPrerollTime=0,this.requestBuilder.lastSent.breakNumber=0,this.requestBuilder.lastSent.adNumber=0,this._savedAdManifest=null,this._savedAdError=null,this.playedPostrolls=0,this.isBreakStarted=!1,this._adNumber=0,this._adNumberInBreak=0,this._previousVideoMetrics=null}catch(e){}},resetExpirationManager:function(){this.expirationManager&&this.expirationManager.reset()},_coreEventListener:function(e){if(e!==T.FAST_DATA_READY)e===T.SESSION_EXPIRE&&(a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") Closing View by Session Expire Event"),this.fireStop());else{const e=1e3*g.getInstance().getFastDataService().getPingTime();"number"==typeof e&&e>0&&this._currentPingTime!==e&&(this._currentPingTime=e,this.sendingPings&&(this._stopPings(),this._startPings()))}},_expiredSession:function(){return!(!this.expirationManager||!this.expirationManager.isExpired()||(a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") Closing View by Expire Event"),this.fireStop(),0))},_send:function(e,t,i,n,r,s,a){if(t!==o.Service.STOP&&this._expiredSession())return;const l=d.methodFromString(r),u=(new Date).getTime();this.options.preventZombieViews&&this.lastEventTime&&u>this.lastEventTime+6e5&&this.plugin.getNextViewIndex(this),this.lastEventTime=t===o.Service.STOP?null:u;const c=new m(t,i,this.getVideoKey(),l,void 0,s,void 0,t!==o.Service.STOP?this.expirationManager:void 0);this.plugin.resourceTransform.parse(c),i=this.requestBuilder.buildParams(i,t,[this,this.plugin],this.options),!0===this.getIsLive()&&
2(i.mediaDuration=this.options["content.duration"],i.playhead=void 0),c.setParams(i),n&&c.setBody(n),c.setMethod(l),this.plugin.isMethodPostEnabled()&&c.setMethod(_.POST);const h={params:c.getParams(),plugin:this,adapter:this.getAdapter(),adsAdapter:this.getAdsAdapter()};this.emit(e,h),this.plugin.analyticsRequestHandler&&(null!==i||void 0!==r)&&this.options.enabled&&(this.plugin.lastServiceSent=t,this.plugin.analyticsRequestHandler.sendRequest(c))},firePlayerLog:function(e){try{if(this.plugin.isPlayerLogsEnabled())if(this._adapter&&!this._adapter.isStarted())e.timemark=(new Date).getTime(),this._pluginLogsQueue.push(e);else{for(;this._pluginLogsQueue.length>0;){var t=this._pluginLogsQueue.shift();this._sendPlayerLog(t)}this._sendPlayerLog(e)}}catch(e){}},_sendPlayerLog:function(e){try{e&&e.logType&&e.logAction&&a.notice(b,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") PlayerLog "+e.logType+": Action "+e.logAction),this.plugin._comm&&e&&null!==(e=this.requestBuilder.buildParams(e,o.Service.VIDEO_PLUGIN_LOGS,this,this.options))&&this._send(null,o.Service.VIDEO_PLUGIN_LOGS,e)}catch(e){}}});l.assign(S.prototype,i(8037)),l.assign(S.prototype,i(5710)),l.assign(S.prototype,i(7355)),l.assign(S.prototype,i(5031)),e.exports=S},1527:(e,t,i)=>{var n=i(1593),r=i(3782),s=i(2507);const{default:a}=i(7276);var o=i(5651);const{default:l}=i(6075);var d=i(7061),u=i(470),c=(i(3455),i(2071)),h=i(1151),p=i(2101),f=i(9773),g=i(2635),m=i(5804);const{default:v}=i(3555),{Method:y,AnalyticsTag:_,BalancerTag:b}=i(2784),{default:T}=i(9065),{default:S}=i(61),{default:E}=i(1577),{default:A}=i(1146);var w=n.extend({constructor:function(e,t,n,r){if(w.instance)return n&&(this.commonGetters||(this.commonGetters=new A(this.options)),a.notice(_,"Set Options for already existing instance"),w.instance.setOptions(n),w.instance.storage.updateStorageOptions(w.instance.options.disableCookies,w.instance.options.forceCookies,w.instance.options.disableStorage)),r&&(a.notice(_,"Set Adapter for already existing instance"),w.instance.setAdapter(r)),a.warn(_,"Only a single plugin instance can be created on npaw context"),w.instance;this.options=new d(n),this._checkOptionsValues(n),this.commonGetters||(this.commonGetters=new A(this.options)),this.storage=new u(null,this.options.disableCookies,this.options.forceCookies,this.options.disableStorage),this.utils=i(2507),this.uuidGenerator=new m,this.videos=new o(this),this.analyticsRequestHandler=new l(this),this.adapterTemplates={},this.requestBuilder=new c,this.resourceTransform=new h(this),this.lastEventTime=null,this.browserLoadTimes=new p(e),this.deviceDetector=new g,this.backgroundDetector=new f(this,t),this.options["background.enabled"]&&this.backgroundDetector.startDetection(),r&&this.setAdapter(r),this._logInitPluginEvent(n),navigator&&navigator.userAgentData&&"Windows"===navigator.userAgentData.platform&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((e=>{"Windows"===navigator.userAgentData.platform&&(this.majorPlatformVersion=parseInt(e.platformVersion.split(".")[0]))})),w.instance=this,this.fetchTvDeviceModelInfo()},addOnWillSendRequestListener(e){this.analyticsRequestHandler.onWillSendVideoRequestListeners.push(e)},removeOnWillSendRequestListener(e){this.analyticsRequestHandler.onWillSendVideoRequestListeners=this.analyticsRequestHandler.onWillSendVideoRequestListeners.filter((t=>t!==e))},destroy:function(){this.videos.removeAllAdapters(),this.videos.videos={}},_setAdapterTemplates:function(e){this.adapterTemplates=e},_receiveConfiguration:function(e){try{if(e.target.response.configurationOptions){var t=e.target.response.configurationOptions;this.options.setOptions(t,this.options),this.videos.updateAllOptions(t)}this.isRefreshLMAConfigurationEnabled()&&this.fastDataTransform&&this.fastDataTransform._createConfigurationInterval()}catch(e){}},_reset:function(e){this.videos.resetVideo(e)},setOptions:function(e){if(this._logSetOptionsEvent(e),e){"boolean"==typeof e["parse.manifest"]&&e["parse.manifest"]&&(e.waitForMetadata=!0,e.pendingMetadata||(e.pendingMetadata=[]),e.pendingMetadata.push("parsedResource")),Ob
2ject.assign(this.options,e),this.storage.updateStorageOptions(this.options.disableCookies,this.options.forceCookies,this.options.disableStorage);for(const t of this.videos.getVideoKeys())this.setVideoOptions(e,t);0===this.videos.getVideoKeys().length&&this._checkOptionsValues(this.options)}T.getInstance().registerCommonVariable(S.Products.VIDEO_ANALYTICS,S.AnalyticsVariables.METHOD_OPTION,E.methodFromString(e.method)),T.getInstance().registerCommonVariable(S.Products.DEVICE_ANALYTICS,S.DeviceVariables.APP_ANALYTICS_DEVICE_STRING,this.getDeviceInfoString())},setVideoOptions:function(e,t){if(t=t||"default",e&&t&&this.videos.existsVideo(t)&&Object.keys(e).length>0){const i=this.videos.getVideo(t);i&&(i.setVideoOptions(e),Object.assign(i.options,e),this._checkOptionsValues(i.options))}},updateCustomMetrics:function(e,t){t=t||"default",e&&this.videos.existsVideo(t)&&Object.keys(e).length>0&&this.videos.getVideo(t).updateCustomMetrics(e)},disable:function(){this.setOptions({enabled:!1})},enable:function(){this.setOptions({enabled:!0})},getPingTime:function(){return T.getInstance().getFastDataService().getPingTime()},fetchTvDeviceModelInfo(){if(!this.options["device.model"]){const e=this;"undefined"!=typeof webOS?webOS.service.request("luna://com.webos.service.tv.systemproperty",{method:"getSystemInfo",parameters:{keys:["modelName"]},onComplete:function(t){t.returnValue?e.lgDeviceModel=t.modelName:a.debug(_,"Could not get LG device model name")}}):"undefined"!=typeof webapis&&void 0!==webapis.productinfo&&(this.samsungDeviceModel=webapis.productinfo.getRealModel())}},_logInitPluginEvent:function(e){var t={logs:e,logAction:"initPlugin",logType:"pluginMethod"};this._sendPluginLogs(t,this.isMethodPostEnabled())},_logSetAdapterEvent:function(e){var t={adapter:e,logAction:"setAdapter",logType:"pluginMethod"};this._sendPluginLogs(t,this.isMethodPostEnabled())},_logSetOptionsEvent:function(e){var t={logs:e,logAction:"setOptions",logType:"pluginMethod"};this._sendPluginLogs(t,this.isMethodPostEnabled())},_logReceiveDataEvent:function(e){var t="";e.data&&e.data.target&&e.data.target.response&&e.data.target.response.msg&&(t=JSON.parse(e.data.target.response.msg));var i={logs:t,logAction:"receiveData",logType:"internalMethod"};this._sendPluginLogs(i,this.isMethodPostEnabled())},_sendPluginLogs:function(e,t){if(t=t||!1,this.isPluginLogsEnabled()&&(e&&e.logType&&e.logAction&&a.notice(_,"PluginLog "+e.logType+": Action "+e.logAction),this.analyticsRequestHandler&&null!==(e=this.requestBuilder.buildParams(e,r.Service.VIDEO_PLUGIN_LOGS,this)))){var i=t?y.POST:y.GET;const n=new v(r.Service.VIDEO_PLUGIN_LOGS,e,"",i);this.analyticsRequestHandler.sendRequest(n)}},_checkOptionsValues:function(e){try{e&&Object.prototype.hasOwnProperty.call(e,"background.enabled")&&(e["background.enabled"]?this.backgroundDetector.startDetection():this.backgroundDetector.stopDetection())}catch(e){console.error(e)}},getDeviceInfoString:function(){try{if(this.options&&this.commonGetters){const e=this.commonGetters.getDeviceInfo();if(e)return JSON.stringify(Object.keys(e).reduce(((t,i)=>(t[i.replace(/([A-Z])/g,"_$1").toLowerCase()]=e[i],t)),{}))}}catch(e){console.error(e)}return JSON.stringify("{}")}},{Event:r.WillSendEvent});s.assign(w.prototype,i(9516)),s.assign(w.prototype,i(5901)),s.assign(w.prototype,i(1705)),s.assign(w.prototype,i(6083)),s.assign(w.prototype,i(6874)),w.instance=null,e.exports=w},1577:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(7276),r=i(2784);class s{static toQueryString(e){return"?"+Object.keys(e).map((t=>{if(null!==e[t]&&"object"==typeof e[t]){const i=JSON.stringify(e[t]);if("{}"!==i)return encodeURIComponent(t)+"="+encodeURIComponent(i)}else if(null!==e[t]&&void 0!==e[t]&&""!==e[t])return encodeURIComponent(t)+"="+encodeURIComponent(e[t]);return""})).filter((e=>""!=e)).join("&")}static addProtocol(e,t){let i="http://localhost/";try{i="http://"+e,t||"undefined"!=typeof window&&0===window.location.protocol.indexOf("https")?i="https://"+e:"undefined"!=typeof window&&0===window.location.protocol.indexOf("http")&&(i="//"+e)}catch(e){n.default.warn(r.CoreTag,e)}return i}static parseBoolean(e){return"string"==typeof e?"true"===e.toLowerCase():!!e}static methodFromString(e){var t;const i=null!==(t=null==e?void 0:e.toUpperCase())&&void 0!==t?t:"";return i in r.Method?r.Method[i]:r.Method.GET}static generateRandomString(e){let t="";for(let i=0;i<e;i++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}}},1593:(e,t,i)=>{var n=i(3948),r=i(2467),s=n.extend({on:function(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this},off:function(e,t){if(this._listeners=this._listeners||{},this._listeners[e]){var i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}return this},emit:function(e,t){return this._listeners=this._listeners||{},t=t||{},r(this._listeners[e])&&this._listeners[e].forEach(this._eachCallback.bind(this,e,t)),r(this._listeners["*"])&&this._listeners["*"].forEach(this._eachCallback.bind(this,e,t)),this},_eachCallback:function(e,t,i){"function"==typeof i&&i({type:e,data:t,target:this})}});e.exports=s},1657:(e,t,i)=>{var n=i(3821),r=i(4387).extend({setGetRequest:function(e){this._getRequest=e},parse:function(e,t){if(t)this._parseWithManifest(t);else{this._realResource=e;var i={cache:!0,requestHeaders:this._headers};this._getRequest||(i.method="HEAD");var r=new n(e,null,null,i);r.on(n.Event.SUCCESS,function(e){this._parseWithManifest(e)}.bind(this)),r.on(n.Event.ERROR,function(e){this.done()}.bind(this)),r.send()}},_parseWithManifest:function(e){this._lastManifest=e;var t=e.getResponseHeaders(),i=!1;e&&e.xhr&&e.xhr.responseURL&&e.xhr.responseURL!==this._realResource?(this._realResource=e.xhr.responseURL,this.parse(this._realResource),i=!0):t.split("\n").forEach(function(e){e.startsWith("Location:")&&(this._realResource=e.slice(10),this.parse(this._realResource),i=!0)}.bind(this)),i||this.done()}});e.exports=r},1705:(e,t,i)=>{var n=i(2507),r=i(9637);const{default:s}=i(9065),{default:a}=i(61);var o={getAccountCode:function(){return s.getInstance().getFastDataService().getAccountCode()},getUsername:function(e){return this._getGenericOptionsValue("userId",e)?this._getGenericOptionsValue("userId",e):this._getGenericOptionsValue("user.n
2ame",e)},getProfileId:function(e){return this._getGenericOptionsValue("profileId",e)},getPluginVersion:function(){return s.getPluginVersion()},getRequestNumber:function(){return Math.random()},getUserType:function(e){return this._getGenericOptionsValue("user.type",e)},getAnonymousUser:function(e){return this._getGenericOptionsValue("user.anonymousId",e)},getReferer:function(){let e=this.options.referer||"";return!e&&"undefined"!=typeof window&&window.location&&(e=window.location.href),e},getReferral:function(){let e=this.options.referral||"";return e||"undefined"==typeof document||(e=document.referrer),e},getLanguage:function(){let e;return"undefined"!=typeof navigator&&(e=navigator.language),e},getScreenResolution:function(){let e;try{if(window&&window.screen){const t=window.devicePixelRatio||1;e=window.screen.width*t+"x"+window.screen.height*t}}catch(e){}return e},getDeviceInfo:function(e){const t={};return this.getDeviceCode(e)&&(t.deviceCode=this.getDeviceCode(e)),this.getModel(e)&&(t.model=this.getModel(e)),this.getBrand(e)&&(t.brand=this.getBrand(e)),this.getDeviceType(e)&&(t.deviceType=this.getDeviceType(e)),this.getDeviceName(e)&&(t.deviceName=this.getDeviceName(e)),this.getOsName(e)&&(t.osName=this.getOsName(e)),this.getOsVersion(e)&&(t.osVersion=this.getOsVersion(e)),this.getBrowserName(e)&&(t.browserName=this.getBrowserName(e)),this.getBrowserVersion(e)&&(t.browserVersion=this.getBrowserVersion(e)),this.getBrowserType(e)&&(t.browserType=this.getBrowserType(e)),this.getBrowserEngine(e)&&(t.browserEngine=this.getBrowserEngine(e)),Object.keys(t).length>0?t:void 0},getDeviceCode:function(e){return this._getGenericOptionsValue("device.code",e)},getModel:function(e){return this._getGenericOptionsValue("device.model",e)?this._getGenericOptionsValue("device.model",e):this.lgDeviceModel?this.lgDeviceModel:this.samsungDeviceModel?this.samsungDeviceModel:void 0},getBrand:function(e){return this._getGenericOptionsValue("device.brand",e)},getDeviceType:function(e){return this._getGenericOptionsValue("device.type",e)},getDeviceName:function(e){return this._getGenericOptionsValue("device.name",e)},getOsName:function(e){return this._getGenericOptionsValue("device.osName",e)},getOsVersion:function(e){let t=this._getGenericOptionsValue("device.osVersion",e);return void 0===t&&navigator&&navigator.userAgentData&&this.majorPlatformVersion&&"Windows"===navigator.userAgentData.platform&&this.majorPlatformVersion>=13&&(t="11"),t},getBrowserName:function(e){return this._getGenericOptionsValue("device.browserName",e)},getBrowserVersion:function(e){return this._getGenericOptionsValue("device.browserVersion",e)},getBrowserType:function(e){return this._getGenericOptionsValue("device.browserType",e)},getBrowserEngine:function(e){return this._getGenericOptionsValue("device.browserEngine",e)},getIsBlocked:function(e){return this._getGenericOptionsValue("ad.blockerDetected",e)},isMethodPostEnabled:function(){return this.options.method&&this.options.method.toUpperCase()===r.POST},getDeviceUUID:function(e){let t;return!e["device.isAnonymous"]&&e["device.id"]?e["device.id"]:(this.options["device.isAnonymous"]||(t=this.options["device.id"]||this.uuidGenerator.getKey()),t)},getLibVersion:function(){return s.getPluginVersion()},getAppName:function(e){return this._getGenericOptionsValue("app.name",e)},getAppReleaseVersion:function(e){return this._getGenericOptionsValue("app.releaseVersion",e)},getIp:function(e){return this._getGenericOptionsValue("network.ip",e)},getIsp:function(e){return this._getGenericOptionsValue("network.isp",e)},getConnectionType:function(e){return this._getGenericOptionsValue("network.connectionType",e)},getEDID:function(e){const t=this._getGenericOptionsValue("device.EDID",e);return t?t.toString():void 0},getObfuscateIp:function(e){return this._getGenericOptionsValue("user.obfuscateIp",e)},getPrivacyProtocol:function(e){let t=this._getGenericOptionsValue("user.privacyProtocol",e);return"string"==typeof t&&(t=t.toLowerCase()),"optin"===t||"optout"===t?t:void 0},getCustomDimensions:function(e){const t=this._getGenericOptionsValue("content.customDimensions",e);return"object"==typeof t?t:void 0},getExtraparam1:function(e){return this._getGenericOptionsValue("content.customDimension.1",e)},getExtraparam2:function(e){return this._getGenericOptionsValue("content.customDimension.2",e)},getExtraparam3:function(e){return this._getGenericOptionsValue("content.customDimension.3",e)},getExtraparam4:function(e){return this._getGenericOptionsValue("content.customDimension.4",e)},getExtraparam5:function(e){return this._getGenericOptionsValue("content.customDimension.5",e)},getExtraparam6:function(e){return this._getGenericOptionsValue("content.customDimension.6",e)},getExtraparam7:function(e){return this._getGenericOptionsValue("content.customDimension.7",e)},getExtraparam8:function(e){return this._getGenericOptionsValue("content.customDimension.8",e)},getExtraparam9:function(e){return this._getGenericOptionsValue("content.customDimension.9",e)}
2,getExtraparam10:function(e){return this._getGenericOptionsValue("content.customDimension.10",e)},getExtraparam11:function(e){return this._getGenericOptionsValue("content.customDimension.11",e)},getExtraparam12:function(e){return this._getGenericOptionsValue("content.customDimension.12",e)},getExtraparam13:function(e){return this._getGenericOptionsValue("content.customDimension.13",e)},getExtraparam14:function(e){return this._getGenericOptionsValue("content.customDimension.14",e)},getExtraparam15:function(e){return this._getGenericOptionsValue("content.customDimension.15",e)},getExtraparam16:function(e){return this._getGenericOptionsValue("content.customDimension.16",e)},getExtraparam17:function(e){return this._getGenericOptionsValue("content.customDimension.17",e)},getExtraparam18:function(e){return this._getGenericOptionsValue("content.customDimension.18",e)},getExtraparam19:function(e){return this._getGenericOptionsValue("content.customDimension.19",e)},getExtraparam20:function(e){return this._getGenericOptionsValue("content.customDimension.20",e)},isParseManifest:function(e){return this._getGenericOptionsValue("parse.manifest",e)},isParseLocationHeaderGetRequest:function(e){return this._getGenericOptionsValue("parse.locationHeader.get",e)},isParseLocationHeaderGetRequest:function(e){return this._getGenericOptionsValue("parse.locationHeader.get",e)},isParseCdnNode:function(e){return this._getGenericOptionsValue("parse.cdnNode",e)},isCdnSwitch:function(e){return this._getGenericOptionsValue("parse.cdnSwitchHeader",e)},getParseCdnNodeList:function(e){return this._getGenericOptionsValue("parse.cdnNode.list",e)},getParseCdnNodeNameHeader:function(e){return this._getGenericOptionsValue("parse.cdnNameHeader",e)},getParseNodeHeader:function(e){return this._getGenericOptionsValue("parse.cdnNodeHeader",e)},canOverwriteAdapters:function(e){return n.parseBoolean(this._getGenericOptionsValue("adapters.overwrite",e))},getAdaptersProperties:function(e){return this._getGenericOptionsValue("adapters.properties",e)},getNetworkConnectionType:function(){if(!this.options.enableExtraMetricCollection||!navigator||!navigator.connection)return;const e=navigator.connection.type;return["wimax"].includes(e)?void 0:e},getNetworkCellType:function(){if(this.options.enableExtraMetricCollection&&navigator&&navigator.connection)return this.getNetworkConnectionType()&&"wifi"!==this.getNetworkConnectionType()?navigator.connection.effectiveType:"none"},getNetworkSignalStrength:function(){},getCpuUsed:function(){},getMemoryUsed:function(){if(this.options.enableExtraMetricCollection&&performance&&performance.memory)return performance.memory.usedJSHeapSize/1024/1024},getCacheStorageUsed:function(){if(!this.options.enableExtraMetricCollection)return;let e=0;if("undefined"!=typeof localStorage&&localStorage)for(const t in localStorage)localStorage.hasOwnProperty(t)&&(e+=2*(localStorage[t].length+t.length));if("undefined"!=typeof sessionStorage&&sessionStorage)for(const t in sessionStorage)sessionStorage.hasOwnProperty(t)&&(e+=2*(sessionStorage[t].length+t.length));return 0!=e?e:void 0},getTransferredTraffic:function(){if(this.options.enableExtraMetricCollection)return s.getInstance().getCommonVariable(a.Products.BALANCER,a.BalancerVariables.BALANCER_TRAFFIC)},getImprovedBandwidth:function(){if(this.options.enableExtraMetricCollection)return s.getInstance().getCommonVariable(a.Products.BALANCER,a.BalancerVariables.BALANCER_BITRATE)},isAppAnalyticsAutoBegin:function(e){return n.parseBoolean(this._getGenericOptionsValue("check.appAnalytics.autoBegin",e))},isAppAnalyticsEnabled:function(e){return n.parseBoolean(this._getGenericOptionsValue("check.appAnalytics.enabled",e))},isVideoAnalyticsEnabled:function(e){return n.parseBoolean(this._getGenericOptionsValue("check.videoAnalytics.enabled",e))},isRefreshLMAConfigurationEnabled:function(e){return n.parseBoolean(this._getGenericOptionsValue("lma.refresh.configuration.enabled",e))},isPluginLogsEnabled:function(e){return n.parseBoolean(this._getGenericOptionsValue("debug.pluginLogs.enabled",e))},isPlayerLogsEnabled:function(e){return n.parseBoolean(this._getGenericOptionsValue("debug.playerLogs.enabled",e))},refreshLMAConfigurationSeconds:function(e){return this._getGenericOptionsValue("lma.refresh.configuration.seconds",e)},getPlayheadMonitorEnabled:function(e){return this._getGenericOptionsValue("playhead.monitor",e)}
2,getReadyStateMonitorEnabled:function(e){return this._getGenericOptionsValue("readyState.monitor",e)},getPageName:function(){return this.options["content.title"]},_getGenericOptionsValue:function(e,t){return t&&t[e]?t[e]:this.options[e]}};e.exports=o},2047:e=>{e.exports={cdnName:"HIGHNEGR",parsers:[{element:"host+type",headerName:"X-HW",regex:/.+,[0-9]+\.(.+)\.(.+)/}],parseType:function(e){switch(e){case"c":case"x":return 1;default:return 2}}}},2071:(e,t,i)=>{var n=i(3948);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a=["accountCode","username","profileId","anonymousUser","rendition","deviceInfo","player","title","title2","live","segmentDuration","mediaDuration","mediaResource","parsedResource","transactionCode","properties","cdn","profile","bucket","playerVersion","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","dimensions","playerStartupTime","obfuscateIp","privacyProtocol","p2pEnabled","pluginVersion","pluginInfo","isp","connectionType","ip","referer","referral","userType","streamingProtocol","transportFormat","householdId","adsBlocked","adsExpected","deviceUUID","smartswitchConfigCode","smartswitchGroupCode","smartswitchContractCode","libVersion","nodeHost","nodeType","appName","appReleaseVersion","package","saga","tvshow","season","titleEpisode","channel","imdbID","gracenoteID","contentType","genre","contentLanguage","subtitles","cost","price","playbackType","email","drm","videoCodec","audioCodec","codecSettings","codecProfile","containerFormat","contentId","contractedResolution","linkedViewId","edid","cdnBalancerResponseUUID","accur_geo_location","network_type","network_cell_type","network_signal_strengh","cpu_used","mem_used","cache_used"],o=["player","playhead","adTitle","position","adDuration","adCampaign","adCreativeId","adProvider","adResource","adPlayerVersion","adProperties","adAdapterVersion","adInsertionType","extraparam1","extraparam2","extraparam3","extraparam4","extraparam5","extraparam6","extraparam7","extraparam8","extraparam9","extraparam10","fullscreen","audio","skippable","adNumber","adNumberInBreak","breakNumber"],l=n.extend({constructor:function(){this.lastSent={}},fetchParams:function(e,t,i,n,a){e=e||{},t=t||[];for(let o=0;o<t.length;o++){const d=t[o];if(e[d])continue;const u=l.getters[d];let c=!1;for(const t in n)if(n[t]&&n[t][u]){const r=n[t][u](a);void 0===r||i&&this.lastSent[d]===r||(e[d]=r,this.lastSent[d]=r),c=!0;break}c||r.warn(s,"Trying to call undefined getter "+d+":"+u)}return e},getGetters:function(){return l.getters},getRequiredMetadataParams:function(){return["live","rendition"]},buildBody:function(e,t){return this.fetchParams(void 0,l.bodyParams[e],!1,t)},buildParams:function(e,t,i,n){return e=e||{},this.fetchParams(e,l.params[t],!1,i,n),this.fetchParams(e,l.differentParams[t],!0,i,n),e},getChangedEntities:function(e,t){return this.fetchParams({},l.differentParams.entities,!0,e,t)}},{params:{"/data":["system","pluginVersion","requestNumber","username"],"/adapters":["system","pluginVersion","requestNumber"],"/configuration":["system","pluginVersion","requestNumber","appName","appReleaseVersion"],"/infinity/session/pluginLogs":["logAction","logType"],"/infinity/video/pluginLogs":["logAction","logType"],"/init":a,"/start":a,"/joinTime":["joinDuration","playhead","bitrate","accountCode","pluginVersion"],"/pause":["playhead","accountCode","pluginVersion"],"/resume":["pauseDuration","playhead","accountCode","pluginVersion"],"/seek":["seekDuration","playhead","accountCode","pluginVersion"],"/bufferUnderrun":["bufferDuration","playhead","accountCode","pluginVersion","bitrate","throughput"],"/error":["player","playhead"].concat(a),"/stop":["accur_geo_location","bitrate","totalBytes","playhead","pauseDuration","metrics","cdnDownloadedTraffic","multiCdnInfo","p2pDownloadedTraffic","uploadTraffic","profile","bucket","accountCode","pluginVersion"],"/infinity/video/event":["playhead"],"/adInit":o,"/adStart":o,"/adJoin":["playhead","position","adJoinDuration","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adPause":["playhead","position","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adResume":["playhead","position","adPlayhead","adPauseDuration","adNumber","adNumberInBreak","breakNumber"],"/adBufferUnderrun":["playhead","position","adPlayhead","adBufferDuration","adNumber","adNumberInBreak","breakNumber"],"/adStop":["playhead","position","adPlayhead","adTotalDuration","adViewedDuration","adViewability","adNumber","adNumberInBreak","breakNumber"],"/adClick":["playhead","position","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adError":["adPlayhead"].concat(o),"/adManifest":["givenBreaks","expectedBreaks","expectedPattern","breaksTime"],"/adBreakStart":["position","givenAds","expectedAds","breakNumber","adInsertionType"],"/adBreakStop":["position","breakNumber"],"/adQuartile":["position","adViewedDuration","adViewability","adNumber","adNumberInBreak","breakNumber"],"/ping":["real_traffic","improved_bandwidth_estimation","network_type","network_cell_type","network_signal_strengh","cpu_used","mem_used","cache_used","accountCode","pluginVersion","droppedFrames","playrate","cdnDownloadedTraffic","multiCdnInfo","p2pDownloadedTraffic","uploadTraffic","latency","packetLoss","packetSent","metrics","totalBytes","segmentDuration"],"/infinity/session/start":["accountCode","username","profileId","userType","anonymousUser","route","page","referer","referral","screenResolution","language","deviceInfo","adsBlocked","deviceUUID","libVersion","appName","appReleaseVersion","isp","connectionType","ip","obfuscateIp","privacyProtocol","dimensions","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","edid"],"/infinity/session/stop":["sessionMetrics"],"/infinity/session/nav":["route","page","scrollDepth"],"/infinity/session/beat":["sessionMetrics"],"/infinity/session/event":["accountCode"],"/offlineEvents":{}},bodyParams:{"/offlineEvents":["viewJson"]}
2,differentParams:{entities:["pluginInfo","rendition","title","title2","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","cdn","nodeHost","nodeType","nodeTypeString","subtitles","contentLanguage","contentId","accur_geo_location","titleEpisode","season","audioCodec"]},getters:{requestNumber:"getRequestNumber",playhead:"getPlayhead",playrate:"getPlayrate",fps:"getFramesPerSecond",segmentDuration:"getSegmentDuration",droppedFrames:"getDroppedFrames",mediaDuration:"getDuration",bitrate:"getBitrate",totalBytes:"getTotalBytes",throughput:"getThroughput",rendition:"getRendition",title:"getTitle",title2:"getTitle2",live:"getIsLive",mediaResource:"getResource",parsedResource:"getParsedResource",transactionCode:"getTransactionCode",properties:"getMetadata",playerVersion:"getPlayerVersion",player:"getPlayerName",cdn:"getCdn",profile:"getProfileName",bucket:"getBucketName",pluginVersion:"getPluginVersion",libVersion:"getLibVersion",userType:"getUserType",streamingProtocol:"getStreamingProtocol",transportFormat:"getTransportFormat",obfuscateIp:"getObfuscateIp",privacyProtocol:"getPrivacyProtocol",householdId:"getHouseholdId",latency:"getLatency",packetLoss:"getPacketLoss",packetSent:"getPacketSent",metrics:"getVideoMetrics",dimensions:"getCustomDimensions",accur_geo_location:"getAccurateGeoLocation",network_type:"getNetworkConnectionType",network_cell_type:"getNetworkCellType",network_signal_strengh:"getNetworkSignalStrength",cpu_used:"getCpuUsed",mem_used:"getMemoryUsed",cache_used:"getCacheStorageUsed",real_traffic:"getTransferredTraffic",improved_bandwidth_estimation:"getImprovedBandwidth",param1:"getExtraparam1",param2:"getExtraparam2",param3:"getExtraparam3",param4:"getExtraparam4",param5:"getExtraparam5",param6:"getExtraparam6",param7:"getExtraparam7",param8:"getExtraparam8",param9:"getExtraparam9",param10:"getExtraparam10",param11:"getExtraparam11",param12:"getExtraparam12",param13:"getExtraparam13",param14:"getExtraparam14",param15:"getExtraparam15",param16:"getExtraparam16",param17:"getExtraparam17",param18:"getExtraparam18",param19:"getExtraparam19",param20:"getExtraparam20",extraparam1:"getAdExtraparam1",extraparam2:"getAdExtraparam2",extraparam3:"getAdExtraparam3",extraparam4:"getAdExtraparam4",extraparam5:"getAdExtraparam5",extraparam6:"getAdExtraparam6",extraparam7:"getAdExtraparam7",extraparam8:"getAdExtraparam8",extraparam9:"getAdExtraparam9",extraparam10:"getAdExtraparam10",position:"getAdPosition",adNumber:"getAdNumber",adNumberInBreak:"getAdNumberInBreak",breakNumber:"getBreakNumber",adPlayhead:"getAdPlayhead",adDuration:"getAdDuration",adCampaign:"getAdCampaign",adCreativeId:"getAdCreativeId",adBitrate:"getAdBitrate",adTitle:"getAdTitle",adResource:"getAdResource",adPlayerVersion:"getAdPlayerVersion",adProperties:"getAdMetadata",adAdapterVersion:"getAdAdapterVersion",givenBreaks:"getGivenBreaks",expectedBreaks:"getExpectedBreaks",expectedPattern:"getExpectedPattern",breaksTime:"getBreaksTime",givenAds:"getGivenAds",expectedAds:"getExpectedAds",adsExpected:"getAdsExpected",adViewedDuration:"getAdViewedDuration",adViewability:"getAdViewability",fullscreen:"getIsFullscreen",audio:"getAudioEnabled",skippable:"getIsSkippable",adProvider:"getAdProvider",adInsertionType:"getAdInsertionType",pluginInfo:"getPluginInfo",isp:"getIsp",connectionType:"getConnectionType",ip:"getIp",deviceInfo:"getDeviceInfo",edid:"getEDID",system:"getAccountCode",accountCode:"getAccountCode",username:"getUsername",profileId:"getProfileId",anonymousUser:"getAnonymousUser",joinDuration:"getJoinDuration",bufferDuration:"getBufferDuration",seekDuration:"getSeekDuration",pauseDuration:"getPauseDuration",adJoinDuration:"getAdJoinDuration",adBufferDuration:"getAdBufferDuration",adPauseDuration:"getAdPauseDuration",adTotalDuration:"getAdTotalDuration",referer:"getReferer",referral:"getReferral",language:"getLanguage",screenResolution:"getScreenResolution",nodeHost:"getNodeHost",nodeType:"getNodeType",nodeTypeString:"getNodeTypeString",route:"getReferer",page:"getPageName",playerStartupTime:"getPlayerStartupTime",pageLoadTime:"getPageLoadTime",cdnDownloadedTraffic:"getCdnTraffic",multiCdnInfo:"getMultiCdnInfo",p2pDownloadedTraffic:"getP2PTraffic",p2pEnabled:"getIsP2PEnabled",uploadTraffic:"getUploadTraffic",cdnBalancerResponseUUID:"getBalancerResponseId",viewJson:"getOfflineView",deviceUUID:"getDeviceUUID",sessionMetrics:"getSessionMetrics",scrollDepth:"getScrollDepth",adsBlocked:"getIsBlocked",linkedViewId:"getLinkedViewId",smartswitchConfigCode:"getSmartswitchConfigCode",smartswitchGroupCode:"getSmartswitchGroupCode",smartswitchContractCode:"getSmartswitchContractCode",appName:"getAppName",appReleaseVersion:"getAppReleaseVersion",package:"getPackage",saga:"getSaga",tvshow:"getTvShow",
2season:"getSeason",titleEpisode:"getEpisodeTitle",channel:"getChannel",drm:"getDRM",videoCodec:"getVideoCodec",audioCodec:"getAudioCodec",codecSettings:"getCodecSettings",codecProfile:"getCodecProfile",containerFormat:"getContainerFormat",contentId:"getID",imdbID:"getImdbId",gracenoteID:"getGracenoteID",contentType:"getType",genre:"getGenre",contentLanguage:"getVideoLanguage",subtitles:"getSubtitles",contractedResolution:"getContractedResolution",cost:"getCost",price:"getPrice",playbackType:"getPlaybackType",email:"getEmail"}});e.exports=l},2101:(e,t,i)=>{var n=i(3948),r=i(9474),s=n.extend({constructor:function(e){if(this.appAnalytics=e,this.timeObject=void 0,this.playerSetup=void 0,this.myTimesObject={},this.perfObject=void 0,"undefined"!=typeof window&&"function"==typeof window.addEventListener&&(window.addEventListener("load",this._windowLoaded.bind(this)),window.performance&&window.performance.timing)){try{"function"==typeof window.performance.getEntriesByType&&(this.perfObject=window.performance)}catch(e){}this.timeObject=window.performance.timing}try{if("function"==typeof PerformanceObserver){const e=new PerformanceObserver(((e,t)=>{const i=e.getEntries();this.myTimesObject.largestContentfulPaint=i[i.length-1].renderTime}));PerformanceObserver.supportedEntryTypes.indexOf("largest-contentful-paint")>-1&&e.observe({entryTypes:["largest-contentful-paint"]})}}catch(e){}},_windowLoaded:function(){this.myTimesObject.onLoad=(new Date).getTime(),this._getEnoughFPS(),setTimeout(this._fireLoadTimesEvent.bind(this),1e3)},_fireLoadTimesEvent:function(){this._getLastMetrics(),this.appAnalytics&&this.appAnalytics.isActive()&&this.appAnalytics.isStarted()&&this.appAnalytics.fireEvent("loadTimes",{},this._getAllValues())},_getAllValues:function(){const e={PageLoadTime:this.getPageLoadTime(),DNSTime:this.getDnsTime(),TCPTime:this.getTcpTime(),HandshakeTime:this.getHandshakeTime(),DomReadyTime:this.getDomReadyTime(),BackendTime:this.getBackendTime(),FrontendTime:this.getFrontendTime(),VisualReady:this.getTimeToVisuallyReady(),TimeToInteractive:this.getTimeToInteractive(),JsTime:this.getJSTime(),CssTime:this.getCSSTime(),ImageTime:this.getImageTime(),FontTime:this.getFontTime(),AvgReqLatency:this.getAvgReqLatency(),MaxReqLatency:this.getMaxReqLatency(),FirstPaint:this.getFirstPaint(),FirstContentfulPaint:this.getFirstContentfulPaint(),LargestContentfulPaint:this.getLargestContentfulPaint(),SpeedIndex:this.getSpeedIndex()};for(const t in e)null===e[t]||void 0===e[t]||e[t]<0?delete e[t]:e[t]=Math.round(e[t]);return e},getPageLoadTime:function(){let e;return this.timeObject&&(e=this.timeObject.loadEventEnd-this.timeObject.navigationStart),e},getPlayerStartupTime:function(){let e;return this.timeObject&&this.playerSetup&&(e=this.playerSetup-this.timeObject.navigationStart),e},getDnsTime:function(){let e;return this.timeObject&&(e=this.timeObject.domainLookupEnd-this.timeObject.domainLookupStart),e},getTcpTime:function(){let e;return this.timeObject&&(e=this.timeObject.connectEnd-this.timeObject.connectStart),e},getHandshakeTime:function(){let e;return this.timeObject&&this.timeObject.secureConnectionStart&&(e=this.timeObject.connectEnd-this.timeObject.secureConnectionStart),e},getDomReadyTime:function(){let e;return this.timeObject&&(e=this.timeObject.domComplete-this.timeObject.navigationStart),e},getBackendTime:function(){let e;return this.timeObject&&(e=this.timeObject.responseStart-this.timeObject.navigationStart),e},getFrontendTime:function(){let e;return this.timeObject&&(e=this.myTimesObject.onLoad-this.timeObject.responseStart),e},getTimeToVisuallyReady:function(){const e=this.myTimesObject.firstPaint||0;return this.timeObject?Math.max(e,this.timeObject.domContentLoadedEventEnd-this.timeObject.navigationStart||0):e||void 0},getTimeToInteractive:function(){if(this.myTimesObject.fps&&this.getTimeToVisuallyReady())return Math.max(this.myTimesObject.fps,this.getTimeToVisuallyReady());setTimeout((()=>{this.getTimeToInteractive()}),500)},getJSTime:function(){return this._getXTime("script")},getCSSTime:function(){return this._getXTime("css")},getImageTime:function(){return this._getXTime("img")},getFontTime:function(){return this._getXTime("css",[".woff",".otf",".ttf"])},getAvgReqLatency:function(){try{if(this.perfObject&&"function"==typeof this.perfObject.getEntriesByType){let t=0,i=0;const n=this.perfObject.getEntriesByType("resource");for(var e in n)n[e].requestStart&&n[e].responseStart&&(i+=n[e].responseStart-n[e].requestStart),t++;return i/t}}catch(e){}},getFirstPaint:function(){return this.myTimesObject?this.myTimesObject.firstPaint:void 0},getFirstContentfulPaint:function(){return this.myTimesObject?this.myTimesObject.firstContentfulPaint:void 0},getLargestContentfulPaint:function(){return this.myTimesObject?this.myTimesObject.largestContentfulPaint:void 0},getMaxReqLatency:function(){try{if(this.perfObject&&"function"==typeof this.perfObject.getEntriesByType){const e=this.perfObject.getEntriesByType("resource");let t=0;for(const i in e)e[i].requestStart&&e[i].responseStart&&(t=Math.max(t,e[i].responseStart-e[i].requestStart));return t}}catch(e){}},getSpeedIndex:function(){let e;if("undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.getEntriesByType)try{e=r()}catch(e){}return e},_getXTime:function(e,t){let i=0;try{if(this.perfObject&&"function"==typeof this.perfObject.getEntriesByType){const r=this.perfObject.getEntriesByType("resource");for(const s in r)if(r[s].initiatorType===e)if(t){let e=!1;for(var n in t)r[s].name.indexOf(t[n]>0)&&(e=!0);e&&(i+=r[s].duration)}else i+=r[s].duration}}catch(e){}return Math.round(i)||void 0},_getLastMetrics:function(){let e,t;try{if(this.perfObject&&"function"==typeof this.perfObject.getEntriesByType){const i=this.perfObject.getEntriesByType("paint");for(const n in i)"first-paint"===i[n].name?e=i[n].startTime:"first-contentful-paint"===i[n].name&&(t=i[n].startTime)}}catch(e){}!e&&this.timeObject&&(e=this.timeObject.msFirstPaint-this.timeObject.navigationStart),this.myTimesObject.firstPaint=e,this.myTimesObject.firstContentfulPaint=t,this.getTimeToInteractive()},_getEnoughFPS:function(){if(!this.timeObject||"undefined"==typeof window)return!0;{const e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(){};this.preFPS=(new Date).getTime(),e((()=>{const e=(new Date).getTime();e<this.preFPS+50?this.myTimesObject.fps=e-this.timeObject.navigationStart:setTimeout((()=>this._getEnoughFPS()),50)}))}},setPlayerSetupTime:function(){this.playerSetup=this.playerSetup||(new Date).getTime()}});e.exports=s},2133:(e,t,i)=>{var n=i(525).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function d(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,i,r,s,a){function o(e,t,n){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),n)}for(var l,d=++t,u=0;;){var c=e.charAt(d);switch(c){case"=":if(1===u)l=e.slice(t,d),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(a.warning('attribute value must after "="'),l=e.slice(t,d)),t=d+1,!((d=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(l,h=e.slice(t,d),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');o(l,h=e.slice(t,d),t),a.warning('attribute "'+l+'" missed start quot('+c+")!!"),t=d+1,u=5}break;case"/":switch(u){case 0:i.setTagName(e.slice(t,d));
vendor: 4,950 bytes, line 2
2case 5:case 6:case 7:u=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==u&&i.setTagName(e.slice(t,d)),d;case">":switch(u){case 0:i.setTagName(e.slice(t,d));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,d)).slice(-1)&&(i.closed=!0,h=h.slice(0,-1));case 2:2===u&&(h=l),4==u?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h,t)):(n.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return d;case"€":c=" ";default:if(c<=" ")switch(u){case 0:i.setTagName(e.slice(t,d)),u=6;break;case 1:l=e.slice(t,d),u=2;break;case 4:var h=e.slice(t,d);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:u=6}else switch(u){case 2:i.tagName,n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=d,u=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:u=1,t=d;break;case 3:u=4,t=d;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function c(e,t,i){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,d=o.value;if((p=l.indexOf(":"))>0)var u=o.prefix=l.slice(0,p),c=l.slice(p+1),h="xmlns"===u&&c;else c=l,u=null,h="xmlns"===l&&"";o.localName=c,!1!==h&&(null==s&&(s={},f(i,i={})),i[h]=s[h]=d,o.uri=n.XMLNS,t.startPrefixMapping(h,d))}for(a=e.length;a--;)(u=(o=e[a]).prefix)&&("xml"===u&&(o.uri=n.XML),"xmlns"!==u&&(o.uri=i[u||""]));var p;(p=r.indexOf(":"))>0?(u=e.prefix=r.slice(0,p),c=e.localName=r.slice(p+1)):(u=null,c=e.localName=r);var g=e.uri=i[u||""];if(t.startElement(g,c,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=s,!0;if(t.endElement(g,c,r),s)for(u in s)Object.prototype.hasOwnProperty.call(s,u)&&t.endPrefixMapping(u)}function h(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=e.indexOf("</"+i+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s)}return t+1}function p(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function f(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function g(e,t,i,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var s=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=t,r.exec(e);i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,d=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],d=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(d=s[3][0]));var u=s[a-1];return i.startDTD(o,l,d),i.endDTD(),u.index+u[0].length}return-1}function m(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,i.processingInstruction(r[1],r[2]),n+2):-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,i,r,s){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>A){var i=e.substring(A,t).replace(/&#?\w+;/g,a);T&&f(A),r.characters(i,0,t-A),A=t}}function f(t,i){for(;t>=_&&(i=b.exec(e));)y=i.index,_=y+i[0].length,T.lineNumber++;T.columnNumber=t-y+1}for(var y=0,_=0,b=/.*(?:\r\n?|\n)|.*$/g,T=r.locator,S=[{currentNSMap:t}],E={},A=0;;){try{var w=e.indexOf("<",A);if(w<0){if(!e.substr(A).match(/^\s*$/)){var P=r.doc,C=P.createTextNode(e.substr(A));P.appendChild(C),r.currentElement=C}return}switch(w>A&&l(w),e.charAt(w+1)){case"/":var L=e.indexOf(">",w+3),D=e.substring(w+2,L).replace(/[ \t\n\r]+$/g,""),k=S.pop();L<0?(D=e.substring(w+2).replace(/[\s<].*/,""),s.error("end tag name: "+D+" is not complete:"+k.tagName),L=w+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),s.error("end tag name: "+D+" maybe not complete"),L=w+1+D.length);var I=k.localNSMap,R=k.tagName==D;if(R||k.tagName&&k.tagName.toLowerCase()==D.toLowerCase()){if(r.endElement(k.uri,k.localName,D),I)for(var N in I)Object.prototype.hasOwnProperty.call(I,N)&&r.endPrefixMapping(N);R||s.fatalError("end tag name: "+D+" is not match the current start tagName:"+k.tagName)}else S.push(k);L++;break;case"?":T&&f(w),L=m(e,w,r);break;
2case"!":T&&f(w),L=g(e,w,r,s);break;default:T&&f(w);var O=new v,M=S[S.length-1].currentNSMap,x=(L=u(e,w,O,M,a,s),O.length);if(!O.closed&&p(e,L,O.tagName,E)&&(O.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),T&&x){for(var B=d(T,{}),U=0;U<x;U++){var V=O[U];f(V.offset),V.locator=d(T,{})}r.locator=B,c(O,r,M)&&S.push(O),r.locator=T}else c(O,r,M)&&S.push(O);n.isHTML(O.uri)&&!O.closed?L=h(e,L,O.tagName,a,r):L++}}catch(e){if(e instanceof o)throw e;s.error("element parse error: "+e),L=-1}L>A?A=L:l(Math.max(w,A)+1)}}(e,t,i,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},2370:e=>{e.exports={cdnName:"AMAZON",parsers:[{element:"host",headerName:"x-amz-cf-pop",regex:/(.+)/},{element:"type",headerName:"x-cache",regex:/(.+)\sfrom.+/}],parseType:function(e){return-1!==e.toLowerCase().indexOf("hit")?1:-1!==e.toLowerCase().indexOf("miss")?2:0}}},2467:e=>{e.exports=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},2477:e=>{e.exports={INIT:"init",START:"start",JOIN:"join",JOIN_TIME:"joinTime",DATA_OBJECT:"data",PAUSE:"pause",RESUME:"resume",SEEK_BEGIN:"seek-begin",SEEK_END:"seek-end",BUFFER_BEGIN:"buffer-begin",BUFFER_END:"buffer-end",ERROR:"error",STOP:"stop",CLICK:"click",MANIFEST:"manifest",PODSTART:"break-start",PODSTOP:"break-stop",QUARTILE:"quartile",VIDEO_EVENT:"video-event",VIDEO_EVENT_END:"video-event-end"}},2503:(e,t,i)=>{var n=i(1593).extend({constructor:function(){this._isBusy=!0,this._sendRequest=!0,this.transformName="Transform"},parse:function(e){},isBlocking:function(e){return this._isBusy},done:function(){this._isBusy=!1,this.emit(n.Event.DONE)},hasToSend:function(e){return this._sendRequest},getState:function(){return this._sendRequest?this._isBusy?this.STATE_BLOCKED:this.STATE_NO_BLOCKED:this.STATE_OFFLINE}},{STATE_OFFLINE:2,STATE_BLOCKED:1,STATE_NO_BLOCKED:0,Event:{DONE:"done"}});e.exports=n},2507:(e,t,i)=>{const{default:n,LogLevel:r}=i(7276),{AnalyticsTag:s}=i(2784);var a={stripProtocol:function(e){var t=e;try{t=e.replace(/^(.*?:\/\/|\/\/)/i,"")}catch(e){n.warn(s,e)}return t},parseBoolean:function(e){return"string"==typeof e||e instanceof String?"true"===e.toLowerCase():!!e},elementIsInPage:function(e){try{return"undefined"!=typeof document&&document.body&&"function"==typeof document.body.contains?e!==document.body&&document.body.contains(e):e&&("object"==typeof e||"function"==typeof e)}catch(e){n.warn(s,e)}return!0},addProtocol:function(e,t){var i="http://localhost/";try{i="http://"+e,t||"undefined"!=typeof window&&0===window.location.protocol.indexOf("https")?i="https://"+e:"undefined"!=typeof window&&0===window.location.protocol.indexOf("http")&&(i="//"+e)}catch(e){n.warn(s,e)}return i},parseNumber:function(e,t){return!isNaN(e)&&e>=0&&e!==1/0&&e!==-1/0&&null!=e?e:t},logAllEvents:function(e,t,i){try{if(n.logLevel<=r.DEBUG){i=i||function(e){n.debug(s,"Event: "+e.type)};var a=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart"];t&&(null===t[0]?(t.shift(),a=t):a=a.concat(t));for(var o=0;o<a.length;o++)"function"==typeof e?e.call(window,a[o],i):e.on?e.on(a[o],i):e.addEventListener&&e.addEventListener(a[o],i)}}catch(e){n.error(s,e)}},buildRenditionString:function(e,t,i){1===arguments.length&&(i=e,e=null,t=null);var n=null;return e&&t&&(n=e+"x"+t),"number"==typeof i&&!isNaN(i)&&i>=1&&(n?n+="@":n="",n+=i<1e3?Math.round(i)+"bps":i<1e6?(i=Math.round(i/1e3))+"Kbps":(i=Math.round(i/1e4)/100)+"Mbps"),n},buildErrorParams:function(e,t,i,n){var r={};return n=null==n?0:n,"object"==typeof e&&null!==e?r=e:(r.errorCode=e||"FAILURE",r.msg=t||r.errorCode,r.errorMetadata=i,n&&n>0&&(r.errorDuration=n)),r},calculateAdViewability:function(e,t){var i=!0;if("undefined"!=typeof window&&e&&"function"==typeof e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.top>=window.innerHeight||n.bottom<=0||n.right<=0||n.left>=window.innerWidth)i=!1;else{var r=Math.trunc(n.height*n.width),s=n.top>0?n.top:0,a=n.bottom>window.innerHeight?window.innerHeight:n.bottom,o=n.left>0?n.left:0;i=((n.right>window.innerWidth?window.innerWidth:n.right)-o)*(a-s)*100>r*(t||50)}}return i},filterChangedMetrics:function(e,t){if(!t)return e;var i=!1,r=null;try{for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=e[a],l=t[a];(!Object.prototype.hasOwnProperty.call(t,a)||("object"==typeof o&&null!==o&&Object.prototype.hasOwnProperty.call(o,"value")&&"object"==typeof l&&null!==l&&Object.prototype.hasOwnProperty.call(l,"value")?l.value!==o.value:l!==o))&&(i=!0,r||(r={}),r[a]=o)}return i?r:{}}catch(t){return n.warn(s,"Error during metric filtering in Util.filterChangedMetrics.",t),e}},getMetricsFrom:function(e,t){var i=e||t;
2for(var n in i)if("object"!=typeof i[n]||!i[n].value){var r={};r.value=i[n],i[n]=r}return i},assign:i(4173),isArray:i(2467)};e.exports=a},2553:(e,t,i)=>{var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},2580:e=>{e.exports={parsers:[{element:"name",headerName:null,regex:/(.+)/},{element:"host",headerName:null,regex:/(.+)/}]}},2602:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});class n{constructor(){this.host="lma.npaw.com",this.components={},this.host="lma.npaw.com",this.components={}}}},2635:(e,t,i)=>{var n=i(3948).extend({constructor:function(){"undefined"!=typeof navigator&&navigator.userAgent&&(this._isSmartTVDevice=navigator.userAgent.toLowerCase().match(/smarttv/)||navigator.userAgent.toLowerCase().match(/smart-tv/)||navigator.userAgent.toLowerCase().match(/appletv/)||navigator.userAgent.toLowerCase().match(/apple tv/),this._isPlaystationDevice=null!==navigator.userAgent.match(/PlayStation/),this._isIphoneDevice=null!==navigator.userAgent.match(/iPhone|iPad|iPod/i),this._isAndroidDevice=null!==navigator.userAgent.match(/Android/),this._isSmartphoneDevice=!this._isSmartTVDevice&&!this._isPlaystationDevice&&(this._isIphoneDevice||this._isAndroidDevice),this._isDesktopDevice=!this._isSmartphoneDevice&&!this._isSmartTVDevice&&!this._isPlaystationDevice)},isIphone:function(){return this._isIphoneDevice},isAndroid:function(){return this._isAndroidDevice},isSmartphone:function(){return this._isSmartphoneDevice},isDesktop:function(){return this._isDesktopDevice},isSmartTV:function(){return this._isSmartTVDevice},isPlayStation:function(){return this._isPlaystationDevice}});e.exports=n},2784:(e,t,i)=>{"use strict";var n,r,s;i.r(t),i.d(t,{AnalyticsTag:()=>o,AppAnalyticsTag:()=>l,BalancerTag:()=>u,CoreEvents:()=>s,CoreTag:()=>c,ExpireDefault:()=>r,Method:()=>n,ProductAnalyticsTag:()=>d,SessionsTag:()=>a}),function(e){e.GET="GET",e.POST="POST"}(n||(n={})),function(e){e[e.DEFAULT_VIEW_TIMEOUT_MS=12e4]="DEFAULT_VIEW_TIMEOUT_MS",e[e.DEFAULT_MAX_DURATION_VIEW_MS=864e5]="DEFAULT_MAX_DURATION_VIEW_MS",e[e.DEFAULT_SESSION_TIMEOUT_MS=18e4]="DEFAULT_SESSION_TIMEOUT_MS",e[e.DEFAULT_MAX_DURATION_SESSION_MS=1728e5]="DEFAULT_MAX_DURATION_SESSION_MS",e[e.STOP_VIEWS_AFTER_SESSION_EXPIRE_MS=2e3]="STOP_VIEWS_AFTER_SESSION_EXPIRE_MS"}(r||(r={})),function(e){e.SESSION_EXPIRE="SessionExpire",e.FAST_DATA_READY="FastDataReady"}(s||(s={}));const a="Sessions",o="Analytics",l="AppAnalytics",d="ProductAnalytics",u="Balancer",c="Core"},2995:(e,t,i)=>{var n=i(3948).extend({getCdnTraffic:function(){let e;if("undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.cdn)e=CdnBalancerStats.cdn.totalDownloadedBytes;else if("undefined"!=typeof Streamroot)e=this._getStreamrootPeerObject("cdn",!1)||this._getStreamrootInstanceObject("cdnDownload");else if("undefined"!=typeof peer5&&peer5.getStats)e=peer5.getStats().totalHttpDownloaded;else if("undefined"!=typeof teltoo&&teltoo.getStats){var t=teltoo.getStats();e=t.totalReceivedBytes-t.p2pReceivedBytes}return e},getMultiCdnInfo:function(){let e;if("undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.cdn&&CdnBalancerStats.cdn.cdns){const t=CdnBalancerStats.p2p;e={P2P:{downloaded_bytes:t.downloadedBytes,uploaded_bytes:t.uploadedBytes,downloaded_chunks:t.downloadedSegments,uploaded_chunks:t.uploadedSegments,errors:t.failedRequests?t.failedRequests.total:0,missed_downloaded_chunks:t.failedRequests?t.failedRequests.absent:0,timeout_errors:t.failedRequests?t.failedRequests.timeout:0,other_errors:t.failedRequests?t.failedRequests.error:0,late_uploaded_chunks:t.discardedUploadedSegments,late_uploaded_bytes:t.discardedUploadedBytes,late_downloaded_bytes:t.discardedDownloadedBytes,time:t.downloadMillis,active_peers:t.activePeers,peers:t.totalPeers}},CdnBalancerStats.cdn.cdns.forEach((function(t){e[t.name]={downloaded_bytes:t.bytes,downloaded_chunks:t.chunks,errors:t.failures,time:t.downloadMillis}}))}return e},getSegmentDuration:function(){if("undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.segmentDuration)return CdnBalancerStats.segmentDuration},getBalancerResponseId:function(){if("undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.cdn)return CdnBalancerStats.cdn.responseUUID},getP2PTraffic:function(){let e;return"undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.p2p?e=CdnBalancerStats.p2p.downloadedBytes:"undefined"!=typeof Streamroot?e=this._getStreamrootPeerObject("p2p",!0)||this._getStreamrootInstanceObject("dnaDownload"):"undefined"!=typeof peer5&&peer5.getStats?e=peer5.getStats().totalP2PDownloaded:"undefined"!=typeof teltoo&&teltoo.getStats&&(e=teltoo.getStats().p2pReceivedBytes),e},getUploadTraffic:function(){let e;return"undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.p2p?e=CdnBalancerStats.p2p.uploadedBytes:"undefined"!=typeof Streamroot?e=this._getStreamrootPeerObject("upload",!0)||this._getStreamrootInstanceObject("dnaUpload"):"undefined"!=typeof peer5&&peer5.getStats&&(e=peer5.getStats().totalP2PUploaded),e},getIsP2PEnabled:function(){let e=!1;if("undefined"!=typeof CdnBalancerStats&&CdnBalancerStats.p2p)e=CdnBalancerStats.p2p.downloadEnabled;else if("undefined"!=typeof Streamroot)if(Streamroot.p2pAvailable&&Streamroot.peerAgents)for(var t in Streamroot.peerAgents)e=e||Streamroot.peerAgents[t].isP2PEnabled;
2else Streamroot.instances&&Streamroot.instances.forEach((function(t){e=e||t.dnaDownloadEnabled||t.dnaUploadEnabled}));else"undefined"!=typeof peer5&&peer5.isEnabled?e=peer5.isEnabled():"undefined"!=typeof teltoo&&(e=!0);return e},_getStreamrootPeerObject:function(e,t){let i="";if(Streamroot.p2pAvailable&&Streamroot.peerAgents)for(const n in Streamroot.peerAgents){const r=Streamroot.peerAgents[n];!r.stats||t&&!r.isP2PEnabled||(i+=r.stats[e])}return i.length>0?i:void 0},_getStreamrootInstanceObject:function(e){let t="";return Streamroot.instances&&Streamroot.instances.forEach((function(i){i.stats&&i.stats.currentContent&&(t+=i.stats.currentContent[e])})),t.length>0?t:void 0}});e.exports=n},3003:e=>{e.exports={WILL_SEND_INIT:"will-send-init",WILL_SEND_START:"will-send-start",WILL_SEND_JOIN:"will-send-join",WILL_SEND_PAUSE:"will-send-pause",WILL_SEND_RESUME:"will-send-resume",WILL_SEND_SEEK:"will-send-seek",WILL_SEND_DATA_OBJECT:"will-send-data",WILL_SEND_BUFFER:"will-send-buffer",WILL_SEND_ERROR:"will-send-error",WILL_SEND_FATAL_ERROR:"will-send-fatal-error",WILL_SEND_STOP:"will-send-stop",WILL_SEND_PING:"will-send-ping",WILL_SEND_VIDEO_EVENT:"will-send-video-event",WILL_SEND_VIDEO_EVENT_END:"will-send-video-event-end",WILL_SEND_AD_START:"will-send-ad-start",WILL_SEND_AD_JOIN:"will-send-ad-join",WILL_SEND_AD_PAUSE:"will-send-ad-pause",WILL_SEND_AD_RESUME:"will-send-ad-resume",WILL_SEND_AD_BUFFER:"will-send-ad-buffer",WILL_SEND_AD_STOP:"will-send-ad-stop",WILL_SEND_AD_CLICK:"will-send-ad-click",WILL_SEND_AD_ERROR:"will-send-ad-error",WILL_SEND_AD_MANIFEST:"will-send-ad-manifest",WILL_SEND_AD_POD_START:"will-send-ad-break-start",WILL_SEND_AD_POD_STOP:"will-send-ad-break-stop",WILL_SEND_AD_QUARTILE:"will-send-ad-quartile",WILL_SEND_SESSION_START:"will-send-session-start",WILL_SEND_SESSION_STOP:"will-send-session-stop",WILL_SEND_NAV:"will-send-nav",WILL_SEND_BEAT:"will-send-beat",WILL_SEND_EVENT:"will-send-event",WILL_SEND_EVENT_END:"will-send-event-end",WILL_SEND_OFFLINE_EVENTS:"will-send-offline-events"}},3168:(e,t,i)=>{var n=i(3821),r=i(4387),s=i(7939);const{AnalyticsTag:a}=i(2784),{default:o}=i(7276);var l=r.extend({parse:function(e,t,i){i=i||"";var r=null;try{var l=this._findVideoStreamUrl(e);if(l)r=l;else{var d=e.replaceAll(",URI=","\n").replaceAll('"',"").replaceAll(",","\n");if(this._parseLastChunk){for(var u,c=[],h=/((\S*?)(\.m3u8|\.m3u|\.ts|\.m4s|\.mp4|\.cmfv|\.fmp4)((\?|;)\S*|\n|\r|$))/gi;null!==(u=h.exec(d));)c.push(u);if(c.length>0)r=c[c.length-1];else{var p=/((\S*?)(\.m4a|\.aac|\.mp3|\.ac3|\.ec3)((\?|;)\S*|\n|\r|$))/gi;for(c=[];null!==(u=p.exec(d));)c.push(u);c.length>0&&(r=c[c.length-1])}}else(r=/((\S*?)(\.m3u8|\.m3u|\.ts|\.m4s|\.mp4|\.cmfv|\.fmp4)((\?|;)\S*|\n|\r|$))/i.exec(d))||(r=/((\S*?)(\.m4a|\.aac|\.mp3|\.ac3|\.ec3)((\?|;)\S*|\n|\r|$))/i.exec(d))}}catch(e){o.warn(a,"Parse HLS Regex failed",e),this.done()}if(null!==r){var f=r[1].trim(),g="",m=i.lastIndexOf("/");if(0!==f.indexOf("http")&&-1!==m){if("/"===f[0]&&"/"!==f[1]){var v=i.indexOf("/")+1;v+=i.substr(v,i.length).indexOf("/")+1,v+=i.substr(v,i.length).indexOf("/"),f=i.slice(0,v)+f}else f=i.slice(0,m)+"/"+f;g=i.slice(0,m)+"/"}if(".m3u8"===r[3]||".m3u"===r[3])if(t)this._parseWithManifest(t,g,r);else{var y=new n(f,null,null,{cache:!0,requestHeaders:this._headers});y.on(n.Event.SUCCESS,function(e){this._parseWithManifest(e,g,r)}.bind(this)),y.on(n.Event.ERROR,function(e){this.done()}.bind(this)),y.send()}else{switch(r[3]){case".mp4":case".m4s":case".fmp4":case".m4a":case".aac":case".mp3":case".ac3":case".ec3":this._transportFormat=s.MP4;break;case".ts":this._transportFormat=s.MPEG2;break;case".cmfv":this._transportFormat=s.CMF}this._realResource=f,this.done()}}else this.done()},_parseWithManifest:function(e,t,i){this._lastManifest=e,this.parse(e.getResponseText(),null,t+i[2])},shouldExecute:function(e){var t=!0;return e&&(t=-1!==e.getResponseText().indexOf("#EXTM3U")),t},_findVideoStreamUrl:function(e){if(-1===e.indexOf("#EXTM3U"))return null;for(var t=e.split("\n"),i=0;i<t.length-1;i++){var n=t[i].trim();if(0===n.indexOf("#EXT-X-STREAM-INF:")){var r=-1!==n.indexOf("RESOLUTION="),s=-1!==n.indexOf("avc1.")||-1!==n.indexOf("hev1.")||-1!==n.indexOf("hvc1.");if(r||s){var a=t[i+1].trim(),o=/((\S*?)(\.m3u8|\.m3u)((\?|;)\S*|$))/i.exec(a);if(o)return o}}}return null}});e.exports=l},3381:(e,t,i)=>{var n=i(3948),r=i(4954),s=i(7680),a=n.extend({constructor:function(e,t,i){this._adapter=e,this._seekEnabled=t&a.Type.SEEK,this._bufferEnabled=t&a.Type.BUFFER,i=i||800,this._chrono=new s,this._lastPlayhead=0,i>0&&(this._timer=new r(this.progress.bind(this),i))},start:function(){this.stop(),this.canBeUsed()&&this._timer.start()},stop:function(){this._lastPlayhead=0,this._timer&&this._timer.stop()},skipNextTick:function(){this._lastPlayhead=0},progress:function(){var e=this._chrono.stop();this._chrono.start();var t=e*a.kBUFFER_THRESHOLD_RATIO,i=e*a.kSEEK_THRESHOLD_RATIO;this._adapter.getPlayrate&&this._adapter.getPlayrate()&&1!==this._adapter.getPlayrate()&&(t*=this._adapter.getPlayrate(),i*=this._adapter.getPlayrate());var n=this._getPlayhead(),r=1e3*Math.abs(this._lastPlayhead-n),s="function"==typeof this._adapter.getVideoBufferLength?this._adapter.getVideoBufferLength():null;if(r<t){if(this._bufferEnabled&&this._lastPlayhead>0&&!this._adapter.flags.isPaused&&!this._adapter.flags.isSeeking){const e=this._adapter.getPlugin();e&&e.options&&e.options.checkVideoBufferInPlayheadMonitor?(null===s||s<=0)&&this._adapter.fireBufferBegin(null,!1,"playheadMonitor"):this._adapter.fireBufferBegin(null,!1,"playheadMonitor")}}else r>i?this._seekEnabled&&this._lastPlayhead>0&&this._adapter.fireSeekBegin(null,!1,"playheadMonitor"):(this._seekEnabled&&this._adapter.fireSeekEnd(null,"playheadMonitor"),this._bufferEnabled&&this._adapter.fireBufferEnd(null,"playheadMonitor"));this._lastPlayhead=n},canBeUsed:function(){const e=this._adapter.getVideo(),t=this._adapter.getPlugin();return!(!t||!t.getPlayheadMonitorEnabled()||!this._seekEnabled&&!this._bufferEnabled||e&&e.getIsLive()&&t.options["content.isLive.noMonitor"])},_getPlayhead:function(){return this._adapter.getPlayhead()}},{Type:{NONE:0,BUFFER:1,SEEK:2},kBUFFER_THRESHOLD_RATIO:.5,kSEEK_THRESHOLD_RATIO:2});e.exports=a},3398:(e,t,i)=>{var n=i(3948);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a=n.extend({exists:function(e){return a.Dictionary.hasOwnProperty(e)},getNewName:function(e){var t=a.Dictionary[e];return r.warn(s,'The option "'+e+'" is deprecated, use "'+t+'" instead'),t}}
2,{Dictionary:{httpSecure:"app.https",username:"user.name",anonymousUser:"user.anonymousId",obfuscateIp:"user.obfuscateIp",userType:"user.type","content.title2":"content.program","background.settings.iphone":"background.settings.iOS","parse.hls":"parse.manifest","parse.dash":"parse.manifest","parse.locationHeader":"parse.manifest","extraparam.1":"content.customDimension.1","extraparam.2":"content.customDimension.2","extraparam.3":"content.customDimension.3","extraparam.4":"content.customDimension.4","extraparam.5":"content.customDimension.5","extraparam.6":"content.customDimension.6","extraparam.7":"content.customDimension.7","extraparam.8":"content.customDimension.8","extraparam.9":"content.customDimension.9","extraparam.10":"content.customDimension.10","extraparam.11":"content.customDimension.11","extraparam.12":"content.customDimension.12","extraparam.13":"content.customDimension.13","extraparam.14":"content.customDimension.14","extraparam.15":"content.customDimension.15","extraparam.16":"content.customDimension.16","extraparam.17":"content.customDimension.17","extraparam.18":"content.customDimension.18","extraparam.19":"content.customDimension.19","extraparam.20":"content.customDimension.20","ad.extraparam.1":"ad.customDimension.1","ad.extraparam.2":"ad.customDimension.2","ad.extraparam.3":"ad.customDimension.3","ad.extraparam.4":"ad.customDimension.4","ad.extraparam.5":"ad.customDimension.5","ad.extraparam.6":"ad.customDimension.6","ad.extraparam.7":"ad.customDimension.7","ad.extraparam.8":"ad.customDimension.8","ad.extraparam.9":"ad.customDimension.9","ad.extraparam.10":"ad.customDimension.10"}});e.exports=a},3455:(e,t,i)=>{var n=i(3948),r=i(470),s=n.extend({constructor:function(){this.storage=new r("npawOffline",!0),this.actualView=null,this.viewList=[],this.givenIds=[],this._getOldViewList()},_newView:function(){var e=this._getValidId();this.storage.setLocal(e,""),this.viewList.push(e),this.storage.setLocal("views",this.viewList),this.actualView=e},addEvent:function(e,t){if("/start"===e&&this._newView(),"/init"===e)return null;if(!this.actualView)return null;var i='{"request":"'+e.slice(1)+'",';for(var n in i+='"unixtime":'+Date.now()+",",t){if(void 0===t[n])break;i+='"'+n+'":',"code"===n?i+='"CODE_PLACEHOLDER",':"sessionId"===n?i+='"SESSION_PLACEHOLDER",':"sessionRoot"===n?i+='"ROOT_PLACEHOLDER",':"string"==typeof t[n]?i+='"'+t[n]+'",':"object"==typeof t[n]?i+='"'+JSON.stringify(t[n]).replace(/"/g,'\\"')+'",':i+=t[n]+","}i=i.slice(0,-1),i+="}";var r=this.storage.getLocal(this.actualView);""!==r&&(r+=","),this.storage.setLocal(this.actualView,r+i)},getView:function(){if(this.viewList.length>this.givenIds.length)for(var e=0;;){var t=this.viewList[e];if(this.givenIds.indexOf(t)<0)return this.givenIds.push(t),["["+this.storage.getLocal(t)+"]",t];e++}return[null,null]},removeView:function(e){this.storage.removeLocal(e);var t=this.viewList.indexOf(e);-1!==t&&this.viewList.splice(t,1),-1!==(t=this.givenIds.indexOf(e))&&this.givenIds.splice(t,1),this.storage.setLocal("views",this.viewList.toString()),e===this.actualView&&(this.actualView=null)},_getOldViewList:function(){var e="";this.storage.getLocal("views")?e=this.storage.getLocal("views"):this.storage.setLocal("views",""),""===e?this.viewList=[]:"function"==typeof e.split&&(this.viewList=e.split(","))},_getValidId:function(){var e=Math.floor(1e8*Math.random()).toString();return this.viewList.indexOf(e)>=0?this._getValidId():e},sent:function(){this.givenIds=[]}});e.exports=s},3473:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});class n{constructor(e,t,i){if(this.timeoutMs=e,this.maxDurationMs=t,this.coreStorage=i,this.expired=!1,i)try{const e=i.getLocal("firstRequestTime");this.firstRequestTime=e?Number(e):void 0;const t=i.getLocal("lastRequestTime");this.lastRequestTime=t?Number(t):void 0}catch(e){}}onRequestSent(){const e=Date.now();void 0===this.firstRequestTime&&(this.firstRequestTime=e),this.lastRequestTime=e,this.coreStorage&&(void 0!==this.firstRequestTime&&this.coreStorage.setLocal("firstRequestTime",this.firstRequestTime.toString()),void 0!==this.lastRequestTime&&this.coreStorage.setLocal("lastRequestTime",this.lastRequestTime.toString()))}reset(){this.coreStorage&&(this.coreStorage.removeLocal("firstRequestTime"),this.coreStorage.removeLocal("lastRequestTime")),this.firstRequestTime=void 0,this.lastRequestTime=void 0,this.expired=!1}checkExpiration(e){void 0!==e&&e!==this.timeoutMs&&(this.timeoutMs=e);const t=Date.now();let i=this.lastRequestTime,n=this.firstRequestTime;if(this.coreStorage)try{const e=this.coreStorage.getLocal("lastRequestTime");i=e?Number(e):i;const t=this.coreStorage.getLocal("firstRequestTime");n=t?Number(t):n}catch(e){}const r=void 0!==i&&t-i>this.timeoutMs,s=void 0!==n&&t-n>this.maxDurationMs;!r&&!s||this.expired||(this.expired=!0)}isExpired(){return this.checkExpiration(),this.expired}isStarted(){return void 0!==this.firstRequestTime&&this.firstRequestTime>0}isActive(){return void 0!==this.firstRequestTime&&this.firstRequestTime>0&&(this.checkExpiration(),!this.expired)}}},3555:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(2784);
2class r{constructor(e,t,i,r,s,a,o,l){this.method=n.Method.GET,this.videoKey=i,this.service=e,this.method=r,this.params=t||{},this.expirationManager=l,this.body=s,this.onSuccessCallback=a,this.onFailCallback=o}getService(){return this.service}getMethod(){var e;return null!==(e=this.method)&&void 0!==e?e:n.Method.GET}setMethod(e){this.method=e}getParams(){return this.params}getOnSuccess(){return this.onSuccessCallback}getOnFail(){return this.onFailCallback}getVideoKey(){return this.videoKey}getExpirationManager(){return this.expirationManager}getParam(e){return this.params[e]}setParam(e,t){return this.params[e]=t,this}setParams(e){this.params=e}getBody(){return this.body}setBody(e){this.body=e}isPost(){return this.method===n.Method.POST}}},3713:e=>{e.exports={cdnName:"LEVEL3",parsers:[{element:"host+type",headerName:"X-WR-Diag",regex:/Host:(.+)\sType:(.+)/}],requestHeaders:{"X-WR-Diag":"host"},parseType:function(e){if(e){if(0===e.indexOf("TCP_HIT")||0===e.indexOf("TCP_MEM_HIT")||0===e.indexOf("TCP_IMS_HIT"))return 1;if(0===e.indexOf("TCP_MISS"))return 2}return 0}}},3782:(e,t,i)=>{const n=i(703),r=i(7086),s={AdPosition:n,ManifestError:i(8932),RequestMethod:i(9637),Service:i(7062),WillSendEvent:i(3003),WillSendLog:i(825),AdInsertionType:i(1083),Adapter:r,Metadata:i(8424)};e.exports=s},3821:(e,t,i)=>{var n=i(3948);const{default:r,LogLevel:s}=i(7276);var a=i(2507);const{AnalyticsTag:o}=i(2784);var l=n.extend({constructor:function(e,t,i,n,r){this.videoKey=r,this.xhr=this.createXHR(),this.host=e||"",this.service=t||"",this.params=i||{},this.options=a.assign({},l.defaultOptions,n),this.retries=0,this.sendPostRequest=!1,this.preparedPostRequest=!1,this.options.cache||this.params.timemark||this.setParam("timemark",(new Date).getTime())},createXHR:function(){var e={};try{e=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}catch(e){r.error(o,e)}return e},getXHR:function(){return this.xhr},getResponse:function(){return this.xhr.response},getResponseText:function(){return this.xhr.responseText},getResponseHeaders:function(){return this.xhr.getAllResponseHeaders()},getUrl:function(){return this.host+this.service+this.getParamString()},getVideoKey:function(){return this.videoKey},on:function(e,t,i){return this.xhr.addEventListener?this.xhr.addEventListener(e,t.bind(this,this,i)):e===l.Event.SUCCESS&&(this.xhr.onreadystatechange=function(){4===this.xhr.readyState&&t.bind(this,this,i)}.bind(this)),this},off:function(e,t){return this.xhr.removeEventListener(e,t),this},getParamString:function(){try{var e="?";for(var t in this.params){var i=this.params[t];if(null!==i&&"object"==typeof i){var n=JSON.stringify(i);"{}"!==n&&(e+=encodeURIComponent(t)+"="+encodeURIComponent(n)+"&")}else null!=i&&""!==i&&(e+=encodeURIComponent(t)+"="+encodeURIComponent(i)+"&")}return e.slice(0,-1)}catch(e){return r.error(o,e),""}},getParam:function(e){return this.params[e]},setParam:function(e,t){return this.params[e]=t,this},setBody:function(e){this.body=e},setPostRequest:function(e){this.sendPostRequest=e},getParamsForPostMessages:function(){var e={};try{var t=this.getParam("timemark"),i=this.getParam("code"),n=this.getParam("sessionRoot"),s=this.getParam("sessionId");t&&(e.timemark=t),i&&(e.code=i),n&&(e.sessionRoot=n),s&&(e.sessionId=s)}catch(e){r.error(o,e)}return e},send:function(){try{try{this.sendPostRequest&&!this.preparedPostRequest&&(this.options.method="POST",this.body=JSON.stringify(this.params),this.params=this.getParamsForPostMessages(),this.preparedPostRequest=!0)}catch(e){}if(this.xhr.open(this.options.method,this.getUrl(),!0),this.options.requestHeaders)for(var e in this.options.requestHeaders)this.options.requestHeaders.hasOwnProperty(e)&&this.xhr.setRequestHeader(e,this.options.requestHeaders[e]);for(var t in this.options.retryAfter>0&&this.options.maxRetries>0&&0===this.retries&&this.on(l.Event.ERROR,function(){if(this.retries>=this.options.maxRetries)r.error(o,'Aborting failed request "'+this.service+'". Max retries reached.');else{r.warn(o,'YBRequest "'+this.service+'" failed. Retry '+(this.retries+1)+" of "+this.options.maxRetries+" in "+this.options.retryAfter+"ms.");try{setTimeout(function(){this.retries+=1,this.send()}.bind(this),this.options.retryAfter)}catch(e){"undefined"!=typeof atv?atv.setTimeout(function(){this.retries+=1,this.send()}.bind(this),this.options.retryAfter):r.error(o,e)}}}.bind(this)),r.logLevel<=s.VERBOSE&&r.verbose(o,"XHR Req: "+this.getUrl()),l._globalListeners)l._globalListeners[t].forEach(function(e){this.on(t,e)}.bind(this));return this.xhr.send(this.body)}catch(e){r.error(o,e)}}},{Event:{SUCCESS:"load",LOAD:"load",ERROR:"error",ABORT:"abort"},defaultOptions:{method:"GET",requestHeaders:{},maxRetries:3,retryAfter:5e3,cache:!1},_globalListeners:{},onEvery:function(e,t){l._globalListeners[e]=l._globalListeners[e]||[],l._globalListeners[e].push(t)},offEvery:function(e,t){if(l._globalListeners[e]){var i=l._globalListeners[e].indexOf(t);-1!==i&&l._globalListeners[e].splice(i,1)}}});e.exports=l},3831:(e,t,i)=>{var n=i(3821),r=i(4387),s=i(7939);const{AnalyticsTag:a}=i(2784),{default:o}=i(7276);var l=r.extend({parse:function(e,t){if(t)this.parseLocation(t,e);else{var i=new n(e,null,null,{cache:!0,requestHeaders:this._headers});i.on(n.Event.SUCCESS,function(t){this.parseLocation(t,e)}.bind(this)),i.on(n.Event.ERROR,function(e){this.done()}.bind(this)),i.send()}},parseLocation:function(e,t){this.iterations--;var i=new RegExp(/<Location>([\s\S]+)<\/Location>/);try{this._lastManifest=e;var n=e.getResponseText(),r=i.exec(n);if(r&&r[1])var s=this._htmlDecode(r[1].replace("\n",""));s&&s!==t&&this.iterations>0?this.parse(s):this.parseFinalResource(n,t)}catch(e){o.warn(a,"Dash parse failed"),this.done()}},_htmlDecode:function(e){if("undefined"!=typeof document&&"function"==typeof document.createElement){var t=document.createElement("textarea");return t.innerHTML=e,t.childNodes&&t.childNodes.length?t.childNodes[0].nodeValue:e}return e},parseFinalResource:function(e,t){var i=new RegExp(/<BaseURL>[\r\n]*(.*?)[\r\n]*<\/BaseURL>/g),n=new RegExp(/<SegmentTemplate[\s\S]*?media="([^"]+)"/g),r=new RegExp(/<SegmentURL[\s\S]*?media="([^"]+)"/g),s=null;try{if(this._parseLastChunk){for(var l,d=[];null!==(l=i.exec(e));)l[1]&&this._isFullUrl(l[1])&&d.push(l);if(0===d.length)for(;null!==(l=n.exec(e));)l[1]&&d.push(l);if(0===d.length)for(;null!==(l=r.exec(e));)l[1]&&d.push(l);d.length>0&&(s=d[d.length-1])}else{var u=/<BaseURL>[\r\n]*(.*?)[\r\n]*<\/BaseURL>/.exec(e),c=/<SegmentTemplate[\s\S]*media="([^"]+)/.exec(e),h=/<SegmentURL[\s\S]*media="([^"]+)/.exec(e);s=u||c||h}this._getManifestMetadata(e),s&&s[1]&&this._isFullUrl(s[1])?s[1].indexOf('"')>0?this._realResource=s[1].substr(0,s[1].indexOf('"')).replace("\n",""):this._realResource=s[1].replace("\n",""):this._realResource=t}catch(e){o.warn(a,"Dash manifest parse failed")}this.done()},_getManifestMetadata:function(e){try{var t=new RegExp(/<AdaptationSet[\s\S]*mimeType="video\/([^"]+)/).exec(e),i=null;switch(t[1]){case"mp4":case"m4s":i=s.MP4;break;case"mp2t":i=s.MPEG2;break;case"cmfv":i=s.CMF}this._transportFormat=i}catch(e){o.warn(a,"Couldnt find the transport format")}},_isFullUrl:function(e){return-1!==e.indexOf("http")},shouldExecute:function(e){var t=!0;return e&&(t=-1!==e.getResponseText().indexOf("<MPD")),t}});e.exports=l},3908:(e,t,i)=>{var n=i(1593),r=i(2507);i(3821);const{AnalyticsTag:s}=i(2784),{default:a}=i(7276);var o=n.extend({constructor:function(e){this._options=r.assign({cdnName:null,parsers:[],requestMethod:"HEAD",requestHeaders:{},parseType:function(){return 0}},e),this._responses={}}
2,done:function(){this.emit(o.Event.DONE)},addParser:function(e){return this._options.parsers.push(e),this},setCdnName:function(e){return this._options.cdnName=e,this},setRequestMethod:function(e){return this._options.requestMethod=e,this},setRequestHeader:function(e,t){return this._options.requestHeaders[e]=t,this},setParseType:function(e){return this._options.parseType=e,this},getParsedCdnName:function(){return this._cdnName},getParsedNodeHost:function(){return this._cdnNodeHost},getParsedNodeTypeString:function(){return this._cdnNodeTypeString},getParsedNodeType:function(){return this._cdnNodeType},getResponses:function(){return this._responses},parse:function(e,t){this._responses=t||{};var i=JSON.stringify(this._options.requestHeaders);this._responses[i]?this._parseResponse(this._responses[i]):this._requestResponse(e)},_requestResponse:function(e){var t=JSON.stringify(this._options.requestHeaders),i="{}"!==t;const n=new XMLHttpRequest;n.open(this._options.requestMethod,e);for(const e in this._options.requestHeaders)Object.prototype.hasOwnProperty(this._options.requestHeaders,e)&&n.setRequestHeader(e,this._options.requestHeaders[e]);n.onreadystatechange=()=>{4===n.readyState&&(n.status>=200&&n.status<400?(this._responses[t]=n.getAllResponseHeaders(),this._parseResponse(this._responses[t])):i?(this._options.requestHeaders={},this._requestResponse(e)):this.done())},n.send()},_parseResponse:function(e){this._options.parsers.forEach(function(t){if("string"==typeof t.headerName)this._parseHeaderResponse(e,t,t.headerName);else if(Array.isArray(t.headerName))for(var i=0,n=t.headerName.length;i<n;i++){var r=t.headerName[i];"string"==typeof r&&this._parseHeaderResponse(e,t,r)}}.bind(this)),this.done()},_parseHeaderResponse:function(e,t,i){i&&(i=i?i.toLowerCase():"",e.split("\n").forEach(function(e){var n=e.indexOf(":");-1!==n&&e.slice(0,n).toLowerCase()===i&&this._executeParser(t,e.slice(n+1))}.bind(this)))},_executeParser:function(e,t){try{var i=e.regex.exec(t.trim());if(null!==i)switch(this._options.cdnName&&(this._cdnName=this._options.cdnName),e.element){case o.ElementType.HOST:this._cdnNodeHost=i[1];break;case o.ElementType.TYPE:this._cdnNodeTypeString=i[1],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString);break;case o.ElementType.HOST_AND_TYPE:this._cdnNodeHost=i[1],this._cdnNodeTypeString=i[2],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString);break;case o.ElementType.TYPE_AND_HOST:this._cdnNodeTypeString=i[1],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString),this._cdnNodeHost=i[2];break;case o.ElementType.NAME:this._cdnName=i[1].toUpperCase()}}catch(e){a.warn(s,"CDN parsing for "+this._options.cdnName+" could not parse header value "+t)}},shouldExecute:function(){return!0}},{Event:{DONE:"done"},ElementType:{HOST:"host",TYPE:"type",HOST_AND_TYPE:"host+type",TYPE_AND_HOST:"type+host",NAME:"name"},_cdnConfigs:{},setBalancerHeaderName:function(e,t){o._cdnConfigs.Balancer.parsers[0].headerName=e,o._cdnConfigs.Balancer.parsers[1].headerName=t},create:function(e){if(o._cdnConfigs[e])return new o(o._cdnConfigs[e]);a.warn(s,"Tried to create an unexisting CdnParser named "+e)},add:function(e,t){o._cdnConfigs[e]=t}});o.add("Level3",i(3713)),o.add("Cloudfront",i(7286)),o.add("Akamai",i(5298)),o.add("Highwinds",i(2047)),o.add("Fastly",i(563)),o.add("Telefonica",i(5040)),o.add("Amazon",i(2370)),o.add("Edgecast",i(7660)),o.add("Balancer",i(2580)),o.add("NosOtt",i(4335)),e.exports=o},3948:(e,t,i)=>{var n=i(4173),r=i(9600),s=function(){};s.prototype={constructor:function(){}},s.extend=function(e,t){var i,s=this;return i=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return s.apply(this,arguments)},n(i,s,t),i.prototype=r(s.prototype),e&&n(i.prototype,e),i.prototype.constructor=i,i.__super__=s.prototype,i},e.exports=s},4173:e=>{e.exports=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}},4335:e=>{e.exports={cdnName:"NOSOTT",parsers:[{element:"host",headerName:"X-NOS-Server",regex:/(.+)/},{element:"type",headerName:"X-Cache",regex:/(.*)/}],parseType:function(e){switch(e){case"Hit":return 1;case"Miss":return 2;default:return 0}}}},4387:(e,t,i)=>{const n=i(1593).extend({constructor:function(e){this._realResource=void 0,this._lastManifest=void 0,this._transportFormat=void 0,this.iterations=3,this._headers=e,this._parseLastChunk=!1},setParseLastChunk:function(e){this._parseLastChunk=e}
2,done:function(){this.iterations=3,this.emit(n.Event.DONE)},parse:function(e,t){},getResource:function(){return this._realResource},getTransportFormat:function(){return this._transportFormat},getLastManifest:function(){return this._lastManifest},shouldExecute:function(e){return!0}},{Event:{DONE:"done"}});e.exports=n},4607:e=>{e.exports=function(){Function.prototype.bind=Function.prototype.bind||function(e){var t=Array.prototype.slice,i=this,n=t.call(arguments,1);function r(){var r=i.prototype&&this instanceof i;return i.apply(!r&&e||this,n.concat(t.call(arguments)))}return r.prototype=i.prototype,r},Array.prototype.forEach=Array.prototype.forEach||function(e,t){if("function"!=typeof e)throw new TypeError(e+" is not a function!");for(var i=this.length,n=0;n<i;n++)e.call(t,this[n],n,this)},Math.trunc=Math.trunc||function(e){return isNaN(e)?NaN:e>0?Math.floor(e):Math.ceil(e)}}},4954:(e,t,i)=>{var n=i(3948),r=i(7680),s=n.extend({constructor:function(e,t){this.callback=e,this.interval=t||5e3,this.isRunning=!1,this._timer=null,this.chrono=new r},start:function(){this.isRunning||(this.isRunning=!0,this._setTick())},stop:function(){if(this.isRunning=!1,this._timer)try{clearTimeout(this._timer),this._timer=null}catch(e){"undefined"!=typeof atv&&(atv.clearTimeout(this._timer),this._timer=null)}},_setTick:function(){if(this.isRunning){this.chrono.start();try{this._timer=setTimeout(function(){this.callback(this.chrono.stop()),this._setTick()}.bind(this),this.interval)}catch(e){"undefined"!=typeof atv&&(this._timer=atv.setTimeout(function(){this.callback(this.chrono.stop()),this._setTick()}.bind(this),this.interval))}}}});e.exports=s},5031:(e,t,i)=>{const{default:n}=i(7276);var r=i(3782);const{default:s}=i(9065),{default:a}=i(3555),{AnalyticsTag:o,Method:l}=i(2784),{default:d}=i(1577),{default:u}=i(61);var c={_startPings:function(){if(!this.sendingPings){var e=this.plugin.isMethodPostEnabled()?l.POST:l.GET;const t=1e3*s.getInstance().getFastDataService().getPingTime();this._currentPingTime=t,s.getInstance().pushPeriodicDataFromCallback(this.plugin.options.offline?u.Consumer.PERSISTENT:u.Consumer.NQS,this.getVideoKey(),r.Service.PING,t,e,this._sendPing.bind(this),this._onPingSuccess.bind(this),void 0,this.expirationManager),this.sendingPings=!0}},_onPingSuccess:function(){this.lastEventTime=(new Date).getTime()},_stopPings:function(){s.getInstance().unregisterPeriodicPush(this.getVideoKey()),this.sendingPings=!1},_sendPing:function(){if(!this.plugin.analyticsRequestHandler.shouldSendStats())return;if(!this.isInitiated&&!this._adapter.flags.isStarted||this._adapter.flags.isStopped)return;if(this._expiredSession())return;const e=(new Date).getTime(),t=this._currentPingTime||1e3*s.getInstance().getFastDataService().getPingTime()||5e3,i=this.timeSinceLastPing?e-this.timeSinceLastPing:t;this.timeSinceLastPing=e;var d={diffTime:i,entities:this.requestBuilder.getChangedEntities([this,this.plugin],this.options)};if(this._adapter&&(d=this._adapter.flags.isPaused?this.requestBuilder.fetchParams(d,["pauseDuration"],!1,[this,this.plugin],this.options):this.requestBuilder.fetchParams(d,["bitrate","throughput","fps"],!1,[this,this.plugin],this.options),this._adapter.flags.isJoined&&(d=this.requestBuilder.fetchParams(d,["playhead"],!1,[this,this.plugin],this.options)),this._adapter.flags.isBuffering&&(d=this.requestBuilder.fetchParams(d,["bufferDuration"],!1,[this,this.plugin],this.options)),this._adapter.flags.isSeeking&&(d=this.requestBuilder.fetchParams(d,["seekDuration"],!1,[this,this.plugin],this.options))),this._adsAdapter&&!this.options["ad.ignore"]&&(this._adsAdapter.flags.isStarted&&(d=this.requestBuilder.fetchParams(d,["adPlayhead","adViewedDuration","adViewability"],!1,[this,this.plugin],this.options),d=this._adsAdapter.flags.isPaused?this.requestBuilder.fetchParams(d,["adPauseDuration"],!1,[this,this.plugin],this.options):this.requestBuilder.fetchParams(d,["adBitrate"],!1,[this,this.plugin],this.options)),this._adsAdapter.flags.isBuffering&&(d=this.requestBuilder.fetchParams(d,["adBufferDuration"],!1,[this,this.plugin],this.options))),d=this.requestBuilder.buildParams(d,r.Service.PING,[this,this.plugin],this.options),this.controlPlayerExists()&&this._adapter&&!this._adapter.checkExistsPlayer())return n.debug(o,"Detected player no exists, and fire stop event"),void this._adapter.fireStop();var u=this.plugin.isMethodPostEnabled()?l.POST:l.GET;const c=new a(r.Service.PING,d,this.getVideoKey(),u,void 0,void 0,void 0,this.expirationManager);let h=c.getVideoKey(),p=c.getService();const f=this.plugin.analyticsRequestHandler.onWillSendVideoRequestListeners;for(const e of f)e(p,h,d);return this.plugin.analyticsRequestHandler.prepareParams(c),n.verbose(o,r.Service.PING),this.startDelayed&&this._retryStart(),c.getParams()}};e.exports=c},5040:e=>{e.exports={cdnName:"TELEFO",parsers:[{element:"host+type",headerName:"x-tcdn",regex:/Host:(.+)\sType:(.+)/}],requestHeaders:{"x-tcdn":"host"},parseType:function(e){if(e){if(-1!==e.indexOf("p")||-1!==e.indexOf("c"))return 1;if(-1!==e.indexOf("i")||-1!==e.indexOf("m"))return 2}return 0}}},5200:(e,t,i)=>{var n=i(3948),r=i(7680),s=n.extend({constructor:function(){this.reset()},reset:function(){this.join=new r,this.seek=new r,this.pause=new r,this.buffer=new r,this.total=new r,this.viewedMax=[]}});e.exports=s},5292:(e,t,i)=>{var n=i(1593);const{default:r}=i(7276);
2var s=i(2507),a=i(9835),o=i(5200),l=i(7255),d=i(3381),u=i(8490),c=i(7086),h=i(6777);const{AnalyticsTag:p}=i(2784),{default:f}=i(9065),{default:g}=i(61);var m=n.extend({constructor:function(e,t,n,s,d,u){this._key=e,this._setAdapter=!1,this._npawVideo=t,this._loadedAdapterImplementation=!1,this.flags=new l,this.chronos=new o,this._adapterClasses={},this.fireEventsStruct={},this.fireEventsStruct.buffer=[],this.fireEventsStruct.seek=[],this.monitor=null,this.plugin=n,this.player&&this.unregisterListeners(),this.player=null,this._isAdsAdapter=null,this.log=r,this.log.loadLevelFromUrl(),this.npaw=i(6014),this.setPlayer(d);const c="object"!=typeof u;let h;const f=c?JSON.parse(u):void 0;if(this._adapterName=c?this.getAdapterName(f):this.getAdapterNameFromClass(u),c&&this.plugin&&this.plugin.canOverwriteAdapters()&&(h=this._getAdapterFromTemplates(this._adapterName),h&&r.notice(p,"Overwrite Adapter: "+this._adapterName)),c&&!h)if(u)try{h=f}catch(e){r.warn(p,"Problem parsing adapter json code (to object conversion)")}else h=this._getAdapterFromTemplates(this._adapterName);this.tag=this.player,c&&h?(this.evalAdapterJson(h,!1),this.registerListeners()):!c&&u&&(this.loadAdapterClasses(u,!1),this.registerListeners()),this.plugin.options.enableExtraMetricCollection&&this._npawVideo.fetchLocation(),r.notice(p,"Adapter "+this.getVersion()+" with Lib "+a+" is ready.")},_updatePlayer:function(e){this.player&&this.unregisterListeners(),this.player=null,this.setPlayer(e),this.tag=this.player,this.registerListeners()},isSetAdapter:function(){return this._setAdapter},getVideo:function(){return this._npawVideo},getPlugin:function(){return this.plugin},getNpawUtils:function(){return this.plugin.utils},getNpawReference:function(){return this.npaw},getLog:function(){return this.log},isStarted:function(){return!!this.flags&&this.flags.isStarted},getAdapterClass:function(e){var t=this._adapterClasses;return t[e]?t[e]:null},getAdapterName:function(e){if(e&&e["adapter,getVersion"])try{return window.Function(e["adapter,getVersion"])()}catch(e){}return"undefined"},getAdapterNameFromClass:function(e){if(e&&e.getVersion)try{return e.getVersion()}catch(e){}return"undefined"},getAdapterClasses:function(){return this._adapterClasses},updateAdapterTemplates:function(e){if(this.plugin.canOverwriteAdapters()){var t=this._getAdapterFromTemplates(this._adapterName,e);t&&(this.evalAdapterJson(t,!0),this.registerListeners())}},_getAdapterFromTemplates:function(e,t){var i=null;t||(t=this.plugin.adapterTemplates);try{e&&t&&t[e.toLowerCase()]&&(i=JSON.parse(t[e.toLowerCase()]))}catch(t){r.warn(p,"Adapter "+e+" not found on repository")}return i},evalAdapterJson:function(e,t){t=t||!1;var i=0,n=0,s="";try{for(var a in e){var o=a.split(","),l=o.shift(),d=o.shift();s=d;var u=null;if(o&&o.length>=1){var c=o;u=window.Function(c,e[a])}else u=window.Function(e[a]);u&&("adapter"===l.toLowerCase()?(this[d]=u,i++):l.indexOf(".adapter")>0?(l=l.replace(".adapter",""),this.getAdapterClasses()[l]||(this.getAdapterClasses()[l]=new m(this._key,this._npawVideo,this.getPlugin(),null,this.player,null,null,{})),this.getAdapterClasses()[l][d]=u,n++):(this.getAdapterClasses()[l]||(this.getAdapterClasses()[l]={},this.getAdapterClasses()[l].constructor=function(){},this.getAdapterClasses()[l].plugin=this.plugin,this.getAdapterClasses()[l].getNpawUtils=function(){return this.plugin.utils}),this.getAdapterClasses()[l][d]=u,n++))}this._loadedAdapterImplementation=!0,this._adapterEvaluatedCode=e;try{this.adapterHash=h("string"==typeof e?e.trim():JSON.stringify(e).trim())}catch(e){this.adapterHash="Undefined"}r.notice(p,"["+this.getAdapterKey()+"] Loaded adapter ("+this.getVersion()+") (Hash "+this.adapterHash+") implementation from JSON; From templates: "+t+"; Integrated adapter methods: "+i+", external methods: "+n)}catch(e){r.error(p,"Can't be evaluated adapter json correctly; From templates: "+t+", Last method evaluated: "+s)}},loadAdapterClasses:function(e,t){t=t||!1;let i=0,n=0,s="",a=Object.getPrototypeOf(e);try{let o="";const l=new Map;for(;a!==Object.prototype;
2)Object.getOwnPropertyNames(a).forEach((e=>{"function"!=typeof a[e]||"constructor"===e||l.has(e)||l.set(e,a[e])})),a=Object.getPrototypeOf(a);if(l.forEach(((e,t)=>{this[t]=e,o+=e.toString(),i++})),s="Adapter Class",void 0!==e.adsAdapters)for(const t of Object.keys(e.adsAdapters))this.getAdapterClasses()[t]=new m(this._key,this._npawVideo,this.getPlugin(),null,this.player,new e.adsAdapters[t]),s="Ads Adapter -> "+t;if(void 0!==e.additionalContexts){for(const t of Object.keys(e.additionalContexts)){this.getAdapterClasses()[t]||(this.getAdapterClasses()[t]={},this.getAdapterClasses()[t].constructor=function(){},this.getAdapterClasses()[t].plugin=this.plugin,this.getAdapterClasses()[t].getNpawUtils=function(){return this.plugin.utils});const i=new e.additionalContexts[t],r=Object.getPrototypeOf(i),s=Object.getOwnPropertyNames(r).filter((e=>"function"==typeof i[e]&&"constructor"!==e));for(const e of s)this.getAdapterClasses()[t][e]=i[e],n++}s="Additional Contexts"}this._loadedAdapterImplementation=!0;try{this.adapterHash=h(o.trim())}catch(e){this.adapterHash="Undefined"}r.notice(p,"["+this.getAdapterKey()+"] Loaded adapter ("+this.getVersion()+") (Hash "+this.adapterHash+") implementation from class; From templates: "+t+"; Integrated adapter methods: "+i+", external methods: "+n)}catch(e){r.error(p,"Can't be evaluated adapter class correctly; From templates: "+t+", Last method evaluated: "+s)}},getAdapterKey:function(){return this._key},setPlayer:function(e){"string"==typeof e&&"undefined"!=typeof document?this.player=document.getElementById(e):this.player=e},registerListeners:function(){},unregisterListeners:function(){},dispose:function(){try{this.stopMonitor(),this.stopReadyStateMonitor(),this.unregisterListeners(),this.player=null,this.tag=null}catch(e){r.error(p,"Can't process dispose for video "+this._key)}},monitorPlayhead:function(e,t,i){this.stopMonitor();var n=0;e&&(n|=d.Type.BUFFER),t&&(n|=d.Type.SEEK),this.monitor&&this.monitor._timer.isRunning?this.monitor.skipNextTick():this.monitor=new d(this,n,i)},stopMonitor:function(){this.monitor&&this.monitor.stop()},monitorReadyState:function(e){this.stopReadyStateMonitor(),this.stateMonitor=new u(this,e)},startReadyStateMonitor:function(){this.stateMonitor&&this.stateMonitor.start()},stopReadyStateMonitor:function(){this.stateMonitor&&this.stateMonitor.stop()},checkReadyState:function(e,t){try{this.plugin&&this.plugin.getReadyStateMonitorEnabled()&&e&&(e>3&&!this.flags.isSeeking?this.flags.isBuffering?this.fireBufferEnd({},t+"-readyState"):this.flags.isJoined||this.fireJoin({},t+"-readyState"):e<4&&!this.flags.isBuffering&&!this.flags.isPaused&&this.fireBufferBegin({},!1,t+"-readyState",!0))}catch(e){r.error(p,"Can't check readyState property correctly")}},getPlayhead:function(){return null},getDuration:function(){return null},getBitrate:function(){return null},getTotalBytes:function(){return null},getTitle:function(){return null},getResource:function(){return null},getPlayerVersion:function(){return null},getPlayerName:function(){return null},getVersion:function(){return a+"-generic-js"},getVideoObject:function(){return null},getLastUsedCdn:function(){return f.getInstance().getCommonVariable(g.Products.BALANCER,g.BalancerVariables.LAST_USED_CDN)||void 0},checkExistsPlayer:function(){return!0},checkExistsObjectOnPage:function(e){return s.elementIsInPage(e)},fireInit:function(e,t){if(this._npawVideo&&this._npawVideo.controlPlayerExists()&&!this.checkExistsPlayer())return r.warn(p,"Cannot fire init event because player not exists on the document"),null;this.adapterHash&&((e=e||{}).pluginHash=this.adapterHash),this._npawVideo&&this._npawVideo.fireInit(e,t)},fireStart:function(e,t){if(this._npawVideo&&this._npawVideo.controlPlayerExists()&&!this.checkExistsPlayer())return r.warn(p,"Cannot fire start event because player not exists on the document"),null;if(this.plugin&&this.plugin.backgroundDetector&&this.plugin.backgroundDetector.canBlockStartCalls())return null;if(!this.flags.isStarted){this.flags.isStarted=!0,this.chronos.total.start();
2const i=!this._npawVideo||this._npawVideo._joinTimeMeasureAfterAdBreakAvailable();this._isAds()||i||this.chronos.join.start(),t&&((e=e||{}).triggeredEvents=[t]),this.adapterHash&&((e=e||{}).pluginHash=this.adapterHash),this.startReadyStateMonitor(),this.emit(c.Event.START,{params:e}),this.plugin._logSetAdapterEvent(this._adapterEvaluatedCode)}},fireJoin:function(e,t){this.flags.isJoined||this.flags.isStarted||this._isAds()||!this._npawVideo||!this._npawVideo.isInitiated||this.fireStart(),this.flags.isStarted&&!this.flags.isJoined&&(this.flags.isStarted=!0,this.monitor&&this.monitor.start(),this.flags.isJoined=!0,this.chronos.join.stop(),t&&((e=e||{}).triggeredEvents=[t]),this.emit(c.Event.JOIN,{params:e}))},firePause:function(e,t){this._discardFalseBuffers(),this.flags.isBuffering&&this.fireBufferEnd(null,"firePauseCall"),this.flags.isJoined&&!this.flags.isPaused&&(this.flags.isPaused=!0,this.chronos.pause.start(),t&&((e=e||{}).triggeredEvents=[t]),this.emit(c.Event.PAUSE,{params:e}))},fireResume:function(e,t){if(this._discardFalseBuffers(),this.flags.isJoined&&this.flags.isPaused){this.flags.isPaused=!1;try{this._npawVideo.ignorePauseSmallEvents()&&this.chronos.pause.getDeltaTime(!1)<=50?this.chronos.pause.reset():this.chronos.pause.stop()}catch(e){this.chronos.pause.stop()}this.monitor&&this.monitor.skipNextTick(),t&&((e=e||{}).triggeredEvents=[t]),this.emit(c.Event.RESUME,{params:e})}},fireBufferBegin:function(e,t,i,n){if(n=n||!1,this.flags.isJoined&&!this.flags.isBuffering){if(this.flags.isSeeking){if(!t)return;r.notice(p,"Converting current buffer to seek"),this.chronos.buffer=this.chronos.seek.clone(),this.chronos.seek.reset(),this.flags.isSeeking=!1}else this.chronos.buffer.start();try{this.fireEventsStruct.buffer=[],i?this.fireEventsStruct.buffer.push(i):this.fireEventsStruct.buffer.push("undefinedEvent")}catch(e){}this.flags.isBuffering=!0,this.flags.isVideoStateBuffering=n,this.emit(c.Event.BUFFER_BEGIN,{params:e})}},fireBufferEnd:function(e,t){if(this.flags.isJoined&&this.flags.isBuffering){try{t?this.fireEventsStruct.buffer.push(t):this.fireEventsStruct.buffer.push("undefinedEvent")}catch(e){}(e=e||{}).triggeredEvents=this.fireEventsStruct.buffer,this.cancelBuffer(),this.emit(c.Event.BUFFER_END,{params:e});try{this.chronos.pause.getDeltaTime(!1)>0&&this.chronos.pause.resume()}catch(e){}}},_discardFalseBuffers:function(){try{this.flags.isBuffering&&this.flags.isVideoStateBuffering&&this._getDeltaBufferTime()<=100&&this.cancelBuffer()}catch(e){}},cancelBuffer:function(e){this.flags.isJoined&&this.flags.isBuffering&&(this.flags.isBuffering=!1,this.flags.isVideoStateBuffering=!1,this.chronos.buffer.stop(),this.monitor&&this.monitor.skipNextTick())},_getDeltaBufferTime:function(){return this.chronos&&this.chronos.buffer?this.chronos.buffer.getDeltaTime(!1):0},fireStop:function(e,t){try{if((this._isAds()||this._npawVideo._isStopReady())&&(this._isAds()&&this.flags.isStarted||!this._isAds()&&(this.flags.isStarted||this._npawVideo.isInitiated))){if(this.stopMonitor(),this.stopReadyStateMonitor(),this._isAds()&&(e=e||{},this.flags.isPaused)){const t=this.chronos.pause.getDeltaTime();e.adPauseDuration=t}this.flags.reset(),this.chronos.total.stop(),this.chronos.join.reset(),this.chronos.pause.stop(),this.chronos.buffer.stop(),this.chronos.seek.stop(),t&&((e=e||{}).triggeredEvents=[t]),this.emit(c.Event.STOP,{params:e}),this.chronos.pause.reset(),this.chronos.buffer.reset(),this.chronos.seek.reset(),this.chronos.viewedMax.splice(0,this.chronos.viewedMax.length),this._npawVideo&&this._npawVideo.resetExpirationManager()}}catch(e){r.warn(p,"Issue firing Stop event")}},firePlayerLog:function(e,t){if(this._npawVideo){var i={logs:t,logAction:e,logType:"playerEvent"};this._npawVideo.firePlayerLog(i)}},setIsAds:function(e){this._isAdsAdapter=e},_isAds:function(){return this._isAdsAdapter},fireCasted:function(e,t){e||(e={}),e.casted=!0,this.fireStop(e,t)},fireError:function(e,t,i,n,r,a,o){let l=s.buildErrorParams(e,t,i,o);l.code&&delete l.code,r&&(l=l||{},l.triggeredEvents=[r]);const d=this._npawVideo?this._npawVideo.options:{};if(void 0!==l.errorCode&&d["errors.ignore"]&&d["errors.ignore"].indexOf(l.errorCode.toString())>-1);else{a=a||!1;const e=d["errors.nonFatal"]||[],t=void 0!==l.errorCode&&e.indexOf(l.errorCode.toString())>-1;t&&a&&(a=!1),(a||void 0!==l.errorCode&&d["errors.fatal"]&&d["errors.fatal"].indexOf(l.errorCode.toString())>-1&&!t)&&this.flags.isJoined&&(l=l||{}
2,l.errorType="fatal"),this.emit(c.Event.ERROR,{params:l})}},fireFatalError:function(e,t,i,n,r,s){this.fireError(e,t,i,n,r,!0,s)},isLegacyBufferBehaviourEnabled:function(){return(this._npawVideo?this._npawVideo.options:{}).enableLegacyBufferBehaviour||!1}},{Event:c.Event});s.assign(m.prototype,i(9393)),s.assign(m.prototype,i(594)),e.exports=m},5298:e=>{e.exports={cdnName:"AKAMAI",parsers:[{element:"type+host",headerName:"X-Cache",regex:/(.+)\sfrom.+AkamaiGHost\/(.+)\).+/},{element:"host",headerName:"akamai-mon-iucid-del",regex:/(.*)/},{element:"type",headerName:"akamai-cache-status",regex:/(.+)\sfrom\schild/}],requestHeaders:{Pragma:"akamai-x-cache-on"},parseType:function(e){var t=e.toLowerCase();return-1!==t.indexOf("hit")?1:-1!==t.indexOf("miss")?2:0}}},5438:(e,t,i)=>{"use strict";i.d(t,{CE:()=>y,Ji:()=>A,LI:()=>b,Lg:()=>p,Ow:()=>g,Y4:()=>l,Zq:()=>P,_C:()=>E,b3:()=>_,dR:()=>S,df:()=>o,hj:()=>c,jQ:()=>T,m:()=>f,mH:()=>v,w2:()=>u,wc:()=>w,xC:()=>r,yL:()=>s,yl:()=>a,zU:()=>h});const n=d;!function(e){const t=d,i=e();for(;;)try{if(314494==-parseInt(t(159))/1+parseInt(t(170))/2+parseInt(t(167))/3+-parseInt(t(132))/4*(-parseInt(t(153))/5)+parseInt(t(129))/6+-parseInt(t(157))/7+-parseInt(t(163))/8*(parseInt(t(148))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(m);const r={CDN:n(158)},s={Success:"ok",Fail:n(146),Progress:"pr"},a={Updated:n(151),Success:"ok",Fail:n(146)},o={host:n(128),devHost:n(131),devDomains:[n(168),n(126)],service:n(162),decisionCallWaitTime:3e4,decisionReloadIntervalPerManifestMilliseconds:3e4},l=[".mp4",".m4s",n(130),n(164),n(145),n(155),n(136),n(169)];function d(e,t){const i=m();return(d=function(e,t){return i[e-=124]})(e,t)}const u=[n(156),".mpd"],c=[n(142),n(141),n(165)],h=[n(127),".vtt",n(149),n(152),n(133)],p={connect:n(134),close:n(161),error:n(125),data:n(124),ping:"ping",pong:n(173)},f={optimizedScore:n(138),optimizedFeedback:"optimizedFeedback",bestScore:n(166),qualityPriority:n(139),cdnPriority:n(135)},g={max:25e6,min:2e5,default:2e5};function m(){const e=["nok","keys","18ZkmaHF",".ssa","SEGMENT_ABSENT","updated",".ass","1010EyzMrY","CANCEL_SEGMENT_REQUEST",".m4f",".m3u8","1397676uzfKKb","/cdn","208731aCCGpm","splits","close","/decision","1794792lReLej",".cmf",".m4a","bestScore","1211469oxUpLx","stage.npaw.com",".m4v","764220EJnVIr","data_spec_key","GET_RETRY_HEAD","pong","data","error","qa.npaw.com",".srt","gnsnpaw.com","151740eMXKxr",".ts","stage-smartswitchv2.youbora.com","7136aSDkmo",".webvtt","connect","cdnPriority",".cmfv","SEGMENT_REQUEST","optimizedScore","qualityPriority","command",".cmfa",".aac","SEGMENT_DATA","NEW_SEGMENT_AVAILABLE",".dash"];return(m=function(){return e})()}const v={data:n(143),absent:n(150),map:"SEGMENTS_MAP",newSegmentAvailable:n(144),request:n(137),cancel:n(154),ping:"PING",pong:"PONG"},y={command:n(140),id:n(171),size:"size",storageSize:"ss",map:n(147),identifier:"identifier",splits:n(160),time:0,simpleMapKeys:"k",simpleMapSize:"s",dateTime:"dt",createdAt:"ca"},_={bandwidth_test:2,message:1,data:0},b={maxMessageSize:65532,probability:1,timeout:2500,maxConcurrency:6,maxConnectedPeers:40,tracker:"wss://p2p-tracker.youbora.com/webrtc",upload:!1},T={version:2},S={expiration:3e5,count:60,safeMaxCount:300},E={retries:5,retryDelay:100,defaultBwThreshold:2e5,connectTimeoutMilliseconds:1e4,readTimeoutMilliseconds:3e3,minRequestSizeForBwEstimateKB:100},A={totalDataInterval:6e4},w={callTimeoutMilliseconds:500,timeBetweenCallsMilliseconds:1e3,timeBetweenBurstsMilliseconds:5e3},P={lastMeasurementWeight:.5,maximumRelativeDeltaForTrial:.2,minimumDurationSinceLastUsedForTrialMilliseconds:3e4,chunkExpirationProbingMs:3e4,probingPolicy:n(172)}},5651:(e,t,i)=>{var n=i(1593);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a=n.extend({constructor:function(e){this.plugin=e,this.videos={}},existsVideo:function(e){return e=e||"default",!!this.videos[e]},getVideo:function(e){if(e=e||"default",this.videos[e])return this.videos[e]},setVideo:function(e){this.videos[this._parseVideoKey(e.getVideoKey())]=e},getVideoKeys:function(){return Object.keys(this.videos)},existsAdapter:function(e){return e=e||"default",!(!this.videos[e]||!this.videos[e]._adapter)}
2,getAdapter:function(e){if(e=e||"default",this.videos[e])return this.videos[e].getAdapter()},setAdapter:function(e,t){t=t||"default",this.videos[t]&&this.videos[t].setAdapter(e,this.plugin)},getAdsAdapter:function(e){if(e=e||"default",this.videos[e])return this.videos[e].getAdsAdapter()},removeAdapter:function(e,t){t=t||"default";try{this.videos[t]&&this.videos[t].removeAdapter()}catch(e){r.error(s,"Is not possible to remove adapter for video: "+t)}},removeAllAdapters:function(){for(const e of Object.keys(this.videos))this.videos[e].removeAdapter(),this.videos[e].removeAdsAdapter()},sendRequest:function(e,t,i,n,a,o,l,d){e=e||"default",this.videos[e]?this.videos._send(this._key,t,i,n,a,o,l,d):r.error(s,"Can't send request for not existent video object")},updateAllOptions:function(e){for(const t in this.videos)for(const i in e)this.videos[t].options[i]=e[i];e["adapters.templates"]&&(this.plugin._setAdapterTemplates(e["adapters.templates"]),this.updateAdapterTemplates(e["adapters.templates"]))},updatePingInterval:function(e){for(var t in this.videos)this.videos[t]._ping.interval=e},updateAdapterTemplates:function(e){if(e&&this.videos)for(var t in this.videos)this.videos[t]._adapter&&this.videos[t]._adapter.updateAdapterTemplates(e)},resetVideo:function(e){e=e||"default",this.video[e]&&this.video[e]._reset()},_parseVideoKey:function(e){return e||"default"}});e.exports=a},5710:(e,t,i)=>{var n=i(3782);i(2477);const{default:r}=i(7276);var s=i(2507);i(5292);const{AnalyticsTag:a}=i(2784),{default:o}=i(61),{default:l}=i(9065);var d={_startListener:function(e){!this.plugin.options.enableExtraMetricCollection||this.lastKnownLocation||this.isFetchingLocation||this.fetchLocation(),this.isInitiated?0!==this.initChrono.startTime&&(this._joinTimeMeasureAfterAdBreakAvailable()||(this._adapter.chronos.join.startTime=this.initChrono.startTime)):(this._viewIndex||this.plugin.getNextViewIndex(this),this._startPings());var t=e.data.params||{},i=this.getResource()&&"boolean"==typeof this.getIsLive()&&(this.getIsLive()||"number"==typeof this.getDuration()&&this.getDuration()>0)&&this.getTitle(),s=l.getInstance().getCommonVariable(o.Products.BALANCER,o.BalancerVariables.DECISION_FINISHED);void 0===s&&(s=!0);var d=this.getChronosEventParam()||{};if(d&&Object.keys(d).length>0&&(t.chronos=d),this.plugin.resourceTransform&&this.getResource())try{if
2(this.plugin.resourceTransform.init(this.getResource()),this.plugin.resourceTransform.isBlocking()){var u=this.plugin.resourceTransform.getWaitParams();if(this.options.waitForMetadata=!0,u&&u.length>0){for(var c=this.options.pendingMetadata||[],h=0;h<u.length;h++)-1===c.indexOf(u[h])&&c.push(u[h]);this.options.pendingMetadata=c}else this.options.pendingMetadata=[]}}catch(e){}(i=!this.options.forceInit&&i&&this._isExtraMetadataReady()&&s&&this._isRequiredMetadataReady())&&!this.isInitiated?(this._send(n.WillSendEvent.WILL_SEND_START,n.Service.START,t,void 0,void 0,(()=>{})),this._adSavedError(),this._adSavedManifest(),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.START+", title/res: "+(t.title||t.mediaResource)+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:"")),this.isStarted=!0):this.isInitiated||(this.isInitiated=!0,this._adapter.chronos.join.start(),this._send(n.WillSendEvent.WILL_SEND_INIT,n.Service.INIT,t,void 0,void 0,(()=>{})),this._adSavedError(),this._adSavedManifest(),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.INIT+", title/res: "+(t.title||t.mediaResource)+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))),this.options.enableExtraMetricCollection&&this.shouldStartRenditionTimer()},_retryStart:function(e){var t=l.getInstance().getCommonVariable(o.Products.BALANCER,o.BalancerVariables.DECISION_FINISHED);void 0===t&&(t=!0),this._isExtraMetadataReady()&&t&&this._isRequiredMetadataReady()&&(this._send(n.WillSendEvent.WILL_SEND_START,n.Service.START,{triggeredEvents:["retryStart"]}),this.startDelayed=!1)},_joinListener:function(e){var t={};if(s.assign(t,e.data.params||{}),this._adsAdapter&&this._adsAdapter.flags.isStarted)this._adapter.monitor&&this._adapter.monitor.stop(),this._adapter.flags.isJoined=!1,this._adapter.chronos.join.stopTime=0;else{if(this._adapter){const e=this._joinTimeMeasureAfterAdBreakAvailable()?0:this._totalPrerollsTime||0;this._adapter.chronos.join.startTime=Math.min(this._adapter.chronos.join.startTime+e,(new Date).getTime()),this._totalPrerollsTime=0,this._initialPrerollTime=0}if(this.isInitiated&&!this.isStarted){var i=l.getInstance().getCommonVariable(o.Products.BALANCER,o.BalancerVariables.DECISION_FINISHED);if(void 0===i&&(i=!0),this._isExtraMetadataReady()&&i&&this._isRequiredMetadataReady()){var d=this.getChronosEventParam()||{};d&&Object.keys(d).length>0&&(t.chronos=d),this._send(n.WillSendEvent.WILL_SEND_START,n.Service.START,t,void 0,void 0,(()=>{}))}else this.startDelayed=!0;this._adSavedError(),this._adSavedManifest(),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.START+", title/res: "+(t.title||t.mediaResource)+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:"")),this.isStarted=!0}t=e.data.params||{},this._adsAdapter&&this.isBreakStarted&&this._adsAdapter.fireAdBreakStop(),this._send(n.WillSendEvent.WILL_SEND_JOIN,n.Service.JOIN,t,void 0,void 0,(()=>{})),this.resetChronos(),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.JOIN+", duration: "+t.joinDuration+"ms"+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))}},_advancedDataListener:function(e){var t=e.data.params||{};this._send(n.WillSendEvent.WILL_SEND_DATA_OBJECT,n.Service.DATA_OBJECT,t),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.DATA_OBJECT+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))},_pauseListener:function(e){this._adapter&&(this._adapter.flags.isBuffering||this._adapter.flags.isSeeking||this._adsAdapter&&this._adsAdapter.flags.isStarted)&&this._adapter.chronos.pause.reset();var t=e.data.params||{};this._send(n.WillSendEvent.WILL_SEND_PAUSE,n.Service.PAUSE,t),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.PAUSE+" at "+t.playhead+"s"+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))},_resumeListener:function(e){this._adsAdapter&&this.isBreakStarted&&!this._adsAdapter.flags.isStarted&&this._adsAdapter.fireAdBreakStop();var t=e.data.params||{};this._send(n.WillSendEvent.WILL_SEND_RESUME,n.Service.RESUME,t),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.RESUME+", duration: "+t.pauseDuration+"ms"+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:"")),this._adapter.chronos.pause.reset()},_seekBufferBeginListener:function(e){this._adapter&&this._adapter.flags.isPaused&&this._adapter.chronos.pause.pause(),e.type&&e.type.includes("buffer")?r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+e.type+", eventsTriggered: "+this._adapter.fireEventsStruct.buffer):r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+e.type+", eventsTriggered: "+this._adapter.fireEventsStruct.seek)},_seekEndListener:function(e){var t=e.data.params||{};this._send(n.WillSendEvent.WILL_SEND_SEEK,n.Service.SEEK,t),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.SEEK+" to "+t.playhead+" in "+t.seekDuration+"ms"+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))},_bufferEndListener:function(e){var t=e.data.params||{};(t=this.requestBuilder.fetchParams(t,["throughput"],!1,[this,this.plugin],this.options)).entities=this.requestBuilder.getChangedEntities([this,this.plugin],this.options),this._send(n.WillSendEvent.WILL_SEND_BUFFER,n.Service.BUFFER,t),r.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+n.Service.BUFFER+" to "+t.playhead+" in "+t.bufferDuration+"ms"+(t.triggeredEvents?", eventsTriggered: "+t.triggeredEvents:""))},_errorListener:function(e){this._blockError(e.data.params)||(this.fireError(e.data.params||{}),this._adSavedError(),this._adSavedManifest())},_blockError:function(e){var t=Date.now(),i=this.getResource();
2return this._lastErrorParams&&this._lastErrorParams.errorCode===e.errorCode&&this._lastErrorParams.msg===e.msg&&this._lastErrorResource===i&&this._lastErrorTime+5e3>t?(this._lastErrorTime=t,!0):(this._lastErrorTime=t,this._lastErrorParams=e,this._lastErrorResource=i,!1)},_stopListener:function(e){try{this.resetChronos(this._viewIndex||0)}catch(e){}this.fireStop(e.data.params||{})},_isStopReady:function(e){let t=!1;if(!this.requestBuilder.lastSent.live&&this._adsAdapter&&this._adapter&&(!this._adapter.getPlayhead()||this._adapter.getPlayhead()>=this.requestBuilder.lastSent.mediaDuration-1)){let e=0;const i=this.options["ad.expectedPattern"];if(i&&i.post&&i.post[0])e=i.post[0];else if(this.requestBuilder.lastSent.breaksTime){if(this.requestBuilder.lastSent.position===n.AdPosition.Postroll&&(e=this.requestBuilder.lastSent.givenAds),!e&&this.requestBuilder.lastSent.breaksTime){const t=this.requestBuilder.lastSent.breaksTime;t.length>0&&this.requestBuilder.lastSent.mediaDuration&&Math.round(t[t.length-1])+1>=this.requestBuilder.lastSent.mediaDuration&&(e=1)}}else t=!0;e<=this.playedPostrolls&&(t=!0)}else t=!0;return t},_videoEventListener:function(e){this._send(n.WillSendEvent.WILL_SEND_VIDEO_EVENT,n.Service.VIDEO_EVENT,e.data.params)},_videoEventEndListener:function(e){this._send(n.WillSendEvent.WILL_SEND_VIDEO_EVENT_END,n.Service.VIDEO_EVENT_END,e.data.params)},_isExtraMetadataReady:function(e){if(!this.options.waitForMetadata||this.options.pendingMetadata.length<1)return!0;try{if(this._adapter.chronos.join.startTime>0&&(new Date).getTime()-this._adapter.chronos.join.startTime>=("number"==typeof this.options["waitForMetadata.timeout.milliseconds"]?this.options["waitForMetadata.timeout.milliseconds"]:n.Metadata.REQUIRED_METADATA_TIMEOUT))return!0;const e=this.requestBuilder.getGetters();return this.options.pendingMetadata.map(function(t){if(e.hasOwnProperty(t)){if(this[e[t]])return!!this[e[t]]();if(this.plugin[e[t]])return!!this.plugin[e[t]]()}}.bind(this)).indexOf(!1)<0}catch(e){r.warn("["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") Error processing isExtraMetadataReady method.")}return!0},_isRequiredMetadataReady:function(){if((new Date).getTime()-this._adapter.chronos.join.startTime<("number"==typeof this.options["waitForMetadata.timeout.milliseconds"]?this.options["waitForMetadata.timeout.milliseconds"]:n.Metadata.REQUIRED_METADATA_TIMEOUT)){try{const e=this.requestBuilder.getGetters();return this.requestBuilder.getRequiredMetadataParams().every(function(t){if(e.hasOwnProperty(t))if("function"==typeof this[e[t]]){const i=this[e[t]]();if(null!=i&&!Number.isNaN(i))return!0}else if(this.plugin&&"function"==typeof this.plugin[e[t]]){const i=this.plugin[e[t]]();if(null!=i&&!Number.isNaN(i))return!0}return!1}.bind(this))}catch(e){r.warn("["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") Error processing _isRequiredMetadataReady method.")}return!1}return!0}};e.exports=d},5804:(e,t,i)=>{var n=i(245),r=i(3948),s=i(6777);const{default:a}=i(9065);var o=r.extend({constructor:function(){this.dataExtractor=new n,this.key=this.getPreviousKey()},generateHashKey:function(){if(!this.key){var e=this.dataExtractor.getAllData();this.key=this._hashFunction(e),a.getInstance().getCoreStorage().setLocal("npawDeviceUUID",this.key)}},getKey:function(){return this.key||this.generateHashKey(),this.key},_hashFunction:function(e){var t=e;return"string"!=typeof e&&(t=JSON.stringify(e)),s(t)},_reset:function(){this.key=void 0},getPreviousKey:function(){return a.getInstance().getCoreStorage().getLocal("npawDeviceUUID")}});e.exports=o},5901:(e,t,i)=>{var n=i(5292),r=i(1516),s={registerAdsAdapter:function(e,t,i,s){if(t)if(s=s||"default",this.videos.existsVideo(s))this.videos.getVideo(s).mergeOptions(i),this.setAdsAdapter(new n(s,this.videos.getVideo(s),this,this.adapterTemplates,e,t),s);else{var a=new r(s,this,this.options,null,null);a.mergeOptions(i),this.videos.setVideo(a);var o=new n(s,a,this,this.adapterTemplates,e,t);this.setAdsAdapter(o,s)}else Log.error(AnalyticsTag,"Register Ads Adapter needs an adapter to initialize")},updateAdsAdapter:function(e,t){t=t||"default",e&&(videoObj=this.videos.getVideo(t),videoObj&&videoObj.getAdapter()&&(adsAdapter=videoObj.getAdapter().getAdapterClass(e),adsAdapter&&videoObj.setAdsAdapter(adsAdapter,this,!0)))},getAdsAdapter:function(e){e=e||"default";const t=this.videos.getVideo(e);return void 0!==t?t.getAdsAdapter():void 0},setAdsAdapter:function(e,t){t=t||"default",this.videos.getVideo(t).setAdsAdapter(e,this)},removeAdsAdapter:function(e){e=e||"default",this.videos.existsVideo(e)&&this.videos.getVideo(e).removeAdsAdapter()}};e.exports=s},6014:(e,t,i)=>{var n=r,r={noConflict:function(){return r=n,this}};r.VERSION=i(9835),r.polyfills=i(4607),r.polyfills(),r.Object=i(3948),r.Emitter=i(1593);const{default:s}=i(7276);r.Log=s,r.Log.loadLevelFromUrl(),r.Util=i(2507),r.HybridNetwork=i(2995),r.Chrono=i(7680),r.Timer=i(4954),r.Constants=i(3782),r.Transform=i(2503),r.ResourceTransform=i(1151),r.CdnParser=i(3908),r.HlsParser=i(3168),r.DashParser=i(3831),r.LocationheaderParser=i(1657),r.Options=i(7061),r.Plugin=i(1527),r.Storage=i(470),r.RequestBuilder=i(2071),r.PlayheadMonitor=i(3381),r.Adapter=i(5292),r.adapters={}
2,r.BackgroundDetector=i(9773),r.DeviceDetector=i(2635),r.UUIDGenerator=i(5804),r.registerAdapter=function(e,t){this.adapters[e]=t}.bind(r),r.unregisterAdapter=function(e){this.adapters[e]=null}.bind(r),e.exports=r},6075:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});var n=i(108),r=i(9065),s=i(3555),a=i(2784),o=i(61);class l{constructor(e){this.readyToSend=!1,this.servicesToWait=[n.A.Service.INIT,n.A.Service.START],this.onWillSendVideoRequestListeners=[],this.pluginRef=e,this._requests=[],this._waitingForToken=[],this._waitingForMetadata=[]}shouldSendStats(){return this.readyToSend}sendRequest(e){if(""===r.default.getInstance().getFastDataSessionToken())return void this._waitingForToken.push(e);this._waitingForToken.forEach((e=>this.prepareParams(e))),this._requests.push(...this._waitingForToken),this._waitingForToken=[];let t=e.getVideoKey(),i=e.getParams(),n=e.getService();for(const e of this.onWillSendVideoRequestListeners)e(n,t,i);this.prepareParams(e),this._requests.push(e),this._processRequests()}prepareParams(e){const t=e.getService();t!=n.A.Service.START&&t!=n.A.Service.PING||(e.setParam("pingTime",e.getParam("pingTime")||r.default.getInstance().getFastDataService().getPingTime()),r.default.getInstance().getCommonVariable("appAnalytics","isEnabled")&&e.setParam("sessionParent",e.getParam("sessionParent")||r.default.getInstance().getFastDataSessionToken()));const i=e.getVideoKey();this.pluginRef.videos.existsVideo(i)&&e.setParam("code",e.getParam("code")||this.pluginRef.videos.getVideo(i).getViewCode()),t!==n.A.Service.INIT&&t!==n.A.Service.START&&t!==n.A.Service.ERROR||r.default.getInstance().getCommonVariable("appAnalytics","isEnabled")&&(e.setParam("parentId",e.getParam("sessionRoot")),e.setParam("navContext",e.getParam("navContext")||r.default.getInstance().getCommonVariable("appAnalytics","context")))}buildRequest(e,t,i,n,r,o,l){i=null!=i?i:a.Method.GET;const d=new s.default(e,t,"",i,n,r,o,l);return d.setMethod(i),d}_processRequests(){const e=this._requests;this._requests=[],e.forEach((e=>{if(-1!==this.servicesToWait.indexOf(e.getService())&&(this.readyToSend=!0),this.readyToSend){for(;this._waitingForMetadata.length;){const e=this._waitingForMetadata.shift();r.default.getInstance().pushData(r.default.getInstance().getOptions().offline?o.default.Consumer.PERSISTENT:o.default.Consumer.NQS,e.getService(),e.getMethod(),e.getParams(),e.getOnSuccess(),e.getOnFail())}const t=e.getExpirationManager();t&&t.onRequestSent(),r.default.getInstance().pushData(r.default.getInstance().getOptions().offline?o.default.Consumer.PERSISTENT:o.default.Consumer.NQS,e.getService(),e.getMethod(),e.getParams(),e.getOnSuccess(),e.getOnFail())}else this._waitingForMetadata.push(e)}))}}},6083:e=>{e.exports={setChronoDuration:function(e,t,i){i=i||"default",this.videos.existsVideo(i)||this._createVideoSpace(i,{}),this.videos.existsVideo(i)&&this.videos.getVideo(i).setChronoDuration(e,t)},startChrono:function(e,t){t=t||"default",this.videos.existsVideo(t)||this._createVideoSpace(t,{}),this.videos.existsVideo(t)&&this.videos.getVideo(t).startChrono(e)},stopChrono:function(e,t){t=t||"default",this.videos.existsVideo(t)||this._createVideoSpace(t,{}),this.videos.existsVideo(t)&&this.videos.getVideo(t).stopChrono(e)},fireInit:function(e,t,i){i=i||"default",this.videos.getVideo(i).fireInit(e,t)},fireError:function(e,t,i,n,r,s){s=s||"default",this.videos.getVideo(s).fireError(e,t,i,n,r)},fireFatalError:function(e,t,i,n,r,s){s=s||"default",this.videos.getVideo(s).fireFatalError(e,t,i,n,r)},fireStop:function(e,t,i){i=i||"default",this.videos.getVideo(i).fireStop(e,t)},fireOfflineEvents:function(e,t){t=t||"default",this.videos.getVideo(t).fireOfflineEvents(e)}}},6424:(e,t,i)=>{var n=i(3948).extend({constructor:function(e,t){this.plugin=e,this.video=t,this.listenerReference=this._changeListener.bind(this),this.loadReference=this._loadListener.bind(this),this.isEnabled=!1,this.pageHeight=0,this.maxHeight=0,this.startDetection()},startDetection:function(){this.isEnabled||"undefined"==typeof window||"function"!=typeof window.addEventListener||(window.addEventListener("scroll",this.listenerReference),window.addEventListener("resize",this.listenerReference),window.addEventListener("load",this.loadReference),this.isEnabled=!0)},stopDetection:function(){this.isEnabled&&"undefined"!=typeof window&&"function"==typeof window.removeEventListener&&(window.removeEventListener("scroll",this.listenerReference),window.removeEventListener("resize",this.listenerReference),window.removeEventListener("load",this.loadReference),this.isEnabled=!1)},getScrollDepth:function(){var e=null;return this.maxHeight&&this.pageHeight&&(e=Math.min(Math.trunc(this.maxHeight/this.pageHeight*100),100)),e},_loadListener:function(){if("undefined"!=typeof document){var e=document.documentElement;e&&(this.pageHeight=Math.round(e.scrollHeight,e.clientHeight,e.offsetHeight),this.maxHeight=window.innerHeight,this._updateCompletionRate())}},_changeListener:function(){if(this.pageHeight){var e=this.maxHeight;this.maxHeight=Math.max(this.maxHeight,window.pageYOffset+window.innerHeight),e!==this.maxHeight&&this._updateCompletionRate()}var t=this.video.getAdsAdapter();t&&t.flags.isStarted&&(t.getIsVisible()?t.startChronoView():t.stopChronoView())},_updateCompletionRate:function(){setTimeout(function(){this.plugin.storage.setSession("pageScrollDepth",this.get
2ScrollDepth())}.bind(this),3e3)}});e.exports=n},6598:(e,t,i)=>{"use strict";var n=i(525).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n
vendor: 28,727 bytes, line 2
2({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),
2t.entityMap=t.HTML_ENTITIES},6777:e=>{e.exports=function(e){function t(e,t){return e<<t|e>>>32-t}function i(e,t){var i,n,r,s,a;return r=2147483648&e,s=2147483648&t,a=(1073741823&e)+(1073741823&t),(i=1073741824&e)&(n=1073741824&t)?2147483648^a^r^s:i|n?1073741824&a?3221225472^a^r^s:1073741824^a^r^s:a^r^s}function n(e,n,r,s,a,o,l){return e=i(e,i(i(function(e,t,i){return e&t|~e&i}(n,r,s),a),l)),i(t(e,o),n)}function r(e,n,r,s,a,o,l){return e=i(e,i(i(function(e,t,i){return e&i|t&~i}(n,r,s),a),l)),i(t(e,o),n)}function s(e,n,r,s,a,o,l){return e=i(e,i(i(function(e,t,i){return e^t^i}(n,r,s),a),l)),i(t(e,o),n)}function a(e,n,r,s,a,o,l){return e=i(e,i(i(function(e,t,i){return t^(e|~i)}(n,r,s),a),l)),i(t(e,o),n)}function o(e){var t,i="",n="";for(t=0;t<=3;t++)i+=(n="0"+(e>>>8*t&255).toString(16)).substr(n.length-2,2);return i}var l,d,u,c,h,p,f,g,m,v=Array();for(v=function(e){for(var t,i=e.length,n=i+8,r=16*((n-n%64)/64+1),s=Array(r-1),a=0,o=0;o<i;)a=o%4*8,s[t=(o-o%4)/4]=s[t]|e.charCodeAt(o)<<a,o++;return a=o%4*8,s[t=(o-o%4)/4]=s[t]|128<<a,s[r-2]=i<<3,s[r-1]=i>>>29,s}(e=function(e){e=e.replace(/rn/g,"n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(e)),p=1732584193,f=4023233417,g=2562383102,m=271733878,l=0;l<v.length;l+=16)d=p,u=f,c=g,h=m,p=n(p,f,g,m,v[l+0],7,3614090360),m=n(m,p,f,g,v[l+1],12,3905402710),g=n(g,m,p,f,v[l+2],17,606105819),f=n(f,g,m,p,v[l+3],22,3250441966),p=n(p,f,g,m,v[l+4],7,4118548399),m=n(m,p,f,g,v[l+5],12,1200080426),g=n(g,m,p,f,v[l+6],17,2821735955),f=n(f,g,m,p,v[l+7],22,4249261313),p=n(p,f,g,m,v[l+8],7,1770035416),m=n(m,p,f,g,v[l+9],12,2336552879),g=n(g,m,p,f,v[l+10],17,4294925233),f=n(f,g,m,p,v[l+11],22,2304563134),p=n(p,f,g,m,v[l+12],7,1804603682),m=n(m,p,f,g,v[l+13],12,4254626195),g=n(g,m,p,f,v[l+14],17,2792965006),p=r(p,f=n(f,g,m,p,v[l+15],22,1236535329),g,m,v[l+1],5,4129170786),m=r(m,p,f,g,v[l+6],9,3225465664),g=r(g,m,p,f,v[l+11],14,643717713),f=r(f,g,m,p,v[l+0],20,3921069994),p=r(p,f,g,m,v[l+5],5,3593408605),m=r(m,p,f,g,v[l+10],9,38016083),g=r(g,m,p,f,v[l+15],14,3634488961),f=r(f,g,m,p,v[l+4],20,3889429448),p=r(p,f,g,m,v[l+9],5,568446438),m=r(m,p,f,g,v[l+14],9,3275163606),g=r(g,m,p,f,v[l+3],14,4107603335),f=r(f,g,m,p,v[l+8],20,1163531501),p=r(p,f,g,m,v[l+13],5,2850285829),m=r(m,p,f,g,v[l+2],9,4243563512),g=r(g,m,p,f,v[l+7],14,1735328473),p=s(p,f=r(f,g,m,p,v[l+12],20,2368359562),g,m,v[l+5],4,4294588738),m=s(m,p,f,g,v[l+8],11,2272392833),g=s(g,m,p,f,v[l+11],16,1839030562),f=s(f,g,m,p,v[l+14],23,4259657740),p=s(p,f,g,m,v[l+1],4,2763975236),m=s(m,p,f,g,v[l+4],11,1272893353),g=s(g,m,p,f,v[l+7],16,4139469664),f=s(f,g,m,p,v[l+10],23,3200236656),p=s(p,f,g,m,v[l+13],4,681279174),m=s(m,p,f,g,v[l+0],11,3936430074),g=s(g,m,p,f,v[l+3],16,3572445317),f=s(f,g,m,p,v[l+6],23,76029189),p=s(p,f,g,m,v[l+9],4,3654602809),m=s(m,p,f,g,v[l+12],11,3873151461),g=s(g,m,p,f,v[l+15],16,530742520),p=a(p,f=s(f,g,m,p,v[l+2],23,3299628645),g,m,v[l+0],6,4096336452),m=a(m,p,f,g,v[l+7],10,1126891415),g=a(g,m,p,f,v[l+14],15,2878612391),f=a(f,g,m,p,v[l+5],21,4237533241),p=a(p,f,g,m,v[l+12],6,1700485571),m=a(m,p,f,g,v[l+3],10,2399980690),g=a(g,m,p,f,v[l+10],15,4293915773),f=a(f,g,m,p,v[l+1],21,2240044497),p=a(p,f,g,m,v[l+8],6,1873313359),m=a(m,p,f,g,v[l+15],10,4264355552),g=a(g,m,p,f,v[l+6],15,2734768916),f=a(f,g,m,p,v[l+13],21,1309151649),p=a(p,f,g,m,v[l+4],6,4149444226),m=a(m,p,f,g,v[l+11],10,3174756917),g=a(g,m,p,f,v[l+2],15,718787259),f=a(f,g,m,p,v[l+9],21,3951481745),p=i(p,d),f=i(f,u),g=i(g,c),m=i(m,h);return(o(p)+o(f)+o(g)+o(m)).toLowerCase()}},6874:(e,t,i)=>{var n=i(2507);const{default:r}=i(9065);var s={getFastDataConfig:function(){return this.fastDataTransform.response.msg},getHost:function(){let e=r.getInstance().getOptions().getFastDataHost();return this.fastDataTransform&&this.fastDataTransform.response&&this.fastDataTransform.response.host&&(e=this.fastDataTransform.response.host),n.addProtocol(n.stripProtocol(e),this.options["app.https"])},getFastDataHost:function(){return n.addProtocol(n.stripProtocol(r.getInstance().getOptions().getFastDataHost()),this.options["app.https"])},getSession:function(){var e=r.getInstance().getCoreStorage().getStorages("session");if("undefined"===e&&(e=void 0),!e){var t=this.getStoredData();if(t)try{e=JSON.parse(t).q.c}catch(e){}}return e},getStorageHost:function(){let e=null;const t=this.getStoredData();if(t)try{e=JSON.parse(t).q.h}catch(e){}return e?n.addProtocol(e,this.options["app.https"]):e},getStoredData:function(){return r.getInstance().getCoreStorage().getStorages("data")},getDataTime:function(){return r.getInstance().getCoreStorage().getStorages("dataTime")},setStoredData:function(e){this.storage.setStorages("data",e)},setSession:function(e){this.storage.setStorages("session",e)},setDataTime:function(e){this.storage.setStorages("dataTime",e)}};e.exports=s},7061:(e,t,i)=>{const n=i(3948),r=i(3398),{default:s}=i(7276),a=i(7939),o=i(8472),l=i(9637),{AnalyticsTag:d}=i(2784);var u=n.extend({constructor:function(e){this.enabled=!0,this.authToken=void 0,this.authType="Bearer",this.preventZombieViews=!0,this.offline=!1,this.referer=void 0,this.referral=void 0,this.disableCookies=!0,this.forceCookies=!1,this.disableStorage=!1,this.maxWaitingRequests=25,this["user.email"]=void 0,this["user.type"]=void 0,this["user.name"]=void 0,this.userId=void 0,this.profileId=void 0,this["user.obfuscateIp"]=!1,this["user.anonymousId"]=void 0,this["user.privacyProtocol"]=void 0,this["parse.manifest"]=!1,this["parse.cdnParser.get"]=!1,this["parse.manifest.lastChunk"]=!1,this["parse.locationHeader.get"]=!1,this["parse.manifest.auth"]={},this["parse.cdnNameHeader"]=["x-cdn-forward"],this["parse.cdnNodeHeader"]="",this["parse.cdnNode"]=!1,this["parse.cdnNode.list"]=["Akamai","Amazon","Cloudfront","Level3","Fastly","Highwinds","Telefonica","Edgecast","NosOtt"],this["parse.fdsResponseHost"]=void 0,this["parse.cdnSwitchHeader"]=!1,this["parse.cdnTTL"]=60,this["network.ip"]=void 0,this["network.isp"]=void 0,this["network.connectionType"]=void 0,this["device.id"]=void 0,this["device.code"]=void 0,this["device.model"]=void 0,this["device.brand"]=void 0,this["device.type"]=void 0,this["device.name"]=void 0,this["device.osName"]=void 0,this["device.osVersion"]=void 0,this["device.browserName"]=void 0,this["device.browserVersion"]=void 0,this["device.browserType"]=void 0,this["device.browserEngine"]=void 0,this["device.EDID"]=void 0,this["device.isAnonymous"]=!1,this["content.transactionCode"]=void 0,this["content.resource"]=void 0,this["content.isLive"]=void 0,this["content.isLive.noSeek"]=!1,this["content.isLive.noMonitor"]=!1,this["content.title"]=void 0,this["content.program"]=void 0,this["content.duration"]=void 0,this["content.fps"]=void 0,this["content.segmentDuration"]=void 0,this["content.bitrate"]=void 0,this["content.totalBytes"]=void 0,this["content.sendTotalBytes"]=!1,this["content.throughput"]=void 0,this["content.rendition"]=void 0,this["content.cdn"]=void 0,this["content.cdnNode"]=void 0,this["content.cdnType"]=void 0,this["content.metadata"]={},this["content.metrics"]={},this["content.streamingProtocol"]=void 0,this["content.transportFormat"]=void 0,this["content.package"]=void 0,this["content.saga"]=void 0,this["content.tvShow"]=void 0,this["content.season"]=void 0,this["content.episodeTitle"]=void 0,this["content.channel"]=void 0,this["content.id"]=void 0,this["content.imdbId"]=void 0,this["content.gracenoteId"]=void 0,this["content.type"]=void 0,this["content.genre"]=void 0,this["content.language"]=void 0,this["content.autodetect.language"]=!0,this["content.subtitles"]=void 0,this["content.autodetect.subtitles"]=!0,this["content.contractedResolution"]=void 0,this["content.cost"]=void 0,this["content.price"]=void 0,this["content.playbackType"]=void 0,this["content.drm"]=void 0,this["content.encoding.videoCodec"]=void 0,this["content.encoding.audioCodec"]=void 0,this["content.encoding.codecSett
2ings"]=void 0,this["content.encoding.codecProfile"]=void 0,this["content.encoding.containerFormat"]=void 0,this["ad.metadata"]={},this["ad.campaign"]=void 0,this["ad.creativeId"]=void 0,this["ad.provider"]=void 0,this["ad.resource"]=void 0,this["ad.title"]=void 0,this["ad.duration"]=void 0,this["ad.expectedPattern"]=void 0,this["ad.givenAds"]=void 0,this["ad.breaksTime"]=void 0,this["ad.expectedBreaks"]=void 0,this["ad.givenBreaks"]=void 0,this["ad.ignore"]=!1,this["ad.blockerDetected"]=void 0,this["ad.postRollTimeout"]=1e3,this["app.name"]=void 0,this["app.releaseVersion"]=void 0,this["app.https"]=!0,this["background.enabled"]=!0,this["background.settings"]=void 0,this["background.settings.android"]="stop",this["background.settings.iOS"]="stop",this["background.settings.desktop"]=void 0,this["background.settings.tv"]="stop",this["background.settings.playstation"]="stop",this["smartswitch.configCode"]=void 0,this["smartswitch.groupCode"]=void 0,this["smartswitch.contractCode"]=void 0,this["content.customDimensions"]={},this["content.customDimension.1"]=void 0,this["content.customDimension.2"]=void 0,this["content.customDimension.3"]=void 0,this["content.customDimension.4"]=void 0,this["content.customDimension.5"]=void 0,this["content.customDimension.6"]=void 0,this["content.customDimension.7"]=void 0,this["content.customDimension.8"]=void 0,this["content.customDimension.9"]=void 0,this["content.customDimension.10"]=void 0,this["content.customDimension.11"]=void 0,this["content.customDimension.12"]=void 0,this["content.customDimension.13"]=void 0,this["content.customDimension.14"]=void 0,this["content.customDimension.15"]=void 0,this["content.customDimension.16"]=void 0,this["content.customDimension.17"]=void 0,this["content.customDimension.18"]=void 0,this["content.customDimension.19"]=void 0,this["content.customDimension.20"]=void 0,this["ad.customDimension.1"]=void 0,this["ad.customDimension.2"]=void 0,this["ad.customDimension.3"]=void 0,this["ad.customDimension.4"]=void 0,this["ad.customDimension.5"]=void 0,this["ad.customDimension.6"]=void 0,this["ad.customDimension.7"]=void 0,this["ad.customDimension.8"]=void 0,this["ad.customDimension.9"]=void 0,this["ad.customDimension.10"]=void 0,this.forceInit=!1,this["joinTime.measureAfterAdBreak"]=!0,this.simpleNewSession=!1,this["session.metrics"]={},this["session.context"]=!1,this["errors.fatal"]=[],this["errors.nonFatal"]=[],this["errors.ignore"]=[],this["pause.ignoreSmallEvents"]=!0,this["check.playerExists"]=!0,this["check.appAnalytics.autoBegin"]=!1,this["check.appAnalytics.enabled"]=!0,this["debug.playerLogs.enabled"]=!1,this["debug.pluginLogs.enabled"]=!1,this["check.videoAnalytics.enabled"]=!0,this["lma.refresh.configuration.enabled"]=!1,this["lma.refresh.configuration.seconds"]=300,this.linkedViewId=void 0,this.waitForMetadata=!1,this["waitForMetadata.timeout.milliseconds"]=1e4,this.pendingMetadata=[],this.method=l.POST,this["playhead.monitor"]=!0,this["readyState.monitor"]=!0,this["adapters.overwrite"]=!1,this["adapters.templates"]={},this["adapters.properties"]={},this.enableExtraMetricCollection=!1,this.renditionQueryInterval=250,this.enableLegacyBufferBehaviour=!1,this.ignoreSeekInTimeUpdate=!1,this.checkVideoBufferInPlayheadMonitor=!1,this.setOptions(e)},setOptions:function(e,t,i=!1){let n,a=!1;if(void 0===t&&(t=this,a=!0,n=new r),void 0!==e)for(var o in e){let r,l=!1;a&&(this.hasOwnProperty(o)||(n.exists(o)?(r=n.getNewName(o),l=!0):"function"!=typeof e[o]&&s.warn(d,'The option "'+o+'" does not exist, so it cannot be set'))),i||"object"==typeof t[o]&&void 0!==t[o]&&!Array.isArray(t[o])&&"parse.cdnNode.list"===o?this.setOptions(e[o],t[o]):l?t[r]=e[o]:t[o]=e[o]}},setExtraParams:function(e){if("object"==typeof e&&e.length){for(e.length>=20&&(e=e.slice(0,20));e.length<20;)e.push(void 0);e.forEach(((e,t)=>{this["content.customDimension."+(t+1).toString()]=e}))}},setCustomDimensions:function(){u.prototype.setExtraParams.apply(this,arguments)},setAdExtraParams:function(e){if("object"==typeof e&&e.length){for(e.length>=10&&(e=e.slice(0,10));e.length<10;)e.push(void 0);e.forEach(((e,t)=>{this["ad.customDimension."+(t+1).toString()]=e}))}},setAdCustomDimensions:function(){u.prototype.setAdExtraParams.apply(this,arguments)},setEnableLegacyBufferBehaviour:function(){u.prototype.setEnableLegacyBufferBehaviour.apply(this,arguments)}},{StreamingProtocol:o,TransportFormat:a,RequestMethod:l});e.exports=u},7062:e=>{e.exports={DATA:"/data",ADAPTERS:"/adapters",CONFIGURATION:"/configuration",APP_ANALYTICS_PLUGIN_LOGS:"/infinity/session/pluginLogs",SESSION_PLUGIN_LOGS:"/infinity/session/pluginLogs",VIDEO_PLUGIN_LOGS:"/infinity/video/pluginLogs",INIT:"/init",START:"/start",JOIN:"/joinTime",DATA_OBJECT:"/data",PAUSE:"/pause",RESUME:"/resume",SEEK:"/seek",BUFFER:"/bufferUnderrun",ERROR:"/error",STOP:"/stop",PING:"/ping",CDN:"/cdn",VIDEO_EVENT:"/infinity/video/event",VIDEO_EVENT_END:"/infinity/video/event/stop",AD_INIT:"/adInit",AD_START:"/adStart",AD_JOIN:"/adJoin",AD_PAUSE:"/adPause",AD_RESUME:"/adResume",AD_BUFFER:"/adBufferUnderrun",AD_STOP:"/adStop",AD_CLICK:"/adClick",AD_ERROR:"/adError",AD_MANIFEST:"/adManifest",AD_POD_START:"/adBreakStart",AD_POD_STOP:"/adBreakStop",AD_QUARTILE:"/adQuartile",EVENT:"/infinity/session/event",EVENT_END:"/infinity/session/event/stop",SESSION_START:"/infinity/session/start",SESSION_STOP:"/infinity/session/stop",SESSION_ERROR:"/infinity/session/error",NAV:"/infinity/session/nav",BEAT:"/infinity/session/beat",OFFLINE_EVENTS:"/offlineEvents"}},7086:(e,t,i)=>{var n={Event:i(2477)};e.exports=n},7255:(e,t,i)=>{var n=i(3948).extend({constructor:function(){this.reset()},reset:function(){this.isStarted=!1,this.isJoined=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isVideoStateBuffering=!1,this.isEnded=!1,this.isStopped=!1,this.lastQuartileSent=0,this.isAdPaused=!1}});e.exports=n},7276:(e,t,i)=>{"use strict";var n;i.r(t),i.d(t,{LogLevel:()=>n,default:()=>r}),function(e){e[e.SILENT=6]="SILENT",e[e.ERROR=5]="ERROR",e[e.WARNING=4]="WARNING",e[e.NOTICE=3]="NOTICE",e[e.DEBUG=2]="DEBUG",e[e.VERBOSE=1]="VERBOSE"}(n||(n={}));class r{static report(e,t,i,s){if("undefined"!=typeof console&&console.log){s=s||"darkcyan";const o={5:"e",4:"w",3:"n",2:"d",1:"v"}[i=i||n.NOTICE];let l=`[NPAW - ${e}]`+this._getCurrentTime()+" "+o+":";if(r.logLevel<=i)if(r.plainLogs||"undefined"!=typeof document&&document.documentMode)this._plainReport(t,l);else{let e;e=i===n.ERROR&&console.error?console.error:i===n.WARNING&&console.warn?console.warn:i===n.DEBUG&&console.debug?console.debug:console.log,l="%c"+l,a=t,"[object Array]"===Object.prototype.toString.call(a)?(t.splice(0,0,l,"color: "+s),e.apply(console,t)):e.call(console,l,"color: "+s,t)}}var a}static _getCurrentTime(){const e=new Date;return"["+("0"+e.getDate()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)+":"+("0"+e.getSeconds()).slice(-2)+"."+("00"+e.getMilliseconds()).slice(-3)+"]"}static _plainReport(e,t){if(e instanceof Array)for(const i in e)this._plainReport(e[i],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+" <next line>"),console.log(e))}static setLogLevel(e){this.logLevel=e}static getLogLevel(){return this.logLevel}
2static error(e,...t){this.report(e,[].slice.call(arguments,1),n.ERROR,"darkred")}static warn(e,...t){this.report(e,[].slice.call(arguments,1),n.WARNING,"darkorange")}static notice(e,...t){this.report(e,[].slice.call(arguments,1),n.NOTICE,"darkgreen")}static debug(e,...t){this.report(e,[].slice.call(arguments,1),n.DEBUG,"indigo")}static verbose(e,...t){this.report(e,[].slice.call(arguments,1),n.VERBOSE,"navy")}static loadLevelFromUrl(){"undefined"!=typeof window&&window.location&&this._parseLevelFromUrl(window.location.search)}static _parseLevelFromUrl(e){if(e){const t=/\?.*&*npaw-debug=(.+)/i.exec(e);null!==t&&(this.logLevel=Number(t[1])),null!==/\?.*&*npaw-debug=plain/i.exec(e)&&(this.plainLogs=!0)}}}r.logLevel=n.ERROR,r.plainLogs=!1},7286:e=>{e.exports={cdnName:"CLOUDFRT",parsers:[{element:"host",headerName:"X-Amz-Cf-Id",regex:/(.+)/},{element:"type",headerName:"X-Cache",regex:/(\S+)\s.+/}],parseType:function(e){switch(e){case"Hit":return 1;case"Miss":return 2;default:return 0}}}},7355:(e,t,i)=>{const n=i(2507),{default:r}=i(7276),s=i(9835),a=i(8472),o=i(7939),l=i(3782),{default:d}=i(9065),{AnalyticsTag:u}=i(2784),{default:c}=i(61);var h={getPlayhead:function(){var e=this._safeGetterAdapter("getPlayhead");return n.parseNumber(e,0)},getPlayrate:function(){let e=0;if(this._adapter&&this._adapter.flags&&!this._adapter.flags.isPaused)try{e=this._adapter.getPlayrate()}catch(e){r.warn(u,"An error occured while calling getPlayrate",e)}return e},getFramesPerSecond:function(){return this._safeGetterAdapter("getFramesPerSecond","content.fps")},getSegmentDuration:function(){return this.hybridNetwork.getSegmentDuration()||this._safeGetterAdapter("getSegmentDuration","content.segmentDuration")},getDroppedFrames:function(){let e=this._safeGetterAdapter("getDroppedFrames");return e||(e=this.getWebkitDroppedFrames()),n.parseNumber(e,0)},getWebkitDroppedFrames:function(){if(this._adapter&&this._adapter.tag&&this._adapter.tag.webkitDroppedFrameCount)return this._adapter.tag.webkitDroppedFrameCount},getDuration:function(){const e=this._safeGetterAdapter("getDuration","content.duration")||void 0;return n.parseNumber(Math.round(e),void 0)},getBitrate:function(){let e=this._safeGetterAdapter("getBitrate","content.bitrate");return e&&-1!==e||(e=this.getWebkitBitrate()),n.parseNumber(e,-1)},getTotalBytes:function(){return this.options["content.sendTotalBytes"]?this._safeGetterAdapter("getTotalBytes","content.totalBytes"):void 0},getWebkitBitrate:function(){try{if(this._adapter&&this._adapter.tag&&this._adapter.tag.webkitVideoDecodedByteCount){let t=this._adapter.tag.webkitVideoDecodedByteCount;if(this._lastWebkitBitrate){var e=this._adapter.tag.webkitVideoDecodedByteCount-this._lastWebkitBitrate;t=Math.round(e/this.plugin.fastDataTransform.response.pingTime*8)}return this._lastWebkitBitrate=this._adapter.tag.webkitVideoDecodedByteCount,0!==t?t:-1}}catch(e){}return-1},getThroughput:function(){const e=this._safeGetterAdapter("getThroughput","content.throughput");return n.parseNumber(e,-1)},getRendition:function(){return this._safeGetterAdapter("getRendition","content.rendition")},getTitle:function(){return this._safeGetterAdapter("getTitle","content.title")},getTitle2:function(){return this._safeGetterAdapter("getTitle2","content.program")},getIsLive:function(){let e=this.options["content.isLive"];return e||!1===e||(e=this._safeGetterAdapter("getIsLive")||!1),e},getResource:function(){return this._safeGetterAdapter("getResource","content.resource")},getParsedResource:function(){let e=this.plugin.resourceTransform.getResource();return e=e||this._safeGetterAdapter("getURLToParse"),e===this.getResource()?void 0:e},getTransactionCode:function(){return this.options["content.transactionCode"]},getMetadata:function(){return this.options["content.metadata"]},getPlayerVersion:function(){return this._safeGetterAdapter("getPlayerVersion")||""},getPlayerName:function(){return this._safeGetterAdapter("getPlayerName")||""},getCdn:function(){let e;return e=d.getInstance().getCommonVariable(c.Products.BALANCER,c.BalancerVariables.AS_ENABLED)?"ACTVSWIT":this.plugin.resourceTransform.getCdnName(),e||this.options["content.cdn"]},getProfileName:function(){return d.getInstance().getCommonVariable(c.Products.BALANCER,c.BalancerVariables.PROFILE_NAME)},getBucketName:function(){return d.getInstance().getCommonVariable(c.Products.BALANCER,c.BalancerVariables.BUCKET)},getPluginVersion:function(){return this.getAdapterVersion()},getAdapterVersion:function(){return this._safeGetterAdapter("getVersion")},getCdnTraffic:function(){return this._safeGetterAdapter("getCdnTraffic")||this.hybridNetwork.getCdnTraffic()},getMultiCdnInfo:function(){return this.hybridNetwork.getMultiCdnInfo()},getBalancerResponseId:function(){return this.hybridNetwork.getBalancerResponseId()},getP2PTraffic:function(){return this._safeGetterAdapter("getP2PTraffic")||this.hybridNetwork.getP2PTraffic()},getUploadTraffic:function(){return this._safeGetterAdapter("getUploadTraffic")||this.hybridNetwork.getUploadTraffic()},getIsP2PEnabled:function(){return this._safeGetterAdapter("getIsP2PEnabled")||this.hybridNetwork.getIsP2PEnabled()},getStreamingProtocol:function(){const e=this.options["content.streamingProtocol"];if(e)for(var t in a)if(a[t]===e)return e},getTransportFormat:function(){let e=this.options["content.transportFormat"];if(!e&&this.options["parse.manifest"]&&(e=this.plugin.resourceTransform.getTransportFormat()),e)for(const t in o)if(o[t]===e)return e},getHouseholdId:function(){return this._safeGetterAdapter("getHouseholdId")},getLatency:function(){return this.getIsLive()?this._safeGetterAdapter("getLatency"):void 0},getPacketLoss:function(){return this._safeGetterAdapter("getPacketLoss")},getPacketSent:function(){return this._safeGetterAdapter("getPacketSent")},getVideoMetrics:function(){const e=n.getMetricsFrom(this._adapter?this._adapter.getMetrics():void 0,this.options["content.metrics"])||{},t=n.filterChangedMetrics(e,this._previousVideoMetrics);try{this._previousVideoMetrics=JSON.parse(JSON.stringify(e))}catch(t){r.warn(u,"Failed to deep copy video metrics for previous state. Storing a shallow copy as fallback.",t),this._previousVideoMetrics={...e}}return t},getPlayerStartupTime:function(){return this.plugin.browserLoadTimes.getPlayerStartupTime()},getJoinDuration:function(){return this._adapter?this._adapter.chronos.join.getDeltaTime(!1):-1},getBufferDuration:function(){return this._adapter?this._adapter.chronos.buffer.getDeltaTime(!1):-1},getSeekDuration:function(){return this._adapter?this._adapter.chronos.seek.getDeltaTime(!1):-1},getPauseDuration:function(){return this._adapter?this._adapter.chronos.pause.getDeltaTime(!1):0},getPackage:function(){return this.options["content.package"]},getSaga:function(){return this.options["content.saga"]},getTvShow:function(){return this.options["content.tvShow"]},getSeason:function(){return this.options["content.season"]},getEpisodeTitle:function(){return this.options["content.episodeTitle"]},getChannel:function(){return this.options["content.channel"]},getID:function(){return this.options["content.id"]},getImdbId:function(){return this.options["content.imdbId"]},getGracenoteID:function(){return this.options["content.gracenoteId"]},getType:function(){return this.options["content.type"]},getGenre:function(){return this.options["content.genre"]},getVideoLanguage:function(){return this.options["content.language"]},getSubtitles:function(){return this.options["content.subtitles"]},getContractedResolution:function(){return this.options["content.contractedResolution"]},getCost:function(){return this.options["content.cost"]}
2,getPrice:function(){return this.options["content.price"]},getPlaybackType:function(){let e=this.options["content.playbackType"];if(!e){let t=this.options["content.isLive"];"boolean"!=typeof t&&(t=this._safeGetterAdapter("getIsLive")),"boolean"==typeof t&&(e=t?"Live":"VoD")}return e},getDRM:function(){return this.options["content.drm"]},getVideoCodec:function(){return this._safeGetterAdapter("getVideoCodec","content.encoding.videoCodec")},getAudioCodec:function(){return this._safeGetterAdapter("getAudioCodec","content.encoding.audioCodec")},getCodecSettings:function(){return this.options["content.encoding.codecSettings"]},getCodecProfile:function(){return this.options["content.encoding.codecProfile"]},getContainerFormat:function(){return this.options["content.encoding.containerFormat"]},getLinkedViewId:function(){return this.options.linkedViewId},_safeGetterAdapter:function(e,t){let i;if(t&&this.options[t])i=this.options[t];else try{this._adapter&&"function"==typeof this._adapter[e]&&(i=this._adapter[e]())}catch(t){r.warn(u,"An error occured while calling "+e,t)}return i||void 0},getCustomDimensions:function(){const e=this.options["content.customDimensions"];return"object"==typeof e?e:void 0},getAdExtraparam1:function(){return this.options["ad.customDimension.1"]},getAdExtraparam2:function(){return this.options["ad.customDimension.2"]},getAdExtraparam3:function(){return this.options["ad.customDimension.3"]},getAdExtraparam4:function(){return this.options["ad.customDimension.4"]},getAdExtraparam5:function(){return this.options["ad.customDimension.5"]},getAdExtraparam6:function(){return this.options["ad.customDimension.6"]},getAdExtraparam7:function(){return this.options["ad.customDimension.7"]},getAdExtraparam8:function(){return this.options["ad.customDimension.8"]},getAdExtraparam9:function(){return this.options["ad.customDimension.9"]},getAdExtraparam10:function(){return this.options["ad.customDimension.10"]},getJoinTimeMeasureAfterAdBreak:function(){return this.options["joinTime.measureAfterAdBreak"]},getPluginInfo:function(){return JSON.stringify({lib:s,adapter:this.getAdapterVersion(),adAdapter:this.getAdAdapterVersion()})},getAccountCode:function(){return d.getInstance().getFastDataService().getAccountCode()},getUsername:function(){return this.options.userId?this.options.userId:this.options["user.name"]},getProfileId:function(){return this.options.profileId},getEmail:function(){return this.options["user.email"]},getNodeHost:function(){return this.options["content.cdnNode"]||this.plugin.resourceTransform.getNodeHost()},getNodeType:function(){return this.options["content.cdnType"]||this.plugin.resourceTransform.getNodeType()},getNodeTypeString:function(){return this.plugin.resourceTransform.getNodeTypeString()},getRequestNumber:function(){return Math.random()},getOfflineView:function(){let e;return this.plugin.offlineStorage&&(e=this.plugin.offlineStorage.getView()),e},getSmartswitchConfigCode:function(){return this.options["smartswitch.configCode"]},getSmartswitchGroupCode:function(){return this.options["smartswitch.groupCode"]},getSmartswitchContractCode:function(){return this.options["smartswitch.contractCode"]},controlPlayerExists:function(){return this.options["check.playerExists"]},ignorePauseSmallEvents:function(){return this.options["pause.ignoreSmallEvents"]},getAdPlayerVersion:function(){return this._safeGetterAdsAdapter("getPlayerVersion")||""},getAdPosition:function(){let e=l.AdPosition.Preroll,t=!1;if(this._adsAdapter)try{var i=this._adsAdapter.getPosition();l.AdPosition.Preroll!==i&&l.AdPosition.Midroll!==i&&l.AdPosition.Postroll!==i||(e=i,t=!0)}catch(e){r.warn(u,"An error occured while calling getAdPosition",e)}return!t&&this._adapter&&(e=this._adapter.flags.isJoined?l.AdPosition.Midroll:l.AdPosition.Preroll),e},getAdNumber:function(){return this.requestBuilder.lastSent.adNumber||0},getAdNumberInBreak:function(){return this.requestBuilder.lastSent.adNumberInBreak||0},getBreakNumber:function(){return this.requestBuilder.lastSent.breakNumber||0},getAdPlayhead:function(){const e=this._safeGetterAdsAdapter("getPlayhead");return n.parseNumber(e,0)},getAdDuration:function(){const e=this._safeGetterAdsAdapter("getDuration","ad.duration");return n.parseNumber(e,0)},getAdBitrate:function(){let e=this._safeGetterAdsAdapter("getBitrate");return e&&-1!==e||(e=this.getWebkitAdBitrate()),n.parseNumber(e,-1)},getWebkitAdBitrate:function(){try{if(this._adsAdapter&&this._adsAdapter.tag&&this._adsAdapter.tag.webkitVideoDecodedByteCount){let e=this._adsAdapter.tag.webkitVideoDecodedByteCount;if(this._lastWebkitAdBitrate){const t=this._adsAdapter.tag.webkitVideoDecodedByteCount-this._lastWebkitAdBitrate;e=Math.round(t/this.plugin.fastDataTransform.response.pingTime*8)}return this._lastWebkitAdBitrate=this._adsAdapter.tag.webkitVideoDecodedByteCount,0!==e?e:-1}}catch(e){}return-1},getAdTitle:function(){return this._safeGetterAdsAdapter("getTitle","ad.title")},getAdResource:function(){return this._safeGetterAdsAdapter("getResource","ad.resource")},getAdCampaign:function(){return this._safeGetterAdsAdapter("getCampaign","ad.campaign")},getAdCreativeId:function(){return this._safeGetterAdsAdapter("getCreativeId","ad.creativeId")},getAdProvider:function(){return this._safeGetterAdsAdapter("getProvider","ad.provider")},getAdAdapterVersion:function(){return this._safeGetterAdsAdapter("getVersion")},getAdMetadata:function(){return this.options["ad.metadata"]},getAdInsertionType:function(){return this._safeGetterAdsAdapter("getAdInsertionType")},getGivenBreaks:function(){return this._safeGetterAdsAdapter("getGivenBreaks","ad.givenBreaks")},getExpectedBreaks:function(){let e;const t=this.options["ad.expectedBreaks"],i=this.options["ad.expectedPattern"];if(t)e=t;else if(i)e=0,e=i.pre?i.pre.length:0,e+=i.mid?i.mid.length:0,e+=i.post?i.post.length:0;else if(this._adsAdapter)try{e=this._adsAdapter.getExpectedBreaks()}catch(e){r.warn(u,"An error occured while calling expectedBreaks",e)}return e},getExpectedPattern:function(){return this._safeGetterAdsAdapter("getExpectedPattern","ad.expectedPattern")},getBreaksTime:function(){return this._safeGetterAdsAdapter("getBreaksTime","ad.breaksTime")},getGivenAds:function(){return this._safeGetterAdsAdapter("getGivenAds","ad.givenAds")},getExpectedAds:function(){let e;try{if(this._adsAdapter){const t=this.options["ad.expectedPattern"];if(t&&this.getAdPosition()){let i=[];if(t.pre&&(i=i.concat(t.pre)),t.mid&&(i=i.concat(t.mid)),t.post&&(i=i.concat(t.post)),i.length>0){let t=this.requestBuilder.lastSent.breakNumber;t>i.length&&(t=i.length),e=i[t-1]}}else e=this._adsAdapter.getExpectedAds()}}catch(e){r.warn(u,"An error occured while calling expectedAds",e)}return e},getAdsExpected:function(){let e;try{e=this.getExpectedPattern()||this.getGivenAds()||!1}catch(e){r.warn(u,"An error occured while calling givenAds or expectedPattern",e)}return e},getAdJoinDuration:function(){if(!this._adsAdapter)return r.warn(u,"["+this.getViewCode()+"] getAdJoinDuration called but NO ADS ADAPTER exists!"),-1;const e=this._adsAdapter.chronos.join.getDeltaTime(!1);if(!0===this.getJoinTimeMeasureAfterAdBreak()&&this.requestBuilder.lastSent.position===l.AdPosition.Preroll&&this._initialPrerollTime>0){const t=e>=0?e:0,i=this._initialPrerollTime+t;return r.debug(u,"["+this.getViewCode()+"] getAdJoinDuration - NEW calculation: T
21("+this._initialPrerollTime+") + T2("+t+") = "+i),i}return r.debug(u,"["+this.getViewCode()+"] getAdJoinDuration - OLD calculation: T2("+e+"), measureAfterAdBreak="+this.getJoinTimeMeasureAfterAdBreak()+", position="+this.requestBuilder.lastSent.position+", T1="+this._initialPrerollTime),e},getAdBufferDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.buffer.getDeltaTime(!1):-1},getAdPauseDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.pause.getDeltaTime(!1):0},getAdTotalDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.total.getDeltaTime(!1):-1},getAdViewedDuration:function(){return this._getTimeMaxOrAcum(!0)},getAdViewability:function(){return this._getTimeMaxOrAcum()},_getTimeMaxOrAcum:function(e){let t=0;return this._adsAdapter&&this._adsAdapter.chronos.viewedMax.forEach((function(i){e?t+=i.getDeltaTime(!1):t=Math.max(i.getDeltaTime(!1),t)})),t},getAudioEnabled:function(){return this._safeGetterAdsAdapter("getAudioEnabled")},getIsSkippable:function(){return this._safeGetterAdsAdapter("getIsSkippable")},getIsFullscreen:function(){return this._safeGetterAdsAdapter("getIsFullscreen")},_safeGetterAdsAdapter:function(e,t){let i;if(t&&this.options[t])i=this.options[t];else try{this._adsAdapter&&"function"==typeof this._adsAdapter[e]&&(i=this._adsAdapter[e]())}catch(t){r.warn(u,"An error occured while calling "+e,t)}return i},getNewAdNumber:function(){let e=this.requestBuilder.lastSent.adNumber;return e&&this.requestBuilder.lastSent.position===this.getAdPosition()?e+=1:e=1,this.requestBuilder.lastSent.adNumber=e,e},getNewAdNumberInBreak:function(){return this._adNumberInBreak++,this.requestBuilder.lastSent.adNumberInBreak=this._adNumberInBreak,this._adNumberInBreak},getNewBreakNumber:function(){let e=1;return this._adNumberInBreak=0,this.requestBuilder.lastSent.breakNumber&&(e=this.requestBuilder.lastSent.breakNumber+1),e&&this.requestBuilder.lastSent.position!==this.getAdPosition()&&(e=1),this.requestBuilder.lastSent.breakNumber=e,e},getAccurateGeoLocation:function(){return this.lastKnownLocation}};e.exports=h},7660:e=>{e.exports={cdnName:"EDGECAST",parsers:[{element:"host",headerName:"Server",regex:/\((.+)\/.+\)/},{element:"type",headerName:"X-Cache",regex:/(.+)/}],parseType:function(e){return"HIT"===e?1:2}}},7680:(e,t,i)=>{var n=i(3948).extend({constructor:function(){this.reset()},reset:function(){this.startTime=0,this.stopTime=0,this.pauseTime=0,this.offset=0},getDeltaTime:function(e){var t=-1,i=(new Date).getTime();if(this.startTime){e&&!this.stopTime&&(this.stopTime=i);var n=this.pauseTime?i-this.pauseTime:0,r=this.stopTime?this.stopTime:i;t=this.offset-n+(r-this.startTime)}return t},start:function(){this.startTime=(new Date).getTime(),this.stopTime=0,this.offset=0},stop:function(){return this.pauseTime&&this.resume(),this.stopTime=(new Date).getTime(),this.startTime?this.offset+(this.stopTime-this.startTime):-1},pause:function(){this.pauseTime=(new Date).getTime()},resume:function(){this.offset-=(new Date).getTime()-this.pauseTime,this.pauseTime=0},clone:function(){var e=new n;return e.startTime=this.startTime,e.stopTime=this.stopTime,e.offset=this.offset,e}});e.exports=n},7937:(e,t,i)=>{var n=i(1129);n.DOMImplementation,n.XMLSerializer,t.DOMParser=i(8633).DOMParser},7939:e=>{e.exports={MP4:"MP4",MPEG2:"TS",CMF:"CMF"}},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=o(e),i=t[0],n=t[1];return 3*(i+n)/4-n},t.toByteArray=function(e){var t,i,s=o(e),a=s[0],l=s[1],d=new r(function(e,t,i){return 3*(t+i)/4-i}(0,a,l)),u=0,c=l>0?a-4:a;for(i=0;i<c;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],d[u++]=t>>16&255,d[u++]=t>>8&255,d[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,d[u++]=255&t),1===l&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,d[u++]=t>>8&255,d[u++]=255&t),d},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],a=16383,o=0,l=n-r;o<l;o+=a)s.push(d(e,o,o+a>l?l:o+a));return 1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),s.join("")};for(var i=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/",a=0;a<64;++a)i[a]=s[a],n[s.charCodeAt(a)]=a;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function l(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function d(e,t,i){for(var n,r=[],s=t;s<i;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),r.push(l(n));return r.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8037:(e,t,i)=>{var n=i(3782),r=i(2507),s=i(5292);const{AnalyticsTag:a}=i(2784),{default:o}=i(7276);var l={getAdsAdapter:function(){return this._adsAdapter},setAdsAdapter:function(e,t,i){if(i=i||!1,e.isSetAdapter())o.warn(a,"Adapters can only be added to a single plugin");else try{for(var n in this.removeAdsAdapter(),this.plugin=t,this._adsAdapter=e,this._adsAdapter.setIsAds(!0),this.adsAdapterListeners={},this.adsAdapterListeners[s.Event.START]=this._adStartListener.bind(this),this.adsAdapterListeners[s.Event.JOIN]=this._adJoinListener.bind(this),this.adsAdapterListeners[s.Event.DATA_OBJECT]=this._adAdvancedDataListener.bind(this),this.adsAdapterListeners[s.Event.PAUSE]=this._adPauseListener.bind(this),this.adsAdapterListeners[s.Event.RESUME]=this._adResumeListener.bind(this),this.adsAdapterListeners[s.Event.BUFFER_BEGIN]=this._adBufferBeginListener.bind(this),this.adsAdapterListeners[s.Event.BUFFER_END]=this._adBufferEndListener.bind(this),this.adsAdapterListeners[s.Event.STOP]=this._adStopListener.bind(this),this.adsAdapterListeners[s.Event.ERROR]=this._adErrorListener.bind(this),this.adsAdapterListeners[s.Event.CLICK]=this._adClickListener.bind(this),this.adsAdapterListeners[s.Event.MANIFEST]=this._adManifestListener.bind(this),this.adsAdapterListeners[s.Event.PODSTART]=this._adBreakStartListener.bind(this),this.adsAdapterListeners[s.Event.PODSTOP]=this._adBreakStopListener.bind(this),this.adsAdapterListeners[s.Event.QUARTILE]=this._adQuartileListener.bind(this),this.adsAdapterListeners)this._adsAdapter.on(n,this.adsAdapterListeners[n]);i&&(o.notice(a,"Registering listeners for registered AdsAdapter"),this._adsAdapter.registerListeners())}catch(e){o.warn(a,"Problem during setAdsAdapter process")}},removeAdsAdapter:function(){if(this._adsAdapter){if(this._adsAdapter.dispose(),this.adsAdapterListeners){for(var e in this.adsAdapterListeners)this._adsAdapter.off(e,this.adsAdapterListeners[e]);delete this.adsAdapterListeners}this.resizeScrollDetector.stopDetection(),this._adsAdapter=void 0}},_adStartListener:function(e){this._adapter?(this._adapter.fireBufferEnd(null,"adStartListener"),this._adapter.fireSeekEnd(null,"adStartListener"),this.isInitiated||this._adapter.flags.isStarted||this._adapter.fireStart(),this._adapter.flags.isPaused&&this._adapter.chronos.pause.reset()):this.fireInit(),this._adsAdapter&&(this._adsAdapter.chronos.viewedMax=[]);const t=e.data.params||{};t.adNumber=this.getNewAdNumber(),(this.getAdResource()||this.getAdTitle())&&"number"==typeof this.getAdDuration()?(this.adStartSent=!0,this._adsAdapter.fireManifest(),this._adsAdapter.fireAdBreakStart(),t.adNumberInBreak=this.getNewAdNumberInBreak(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_START,n.Service.AD_START,t)):(this.adInitSent=!0,t.adNumberInBreak=this.getNewAdNumberInBreak(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_INIT,n.Service.AD_INIT,t))},_adJoinListener:function(e){let t={};r.assign(t,e.data.params||{}),this.adInitSent&&!this.adStartSent&&(this._adsAdapter.fireManifest(),this._adsAdapter.fireAdBreakStart(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_START,n.Service.AD_START,t)),this._adsAdapter.startChronoView(),this.adConnected&&(this._adsAdapter.chronos.join.startTime=this.adConnectedTime,this._adsAdapter.chronos.total.startTime=this.adConnectedTime,this.adConnectedTime=0,this.adConnected=!1),t=e.data.params||{},this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_JOIN,n.Service.AD_JOIN,t),this.adInitSent=!1,this.adStartSent=!1,this.requestBuilder.lastSent.position===n.AdPosition.Preroll&&(this.isAdsPreJoined=!0)},_adAdvancedDataListener:function(e){var t=e.data.params||{};this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_DATA_OBJECT,n.Service.DATA_OBJECT,t)},_adPauseListener:function(e){const t=e.data.params||{};this._adsAdapter.stopChronoView(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_PAUSE,n.Service.AD_PAUSE,t)},_adResumeListener:function(e){const t=e.data.params||{};this._adsAdapter.startChronoView(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_RESUME,n.Service.AD_RESUME,t)},_adBufferBeginListener:function(e){o.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") Ad Buffer Begin"),this._adsAdapter.stopChronoView(),this._adsAdapter&&this._adsAdapter.flags.isPaused&&this._adsAdapter.chronos.pause.reset()},_adBufferEndListener:function(e){const t=e.data.params||{};this._adsAdapter.startChronoView(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_BUFFER,n.Service.AD_BUFFER,t)},_adStopListener:function(e){const t=e.data.params||{};if(this._adsAdapter.stopChronoView(),this._adsAdapter.flags.reset(),this._totalPrerollsTime=(this._totalPrerollsTime||0)+this._adsAdapter.chronos.total.getDeltaTime(),t.position=this.requestBuilder.lastSent.position,this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_STOP,n.Service.AD_STOP,t),this.requestBuilder.lastSent.position===n.AdPosition.Postroll){const e=this.options["ad.expectedPattern"];this.playedPostrolls++,(this.requestBuilder.lastSent.givenAds&&this.requestBuilder.lastSent.givenAds<=this.playedPostrolls||!this.requestBuilder.lastSent.givenAds&&e&&e.post&&e.post[0]&&e.post[0]<=this.playedPostrolls)&&this._adapter.fireStop({},"_adStopListener")}this.adConnected=!0,this.adConnectedTime=(new Date).getTime()},_adErrorListener:function(e){const t=e.data.params||{};!this._adapter||this._adapter.flags.isStarted||this.isInitiated?this._blockAdError(e.data.params)||(this._adsAdapter&&(this._adsAdapter.fireManifest(),this._adsAdapter.fireAdBreakStart()),this._adsAdapter&&this._adsAdapter.flags.isStarted||(t.adNumber=this.getNewAdNumber(),t.adNumberInBreak=this.getNewAdNumberInBreak()),this.isBreakStarted||(t.breakNumber=this.getNewBreakNumber()),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_ERROR,n.Service.AD_ERROR,t)):this._savedAdError=e},_adSavedError:function(){this._savedAdError&&(this._adErrorListener(this._savedAdError),this._savedAdError=null)},_adSavedManifest:function(){this._savedAdManifest&&(this._adManifestListener(this._savedAdManifest),this._savedAdManifest=null)},_blockAdError:function(e){const t=Date.now(),i=this._adsAdapter&&this._adsAdapter.getResource?this._adsAdapter.getResource():null;
2return this._lastAdErrorParams&&this._lastAdErrorParams.errorCode===e.errorCode&&this._lastAdErrorParams.msg===e.msg&&this._lastAdErrorParams.adCreativeId===this.getAdCreativeId()&&this._lastAdErrorResource===i&&this._lastAdErrorTime+5e3>t?(this._lastAdErrorTime=t,!0):(this._lastAdErrorTime=t,this._lastAdErrorParams=e,this._lastAdErrorResource=i,!1)},_adClickListener:function(e){const t=e.data.params||{};this._adsAdapter.stopChronoView(),this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_CLICK,n.Service.AD_CLICK,t)},_adManifestListener:function(e){if(!this.isAdsManifestSent){if(this._adapter&&!this._adapter.flags.isStarted&&!this.isInitiated)return void(this._savedAdManifest=e);const t=e.data.params||{};this.isAdsManifestSent=!0,this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_MANIFEST,n.Service.AD_MANIFEST,t)}},_adBreakStartListener:function(e){if(!this.isBreakStarted){this.isBreakStarted=!0,this._adapter&&this._adapter.firePause();const t=e.data.params||{};if(t.breakNumber=this.getNewBreakNumber(),this.getAdPosition()===n.AdPosition.Preroll&&0===this._initialPrerollTime){const e=this.initChrono.getDeltaTime(!1);e>=0&&(this._initialPrerollTime=e,o.debug(a,"["+this.getViewCode()+"] Captured T1 for pre-roll: "+this._initialPrerollTime+"ms (measureAfterAdBreak="+this.getJoinTimeMeasureAfterAdBreak()+")"))}this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_POD_START,n.Service.AD_POD_START,t),this.adConnected=!1}},_adBreakStopListener:function(e){if(this.isBreakStarted){this.isBreakStarted=!1;const t=e.data.params||{};t.position=this.requestBuilder.lastSent.position,this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_POD_STOP,n.Service.AD_POD_STOP,t),this.adConnected=!1,t.position===n.AdPosition.Preroll&&(this.isAdsPreJoined&&!0===this.getJoinTimeMeasureAfterAdBreak()&&this._adapter&&!this._adapter.flags.isJoined&&(this._adapter.chronos.join.reset(),this._adapter.chronos.join.start()),this.isAdsPreFinished=!0),this._adapter&&this._adapter.fireResume()}},_adQuartileListener:function(e){const t=e.data.params||{};t.quartile&&this._sendAdEventIfAllowed(n.WillSendEvent.WILL_SEND_AD_QUARTILE,n.Service.AD_QUARTILE,t)},_joinTimeMeasureAfterAdBreakAvailable:function(){return this.isAdsPreFinished&&this.isAdsPreJoined&&!0===this.getJoinTimeMeasureAfterAdBreak()},_sendAdEventIfAllowed:function(e,t,i){this.options["ad.ignore"]||this._send(e,t,i,void 0,void 0,(()=>{})),o.notice(a,"["+this.getViewCode()+"] (Video Space "+this.getVideoKey()+") "+t)}};e.exports=l},8187:(e,t,i)=>{var n=i(1593),r=i(3821);const{AnalyticsTag:s}=i(2784),{default:a}=i(7276);var o=n.extend({constructor:function(e){this.plugin=e,this.headerName="x-cdn"},init:function(){var e=null;this.plugin&&(e=this.plugin.getAdapter()&&this.plugin.getAdapter().getURLToParse()?this.plugin.getAdapter().getURLToParse():this.plugin.getResource()),this.plugin&&this.plugin.getAdapter()&&this.plugin.getAdapter().flags.isStarted&&this._request(e)},done:function(e){this.emit(o.Events.DONE,e)},error:function(){this.emit(o.Events.ERROR)},_successfulRequest:function(e){setTimeout(this.init.bind(this),1e3*parseInt(this.plugin.options["parse.cdnTTL"]));var t=e.getResponseHeaders().split("\n"),i=null;for(var n in t){var r=t[n],s=r.indexOf(this.headerName);s>-1&&(i=r.substring(s+this.headerName.length+1,r.length-1).replace(" ",""))}this.done(i)},_failedRequest:function(){setTimeout(this.init.bind(this),1e3*parseInt(this.plugin.options["parse.cdnTTL"])),a.warn(s,"CDN switch detection request failed"),this.error()},_request:function(e){var t=new r(e,null,null,{method:"HEAD",cache:!0});t.on(r.Event.SUCCESS,this._successfulRequest.bind(this)),t.on(r.Event.ERROR,this._failedRequest.bind(this)),t.send()}},{Events:{DONE:"done",ERROR:"error"}});e.exports=o},8424:e=>{e.exports={REQUIRED_METADATA_TIMEOUT:1e4}},8472:e=>{e.exports={HDS:"HDS",HLS:"HLS",MSS:"MSS",DASH:"DASH",RTMP:"RTMP",RTP:"RTP",RTSP:"RTSP",DVB:"DVB",DVBC:"DVB-C",DVBT:"DVB-T",DVBT2:"DVB-T2",MULTICAST:"MULTICAST"}},8490:(e,t,i)=>{var n=i(3948);const{default:r}=i(7276),{AnalyticsTag:s}=i(2784);var a=n.extend({constructor:function(e,t){this._adapter=e,this._videoElement=e.getVideoObject(),this._startedStateCheck=!1,this._intervalCheckId=null,this._intervalMilliseconds=t||300},start:function(){var e=this._adapter.plugin;e&&e.getReadyStateMonitorEnabled()&&this._videoElement&&!this._startedStateCheck&&(this._intervalCheckId=setInterval(this.checkStateProperty.bind(this),this._intervalMilliseconds),this._startedStateCheck=!0)},stop:function(){try{this._startedStateCheck&&this._intervalCheckId&&clearInterval(this._intervalCheckId),this._intervalCheckId=null,this._startedStateCheck=!1}catch(e){r.error(s,"Produced error stopping the network monitor")}},checkStateProperty:function(e){try{this._videoElement&&this._adapter&&this._videoElement.readyState&&(this._videoElement.readyState>3&&!this._adapter.flags.isSeeking?this._adapter.flags.isBuffering?this.fireBufferEnd({},"stateMonitor"):this._adapter.flags.isJoined||this.fireJoin({},"stateMonitor"):this._videoElement.readyState<4&&!this._adapter.flags.isBuffering&&this.fireBufferBegin({},!1,"stateMonitor",!0))}catch(e){}}});e.exports=a},8633:(e,t,i)=>{var n=i(525),r=i(1129),s=i(6598),a=i(2133),o=r.DOMImplementation,l=n.NAMESPACE,d=a.ParseError,u=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}
2function m(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,n=new u,r=i.domBuilder||new p,a=i.errorHandler,o=i.locator,d=i.xmlns||{},h=/\/x?html?$/.test(t),f=h?s.HTML_ENTITIES:s.XML_ENTITIES;o&&r.setDocumentLocator(o),n.errorHandler=function(e,t,i){if(!e){if(t instanceof p)return t;e=t}var n={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(i){e(t,i)}:e),n[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(a,r,o),n.domBuilder=i.domBuilder||r,h&&(d[""]=l.HTML),d.xml=d.xml||l.XML;var m=i.normalizeLineEndings||c;return e&&"string"==typeof e?n.parse(m(e),d,f):n.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,s=r.createElementNS(e,i||t),a=n.length;v(this,s),this.currentElement=s,this.locator&&f(this.locator,s);for(var o=0;o<a;o++){e=n.getURI(o);var l=n.getValue(o),d=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&f(n.getLocator(o),d),d.value=d.nodeValue=l,s.setAttributeNode(d)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,i),v(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=m.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&f(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=m.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&f(this.locator,n),v(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&f(this.locator,r),v(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){p.prototype[e]=function(){return null}})),t.DOMParser=h},8641:(e,t,i)=>{var n,r=i(1048).hp;self,n=()=>{return e={851:(e,t,i)=>{var n=i(771),r=n.getOptions,s=n.setOptions,a=i(463),o=i(367),l=i(890);e.exports={parse:a,stringify:o,types:l,getOptions:r,setOptions:s}},463:(e,t,i)=>{function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,s,a,o=[],l=!0,d=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){d=!0,r=e}finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(d)throw r}}return o}}(e,t)||a(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 s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=a(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){l=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(l)throw s}}}}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var l=i(771),d=i(890),u=d.Rendition,c=d.Variant,h=d.SessionData,p=d.Key,f=d.MediaInitializationSection,g=d.DateRange,m=d.SpliceInfo,v=d.MasterPlaylist,y=d.MediaPlaylist,_=d.Segment,b=d.Parti
2alSegment,T=d.PrefetchSegment,S=d.RenditionReport;function E(e){return l.trim(e,'"')}function A(e){var t=l.splitAt(e,",");return{duration:l.toNumber(t[0]),title:decodeURIComponent(escape(t[1]))}}function w(e){var t=l.splitAt(e,"@");return{length:l.toNumber(t[0]),offset:t[1]?l.toNumber(t[1]):-1}}function P(e){var t=l.splitAt(e,"x");return{width:l.toNumber(t[0]),height:l.toNumber(t[1])}}function C(e){var t="ALLOWED-CPC: Each entry must consit of KEYFORMAT and Content Protection Configuration",i=e.split(",");0===i.length&&l.INVALIDPLAYLIST(t);var r,a=[],o=s(i);try{for(o.s();!(r=o.n()).done;){var d=r.value,u=n(l.splitAt(d,":"),2),c=u[0],h=u[1];c&&h?a.push({format:c,cpcList:h.split("/")}):l.INVALIDPLAYLIST(t)}}catch(e){o.e(e)}finally{o.f()}return a}function L(e){return e.startsWith('"')?E(e):e.startsWith("0x")||e.startsWith("0X")?l.hexToByteSequence(e):l.toNumber(e)}function D(e,t){t.IV&&e.compatibleVersion<2&&(e.compatibleVersion=2),(t.KEYFORMAT||t.KEYFORMATVERSIONS)&&e.compatibleVersion<5&&(e.compatibleVersion=5)}function k(e){var t,i,r,a={},o=s(l.splitByCommaWithPreservingQuotes(e));try{for(o.s();!(t=o.n()).done;){var d=t.value,u=n(l.splitAt(d,"="),2),c=u[0],h=u[1],p=E(h);switch(c){case"URI":a[c]=p;break;case"START-DATE":case"END-DATE":a[c]=new Date(p);break;case"IV":a[c]=(i=p,16!==(r=l.hexToByteSequence(i)).length&&l.INVALIDPLAYLIST("IV must be a 128-bit unsigned integer"),r);break;case"BYTERANGE":a[c]=w(p);break;case"RESOLUTION":a[c]=P(p);break;case"ALLOWED-CPC":a[c]=C(p);break;case"END-ON-NEXT":case"DEFAULT":case"AUTOSELECT":case"FORCED":case"PRECISE":case"CAN-BLOCK-RELOAD":case"INDEPENDENT":case"GAP":a[c]="YES"===p;break;case"DURATION":case"PLANNED-DURATION":case"BANDWIDTH":case"AVERAGE-BANDWIDTH":case"FRAME-RATE":case"TIME-OFFSET":case"CAN-SKIP-UNTIL":case"HOLD-BACK":case"PART-HOLD-BACK":case"PART-TARGET":case"BYTERANGE-START":case"BYTERANGE-LENGTH":case"LAST-MSN":case"LAST-PART":case"SKIPPED-SEGMENTS":case"SCORE":a[c]=l.toNumber(p);break;default:c.startsWith("SCTE35-")?a[c]=l.hexToByteSequence(p):c.startsWith("X-")?a[c]=L(h):("VIDEO-RANGE"===c&&"SDR"!==p&&"HLG"!==p&&"PQ"!==p&&l.INVALIDPLAYLIST('VIDEO-RANGE: unknown value "'.concat(p,'"')),a[c]=p)}}}catch(e){o.e(e)}finally{o.f()}return a}function I(){l.INVALIDPLAYLIST("The file contains both media and master playlist tags.")}function R(e,t,i){var n,r=(n=t.attributes,new u({type:n.TYPE,uri:n.URI,groupId:n["GROUP-ID"],language:n.LANGUAGE,assocLanguage:n["ASSOC-LANGUAGE"],name:n.NAME,isDefault:n.DEFAULT,autoselect:n.AUTOSELECT,forced:n.FORCED,instreamId:n["INSTREAM-ID"],characteristics:n.CHARACTERISTICS,channels:n.CHANNELS})),a=e[l.camelify(i)],o=function(e,t){var i,n=!1,r=s(e);try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a.name===t.name)return"All EXT-X-MEDIA tags in the same Group MUST have different NAME attributes.";a.isDefault&&(n=!0)}}catch(e){r.e(e)}finally{r.f()}return n&&t.isDefault?"EXT-X-MEDIA A Group MUST NOT have more than one member with a DEFAULT attribute of YES.":""}(a,r);o&&l.INVALIDPLAYLIST(o),a.push(r),r.isDefault&&(e.currentRenditions[l.camelify(i)]=a.length-1)}function N(e,t,i,n,r){var a,o=new c({uri:i,bandwidth:t.BANDWIDTH,averageBandwidth:t["AVERAGE-BANDWIDTH"],score:t.SCORE,codecs:t.CODECS,resolution:t.RESOLUTION,frameRate:t["FRAME-RATE"],hdcpLevel:t["HDCP-LEVEL"],allowedCpc:t["ALLOWED-CPC"],videoRange:t["VIDEO-RANGE"],stableVariantId:t["STABLE-VARIANT-ID"]}),d=s(e);try{for(d.s();!(a=d.n()).done;){var u=a.value;if("EXT-X-MEDIA"===u.name){var h=u.attributes,p=h.TYPE;if(p&&h["GROUP-ID"]||l.INVALIDPLAYLIST("EXT-X-MEDIA TYPE attribute is REQUIRED."),t[p]===h["GROUP-ID"]&&(R(o,u,p),"CLOSED-CAPTIONS"===p)){var f,g=s(o.closedCaptions);try{for(g.s();!(f=g.n()).done;){var m=f.value.instreamId;if(m&&m.startsWith("SERVICE")&&r.compatibleVersion<7){r.compatibleVersion=7;break}}}catch(e){g.e(e)}finally{g.f()}}}}}catch(e){d.e(e)}finally{d.f()}return function(e,t,i){for(var n=function(){var n=s[r];"CLOSED-CAPTIONS"===n&&"NONE"===e[n]?(i.isClosedCaptionsNone=!0,t.closedCaptions=[]):e[n]&&!t[l.camelify(n)].some((function(t){return t.groupId===e[n]}))&&l.INVALIDPLAYLIST("".concat(n," attribute MUST match the value of the GROUP-ID attribute of an EXT-X-MEDIA tag whose TYPE attribute is ").concat(n,"."))},r=0,s=["AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS"];r<s.length;r++)n()}(t,o,r),o.isIFrameOnly=n,o}function O(e,t){if(e.method!==t.method)return!1;if(e.uri!==t.uri)return!1;if(e.iv){if(!t.iv)return!1;if(e.iv.length!==t.iv.length)return!1;for(var i=0;i<e.iv.length;i++)if(e.iv[i]!==t.iv[i])return!1}else if(t.iv)return!1;return e.format===t.format&&e.formatVersion===t.formatVersion}function M(e,t,i,n,r,s,a){for(var o=new _({uri:t,mediaSequenceNumber:r,discontinuitySequence:s}
2),d=!1,u=!1,c=i;c<=n;c++){var h=e[c],v=h.name,y=h.value,T=h.attributes;if("EXTINF"===v)!Number.isInteger(y.duration)&&a.compatibleVersion<3&&(a.compatibleVersion=3),Math.round(y.duration)>a.targetDuration&&l.INVALIDPLAYLIST("EXTINF duration, when rounded to the nearest integer, MUST be less than or equal to the target duration"),o.duration=y.duration,o.title=y.title;else if("EXT-X-BYTERANGE"===v)a.compatibleVersion<4&&(a.compatibleVersion=4),o.byterange=y;else if("EXT-X-DISCONTINUITY"===v)o.parts.length>0&&l.INVALIDPLAYLIST("EXT-X-DISCONTINUITY must appear before the first EXT-X-PART tag of the Parent Segment."),o.discontinuity=!0;else if("EXT-X-KEY"===v)o.parts.length>0&&l.INVALIDPLAYLIST("EXT-X-KEY must appear before the first EXT-X-PART tag of the Parent Segment."),D(a,T),o.key=new p({method:T.METHOD,uri:T.URI,iv:T.IV,format:T.KEYFORMAT,formatVersion:T.KEYFORMATVERSIONS});else if("EXT-X-MAP"===v)o.parts.length>0&&l.INVALIDPLAYLIST("EXT-X-MAP must appear before the first EXT-X-PART tag of the Parent Segment."),a.compatibleVersion<5&&(a.compatibleVersion=5),a.hasMap=!0,o.map=new f({uri:T.URI,byterange:T.BYTERANGE});else if("EXT-X-PROGRAM-DATE-TIME"===v)o.programDateTime=y;else if("EXT-X-DATERANGE"===v){for(var S={},E=0,A=Object.keys(T);E<A.length;E++){var w=A[E];(w.startsWith("SCTE35-")||w.startsWith("X-"))&&(S[w]=T[w])}o.dateRange=new g({id:T.ID,classId:T.CLASS,start:T["START-DATE"],end:T["END-DATE"],duration:T.DURATION,plannedDuration:T["PLANNED-DURATION"],endOnNext:T["END-ON-NEXT"],attributes:S})}else if("EXT-X-CUE-OUT"===v)o.markers.push(new m({type:"OUT",duration:T&&T.DURATION||y}));else if("EXT-X-CUE-IN"===v)o.markers.push(new m({type:"IN"}));else if("EXT-X-CUE-OUT-CONT"===v||"EXT-X-CUE"===v||"EXT-OATCLS-SCTE35"===v||"EXT-X-ASSET"===v||"EXT-X-SCTE35"===v)o.markers.push(new m({type:"RAW",tagName:v,value:y}));else if("EXT-X-PRELOAD-HINT"!==v||T.TYPE)if("EXT-X-PRELOAD-HINT"===v&&"PART"===T.TYPE&&u)l.INVALIDPLAYLIST("Servers should not add more than one EXT-X-PRELOAD-HINT tag with the same TYPE attribute to a Playlist.");else if("EXT-X-PART"!==v&&"EXT-X-PRELOAD-HINT"!==v||T.URI){if("EXT-X-PRELOAD-HINT"===v&&"MAP"===T.TYPE)d&&l.INVALIDPLAYLIST("Servers should not add more than one EXT-X-PRELOAD-HINT tag with the same TYPE attribute to a Playlist."),d=!0,a.hasMap=!0,o.map=new f({hint:!0,uri:T.URI,byterange:{length:T["BYTERANGE-LENGTH"],offset:T["BYTERANGE-START"]||0}});else if("EXT-X-PART"===v||"EXT-X-PRELOAD-HINT"===v&&"PART"===T.TYPE){"EXT-X-PART"!==v||T.DURATION||l.INVALIDPLAYLIST("EXT-X-PART: DURATION attribute is mandatory"),"EXT-X-PRELOAD-HINT"===v&&(u=!0);var P=new b({hint:"EXT-X-PRELOAD-HINT"===v,uri:T.URI,byterange:"EXT-X-PART"===v?T.BYTERANGE:{length:T["BYTERANGE-LENGTH"],offset:T["BYTERANGE-START"]||0},duration:T.DURATION,independent:T.INDEPENDENT,gap:T.GAP});o.parts.push(P)}}else l.INVALIDPLAYLIST("EXT-X-PART / EXT-X-PRELOAD-HINT: URI attribute is mandatory");else l.INVALIDPLAYLIST("EXT-X-PRELOAD-HINT: TYPE attribute is mandatory")}return o}function x(e,t,i,n,r,s,a){for(var o=new T({uri:t,mediaSequenceNumber:r,discontinuitySequence:s}),d=i;d<=n;d++){var u=e[d],c=u.name,h=u.attributes;"EXTINF"===c?l.INVALIDPLAYLIST("A prefetch segment must not be advertised with an EXTINF tag."):"EXT-X-DISCONTINUITY"===c?l.INVALIDPLAYLIST("A prefetch segment must not be advertised with an EXT-X-DISCONTINUITY tag."):"EXT-X-PREFETCH-DISCONTINUITY"===c?o.discontinuity=!0:"EXT-X-KEY"===c?(D(a,h),o.key=new p({method:h.METHOD,uri:h.URI,iv:h.IV,format:h.KEYFORMAT,formatVersion:h.KEYFORMATVERSIONS})):"EXT-X-MAP"===c&&l.INVALIDPLAYLIST("Prefetch segments must not be advertised with an EXT-X-MAP tag.")}return o}function B(e,t,i,n,r){var s=t.discontinuity,a=t.key,o=t.map,d=t.byterange,u=t.uri;if(s&&(t.discontinuitySequence=i+1),a||(t.key=n),o||(t.map=r),d&&-1===d.offset){var c=e.segments;if(c.length>0){var h=c[c.length-1];h.byterange&&h.uri===u?d.offset=h.byterange.offset+h.byterange.length:l.INVALIDPLAYLIST("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST be a sub-range of the same media resource")}else l.INVALIDPLAYLIST("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST appear in the Playlist file")}return e.segments.push(t),[t.discontinuitySequence,t.key,t.map]}function U(e,t){var i=function(e){var t=e.indexOf(":");return-1===t?[e.slice(1).trim(),null]:[e.slice(1,t).trim(),e.slice(t+1).trim()]}(e),r=n(i,2),s=r[0],a=r[1],o=function(e){switch(e){case"EXTM3U":case"EXT-X-VERSION":return"Basic";case"EXTINF":case"EXT-X-BYTERANGE":case"EXT-X-DISCONTINUITY":case"EXT-X-PREFETCH-DISCONTINUITY":case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-PROGRAM-DATE-TIME":case"EXT-X-DATERANGE":case"EXT-X-CUE-OUT":case"EXT-X-CUE-IN":case"EXT-X-CUE-OUT-CONT":case"EXT-X-CUE":case"EXT-OATCLS-SCTE35":case"EXT-X-ASSET":case"EXT-X-SCTE35":case"EXT-X-PART":case"EXT-X-PRELOAD-HINT":return"Segment";case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":case"EXT-X-ENDLIST":case"EXT-X-PLAYLIST-TYPE":case"EXT-X-I-FRAMES-ONLY":case"EXT-X-SERVER-CONTROL":case"EXT-X-PART-INF":case"EXT-X-PREFETCH":case"EXT-X-RENDITION-REPORT":case"EXT-X-SKIP":return"MediaPlaylist";case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":return"MasterPlaylist";case"EXT-X-INDEPENDENT-SEGMENTS":case"EXT-X-START":return"MediaorMasterPlaylist";default:return"Unknown"}}(s);if(function(e,t){if("Segment"===e||"MediaPlaylist"===e)return void 0===t.isMasterPlaylist?void(t.isMasterPlaylist=!1):void(t.isMasterPlaylist&&I());if("MasterPlaylist"===e){if(void 0===t.isMasterPlaylist)return void(t.isMasterPlaylist=!0);!1===t.isMasterPlaylist&&I()}}(o,t),"Unknown"===o)return null;"MediaPlaylist"===o&&"EXT-X-RENDITION-REPORT"!==s&&"EXT-X-PREFETCH"!==s&&(t.hash[s]&&l.INVALIDPLAYLIST("There MUST NOT be more than one Media Playlist tag of each type in any Media Playlist"),t.hash[s]=!0);var d=function(e,t){switch(e){case"EXTM3U":case"EXT-X-DISCONTINUITY":case"EXT-X-ENDLIST":case"EXT-X-I-FRAMES-ONLY":case"EXT-X-INDEPENDENT-SEGMENTS":case"EXT-X-CUE-IN":return[null,
2null];case"EXT-X-VERSION":case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":return[l.toNumber(t),null];case"EXT-X-CUE-OUT":return Number.isNaN(Number(t))?[null,k(t)]:[l.toNumber(t),null];case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-DATERANGE":case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":case"EXT-X-START":case"EXT-X-SERVER-CONTROL":case"EXT-X-PART-INF":case"EXT-X-PART":case"EXT-X-PRELOAD-HINT":case"EXT-X-RENDITION-REPORT":case"EXT-X-SKIP":return[null,k(t)];case"EXTINF":return[A(t),null];case"EXT-X-BYTERANGE":return[w(t),null];case"EXT-X-PROGRAM-DATE-TIME":return[new Date(t),null];default:return[t,null]}}(s,a),u=n(d,2);return{name:s,category:o,value:u[0],attributes:u[1]}}function V(e,t){var i;return t.isMasterPlaylist?i=function(e,t){var i,r=new v,a=!1,o=s(e.entries());try{for(o.s();!(i=o.n()).done;){var d=n(i.value,2),u=d[0],c=d[1],f=c.name,g=c.value,m=c.attributes;if("EXT-X-VERSION"===f)r.version=g;else if("EXT-X-STREAM-INF"===f){var y=e[u+1];("string"!=typeof y||y.startsWith("#EXT"))&&l.INVALIDPLAYLIST("EXT-X-STREAM-INF must be followed by a URI line");var _=N(e,m,y,!1,t);_&&("number"==typeof _.score&&(a=!0,_.score<0&&l.INVALIDPLAYLIST("SCORE attribute on EXT-X-STREAM-INF must be positive decimal-floating-point number.")),r.variants.push(_))}else if("EXT-X-I-FRAME-STREAM-INF"===f){var b=N(e,m,m.URI,!0,t);b&&r.variants.push(b)}else"EXT-X-SESSION-DATA"===f?function(){var e=new h({id:m["DATA-ID"],value:m.VALUE,uri:m.URI,language:m.LANGUAGE});r.sessionDataList.some((function(t){return t.id===e.id&&t.language===e.language}))&&l.INVALIDPLAYLIST("A Playlist MUST NOT contain more than one EXT-X-SESSION-DATA tag with the same DATA-ID attribute and the same LANGUAGE attribute."),r.sessionDataList.push(e)}():"EXT-X-SESSION-KEY"===f?function(){"NONE"===m.METHOD&&l.INVALIDPLAYLIST("EXT-X-SESSION-KEY: The value of the METHOD attribute MUST NOT be NONE");var e=new p({method:m.METHOD,uri:m.URI,iv:m.IV,format:m.KEYFORMAT,formatVersion:m.KEYFORMATVERSIONS});r.sessionKeyList.some((function(t){return O(t,e)}))&&l.INVALIDPLAYLIST("A Master Playlist MUST NOT contain more than one EXT-X-SESSION-KEY tag with the same METHOD, URI, IV, KEYFORMAT, and KEYFORMATVERSIONS attribute values."),D(t,m),r.sessionKeyList.push(e)}():"EXT-X-INDEPENDENT-SEGMENTS"===f?(r.independentSegments&&l.INVALIDPLAYLIST("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),r.independentSegments=!0):"EXT-X-START"===f&&(r.start&&l.INVALIDPLAYLIST("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof m["TIME-OFFSET"]&&l.INVALIDPLAYLIST("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),r.start={offset:m["TIME-OFFSET"],precise:m.PRECISE||!1})}}catch(e){o.e(e)}finally{o.f()}if(a){var T,S=s(r.variants);try{for(S.s();!(T=S.n()).done;)"number"!=typeof T.value.score&&l.INVALIDPLAYLIST("If any Variant Stream contains the SCORE attribute, then all Variant Streams in the Master Playlist SHOULD have a SCORE attribute")}catch(e){S.e(e)}finally{S.f()}}if(t.isClosedCaptionsNone){var E,A=s(r.variants);try{for(A.s();!(E=A.n()).done;)E.value.closedCaptions.length>0&&l.INVALIDPLAYLIST("If there is a variant with CLOSED-CAPTIONS attribute of NONE, all EXT-X-STREAM-INF tags MUST have this attribute with a value of NONE")}catch(e){A.e(e)}finally{A.f()}}return r}(e,t):!(i=function(e,t){var i,r=new y,a=-1,o=0,d=!1,u=!1,c=0,h=null,p=null,f=!1,g=s(e.entries());try{for(g.s();!(i=g.n()).done;){var m=n(i.value,2),v=m[0],_=m[1],b=_.name,T=_.value,E=_.attributes;if("Segment"!==_.category){if("EXT-X-VERSION"===b)void 0===r.version?r.version=T:l.INVALIDPLAYLIST("A Playlist file MUST NOT contain more than one EXT-X-VERSION tag.");else if("EXT-X-TARGETDURATION"===b)r.targetDuration=t.targetDuration=T;else if("EXT-X-MEDIA-SEQUENCE"===b)r.segments.length>0&&l.INVALIDPLAYLIST("The EXT-X-MEDIA-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),r.mediaSequenceBase=o=T;else if("EXT-X-DISCONTINUITY-SEQUENCE"===b)r.segments.length>0&&l.INVALIDPLAYLIST("The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),d&&l.INVALIDPLAYLIST("The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before any EXT-X-DISCONTINUITY tag."),r.discontinuitySequenceBase=c=T;else if("EXT-X-ENDLIST"===b)r.endlist=!0;else if("EXT-X-PLAYLIST-TYPE"===b)r.playlistType=T;else if("EXT-X-I-FRAMES-ONLY"===b)t.compatibleVersion<4&&(t.compatibleVersion=4),r.isIFrame=!0;else if("EXT-X-INDEPENDENT-SEGMENTS"===b)r.independentSegments&&l.INVALIDPLAYLIST("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),r.independentSegments=!0;else if("EXT-X-START"===b)r.start&&l.INVALIDPLAYLIST("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof E["TIME-OFFSET"]&&l.INVALIDPLAYLIST("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),r.start={offset:E["TIME-OFFSET"],precise:E.PRECISE||!1};else if("EXT-X-SERVER-CONTROL"===b)E["CAN-BLOCK-RELOAD"]||l.INVALIDPLAYLIST("EXT-X-SERVER-CONTROL: CAN-BLOCK-RELOAD=YES is mandatory for Low-Latency HLS"),r.lowLatencyCompatibility={canBlockReload:E["CAN-BLOCK-RELOAD"],canSkipUntil:E["CAN-SKIP-UNTIL"],holdBack:E["HOLD-BACK"],partHoldBack:E["PART-HOLD-BACK"]};else if("EXT-X-PART-INF"===b)E["PART-TARGET"]||l.INVALIDPLAYLIST("EXT-X-PART-INF: PART-TARGET attribute is mandatory"),r.partTargetDuration=E["PART-TARGET"];else if("EXT-X-RENDITION-REPORT"===b)E.URI||l.INVALIDPLAYLIST("EXT-X-RENDITION-REPORT: URI attribute is mandatory"),0===E.URI.search(/^[a-z]+:/)&&l.INVALIDPLAYLIST("EXT-X-RENDITION-REPORT: URI must be relative to the playlist uri"),r.renditionReports.push(new S({uri:E.URI,lastMSN:E["LAST-MSN"],lastPart:E["LAST-PART"]}));else if("EXT-X-SKIP"===b)E["SKIPPED-SEGMENTS"]||l.INVALIDPLAYLIST("EXT-X-SKIP: SKIPPED-SEGMENTS attribute is mandatory"),t.compatibleVersion<9&&(t.compatibleVersion=9),r.skip=E["SKIPPED-SEGMENTS"],o+=r.skip;else if("EXT-X-PREFETCH"===b){var A=x(e,T,-1===a?v:a,v-1,o++,c,t);A&&(A.discontinuity&&(A.discontinuitySequence++,c=A.discontinuitySequence),A.key?h=A.key:A.key=h,r.prefetchSegments.push(A)),u=!0,a=-1}else if("string"==typeof _){-1===a&&l.INVALIDPLAYLIST("A URI line is not preceded by any segment tags"),r.targetDuration||l.INVALIDPLAYLIST("The EXT-X-TARGETDURATION tag is REQUIRED"),u&&l.INVALIDPLAYLIST("These segments must appear after all complete segments.");var w=M(e,_,a,v-1,o++,c,t);if(w){var P=n(B(r,w,c,h,p),3);c=P[0],h=P[1],p=P[2],!f&&w.parts.length>0&&(f=!0)}a=-1}}else-1===a&&(a=v),"EXT-X-DISCONTINUITY"===b&&(d=!0)}}catch(e){g.e(e)}finally{g.f()}if(-1!==a){var C=M(e,"",a,e.length-1,o++,c,t);if(C){var L=C.parts;L.length>0&&!r.endlist&&!L[L.length-1].hint&&l.INVALIDPLAYLIST("If the Playlist contains EXT-X-PART tags and does not contain an EXT-X-ENDLIST tag, the Playlist must contain an EXT-X-PRELOAD-HINT tag with a TYPE=PART attribute"),B(r,C,h,p),!f&&C.parts.length>0&&(f=!0)}}return function(e){for(var t=new Map,i=new Map,n=!1,r=!1,a=e.length-1;a>=0;a--){var o=e[a],d=o.programDateTime,u=o.dateRange;if(d&&(r=!0),u&&u.start){n=!0,u.endOnNext&&(u.end||u.duration)&&l.INVALIDPLAYLIST("An EXT-X-DATERANGE tag with an END-ON-NEXT
2=YES attribute MUST NOT contain DURATION or END-DATE attributes.");var c=u.start.getTime(),h=u.duration||0;u.end&&u.duration&&c+1e3*h!==u.end.getTime()&&l.INVALIDPLAYLIST("END-DATE MUST be equal to the value of the START-DATE attribute plus the value of the DURATION"),u.endOnNext&&(u.end=t.get(u.classId)),t.set(u.classId,u.start);var p=u.end?u.end.getTime():u.start.getTime()+1e3*(u.duration||0),f=i.get(u.classId);if(f){var g,m=s(f);try{for(m.s();!(g=m.n()).done;){var v=g.value;(v.start<=c&&v.end>c||v.start>=c&&v.start<p)&&l.INVALIDPLAYLIST("DATERANGE tags with the same CLASS should not overlap")}}catch(e){m.e(e)}finally{m.f()}f.push({start:c,end:p})}else i.set(u.classId,[{start:c,end:p}])}}n&&!r&&l.INVALIDPLAYLIST("If a Playlist contains an EXT-X-DATERANGE tag, it MUST also contain at least one EXT-X-PROGRAM-DATE-TIME tag.")}(r.segments),r.lowLatencyCompatibility&&function(e,t){var i=e.lowLatencyCompatibility,r=e.targetDuration,a=e.partTargetDuration,o=e.segments,d=e.renditionReports,u=i.canSkipUntil,c=i.holdBack,h=i.partHoldBack;if(u<6*r&&l.INVALIDPLAYLIST("The Skip Boundary must be at least six times the EXT-X-TARGETDURATION."),c<3*r&&l.INVALIDPLAYLIST("HOLD-BACK must be at least three times the EXT-X-TARGETDURATION."),t){void 0===a&&l.INVALIDPLAYLIST("EXT-X-PART-INF is required if a Playlist contains one or more EXT-X-PART tags"),void 0===h&&l.INVALIDPLAYLIST("EXT-X-PART: PART-HOLD-BACK attribute is mandatory"),h<a&&l.INVALIDPLAYLIST("PART-HOLD-BACK must be at least PART-TARGET");var p,f=s(o.entries());try{for(f.s();!(p=f.n()).done;){var g=n(p.value,2),m=g[0],v=g[1].parts;v.length>0&&m<o.length-3&&l.INVALIDPLAYLIST("Remove EXT-X-PART tags from the Playlist after they are greater than three target durations from the end of the Playlist.");var y,_=s(v.entries());try{for(_.s();!(y=_.n()).done;){var b=n(y.value,2),T=b[0],S=b[1].duration;void 0!==S&&(S>a&&l.INVALIDPLAYLIST("PART-TARGET is the maximum duration of any Partial Segment"),T<v.length-1&&S<.85*a&&l.INVALIDPLAYLIST("All Partial Segments except the last part of a segment must have a duration of at least 85% of PART-TARGET"))}}catch(e){_.e(e)}finally{_.f()}}}catch(e){f.e(e)}finally{f.f()}}var E,A=s(d);try{for(A.s();!(E=A.n()).done;){var w=E.value,P=o[o.length-1];w.lastMSN||(w.lastMSN=P.mediaSequenceNumber),!w.lastPart&&P.parts.length>0&&(w.lastPart=P.parts.length-1)}}catch(e){A.e(e)}finally{A.f()}}(r,f),r}(e,t)).isIFrame&&t.hasMap&&t.compatibleVersion<6&&(t.compatibleVersion=6),t.compatibleVersion>1&&(!i.version||i.version<t.compatibleVersion)&&l.INVALIDPLAYLIST("EXT-X-VERSION needs to be ".concat(t.compatibleVersion," or higher.")),i}e.exports=function(e){var t={version:void 0,isMasterPlaylist:void 0,hasMap:!1,targetDuration:0,compatibleVersion:1,isClosedCaptionsNone:!1,hash:{}},i=function(e,t){var i,n=[],a=s(e.split("\n"));try{for(a.s();!(i=a.n()).done;){var o=i.value,d=r.from(o.trim()).toString();if(d)if(d.startsWith("#")){if(d.startsWith("#EXT")){var u=U(d,t);u&&n.push(u)}}else n.push(d)}}catch(e){a.e(e)}finally{a.f()}return 0!==n.length&&"EXTM3U"===n[0].name||l.INVALIDPLAYLIST("The EXTM3U tag MUST be the first line."),n}(e,t),n=V(i,t);return n.source=e,n}},367:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,s,a,o=[],l=!0,d=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){d=!0,r=e}finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(d)throw r}}return o}}(e,t)||a(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 s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=a(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){l=!0,s=e},f:function(){try{o||null==i.return||i.return()}finally{if(l)throw s}}}}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function l(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(s=function(e){if("object"!==n(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===n(s)?s:String(s)),r)}var s}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(arguments.length<3?e:i):r.value}},d.apply(this,arguments)}function u(e,t){if(t&&("object"===n(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 c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return h(e,arguments,g(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},c(e)}function h(e,t,i){return h=p()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&f(r,i.prototype),r},h.apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;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?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var m=i(771),v=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],y=["#EXT-X-MEDIA"],_=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)}(a,e);var t,i,n,r,s=(t=a,i=p(),function(){var e,n=g(t);if(i){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this)).baseUri=e,t}return n=a,r=[{key:"push",value:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var r=function(){var t=o[s];
2if(!t.startsWith("#"))return d(g(a.prototype),"push",e).call(e,t),"continue";if(v.some((function(e){return t.startsWith(e)})))return d(g(a.prototype),"push",e).call(e,t),"continue";if(e.includes(t)){if(y.some((function(e){return t.startsWith(e)})))return"continue";m.INVALIDPLAYLIST("Redundant item (".concat(t,")"))}d(g(a.prototype),"push",e).call(e,t)},s=0,o=i;s<o.length;s++)r()}}],r&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),a}(c(Array));function b(e,t){var i=1e3;t&&(i=Math.pow(10,t));var n=Math.round(e*i)/i;return t?n.toFixed(t):n}function T(e){var t=['DATA-ID="'.concat(e.id,'"')];return e.language&&t.push('LANGUAGE="'.concat(e.language,'"')),e.value?t.push('VALUE="'.concat(e.value,'"')):e.uri&&t.push('URI="'.concat(e.uri,'"')),"#EXT-X-SESSION-DATA:".concat(t.join(","))}function S(e,t){var i=t?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",n=["METHOD=".concat(e.method)];return e.uri&&n.push('URI="'.concat(e.uri,'"')),e.iv&&(16!==e.iv.length&&m.INVALIDPLAYLIST("IV must be a 128-bit unsigned integer"),n.push("IV=".concat(m.byteSequenceToHex(e.iv)))),e.format&&n.push('KEYFORMAT="'.concat(e.format,'"')),e.formatVersion&&n.push('KEYFORMATVERSIONS="'.concat(e.formatVersion,'"')),"".concat(i,":").concat(n.join(","))}function E(e,t){var i=t.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",n=["BANDWIDTH=".concat(t.bandwidth)];if(t.averageBandwidth&&n.push("AVERAGE-BANDWIDTH=".concat(t.averageBandwidth)),t.isIFrameOnly&&n.push('URI="'.concat(t.uri,'"')),t.codecs&&n.push('CODECS="'.concat(t.codecs,'"')),t.resolution&&n.push("RESOLUTION=".concat(t.resolution.width,"x").concat(t.resolution.height)),t.frameRate&&n.push("FRAME-RATE=".concat(b(t.frameRate,3))),t.hdcpLevel&&n.push("HDCP-LEVEL=".concat(t.hdcpLevel)),t.audio.length>0){n.push('AUDIO="'.concat(t.audio[0].groupId,'"'));var r,a=s(t.audio);try{for(a.s();!(r=a.n()).done;){var o=r.value;e.push(A(o))}}catch(e){a.e(e)}finally{a.f()}}if(t.video.length>0){n.push('VIDEO="'.concat(t.video[0].groupId,'"'));var l,d=s(t.video);try{for(d.s();!(l=d.n()).done;){var u=l.value;e.push(A(u))}}catch(e){d.e(e)}finally{d.f()}}if(t.subtitles.length>0){n.push('SUBTITLES="'.concat(t.subtitles[0].groupId,'"'));var c,h=s(t.subtitles);try{for(h.s();!(c=h.n()).done;){var p=c.value;e.push(A(p))}}catch(e){h.e(e)}finally{h.f()}}if(m.getOptions().allowClosedCaptionsNone&&0===t.closedCaptions.length)n.push("CLOSED-CAPTIONS=NONE");else if(t.closedCaptions.length>0){n.push('CLOSED-CAPTIONS="'.concat(t.closedCaptions[0].groupId,'"'));var f,g=s(t.closedCaptions);try{for(g.s();!(f=g.n()).done;){var v=f.value;e.push(A(v))}}catch(e){g.e(e)}finally{g.f()}}if(t.score&&n.push("SCORE=".concat(t.score)),t.allowedCpc){var y,_=[],T=s(t.allowedCpc);try{for(T.s();!(y=T.n()).done;){var S=y.value,E=S.format,w=S.cpcList;_.push("".concat(E,":").concat(w.join("/")))}}catch(e){T.e(e)}finally{T.f()}n.push('ALLOWED-CPC="'.concat(_.join(","),'"'))}t.videoRange&&n.push("VIDEO-RANGE=".concat(t.videoRange)),t.stableVariantId&&n.push('STABLE-VARIANT-ID="'.concat(t.stableVariantId,'"')),e.push("".concat(i,":").concat(n.join(","))),t.isIFrameOnly||e.push("".concat(t.uri))}function A(e){var t=["TYPE=".concat(e.type),'GROUP-ID="'.concat(e.groupId,'"'),'NAME="'.concat(e.name,'"')];return void 0!==e.isDefault&&t.push("DEFAULT=".concat(e.isDefault?"YES":"NO")),void 0!==e.autoselect&&t.push("AUTOSELECT=".concat(e.autoselect?"YES":"NO")),void 0!==e.forced&&t.push("FORCED=".concat(e.forced?"YES":"NO")),e.language&&t.push('LANGUAGE="'.concat(e.language,'"')),e.assocLanguage&&t.push('ASSOC-LANGUAGE="'.concat(e.assocLanguage,'"')),e.instreamId&&t.push('INSTREAM-ID="'.concat(e.instreamId,'"')),e.characteristics&&t.push('CHARACTERISTICS="'.concat(e.characteristics,'"')),e.channels&&t.push('CHANNELS="'.concat(e.channels,'"')),e.uri&&t.push('URI="'.concat(e.uri,'"')),"#EXT-X-MEDIA:".concat(t.join(","))}function w(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=!1,a="";if(t.discontinuity&&e.push("#EXT-X-DISCONTINUITY"),t.key){var o=S(t.key);o!==i&&(e.push(o),i=o)}if(t.map){var l=function(e){var t=['URI="'.concat(e.uri,'"')];return e.byterange&&t.push('BYTERANGE="'.concat(P(e.byterange),'"')),"#EXT-X-MAP:".concat(t.join(","))}(t.map);l!==n&&(e.push(l),n=l)}if(t.programDateTime&&e.push("#EXT-X-PROGRAM-DATE-TIME:".concat(m.formatDate(t.programDateTime))),t.dateRange&&e.push(function(e){var t=['ID="'.concat(e.id,'"')];e.start&&t.push('START-DATE="'.concat(m.formatDate(e.start),'"')),e.end&&t.pu
2sh('END-DATE="'.concat(e.end,'"')),e.duration&&t.push("DURATION=".concat(e.duration)),e.plannedDuration&&t.push("PLANNED-DURATION=".concat(e.plannedDuration)),e.classId&&t.push('CLASS="'.concat(e.classId,'"')),e.endOnNext&&t.push("END-ON-NEXT=YES");for(var i=0,n=Object.keys(e.attributes);i<n.length;i++){var r=n[i];r.startsWith("X-")?"number"==typeof e.attributes[r]?t.push("".concat(r,"=").concat(e.attributes[r])):t.push("".concat(r,'="').concat(e.attributes[r],'"')):r.startsWith("SCTE35-")&&t.push("".concat(r,"=").concat(m.byteSequenceToHex(e.attributes[r])))}return"#EXT-X-DATERANGE:".concat(t.join(","))}(t.dateRange)),t.markers.length>0&&(a=C(e,t.markers)),t.parts.length>0&&(s=L(e,t.parts)),s)return[i,n];var d=r<3?Math.round(t.duration):b(t.duration,function(e){var t=e.toString(10),i=t.indexOf(".");return-1===i?0:t.length-i-1}(t.duration));return e.push("#EXTINF:".concat(d,",").concat(unescape(encodeURIComponent(t.title||"")))),t.byterange&&e.push("#EXT-X-BYTERANGE:".concat(P(t.byterange))),Array.prototype.push.call(e,"".concat(t.uri)),[i,n,a]}function P(e){var t=e.offset,i=e.length;return"".concat(i,"@").concat(t)}function C(e,t){var i,n="",r=s(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;if("OUT"===a.type)n="OUT",e.push("#EXT-X-CUE-OUT:DURATION=".concat(a.duration));else if("IN"===a.type)n="IN",e.push("#EXT-X-CUE-IN");else if("RAW"===a.type){var o=a.value?":".concat(a.value):"";e.push("#".concat(a.tagName).concat(o))}}}catch(e){r.e(e)}finally{r.f()}return n}function L(e,t){var i,n=!1,r=s(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a.hint){var o=[];if(o.push("TYPE=PART",'URI="'.concat(a.uri,'"')),a.byterange){var l=a.byterange,d=l.offset,u=l.length;o.push("BYTERANGE-START=".concat(d)),u&&o.push("BYTERANGE-LENGTH=".concat(u))}e.push("#EXT-X-PRELOAD-HINT:".concat(o.join(","))),n=!0}else{var c=[];c.push("DURATION=".concat(a.duration),'URI="'.concat(a.uri,'"')),a.byterange&&c.push("BYTERANGE=".concat(P(a.byterange))),a.independent&&c.push("INDEPENDENT=YES"),a.gap&&c.push("GAP=YES"),e.push("#EXT-X-PART:".concat(c.join(",")))}}}catch(e){r.e(e)}finally{r.f()}return n}e.exports=function(e){m.PARAMCHECK(e),m.ASSERT("Not a playlist","playlist"===e.type);var t=new _(e.uri);return t.push("#EXTM3U"),e.version&&t.push("#EXT-X-VERSION:".concat(e.version)),e.independentSegments&&t.push("#EXT-X-INDEPENDENT-SEGMENTS"),e.start&&t.push("#EXT-X-START:TIME-OFFSET=".concat(b(e.start.offset)).concat(e.start.precise?",PRECISE=YES":"")),e.isMasterPlaylist?function(e,t){var i,n=s(t.sessionDataList);try{for(n.s();!(i=n.n()).done;){var r=i.value;e.push(T(r))}}catch(e){n.e(e)}finally{n.f()}var a,o=s(t.sessionKeyList);try{for(o.s();!(a=o.n()).done;){var l=a.value;e.push(S(l,!0))}}catch(e){o.e(e)}finally{o.f()}var d,u=s(t.variants);try{for(u.s();!(d=u.n()).done;)E(e,d.value)}catch(e){u.e(e)}finally{u.f()}}(t,e):function(e,t){var i="",n="",a=!1;if(t.targetDuration&&e.push("#EXT-X-TARGETDURATION:".concat(t.targetDuration)),t.lowLatencyCompatibility){var o=t.lowLatencyCompatibility,l=o.canBlockReload,d=o.canSkipUntil,u=o.holdBack,c=o.partHoldBack,h=[];h.push("CAN-BLOCK-RELOAD=".concat(l?"YES":"NO")),void 0!==d&&h.push("CAN-SKIP-UNTIL=".concat(d)),void 0!==u&&h.push("HOLD-BACK=".concat(u)),void 0!==c&&h.push("PART-HOLD-BACK=".concat(c)),e.push("#EXT-X-SERVER-CONTROL:".concat(h.join(",")))}t.partTargetDuration&&e.push("#EXT-X-PART-INF:PART-TARGET=".concat(t.partTargetDuration)),t.mediaSequenceBase&&e.push("#EXT-X-MEDIA-SEQUENCE:".concat(t.mediaSequenceBase)),t.discontinuitySequenceBase&&e.push("#EXT-X-DISCONTINUITY-SEQUENCE:".concat(t.discontinuitySequenceBase)),t.playlistType&&e.push("#EXT-X-PLAYLIST-TYPE:".concat(t.playlistType)),t.isIFrame&&e.push("#EXT-X-I-FRAMES-ONLY"),t.skip>0&&e.push("#EXT-X-SKIP:SKIPPED-SEGMENTS=".concat(t.skip));var p,f=s(t.segments);try{for(f.s();!(p=f.n()).done;){var g,v=r(w(e,p.value,i,n,t.version),3);i=v[0],n=v[1],"OUT"===(g=v[2])?a=!0:"IN"===g&&a&&(a=!1)}}catch(e){f.e(e)}finally{f.f()}"VOD"===t.playlistType&&a&&e.push("#EXT-X-CUE-IN"),t.prefetchSegments.length>2&&m.INVALIDPLAYLIST("The server must deliver no more than two prefetch segments");var y,_=s(t.prefetchSegments);try{for(_.s();!(y=_.n()).done;){var b=y.value;b.discontinuity&&e.push("#EXT-X-PREFETCH-DISCONTINUITY"),e.push("#EXT-X-PREFETCH:".concat(b.uri))}}catch(e){_.e(e)}finally{_.f()}t.endlist&&e.push("#EXT-X-ENDLIST");var T,S=s(t.renditionReports);try{for(S.s();!(T=S.n()).done;){var E=T.value,A=[];A.push('URI="'.concat(E.uri,'"'),"LAST-MSN=".concat(E.lastMSN)),void 0!==E.lastPart&&A.push("LAST-PART=".concat(E.lastPart)),e.push("#EXT-X-RENDITION-REPORT:".concat(A.join(",")))}}catch(e){S.e(e)}finally{S.f()}}(t,e),t.join("\n")}},890:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}
2function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function a(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 i,n=l(e);if(t){var r=l(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return o(this,i)}}function o(e,t){if(t&&("object"===n(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 l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function d(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(s=function(e){if("object"!==n(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===n(s)?s:String(s)),r)}var s}function u(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=i(771),p=u((function e(t){var i=t.type,n=t.uri,r=t.groupId,s=t.language,a=t.assocLanguage,o=t.name,l=t.isDefault,d=t.autoselect,u=t.forced,p=t.instreamId,f=t.characteristics,g=t.channels;c(this,e),h.PARAMCHECK(i,r,o),h.CONDITIONALASSERT(["SUBTITLES"===i,n],["CLOSED-CAPTIONS"===i,p],["CLOSED-CAPTIONS"===i,!n],[u,"SUBTITLES"===i]),this.type=i,this.uri=n,this.groupId=r,this.language=s,this.assocLanguage=a,this.name=o,this.isDefault=l,this.autoselect=d,this.forced=u,this.instreamId=p,this.characteristics=f,this.channels=g})),f=u((function e(t){var i=t.uri,n=t.isIFrameOnly,r=void 0!==n&&n,s=t.bandwidth,a=t.averageBandwidth,o=t.score,l=t.codecs,d=t.resolution,u=t.frameRate,p=t.hdcpLevel,f=t.allowedCpc,g=t.videoRange,m=t.stableVariantId,v=t.audio,y=void 0===v?[]:v,_=t.video,b=void 0===_?[]:_,T=t.subtitles,S=void 0===T?[]:T,E=t.closedCaptions,A=void 0===E?[]:E,w=t.currentRenditions,P=void 0===w?{audio:0,video:0,subtitles:0,closedCaptions:0}:w;c(this,e),h.PARAMCHECK(i,s),this.uri=i,this.isIFrameOnly=r,this.bandwidth=s,this.averageBandwidth=a,this.score=o,this.codecs=l,this.resolution=d,this.frameRate=u,this.hdcpLevel=p,this.allowedCpc=f,this.videoRange=g,this.stableVariantId=m,this.audio=y,this.video=b,this.subtitles=S,this.closedCaptions=A,this.currentRenditions=P})),g=u((function e(t){var i=t.id,n=t.value,r=t.uri,s=t.language;c(this,e),h.PARAMCHECK(i,n||r),h.ASSERT("SessionData cannot have both value and uri, shoud be either.",!(n&&r)),this.id=i,this.value=n,this.uri=r,this.language=s})),m=u((function e(t){var i=t.method,n=t.uri,r=t.iv,s=t.format,a=t.formatVersion;c(this,e),h.PARAMCHECK(i),h.CONDITIONALPARAMCHECK(["NONE"!==i,n]),h.CONDITIONALASSERT(["NONE"===i,!(n||r||s||a)]),this.method=i,this.uri=n,this.iv=r,this.format=s,this.formatVersion=a})),v=u((function e(t){var i=t.hint,n=void 0!==i&&i,r=t.uri,s=t.mimeType,a=t.byterange;c(this,e),h.PARAMCHECK(r),this.hint=n,this.uri=r,this.mimeType=s,this.byterange=a})),y=u((function e(t){var i=t.id,n=t.classId,r=t.start,s=t.end,a=t.duration,o=t.plannedDuration,l=t.endOnNext,d=t.attributes,u=void 0===d?{}:d;c(this,e),h.PARAMCHECK(i),h.CONDITIONALPARAMCHECK([!0===l,n]),h.CONDITIONALASSERT([s,r],[s,r<=s],[a,a>=0],[o,o>=0]),this.id=i,this.classId=n,this.start=r,this.end=s,this.duration=a,this.plannedDuration=o,this.endOnNext=l,this.attributes=u})),_=u((function e(t){var i=t.type,n=t.duration,r=t.tagName,s=t.value;c(this,e),h.PARAMCHECK(i),h.CONDITIONALPARAMCHECK(["OUT"===i,n]),h.CONDITIONALPARAMCHECK(["RAW"===i,r]),this.type=i,this.duration=n,this.tagName=r,this.value=s})),b=u((function e(t){c(this,e),h.PARAMCHECK(t),this.type=t})),T=function(e){r(i,e);var t=a(i);
2function i(e){var n,r=e.isMasterPlaylist,s=e.uri,a=e.version,o=e.independentSegments,l=void 0!==o&&o,d=e.start,u=e.source;return c(this,i),n=t.call(this,"playlist"),h.PARAMCHECK(r),n.isMasterPlaylist=r,n.uri=s,n.version=a,n.independentSegments=l,n.start=d,n.source=u,n}return u(i)}(b),S=function(e){r(i,e);var t=a(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,i),n.isMasterPlaylist=!0,e=t.call(this,n);var r=n.variants,s=void 0===r?[]:r,a=n.currentVariant,o=n.sessionDataList,l=void 0===o?[]:o,d=n.sessionKeyList,u=void 0===d?[]:d;return e.variants=s,e.currentVariant=a,e.sessionDataList=l,e.sessionKeyList=u,e}return u(i)}(T),E=function(e){r(i,e);var t=a(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,i),n.isMasterPlaylist=!1,e=t.call(this,n);var r=n.targetDuration,s=n.mediaSequenceBase,a=void 0===s?0:s,o=n.discontinuitySequenceBase,l=void 0===o?0:o,d=n.endlist,u=void 0!==d&&d,h=n.playlistType,p=n.isIFrame,f=n.segments,g=void 0===f?[]:f,m=n.prefetchSegments,v=void 0===m?[]:m,y=n.lowLatencyCompatibility,_=n.partTargetDuration,b=n.renditionReports,T=void 0===b?[]:b,S=n.skip,E=void 0===S?0:S,A=n.hash;return e.targetDuration=r,e.mediaSequenceBase=a,e.discontinuitySequenceBase=l,e.endlist=u,e.playlistType=h,e.isIFrame=p,e.segments=g,e.prefetchSegments=v,e.lowLatencyCompatibility=y,e.partTargetDuration=_,e.renditionReports=T,e.skip=E,e.hash=A,e}return u(i)}(T),A=function(e){r(i,e);var t=a(i);function i(e){var n,r=e.uri,s=e.mimeType,a=e.data,o=e.duration,l=e.title,d=e.byterange,u=e.discontinuity,h=e.mediaSequenceNumber,p=void 0===h?0:h,f=e.discontinuitySequence,g=void 0===f?0:f,m=e.key,v=e.map,y=e.programDateTime,_=e.dateRange,b=e.markers,T=void 0===b?[]:b,S=e.parts,E=void 0===S?[]:S;return c(this,i),(n=t.call(this,"segment")).uri=r,n.mimeType=s,n.data=a,n.duration=o,n.title=l,n.byterange=d,n.discontinuity=u,n.mediaSequenceNumber=p,n.discontinuitySequence=g,n.key=m,n.map=v,n.programDateTime=y,n.dateRange=_,n.markers=T,n.parts=E,n}return u(i)}(b),w=function(e){r(i,e);var t=a(i);function i(e){var n,r=e.hint,s=void 0!==r&&r,a=e.uri,o=e.duration,l=e.independent,d=e.byterange,u=e.gap;return c(this,i),n=t.call(this,"part"),h.PARAMCHECK(a),n.hint=s,n.uri=a,n.duration=o,n.independent=l,n.duration=o,n.byterange=d,n.gap=u,n}return u(i)}(b),P=function(e){r(i,e);var t=a(i);function i(e){var n,r=e.uri,s=e.discontinuity,a=e.mediaSequenceNumber,o=void 0===a?0:a,l=e.discontinuitySequence,d=void 0===l?0:l,u=e.key;return c(this,i),n=t.call(this,"prefetch"),h.PARAMCHECK(r),n.uri=r,n.discontinuity=s,n.mediaSequenceNumber=o,n.discontinuitySequence=d,n.key=u,n}return u(i)}(b),C=u((function e(t){var i=t.uri,n=t.lastMSN,r=t.lastPart;c(this,e),h.PARAMCHECK(i),this.uri=i,this.lastMSN=n,this.lastPart=r}));e.exports={Rendition:p,Variant:f,SessionData:g,Key:m,MediaInitializationSection:v,DateRange:y,SpliceInfo:_,Playlist:T,MasterPlaylist:S,MediaPlaylist:E,Segment:A,PartialSegment:w,PrefetchSegment:P,RenditionReport:C}},771:e=>{function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,s,a,o=[],l=!0,d=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){d=!0,r=e}finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(d)throw r}}return o}}(e,t)||n(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 i(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(l)throw a}}}}function n(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var a={};function o(e){if(a.strictMode)throw e;a.silent||console.error(e.message)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if("number"==typeof e)return e;var i=10===t?Number.parseFloat(e,t):Number.parseInt(e,t);return Number.isNaN(i)?0:i}e.exports={THROW:o,ASSERT:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];var a,l=i(r.entries());try{for(l.s();!(a=l.n()).done;){var d=t(a.value,2),u=d[0];d[1]||o(new Error("".concat(e," : Failed at [").concat(u,"]")))}}catch(e){l.e(e)}finally{l.f()}},CONDITIONALASSERT:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s,a=i(n.entries());try{for(a.s();!(s=a.n()).done;
2){var l=t(s.value,2),d=l[0],u=t(l[1],2),c=u[0],h=u[1];c&&(h||o(new Error("Conditional Assert : Failed at [".concat(d,"]"))))}}catch(e){a.e(e)}finally{a.f()}},PARAMCHECK:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s,a=i(n.entries());try{for(a.s();!(s=a.n()).done;){var l=t(s.value,2),d=l[0];void 0===l[1]&&o(new Error("Param Check : Failed at [".concat(d,"]")))}}catch(e){a.e(e)}finally{a.f()}},CONDITIONALPARAMCHECK:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s,a=i(n.entries());try{for(a.s();!(s=a.n()).done;){var l=t(s.value,2),d=l[0],u=t(l[1],2),c=u[0],h=u[1];c&&void 0===h&&o(new Error("Conditional Param Check : Failed at [".concat(d,"]")))}}catch(e){a.e(e)}finally{a.f()}},INVALIDPLAYLIST:function(e){o(new Error("Invalid Playlist : ".concat(e)))},toNumber:l,hexToByteSequence:function(e){(e.startsWith("0x")||e.startsWith("0X"))&&(e=e.slice(2));for(var t=[],i=0;i<e.length;i+=2)t.push(l(e.slice(i,i+2),16));return r.from(t)},byteSequenceToHex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;i<=t&&o(new Error("end must be larger than start : start=".concat(t,", end=").concat(i)));for(var n=[],r=t;r<i;r++)n.push("0".concat((255&e[r]).toString(16).toUpperCase()).slice(-2));return"0x".concat(n.join(""))},tryCatch:function(e,t){try{return e()}catch(e){return t(e)}},splitAt:function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=-1,r=0,s=0;r<e.length;r++)if(e[r]===t){if(s++===i)return[e.slice(0,r),e.slice(r+1)];n=r}return-1!==n?[e.slice(0,n),e.slice(n+1)]:[e]},trim:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e?(e=e.trim()," "===t||(e.startsWith(t)&&(e=e.slice(1)),e.endsWith(t)&&(e=e.slice(0,-1))),e):e},splitByCommaWithPreservingQuotes:function(e){for(var t=[],i=!0,n=0,r=[],s=0;s<e.length;s++){var a=e[s];i&&","===a?(t.push(e.slice(n,s).trim()),n=s+1):'"'!==a&&"'"!==a||(i?(r.push(a),i=!1):a===r[r.length-1]?(r.pop(),i=!0):r.push(a))}return t.push(e.slice(n).trim()),t},camelify:function(e){var t,n=[],r=!1,s=i(e);try{for(s.s();!(t=s.n()).done;){var a=t.value;"-"!==a&&"_"!==a?r?(n.push(a.toUpperCase()),r=!1):n.push(a.toLowerCase()):r=!0}}catch(e){s.e(e)}finally{s.f()}return n.join("")},formatDate:function(e){var t=e.getUTCFullYear(),i=("0"+(e.getUTCMonth()+1)).slice(-2),n=("0"+e.getUTCDate()).slice(-2),r=("0"+e.getUTCHours()).slice(-2),s=("0"+e.getUTCMinutes()).slice(-2),a=("0"+e.getUTCSeconds()).slice(-2),o=("00"+e.getUTCMilliseconds()).slice(-3);return"".concat(t,"-").concat(i,"-").concat(n,"T").concat(r,":").concat(s,":").concat(a,".").concat(o,"Z")},hasOwnProp:function(e,t){return Object.hasOwnProperty.call(e,t)},setOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a=Object.assign(a,e)},getOptions:function(){return Object.assign({},a)}}}},t={},function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}(851);var e,t},e.exports=n()},8932:e=>{e.exports={NO_RESPONSE:"NO_RESPONSE",EMPTY:"EMPTY_RESPONSE",WRONG:"WRONG_RESPONSE"}},9065:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>_});var n=i(108),r=i(1577),s=i(2784),a=i(7276),o=i(9907);class l{constructor(e,t,i,n,r){var s;this.response={},this._session="",this.sessionExpire=120,this.retries=0,this.isUsingLegacy=!1,this.options=e,this.npawPluginOptions=r,this.accountCode=t,this.coreStorage=i,this.browserStorage=n,this._fastDataHost=this.options.getFastDataHost();const a="true"===o.env.IS_STANDALONE;this.isUsingLegacy=a&&void 0!==(null===(s=null==r?void 0:r.legacyPlugin)||void 0===s?void 0:s.viewTransform),this._createConfigurationInterval()}init(){var e,t;if(this.options&&this.options.offline)return this.response.host="OFFLINE",this.response.code="OFFLINE",this.response.pingTime=60,this.response.beatTime=60,void(this._session=r.default.generateRandomString(15));if(this.isUsingLegacy)return;if(this.browserStorage&&this.browserStorage.isEnabled()&&(new Date).getTime()<1e3*(null!==(e=Number(this.browserStorage.getLocal("sessionExpire")))&&void 0!==e?e:this.sessionExpire)+(Number(this.coreStorage.getDataTime())||0)&&this.coreStorage.getStoredData())return void this.setData(null!==(t=this.coreStorage.getStoredData())&&void 0!==t?t:"");this.coreStorage.removeLocal("firstRequestTime"),this.coreStorage.removeLocal("lastRequestTime");const i=n.A.Service.DATA,o={system:this.accountCode,pluginVersion:_.getPluginVersion(),requestNumber:this.getRequestNumber()};this.loadConfiguration();try{a.default.notice(s.CoreTag,i+" "+o.system),"nicetest"===o.system&&a.default.error(s.CoreTag,"No accountCode has been set. Please set your accountCode inside plugin's options."),this.performRequestToFastData(i,o,this._receiveData.bind(this),this._failedData.bind(this))}catch(e){a.default.error(s.CoreTag,"Error doing get data request to FastData service.")}}updateOptions(e){this.options.updateOptions(e),this.options.offline&&(this.reset(),this.init())}getSessionExpireTime(){return this.sessionExpire}refreshSessionToken(){this._session="",this.browserStorage.removeStorages("data"),this.init()}loadConfiguration(){const e=n.A.Service.CONFIGURATION,t={system:this.accountCode,pluginVersion:_.getPluginVersion(),requestNumber:this.getRequestNumber()};this.performRequestToFastData(e,t,this._receiveConfiguration.bind(this),this._failedConfiguration.bind(this))}getSession(){var e,t;return this.isUsingLegacy?null===(t=null===(e=this.npawPluginOptions)||void 0===e?void 0:e.legacyPlugin)||void 0===t?void 0:t.viewTransform._session:this._session}setSession(e){this._session=e}setHost(e){this.response.host=e}getPingTime(){var e;return null!==(e=this.pingTime)&&void 0!==e?e:5}getBeatTime(){var e;return null!==(e=this.beatTime)&&void 0!==e?e:30}setData(e){try{const t=this.pingTime;let i=JSON.parse(e);this.options["parse.fdsResponseHost"]&&(e=e.replace(i.q.h,this.options["parse.fdsResponseHost"](i.q.h)),i=JSON.parse(e)),this.response={msg:e,host:i.q.h,co
2de:i.q.c,pingTime:i.q.pt||5,beatTime:i.q.i&&i.q.i.bt||30,sessionExpire:i.q.st&&i.q.st||120},this._session=this.response.code,this.browserStorage.setLocal("sessionExpire",this.response.sessionExpire),this.browserStorage.setStorages("accCode",this.accountCode),this.browserStorage.setStorages("session",this.response.code),this.coreStorage.setStoredData(this.response.msg),this.coreStorage.setDataTime((new Date).getTime().toString()),this.pingTime=this.response.pingTime,this.beatTime=this.response.beatTime,this.sessionExpire=this.response.sessionExpire,"number"==typeof this.pingTime&&this.pingTime>0&&this.pingTime!==t&&_.getInstance().throwEvent(s.CoreEvents.FAST_DATA_READY)}catch(e){a.default.error(s.CoreTag,"Fastdata response is invalid.")}}setConfiguration(e){try{this.response.configurationOptions=JSON.parse(e)}catch(e){a.default.error(s.CoreTag,"Configuration response is invalid.")}}getFastDataResponse(){return this.response}getAccountCode(){return this.accountCode}getRequestNumber(){return Math.random()}reset(){this.coreStorage.removeStoredData(),this.coreStorage.removeSession(),this.browserStorage.removeLocal("sessionExpire"),this.browserStorage.removeStorages("accCode"),this.browserStorage.removeStorages("session")}performRequestToFastData(e,t,i,n){if(this.options.offline)return;t.timemark=(new Date).getTime(),t.outputFormat="json";const s=this,a=new XMLHttpRequest;a.open("GET",`https://${this._fastDataHost}${e}${r.default.toQueryString(t)}`),a.onload=function(e){s.options.offline||(a.status>=200&&a.status<400?i(this,e):n(this,e))},a.onerror=function(e){n(this,e)},a.send()}_createConfigurationInterval(){this.isUsingLegacy||!this.options.isRefreshLMAConfigurationEnabled()||this._refreshInterval||(this._refreshInterval=setInterval(this.loadConfiguration.bind(this),1e3*this.options.refreshLMAConfigurationSeconds()))}_receiveData(e,t){this.retries=0,this.setData(e.response)}_receiveConfiguration(e,t){this.setConfiguration(e.response)}_failedData(e,t){a.default.error(s.CoreTag,"Fastdata request has failed."),++this.retries<5?setTimeout(this.init.bind(this),5e3):setTimeout(this.init.bind(this),6e4)}_failedConfiguration(e,t){a.default.error(s.CoreTag,"Configuration request has failed.")}}var d=i(2602);class u{constructor(){this.offline=!1,this.host="lma.npaw.com",this.disableCookies=!0,this.forceCookies=!1,this.disableStorage=!1,this.authToken=void 0,this.authType="Bearer",this["app.https"]=!0,this["lma.refresh.configuration.enabled"]=!1,this["lma.refresh.configuration.seconds"]=300,this["parse.fdsResponseHost"]=null}updateOptions(e){const t=new d.A;Object.keys(this).forEach((i=>{null==e[i]||Object.keys(t).includes(i)||(this[i]=e[i])}))}setNpawPluginOptions(e){Object.keys(this).forEach((t=>{null!=e[t]&&(this[t]=e[t])}))}isRefreshLMAConfigurationEnabled(){return this["lma.refresh.configuration.enabled"]}refreshLMAConfigurationSeconds(){return this["lma.refresh.configuration.seconds"]}getHost(){return this.host}getFastDataHost(){return this.host}}class c{constructor(e,t,i,n,r,a,o,l){this.method=s.Method.GET,this.headers={},this.xhr=new XMLHttpRequest,this.retries=0,this.hadBody=!1,this.isHttps=e,this.host=t,this.service=i,this.method=n,this.params=r,this.expirationManager=l,this.onSuccessCallback=a,this.onFailCallback=o}performHttps(){return this.isHttps}getHost(){return this.host}getService(){return this.service}getMethod(){return this.method}getParams(){return this.params}getBody(){return this.body}setBody(e){this.body=e}addHeader(e,t){this.headers[e]=t}getExpirationManager(){return this.expirationManager}getRetries(){return this.retries}send(e,t){if(this.params.timemark=Date.now(),this.params.sessionRoot=_.getInstance().getFastDataSessionToken(),this.params.system=_.getInstance().getFastDataService().getAccountCode(),this.body&&(this.hadBody=!0),this.method===s.Method.POST&&!this.body){const e={};e.timemark=this.params.timemark,this.params.code&&(e.code=this.params.code),e.sessionRoot=this.params.sessionRoot,e.system=this.params.system,e.sessionId=this.params.sessionId&&""!=this.params.sessionId?this.params.sessionId:_.getInstance().getFastDataSessionToken(),this.body=JSON.stringify(this.params),this.params=e}try{this.getUrl()}catch(e){}this.xhr.open(this.method,this.getUrl()),this.xhr.onreadystatechange=()=>{4===this.xhr.readyState&&this.xhr.status>=200&&this.xhr.status<400?(t&&t(),this.expirationManager&&this.expirationManager.onRequestSent(),this.onSuccessCallback&&this.onSuccessCallback()):4===this.xhr.readyState&&(this.retries++,!this.hadBody&&this.method===s.Method.POST&&this.body&&(this.params=JSON.parse(this.body),this.body=void 0),e(),this.onFailCallback&&this.onFailCallback())};for(const e in this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.xhr.send(this.body)}asyncSend(){return e=this,i=function*(){return new Promise(((e,t)=>{this.send(t,e)}))},new((t=void 0)||(t=Promise))((function(n,r){function s(e){try{o(i.next(e))}catch(e){r(e)}}function a(e){try{o(i.throw(e))}catch(e){r(e)}}function o(e){var i;e.done?n(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(s,a)}o((i=i.apply(e,[])).next())}));var e,t,i}toLocalStorageString(){const e={},t=this.service.split("/");e.request=t[t.length-1],e.unixtime=this.params.timemark;for(const t in this.params)void 0!==this.params[t]&&("sessionId"===t||"sessionRoot"===t?e[t]="":"code"===t?e[t]="CODE_PLACEHOLDER":"object"==typeof this.params[t]?e[t]=JSON.stringify(this.params[t]):e[t]=this.params[t]);return JSON.stringify(e)}getUrl(){return`${this.isHttps?"https":"http"}://${this.host}${this.service}${r.default.toQueryString(this.params)}`}}var h=i(5438);const p=[n.A.Service.START,n.A.Service.INIT,n.A.Service.JOIN,n.A.Service.STOP,n.A.Service.ERROR,n.A.Service.AD_ERROR];class f{constructor(e,t,i){this.freshRequests=[],this.retryRequests=[],this.retryInterval=null,this.retryAttemptCount=0,this.baseRetryDelay=5e3,this.maxRetryAttempts=25,this.fixedRetryAttempts=10,this.databaseSendingInterval=12e4,this.isDestroyed=!1,this.servicesToWait=[n.A.Service.INIT,n.A.Service.START],this.sentStart=!1,this.options=e,this.coreStorage=t,this.fastDataService=i}destroy(){this.freshRequests=[],this.retryRequests=[],this.isDestroyed=!0,this._clearRetryInterval(),a.default.warn(s.CoreTag,"NQSAnalyticsService destroyed"),this.timeWhenLastSentFromDatabase=(new Date).getTime()}send(e,t,i,n,r,o){var l;if(this.isDestroyed)return;const d=new c(null===(l=this.options["app.https"])||void 0===l||l,this.coreStorage.getHost(),e,t,null!=i?i:{},n,r,o);void 0!==this.options.authToken&&void 0!==this.options.authType&&e!==h.xC.CDN&&(a.default.verbose(s.AnalyticsTag,"Adding Authorization header with type "+this.options.authType),d.addHeader("Authorization",this.options.authType+" "+this.options.authToken)),this.freshRequests.push(d),this._processRequests()}getTimeOfLastSentRequest(){return this.timeOfLastSentRequest}wasStartSent(){return this.sentStart}_scheduleRetryProcessing(){if(this.retryInterval||0===this.retryRequests.length||this.isDestroyed)return;if(this.retryAttemptCount>=this.maxRetryAttempts)return a.default.warn(s.CoreTag,`Max retry attempts (${this.maxRetryAttempts}) reached before scheduling`),void this._flushRetryQueue();const e=this._calculateRetryDelay();this.retryInterval=setTimeout((()=>
2{if(this.retryInterval=null,this.isDestroyed)this._clearRetryInterval();else{if(this.retryAttemptCount++,this.retryAttemptCount>=this.maxRetryAttempts)return a.default.warn(s.CoreTag,`Max retry attempts (${this.maxRetryAttempts}) reached`),void this._flushRetryQueue();this._processRequests().catch((e=>{a.default.warn(s.CoreTag,"Retry processing failed",e)}))}}),e),a.default.verbose(s.CoreTag,`Retry scheduled (attempt ${this.retryAttemptCount+1}/${this.maxRetryAttempts}, delay ${e}ms) with ${this.retryRequests.length} pending requests`)}_clearRetryInterval(){this.retryInterval&&(clearTimeout(this.retryInterval),this.retryInterval=null,this.retryAttemptCount=0,a.default.verbose(s.CoreTag,"Retry interval cleared"))}_calculateRetryDelay(){if(this.retryAttemptCount<this.fixedRetryAttempts)return this.baseRetryDelay;const e=this.retryAttemptCount-this.fixedRetryAttempts,t=this.baseRetryDelay*Math.pow(2,e);return Math.min(t,12e4)}_flushRetryQueue(){0!==this.retryRequests.length&&(a.default.warn(s.CoreTag,`Max retry attempts (${this.maxRetryAttempts}) reached. Flushing ${this.retryRequests.length} failed requests:`,...this.retryRequests.map((e=>e.getService()))),this.retryRequests.forEach((e=>{var t,i;try{null===(i=(t=e).onFailCallback)||void 0===i||i.call(t)}catch(e){a.default.verbose(s.CoreTag,"Error calling fail callback:",e)}})),this.retryRequests=[],this.retryInterval&&(clearTimeout(this.retryInterval),this.retryInterval=null),this.retryAttemptCount=0,a.default.verbose(s.CoreTag,"Retry queue flushed and state reset"))}_processRequests(){return e=this,i=function*(){if(this.isDestroyed)return;const e=this.retryRequests.splice(0,this.retryRequests.length),t=this.freshRequests.splice(0,this.freshRequests.length);e.length>0&&a.default.verbose(s.CoreTag,"Retrying to send these requests:",...e.map((e=>e.getService())));const i=[];let n=!1;for(const t of e)if(n)i.push(t);else try{yield t.asyncSend(),this.timeOfLastSentRequest=(new Date).getTime(),this.coreStorage.setDataTime(this.timeOfLastSentRequest.toString())}catch(e){n=!0,i.push(t)}for(const e of t)try{yield e.asyncSend(),this.servicesToWait.includes(e.getService())&&(this.sentStart=!0),this.timeOfLastSentRequest=(new Date).getTime(),this.coreStorage.setDataTime(this.timeOfLastSentRequest.toString())}catch(t){p.includes(e.getService())&&i.push(e)}this.retryRequests.push(...i.slice(-25)),this.retryRequests.length>0?this._scheduleRetryProcessing():this._clearRetryInterval(),this.retryRequests.length&&this.retryRequests.sort(((e,t)=>{var i,n,r,s;return(null!==(n=null===(i=e.getParams())||void 0===i?void 0:i.timemark)&&void 0!==n?n:0)-(null!==(s=null===(r=t.getParams())||void 0===r?void 0:r.timemark)&&void 0!==s?s:0)}))},new((t=void 0)||(t=Promise))((function(n,r){function s(e){try{o(i.next(e))}catch(e){r(e)}}function a(e){try{o(i.throw(e))}catch(e){r(e)}}function o(e){var i;e.done?n(e.value):(i=e.value,i instanceof t?i:new t((function(e){e(i)}))).then(s,a)}o((i=i.apply(e,[])).next())}));var e,t,i}}class g{constructor(e,t,i){this.prefix="npaw",this.disableCookies=e,this.forceCookies=t,this.disabled=i}updateStorageOptions(e,t,i){this.disableCookies=e,this.forceCookies=t,this.disabled=i}isEnabled(){if(this.disabled)return!1;let e=!0;if(!this.forceCookies)try{localStorage.setItem(this.prefix+".test","true"),localStorage.removeItem(this.prefix+".test")}catch(t){e=!1}return e}setLocal(e,t){if(!this.disabled)try{!this.forceCookies&&("undefined"!=typeof localStorage&&localStorage||this.disableCookies)?"undefined"!=typeof localStorage&&localStorage&&localStorage.setItem(this.prefix+"."+e,t):this._setCookie(this.prefix+".local."+e,t)}catch(e){a.default.debug(s.CoreTag,"App Analytics needs localStorage or cookies, not supported by your browser.")}}getLocal(e){if(!this.disabled)return this._localGetRemove("getItem","_getCookie",e)}removeLocal(e){if(!this.disabled)return this._localGetRemove("removeItem","_removeCookie",e)}_localGetRemove(e,t,i){try{if(this.forceCookies||!("undefined"!=typeof localStorage&&localStorage||this.disableCookies))return this[t](this.prefix+".local."+i);if("undefined"!=typeof localStorage&&localStorage)return localStorage[e](this.prefix+"."+i)}
2catch(e){a.default.debug(s.CoreTag,"App Analytics needs localStorage or cookies, not supported by your browser.")}}setSession(e,t){if(!this.disabled)try{!this.forceCookies&&("undefined"!=typeof sessionStorage&&sessionStorage||this.disableCookies)?"undefined"!=typeof sessionStorage&&sessionStorage&&sessionStorage.setItem(this.prefix+"."+e,t):this._setCookie(this.prefix+".session."+e,t)}catch(e){a.default.debug(s.CoreTag,"App Analytics needs sessionStorage or cookies, not supported by your browser.")}}getSession(e){if(!this.disabled)return this._sessionGetRemove("getItem","_getCookie",e)}removeSession(e){if(!this.disabled)return this._sessionGetRemove("removeItem","_removeCookie",e)}_sessionGetRemove(e,t,i){try{if(this.forceCookies||!("undefined"!=typeof sessionStorage&&sessionStorage||this.disableCookies))return this[t](this.prefix+".session."+i);if("undefined"!=typeof sessionStorage&&sessionStorage)return sessionStorage[e](this.prefix+"."+i)}catch(e){a.default.debug(s.CoreTag,"App Analytics needs sessionStorage or cookies, not supported by your browser.")}}getStorages(e){if(!this.disabled)return this.getSession(e)||this.getLocal(e)}setStorages(e,t){this.disabled||(this.setSession(e,t),this.setLocal(e,t))}removeStorages(e){this.disabled||(this.removeSession(e),this.removeLocal(e))}_setCookie(e,t){if("undefined"!=typeof document){let i=";";"undefined"!=typeof location&&(i+="domain="+location.host.split(".").reverse().splice(0,2).reverse().join(".")+";path=/;"),document.cookie=e+"="+t+i}}_getCookie(e){if("undefined"!=typeof document){let t=e+"=",i=decodeURIComponent(document.cookie).split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}}return null}_removeCookie(e){this._setCookie(e,"")}}class m{constructor(e,t){this.options=e,this.browserStorage=t}isEnabled(){return this.browserStorage.isEnabled()}setLocal(e,t){this.browserStorage.setLocal(e,t)}getLocal(e){return this.browserStorage.getLocal(e)}removeLocal(e){this.browserStorage.removeLocal(e)}getHost(){let e=this.options.getHost();const t=_.getInstance().getFastDataService();return!_.getInstance().isUsingLegacy()&&t&&t.getFastDataResponse()&&t.getFastDataResponse().host?e=t.getFastDataResponse().host:_.getInstance().isUsingLegacy()&&_.getInstance().getLegacyFastDataHost()&&(e=_.getInstance().getLegacyFastDataHost()),e}getSession(){let e=this.browserStorage.getStorages("session");if("undefined"===e&&(e=void 0),!e){const t=this.getStoredData();if(t)try{e=JSON.parse(t).q.c}catch(e){}}return e}getStorageHost(){let e=null;const t=this.getStoredData();if(t)try{e=JSON.parse(t).q.h}catch(e){}return e}getLocalAccountCode(){return this.browserStorage.getLocal("accCode")}getSessionAccountCode(){return this.browserStorage.getSession("accCode")}getAppAnalyticsRegisteredProperties(){return this.browserStorage.getLocal("appAnalyticsRegisteredProperties")}setAppAnalyticsRegisteredProperties(e){this.browserStorage.setLocal("appAnalyticsRegisteredProperties",e)}removeAppAnalyticsRegisteredProperties(){this.browserStorage.removeLocal("appAnalyticsRegisteredProperties")}getDataTime(){return this.browserStorage.getStorages("dataTime")}setDataTime(e){this.browserStorage.setStorages("dataTime",e)}getLastActive(){let e;return e=void 0===this.browserStorage.getLocal("lastactive")?0:Number(this.browserStorage.getLocal("lastactive")),e}setLastActive(e){this.browserStorage.setLocal("lastactive",e)}removeLastActive(){this.browserStorage.removeLocal("lastactive")}setSession(e){this.browserStorage.setStorages("session",e)}removeSession(){this.browserStorage.removeStorages("session")}getSessionExpire(){return 1e3*Number(this.browserStorage.getLocal("sessionExpire"))}getStoredData(){return this.browserStorage.getStorages("data")}setStoredData(e){this.browserStorage.setStorages("data",e)}removeStoredData(){this.browserStorage.removeStorages("data")}getStorages(e){return t=this,n=function*(){return this.browserStorage.getStorages(e)},new((i=void 0)||(i=Promise))((function(e,r){function s(e){try{o(n.next(e))}catch(e){r(e)}}function a(e){try{o(n.throw(e))}catch(e){r(e)}}function o(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,a)}o((n=n.apply(t,[])).next())}));var t,i,n}}var v=i(61),y=i(9907);class _{static getInstance(e,t,i){return this._instance&&!i||(this._instance=new _(e||"",t)),this._instance}constructor(e,t){var i,n;if(this.options=new u,this.sendingOffline=!1,this.isDestroyed=!1,this.usingLegacy=!1,this.commonVariables=new Map,this.registeredPeriodicPushes=new Map,this.coreEventListeners=[],this.pluginOptions=t,this.pluginOptions){this.pluginOptions.host&&this.options.setNpawPluginOptions({host:this.pluginOptions.host});const e="true"===y.env.IS_STANDALONE;this.usingLegacy=e&&void 0!==(null===(n=null===(i=this.pluginOptions)||void 0===i?void 0:i.legacyPlugin)||void 0===n?void 0:n.viewTransform)}this.browserStorage=new g(this.options.disableCookies,this.options.forceCookies,this.options.disableStorage),this.coreStorage=new m(this.options,this.browserStorage),this.fastDataService=new l(this.options,e,this.coreStorage,this.browserStorage,this.pluginOptions),this.fastDataService.init(),this.nqsService=new f(this.options,this.coreStorage,this.fastDataService),this.deleteOldOfflineEntries()}
2destroy(){this.unregisterAllPeriodicPushes(),this.commonVariables.clear(),this.nqsService.destroy(),this.isDestroyed=!0}static getPluginVersion(){const e=y.env.NWF||"";return`7.3.19${"true"===y.env.IS_STANDALONE?"-balancer":""}${e}-js-sdk`}isUsingLegacy(){return this.usingLegacy}wasStartSent(){var e,t,i,n,r,s;return this.isUsingLegacy()?(null===(t=null===(e=this.pluginOptions)||void 0===e?void 0:e.legacyPlugin)||void 0===t?void 0:t._comm)&&(null===(n=null===(i=this.pluginOptions)||void 0===i?void 0:i.legacyPlugin)||void 0===n?void 0:n._comm.transforms)?!(null===(s=null===(r=this.pluginOptions)||void 0===r?void 0:r.legacyPlugin)||void 0===s?void 0:s._comm.transforms[0]._isBusy):void 0:this.nqsService.wasStartSent()}setLegacyPlugin(e){var t,i;if(this.pluginOptions){this.pluginOptions.legacyPlugin=e;const n="true"===y.env.IS_STANDALONE;this.usingLegacy=n&&void 0!==(null===(i=null===(t=this.pluginOptions)||void 0===t?void 0:t.legacyPlugin)||void 0===i?void 0:i.viewTransform)}}setActiveSwitchingOnLegacy(e){e&&this.pluginOptions&&this.pluginOptions.legacyPlugin&&this.pluginOptions.legacyPlugin.options&&(this.pluginOptions.legacyPlugin.options["content.cdn"]="ACTVSWIT")}getViewCode(){var e;return null===(e=this.pluginOptions)||void 0===e?void 0:e.legacyPlugin.viewTransform.getViewCode()}getLegacyFastDataHost(){var e,t,i,n;const r=null===(n=null===(i=null===(t=null===(e=this.pluginOptions)||void 0===e?void 0:e.legacyPlugin)||void 0===t?void 0:t.viewTransform)||void 0===i?void 0:i.response)||void 0===n?void 0:n.host;return"string"!=typeof r?r:r.replace(/^https?:\/\//i,"")}setOptions(e){this.options.updateOptions(e),this.browserStorage.updateStorageOptions(this.options.disableCookies,this.options.forceCookies,this.options.disableStorage),this.fastDataService.updateOptions(e)}getOptions(){return this.options}getCoreStorage(){return this.coreStorage}registerCommonVariable(e,t,i){var n,r;this.commonVariables.has(e)?null===(n=this.commonVariables.get(e))||void 0===n||n.set(t,i):(this.commonVariables.set(e,new Map),null===(r=this.commonVariables.get(e))||void 0===r||r.set(t,i))}unregisterCommonVariable(e,t){var i;null===(i=this.commonVariables.get(e))||void 0===i||i.delete(t)}getCommonVariable(e,t){var i;return null===(i=this.commonVariables.get(e))||void 0===i?void 0:i.get(t)}getFastDataService(){return this.fastDataService}getFastDataSessionToken(){return this.fastDataService.getSession()}getFastDataSessionHost(){return this.coreStorage.getHost()}refreshSessionToken(){return this.usingLegacy?void 0:this.fastDataService.refreshSessionToken()}isSessionTokenExpired(){var e;const t=(new Date).getTime();return!this.usingLegacy&&t-(null!==(e=this.nqsService.getTimeOfLastSentRequest())&&void 0!==e?e:t)>1e3*this.fastDataService.getSessionExpireTime()}pushData(e,t,i,n,r,s){this.handleDataToSend(e,t,i,n,r,s)}pushPeriodicDataFromCallback(e,t,i,n,r,s,a,o,l){const d=setInterval((()=>{const t=s();t&&this.handleDataToSend(e,i,r,t,a,o,l)}),n<1e3?1e3:n);this.registeredPeriodicPushes.has(t)?(clearInterval(this.registeredPeriodicPushes.get(t)),this.registeredPeriodicPushes.set(t,d)):this.registeredPeriodicPushes.set(t,d)}unregisterPeriodicPush(e){clearInterval(this.registeredPeriodicPushes.get(e)),this.registeredPeriodicPushes.delete(e)}unregisterAllPeriodicPushes(){if(0===this.registeredPeriodicPushes.size)return;a.default.debug(s.CoreTag,`Unregistering ${this.registeredPeriodicPushes.size} periodic pushes`);const e=Array.from(this.registeredPeriodicPushes.keys());for(const t of e)clearInterval(this.registeredPeriodicPushes.get(t)),this.registeredPeriodicPushes.delete(t);a.default.debug(s.CoreTag,"Finished unregistering all pushes")}deleteOldOfflineEntries(){var e,t,i,n;const r=null!==(t=null===(e=this.coreStorage.getLocal("offlineViews"))||void 0===e?void 0:e.split(","))&&void 0!==t?t:[];for(const e of r){const t=null!==(n=null===(i=this.coreStorage.getLocal("offlineViews."+e))||void 0===i?void 0:i.split(","))&&void 0!==n?n:[],r=2592e6;t.length>0&&Date.now()-JSON.parse("["+t+"]")[0].timemark>r&&this.deleteViewDataFromLocalStorage(e)}}sendOfflineEvents(){var e,t,i,r,o;return i=this,o=function*(){if(this.options.offline)return void a.default.notice(s.AnalyticsTag,"Unable to send offline events because offline option is enabled");if(this.sendingOffline)return;this.sendingOffline=!0;let i=15,r=!1;for(;!r&&i-- >0;)""===this.getFastDataSessionToken()?yield new Promise((e=>setTimeout(e,100))):r=!0;if(i<1)return;const o=(null!==(t=null===(e=this.coreStorage.getLocal("offlineViews"))||void 0===e?void 0:e.split(","))&&void 0!==t?t:[]).map((e=>new Promise(((t,i)=>{var r;let a=null!==(r=this.coreStorage.getLocal("offlineViews."+e))&&void 0!==r?r:"";if(a=a.replace(/CODE_PLACEHOLDER/g,_.getInstance().getFastDataSessionToken()+"_"+e.split("_")[1]),a.length>0){const i=new c(!0,this.coreStorage.getHost(),n.A.Service.OFFLINE_EVENTS,s.Method.POST,{code:_.getInstance().getFastDataSessionToken()+"_"+e.split("_")[1]},(()=>{this.deleteViewDataFromLocalStorage(e),t()}),(()=>t()));i.setBody("["+a+"]"),i.send((function(){}))}}))));yield Promise.all(o).finally((()=>{this.sendingOffline=!1}))},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{a(o.next(e))}catch(e){t(e)}}function s(e){try{a(o.throw(e))}catch(e){t(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,s)}a((o=o.apply(i,[])).next())}))}deleteViewDataFromLocalStorage(e){var t,i;this.coreStorage.removeLocal("offlineViews."+e);const n=null!==(i=null===(t=this.coreStorage.getLocal("offlineViews"))||void 0===t?void 0:t.split(","))&&void 0!==i?i:[],r=n.indexOf(e);-1!=r&&n.splice(r,1),this.coreStorage.setLocal("offlineViews",n.toString())}handleDataToSend(e,t,i,r,s,a,o){if(!this.isDestroyed)switch(e){case v.default.Consumer.NQS:this.nqsService.send(t,i,r,s,a,o);break;case v.default.Consumer.PERSISTENT:if(void 0!==s&&s(),t===n.A.Service.VIDEO_PLUGIN_LOGS)break;if(t===n.A.Service.INIT)break;r.timemark=Date.now();const e=new c(this.options["app.https"],"",t,i,r,s,a),l=this.coreStorage.getLocal("offlineViews");if(l){const e=l.split(",");e.includes(r.code)||(e.push(r.code),this.coreStorage.setLocal("offlineViews",e.toString()))}else this.coreStorage.setLocal("offlineViews",r.code);const d=this.coreStorage.getLocal("offlineViews."+r.code);
2if(d){const t=d.split(",");t.push(e.toLocalStorageString()),this.coreStorage.setLocal("offlineViews."+r.code,t.toString())}else this.coreStorage.setLocal("offlineViews."+r.code,e.toLocalStorageString());break;case v.default.Consumer.BLACK_HOLE:void 0!==s&&s()}}subscribeListener(e){this.coreEventListeners.push(e)}throwEvent(e){if(!this.isDestroyed)for(const t of this.coreEventListeners)t(e)}}},9318:(e,t)=>{t.read=function(e,t,i,n,r){var s,a,o=8*r-n-1,l=(1<<o)-1,d=l>>1,u=-7,c=i?r-1:0,h=i?-1:1,p=e[t+c];for(c+=h,s=p&(1<<-u)-1,p>>=-u,u+=o;u>0;s=256*s+e[t+c],c+=h,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===s)s=1-d;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=d}return(p?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,i,n,r,s){var a,o,l,d=8*s-r-1,u=(1<<d)-1,c=u>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,r),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[i+p]=255&o,p+=f,o/=256,r-=8);for(a=a<<r|o,d+=r;d>0;e[i+p]=255&a,p+=f,a/=256,d-=8);e[i+p-f]|=128*g}},9393:(e,t,i)=>{var n=i(7086),r=i(7680),s={getPosition:function(){return null},getGivenBreaks:function(){return null},getExpectedBreaks:function(){return null},getExpectedPattern:function(){return null},getBreaksTime:function(){return null},getGivenAds:function(){return null},getExpectedAds:function(){return null},getIsVisible:function(){return!0},getAudioEnabled:function(){return null},getIsSkippable:function(){return null},getIsFullscreen:function(){return null},getCampaign:function(){return null},getCreativeId:function(){return null},getProvider:function(){return null},getAdInsertionType:function(){return null},fireClick:function(e){"string"==typeof e&&(e={url:e}),this.emit(n.Event.CLICK,{params:e})},fireQuartile:function(e){this.flags.isStarted&&"number"==typeof e&&e>this.flags.lastQuartileSent&&e<4&&(this.flags.lastQuartileSent++,this.emit(n.Event.QUARTILE,{params:{quartile:e}}))},startChronoView:function(){if(this.getIsVisible()&&this.plugin.backgroundDetector&&!this.plugin.backgroundDetector.isInBackground){var e=this.chronos.viewedMax;0!==e.length&&0===e[e.length-1].stopTime||(e.push(new r),e[e.length-1].start())}},stopChronoView:function(){var e=this.chronos.viewedMax;e[0]&&e.length>0&&0===e[e.length-1].stopTime&&e[e.length-1].stop()},fireManifest:function(e,t){var i={params:e};"string"==typeof e&&(i={params:{errorType:e,errorMessage:t}}),this.emit(n.Event.MANIFEST,i)},fireSkip:function(e){void 0===e&&(e={}),e.skipped=!0,this.fireStop(e)},fireBreakStart:function(e){this.fireAdBreakStart(e)},fireBreakStop:function(e){this.fireAdBreakStop(e)},fireAdBreakStart:function(e){this.emit(n.Event.PODSTART,{params:e})},fireAdBreakStop:function(e){this.emit(n.Event.PODSTOP,{params:e})}};e.exports=s},9474:e=>{var t=function(e){var i,n,r=(e=e||window).document,s=function(t){var i=!1;if(t.getBoundingClientRect){var n=t.getBoundingClientRect();(i={top:Math.max(n.top,0),left:Math.max(n.left,0),bottom:Math.min(n.bottom,e.innerHeight||r.documentElement.clientHeight),right:Math.min(n.right,e.innerWidth||r.documentElement.clientWidth)}).bottom<=i.top||i.right<=i.left?i=!1:i.area=(i.bottom-i.top)*(i.right-i.left)}return i},a=function(e,t){if(t){var i=s(e);i&&o.push({url:t,area:i.area,rect:i})}},o=[],l=[];try{var d=e.performance.timing.navigationStart;!function(){for(var i=r.getElementsByTagName("*"),n=/url\(.*(http.*)\)/gi,l=0;l<i.length;l++){var d=i[l],u=e.getComputedStyle(d);if("IMG"===d.tagName&&a(d,d.src),u["background-image"]){n.lastIndex=0;var c=n.exec(u["background-image"]);c&&c.length>1&&a(d,c[1].replace('"',""))}if("IFRAME"===d.tagName)try{var h=s(d);if(h){var p=t(d.contentWindow);p&&o.push({tm:p,area:h.area,rect:h})}}catch(e){}}}(),function(){for(var t={},i=e.performance.getEntriesByType("resource"),n=0;n<i.length;n++)t[i[n].name]=i[n].responseEnd;for(var r=0;r<o.length;r++)"tm"in o[r]||(o[r].tm=void 0!==t[o[r].url]?t[o[r].url]:0)}(),function(){"msFirstPaint"in e.performance.timing&&(i=e.performance.timing.msFirstPaint-d);for(var t=e.performance.getEntriesByType("paint"),n=0;n<t.length;n++)"first-paint"===t[n].name&&(i=t[n].startTime);if(void 0===i||i<0||i>12e4){i=e.performance.timing.responseStart-d;for(var s={},a=r.getElementsByTagName("head")[0].children,o=0;o<a.length;o++){var l=a[o];"SCRIPT"===l.tagName&&l.src&&!l.async&&(s[l.src]=!0),"LINK"===l.tagName&&"stylesheet"===l.rel&&l.href&&(s[l.href]=!0)}for(var u=e.performance.getEntriesByType("resource"),c=!1,h=0;h<u.length;h++)if(c||!s[u[h].name]||"script"!==u[h].initiatorType&&"link"!==u[h].initiatorType)c=!0;else{var p=u[h].responseEnd;(void 0===i||p>i)&&(i=p)}}i=Math.max(i,0)}(),function(){for(var t={0:0},n=0,s=0;s<o.length;s++){var a=i;"tm"in o[s]&&o[s].tm>i&&(a=o[s].tm),void 0===t[a]&&(t[a]=0),t[a]+=o[s].area,n+=o[s].area}var d=Math.max(r.documentElement.clientWidth,e.innerWidth||0)*Math.max(r.documentElement.clientHeight,e.innerHe
2ight||0);if(d>0&&(d=.1*Math.max(d-n,0),void 0===t[i]&&(t[i]=0),t[i]+=d,n+=d),n){for(var u in t)t.hasOwnProperty(u)&&l.push({tm:u,area:t[u]});l.sort((function(e,t){return e.tm-t.tm}));for(var c=0,h=0;h<l.length;h++)c+=l[h].area,l[h].progress=c/n}}(),function(){if(l.length){n=0;for(var e=0,t=0,r=0;r<l.length;r++){var s=l[r].tm-e;s>0&&t<1&&(n+=(1-t)*s),e=l[r].tm,t=l[r].progress}}else n=i}()}catch(e){}return n};e.exports=t},9516:(e,t,i)=>{const{default:n}=i(7276);var r=i(5292),s=i(1516);const{AnalyticsTag:a}=i(2784);var o={registerAdapter:function(e,t,i,s){if(!t)return void n.error(a,"Register Adapter needs an adapter to initialize");if(i=i||{},s=s||"default",this.videos.existsVideo(s))i=i||{},this.videos.getVideo(s).mergeOptions(i),this.setAdapter(new r(s,this.videos.getVideo(s),this,this.adapterTemplates,e,t),s);else{var o=this._createVideoSpace(s,i),l=new r(s,o,this,this.adapterTemplates,e,t);this.setAdapter(l,s)}let d=i["content.resource"];!d&&this.videos.existsAdapter(s)&&(d=this.videos.getAdapter(s).getURLToParse(),d||(d=this.videos.getAdapter(s).getResource())),this.resourceTransform.init(d)},_createVideoSpace:function(e,t){var i=new s(e,this,this.options,null,null);return this.getNextViewIndex(i),t=t||{},i.setVideoOptions(t),this.videos.setVideo(i),i},setAdapter:function(e,t){if(t=t||"default",this.browserLoadTimes&&this.browserLoadTimes.setPlayerSetupTime(),e.isSetAdapter())n.warn(a,"Adapters can only be added to a single plugin");else{var i=this.getAdapter(t);i&&(e.flags=i.flags,e.chronos=i.chronos,e.fireEventsStruct=i.fireEventsStruct),this.removeAdapter(t),this.videos.setAdapter(e,t)}},getAdapter:function(e){return e=e||"default",this.videos.getAdapter(e)},removeAdapter:function(e){e=e||"default",this.videos.existsVideo(e)&&this.videos.removeAdapter(this.contentAdapterListeners,e)},getNextViewIndex:function(e){e.nextView();let t=!0;for(;t;){let i=!1;for(const t of this.videos.getVideoKeys().filter((t=>t!==e.getVideoKey())))if(e.getViewCode()===this.videos.getVideo(t).getViewCode()){i=!0;break}i&&e.nextView(),t=i}}};e.exports=o},9600:e=>{var t=function(){};e.exports=function(e){if(arguments.length>1)throw Error("Second argument not supported");if(null===e)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof e)throw TypeError("Argument must be an object");return t.prototype=e,new t}},9637:e=>{e.exports={GET:"GET",POST:"POST"}},9731:function(e){var t,i,n,r,s;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,c=u.substring(0,u.lastIndexOf("/")+1)+a.path;d.path=s.normalizePath(c)}else d.path=o.path,a.params||(d.params=o.params,a.query||(d.query=o.query));return null===d.path&&(d.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(d)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},9773:(e,t,i)=>{var n=i(3948).extend({constructor:function(e,t){this.plugin=e,this.session=t,this.isInBackgroun
2d=!1,this.listenerReference=this._visibilityListener.bind(this),this._reset()},startDetection:function(){!this.isBackgroundDetectorStarted&&"undefined"!=typeof document&&document.addEventListener&&(this.isBackgroundDetectorStarted=!0,document.addEventListener("visibilitychange",this.listenerReference))},stopDetection:function(){this.isBackgroundDetectorStarted&&"undefined"!=typeof document&&document.removeEventListener&&(document.removeEventListener("visibilitychange",this.listenerReference),this._reset())},_reset:function(){this.isBackgroundDetectorStarted=!1},_visibilityListener:function(e){if("undefined"!=typeof document){var t=this._getSettings();"hidden"===document.visibilityState?this._toBackground(t):"visible"===document.visibilityState&&this._toForeground(t)}},_toBackground:function(e){this.isInBackground=!0;try{if(this.plugin&&this.plugin.videos)for(var t=0;t<this.plugin.videos.getVideoKeys().length;t++){var i=this.plugin.videos.getVideoKeys()[t],n=this.plugin.videos.getAdsAdapter(i);n&&n.stopChronoView()}}catch(e){}try{if("string"==typeof e){switch(e){case"stop":this._fireStop();break;case"pause":this._firePause()}this.session.suspend()}}catch(e){}},_toForeground:function(e){this.isInBackground=!1;try{if(this.plugin&&this.plugin.videos)for(var t=0;t<this.plugin.videos.getVideoKeys().length;t++){var i=this.plugin.videos.getVideoKeys()[t],n=this.plugin.videos.getAdsAdapter(i);n&&n.startChronoView()}}catch(e){}try{"string"==typeof e&&e&&this._session.resume()}catch(e){}},_getSettings:function(){return"string"==typeof this.plugin.options["background.settings"]&&this.plugin.options["background.settings"]?this.plugin.options["background.settings"]:this.plugin.deviceDetector.isSmartTV()?this.plugin.options["background.settings.tv"]:this.plugin.deviceDetector.isDesktop()?this.plugin.options["background.settings.desktop"]:this.plugin.deviceDetector.isAndroid()?this.plugin.options["background.settings.android"]:this.plugin.deviceDetector.isIphone()?this.plugin.options["background.settings.iOS"]:this.plugin.deviceDetector.isPlayStation()?this.plugin.options["background.settings.playstation"]:void 0},_firePause:function(){this._fireX("firePause")},_fireStop:function(){this._fireX("fireStop")},_fireX:function(e){try{if(this.plugin&&this.plugin.videos)for(var t=0;t<this.plugin.videos.getVideoKeys().length;t++){var i=this.plugin.videos.getVideoKeys()[t];this.adsAdapter=this.plugin.videos.getAdsAdapter(i),this.adsAdapter&&this.adsAdapter[e]({},"backgroundDetector"),this.contentAdapter=this.plugin.videos.getAdapter(i),this.contentAdapter&&this.contentAdapter[e]({},"backgroundDetector")}}catch(e){}},canBlockStartCalls:function(){return this.isInBackground&&!0===this.plugin.options["background.enabled"]&&this._getSettings()}});e.exports=n},9835:(e,t,i)=>{const n="7.3.19"+(i(9907).env.NWF||"");e.exports=n},9907:e=>{var t,i,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(i){try{return t.call(null,e,0)}catch(i){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var o,l=[],d=!1,u=-1;function c(){d&&o&&(d=!1,o.length?l=o.concat(l):u=-1,l.length&&h())}function h(){if(!d){var e=a(c);d=!0;for(var t=l.length;t;){for(o=l,l=[];++u<t;)o&&o[u].run();u=-1,t=l.length}o=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new p(e,t)),1!==l.length||d||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}},t={};function i(n){var r=t[n];
2if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.d(n,{default:()=>ln});var e={};i.r(e),i.d(e,{VERSION:()=>Nt,addSidxSegmentsToPlaylist:()=>Qe,generateSidxKey:()=>it,inheritAttributes:()=>It,parse:()=>Ot,parseUTCTiming:()=>Mt,stringToMpdXml:()=>Rt,toM3u8:()=>ct,toPlaylists:()=>_t});var t=i(9065),r=i(7276),s=i(2784),a=i(5438);function o(){const e=["sliceByFirstSpecial","includes","843184dLQhnV","getPath","9qvRnek","endsWith","isHeaderMatch","length","lastIndexOf","isValidUrl","test","4lCAcTg","min","substr","67481zJWkhm","origin","fromCharCode","469924TISFqh","indexOf","1016469ccptRA","map","delay","444SBpbmK","forEach","returnRandom","https://","pattern","regex","1575dOcjtm","push","slice","type","bufferToString","isSubtitles","pathname","4KeMDEh","16291jXZOim","5706LMeYIN","host","split","findPathMach","657740qtobgf","isMedia"];return(o=function(){return e})()}const l=d;function d(e,t){const i=o();return(d=function(e,t){return i[e-=199]})(e,t)}!function(e){const t=d,i=e();for(;;)try{if(201509==-parseInt(t(199))/1*(-parseInt(t(239))/2)+parseInt(t(204))/3*(parseInt(t(220))/4)+parseInt(t(213))/5*(-parseInt(t(222))/6)+-parseInt(t(202))/7+parseInt(t(230))/8*(parseInt(t(232))/9)+-parseInt(t(226))/10+-parseInt(t(221))/11*(-parseInt(t(207))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(o);class u{static getRouteAndFilename(e){const t=d,i=new URL(e),n=i[t(200)]+i[t(219)],r=n[t(236)]("/")+1;return{route:n[t(215)](0,r),fileName:n[t(215)](r)}}static[l(231)](e){return{path:new URL(e).pathname}}static[l(206)](e){return new Promise((t=>setTimeout(t,e)))}static[l(225)](e,t,i){const n=l;let r=i.url;e=e[n(224)]("?")[0];let s=new URL(e),a=new URL(t);s[n(223)]!=a[n(223)]&&(s.host=a[n(223)],e=s.toString());let o=t;if(null!=t&&""!=t)for(;!e[n(229)](o)&&o[n(229)]("/");){o.endsWith("/")&&(o=o[n(241)](0,o[n(235)]-1));let e=o[n(241)](o.lastIndexOf("/"),o[n(235)]);if((r[n(233)](e)||r.endsWith(e+"/"))&&(r[n(233)]("/")&&(r=r[n(241)](0,r.length-1)),r=r[n(241)](0,r[n(236)]("/")+1)),o=o[n(241)](0,o[n(236)]("/")+1),o==n(210)||"http://"==o)return""}return e.replace(o,r)}static[l(228)](e,t=!1){const i=l;let n=[e[i(203)]("?")];return t&&n[i(214)](e[i(203)](";")),n=n.filter((e=>-1!=e)),e[i(215)](0,Math[i(240)](...n))}static[l(227)](e){const t=l;let i=!1;return a.Y4[t(208)]((n=>{i=i||e[t(233)](n)})),i}static isManifest(e,t=!1){const i=l;let n=!1;const r=t?u[i(228)](e,t):e;return a.w2[i(208)]((e=>{n=n||r[i(233)](e)})),n}static isAudio(e){const t=l;let i=!1;return a.hj[t(208)]((t=>{i=i||e.endsWith(t)})),i}static[l(218)](e){let t=!1;return a.zU.forEach((i=>{t=t||e[d(233)](i)})),t}static[l(217)](e){return String[l(201)].apply(null,new Uint8Array(e))}static[l(209)](e){let t="";const i=e.length-1;return i>0&&(t=e[Math.round(Math.random()*i)]),t}static formatParameters(e){const t=l;return"?"+Object.keys(e)[t(205)]((function(t){return""===e[t]?"":t+"="+encodeURIComponent(e[t])})).join("&")}static ifByteArrayToString(e){const t=l;if("string"!=typeof e){const n=new Uint8Array(e);let r="";for(var i=0;i<n[t(235)];i++)r+=String[t(201)](n[i]);return r}return e}static[l(237)](e){try{return new URL(e),!0}catch(e){return!1}}static[l(234)](e,t){const i=l;let n=!1;return"list"===t[i(216)]?n=t[i(211)][i(205)]((e=>e))[i(229)](e):t[i(216)]===i(212)&&(n=new RegExp(t[i(211)])[i(238)](e)),n}}const c=p;function h(){const e=["length","waitUntil","2vToiOu","_cdnBalancer","6206442VthMiM","byteLength","5712777TgWWoo","isNaN","readyState","string","Theoplayer interceptor - Completed request for -> ","type","_interceptor","addRequestInterceptor","unload","5EHrcGn","open","manifest","10199403xpZAKE","respondWith",".m3u8","setEstimator","27784273vitJuQ","responseType","removeRequestInterceptor","useTheoplayer","body","8kwVJoI","url","statusText","verbose",".mpd","network","pathname","status","_totalDownloadedBytes","1212334hHMRxI","335848wKbVHO","ifByteArrayToString","now","response","_totalDownloadTime","_player","Theoplayer interceptor - Intercepting request to -> ","endsWith","stream","1664660mvdwHQ","method","load","headers","18GeDXvj"];
2return(h=function(){return e})()}function p(e,t){const i=h();return(p=function(e,t){return i[e-=468]})(e,t)}!function(e){const t=p,i=e();for(;;)try{if(632184==parseInt(t(491))/1*(-parseInt(t(474))/2)+-parseInt(t(488))/3*(-parseInt(t(475))/4)+parseInt(t(504))/5*(-parseInt(t(493))/6)+-parseInt(t(495))/7*(-parseInt(t(516))/8)+-parseInt(t(507))/9+parseInt(t(484))/10+parseInt(t(511))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(h);class f{constructor(e,t){const i=p;this[i(473)]=0,this[i(479)]=0,this[i(480)]=e,this[i(492)]=t}[c(486)](){const e=c;this[e(480)]&&this._cdnBalancer&&(this[e(473)]=0,this._totalDownloadTime=0,this[e(492)][e(514)](),this[e(502)]())}[c(503)](){const e=c;this._player[e(470)][e(513)](this._interceptor)}[c(502)](){const e=c;this._interceptor=e=>{const t=p;e[t(490)]((i=>{const n=t,a=new XMLHttpRequest;let o=0,l=0,d=0;e[n(512)]===n(483)?a[n(512)]="arraybuffer":a[n(512)]=e[n(512)],a.onreadystatechange=t=>{const c=n;if(1===a.readyState&&"manifest"!==e[c(500)]&&(o=Date[c(477)]()),2===a[c(497)]&&"manifest"!==e[c(500)]&&(l=Date[c(477)](),d=l-o),4===a.readyState){const t={status:a[c(472)],statusText:a[c(518)],body:void 0};if(a.status>=200&&a.status<400){const i=new URL(e[c(517)])[c(471)];if(i[c(482)](c(509))||i[c(482)](c(469))?t.body=u[c(476)](a.response):t[c(515)]=a[c(478)],e[c(500)]!==c(506)&&d>0){let e=Date[c(477)]()-l;this._totalDownloadTime+=e,this[c(473)]+=a[c(478)][c(494)];let t=this[c(473)]/(this[c(479)]/1e3);Number[c(496)](t)&&(t=(typeof a[c(478)]===c(498)?a[c(478)][c(489)]:a[c(478)][c(494)])/(d/1e3)),this[c(480)][c(470)][c(510)]({bandwidth:8*t,roundTripTime:d/1e3,createMeasurer:()=>{}})}e[c(508)](t)}else e[c(508)](t);r.default[c(468)](s.BalancerTag,c(499)+a.responseURL),i()}},r.default.verbose(s.BalancerTag,n(481)+e[n(517)]),a[n(505)](e[n(485)],e[n(517)]);for(const t in e[n(487)])a.setRequestHeader(t,e[n(487)][t]);a.send(e.body)}))},this._player[e(470)].addRequestInterceptor(this[e(501)])}}const g=m;function m(e,t){const i=v();return(m=function(e,t){return i[e-=455]})(e,t)}function v(){const e=["6129585kdqiOD","1128lSOfin","8EhoiZP","15ypbpVm","111nlpuZJ","loadInterceptor","363111DNKoMF","3887361nBNTGq","removeInterceptors","_cdnBalancer","load","94MiOkXR","toLowerCase","3772410TqZVfW","loadedInterceptors","1294VWlgWf","theoplayer","777966teZNWQ"];return(v=function(){return e})()}!function(e){const t=m,i=e();for(;;)try{if(239305==parseInt(t(460))/1*(parseInt(t(456))/2)+parseInt(t(467))/3*(-parseInt(t(464))/4)+parseInt(t(466))/5*(parseInt(t(462))/6)+parseInt(t(469))/7+-parseInt(t(465))/8*(parseInt(t(470))/9)+-parseInt(t(458))/10+parseInt(t(463))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(v);class y{constructor(e){const t=m;this[t(459)]=[],this[t(472)]=e}[g(468)](e,t){const i=g;let n;e[i(457)]()===i(461)&&(n=new f(t,this[i(472)])),n&&(n[i(455)](),this[i(459)].push(n))}[g(471)](){const e=g;for(const t of this[e(459)])null==t||t.unload()}}function _(){var e=["signManifestUsingApi","jwtToken","authData","96950KBsuTt","3558370VlLraM","domainWhitelistRegex","noProbing","dynamicRules","GET","probingPolicy","294GRzMZx","974588ZDJkDB","profileName","reportTime","9715433ZwqHIe","9XWvQaY","allowSpecialDelimitersInUrl","balanceAudio","isDev","videoId","balanceSubtitles","chunkExpirationProbingMs","3OFYyro","662410Efzkuu","bucketName","debug","jwtAuthType","forceDecisionCall","Bearer","balanceManifests","probeOnlyOnBanned","updateTime","stripPathForDomainRegex","domainWhitelist","1054134yzcAWt","stripPathRegex","6631592gUXYwJ","timeBetweenHeads","isLive"];return(_=function(){return e})()}function b(e,t){var i=_();return(b=function(e,t){return i[e-=260]})(e,t)}!function(e){for(var t=b,i=e();;)try{if(736711==parseInt(t(272))/1*(-parseInt(t(273))/2)+parseInt(t(284))/3+-parseInt(t(261))/4+parseInt(t(292))/5*(-parseInt(t(260))/6)+parseInt(t(264))/7+parseInt(t(286))/8*(parseInt(t(265))/9)+parseInt(t(293))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(_);class T{constructor(e){var t,i,n,r,s,a,o,l,d,u,c,h,p,f,g=b;this.isLive=!1,this[g(281)]=0,this[g(263)]=5,this[g(277)]=!1,this[g(283)]=[],this[g(294)]=[],this[g(280)]=!1,this[g(295)]=!1,this[g(298)]=g(297),this[g(266)]=!1,this[g(289)]=!1,this[g(279)]=!1,this.balanceAudio=!0,this[g(270)]=!0,this[g(296)]={},this[g(282)]=[],this[g(262)]=null==e?void 0:e[g(262)],this[g(274)]=null==e?void 0:e[g(274)],this[g(288)]=(null==e?void 0:e.isLive)||!1,this[g(269)]=null==e?void 0:e.videoId,this.resource=null==e?void 0:e.resource,this.updateTime=null!==(t=null==e?void 0:e.updateTime)&&void 0!==t?t:0,this[g(263)]=null!==(i=null==e?void 0:e[g(263)])&&void 0!==i?i:0,this[g(275)]=null==e?void 0:e[g(275)],this[g(268)]=null==e?void 0:e[g(268)],this[g(287)]=null==e?void 0:e.timeBetweenHeads,this[g(283)]=null!==(n=null==e?void 0:e.domainWhitelist)&&void 0!==n?n:[],this[g(294)]=null!==(r=null==e?void 0:e[g(294)])&&void 0!==r?r:[],this[g(280)]=null!==(s=null==e?void 0:e[g(280)])&&void 0!==s&&s,this[g(295)]=null!==(a=null==e?void 0:e[g(295)])&&void 0!==a&&a,this[g(266)]=null!==(o=null==e?void 0:e[g(266)])&&void 0!==o&&o,this[g(298)]=null==e?void 0:e.probingPolicy,this[g(289)]=null!==(l=null==e?void 0:e[g(289)])&&void 0!==l&&l,this[g(279)]=null!==(d=null==e?void 0:e[g(279)])&&void 0!==d&&d,this[g(267)]=null===(u=null==e?void 0:e[g(267)])||void 0===u||u,this.balanceSubtitles=null===(c=null==e?void 0:e.balanceSubtitles)||void 0===c||c,this[g(296)]=null!==(h=null==e?void 0:e[g(296)])&&void 0!==h?h:{},this.jwtToken=null==e?void 0:e[g(290)],this.jwtAuthType=null!==(p=null==e?void 0:e[g(276)])&&void 0!==p?p:g(278),this[g(282)]=null!==(f=null==e?void 0:e[g(282)])&&void 0!==f?f:[],this[g(285)]=null==e?void 0:e[g(285)],this[g(271)]=null==e?void 0:e[g(271)],this.authData=null==e?void 0:e[g(291)]}}const S=E;function E(e,t){const i=A();return(E=function(e,t){return i[e-=335]})(e,t)}function A(){const e=["289292xLFjvy","3241735PKZNfn","emit","data","6RZkqXR","splice","3894750ziOqxC","forEach","391675MFwuBt","12qsRLML","_listeners","85443bhDNxk","indexOf","187816pKGoWp","1912242DRBtGn","off"];return(A=function(){return e})()}!function(e){const t=E,i=e();for(;;)try{if(341383==parseInt(t(337))/1+parseInt(t(341))/2*(-parseInt(t(348))/3)+parseInt(t(346))/4*(-parseInt(t(345))/5)+parseInt(t(335))/6+parseInt(t(338))/7+parseInt(t(350))/8+-p
2arseInt(t(343))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(A);class w{constructor(){this[E(347)]={}}on(e,t){const i=E;return!this._listeners[e]&&(this._listeners[e]=[]),this[i(347)][e].push(t),this}[S(336)](e,t){const i=S;if(this._listeners[e])if(t){const n=this[i(347)][e][i(349)](t);-1!==n&&this[i(347)][e][i(342)](n,1)}else this[i(347)][e]=[];return this}[S(339)](e,t={},i){return[e,"*"].forEach((n=>{const r=E;this[r(347)][n]&&this[r(347)][n][r(344)]((n=>{const s=i||r(340);n({type:e,[s]:t})}))})),this}}var P=i(1048).hp;const C=L;function L(e,t){const i=k();return(L=function(e,t){return i[e-=248]})(e,t)}!function(e){const t=L,i=e();for(;;)try{if(746899==-parseInt(t(352))/1+-parseInt(t(387))/2+-parseInt(t(395))/3+-parseInt(t(286))/4*(-parseInt(t(368))/5)+parseInt(t(277))/6*(-parseInt(t(365))/7)+-parseInt(t(332))/8+parseInt(t(402))/9*(parseInt(t(303))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(k);var D=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){const a=L;function o(e){const t=L;try{d(n[t(329)](e))}catch(e){s(e)}}function l(e){const t=L;try{d(n[t(397)](e))}catch(e){s(e)}}function d(e){const t=L;var n;e.done?r(e[t(391)]):(n=e[t(391)],n instanceof i?n:new i((function(e){e(n)})))[t(353)](o,l)}d((n=n[a(389)](e,t||[]))[a(329)]())}))};function k(){const e=["sendSegment","615510SzUUSQ","version","throw","message","_ip","_onError","SOMETHING IS WRONG, Total p2p file size is bigger than expected size. ","103896CutKEB","clear","isAhead","time","_decoder","activeP2PSendProcesses","_lastLatencyP2P","pop","get","Download ended ","totalDataInterval","CREATEPEERCONNECTING?","slice","_activeDownloads","_lastSegmendDataMessagesTime","getLastDownloadsTraffic","_onConnect","Close callback","parse","createdAt","peerFailedSegmentTimeout"," | ","getLastSegmentDataMessagesTime","_lastResponses","_totalDownloadedBytes","getIp","_totalDownloadTime","_segmentMap","getOldestRequestTS","_lastBandwith","peerCloseListener","P2P Upload canceled.","Canceling operation -> 0 ","size","getByteArrayFromIdentifier","set","469254PmIBKy","sctp-failure","splits","length","random","_cancel","trim","maxMessageSize","getSegmentDataMessages","24kdvPbz","from","decode","Probable algorithm failed","push","cancel","_totalSendBytes","timeouts","peerFailedSegmentAbsent","peerSegmentLoaded","sendNoSegment","timeGap","sendMap","getSegment","_cancelRequest","testLatencyDone","getLastLatencySegment","4150wdcFYk"," download end ","delete","getDownloadBandwidth","map","P2P Pong to ","getDownloadedChunks","startTime","testLatencyResult","addPeerResponse","sdp","_peer","getIceAnswer","stringify","peerSegmentProgress","getTotalSendSegments","getIdentifierFromByteArray","_totalDownloaded","now","Absent","storageSize"," not an active download id","floor","_segmendDataMessages","_destroyed","_totalSendSegments","next","debug","identifier","10243448DwMmWe","request","indexOf","command","This peer may timeout in ","_send","isDownloading","getTotalSendBytes","unshift","getSegmentMap","P2P: ","error","errorDetail","getLastResponses","_lastSent","PTT-> TIMEOUT CREATION ","peerSegmentUpload","_version","timeout","dateTime","1127710arxfEh","then","_answer","_lastLatencySegment","_onData","bind","_downloaded","testBandwidthDone","split","_identifierShort","addPeerLatency","_totalSendTime","absent","126FZzPqJ","_operationId","ping","984635iSjdTr","_onClose","P2P Ping to ","consecutiveHaveSegment","pong","_startTimeout","P2P onError to ","Timeout ","newSegmentAvailable","isBehind","min","getStorage","getDownloadedBytes","peerSegmentUploadRequest","_getLastSecondsTraffic","_loader","byteLength","totalErrors","peerCanceledSegmentUpload","2408700YuNllj","destroy","apply","_endDownload","value","data","concat"];return(k=function(){return e})()}class I extends w{[C(315)](){return this[C(354)]}[C(339)](){return this[C(292)]}getTotalSendTime(){return this[C(363)]}[C(318)](){return this[C(328)]}[C(380)](){return this[C(265)]}[C(309)](){return this[C(320)]}[C(306)](){return 0==this[C(267)]?0:this._totalDownloadedBytes*(this._totalDownloadTime/1e3)}getLastLatencyP2P(){return this[C(408)]}[C(302)](){return this._lastLatencySegment}getLastBandwith(){return this[C(270)]}[C(266)](){const e=C;var t;if(null!=this[e(399)])return this[e(399)];let i=null===(t=this._answer)||void 0===t?void 0:t[e(313)];if(null!=i)try{let t=i[e(360)]("c=IN IP4")[1];t=t[e(283)]();let n=t[e(360)](" ")[0];n=t.split("a=")[0],n=n[e(283)](),this._ip=n}catch(e){}}[C(345)](){return this[C(264)]}constructor(e,t,i){const n=C;super(),this[n(268)]=[],this[n(254)]=new Map,this[n(264)]=[],this[n(346)]=[],this._decoder=new TextDecoder,this[n(361)]=Math.round(65536*Math[n(281)]())-32768,this[n(358)]=[],this._totalDownloaded=0,this[n(265)]=0,this[n(267)]=0,this[n(371)]=0,this[n(293)]=0,this.downloadingProcessActive=!1,this[n(349)]=0,this._totalSendBytes=0,this[n(363)]=0,this[n(328)]=0,this._lastLatencyP2P=0,this[n(355)]=0,this._lastBandwith=0,this[n(399)]=void 0,this[n(326)]=0,this[n(255)]=0,this._destroyed=!1,this.foreSegmentsInfo=!1,this[n(404)]=!1,this[n(377)]=!1,this[n(297)]=0,this[n(366)]=0,this[n(385)]=0,this[n(282)]=new Map,this[n(301)]=!1,this[n(359)]=!1,this[n(311)]=0,this.testBandwidthResult=0,this[n(354)]=i,this.id=t.id,this[n(314)]=t,this[n(383)]=e,t.on(a.Lg.connect,this[n(257)].bind(this)),t.on(a.Lg.close,this[n(369)][n(357)](this)),t.on(a.Lg[n(343)],this[n(400)][n(357)](this)),t.on(a.Lg[n(392)],this[n(356)][n(357)](this))}getVersion(){return this._version}[C(338)](){const e=C;return this[e(254)][e(274)]>0}[C(285)](){return this[C(326)]}[C(263)](){return this[C(255)]}[C(388)](){const e=C;this[e(314)][e(388)](),this[e(369)](),this[e(327)]=!0}_onConnect(){const e=C;r.default.verbose(s.BalancerTag,e(252)+this.id),this._destroyed||(r.default[e(330)](s.BalancerTag,"P2P onConnect to "+this.id
2),this[e(383)].peerConnect(this))}_onError(e){const t=C;var i,n;r.default[t(330)](s.BalancerTag,t(374)+this.id+" "+(null===(i=null==e?void 0:e[t(343)])||void 0===i?void 0:i[t(344)])),(null===(n=null==e?void 0:e[t(343)])||void 0===n?void 0:n[t(344)])===t(278)&&this[t(369)](),this[t(371)]=0,this.totalErrors++}_onClose(){const e=C;this[e(314)][e(388)](),this[e(254)][e(403)](),this[e(390)](e(258),0),this[e(383)][e(271)](this)}[C(390)](e,t){const i=C;e===i(322)&&(r.default[i(330)](s.BalancerTag,i(289)),this[i(371)]=0);let n=this[i(254)][i(249)](t);n&&r.default[i(330)](s.BalancerTag,"Closing p2p download "+n.id),this[i(254)].delete(t)}[C(356)](e){const t=C;if(this[t(327)])return;const i=e[t(253)](0,4),n=e[t(253)](4,e[t(384)]),o=i[0],l=this[t(319)](e.slice(1,3)),d=i[3];if(this[t(349)]<d&&(this._version=d),o==a.b3[t(398)]){const e=JSON[t(259)](this[t(406)][t(288)](n));if(e[a.CE[t(335)]])switch(e[a.CE[t(335)]]){case a.mH[t(333)]:this[t(383)][t(381)](this,e[a.CE.id],e[a.CE[t(331)]]);break;case a.mH[t(307)]:this[t(268)]=e[a.CE[t(307)]],this[t(326)]++,this._lastSegmendDataMessagesTime=Date.now();break;case a.mH[t(376)]:let i=e[a.CE.id],n=(e[a.CE[t(274)]],e[a.CE.storageSize]);this[t(408)]=Date[t(321)]()-e[a.CE[t(351)]],this._lastLatencySegment=Date[t(321)]()-e[a.CE[t(260)]],this._loader[t(362)](this[t(408)]);let o=0,d=this[t(383)][t(379)]()[t(299)](i);d&&(o=d[t(310)]-e[a.CE[t(260)]]),o>=0?(this[t(404)]=!0,this.isBehind=!1):(this[t(404)]=!1,this[t(377)]=!0),this[t(268)][t(340)](i),this[t(268)][t(280)]>n&&this._segmentMap[t(248)]();break;case a.mH.ping:let u=e[a.CE[t(331)]],c=e[a.CE.time];this[t(372)](u,c);break;case a.mH[t(372)]:const h=Date.now()-e[a.CE.time];this._loader[t(362)](h);break;case a.mH[t(291)]:this[t(282)][t(276)](e[a.CE[t(331)]],e[a.CE.identifier]);break;case a.mH[t(364)]:{let i=e[a.CE[t(331)]]||0,n=this[t(254)].get(i);n&&n.id===e[a.CE.id]&&(this[t(383)][t(294)](this,n.id),this[t(390)](t(322),l))}break;case a.mH.data:{let i=this._activeDownloads[t(249)](e[a.CE[t(331)]]);if(i&&(i[t(274)]=e[a.CE[t(274)]],0==i[t(310)]&&(i[t(310)]=Date[t(321)]()),this[t(320)]>=3&&this.getDownloadBandwidth()>0)){const e=1e3*i[t(274)]/this[t(306)]();e>1.15*a.LI[t(350)]&&r.default.verbose(s.BalancerTag,t(336)+e+"ms")}}}}else if(o==a.b3.data){let e=this._activeDownloads[t(249)](l);if(e&&e.id){0==e[t(310)]&&(e[t(310)]=Date[t(321)]()),e[t(392)][t(290)](n);let i=0;e[t(392)].forEach((e=>{i+=e[t(384)]}));const a=Date.now()-(e.startTime||Date[t(321)]());if(i>e[t(274)]&&r.default[t(330)](s.BalancerTag,t(401)+i+" "+e.size),i==e[t(274)]){let n=0;const o=new Uint8Array(i);for(const i of e[t(392)])o[t(276)](new Uint8Array(i),n),n+=i[t(384)];this[t(265)]=this[t(265)]+o[t(384)],this[t(320)]++,this[t(267)]=this[t(267)]+a;const d={time:Date[t(321)](),size:o[t(384)]};this._lastResponses.push(d),this._loader[t(312)](d);let u=(Date[t(321)]()-e[t(310)])/1e3,c=e[t(274)]/u;this[t(270)]=c,this[t(358)][t(290)](e.id),this[t(383)][t(295)](this,e.id,a,o.buffer),r.default[t(330)](s.BalancerTag,"p2p not wrong -> "+e.id+t(304)+e[t(274)]),this._endDownload(t(250)+e.id+" "+e.size+t(262)+i,l)}else{let n=0;const r=new Uint8Array(i);for(const i of e.data)r[t(276)](new Uint8Array(i),n),n+=i[t(384)];0!=e[t(274)]&&this._loader[t(317)](this,e.id,a,r,e.size)}}else r.default[t(330)](s.BalancerTag,t(342)+this.id+t(324))}}[C(333)](e){const t=C;if(this[t(327)])return;this._version>=2&&(this[t(366)]++,0==this[t(366)]&&this._operationId++);let i=this._operationId;r.default[t(330)](s.BalancerTag,"OPERATION ID -> "+i),this._startTimeout(e,i),this[t(337)]({[a.CE[t(335)]]:a.mH[t(333)],[a.CE.id]:e,[a.CE[t(331)]]:i},a.b3.message)}[C(367)](e){const t=C;r.default[t(330)](s.BalancerTag,t(370)+this.id),this._send({[a.CE[t(335)]]:a.mH[t(367)],[a.CE[t(405)]]:Date[t(321)](),[a.CE.id]:e,[a.CE[t(331)]]:this.id},a.b3[t(398)])}pong(e,t){const i=C;r.default[i(330)](s.BalancerTag,i(308)+this.id),this[i(337)]({[a.CE[i(335)]]:a.mH[i(372)],[a.CE.time]:t,[a.CE.id]:e,[a.CE.identifier]:this.id},a.b3[i(398)])}_cancelRequest(e,t){const i=C;this[i(337)]({[a.CE.command]:a.mH[i(291)],[a.CE.id]:e,[a.CE[i(331)]]:t},a.b3[i(398)])}[C(298)](e){return D(this,void 0,void 0,(function*(){const t=L;this[t(327)]||this[t(337)]({[a.CE[t(335)]]:a.mH[t(307)],[a.CE[t(307)]]:e},a.b3[t(398)])}))}[C(394)](e,t,i){var n;return D(this,void 0,void 0,(function*(){const o=L;
2if(!this[o(327)]){if(t[o(392)]&&this[o(282)]&&null==this._cancel[o(249)](i)){this[o(337)]({[a.CE[o(335)]]:a.mH[o(392)],[a.CE.id]:e,[a.CE[o(274)]]:t.realBodySize,[a.CE[o(331)]]:i,[a.CE[o(279)]]:Math[o(325)](t.data.byteLength/a.LI[o(284)])+1},a.b3[o(398)]);let l=t.realBodySize,d=0,u=this[o(275)](i),c=P.from([a.b3[o(392)],u[0],u[1],0]),h=l;t[o(407)]++;let p=Date[o(321)]();try{for(;h>0&&!this[o(282)][o(249)](i);){const e=Math[o(378)](h,a.LI[o(284)]);for(;t&&t.data&&t[o(392)][o(384)]&&e+d>t[o(392)][o(384)]&&!this[o(282)].get(i);)yield new Promise((e=>setTimeout(e,2)));this[o(314)].send(P[o(393)]([c,P.from(t[o(392)],(null===(n=t.data)||void 0===n?void 0:n[o(384)])-h,e)])),d+=e,h-=e}}catch(e){r.default.debug(s.BalancerTag,"Could not send message to peer (maybe it was destroyed)")}this[o(292)]=this._totalSendBytes+d,this[o(363)]=Date[o(321)]()-p,this._totalSendSegments++,t[o(407)]--,this[o(282)][o(249)](i)?this[o(383)][o(386)](t[o(392)].byteLength-h):(this._lastSent[o(290)]({time:Date[o(321)](),size:t.data[o(384)]}),this._loader[o(348)](t[o(392)][o(384)]))}else r.default[o(330)](s.BalancerTag,o(272));null!=this._cancel[o(249)](i)&&(r.default.debug(s.BalancerTag,o(273)),this[o(282)][o(305)](i))}}))}[C(275)](e){let t=[0,0];return t[0]=e>>8&255,t[1]=255&e,t}[C(319)](e){return(255&e[0])<<8|255&e[1]}[C(296)](e,t){const i=C;this[i(337)]({[a.CE[i(335)]]:a.mH.absent,[a.CE.id]:e,[a.CE[i(331)]]:t},a.b3[i(398)])}sendNewSegmentAvailable(e,t,i,n){return D(this,void 0,void 0,(function*(){const r=L;this._destroyed||this._send({[a.CE[r(335)]]:a.mH[r(376)],[a.CE.id]:e,[a.CE.size]:t,[a.CE[r(323)]]:i,[a.CE[r(351)]]:Date[r(321)](),[a.CE.createdAt]:n},a.b3[r(398)])}))}[C(337)](e,t){const i=C;try{this[i(314)].send(P[i(393)]([P[i(287)]([t,0,0,a.jQ[i(396)]]),P[i(287)](JSON[i(316)](e))]))}catch(e){r.default[i(330)](s.BalancerTag,"Could not send message to peer (maybe it was destroyed)")}}[C(341)](){return this._segmentMap}[C(373)](e,t){const i=C;r.default.debug(s.BalancerTag,i(347)+t),this[i(254)][i(276)](t,{id:e,data:[],startTime:0,size:0}),setTimeout((()=>{const n=i;var r;const s=this[n(358)][n(334)](e);if(s<0){this[n(300)](e,t);let i=0;i=(null===(r=this[n(254)][n(249)](t))||void 0===r?void 0:r[n(274)])||0,this[n(383)][n(261)](this,e,i),this._endDownload(n(375)+e+" "+a.LI[n(350)],t)}else this[n(358)].splice(s,1)}),a.LI.timeout)}[C(269)](){const e=C;var t;return(null===(t=this[e(264)][0])||void 0===t?void 0:t[e(405)])||0}static[C(382)](e){const t=C;let i=0;const n=Date[t(321)]();for(let r=0;r<e[t(280)];)e[r][t(405)]+a.Ji[t(251)]<n?e.splice(r,1):(i+=e[r][t(274)],++r);return i}[C(256)](){const e=C;return I[e(382)](this[e(264)])}getLastUploadsTraffic(){const e=C;return I[e(382)](this[e(346)])}}const R=N;function N(e,t){const i=M();return(N=function(e,t){return i[e-=403]})(e,t)}!function(e){const t=N,i=e();for(;;)try{if(168238==parseInt(t(404))/1*(-parseInt(t(424))/2)+parseInt(t(415))/3*(-parseInt(t(421))/4)+-parseInt(t(407))/5+-parseInt(t(403))/6+parseInt(t(420))/7+-parseInt(t(413))/8*(parseInt(t(412))/9)+parseInt(t(414))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(M);class O{constructor(e){this[N(411)]=[],this.size=e}[R(406)](e){const t=R;for(this[t(411)][t(416)](e);this[t(411)][t(410)]>this[t(418)];)this[t(408)]()}removeFirst(){const e=R;if(!this[e(419)]())return this.array[e(423)]()}[R(405)](){const e=R;if(!this.isEmpty())return this[e(411)][0]}[R(419)](){const e=R;return 0===this[e(411)][e(410)]}copyArray(){const e=R;return Object[e(417)]([],this[e(411)])}[R(422)](e){const t=R,i=Object.assign([],this.array);return i.length<=e?i:i[t(409)](i[t(410)]-e)}}function M(){const e=["2148147LaZycO","8UFlcTD","9541470OodjAW","816KOhCAM","push","assign","size","isEmpty","1566404iykQWv","3464OtpUjX","lastn","shift","220768WtKSvp","1534320DXdbgM","2RlhQkE","peek","add","294790IiGCBw","removeFirst","splice","length","array"];return(M=function(){return e})()}const x=V;function B(){const e=["forEach","lastn","_lastResponses","toLowerCase","targetDuration","getAvgResponseTime","statusCode","lastPreferedVideoChunkSize","switchesDueToConnectivity","1302156nVgOUC","_incrementCacheCount","_updateCacheCount","maxThroughput","url","minResponseBytes","samplesThroughput","Audio","bandwidth","score","calculateEffe
2ctiveBandwidth"," at ","unbannedTime","active","MAX_SAFE_INTEGER","host","Unknown","lastPreferedVideoChunkDownloadTime","wBandwidthForScoring","STREBOPX","auth","maxNetworkLatency","header","downloadedSegments","isChecked","sumVideoBytes","getAvgRecentWBandwidth","1gWgXgR","maxResponseTime","weight","pushLastPreferedVideoBandwidth","360GPguzl","uncompressedBytes","highestPingTime","28284yEdMSx","isAudio","hugeChunks","samplesResponseTime","http3xxResponses","headers","rendition","sumResponseBytes","usedOrProbed","getBandwidth","bannedRefTicToc","getWeightedBandwidth","wBandwidth","resetOnPing","incrementSwitchesDueToErrors","updateAvailability","size","maxBandwidth","trunc","_processCdnCache","minNetworkLatency","dnsEnabled","highestSegmentBandwidth","addResp","sumNetworkLatency","min","30nCkmzo","totalFail","946482zodehZ","setLastResponses","shift","1498XeHRJr","map","58512mVyUos","push","setChecked","switchesDueToQuality","resetBandwidth","original","avgPingTime","MB/s size-> ","downloadMillis","getAvgBandwidth","lastPreferedVideoBandwidth","getAvgRecentBandwidth","1398447rWHcpW","fromEntries","failed","max","sumResponseTime","regex","absolute","keys","price","http5xxResponses","sumVideoTime","10482JvywKf","assign","provider","numberOfCdnCacheMisses","clone","http4xxResponses","downloadedChunks","getCdnCacheMisses","route","sumThroughput","compressedBytes","type","verbose","11dOMavz","downloadedChunksVideo","bannedTime","getAvgWBandwidth","add","browserCacheHits","getAvgLastVideoBandwidth","addProbe","_lastsPreferedVideoBandwidth","incrementSwitchesDueToQuality","numberOfCdnCacheUnknowns","updateStatusCodeCounters","http2xxResponses","downloadedBytesForScoring","samplesNetworkLatency","video","undefined","31550316dEgvta","getVideoBandwidth","includes","toFixed","copyArray","test","STREBOOS","minThroughput","bandwidthForScoring","name","initialBw","lowestPingTime","firstHugeChunkSize","length","getBandwidthInBits","_accumBw","CODAVEL","usedOnce","minResponseTime","http1xxResponses","getCdnCacheHits","lowestSegmentBandwidth","now","_parser","numberOfCdnCacheHits","s from ","downloadTimeForScoring","minRequestSizeForBwEstimateKB","downloadTimeMs","time","downloadedBytesVideo","isHeaderMatch","list","isRangeCompatible","retries","samplesResponseBytes","downloadMillisVideo","downloadedBytes","switchesDueToErrors"," segment of ","switches","Downloaded a ","_checked","path","highestRenditionBandwidth","banned","maxResponseBytes","getOldestRequestTS","getLastResponse","setBandwidth","_updateCacheCounts"];return(B=function(){return e})()}!function(e){const t=V,i=e();for(;;)try{if(365467==-parseInt(t(377))/1*(parseInt(t(232))/2)+-parseInt(t(350))/3+-parseInt(t(384))/4*(parseInt(t(381))/5)+parseInt(t(260))/6*(-parseInt(t(235))/7)+-parseInt(t(237))/8+-parseInt(t(249))/9*(parseInt(t(230))/10)+-parseInt(t(273))/11*(-parseInt(t(290))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(B);class U{constructor(e,t,i,n,r,s,a,o,l,d,u,c,h){const p=V;this.bannedCount=0,this.unBannedCount=0,this[p(266)]=0,this[p(327)]=0,this.downloadedBytesForScoring=0,this[p(316)]=0,this[p(386)]=0,this[p(302)]=0,this[p(298)]=new O(20),this[p(368)]=new O(20),this.failures=0,this[p(324)]=0,this.totalFail=0,this.browserCacheHits=0,this.numberOfCdnCacheHits=0,this[p(263)]=0,this[p(283)]=0,this[p(245)]=0,this[p(307)]=!1,this[p(320)]=0,this[p(326)]=0,this[p(274)]=0,this.unbannedTime=0,this[p(275)]=0,this[p(394)]=Date[p(312)](),this.lastUpdatedState=0,this[p(221)]=1e12,this[p(247)]=0,this[p(281)]=[],this[p(334)]=0,this[p(348)]=0,this[p(367)]=0,this.lastPingTime=0,this[p(305)]=U[p(300)],this[p(358)]=new O(20),this[p(396)]=new O(20),this._lastResponses=[],this[p(226)]=0,this[p(311)]=Number[p(364)],this[p(383)]=0,this[p(301)]=Number[p(364)],this[p(243)]=0,this[p(323)]=!0,this[p(332)]=!1,this[p(373)]=new Array,this[p(392)]=!1,this[p(262)]=e,this.internal_provider=[p(306),p(296),p(369)][p(292)](e)?t:e,this[p(299)]=t,this[p(365)]=i,this[p(333)]=n,this.url=r,this[p(359)]=s,this.price=o,this.weight=l,this[p(255)]=d,this[p(225)]=u,this[p(370)]=c,this[p(242)]=a,this[p(363)]=!0,this.banned=!1,this[p(313)]=h}[x(380)](e){const t=x;this[t(281)][t(238)](e),this[t(281)][t(303)]>5&&this[t(281)][t(234)]()}[x(279)](){const e=x;let t=0,i=0;for(i=0;i<this[e(281)].length;i++)t+=this[e(281)][i];return t/i}[x(338)](){const e=x;return 0===this[e(343)].length?{time:Date[e(312)](),size:0}:this[e(343)][this[e(343)].length-1]}[x(233)](e){this[x(343)]=e}addResponse(e){this._lastResponses.push(e)}[x(346)](){const e=x;return 0==this[e(266)]?0:this[e(245)]/this[e(266)]}[x(310)](){return this.numberOfCdnCacheHits}[x(267)](){return this[x(263)]}_processCdnCache(e){const t=x;if(!this[t(313)]||!e[t(389)])return;const i=Object[t(250)](Object.entries(e[t(389)])[t(236)]((([e,i])=>[e[t(344)](),i]))),{hit:n,miss:r}=this._parser.cache;n&&r?this[t(340)](n,r,i):this[t(352)](n||r,i,!!n)}[x(340)](e,t,i){const n=x;var r,s;const a=null!==(r=null==e?void 0:e[n(372)].toLowerCase())&&void 0!==r?r:"",o=null!==(s=null==t?void 0:t[n(372)][n(344)]())&&void 0!==s?s:"",l=a in i&&u.isHeaderMatch(i[a],e),d=o in i&&u[n(321)](i[o],t);l?this.numberOfCdnCacheHits++:d?this.numberOfCdnCacheMisses++:this.numberOfCdnCache
2Unknowns++}[x(352)](e,t,i){const n=x;var r;const s=null!==(r=null==e?void 0:e[n(372)][n(344)]())&&void 0!==r?r:"";if(s in t){const r=t[s];let a=!1;e[n(271)]===n(322)?a=e.pattern[n(292)](r):e[n(271)]===n(254)&&(a=new RegExp(e.pattern)[n(295)](r)),a?this[n(351)](i):this[n(351)](!i)}else this[n(351)](!i)}[x(351)](e){e?this[x(314)]++:this.numberOfCdnCacheMisses++}[x(227)](e){const t=x;var i,n;const o=e[t(268)],l=e[t(358)]||0,d=e[t(220)]||0,u=e[t(318)]||0,c=e[t(251)];if(this[t(392)]=!0,this[t(284)](e[t(347)]),c)return this[t(324)]++,void this[t(231)]++;this[t(266)]++,this[t(327)]+=d,typeof this[t(391)]===t(289)?this.sumResponseBytes=d:this[t(391)]+=d,typeof this[t(355)]===t(289)?this[t(355)]=d:this.minResponseBytes=Math[t(229)](this[t(355)],d),typeof this.maxResponseBytes===t(289)?this.maxResponseBytes=d:this[t(336)]=Math[t(252)](this.maxResponseBytes,d),void 0===this[t(325)]?this[t(325)]=1:this[t(325)]+=1,null!=e.compressedBytes&&null!=e[t(382)]&&(void 0===this[t(270)]?this[t(270)]=e[t(270)]:this[t(270)]+=e[t(270)],typeof this[t(382)]===t(289)?this.uncompressedBytes=e.uncompressedBytes:this[t(382)]+=e[t(382)]),this[t(223)](e),null!=e[t(390)]&&e[t(390)][t(385)]&&0==this[t(386)]&&(this.usedOnce=!1),(null==e[t(390)]||!e[t(390)][t(385)])&&(this[t(286)]+=d,this[t(316)]+=u,this.usedOnce=!0,this.hugeChunks++,0==this[t(302)]&&(this.firstHugeChunkSize=d)),a.Y4.forEach((i=>{const n=t;if(o.indexOf(i)>=0){let t=!0;l>0?(d>1e3*a._C[n(317)]&&(t=!1,this[n(305)]=this[n(305)]!==U.initialBw?Math[n(222)](this._accumBw*(1-a.Zq.lastMeasurementWeight)+l*a.Zq.lastMeasurementWeight):l),this[n(358)][n(277)](l),this[n(396)][n(277)]({bw:l*d,ct:d}),(null==e[n(390)]||!e.rendition[n(385)])&&(this[n(298)][n(277)](l),this.wBandwidthForScoring[n(277)]({bw:l*d,ct:d}),this.downloadMillisVideo+=u,this[n(320)]+=d,this.downloadedChunksVideo++,typeof this[n(269)]===n(289)?this[n(269)]=l:this[n(269)]+=l,typeof this.minThroughput===n(289)?this[n(297)]=l:this[n(297)]=Math[n(229)](this[n(297)],l),typeof this[n(353)]===n(289)?this[n(353)]=l:this.maxThroughput=Math[n(252)](this[n(353)],l),typeof this.samplesThroughput===n(289)?this[n(356)]=1:this[n(356)]+=1,typeof this[n(375)]===n(289)?this[n(375)]=d:this.sumVideoBytes+=d,typeof this.sumVideoTime===n(289)?this.sumVideoTime=u:this[n(259)]+=u)):this[n(278)]++,0==this[n(305)]&&!t&&(this[n(307)]=!1)}})),0==this[t(327)]&&(this[t(307)]=!1),l>this[t(226)]&&(this[t(226)]=l),l<this.lowestSegmentBandwidth&&(this[t(311)]=l),this[t(245)]+=u,typeof this[t(253)]===t(289)?this[t(253)]=u:this[t(253)]+=u,typeof this[t(308)]===t(289)?this[t(308)]=u:this[t(308)]=Math[t(229)](this[t(308)],u),void 0===this[t(378)]?this[t(378)]=u:this[t(378)]=Math.max(this.maxResponseTime,u),typeof this.samplesResponseTime===t(289)?this.samplesResponseTime=1:this.samplesResponseTime+=1,this[t(343)].push({time:Date[t(312)](),size:d}),(null==e.rendition||!(null===(i=e.rendition)||void 0===i?void 0:i.isAudio))&&(this[t(348)]=d,this[t(367)]=u),null!=e[t(390)]&&this[t(334)]<e[t(390)][t(358)]&&(this[t(334)]=e[t(390)][t(358)]),(null==e.rendition||!(null===(n=e[t(390)])||void 0===n?void 0:n[t(385)]))&&(this[t(247)]=e[t(358)],this[t(380)](e[t(358)]));let h=t(366);e.rendition&&(h=e[t(390)][t(385)]?t(357):t(288));let p=0;e[t(390)]&&(p=e[t(390)][t(345)]),r.default[t(272)](s.BalancerTag,t(331)+h+t(329)+p+t(315)+e.cdnName+t(361)+Number(l/1e6)[t(293)](2)+t(244)+Number(d/1024)[t(293)](2)+"kb in "+u)}[x(360)](e,t){const i=x,n=this[i(367)],r=this[i(348)];let s=this.lastPingTime,a=n-s;if(a<=0&&(s=n,a=n),r<=0)return 0;const o=e/8*t,l=o*a/r+2*s;return 0==l?0:8*o/(l/1e3)}[x(291)](){const e=x;return(this.downloadedBytesForScoring||0)/((this[e(316)]||1)/1e3)*8}[x(393)](){return this[x(305)]}[x(339)](e){this[x(305)]=e}[x(304)](){return 8*this[x(305)]}[x(246)](){const e=x;let t=0,i=0;for(const n of this[e(358)][e(294)]())t+=n,i++;return i>0?t/i:0}[x(248)](){const e=x;let t=0,i=0;for(const n of this[e(358)][e(342)](4))t+=n,i++;return i>0?t/i:0}[x(276)](){const e=x;let t=0,i=0;for(const n of this[e(368)].copyArray())t+=n.bw,i+=n.ct;return i>0?t/i:0}[x(376)](){const e=x;let t=0,i=0;for(const n of this[e(368)][e(342)](4))t+=n.bw,i+=n.ct;return i>0?t/i:0}[x(395)](){const e=x;return.45*this.getAvgWBandwidth()+.55*this[e(376)]()}[x(241)](){this[x(305)]=U.initialBw}[x(337)](){const e=x;var t;return(null===(t=this[e(343)][0])||void 0===t?void 0:t[e(319)])||0}[x(264)](){const e=x,t=new U(this.provider,this[e(299)],this[e(365)],this[e(333)],this[e(354)],this.score,this[e(242)],this[e(257)],this[e(379)],this[e(255)],this.dnsEnabled,this[e(370)],this[e(313)]);return Object[e(256)](this)[e(341)]((i=>{const n=e,r=i,s={};s[r]=this[r],Object[n(261)](t,s)})),t}[x(280)](e){const t=x;typeof this[t(228)]===t(289)?this.sumNetworkLatency=e:this[t(228)]+=e,typeof this[t(224)]===t(289)?this.minNetworkLatency=e:this[t(224)]=Math[t(229)](this.minNetworkLatency,e),void 0===this[t(371)]?this[t(371)]=e:this[t(371)]=Math[t(252)](this[t(371)],e),typeof this[t(287)]===t(289)?this[t(287)]=1:this[t(287)]+=1}[x(284)](e){const t=x;null!=e&&(e>=100&&e<=199?this[t(309)]=(this.http1xxResponses||0)+1:e>=200&&e<=299?this[t(285)]=(this[t(285)]||0)+1:e>=300&&e<=399?this[t(388)]=(this[t(388)]||0)+1:e>=400&&e<=499?this[t(265)]=(this[t(265)]||0)+1:e>=500&&e<=599&&(this[t(258)]=(this[t(258)]||0)+1))}
2[x(219)](){const e=x,t=Date[e(312)]();this[e(335)]?(this[e(275)]+=t-this[e(394)],this.bannedRefTicToc=t):(this.unbannedTime+=t-this[e(394)],this[e(394)]=t)}incrementSwitches(){const e=x;typeof this[e(330)]===e(289)?this[e(330)]=1:this[e(330)]+=1}[x(282)](){const e=x;void 0===this.switchesDueToQuality?this.switchesDueToQuality=1:this[e(240)]+=1}incrementSwitchesDueToConnectivity(){const e=x;typeof this.switchesDueToConnectivity===e(289)?this[e(349)]=1:this[e(349)]+=1}[x(218)](){const e=x;void 0===this[e(328)]?this[e(328)]=1:this[e(328)]+=1}[x(217)](){const e=x;this[e(391)]=void 0,this[e(355)]=void 0,this[e(336)]=void 0,this[e(325)]=void 0,this[e(253)]=void 0,this[e(308)]=void 0,this[e(378)]=void 0,this[e(387)]=void 0,this[e(228)]=void 0,this[e(224)]=void 0,this[e(371)]=void 0,this.samplesNetworkLatency=void 0,this[e(269)]=void 0,this[e(297)]=void 0,this.maxThroughput=void 0,this.samplesThroughput=void 0,this[e(375)]=void 0,this[e(259)]=void 0,this[e(362)]=0,this[e(275)]=0,this.bannedRefTicToc=Date[e(312)]()}isCodavel(){const e=x;return[e(306),e(296),"STREBOPX"][e(292)](this[e(262)])}[x(239)](){this[x(332)]=!0}[x(374)](){return this._checked}}function V(e,t){const i=B();return(V=function(e,t){return i[e-=217]})(e,t)}U[x(300)]=9e12;var F=q;function q(e,t){var i=H();return(q=function(e,t){return i[e-=455]})(e,t)}!function(e){for(var t=q,i=e();;)try{if(457813==parseInt(t(472))/1+-parseInt(t(460))/2*(-parseInt(t(458))/3)+parseInt(t(475))/4*(parseInt(t(465))/5)+parseInt(t(462))/6*(parseInt(t(473))/7)+parseInt(t(455))/8+parseInt(t(457))/9+-parseInt(t(468))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(H);class j{constructor(){var e=q;this[e(471)]=0,this.pingsTime=0,this[e(470)]=0,this[e(467)]=0,this[e(469)]=Number[e(459)]}add(e){var t=q;this[t(467)]=Math[t(461)](this[t(467)],e),this[t(469)]=Math.min(this[t(469)],e),this[t(463)]+=e,this[t(471)]++,this[t(470)]=0===this.averagePing?e:Math.trunc(this.averagePing*(1-a.Zq[t(466)])+e*a.Zq[t(466)])}[F(464)](){return this[F(470)]}[F(474)](){return this[F(467)]}getMinPingTime(){return this[F(469)]}[F(456)](){return this.pingsTime/this.pingsCounter}}function H(){var e=["_minPing","averagePing","pingsCounter","114147hijaIz","1020327jjzbLg","getMaxPingTime","742780JygvBL","7313456dyFJwu","getSimpleAveragePingTime","1114884ypupiI","132CEYLMl","MAX_SAFE_INTEGER","7394NKnMku","max","6wekOEG","pingsTime","getAvgPingTime","20OXAbtX","lastMeasurementWeight","_maxPing","17456010LBPaTY"];return(H=function(){return e})()}function G(){const e=["9682QNwZcS","throw","bandwidth","8XyfNJK","next","2750520SjpYLF","726777FipeEO","5849184lqyNBg","330OziWaZ","monitor","__awaiter","_isMonitoring","p2pLoader","getPeers","isEnabled","5978301YNONev","lastDownloadedSegment","38470JGIxRY","5122224ORrivi","length","apply","_lastPingBroadcast","timeBetweenBurstsMilliseconds","3753bKviKI","newDownloadedSegment","now","getPeersWithContent","_pingBroadcastTimeInSeconds","value","testPeer","ping","pingTime","values"];return(G=function(){return e})()}function W(e,t){const i=G();return(W=function(e,t){return i[e-=311]})(e,t)}const X=W;!function(e){const t=W,i=e();for(;;)try{if(884629==parseInt(t(311))/1*(parseInt(t(319))/2)+parseInt(t(317))/3+-parseInt(t(329))/4+parseInt(t(316))/5+-parseInt(t(318))/6+parseInt(t(326))/7*(-parseInt(t(314))/8)+parseInt(t(334))/9*(parseInt(t(328))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(G);class K{constructor(e){const t=X;this[t(313)]=new Map,this[t(342)]=new Map,this[t(322)]=!1,this[t(338)]=60,this[t(332)]=Date[t(336)](),this[t(323)]=e}[X(335)](e){this[X(327)]=e}[X(320)](){return e=this,i=function*(){const e=W;if(!this[e(322)])for(this[e(322)]=!0;;){if(Date[e(336)]()-this[e(332)]>1e3*this[e(338)])for(let t of this[e(323)][e(324)]()[e(343)]())this.testPeer(t);else{for(;!this[e(327)];)yield new Promise((e=>setTimeout(e,1e3)));const t=this[e(323)][e(337)](this[e(327)]);t[e(330)]>0&&this.testPeer(t[0])}yield new Promise((t=>setTimeout(t,a.wc[e(333)])))}},new((t=void 0)||(t=Promise))((function(n,r){const s=W;function a(e){const t=W;try{l(i[t(315)](e))}catch(e){r(e)}}function o(e){const t=W;try{l(i[t(312)](e))}catch(e){r(e)}}function l(e){const i=W;var r;e.done?n(e[i(339)]):(r=e[i(339)],r instanceof t?r:new t((function(e){e(r)}))).then(a,o)}l((i=i[s(331)](e,[]))[s(315)]())}));var e,t,i}[X(340)](e){const t=X;this.p2pLoader[t(325)]()&&e[t(341)](e.id)}static getInstance(e){return null!=e&&(this._instance=new K(e)),this._instance}}const z=Q;function Y(){const e=["map","yes","length","_minResponseBytes","Warning","consecutiveHaveSegment","getStats","  audio -> ","WebRtcEvents"," peer-timeouts: ","_minResponseTime","422497vjLJaB","_availablePeersMap"," | ","_uplodadedPeers","P2P MAP send map to peer  ","_timeoutRequests","isBehind","sendNewSegmentAvailable","getLastDownloadsTraffic","forEach","origRes","getDownloadBandwidth","getLastResponses","_chunkDownloadCount","_minPeersParallelUsed","964xNeMTH","_maxPeersAvailable","_peersUsed","_storage","getMaxPeers","4137138emuSae","announcedP2P","_totalPeerSet","initialBw","getMissingPeers","add","isMaxPeers","updatePeerMetrics","P2P ADDPEERCANDIDATE - received message from ","data","_maxResponseTime","_samplesNetworkLatency","_bannedPeers","3305360YuXdIe","has","_performReset","maxConnectedPeers","trackerAnnounce","peerSegmentLoaded","disable","_options","debug","getInstance","getSegmentMap","P2P New peer candidate ","addPeerRe
2sponse","_peersAvailable","4646292JeNhOO","peerCanceledSegmentUpload","_chunkUploadDiscardedCount","_sumThroughput","Already banned peer -> ","setSettings","get","_offerInterval","delete","getPeersAhead","_downloadedChunksVideo","_downloadedBytesVideo","random","createMap","BANNING Peer -> ","getPeersBehind","setContent","getOldestRequestTS","_maxThroughput","_accountCode","_samplesResponseTime","time","error","getId","P2P Unable to request to more peers max concurrency (","getSegment","pathname","undefined","Problem max concurrency ","videoId","_maxResponseBytes","avgPingTime","concat","rendition","_p2pManager","p2pId","_minNetworkLatency","P2P Requesting segment ","_sendMapToAllPeersV0","max","_uploadRequestsFailed","_minBandwidth","Active downloads vs max concurrencui P2PMO -> ","P2P Requesting new segment ","slice","_byteDownloadCount","_accumBw","indexOf","isAhead","P2P Error: ","sort","_cdnObject","splice","consumeOnly","getLastBandwith","_activeDownloads","_segmentAbsentRequests","resetP2PConnection","enable","_byteUploadCount","_activePeerSet","rejoin","getUploadedBytes","p2p","_errorRequests","_timeoutDiscardedBytes","getCdnObject","P2PSMAP new segment to all peers: ","getUploadedUniqPeers","_maxNetworkLatency","getPeersWithContent","getTotalSendTime","_isEnabled","getMaxPingTime"," SM Size-> ","_segmentsRequested","P2P support enabled ","realBodySize","bind","setBandwidth","getPeers","_errorListener"," not available ","Constants","sendJoin","onConnected","_packageFound","_byteUploadDiscardedCount","_candidates","531102IzYZOJ","endTime","getMaxSize","peerCloseListener","P2PManager","_downloadMillisVideo","getAvgPingTime","_sumNetworkLatency","getLastLatencyP2P","isEnabled","destroy","upload","now"," pos: ","_minPeersAvailable","MAX_SAFE_INTEGER","_sendMapToPeer","timeouts","_sumResponseTime","maxParallelP2PDownloads","_minThroughput","_maxConcurrent","_peerConnectionTime",") already reached","sendNoSegment","isAudio","https://localhost","_chunkUploadCount","_cdnPingTimeBean","request","_failedRequests","_samplesThroughput","byteLength"," peers: ","_peersParallelUsed","verbose","P2P support disabled.","_warningListener","_peers","_peerDiscoveryTime","onDiscovery","_downloadMillis","getBannedPeers","_activeDownloadIds","_maxConnectedPeers","_maxBandwidth","sendMap","storeSegment","5442EbhuPx","_destroyed","startMonitoring","_updatePeersMetricsRefCounter","noContentObtained","min","_sumVideoTime","push","resource"," available from peer ","40VGsEDA","maxConcurrency","onOffer","peerRequestsPerAnnounce","lastMeasurementWeight","getUploadedChunks","_maxPeersParallelUsed","P2P Warning ","enabled","CREATEPEERCONNECTING","triedP2P","Already have max peers","_monitoringStarted","peerFailedSegmentTimeout","monitor","_samplesResponseBytes","getVersion","getLastUploadsTraffic","set","_sumVideoBytes","size","createdAt","trunc","1423812PKGBtP"," size -> ","sendSegment","addResponse","values","_sendNewSegmentToAllPeersV1","_uploadRequests","addPeerCandidate","getMinPingTime","_sumResponseBytes"," last msg -> "];return(Y=function(){return e})()}function Q(e,t){const i=Y();return(Q=function(e,t){return i[e-=328]})(e,t)}!function(e){const t=Q,i=e();for(;;)try{if(812666==-parseInt(t(442))/1+-parseInt(t(420))/2+-parseInt(t(387))/3*(parseInt(t(457))/4)+parseInt(t(475))/5+parseInt(t(339))/6+-parseInt(t(489))/7+-parseInt(t(397))/8*(-parseInt(t(462))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Y);class J{constructor(e,t,i){const n=Q;this[n(350)]=a.LI.upload,this[n(561)]=!1,this._packageFound=!1,this[n(360)]=a.LI[n(398)],this._maxConnectedPeers=a.LI[n(478)],this[n(377)]=new Map,this._bannedPeers=new Map,this[n(338)]=new Map,this[n(544)]=0,this[n(564)]=new Map,this[n(382)]=[],this._monitoringStarted=!1,this[n(477)]=!1,this._downloadedPeers=new Map,this[n(445)]=new Map,this[n(384)]=0,this[n(530)]=Number[n(354)],this._timeoutDiscardedBytes=0,this[n(369)]=0,this[n(447)]=0,this[n(545)]=0,this[n(553)]=0,this[n(380)]=0,this[n(534)]=0,this._chunkDownloadCount=0,this[n(464)]=new Set,this._activePeerSet=new Set,this[n(443)]=new Map,this[n(390)]=0,this[n(496)]=45e3,this._accumBw=U[n(465)],this[n(344)
2]=0,this[n(500)]=0,this[n(499)]=0,this._byteUploadDiscardedCount=0,this[n(491)]=0,this[n(366)]=0,this[n(548)]=0,this[n(426)]=0,this[n(529)]=0,this[n(388)]=!1,this._accountCode=e,this[n(482)]=t,this[n(460)]=i,this[n(540)]=new U("P2P","P2P","","","",1,!1,0,0,!1,!1),this[n(540)][n(329)](this[n(535)]),this._cdnObject.setLastResponses(this.getLastResponses()),this._cdnPingTimeBean=new j,window[n(343)]?this[n(336)]=!0:r.default.notice(s.BalancerTag,"P2P dependency does not exist. Disabling P2P!")}[z(348)](){const e=z;return this[e(336)]&&this[e(561)]}[z(547)](){this[z(561)]=!0}[z(481)](){this[z(561)]=!1}getStorage(){return this[z(460)]}[z(557)](){const e=z;return this[e(445)][e(417)]}[z(498)](){const e=z;let t=0;for(const i of this[e(377)][e(424)]())i[e(537)]&&t++;return t}[z(504)](){const e=z;let t=0;for(const i of this[e(377)][e(424)]())i[e(448)]&&t++;return t}getPeersNothing(){const e=z;let t=0;for(const i of this[e(377)][e(424)]())i[e(537)]||i.isBehind||t++;return t}[z(512)](){const e=z;var t;return null===(t=this._p2pManager)||void 0===t?void 0:t[e(512)]()}[z(555)](){return this._cdnObject}[z(546)](){this._performReset=!0}[z(334)](){const e=z;var t,i;if(this._packageFound&&this[e(561)]){const n=new URL(null!==(t=this[e(482)].resource)&&void 0!==t?t:"https://localhost"),r=this._accountCode+(this[e(482)][e(518)]||n[e(515)]);null===(i=this._p2pManager)||void 0===i||i[e(550)](r)}}[z(494)](e){const t=z;var i;if(this[t(336)]&&!this[t(561)])if(e[t(552)]&&e[t(552)][t(405)]){this[t(561)]=!0,this[t(350)]=!e[t(552)][t(542)]||a.LI.upload,this[t(360)]=e[t(552)][t(358)]||a.LI[t(398)],this._maxConnectedPeers=e[t(552)].maxConnectedPeers||a.LI.maxConnectedPeers;const n=new URL(null!==(i=this[t(482)][t(395)])&&void 0!==i?i:t(365)),o=this[t(508)]+(this[t(482)][t(518)]||n[t(515)]);this[t(523)]=new(window[t(343)])(this,o,{tracker:e[t(552)][t(479)]||a.LI.tracker,accountCode:this[t(508)],announcePeers:e.p2p[t(400)]}),this[t(523)].on(window[t(343)][t(333)][t(439)].Error,J[t(331)][t(328)](this)).on(window[t(343)][t(333)][t(439)][t(435)],J[t(376)][t(328)](this)).start(),r.default[t(483)](s.BalancerTag,t(565)+this.getId())}else r.default[t(483)](s.BalancerTag,t(375)),this[t(561)]=!1}[z(389)](){const e=z;this[e(409)]||(this[e(409)]=!0,K[e(484)]()[e(411)]())}[z(468)](){const e=z;return this[e(377)].size>this._maxConnectedPeers&&(r.default[e(374)](s.BalancerTag,"Max peers reached -> "+this[e(377)][e(417)]),!0)}[z(466)](){const e=z;return this._maxConnectedPeers-this[e(377)][e(417)]}[z(461)](){return this[z(383)]}[z(381)](){return this[z(474)]}getUploadRequests(){return this[z(426)]}getUploadRequestsFailed(){return this[z(529)]}[z(514)](e){const t=z;return this[t(460)][t(514)](e.p2pId)}[z(559)](e){const t=z;if(this._destroyed||0==this[t(377)].size)return[];const i=[];for(const n of this._peers[t(424)]())if(0==n[t(485)]()[t(433)]){const e=Date[t(351)]()-n.getLastSegmentDataMessagesTime();(e>3e4&&n.getSegmentDataMessages()<2||e>12e4)&&(this[t(474)][t(415)](n.id,!0),n[t(349)](),this[t(342)](n),r.default.verbose(s.BalancerTag,t(503)+n.id+t(563)+n[t(485)]()[t(433)]+t(430)+e/1e3+"s messages: "+n.getSegmentDataMessages()))}else(!n.isDownloading()||n[t(413)]()>=2)&&n[t(485)]()[t(433)]>0&&n[t(485)]()[t(536)](e[t(524)])>=0&&i.push(n);if(0==i[t(433)])return[];let n=[];for(const e of i)e.getLastLatencyP2P()>0&&e[t(347)]()<5&&n[t(394)](e);if(0==n[t(433)])for(const e of i)e.getLastLatencyP2P()>0&&e[t(347)]()<7&&n.push(e);if(0==n.length){let e=[];for(const r of i)0==r[t(543)]()&&0==r.timeouts&&n[t(394)](r),r[t(543)]()>0&&e[t(394)](r);e=e.sort(((e,i)=>i.getLastBandwith()-e[t(543)]())),n=e[t(433)]<4?n[t(521)](e):n[t(521)](e[t(533)](0,3))}return 0==n[t(433)]&&(n=i),n}[z(368)](e,t){const i=z;var n,a,o;if(!this[i(336)])return!1;if(r.default[i(374)](s.BalancerTag,i(531)+this[i(544)]+" "+this[i(360)]),this[i(544)]>this[i(360)]&&r.default[i(374)](s.BalancerTag,i(517)+this._activeDownloads),!(this._activeDownloads<=this[i(360)]))return r.default[i(483)](s.BalancerTag,i(513)+this[i(360)]+i(362)),!1;{r.default.verbose(s.BalancerTag,i(532)+e[i(524)]+i(444)+(null===(n=e[i(522)])||void 0===n?void 0:n.isAudio)+i(372)+this._peers[i(417)]);const t=this[i(559)](e);if(t[i(433)]>0){const n=Array.from(t)[i(539)](((e,t)=>.5-Math[i(501)]()))[0];return this[i(564)][i(415)](e[i(524)],e),this[i(544)]++,e[i(407)]=!0,n[i(368)](e[
2i(524)]),e.peer=n,n[i(436)]++,r.default[i(374)](s.BalancerTag,"P2PRS Requesting segment "+e[i(524)]+"  audio -> "+(null===(a=e.rendition)||void 0===a||a[i(364)],i(432),"no")+i(396)+n.id+i(421)+n[i(485)]()[i(433)]+i(352)+n[i(485)]().indexOf(e[i(524)])+i(440)+n[i(356)]),!0}}return r.default[i(374)](s.BalancerTag,i(526)+e.p2pId+i(438)+(null===(o=e[i(522)])||void 0===o?void 0:o[i(364)])+i(332)),!1}[z(487)](e){const t=z;this[t(540)][t(423)](e)}getLastResponses(){const e=z;return Array.from(this[e(377)][e(424)]())[e(431)]((t=>t[e(454)]())).reduce(((e,t)=>[...e,...t]),[])[e(539)](((t,i)=>i[e(510)]-t[e(510)]))}addPeerLatency(e){const t=z;this[t(367)][t(467)](e),this[t(540)][t(520)]=this[t(367)][t(345)](),typeof this._sumNetworkLatency===t(516)?this._sumNetworkLatency=e:this[t(346)]+=e,typeof this[t(525)]===t(516)?this[t(525)]=e:this._minNetworkLatency=Math[t(392)](this[t(525)],e),void 0===this[t(558)]?this[t(558)]=e:this[t(558)]=Math[t(528)](this[t(558)],e),typeof this[t(473)]===t(516)?this[t(473)]=1:this[t(473)]+=1}static[z(331)](e){const t=z;r.default[t(511)](s.BalancerTag,t(538),e)}static[z(376)](e){const t=z;r.default.warn(s.BalancerTag,t(404),e)}[z(386)](e){const t=z;if(this[t(350)]){const i=this[t(460)].storeSegment(e);!e.announcedP2P&&i&&(e[t(463)]=!0,this[t(425)](e),this[t(527)]());const n=this[t(382)][t(536)](e.p2pId);n>=0&&this._activeDownloadIds[t(541)](n)}else if(!e.announcedP2P){e[t(463)]=!0;const i=this[t(460)].createMap();this[t(377)][t(451)]((e=>{e[t(385)](i)}))}}[z(527)](){const e=z;if(this[e(388)])return;const t=this[e(460)][e(502)](),i=Date[e(351)]()-this._storage.getLastSegmentCreatedAt();r.default[e(374)](s.BalancerTag,"P2PSMAP Send map all v0 size: "+t.length+" / "+this[e(377)][e(417)]+" delay "+i),t[e(433)]>0&&this._peers[e(451)]((i=>{0==i[e(413)]()&&i.sendMap(t)}))}[z(425)](e){const t=z;if(this._destroyed)return;const i=this[t(460)].createMap();r.default.verbose(s.BalancerTag,t(556)+i[t(433)]),i.length>0&&this[t(377)].forEach((i=>{const n=t;i.getVersion()>0&&i[n(449)](e[n(524)],e[n(417)],this[n(460)][n(341)](),e[n(418)])}))}_sendMapToPeer(e){const t=z;if(this[t(388)])return;const i=this._storage[t(502)]();r.default[t(374)](s.BalancerTag,t(446)+i[t(433)]+" "+e);let n=!1;this[t(377)][t(451)]((t=>{t.id==e&&(t.sendMap(i),n=!0)})),!n&&r.default.verbose(s.BalancerTag,"Problem peer doen't exists?")}[z(427)](e,t){const i=z;var n;if(!this[i(388)])if(this._availablePeersMap.set(e.id,Date[i(351)]()),null==this._bannedPeers[i(495)](e.id))if(r.default[i(374)](s.BalancerTag,i(470)+e.id+" "),this[i(468)]())r.default[i(483)](s.BalancerTag,i(408));else{if(!this[i(377)].has(e.id)){!this[i(338)][i(476)](e.id)&&this[i(338)][i(415)](e.id,[]);const a=new I(this,e,t);null===(n=this[i(338)].get(e.id))||void 0===n||n[i(394)](a),r.default[i(374)](s.BalancerTag,i(486)+a.id)}this[i(469)]()}else r.default[i(483)](s.BalancerTag,i(493)+e.id)}peerConnect(e){const t=z;var i;r.default[t(374)](s.BalancerTag,t(406)),this[t(388)]||(this[t(443)][t(415)](e.id,Date[t(351)]()),this[t(381)]()[t(495)](e.id)||(this[t(468)]()?r.default[t(483)](s.BalancerTag,t(408)):(this[t(377)].has(e.id)?(r.default[t(483)](s.BalancerTag,"P2P peer already exist. "+e.id),e[t(349)]()):(r.default[t(483)](s.BalancerTag,"P2P adding the candidate. "+e.id),this[t(377)][t(415)](e.id,e),this[t(549)][t(467)](e.id),this._totalPeerSet[t(467)](e.id),null===(i=this._candidates.get(e.id))||void 0===i||i[t(451)]((i=>{e!=i&&i[t(349)]()})),this[t(338)][t(497)](e.id),this[t(355)](e.id)),this[t(469)]())))}peerCloseListener(e){const t=z,i=e;this[t(377)].delete(i.id),this._activePeerSet[t(497)](i.id);const n=this[t(338)][t(495)](i.id);if(n){const e=n[t(536)](i);e>-1&&(n[t(541)](e,1),!n[t(433)]&&this[t(338)].delete(i.id))}this[t(469)]()}peerSegmentUploadRequest(e,t,i){const n=z;this._uploadRequests++;let a=this[n(445)].get(e.id);if(null==a&&(a=0),this[n(445)][n(415)](e.id,a),this._destroyed)return;const o=this[n(460)][n(514)](t);let l=!1;o&&o[n(471)][n(371)]>1?(e[n(422)](t,o,i),l=!0):(e[n(363)](t,i),this[n(355)](e.id),this._uploadRequestsFailed++),r.default.verbose(s.BalancerTag,"P2PUR Peer requested segment -> "+l+n(444)+t+" "+(null==o?void 0:o[n(417)])+" "+(null==o?void 0:o[n(471)][n(371)])+n(444)+e.id+" "+i+" "+(null==o?void 0:o[n(452)]))}[z(480)](e,t,i,n){const r=z;var s;
2this[r(544)]--,this[r(455)]++,this[r(380)]+=i,this[r(534)]+=n[r(371)],typeof this[r(429)]===r(516)?this[r(429)]=n[r(371)]:this[r(429)]+=n[r(371)],typeof this._minResponseBytes===r(516)?this._minResponseBytes=n[r(371)]:this[r(434)]=Math.min(this._minResponseBytes,n[r(371)]),void 0===this[r(519)]?this._maxResponseBytes=n[r(371)]:this[r(519)]=Math[r(528)](this._maxResponseBytes,n[r(371)]),typeof this[r(412)]===r(516)?this[r(412)]=1:this[r(412)]+=1,null===(s=this[r(564)][r(495)](t))||void 0===s||s[r(505)](n);const o=Math[r(419)](n[r(371)]/(i/1e3));this[r(535)]=this._accumBw!==U[r(465)]?Math.trunc(this[r(535)]*(1-a.Zq[r(401)])+o*a.Zq.lastMeasurementWeight):o,this._cdnObject[r(329)](this._accumBw),typeof this[r(492)]===r(516)?this[r(492)]=o:this[r(492)]+=o,void 0===this[r(359)]?this[r(359)]=o:this[r(359)]=Math[r(392)](this[r(359)],o),typeof this._maxThroughput===r(516)?this[r(507)]=o:this[r(507)]=Math.max(this[r(507)],o),typeof this._samplesThroughput===r(516)?this[r(370)]=1:this[r(370)]+=1,void 0===this[r(416)]?this[r(416)]=n[r(371)]:this[r(416)]+=n.byteLength,void 0===this[r(393)]?this[r(393)]=i:this[r(393)]+=i,typeof this[r(357)]===r(516)?this._sumResponseTime=i:this[r(357)]+=i,typeof this[r(441)]===r(516)?this._minResponseTime=i:this[r(441)]=Math.min(this._minResponseTime,i),typeof this[r(472)]===r(516)?this[r(472)]=i:this[r(472)]=Math[r(528)](this[r(472)],i),typeof this[r(509)]===r(516)?this._samplesResponseTime=1:this[r(509)]+=1;const l=this[r(564)][r(495)](t);if(l){const e=l.route;a.Y4[r(451)]((t=>{const s=r;e.indexOf(t)>=0&&(null==l[s(522)]||!l[s(522)][s(364)])&&(this[s(344)]+=i,this[s(500)]+=n[s(371)],this[s(499)]++)})),l[r(340)]=Date[r(351)](),l[r(566)]=n[r(371)],this[r(386)](l),this._segmentsRequested[r(497)](t)}}peerSegmentProgress(e,t,i,n,r){const s=z;if(0==r)return;const a=this[s(564)][s(495)](t);if(a&&(a[s(340)]=Date[s(351)]()),a&&!this[s(460)][s(514)](a.id)&&(r>0&&(a[s(566)]=r),this[s(386)](a)),a&&(a[s(471)]=n),a&&a.id){const e=this[s(460)][s(514)](a.id);e&&(e[s(471)]=n)}}[z(410)](e,t,i){const n=z;var r;this[n(554)]+=i||0,this[n(447)]++,this[n(544)]--,this[n(369)]++,null===(r=this[n(564)].get(t))||void 0===r||r[n(391)](),this._segmentsRequested.delete(t)}peerFailedSegmentAbsent(e,t){const i=z;var n;this._segmentAbsentRequests++,this[i(544)]--,this._failedRequests++,null===(n=this[i(564)][i(495)](t))||void 0===n||n.noContentObtained(),this[i(564)][i(497)](t)}peerSegmentUpload(e){const t=z;this._byteUploadCount+=e,this[t(366)]++}[z(551)](){return this[z(548)]}[z(402)](){return this[z(366)]}[z(490)](e){this[z(337)]+=e,this._chunkUploadDiscardedCount++}[z(349)](){const e=z;if(this._p2pManager)try{this[e(523)][e(349)](),delete this[e(523)]}catch(e){}for(const[,t]of this[e(338)])t[e(451)]((t=>{t[e(349)]()}));for(const[,t]of this[e(377)])t[e(349)]();try{this[e(388)]=!0,this[e(460)][e(349)]()}catch(e){}}[z(506)](){const e=z;let t=Date[e(351)]();return this[e(377)].forEach((i=>{const n=e,r=i[n(506)]();r&&(t=Math[n(392)](t,r))})),t}[z(330)](){return this[z(377)]}[z(437)](){const e=z;let t=0,i=0,n=0,r=0,s=0;return this[e(377)][e(451)]((a=>{const o=e;a[o(453)]()>0&&(t+=a[o(453)](),this[o(384)]=Math[o(419)](Math[o(528)](this[o(384)],a.getDownloadBandwidth())),this[o(530)]=Math[o(419)](Math.min(this[o(530)],a[o(453)]())),i++),n+=a[o(450)](),r+=a[o(414)](),s+=a[o(560)]()})),t/=i||1,t=Math[e(419)](t),{downloadEnabled:!0,uploadEnabled:this[e(350)],uploadedBytes:this[e(548)],uploadedTime:s,uploadedChunks:this[e(366)],discardedUploadedChunks:this[e(491)],discardedUploadedBytes:this._byteUploadDiscardedCount,downloadedSegments:this[e(455)],downloadedBytes:this[e(534)],discardedDownloadedBytes:this._timeoutDiscardedBytes,failedRequests:{total:this[e(369)],absent:this[e(545)],timeout:this._timeoutRequests,error:this._errorRequests},activePeers:this._peers[e(417)],totalPeers:this[e(377)][e(417)],downloadMillis:this[e(380)],maxBandwidth:this._maxBandwidth,minBandwidth:this[e(530)],downloadAvgBw:t,lastSecondsDownloadTraffic:n,lastSecondsUploadTraffic:r,downloadMillisVideo:this._downloadMillisVideo,downloadBytesVideo:this[e(500)],downloadChunksVideo:this[e(499)],avgPingTime:this[e(367)][e(345)](),minPingTime:this[e(367)][e(428)](),maxPingTime:this[e(367)][e(562)](),sumResponseBytes:this[e(429)],minResponseBytes:this._minResponseBytes,maxResponseBytes:this[e(519)],samplesResponseBytes:this._samplesResponseBytes,sumResponseTime:this[e(357)],minResponseTime:this[e(441)],maxResponseTime:this[e(472)],samplesResponseTime:this[e(509)],sumNetworkLatency:this[e(346)],minNetworkLatency:this._minNetworkLatency,maxNetworkLatency:this._maxNetworkLatency,samplesNetworkLatency:this[e(473)],sumThroughput:this[e(492)],minThroughput:this[e(359)],maxThroughput:this[e(507)],samplesThroughput:this[e(370)],sumVideoBytes:this[e(416)],sumVideoTime:this[e(393)],peersAvailable:this[e(488)],maxPeersAvailable:this[e(458)],minPeersAvailable:this[e(353)],peersUsed:this._peersUsed,peersParallelUsed:this[e(373)],maxPeersParallelUsed:this[e(403)],minPeersParallelUsed:this[e(456)],peerDiscoveryTime:this[e(378)],peerConnectionTime:this._peerConnectionTime}}resetOnPing(){const e=z;this._sumResponseBytes=void 0,this[e(434)]=void 0,this._maxResponseBytes=void 0,this[e(412)]=void 0,this._sumResponseTime=void 0,this[e(441)]=void 0,this[e(472)]=void 0,this[e(509)]=void 0,this._sumNetworkLatency=void 0,this[e(525)]=void 0,this[e(558)]=void 0,this._samplesNetworkLatency=void 0,this[e(492)]=void 0,this[e(359)]=void 0,this[e(507)]=void 0,this[e(370)]=void 0,this[e(416)]=void 0,this[e(393)]=void 0,this[e(361)]=void 0,this[e(378)]=void 0,this[e(390)]=0}
2[z(399)](e,t){const i=z;this[i(496)]=t,this[i(443)][i(415)](e,Date[i(351)]())}[z(469)](){const e=z,t=Date[e(351)]()-this[e(496)]+15e3;this[e(443)][e(451)](((i,n)=>{i<t&&this[e(443)].delete(n)})),this[e(390)]++,this[e(459)]=this[e(377)][e(417)],this._peersParallelUsed=this._activePeerSet.size,this[e(488)]=this[e(443)][e(417)],1==this._updatePeersMetricsRefCounter?(this._minPeersParallelUsed=this[e(549)][e(417)],this[e(403)]=this[e(549)][e(417)],this._minPeersAvailable=this[e(443)][e(417)],this._maxPeersAvailable=this._availablePeersMap[e(417)]):((null==this._minPeersParallelUsed||this._minPeersParallelUsed>this[e(549)][e(417)])&&(this[e(456)]=this._activePeerSet[e(417)]),(null==this[e(403)]||this[e(403)]<this[e(549)].size)&&(this[e(403)]=this[e(549)][e(417)]),(null==this[e(353)]||this[e(353)]>this[e(443)].size)&&(this[e(353)]=this._availablePeersMap[e(417)]),(null==this[e(458)]||this[e(458)]<this[e(443)].size)&&(this[e(458)]=this[e(443)][e(417)]))}[z(335)](e){this._peerConnectionTime=e}[z(379)](e){this[z(378)]=e}}function $(){const e=["2216644vsMDGL","useP2P","delete","name","currentCDN","minimumDurationSinceLastUsedForTrialMilliseconds","getLastResponse","set","lastUpdatedState","37577khFjSd","isManifest","toFixed","getBandwidth","828768byCcgs"," Active switching method -> "," for "," Mbps","getBandwidthInBits","Original","floor","_p2pLoader","size","random","get","qualityPriority","Performing probe to ","_activeSwitching","_getNotUsedCdn","clear","5859480OEZQhq","sort"," of ","_cdnList","13639420nRLeDP","_bestScoredCdn"," is: ","getPeersWithContent","maximumRelativeDeltaForTrial","now","forEach","trim","from","verbose","_qualityPriority","values","363376YoWEez","length","splice","getCDN","active","cdnPriority","push","Current bandwidth for ","196mscCeV","18WaNlaM","banned","34gtklXH","CDN Candidates -> ","filter","_bandwidthThreshold","noProbing","Estimated bandwidth based on ","time","isChecked","_options","latency","some","avgPingTime","_getCdnToProbe"," highest segment bandwidth -> ","indexOf","_highetsSegmentBandwidth","debug","_cdnPriority","usedOnce","1359980UfSFws"];return($=function(){return e})()}const Z=ee;function ee(e,t){const i=$();return(ee=function(e,t){return i[e-=107]})(e,t)}!function(e){const t=ee,i=e();for(;;)try{if(691426==parseInt(t(165))/1*(-parseInt(t(136))/2)+-parseInt(t(169))/3+-parseInt(t(156))/4+-parseInt(t(155))/5+parseInt(t(109))/6+parseInt(t(133))/7*(-parseInt(t(125))/8)+-parseInt(t(134))/9*(-parseInt(t(113))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}($);class te{constructor(e,t,i,n,r,s){const a=ee;this[a(112)]=e,this[a(182)]=n,this._bandwidthThreshold=t,this[a(151)]=i,this[a(176)]=r,this[a(144)]=s}[Z(128)](e,t){const i=Z;let n=i(174);const o=new Map;let l=0,d=!0;if(this[i(112)][i(119)]((function(e,t){const n=i;l+=e.downloadedChunks,!e[n(135)]&&e.active&&(o[n(163)](t,e),d=!1)})),d&&(o[i(108)](),this._cdnList[i(119)]((function(e,t){const n=i;e[n(129)]&&(e[n(135)]=!1,o[n(163)](t,e))}))),(0===this[i(176)][i(116)](e)[i(126)]||!e.useP2P)&&o[i(158)]("P2P"),r.default[i(122)](s.BalancerTag,i(137)+o[i(177)]+i(111)+this[i(112)].size+i(170)+this._activeSwitching),o[i(158)](i(174)),0==o.size)return n=i(174),!this[i(182)]&&l>0&&(n=t[i(160)]),t.currentCDN=n,0===n.length?i(174):n;if(o.size>0)if(this[i(182)])switch(t[i(160)],this[i(182)]){case a.m[i(180)]:n=this[i(123)](e,o,t);break;case a.m.cdnPriority:n=this[i(153)](e,o,t);break;default:let r;r=this[i(114)](e,o),n=null===r?"":r[i(159)]}else{let r;r=this[i(114)](e,o),null===r||r[i(143)]()?n=0!==l||e[i(166)]?t.currentCDN:"":(n=r.name,t.currentCDN=n,r.setChecked())}return n&&""!=n[i(120)]()?n:"Original"}_qualityPriority(e,t,i){const n=Z,o=this._options[n(140)]?new Map(this[n(112)]):t;0===this[n(176)].getPeersWithContent(e).length&&o[n(158)]("P2P");const l=this[n(148)](o,a.m[n(180)],i.currentCDN);if(l)return r.default[n(152)](s.BalancerTag,n(181)+l[n(159)]),i[n(160)]=l[n(159)],l[n(159)];const d=this[n(107)](e);if(d)return r.default[n(152)](s.BalancerTag,"Selected "+d+" because not used yet"),d;let u="",c=0;return t[n(119)]((e=>{const t=n,i=e.getVideoBandwidth();r.default[t(122)](s.BalancerTag,e[t(159)]+" reference bandwidth "+i/1e6+" | estimated bandwidth "+e[t(168)]()+t(149)+this[t(151)]/1e6),c<e[t(168)]()&&(c=e[t(168)](),u=e[t(159)])})),r.default[n(152)](s.BalancerTag,"Fastest CDN is -> "+u),i[n(160)]=u,u}_cdnPriority(e,t,i){const n=Z;var o,l;const d=this[n(144)][n(140)]?new Map(this[n(112)]):t;0===this[n(176)][n(116)](e)[n(126)]&&d[n(158)]("P2P");const u=this[n(148)](d,a.m.cdnPriority,i[n(160)]);if(u)return r.default[n(152)](s.BalancerTag,n(181)+u[n(159)]),i.currentCDN=u[n(159)],u[n(159)];const c=Array[n(121)](t[n(124)]())[n(138)]((e=>e[n(173)]()/1e3>
2this[n(139)]&&!e[n(135)]));if(!c[n(146)]((e=>e[n(159)]===i[n(160)]))){const e=t[n(179)](i.currentCDN);e&&(e[n(164)]=3)}let h=null!==(l=null===(o=c[0])||void 0===o?void 0:o.name)&&void 0!==l?l:"";if(""===h){const e=Array[n(121)](t.values());e.sort(((e,t)=>t[n(168)]()-e[n(168)]())),h=e[0][n(159)]}return i.currentCDN=h,h}[Z(114)](e,t){const i=Z;var n;return null!==(n=Array[i(121)](t[i(124)]())[0])&&void 0!==n?n:null}[Z(107)](e){const t=Z,i=[];for(const[e,n]of this[t(112)])n.active&&!n.banned&&!n[t(154)]&&i.push(n[t(159)]);if(0===this._p2pLoader.getPeersWithContent(e)[t(126)]||!e[t(157)]){const e=i[t(150)]("P2P");e>-1&&i[t(127)](e,1)}if(0==i.length)return;const n=i[Math[t(175)](Math[t(178)]()*i[t(126)])],r=this[t(112)].get(n);return null!=r&&(r[t(154)]=!0),n}[Z(148)](e,t,i){const n=Z;let o=Array[n(121)](e[n(124)]())[n(138)]((e=>e[n(159)]!==i));if(t===a.m[n(130)]){o=[];for(const[t,r]of e){if(t===i)break;o[n(131)](r)}}o[n(110)](((e,t)=>e.getLastResponse()[n(142)]-t.getLastResponse()[n(142)]));const l=e[n(179)](i);if(!l)return;const d=l[n(147)],u=l[n(173)](),c=t===a.m.cdnPriority?1e3*this._bandwidthThreshold:l[n(173)](),h=o[n(138)]((e=>{const t=n;if(Date[t(118)]()-e[t(162)]()[t(142)]>=a.Zq[t(161)])return!0;const o=!0===this[t(144)][t(140)],l=o?e.getBandwidthInBits():d*u/e[t(147)];return r.default[t(152)](s.BalancerTag,t(141)+(o?"last bandwidth":t(145))+t(171)+e[t(159)]+t(115)+(l/1e6).toFixed(2)+t(172)),r.default[t(152)](s.BalancerTag,t(132)+i+": "+(u/1e6)[t(167)](2)+t(172)),(l-c)/c>=-a.Zq[t(117)]}));return 0===h[n(126)]?void 0:h.sort(((e,t)=>e[n(162)]()[n(142)]-t.getLastResponse()[n(142)]))[0]}}const ie=re;!function(e){const t=re,i=e();for(;;)try{if(279980==parseInt(t(378))/1*(-parseInt(t(334))/2)+-parseInt(t(398))/3*(-parseInt(t(335))/4)+-parseInt(t(366))/5*(parseInt(t(323))/6)+parseInt(t(420))/7+parseInt(t(353))/8*(parseInt(t(381))/9)+parseInt(t(394))/10*(-parseInt(t(399))/11)+parseInt(t(393))/12*(parseInt(t(352))/13))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(se);var ne=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){const a=re;function o(e){const t=re;try{d(n[t(361)](e))}catch(e){s(e)}}function l(e){const t=re;try{d(n[t(370)](e))}catch(e){s(e)}}function d(e){const t=re;var n;e.done?r(e.value):(n=e[t(327)],n instanceof i?n:new i((function(e){e(n)}))).then(o,l)}d((n=n[a(418)](e,t||[]))[a(361)]())}))};function re(e,t){const i=se();return(re=function(e,t){return i[e-=322]})(e,t)}function se(){const e=["__awaiter","active","?rnpaw=","testCdn","get","5384353ouaPGA","379448SFJsiQ","lastDownloadedSegment","stopMonitor","includes","error","Range","set","setRequestHeader","next","getInstance","onCodavelFailedResponse"," // ","probingPolicy","110155NaCMVE","getNextProbingSegment","noProbing","BANNING CDN ","throw","pingsTime","_instance","getMaxPingTime","highestPingTime","timeBetweenBurstsMilliseconds","GET","lastPingTime","7llPSAk","values","status","27NGnBeE","lastUpdatedState","bannedCount","setLoader","updateUrl","getTime","probeOnlyOnBanned","monitor","send","_afterCheck","bytes=1-1","UNABLE TO GENERATE URL FOR PROBING CHECK ","24holuZe","20wyVHhw","name","now","unbannedTime","87ZPiFHG","2469093oDVtOw","banned","isRangeCompatible","loader","avgPingTime","url","verbose","getMinPingTime","HEALTHY CDN ","getAvgPingTime","timeBetweenCallsMilliseconds","bannedTime","provider","_performCheck","P2P","timestamp","lowestPingTime","auth","timeout","apply","_performGetCheck","844935RMWqxJ","BANNING CDN DUE TO TIMEOUT ","shouldMonitor","84qVNKAL","_isMonitoring","add","unBannedCount","value","random","callTimeoutMilliseconds","isCodavel","&rnpaw=","warn","setHeadOnBannedOnly","90014WnIRMx","36004dPcUzg","CDNLoader","_performHeadCheck","PINGTIME No available resources to test ","setNoProbing","ontimeout","onCodavelSucessfullResponse","ORIGINAL","bannedRefTicToc","HEAD","monitoring","_cdns"];return(se=function(){return e})()}class ae{constructor(){const e=ie;this[e(371)]=new Map,this[e(345)]=new Map,this._isMonitoring=!1,this[e(346)]=new Map,this.shouldMonitor=!0,this.probeOnlyOnBanned=!1,this.noProbing=!1}static[ie(362)](e){const t=ie;return!this[t(372)]&&(this._instance=new ae),null!=e&&this[t(372)].setLoa
2der(e),this[t(372)]}[ie(384)](e){const t=ie;this[t(402)]=e,this[t(322)]=!0}updateCdnList(e){this[ie(346)]=e}newDownloadedSegment(e){this[ie(354)]=e}[ie(355)](){this[ie(322)]=!1}[ie(333)](e=!1){this[ie(387)]=e}[ie(339)](e=!1){this[ie(368)]=e}[ie(388)](e){return ne(this,void 0,void 0,(function*(){const t=re;this[t(346)]=e;const i=new Map;for(const n of e[t(379)]())i[t(359)](n[t(395)],new j),this[t(371)]=i;if(!this[t(324)])for(this[t(324)]=!0;this[t(322)];){let e=this[t(367)]();for(;!e;)yield new Promise((e=>setTimeout(e,1e3))),e=this[t(367)]();if(!this[t(368)]&&this[t(354)])for(const e of this._cdns[t(379)]())this.lastDownloadedSegment&&e[t(395)]!==t(413)&&(yield this[t(350)](e,this[t(354)]),yield new Promise((e=>setTimeout(e,a.wc[t(409)]))));yield new Promise((e=>setTimeout(e,a.wc[t(375)])))}}))}[ie(367)](){const e=ie;if(!this.lastDownloadedSegment)return null;let t=this[e(354)];return this[e(354)][e(414)]?(new Date)[e(386)]()-this.lastDownloadedSegment[e(414)]<a.Zq.chunkExpirationProbingMs?t:null:t}[ie(390)](e,t){const i=ie;var n,r,s;const a=Date.now()-e;ae.getInstance().monitoring[i(359)](t[i(395)],a);const o=ae.getInstance()[i(371)][i(351)](t[i(395)]);null==o||o[i(325)](a),t[i(377)]=a,t[i(403)]=null!==(n=null==o?void 0:o[i(408)]())&&void 0!==n?n:t[i(403)],t[i(374)]=null!==(r=null==o?void 0:o[i(373)]())&&void 0!==r?r:t[i(374)],t[i(415)]=null!==(s=null==o?void 0:o[i(406)]())&&void 0!==s?s:t[i(415)],t.addProbe(a)}[ie(350)](e,t){return ne(this,void 0,void 0,(function*(){const i=re;if(this[i(402)]&&this[i(402)].getIsEnabled&&e[i(348)]&&e[i(411)]!=i(342)&&(!this[i(387)]||e[i(400)]))if(t){let n=this[i(402)][i(336)][i(385)](t,!0,e.name);if(n=t.addParametersToUrl(n),n){const t=Math.floor(1e9*Math[i(328)]());n=n[i(356)]("?")?n+i(331)+t:n+i(349)+t;let o=0;e[i(401)]&&a.Zq[i(365)][i(356)](i(376))&&(o=yield this._performGetCheck(e,n)),1===o&&(e[i(401)]=!1,a.Zq[i(365)][i(356)]("HEAD")?r.default[i(332)](s.BalancerTag,"Probing with range failed failed. Falling back to HEAD request on the next probe"):r.default[i(357)](s.BalancerTag,"Probing with range failed and HEAD probing is disabled by policy.")),(!e.isRangeCompatible&&a.Zq[i(365)][i(356)](i(344))||!a.Zq[i(365)][i(356)](i(376))&&a.Zq[i(365)][i(356)](i(344)))&&(o=yield this[i(337)](e,n))}else r.default.verbose(s.BalancerTag,i(392)+e.name+i(364)+t[i(404)])}else r.default[i(405)](s.BalancerTag,i(338)+e[i(395)])}))}[ie(419)](e,t){return ne(this,void 0,void 0,(function*(){const i=re;return yield this._performCheck(i(376),e,t)}))}[ie(337)](e,t){return ne(this,void 0,void 0,(function*(){return yield this._performCheck("HEAD",e,t)}))}[ie(412)](e,t,i){return ne(this,void 0,void 0,(function*(){const n=new XMLHttpRequest,o=Date.now(),l=this;return t.usedOrProbed=!0,new Promise((function(d,u){const c=re;n.onload=function(){const a=re;if(4===n.readyState){let u=0;if(e===a(376)&&206!==n[a(380)]&&n[a(380)]>=200&&n[a(380)]<400)u=1;else if(n[a(380)]>=200&&n.status<300){if(t[a(400)]){const e=Date[a(396)]();t[a(410)]+=e-t.bannedRefTicToc,t[a(343)]=e,t[a(400)]=!1,t[a(326)]++}t.failures=0,r.default[a(405)](s.BalancerTag,a(407)+i+" "+n[a(380)]),t[a(382)]=0,t[a(330)]()&&null!=l[a(402)]&&l[a(402)][a(336)][a(341)]()}else if(n[a(380)]>=400){if(r.default[a(405)](s.BalancerTag,a(369)+i+" "+n[a(380)]),null!=t[a(416)]&&t.auth.enabled&&!t[a(416)].authenticate_probes){if(403!=n.status&&!t[a(400)]){const e=Date[a(396)]();t[a(397)]+=e-t.bannedRefTicToc,t.bannedRefTicToc=e,t.banned=!0,t.bannedCount++}}else if(!t[a(400)]){const e=Date[a(396)]();t[a(397)]+=e-t[a(343)],t.bannedRefTicToc=e,t[a(400)]=!0,t.bannedCount++}t.lastUpdatedState=1,t.isCodavel()&&null!=l.loader&&l[a(402)][a(336)][a(363)](1)}0===u&&l._afterCheck(o,t),d(u)}},n.onerror=function(){const e=re;if(r.default[e(405)](s.BalancerTag,e(369)+i+" "+n[e(380)]),t.banned){const i=Date[e(396)]();t[e(410)]+=i-t[e(343)],t.bannedRefTicToc=i}else{const i=Date[e(396)]();t[e(397)]+=i-t[e(343)],t.bannedRefTicToc=i,t.banned=!0,t.bannedCount++}t.lastUpdatedState=2,t[e(330)]()&&null!=l[e(402)]&&l[e(402)][e(336)][e(363)](2),d(0)},n[c(340)]=function(){const e=c;if(r.default[e(405)](s.BalancerTag,e(421)+i+" "+n.status),t[e(400)]){const i=Date[e(396)]();t[e(410)]+=i-t[e(343)],t.bannedRefTicToc=i}else{const i=Date[e(396)]();t[e(397)]+=i-t[e(343)],t[e(343)]=i,t[e(400)]=!0,t[e(383)]++}t[e(382)]=2,t[e(330)]()&&null!=l[e(402)]&&l.loader.CDNLoader[e(363)](2),d(0)},n.open(e,i),e===c(376)&&n[c(360)](c(358),c(391)),n[c(417)]=a.wc[c(329)],n[c(389)]()}))}))}}var oe=i(61);const le=ue;function de(){const e=["chunkExpirationProbingMs","number","processNumber","stripPathRegex"," (null -> default)"," (converted from string)","Applied backend option ","processString","3473832SZfqDV","forceDecisionCall","__add__","Processing customData.options from backend:","slice"," is empty string - preserving existing value","processBoolean","79658xkLATp",": expected String, got ","authData","allowSpecialDelimitersInUrl","balanceAudio","3257096CubGHa","875031YVtbzj","isArray",". Preserving original value.","updateTime","69PNMGWR","Replacing list with customData values","noProbing","stripPathForDomainRegex","signManifestUsingApi","keys","string","Processing list with __add__ feature","jwtToken","true","Backend option ","includes","videoId","Invalid type for ","boolean","jwtAuthType","Ski
2pped duplicate item: ","bucketName","every",": expected Boolean, got ","isDev","probingOnlyOnBanned"," keys","domainWhitelist","processStringArray","push","balanceSubtitles","processObject",": object with ","object","profileName","No customData.options received from backend","315CcAnfr","forEach","debug","isLive","length",": expected String[], got ","1175390PpTiGR",": undefined (null)","Added item to list: ","balanceManifests","toLowerCase","join",": expected Object, got ","47862ujqktg","9907749ysWMxx"];return(de=function(){return e})()}function ue(e,t){const i=de();return(ue=function(e,t){return i[e-=194]})(e,t)}!function(e){const t=ue,i=e();for(;;)try{if(461471==-parseInt(t(245))/1+parseInt(t(239))/2*(-parseInt(t(249))/3)+parseInt(t(232))/4+parseInt(t(215))/5+-parseInt(t(222))/6*(parseInt(t(209))/7)+parseInt(t(244))/8+parseInt(t(223))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(de);class ce{static applyCustomOptionsToBalancerOptions(e,t){const i=ue;t?(r.default[i(211)](s.BalancerTag,i(235),t),Object.keys(t)[i(210)]((n=>{const a=i,o=t[n];switch(n){case a(242):this.processBoolean(n,o,e,a(242),!1);break;case a(241):this.processObject(n,o,e,a(241));break;case a(218):this[a(238)](n,o,e,a(218),!1);break;case"bucketName":this[a(231)](n,o,e,a(194));break;case a(243):this[a(238)](n,o,e,a(243),!0);break;case a(203):this[a(238)](n,o,e,"balanceSubtitles",!0);break;case a(224):this[a(226)](n,o,e,a(224));break;case"domainWhitelist":this.processStringArray(n,o,e,a(200));break;case"domainWhitelistRegex":this.processStringArray(n,o,e,"domainWhitelistRegex");break;case a(251):this.processBoolean(n,o,e,a(251),!1);break;case a(198):this[a(238)](n,o,e,"probeOnlyOnBanned",!1);break;case a(252):this[a(201)](n,o,e,a(252));break;case a(227):this[a(231)](n,o,e,a(227));break;case a(261):this.processString(n,o,e,a(261));break;case a(207):this.processString(n,o,e,"profileName");break;case a(212):this[a(238)](n,o,e,"isLive",!1);break;case a(197):this[a(238)](n,o,e,a(197),!1);break;case a(233):this[a(238)](n,o,e,"forceDecisionCall",!1);break;case a(253):this.processBoolean(n,o,e,a(253),!1);break;case a(257):this.processString(n,o,e,a(257));break;case a(264):this[a(231)](n,o,e,"jwtAuthType");break;case a(248):this.processNumber(n,o,e,a(248));break;default:r.default[a(211)](s.BalancerTag,"Unknown customData option: "+n)}}))):r.default[i(211)](s.BalancerTag,i(208))}static[le(238)](e,t,i,n,a){const o=le;if(null===t)i[n]=a,r.default[o(211)](s.BalancerTag,o(230)+e+": "+a+o(228));else if(""===t)r.default[o(211)](s.BalancerTag,o(259)+e+o(237));else if(typeof t===o(263))i[n]=t,r.default[o(211)](s.BalancerTag,o(230)+e+": "+t);else if(typeof t!==o(255)||t[o(219)]()!==o(258)&&"false"!==t.toLowerCase())void 0!==t&&r.default[o(211)](s.BalancerTag,o(262)+e+o(196)+typeof t+o(247));else{const a=t.toLowerCase()===o(258);i[n]=a,r.default[o(211)](s.BalancerTag,o(230)+e+": "+a+o(229))}}static[le(231)](e,t,i,n){const a=le;null===t?(i[n]=void 0,r.default.debug(s.BalancerTag,a(230)+e+a(216))):typeof t===a(255)?(i[n]=t,r.default[a(211)](s.BalancerTag,"Applied backend option "+e+": "+t)):void 0!==t&&r.default[a(211)](s.BalancerTag,a(262)+e+a(240)+typeof t+a(247))}static[le(226)](e,t,i,n){const a=le;if(null===t)i[n]=void 0,r.default[a(211)](s.BalancerTag,a(230)+e+a(216));else if(typeof t===a(225))i[n]=t,r.default[a(211)](s.BalancerTag,a(230)+e+": "+t);else if(typeof t!==a(255)||isNaN(Number(t)))void 0!==t&&r.default[a(211)](s.BalancerTag,a(262)+e+": expected Number, got "+typeof t+a(247));else{const o=Number(t);i[n]=o,r.default[a(211)](s.BalancerTag,a(230)+e+": "+o+a(229))}}static processStringArray(e,t,i,n){const a=le;if(null===t)i[n]=[],r.default[a(211)](s.BalancerTag,a(230)+e+": [] (null -> empty array)");else if(Array[a(246)](t)&&t[a(195)]((e=>typeof e===a(255)||null===e))){const o=this.processListWithAddFeature(t,i[n]);i[n]=o,r.default[a(211)](s.BalancerTag,a(230)+e+": ["+o[a(220)](", ")+"]")}else void 0!==t&&r.default.debug(s.BalancerTag,a(262)+e+a(214)+typeof t+a(247))}static[le(204)](e,t,i,n){const a=le;null===t?(i[n]=void 0,r.default[a(211)](s.BalancerTag,a(230)+e+": undefined (null)")):typeof t!==a(206)||Array[a(246)](t)?void 0!==t&&r.default[a(211)](s.BalancerTag,"Invalid type for "+e+a(221)+typeof t+a(247)):(i[n]=t,r.default[a(211)](s.BalancerTag,a(230)+e+a(205)+Object[a(254)](t)[a(213)]+a(199)))}static processListWithAddFeature(e,t){const i=le;if(e[i(213)]>0&&e[0]===i(234)){r.default[i(211)](s.BalancerTag,i(256));const n=e[i(236)](1),a=t?[...t]:[];return n[i(210)]((e=>{const t=i;a[t(260)](e)?r.default[t(211)](s.BalancerTag,t(265)+e):(a[t(202)](e),r.default.debug(s.BalancerTag,t(217)+e))})),a}return r.default.debug(s.BalancerTag,i(250)),e}}const he=fe;function pe(){const e=["getSecure","&orresource= ","cdnBalanceMethod","timeBetweenCallsMilliseconds","_bandwidthThreshold","_lastChunksLapse","probeOnlyOnBanned","], nor one of the whitelisted domains [","isEnabled","progressDownloadedBytes","getCommonVariable","probingPolicy","lastMeasurementWeight","verbose","downloadedBytes","signUrl","duration","pathName","Bypassed ","then","setLogLevel","response","_options","_totalDownloadedBytes","&advanceproxy=true","updateProgressStats","Stripped URL: ","unbannedTime"," | ","6322638pbG
2UzQ","get","status","downloadTimeForScoring","done","path","ORIGINAL","qualityPriority","getSignedUrlFromApi","apiCallErrors","delete","apiCallResponses","2297868mblBLg","timeBetweenBurstsMilliseconds","p2pAvailable","enabled","codavelBanCount","resetOnPing","updateSettings","_resource","setNoProbing","bannedCount","authenticate_probes","Quality priority","lastUpdatedState","now","P2P","chunkExpirationProbingMs","delay","changeCDN","_cdnList","usedOnce","avgApiCallResponseTime","_chunkCount","processedApiCall","initializated","map","isManifest","url","getForceDecision","incrementSwitchesDueToQuality","1847068mwksVm","retries","monitoringStarted","Original","UUID","announcedCdns","getStats","setResourceInfo","startsWith","cdnPriority","provider","latencyProbe","auth","_cdnLastInstantBandwith","match","getSegmentDuration","downloadedChunks","codavelAllBanned","host","instantBandwidth","callTimeoutMilliseconds","value","codavelSwitchesDueToQuality","setMaxBandwidth","275GoDDeI","onCodavelSucessfullResponse","_probingInfo","https","bandwidthThreshold","maxApiCallResponseTime","24882NjYfXn","setHeadOnBannedOnly","getRouteAndFilename","STREBOOS","push","join","_p2pLoader","downloadMillis","isValidUrl","downloadedBytesForScoring","_highestChunkBandwidth","minimumDurationSinceLastUsedForTrialMilliseconds","priorityCdn","setSettings","open","every","] (balancerManifest: ","replace","signed_url","Products","incrementSwitchesDueToConnectivity","_cdnInstantBandwith","_noProbing","VERBOSE","providers","738547lDXzhc","No matching path found to strip in URL: ","New url -> ","currentRenditionPos","maximumRelativeDeltaForTrial","Invalid regex expression ","apiHost","concat","onCodavelSwitched","codavelUnbanCount","isNotOnCdnList","getMaxBandwidth","_activeCdnRequests","next","minApiCallResponseTime","_lastChunkTime","banned","parser","_cdnPeakBandwidth","BalancerVariables","test","trunc","LAST_USED_CDN","segmentDuration","filter","Found a match for stripping path...(cdn: ","codavelUnbanTime","parse","FAILED -> ","name","domainWhitelist","getIsLive","auth_action_info","https://"," -> banned "," (regex: ","lastCodavelRequestStatus","Origin","signManifestUsingApi","bannedRefTicToc","activeSwitchingPriority","codavelProvidersState","3111248mHccyX","active","_probeOnBanned","bandwidth","addResp","Disabled","_activeSwitching","removeActiveSegment","lastUsedCdn","noProbing","default","sign_all_requests","profileName","isCodavel","_highestRenditionBandwidth","decisionCallWaitTime","getInstance","updateUrl","onSucessfullApiResponse","absolute","failures","registerCommonVariable"," / ","stripPathRegex","codavelBanRefTicToc","size","_failedRequests","maxBandwidth","values","weight","monitor","isDev","gotEmptyResponse","score","append_to_url","updateCodavelBanTimes","renditionCount","route","token","getPluginVersion","incrementSwitchesDueToErrors","includes","firstHugeChunkSize","STREBOPX","bucketName","activeSwitching","forEach","_retries","getFastDataService","isMasterPlaylist","decisionReloadIntervalPerManifestMilliseconds","_method","cdnName","from","currentRenditionBandwidth","getBucket","updateCDNStatsOnFailure","updateCDNStatsOnSuccess","apply","stripPathForDomainRegex","getCdnObject","getAccountCode"," because its host is not one of the currently active CDN hosts: [","domainWhitelistRegex","codavelSwitchesDueToErrors","applyCustomOptionsToBalancerOptions","minRequestSizeForBwEstimateKB","?orresource=","GET","cdnBWEstimation","dnsEnabled","_secure","updateCdnList","price","fileName","_activeRequests","codavelSwitches","codavelBanTime","rendition","isLive","signed_url_info","isNotOnWhitelist","getRecommendedManifest","debug","startMonitoring","origRes","customData","onCodavelFailedResponse","forceDecisionCall","true","11287608uCYeIP","_firstRequestTime","onFailedApiResponse","balanceManifests","set","CDN priority","_responseUUID","http://"];return(pe=function(){return e})()}function fe(e,t){const i=pe();return(fe=function(e,t){return i[e-=184]})(e,t)}!function(e){const t=fe,i=e();for(;;)try{if(476475==-parseInt(t(385))/1+parseInt(t(330))/2+-parseInt(t(301))/3+parseInt(t(427))/4+parseInt(t(354))/5*(-parseInt(t(360))/6)+-parseInt(t(289))/7+parseInt(t(252))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(pe);class ge extends w{constructor(e,t,i,n){const r=fe;super(),this[r(264)]=a.Ow[r(437)],this[r(319)]=new Map,this._activeCdnRequests=new Map,this[r(237)]=new Map,this[r(188)]=0,this[r(322)]=0,this._probingInfo={currentCDN:""},this[r(370)]=0,this[r(441)]=0,this._cdnLastInstantBandwith=new Map,this[r(381)]=new Map,this[r(403)]=new Map,this[r(209)]=new Map,this[r(283)]=0,this[r(253)]=0,this[r(400)]=0,this[r(265)]=0,this[r(216)]=0,this[r(388)]=0,this[r(198)]=0,this[r(324)]=!1,this[r(332)]=!1,this.codavelAllBanned=!1,this[r(305)]=0,this[r(394)]=0,this[r(239)]=0,this[r(411)]=0,this.codavelSwitches=0,this.codavelSwitchesDueToConnectivity=0,this.codavelSwitchesDueToErrors=0,this[r(352)]=0,this[r(186)]=Date[r(314)](),this.lastCodavelRequestStatus=0,this[r(426)]=new Map,this.processedApiCall=!1,this[r(321)]=void 0,this[r(399)]=void 0,this.maxApiCallResponseTime=void 0,this[r(298)]=void 0,this[r(300)]=void 0,this.p2pAvailable=!1,this.bolinaAvailable=!1,this.activeSwitchingPriority="",this[r(372)]="",this[r(335)]=0,this.segmentDuration=void 0,this[r(282)]=e,this[r(308)]=t,this[r(366)]=i,this.apiHost=n}[he(260)](){const e=he;return null!=this[e(233)]&&this[e(233)]}getActiveRequests(){return this._activeRequests}[he(194)](){const e=he;this[e(324)]=!1,this[e(319)].clear()}[he(373)](e,t){const i=he;var n,o,l,d,c,h,p,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B,V,F,q,j,H;if(this[i(324)])return this[i(307)](e,t);this[i(319)]=new Map;try{!0===(null==e?void 0:e[i(245)])&&r.default[i(280)](r.LogLevel.VERBOSE);let s=u[i(368)](null!==(n=this[i(282)].resource)&&void 0!==n?n:"")?u[i(362)](this[i(282)].resource):{route:"",fileName:""};this[i(233)]=(null!==(l=null===(o=this._options.resource)||void 0===o?void 0:o.indexOf(i(418)))&&void 0!==l?l:-1)>-1||void 0,this[i(308)].fileName=s[i(236)],this[i(308)].route=s[i(199)],this[i(258)]=e[i(334)],this[i(213)]=e[i(262)],this[i(433)]=e[i(207)],this[i(264)]=null!==(d=e[i(358)])&&void 0!==d?d:a.Ow[i(437)],this[i(429)]=e[i(266)],this._noProbing=e[i(436)];let G=void 0!==e.activeSwitching;ae.getInstance().setNoProbing(null!==(c=this[i(382)])&&void 0!==c?c:this[i(282)][i(436)]),this[i(433)]===a.m[i(339)]?ae[i(443)]().setHeadOnBannedOnly(null!==(h=this._probeOnBanned)&&void 0!==h?h:this[i(282)][i(266)]):ae[i(443)]()[i(361)](!1),a.Zq[i(272)]=null!==(g=null===(f=null===(p=e[i(248)])||void 0===p?void 0:p[i(231)])||void 0===f?void 0:f[i(272)])&&void 0!==g?g:a.Zq.lastMeasurementWeight,a.Zq[i(389)]=null!==(y=null===(v=null===(m=e[i(248)])||void 0===m?void 0:m[i(231)])||void 0===v?void 0:v[i(389)])&&void 0!==y?y:a.Zq.maximumRelativeDeltaForTrial,a.Zq[i(371)]=null!==(T=null===(b=null===(_=e[i(248)])||void 0===_?void 0:_[i(231)])||void 0===b?void 0:b[i(371)])&&void 0!==T?T:a.Zq.minimumDurationSinceLastUsedForTrialMilliseconds,a.wc.callTimeoutMilliseconds=null!==(A=null===(E=null===(S=e.customData)||void 0===S?void 0:S[i(341)])||void 0===E?void 0:E[i(350)])&&void 0!==A?A:a.wc[i(350)],a.wc[i(302)]=null!==(C=null===(P=null===(w=e[i(248)])||void 0===w?void 0:w.latencyProbe)||void 0===P?void 0:P[i(302)])&&void 0!==C?C:a.wc[i(302)],a.wc[i(263)]=null!==(k=null===(D=null===(L=e[i(248)])||void 0===L?void 0:L[i(341)])||void 0===D?void 0:D[i(263)])&&void 0!==k?k:a.wc[i(263)],a.df[i(442)]=null!==(I=e[i(442)])&&void 0!==I?I:a.df[i(442)],a.df[i(212)]=null!==(R=e[i(212)])&&void 0!==R?R:a.df.decisionReloadIntervalPerManifestMilliseconds,a._C[i(228)]=null!==(N=e.minRequestSizeForBwEstimateKB)&&void 0!==N?N:a._C.minRequestSizeForBwEstimateKB,a.Zq[i(316)]=null!==(B=null!==(x=null===(M=null===(O=e[i(248)])||void 0===O?void 0:O[i(341)])||void 0===M?void 0:M.chunkExpirationProbingMs)&&void 0!==x?x:this[i(282)].chunkExpirationProbingMs)&&void 0!==B?B:a.Zq[i(316)],a.Zq[i(271)]=null!==(q=null!==(F=null===(V=e[i(248)])||void 0===V?void 0:V[i(271)])&&void 0!==F?F:this[i(282)][i(271)])&&void 0!==q?q:a.Zq.probingPolicy,ce[i(227)](this[i(282)],null===(j=e.customData)||void 0===j?void 0:j.options);let W=!1,X=[];X=G?(null===(H=e[i(384)])||void 0===H?void 0:H[i(392)](e.discarded||[]))||[]:e[i(384)]||[],this[i(366)].isEnabled()&&(this[i(397)][i(315)]=0,this[i(319)][i(256)](i(315),this._p2pLoader[i(222)]())),this[i(303)]=this[i(366)][i(268)](),this[i(433)]==i(296)?this[i(425)]=i(312):this._activeSwitching==i(339)?this[i(425)]=i(257):this.activeSwitchingPriority=i(432);let K=!1;X[i(208)]((n=>{const r=i,s=n.score||0,a=u.isValidUrl(n[r(327)])?u[r(362)](n.url)[r(199)]:"";W=W||a===t;const o=new U(n[r(340)],n[r(414)],n[r(348)],n.path,a,s,a===t,n[r(235)],n[r(191)],n[r(446)],n[r(232)],n[r(342)],e[r(402)]);o.host=n[r(348)],this[r(319)][r(256)](n.name,o),this[r(426)]=new Map(Array[r(215)](this[r(319)][r(190)]())[r(409)]((e=>e.isCodavel()))[r(325)]((e=>[e[r(414)],e.banned]))),this[r(197)](),this[r(397)][n[r(414)]]=0,!K&&(this[r(372)]=n[r(414)],K=!0)}))}catch(e){r.default.warn(s.BalancerTag,e)}this[i(335)]=this[i(319)][i(187)]-(this._p2pLoader[i(268)]()?1:0),this.initializated=!0}updateSettings(e,t){const i=he;var n,s,o,l,d,c,h,p,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B;!0===(null==e?void 0:e[i(245)])&&r.default.setLogLevel(r.LogLevel[i(383)]),e.activeSwitching,this[i(213)]=e[i(262)],this[i(433)]=e[i(207)],this[i(429)]=e[i(266)],this[i(382)]=e[i(436)],this[i(303)]=this[i(366)].isEnabled(),this[i(433)]==i(296)?this[i(425)]="Quality priority":"cdnPriority"==this[i(433)]?this[i(425)]="CDN priority":this[i(425)]=i(432),ae[i(443)]()[i(309)](null!==(n=this[i(382)])&&void 0!==n?n:this[i(282)][i(436)]),this[i(433)]===a.m[i(339)]?ae[i(443)]()[i(361)](null!==(s=this._probeOnBanned)&&void 0!==s?s:this[i(282)][i(266)]):ae[i(443)]()[i(361)](!1),a.Zq[i(272)]=null!==(d=null===(l=null===(o=e[i(248)])||void 0===o?void 0:o[i(231)])||void 0===l?void 0:l[i(272)])&&void 0!==d?d:a.Zq[i(272)],a.Zq[i(389)]=null!==(p=null===(h=null===(c=e[i(248)])||void 0===c?void 0:c.cdnBWEstimation)||void 0===h?void 0:h[i(389)])&&void 0!==p?p:a.Zq[i(389)],a.Zq[i(371)]=null!==(m=null===(g=null===(f=e[i(248)])||void 0===f?void 0:f[i(231)])||void 0===g?void 0:g[i(371)])&&void 0!==m?m:a.Zq[i(371)],a.wc[i(350)]=null!==(_=null===(y=null===(v=e.customData)||void 0===v?void 0:v[i(341)])||void 0===y?void 0:y.callTimeoutMilliseconds)&&void 0!==_?_:a.wc[i(350)],a.wc[i(302)]=null!==(S=null===(T=null===(b=e.customData)||void 0===b?void 0:b[i(341)])||void 0===T?void 0:T[i(302)])&&void 0!==S?S:a.wc[i(302)],a.wc.timeBetweenCallsMilliseconds=null!==(w=null===(A=null===(E=e[i(248)])||void 0===E?void 0:E[i(341)])||void 0===A?void 0:A[i(263)])&&void 0!==w?w:a.wc.timeBetweenCallsMilliseconds,a.df.decisionCallWaitTime=null!==(P=e[i(442)])&&void 0!==P?P:a.df[i(442)],a.df.decisionReloadIntervalPerManifestMilliseconds=null!==(C=e.decisionReloadIntervalPerManifestMilliseconds)&&void 0!==C?C:a.df.decisionReloadIntervalPerManifestMilliseconds,a._C[i(228)]=null!==(L=e[i(228)])&&void 0!==L?L:a._C[i(228)],a.Zq[i(316)]=null!==(R=null!==(I=null===(k=null===(D=e[i(248)])||void 0===D?void 0:D.latencyProbe)||void 0===k?void 0:k[i(316)])&&void 0!==I?I:this[i(282)][i(316)])&&void 0!==R?R:a.Zq[i(316)],a.Zq[i(271)]=null!==(M=null!==(O=null===(N=e.customData)||void 0===N?void 0:N[i(271)])&&void 0!==O?O:this[i(282)][i(271)])&&void 0!==M?M:a.Zq.probingPolicy,ce.applyCustomOptionsToBalancerOptions(this[i(282)],null===(x=e[i(248)])||void 0===x?void 0:x.options);let V=!1;const F=(null===(B=e[i(384)])||void 0===B?void 0:B[i(392)](e.discarded||[]))||[],q=new Map;let j=!1;F[i(208)]((n=>{const r=i,s=this._cdnList[r(290)](n[r(414)]);if(s){s[r(428)]=!0,s[r(348)]!=n[r(348)]&&(s[r(348)]=n[r(348)]),s[r(294)]!=n.path&&(s.path=n[r(294)]);let e=u[r(362)](n[r(327)])[r(199)];s[r(327)]!=e&&(s[r(327)]=e),s[r(342)]!=n.auth&&(s.auth=n[r(342)]),q[r(256)](n[r(414)],s)}else{const i=n[r(195)]||0,s=u[r(362)](n[r(327)])[r(199)];V=V||s===t;const a=new U(n[r(340)],n.name,n.host,n[r(294)],s,i,s===t,n[r(235)],n[r(191)],n[r(446)],n[r(232)],n[r(342)],e[r(402)]);this[r(319)][r(256)](n.name,a),q[r(256)](n[r(414)],a),this._activeCdnRequests[n.name]=0}!j&&(this[r(372)]=n.name,j=!0)})),this[i(335)]=this[i(319)][i(187)]-(this[i(366)][i(268)]()?1:0),this._cdnList=q;const H=F.map((e=>e[i(414)]));this[i(319)][i(208)]((e=>{const t=i;
2H.includes(e[t(414)])||e[t(340)]==t(295)||e[t(340)]==t(315)||(e.active=!1)})),this[i(426)]=new Map(Array[i(215)](this._cdnList.values())[i(409)]((e=>e[i(440)]()))[i(325)]((e=>[e[i(414)],e[i(401)]]))),this[i(197)]()}[he(246)](){const e=he;this[e(433)]&&(this[e(332)]?ae[e(443)]()[e(234)](this._cdnList):(this[e(332)]=!0,ae.getInstance()[e(192)](this[e(319)])))}[he(218)](e,t){const i=he;if(this._activeCdnRequests[e]<1)return;this[i(285)]();const n=this[i(319)][i(290)](e);if(this[i(397)][e]--,0==t.retries&&this[i(188)]++,null!=n&&n[i(331)]--,n&&!n[i(401)]){if(n[i(401)]){const e=Date[i(314)]();n.bannedTime+=e-n[i(424)],n.bannedRefTicToc=e}else{const e=Date[i(314)]();n[i(287)]+=e-n[i(424)],n[i(424)]=e,n[i(401)]=!0,n.bannedCount++}n[i(401)]=!0,n[i(310)]++}n&&r.default[i(273)](s.BalancerTag,i(413)+n[i(414)]+i(419)+n[i(401)]),n&&(t.failed=!0,n[i(431)](t),n[i(447)]++,n.totalFail++,n[i(320)]=!0),this[i(426)]=new Map(Array[i(215)](this._cdnList[i(190)]())[i(409)]((e=>e[i(440)]()))[i(325)]((e=>[e.name,e[i(401)]]))),this[i(197)]()}[he(434)](e){const t=he;this[t(237)][t(299)](e.id),this[t(397)][e.cdnName]--,this[t(322)]++}[he(219)](e){const t=he;var i,n;if(e[t(211)]&&(this[t(408)]=e[t(408)]),this[t(285)](),null!=e[t(269)]){if(this[t(283)]=this[t(283)]+e.size,0!=e[t(276)]){const i=8*e.size/e[t(276)];this[t(370)]<i&&(this[t(370)]=i)}null===(i=this._cdnList[t(290)]((null==e?void 0:e[t(214)])||""))||void 0===i||i[t(431)](e)}else e[t(326)]&&(this[t(282)][t(423)]||this._options[t(255)])&&(null===(n=this[t(319)].get((null==e?void 0:e.cdnName)||""))||void 0===n||n[t(431)](e));this[t(426)]=new Map(Array.from(this[t(319)].values())[t(409)]((e=>e[t(440)]()))[t(325)]((e=>[e[t(414)],e[t(401)]]))),this[t(197)]()}getCdnList(){return this[he(319)]}[he(285)](){const e=he,t=new Map,i=new Map;this[e(237)][e(208)]((i=>{const n=e,r=i[n(349)],s=i[n(214)];let a=t[n(290)](s);null==a&&(a=0),a+=r,t[n(256)](s,a)})),this[e(381)]=t,t.forEach(((t,i)=>{const n=e,r=this[n(403)][n(290)](i);null==r?this._cdnPeakBandwidth.set(i,t):r<t&&this._cdnPeakBandwidth[n(256)](i,t)}
2)),t[e(208)](((t,i)=>{0!=t&&this[e(343)].set(i,t)}));let n=0;i.forEach(((e,t)=>{n+=e}))}[he(297)](e,i,n){const a=he;var o,l,d;const c=t.default[a(443)]()[a(210)]()[a(223)](),h=null!==(o=this[a(282)][a(439)])&&void 0!==o?o:"",p=null!==(l=this._options[a(206)])&&void 0!==l?l:a(437),f=(this[a(282)][a(193)],null!==(d=this[a(282)][a(241)])&&void 0!==d&&d);let g=i;const m=new XMLHttpRequest;let v=g+"/"+c+"/"+(this[a(282)][a(439)]?h+"/":"")+a(275);v=v[a(377)]("//","/"),v=a(418)+v;const y={resource:e,live:""+f,extended:a(251),npawPluginInfo:"true",originCode:null!==this[a(282)][a(206)]&&void 0!==this[a(282)].bucketName?p:"",v:t.default[a(201)]()};if(m[a(374)](a(230),v+u.formatParameters(y),!1),m.send(),m[a(291)]>=200&&m[a(291)]<=300)try{if(m.response){const e=JSON[a(412)](m[a(281)]);for(const t of e[a(384)])if(t[a(414)]===n&&t[a(342)]&&t.auth[a(242)])return t[a(342)].signed_url_info[a(378)]}}catch(e){r.default.debug(s.BalancerTag,"Error parsing Balancer API response for signed URL: "+e)}else r.default.debug(s.BalancerTag,"Error: unable to obtain API response for signed URL (status: "+m[a(291)]+")")}[he(444)](e,i=!1,n){const a=he;var o,l,d,u,c,h,p,f,g,m,v,y,_,b;const T=this.isNotOnCdnList(e[a(327)]),S=this[a(243)](e[a(327)]),E=e[a(326)]&&!e.failed,A=T&&S,w=null!==(o=this[a(282)].balanceManifests)&&void 0!==o&&o||null!==(l=this._options[a(423)])&&void 0!==l&&l;if(w){if(T&&S){const t=Array[a(215)](this._cdnList[a(190)]())[a(325)]((e=>'"'+e[a(348)]+'"')),i=(null!==(d=this._options.domainWhitelist)&&void 0!==d?d:[])[a(392)](null!==(u=this[a(282)][a(225)])&&void 0!==u?u:[])[a(325)]((e=>'"'+e+'"'));return void r.default[a(245)](s.BalancerTag,a(278)+e[a(327)]+a(224)+t[a(365)](",")+"], nor one of the whitelisted domains ["+i[a(365)](",")+a(376)+w+")")}}else if(E||A){if(T&&S){const t=Array.from(this._cdnList[a(190)]()).map((e=>'"'+e[a(348)]+'"')),i=(null!==(c=this._options[a(415)])&&void 0!==c?c:[]).concat(null!==(h=this[a(282)].domainWhitelistRegex)&&void 0!==h?h:[])[a(325)]((e=>'"'+e+'"'));r.default.debug(s.BalancerTag,a(278)+e[a(327)]+a(224)+t.join(",")+a(267)+i[a(365)](",")+"]")}return}if(n){const o=this[a(319)][a(290)](n);if(o){let l=(e.url.startsWith(a(357))?a(418):a(259))+o[a(348)],d=!1;if(this[a(282)][a(221)])for(const t of this._options.stripPathForDomainRegex)new RegExp(t)[a(405)](l)&&(r.default[a(273)](s.BalancerTag,a(410)+n+", url: "+e.url+")"),d=!0);if(o[a(340)]===a(363)||o.provider===a(205)?l+="/"+t.default[a(443)]()[a(210)]()[a(223)]()+"/"+(null!==(p=this[a(282)].profileName)&&void 0!==p?p:a(437))+"/"+(null!==(f=this[a(282)][a(206)])&&void 0!==f?f:a(437)):!d&&(l+=o.path),l+=e.pathName,(o[a(340)]===a(363)||o.provider===a(205))&&(l+=l[a(203)]("?")?a(261)+e[a(247)]:"?orresource="+e[a(247)]),o.provider===a(205)&&(l+="&advanceproxy=true"),null!=o.auth&&o[a(342)][a(304)]&&(!i||i&&o[a(342)][a(311)]))if("append_to_url"===o[a(342)][a(417)]){const e=(null===(g=o.auth[a(242)])||void 0===g?void 0:g[a(200)])||"";l+=l[a(203)]("?")?"&"+e:"?"+e}else if("sign_all_requests"===o[a(342)][a(417)]){const e=this[a(297)](l,this.apiHost,o[a(414)]);e&&(l=e)}if(d&&this._options[a(185)]){const e=new RegExp(this[a(282)][a(185)]),t=l[a(344)](e);if(t){const e=t[0];l=l[a(377)](e,"/"),r.default[a(273)](s.BalancerTag,a(286)+l)}else r.default.verbose(s.BalancerTag,a(386)+l+" (regex: "+this[a(282)].str
2ipPathRegex+")")}return l}}let P=new Map;P=new Map(this._cdnList);let C="",L="";const D=(null===(m=e[a(240)])||void 0===m?void 0:m[a(430)])||0;for(this[a(441)]<D&&(this[a(441)]=D);(!C||""==C)&&(L=new te(P,this._bandwidthThreshold,this._highestRenditionBandwidth,this[a(433)],this._p2pLoader,this._options).getCDN(e,this[a(356)]),t.default[a(443)]()[a(448)](oe.default[a(379)].BALANCER,oe.default[a(404)][a(407)],L===a(333)?a(422):L),L!==a(315));){const i=this[a(319)][a(290)](L);try{if(i&&L!=a(333)){C=(e.url[a(338)](a(357))?a(418):"http://")+i[a(348)];let n=!1;if(this[a(282)][a(221)])for(const e of this[a(282)][a(221)])new RegExp(e).test(C)&&(n=!0);if("STREBOOS"===i.provider||i[a(340)]===a(205)?C+="/"+t.default[a(443)]()[a(210)]().getAccountCode()+"/"+(null!==(v=this[a(282)][a(439)])&&void 0!==v?v:a(437))+"/"+(null!==(y=this[a(282)][a(206)])&&void 0!==y?y:"default"):!n&&(C+=i[a(294)]),C+=e[a(277)],(i.provider===a(363)||"STREBOPX"===i[a(340)])&&(C+=C[a(203)]("?")?a(261)+e[a(247)]:a(229)+e[a(247)]),i[a(340)]===a(205)&&(C+=a(284)),""==C&&r.default.debug(s.BalancerTag,"Error updating url -> "+e.url+a(184)+(null===(_=this[a(308)])||void 0===_?void 0:_[a(199)])+a(184)+i.name),n&&this[a(282)][a(185)]){const e=new RegExp(this._options[a(185)]),t=C[a(344)](e);if(t){const e=t[0];C=C[a(377)](e,"/"),r.default.verbose(s.BalancerTag,a(286)+C)}else r.default[a(273)](s.BalancerTag,a(386)+C+a(420)+this[a(282)][a(185)]+")")}}else L==a(333)&&(C=e[a(327)])}catch(e){}P[a(299)](L)}if(L===a(315))C=a(315);else{this[a(397)][L]++;const t=this._cdnList.get(L);if(null!=t&&null!=t[a(342)]&&t[a(342)][a(304)]&&(!i||i&&t[a(342)][a(311)]))if(t[a(342)][a(417)]===a(196)){const e=(null===(b=t[a(342)][a(242)])||void 0===b?void 0:b.token)||"";C+=C.includes("?")?"&"+e:"?"+e}else if(t[a(342)][a(417)]===a(438)){const e=this.getSignedUrlFromApi(C,this[a(391)],t[a(414)]);e&&(C=e)}if(e.finalUrl=C,t&&e[a(318)](C,t[a(414)],t[a(340)]),r.default[a(273)](s.BalancerTag,a(387)+C+a(288)+e.cdnName),this[a(435)]!=L&&this[a(435)]!==a(333)&&void 0!==this[a(435)]){const e=this[a(319)][a(290)](this[a(435)]),t=this[a(319)][a(290)](L);null!=e&&(e[a(440)]()&&null!=t&&!t[a(440)]()&&(3==e[a(313)]&&this[a(249)](3),this[a(393)]()),e.incrementSwitches(),2==e[a(313)]?e[a(380)]():1==e.lastUpdatedState?e[a(202)]():3==e[a(313)]&&e[a(329)]())}this[a(435)]=L}return C}[he(337)](e){const t=he,i=u[t(368)](null!=e?e:"")?u.getRouteAndFilename(e):{route:"",fileName:""};this[t(308)][t(236)]=i[t(236)],this[t(308)][t(199)]=i.route}[he(244)](){return e=this,n=function*(){const e=fe;let i=0;for(;!t.default[e(443)]()[e(270)](oe.default[e(379)].BALANCER,oe.default[e(404)].DECISION_FINISHED)&&i++<5;)yield u[e(317)](300);if(5===i)return this._resource[e(199)]+this[e(308)].fileName;const n=Array[e(215)](this._cdnList[e(190)]())[e(409)]((t=>t.name!==e(315)));return n.length>0?n[0][e(327)]+this[e(308)][e(236)]:this._resource.route+this[e(308)][e(236)]},new((i=void 0)||(i=Promise))((function(t,r){const s=fe;function a(e){const t=fe;try{l(n[t(398)](e))}catch(e){r(e)}}function o(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){const n=fe;var r;e[n(293)]?t(e.value):(r=e[n(351)],r instanceof i?r:new i((function(e){e(r)})))[n(279)](a,o)}l((n=n[s(220)](e,[]))[s(398)]())}));var e,i,n}[he(336)](){const e=he,t=[];let i=0,n=0,r=0,s=0,a=0,o=0,l=0,d=0;return this._cdnList[e(208)]((u=>{const c=e;if("P2P"===u[c(414)])return;u.updateAvailability();let h=(u[c(274)]||0)/((u[c(367)]||1)/1e3)*8;const p=(u[c(369)]||0)/((u[c(292)]||1)/1e3)*8;null==h&&(h=0);const f=this[c(283)]/((Date[c(314)]()-this[c(253)])/1e3)*8,g=this[c(403)].get(u.name)||0,m=this[c(381)][c(290)](u.name)||0,v=this[c(343)][c(290)](u[c(414)])||0;t[c(364)]({downloadedBytes:u.downloadedBytes,downloadedChunks:u[c(346)],bandwidth:Math[c(406)](h),instantBandwidth:Math[c(406)](m),lastInstantBandwidth:Math[c(406)](v),peakBandwidth:Math[c(406)](g),failures:u[c(447)],totalFailures:u.totalFail,retries:u[c(331)],downloadTime:u[c(367)],provider:u.provider,profileName:u[c(414)],isActive:u[c(428)],ptb:f,usedOnce:u[c(320)],hugeChunks:u.hugeChunks,firstHugeChunkSize:u[c(204)],lastChunksLapse:this._lastChunksLapse,maxBandwidth:u.maxBandwidth,banned:u[c(401)],lastBandwidth:u.lastPreferedVideoBandwidth,scoringBandwidth:p}),i+=u[c(274)],n+=h,r+=g,s+=m,a+=u.downloadedChunks,o+=u[c(367)],l+=u.failures,d+=u[c(331)]})),{responseUUID:this[e(258)],totalDownloadedBytes:i,totalDownloadedChunks:a,totalDownloadedTime:o,totalFailures:l,totalRetries:d,activeSwitching:this[e(433)]||"",mode:this[e(2
213)]||"",totalBandwidth:Math.trunc(n),totalInstantBandwidth:Math.trunc(s),totalPeakBandwidth:Math[e(406)](r),cdns:t,currentRenditionBandwidth:this[e(216)],currentRenditionPos:this[e(388)],renditionCount:this[e(198)]}}changeStatusCDN(e,t){const i=he;let n=!1,r=0;return!t&&this[i(319)][i(208)]((e=>{e.active&&r++})),this[i(319)].forEach((s=>{const a=i;s[a(414)]===e&&(t&&(s[a(428)]=!0,n=!0),!t&&r>1&&(s[a(428)]=!1,n=!0))})),n}[he(353)](e,t){const i=he,n=this._cdnList[i(290)](e);return null!=n&&(n.maxBandwidth=t,this.emit(a.yl.Updated,{loader:this}),!0)}[he(396)](e){const t=he,i=this[t(319)][t(290)](e);return null!=i?i[t(189)]:0}updateCodavelBanTimes(){const e=he,t=Date[e(314)]();if(0===this[e(426)][e(187)])return void(this[e(186)]=t);const i=Array[e(215)](this.codavelProvidersState[e(190)]())[e(375)]((e=>e));i!==this[e(347)]?i?(this.codavelUnbanTime+=t-this.codavelBanRefTicToc,this.codavelBanRefTicToc=t,this[e(305)]++):(this[e(239)]+=t-this.codavelBanRefTicToc,this.codavelBanRefTicToc=t,this.codavelUnbanCount++):i?(this[e(239)]+=t-this.codavelBanRefTicToc,this.codavelBanRefTicToc=t):(this[e(411)]+=t-this[e(186)],this[e(186)]=t),this.codavelAllBanned=i}[he(306)](){const e=he;this.codavelBanTime=0,this[e(411)]=0,this[e(186)]=Date[e(314)](),this[e(323)]=!1,this[e(321)]=void 0,this.minApiCallResponseTime=void 0,this.maxApiCallResponseTime=void 0,this[e(298)]=void 0,this[e(300)]=void 0}[he(393)](){const e=he;this[e(238)]++,2==this[e(421)]?this.codavelSwitchesDueToConnectivity++:1==this.lastCodavelRequestStatus?this[e(226)]++:3==this[e(421)]&&this.codavelSwitchesDueToQuality++}[he(355)](){this[he(421)]=0}onCodavelFailedResponse(e){this[he(421)]=e}[he(254)](){const e=he;null==this[e(298)]?this.apiCallErrors=1:this[e(298)]+=1,this[e(323)]=!0}[he(445)](e){const t=he;null==this[t(300)]?this[t(300)]=1:this[t(300)]+=1,null==this[t(399)]?this[t(399)]=e:this.minApiCallResponseTime=Math.min(this[t(399)],e),null==this[t(321)]?this.avgApiCallResponseTime=e:this[t(321)]=this.avgApiCallResponseTime+(e-this.avgApiCallResponseTime)/this[t(300)],null==this[t(359)]?this.maxApiCallResponseTime=e:this[t(359)]=Math.max(this.maxApiCallResponseTime,e),this.processedApiCall=!0}[he(217)](){const e=he;return this[e(282)][e(206)]}[he(416)](){const e=he;return this[e(282)][e(241)]}[he(328)](){const e=he;return this._options[e(250)]}[he(345)](){return this[he(408)]}[he(395)](e){const t=he;let i=!1;const n=new URL(e);for(const e of this[t(319)][t(190)]())if(e[t(348)]===n[t(348)]){i=!0;break}return!i}[he(243)](e){const t=he;var i,n;let a=!1;const o=new URL(e);for(const e of null!==(i=this._options.domainWhitelistRegex)&&void 0!==i?i:[])try{if(new RegExp(e)[t(405)](o[t(348)])){a=!0;break}}catch(i){r.default[t(245)](s.BalancerTag,t(390)+e)}for(const e of null!==(n=this[t(282)][t(415)])&&void 0!==n?n:[]){if(a)break;if(e===o[t(348)]){a=!0;break}}return!a}}const me=ve;function ve(e,t){const i=ye();return(ve=function(e,t){return i[e-=291]})(e,t)}function ye(){const e=["has","getLastSegmentId","count","14JIqjxP","storeSegment","startTime","11wmXPeO","getSegment","size","13831476ItShXs","cachedSegmentExpiration","1209342WSunnQ","now","forEach","297EZnios","hasSegment","p2p","endTime","setSettings","_localMem","p2pId","delete","_reduceMemSize","get","cachedSegmentsCount","min","_expTime","clear","5XXLOqW","expiration","_maxSize","3rvLqGv","P2P: Segment not ready yet for segment map","7968650IylYce","489568jJmlCU","createMap","_loader","_removeOldSegments","getLastSegmentCreatedAt","safeMaxCount","_lastSegmentId","30684yagIYI","261868cSvSEN","getSize","4208SLQvRL","undefined"];return(ye=function(){return e})()}!function(e){const t=ve,i=e();for(;;)try{if(409445==parseInt(t(297))/1+-parseInt(t(304))/2*(-parseInt(t(294))/3)+parseInt(t(305))/4*(-parseInt(t(291))/5)+-parseInt(t(320))/6*(parseInt(t(312))/7)+parseInt(t(307))/8*(parseInt(t(323))/9)+-parseInt(t(296))/10+parseInt(t(315))/11*(parseInt(t(318))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ye);class _e{constructor(e){const t=ve;this[t(328)]=new Map,this[t(293)]=a.dR[t(311)],this[t(335)]=a.dR[t(292)],this._lastSegmentId="",this[t(299)]=e,setInterval((()=>{this[t(300)]()}),1e3)}[me(327)](e){const t=me,i=e[t(325)];i&&(this._expTime=i[t(319)]||a.dR[t(292)],this[t(293)]=Math[t(334)](i[t(333)]||a.dR[t(311)],a.dR[t(302)]))}getMaxSize(){return this[me(293)]}[me(316)](e){const t=me;return this[t(328)][t(332)](e)}[me(324)](e){const t=me;return this[t(328)][t(309)](e)}[me(313)](e){const t=me;return!this[t(324)](e[t(329)])&&typeof e.data!==t(308)&&(this[t(303)]=e[t(329)],this[t(328)].set(e[t(329)],e),this[t(331)](),!0)}[me(300)](){const e=me,t=Date[e(321)]()-this._expTime;this[e(328)][e(322)](((i,n)=>{const r=e;i[r(314)]<t&&this[r(328)].delete(n)}))}[me(331)](){const e=me;let t,i;this._localMem[e(317)]-this[e(293)]>0&&(i=Date[e(321)](),t="",this._localMem.forEach(((n,r)=>{const s=e;n[s(326)]<i&&(t=r,i=n[s(326)])})),this[e(328)][e(330)](t),this._reduceMemSize())}[me(298)](){const e=me,t=[];for(const[,i]of this[e(328)])i.readyForP2P?t.push(i[e(329)]):r.default.debug(s.BalancerTag,e(295));return t}destroy(){const e=me;this[e(328)][e(336)]()}[me(306)](){const e=me;return this[e(328)][e(317)]}[me(310)](){return this[me(303)]}[me(301)](){const e=me;var t;return(null===(t=this[e(328)][e(332)](this[e(303)]))||void 0===t?void 0:t.createdAt)||0}}var be=i(8641),Te=i.n(be);function Se(){var e=["22695970yJgRWB","3UJPKwd","1uACYsf","96934rriITf","3057204HSRSnI","10379676RZDfVi","uri","pos","3526265kLnpbQ","5196328jWrrqv","14xPeuvV","1197099vbFZlW"];return(Se=function(){return e})()}function Ee(e,t){var i=Se();return(Ee=function(e,t){return i[e-=105]})(e,t)}!function(e){for(var t=Ee,i=e();;)try{if(881861==-parseInt(t(114))/1*(-parseInt(t(115))/2)+parseInt(t(113))/3*(-parseInt(t(116))/4)+parseInt(t(108))/5+
2parseInt(t(105))/6+-parseInt(t(110))/7*(-parseInt(t(109))/8)+parseInt(t(111))/9+-parseInt(t(112))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Se);class Ae{constructor(){var e=Ee;this[e(106)]="",this[e(107)]=0}}function we(){const e=["segments","targetDuration","addSegment","size","isAudio","getSegments","getSegmentsSize","33512yfhCtq","isMaxRendition","get","4900xZBQrs","948980lvPtFK","169967XrqJEd","getSegment","521240WEAwQJ","set","uri","246rzxVFA","56707nnFlzi","419346GUTsyP","bandwidth","9GRAXFc","bandwidthPosition"];return(we=function(){return e})()}function Pe(e,t){const i=we();return(Pe=function(e,t){return i[e-=263]})(e,t)}const Ce=Pe;!function(e){const t=Pe,i=e();for(;;)try{if(110734==parseInt(t(274))/1+parseInt(t(272))/2*(-parseInt(t(279))/3)+-parseInt(t(276))/4+parseInt(t(273))/5+parseInt(t(281))/6+parseInt(t(280))/7+parseInt(t(269))/8*(parseInt(t(283))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(we);class Le{constructor(){const e=Pe;this[e(278)]="",this[e(282)]=0,this[e(266)]=!1,this[e(284)]=-1,this[e(263)]=0,this.segments=new Map,this[e(270)]=!1}[Ce(264)](e,t,i){const n=Ce;let r=new Ae;r.uri=t,r.pos=i,this[n(285)][n(277)](e,r)}[Ce(275)](e){const t=Ce;return this[t(285)][t(271)](e)}[Ce(268)](){const e=Ce;return this[e(285)][e(265)]}[Ce(267)](){return this[Ce(285)]}}const De=ke;function ke(e,t){const i=Ie();return(ke=function(e,t){return i[e-=302]})(e,t)}function Ie(){const e=["setOptions","forEach","909669YzYEqH","variants","7RTkTDG","isMasterPlaylist","1043280BiBvpI","segments","constructor","getRenditions","3694856buPJev","MAX_LOGGED_ERRORS","push","addRendition","9869958gBDhlP","728975YABSbC","214580hYFYcC","name","message","targetDuration","175024HLdaMd","shift","parse","error","loggedErrors","endsWith","65WcURbz","isAudio","bandwidth","includes","addSegment","audio","uri","UnknownError"];return(Ie=function(){return e})()}!function(e){const t=ke,i=e();for(;;)try{if(432456==parseInt(t(324))/1+parseInt(t(329))/2+parseInt(t(311))/3+-parseInt(t(325))/4*(-parseInt(t(335))/5)+parseInt(t(315))/6+parseInt(t(313))/7*(-parseInt(t(319))/8)+-parseInt(t(323))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ie),Te()[De(309)]({silent:!0});class Re{static[De(331)](e,t,i){const n=De;var r;try{const r=Te()[n(331)](t);if(r[n(314)])null!=r.variants&&r[n(312)][n(310)]((function(e){const t=n,r=new Le;r[t(303)]=e[t(303)],r.uri=e[t(307)],i[t(322)](e[t(307)],r),null!=e[t(306)]&&e[t(306)][t(310)]((function(e){const n=t,r=new Le;r[n(307)]=e[n(307)],r[n(302)]=!0,i[n(322)](e[n(307)],r)}))}));else{let t=!1;i[n(318)]().forEach(((s,a)=>{const o=n;e[o(334)](a)&&(null!=r.segments&&r[o(316)][o(310)]((function(e){const t=o;i[t(305)](a,e.uri,e[t(307)])})),null!=r.targetDuration&&(s[o(328)]=r[o(328)]),t=!0)}))}return r}catch(t){const i=(null===(r=null==t?void 0:t[n(317)])||void 0===r?void 0:r[n(326)])||n(308);return!this[n(333)][n(304)](i)&&(this.loggedErrors.length>=this[n(320)]&&this.loggedErrors[n(330)](),this.loggedErrors[n(321)](i),console[n(332)]("[HlsParser] First occurrence of parsing error for "+e+":",t[n(327)]||t)),{isMasterPlaylist:!1,variants:void 0,segments:void 0,targetDuration:void 0}}}}Re.loggedErrors=[],Re[De(320)]=20;var Ne=i(9731),Oe=i.n(Ne),Me=i(2553),xe=i.n(Me);const Be=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=xe().location&&xe().location.href||"");var i="function"==typeof xe().URL,n=/^\/\//.test(e),r=!xe().location&&!/\/\//i.test(e);if(i?e=new(xe().URL)(e,xe().location||"http://example.com"):/\/\//i.test(e)||(e=Oe().buildAbsoluteURL(xe().location&&xe().location.href||"",e)),i){var s=new URL(t,e);return r?s.href.slice(18):n?s.href.slice(s.protocol.length):s.href}return Oe().buildAbsoluteURL(e,t)};var Ue=i(1048).hp,Ve=i(7937);const Fe=e=>!!e&&"object"==typeof e,qe=(...e)=>e.reduce(((e,t)=>("object"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):Fe(e[i])&&Fe(t[i])?e[i]=qe(e[i],t[i]):e[i]=t[i]})),e)),{}),je=e=>Object.keys(e).map((t=>e[t])),He=e=>e.reduce(((e,t)=>e.concat(t)),[]),Ge=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},We=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const r={uri:t,resolvedUri:Be(e||"",t)};if(i||n){const e=(i||n).split("-");let t,s=xe().BigInt?xe().BigInt(e[0]):parseInt(e[0],10),a=xe().BigInt?xe().BigInt(e[1]):parseInt(e[1],10);s<Number.MAX_SAFE_INTEGER&&"bigint"==typeof s&&(s=Number(s)),a<Number.MAX_SAFE_INTEGER&&"bigint"==typeof a&&(a=Number(a)),t="bigint"==typeof a||"bigint"==typeof s?xe().BigInt(a)-xe().BigInt(s)+xe().BigInt(1):a-s+1,"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),r.byterange={length:t,offset:s}}return r},Xe=e=>(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),Ke={static(e){const{duration:t,timescale:i=1,sourceDuration:n,peri
vendor: 14,503 bytes, line 2
2odDuration:r}=e,s=Xe(e.endNumber),a=t/i;return"number"==typeof s?{start:0,end:s}:"number"==typeof r?{start:0,end:r/a}:{start:0,end:n/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:n,timescale:r=1,duration:s,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,d=Xe(e.endNumber),u=(t+i)/1e3,c=n+a,h=u+o-c,p=Math.ceil(h*r/s),f=Math.floor((u-c-l)*r/s),g=Math.floor((u-c)*r/s);return{start:Math.max(0,f),end:"number"==typeof d?d:Math.min(p,g)}}},ze=e=>{const{type:t,duration:i,timescale:n=1,periodDuration:r,sourceDuration:s}=e,{start:a,end:o}=Ke[t](e),l=((e,t)=>{const i=[];for(let n=e;n<t;n++)i.push(n);return i})(a,o).map((e=>t=>{const{duration:i,timescale:n=1,periodStart:r,startNumber:s=1}=e;return{number:s+t,duration:i/n,timeline:r,time:t*i}})(e));if("static"===t){const e=l.length-1,t="number"==typeof r?r:s;l[e].duration=t-i/n*e}return l},Ye=e=>{const{baseUrl:t,initialization:i={},sourceDuration:n,indexRange:r="",periodStart:s,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error("NO_BASE_URL");const d=We({baseUrl:t,source:i.sourceURL,range:i.range}),u=We({baseUrl:t,source:t,indexRange:r});if(u.map=d,l){const t=ze(e);t.length&&(u.duration=t[0].duration,u.timeline=t[0].timeline)}else n&&(u.duration=n,u.timeline=s);return u.presentationTime=a||s,u.number=o,[u]},Qe=(e,t,i)=>{const n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,s=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,d=t.references.filter((e=>1!==e.referenceType)),u=[],c=e.endList?"static":"dynamic",h=e.sidx.timeline;let p,f=h,g=e.mediaSequence||0;p="bigint"==typeof t.firstOffset?xe().BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e<d.length;e++){const a=t.references[e],o=a.referencedSize,d=a.subsegmentDuration;let m;m="bigint"==typeof p?p+xe().BigInt(o)-xe().BigInt(1):p+o-1;const v=Ye({baseUrl:i,timescale:l,timeline:s,periodStart:h,presentationTime:f,number:g,duration:d,sourceDuration:r,indexRange:`${p}-${m}`,type:c})[0];n&&(v.map=n),u.push(v),p+="bigint"==typeof p?xe().BigInt(o):o,f+=d/l,g++}return e.segments=u,e},Je=["AUDIO","SUBTITLES"],$e=1/60,Ze=e=>{return(t=e,i=({timeline:e})=>e,je(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},et=e=>{let t=[];var i,n;return i=e,n=(e,i,n,r)=>{t=t.concat(e.playlists||[])},Je.forEach((function(e){for(var t in i.mediaGroups[e])for(var r in i.mediaGroups[e][t]){var s=i.mediaGroups[e][t][r];n(s)}})),t},tt=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},it=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?xe().BigInt(e.offset)+xe().BigInt(e.length)-xe().BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),nt=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=je(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>(e.discontinuityStarts=(e.segments||[]).reduce(((e,t,i)=>(t.discontinuity&&e.push(i),e)),[]),e)))},rt=(e,t)=>{const i=it(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&Qe(e,n,e.sidx.resolvedUri),e},st=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=rt(e[i],t);return e},at=({attributes:e,segments:t,sidx:i,discontinuityStarts:n})=>{const r={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:n,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(r.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(r.contentProtection=e.contentProtection),e.serviceLocation&&(r.attributes.serviceLocation=e.serviceLocation),i&&(r.sidx=i),r},ot=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,lt=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,dt=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,ut=e=>e?Object.keys(e).reduce(((t,i)=>{const n=e[i];return t.concat(n.playlists)}),[]):[],ct=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:n={},previousManifest:r,eventStream:s})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:d}=e[0].attributes,u=nt(e.filter(ot)).map(at),c=nt(e.filter(lt)),h=nt(e.filter(dt)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:st(u,n)};d>=0&&(f.minimumUpdatePeriod=1e3*d),t&&(f.locations=t),i&&(f.contentSteering=i),"dynamic"===o&&(f.suggestedPresentationDelay=l),s&&s.length>0&&(f.eventStream=s);const g=0===f.playlists.length,m=c.length?((e,t={},i=!1)=>{let n;const r=e.reduce(((e,r)=>{const s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"";let o=r.attributes.label||"main";if(a&&!r.attributes.label){const e=s?` (${s})`:"";o=`${r.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});const l=rt((({attributes:e,segments:t,sidx:i,mediaSequence:n,discontinuitySequence:r,discontinuityStarts:s},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:r,discontinuityStarts:s,timelineStarts:e.timelineStarts,mediaSequence:n,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o})(r,i),t);return e[o].playlists.push(l),void 0===n&&"main"===s&&(n=r,n.default=!0),e}),{});return n||(r[Object.keys(r)[0]].default=!0),r})(c,n,g):null,v=h.length?((e,t={})=>e.reduce(((e,i)=>{const n=i.attributes.label||i.attributes.lang||"text",r=i.attributes.lang||"und";return e[n]||(e[n]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(rt((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:r})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const s={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(s.CODECS=e.codecs);const a={attributes:s,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:n,discontinuitySequence:r,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,n):null,y=u.concat(ut(m),ut(v)),_=y.map((({timelineStarts:e})=>e));var b,T;return f.timelineStarts=Ze(_),b=y,T=f.timelineStarts,b.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),m&&(f.mediaGroups.AUDIO.audio=m),v&&(f.mediaGroups.SUBTITLES.subs=v),p.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:n}=t;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])})),e):e),{})),r?(({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(et(e)),n=t.playlists.concat(et(t));return t.timelineStarts=Ze([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const n=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!n)return;if(t.sidx)return;const r=t.segments[0],s=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-r.presentationTime)<$e}));if(-1===s)return tt({playlist:t,mediaSequence:n.mediaSequence+n.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!n.segments.length&&t.timeline>n.timeline||n.segments.length&&t.timeline>n.segments[n.segments.length-1].timeline)&&t.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),tt({playlist:t,mediaSequence:n.segments[s].number})}))})({oldPlaylists:i,newPlaylists:n,timelineStarts:t.timelineStarts}),t})({oldManifest:r,newManifest:f}):f},ht=(e,t,i)=>{const{NOW:n,clientOffset:r,availabilityStartTime:s,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,d=(n+r)/1e3+l-(s+o);return Math.ceil((d*a-t)/i)},pt=(e,t)=>{const{type:i,minimumUpdatePeriod:n=0,media:r="",sourceDuration:s,timescale:a=1,startNumber:o=1,periodStart:l}=e,d=[];let u=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,g=h.t||0;let m;if(u<0&&(u=g),g&&g>u&&(u=g),f<0){const o=c+1;m=o===t.length?"dynamic"===i&&n>0&&r.indexOf("$Number$")>0?ht(e,u,p):(s*a-u)/p:(t[o].t-u)/p}else m=f+1;const v=o+d.length+m;let y=o+d.length;for(;y<v;)d.push({number:y,duration:p/a,time:u,timeline:l}),u+=p,y++}return d},ft=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,gt=(e,t)=>e.replace(ft,(e=>(t,i,n,r)=>{if("$$"===t)return"$";if(void 0===e[i])return t;const s=""+e[i];return"RepresentationID"===i?s:(r=n?parseInt(r,10):1,s.length>=r?s:`${new Array(r-s.length+1).join("0")}${s}`)})(t)),mt=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,r=We({baseUrl:e.baseUrl,source:gt(n.sourceURL,i),range:n.range}),s=((e,t)=>e.duration||t?e.duration?ze(e):pt(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return s.map((t=>{i.Number=t.number,i.Time=t.time;const n=gt(e.media||"",i),s=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/s;return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:Be(e.baseUrl||"",n),map:r,number:t.number,presentationTime:o}}))},vt=(e,t)=>{const{duration:i,segmentUrls:n=[],periodStart:r}=e;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");const s=n.map((t=>((e,t)=>{const{baseUrl:i,initialization:n={}}=e,r=We({baseUrl:i,source:n.sourceURL,range:n.range}),s=We({baseUrl:i,source:t.media,range:t.mediaRange});return s.map=r,s})(e,t)));let a;return i&&(a=ze(e)),t&&(a=pt(e,t)),a.map(((t,i)=>{if(s[i]){const n=s[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=r+(t.time-o)/a,n}})).filter((e=>e))},yt=({attributes:e,segmentInfo:t})=>{let i,n;t.template?(n=mt,i=qe(e,t.template)):t.base?(n=Ye,i=qe(e,t.base)):t.list&&(n=vt,i=qe(e,t.list));const r={attributes:e};if(!n)return r;const s=n(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else s.length?i.duration=s.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return r.attributes=i,r.segments=s,t.base&&i.indexRange&&(r.sidx=s[0],r.segments=[]),r},_t=e=>e.map(yt),bt=(e,t)=>Ge(e.childNodes).filter((({tagName:e})=>e===t)),Tt=e=>e.textContent.trim(),St=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,n,r,s,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(n||0)+86400*parseFloat(r||0)+3600*parseFloat(s||0)+60*parseFloat(a||0)+parseFloat(o||0)},Et={mediaPresentationDuration:e=>St(e),availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>St(e),suggestedPresentationDelay:e=>St(e),type:e=>e,timeShiftBufferDepth:e=>St(e),start:e=>St(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?St(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},At=e=>e&&e.attributes?Ge(e.attributes).reduce(((e,t)=>{const i=Et[t.name]||Et.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},wt={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Pt=(e,t)=>t.length?He(e.map((function(e){return t.map((function(t){const i=Tt(t),n=Be(e.baseUrl,i),r=qe(At(t),{baseUrl:n});return n!==i&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,Ct=e=>{const t=bt(e,"SegmentTemplate")[0],i=bt(e,"SegmentList")[0],n=i&&bt(i,"SegmentURL").map((e=>qe({tag:"SegmentURL"},At(e)))),r=bt(e,"SegmentBase")[0],s=i||t,a=s&&bt(s,"SegmentTimeline")[0],o=i||r||t,l=o&&bt(o,"Initialization")[0],d=t&&At(t);d&&l?d.initialization=l&&At(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const u={template:d,segmentTimeline:a&&bt(a,"S").map((e=>At(e))),list:i&&qe(At(i),{segmentUrls:n,initialization:At(l)}),base:r&&qe(At(r),{initialization:At(l)})};return Object.keys(u).forEach((e=>{u[e]||delete u[e]})),u},Lt=e=>He(bt(e.node,"EventStream").map((t=>{const i=At(t),n=i.schemeIdUri;return bt(t,"Event").map((t=>{const r=At(t),s=r.presentationTime||0,a=i.timescale||1,o=r.duration||0,l=s/a+e.attributes.start;return{schemeIdUri:n,value:i.value,id:r.id,start:l,end:l+o/a,messageData:Tt(t)||r.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),Dt=(e,t)=>
2(i,n)=>{const r=Pt(t,bt(i.node,"BaseURL")),s=qe(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(s.periodDuration=i.attributes.duration);const a=bt(i.node,"AdaptationSet"),o=Ct(i.node);return He(a.map(((e,t,i)=>n=>{const r=At(n),s=Pt(t,bt(n,"BaseURL")),a=bt(n,"Role")[0],o={role:At(a)};let l=qe(e,r,o);const d=bt(n,"Accessibility")[0],u="urn:scte:dash:cc:cea-608:2015"===(c=At(d)).schemeIdUri?("string"!=typeof c.value?[]:c.value.split(";")).map((e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})):"urn:scte:dash:cc:cea-708:2015"===c.schemeIdUri?("string"!=typeof c.value?[]:c.value.split(";")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,n=""]=e.split("=");t.channel=i,t.language=e,n.split(",").forEach((e=>{const[i,n]=e.split(":");"lang"===i?t.language=n:"er"===i?t.easyReader=Number(n):"war"===i?t.aspectRatio=Number(n):"3D"===i&&(t["3D"]=Number(n))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;var c;u&&(l=qe(l,{captionServices:u}));const h=bt(n,"Label")[0];if(h&&h.childNodes.length){const e=h.childNodes[0].nodeValue.trim();l=qe(l,{label:e})}const p=bt(n,"ContentProtection").reduce(((e,t)=>{const i=At(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=wt[i.schemeIdUri];if(n){e[n]={attributes:i};const r=bt(t,"cenc:pssh")[0];if(r){const t=Tt(r);e[n].pssh=t&&function(e){for(var t,i=(t=e,xe().atob?xe().atob(t):Ue.from(t,"base64").toString("binary")),n=new Uint8Array(i.length),r=0;r<i.length;r++)n[r]=i.charCodeAt(r);return n}(t)}}return e}),{});Object.keys(p).length&&(l=qe(l,{contentProtection:p}));const f=Ct(n),g=bt(n,"Representation"),m=qe(i,f);return He(g.map(((e,t,i)=>n=>{const r=bt(n,"BaseURL"),s=Pt(t,r),a=qe(e,At(n)),o=Ct(n);return s.map((e=>({segmentInfo:qe(i,o),attributes:qe(a,e)})))})(l,s,m)))})(s,r,o)))},kt=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=qe({serverURL:Tt(e[0])},At(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},It=(e,t={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=t,a=bt(e,"Period");if(!a.length)throw new Error("INVALID_NUMBER_OF_PERIOD");const o=bt(e,"Location"),l=At(e),d=Pt([{baseUrl:i}],bt(e,"BaseURL")),u=bt(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=n,l.clientOffset=r,o.length&&(l.locations=o.map(Tt));const c=[];return a.forEach(((e,t)=>{const i=At(e),n=c[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0)({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:l.type}),c.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:kt(u,s),representationInfo:He(c.map(Dt(l,d))),eventStream:He(c.map(Lt))}},Rt=e=>{if(""===e)throw new Error("DASH_EMPTY_MANIFEST");const t=new Ve.DOMParser;let i,n;try{i=t.parseFromString(e,"application/xml"),n=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return n},Nt="1.3.1",Ot=(e,t={})=>{const i=It(Rt(e),t),n=_t(i.representationInfo);return ct({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Mt=e=>(e=>{const t=bt(e,"UTCTiming")[0];if(!t)return null;const i=At(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i})(Rt(e));function xt(e,t){const i=Ut();return(xt=function(e,t){return i[e-=103]})(e,t)}const Bt=xt;function Ut(){const e=["15JaUmHe","replace","148208DLNqXT","addRendition","BANDWIDTH","480028qWZBFp","addSegment","13630020Niovxh","targetDuration","196fBUNVQ","bandwidth","245840AHFJNP","segments","resolvedUri","uri","54788uRWljk","startsWith","497922OTujVo","8325DzwASe","attributes","../","parse","99cJiyix"];return(Ut=function(){return e})()}!function(e){const t=xt,i=e();for(;;)try{if(248040==-parseInt(t(109))/1+parseInt(t(113))/2*(-parseInt(t(122))/3)+parseInt(t(119))/4*(-parseInt(t(104))/5)+-parseInt(t(121))/6+-parseInt(t(115))/7+parseInt(t(106))/8*(-parseInt(t(103))/9)+parseInt(t(111))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ut);class Vt{static[Bt(125)](t,i,n,a){const o=Bt,l=i;try{let i=e[o(125)](l,{url:t}).playlists;for(var d of i){let e=new Le;e[o(114)]=d[o(123)][o(108)],e[o(118)]=d.resolvedUri,e.targetDuration=d[o(112)];let t=e[o(118)];
2for(var u of((!e.uri||""==e[o(118)])&&(t=d.attributes),n[o(107)](t,e),d[o(116)])){let e=u[o(118)];for(;e[o(120)](o(124));)e=e[o(105)](o(124),"");n[o(110)](t,u[o(117)],e)}}}catch(e){r.default.debug(s.BalancerTag,"Error parsing MPD manifest: ",e)}}}const Ft=jt;function qt(){const e=["name","announcedP2P","arrayBuffer","getEntriesByType","now","timestamp","createdAt","endsWith","data","9648kEdtzV","1420rPWpWG","148164QDYbfx","cdnProvider","endTime","failed","triedP2P","startTime","ifByteArrayToString","verbose","Util","undefined","cachedSize","hash","20vXrbLM","length","triedCdns","getNewUrl","realBodySize","addParametersToUrl","progressDownloadedBytesLastUpdate","Success","total","ORIGINAL","3813201GJcQhf","url","headers","floor","cdnName","host","_resource","downloadTimeMs","BYTLELENGHT ","P2PManager","byteLength","getPerfLoadTime","slice","finalUrl","push","round","readyForP2P","targetDuration","segmentDuration","toJSON","forceHttp","pathname"," downloaded by p2p -> ","size","3374YvuwVm","instantBandwidth","3qqoUjA","p2pId","search","updateP2PId","route","getTime","pathName","lastEstimatedTime","Update P2P ID ","bandwidth","emit","params","4398MvgIdk","noContentObtained","origRes","includes","function","16761324NarQkQ"," Total time -> ","useP2P","duration","debug","retries","getRenditions","initialEstimatedTime","isManifest","parse","Range","setContent","onProgress","isMedia",".mpd","loaded","5713686TYcQBg","timeout","progressDownloadedBytes","Problem slicing the array","activeP2PSendProcesses",".m3u8","8314txUmho","retryBecauseNewHeaders","10dQvZgc","isMasterPlaylist"];return(qt=function(){return e})()}function jt(e,t){const i=qt();return(jt=function(e,t){return i[e-=236]})(e,t)}!function(e){const t=jt,i=e();for(;;)try{if(381901==parseInt(t(261))/1*(parseInt(t(288))/2)+parseInt(t(324))/3*(-parseInt(t(276))/4)+-parseInt(t(275))/5*(-parseInt(t(336))/6)+parseInt(t(322))/7*(parseInt(t(274))/8)+parseInt(t(298))/9*(parseInt(t(263))/10)+parseInt(t(255))/11+-parseInt(t(239))/12)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(qt);class Ht extends w{constructor(e,t,i,n={},r=3,s=!1,a=!1){const o=jt;var l;super(),this[o(330)]="",this[o(273)]=new ArrayBuffer(1),this[o(321)]=0,this[o(333)]=0,this[o(281)]=0,this[o(278)]=0,this[o(305)]=0,this[o(279)]=!1,this[o(256)]=!1,this[o(257)]=0,this.progressDownloadedBytesLastUpdate=0,this.instantBandwidth=0,this.duration=0,this[o(246)]=0,this[o(331)]=0,this[o(247)]=!1,this[o(264)]=!1,this[o(252)]=!1,this.download=!0,this[o(292)]=0,this[o(314)]=!0,this[o(266)]=!1,this[o(259)]=0,this[o(262)]=0,this[o(318)]=!1,this.peer=void 0,this[o(271)]=Date[o(269)](),this.failedOriginalCount=0,this.segmentDuration=void 0,this.timestamp=void 0;const d=new URL(t);this[o(299)]=t,this[o(311)]=t,this.origRes=t,this[o(303)]=d.host,this[o(328)]=d.pathname,this[o(335)]=d[o(326)],this[o(300)]=n,this[o(244)]=r,this[o(241)]=s,this.triedP2P=!1,this.cdnName="",this[o(277)]="",this[o(267)]=a,this.triedCdns=[],this[o(304)]=i,this[o(330)]=e,this[o(270)]=(new Date)[o(329)](),this.id=Math[o(301)](100*Math.random())+"-"+Date[o(269)]();const u=(null===(l=this[o(300)])||void 0===l?void 0:l[o(249)])||"";this[o(325)]=window[o(307)]?window[o(307)][o(284)][o(287)](this[o(330)]+u):""+this[o(330)]+u}[Ft(327)](){const e=Ft;var t;if(!window[e(307)])return;const i=(null===(t=this[e(300)])||void 0===t?void 0:t[e(249)])||"";r.default.debug(s.BalancerTag,e(332)+this[e(330)]+i),this[e(325)]=window[e(307)].Util[e(287)](this.pathName+i)}[Ft(291)](e){const t=Ft;let i=!1;this[t(247)]?(this[t(247)]&&this[t(279)]||this[t(247)]&&e)&&(i=!0):i=!0;let n=i?this[t(311)]:this[t(299)];return this[t(335)]&&(n=n[t(237)]("?")?n+"&"+this.params:n+"?"+this.params),n}[Ft(293)](e){const t=Ft;let i=e;return this.params&&i&&(i=i[t(237)]("?")?i+"&"+this[t(335)]:i+"?"+this[t(335)]),i}changeCDN(e,t,i){const n=Ft;if(i!=n(297)){const i=new URL(e);this[n(303)]=i[n(303)],this[n(328)]=i[n(319)],this[n(290)][n(312)](t)}this[n(302)]=t,this.cdnProvider=i}[Ft(250)](e){const t=Ft;this.data=e,this[t(321)]=e[t(308)],this.emit(a.yL[t(295)],{segment:this,data:e})}[Ft(337)](){this[Ft(334)](a.yL.Fail,{segment:this})}[Ft(309)](e){const t=Ft;var i;if(typeof performance!==t(285)&&typeof performance[t(268)]===t(238)){const n=performance[t(268)]("resource");if(n&&n[t(289)]>0)for(const r of n){const n=r[t(317)]();if(null===(i=null==n?void 0:n[t(265)])||void 0===i?void 0:i.includes(e))return Math[t(313)](null==n?void 0:n[t(242)])}}return-1}[Ft(251)](e,t){const i=Ft;t[i(296)]>
20&&(this[i(292)]=t.total),0==this[i(294)]&&(this[i(294)]=this[i(281)]);const n=Date[i(269)](),a=n-this[i(294)];if(this[i(278)]=Date[i(269)](),a<150)return;0!=a&&(this[i(323)]=(t[i(254)]-this[i(257)])/((n-this[i(294)])/1e3)*8,this.progressDownloadedBytesLastUpdate=n,t[i(254)]&&(this[i(257)]=t.loaded));const o=(n-this[i(281)])/(t[i(254)]/t.total);this[i(246)]=0==this[i(246)]?o:this.initialEstimatedTime,this.lastEstimatedTime=o,this[i(242)]>0&&0!=o&&1e3*this.duration<o&&r.default[i(243)](s.BalancerTag,"High risk of buffer. "+this[i(236)]),r.default[i(283)](s.BalancerTag,"Done "+this[i(236)]+i(240)+(Date.now()-this[i(281)]))}onSuccess(e,t,i=!1){const n=Ft;if(this[n(278)]=Date[n(269)](),null==e||0==e[n(289)])return!1;this[n(305)]=this.endTime-this[n(281)],this[n(309)](this[n(328)]);const a=i?u.sliceByFirstSpecial(this[n(299)]):this[n(299)],o=new URL(a)[n(319)];if(o[n(272)](n(260))){e=u[n(282)](e);const t=Re[n(248)](this[n(299)],e,this._resource);this.isMasterPlaylist=t[n(264)],r.default[n(243)](s.BalancerTag,"Parsed HLS manifest -> "+this[n(299)]+" renditions -> "+this[n(304)][n(245)]()[n(321)]),null!=t[n(315)]&&(this[n(316)]=1e3*t.targetDuration)}if(o[n(272)](n(253))){e=u[n(282)](e);const t={duration:void 0};Vt[n(248)](this.url,e,this[n(304)],t),this.isMasterPlaylist=!0,r.default[n(243)](s.BalancerTag,"Parsed DASH manifest -> "+this[n(299)]+" renditions -> "+this._resource[n(245)]().size),null!=t[n(242)]&&(this.segmentDuration=1e3*t[n(242)])}if(r.default.verbose(s.BalancerTag,n(306)+e[n(308)]+n(320)+this[n(280)]),0!=e[n(308)])try{this[n(273)]=e[n(310)](0,e[n(308)]),this[n(321)]=this[n(305)]>5?this[n(273)][n(308)]:0,this[n(286)]=this[n(305)]>5?0:this[n(273)][n(308)],this.bandwidth=Math.trunc(this.downloadTimeMs>5?this[n(273)][n(308)]/(this.downloadTimeMs/1e3):0),this.data[n(308)]>0&&(this[n(292)]=this.data[n(308)]),this[n(323)]=0,this[n(257)]=this[n(321)];const i=parseInt(t,10);!isNaN(i)&&i>0&&(this.compressedBytes=i,this.uncompressedBytes=this.data.byteLength||e.byteLength||this.realBodySize)}catch(e){r.default[n(243)](s.BalancerTag,n(258))}else this[n(273)][n(308)]!=this[n(292)]&&(this[n(273)]=new ArrayBuffer(1));return this[n(294)]=this[n(278)],!0}}function Gt(e,t){const i=Wt();return(Gt=function(e,t){return i[e-=478]})(e,t)}function Wt(){const e=["2797140ULfzIh","bandwidths","isAudio","5061CaNCRy","lastCleanPos","addRendition","getSegmentsSize","24080694jVmoQM","isMaxRendition","getRenditions","pos","getSize","set","addSegment","6977652kwVPmO","getVideoRenditions","6iJYOsl","clean","masterUri","renditions","push","delete","8712Lmplle","bandwidthPosition","fileName","get","8175843peWAHy","forEach","route","endsWith","10UjaQtL","getBandwidthsPos","bandwidth","5044975OahMyq","getSegments","1wGvyjS","updateAvailableBandwidths","sort","length","getRendition","values","cleaning","3516896BHarUl"];return(Wt=function(){return e})()}const Xt=Gt;!function(e){const t=Gt,i=e();for(;;)try{if(934997==parseInt(t(518))/1*(parseInt(t(483))/2)+-parseInt(t(499))/3*(-parseInt(t(482))/4)+parseInt(t(516))/5+-parseInt(t(497))/6+parseInt(t(486))/7*(-parseInt(t(505))/8)+parseInt(t(509))/9*(parseInt(t(513))/10)+-parseInt(t(490))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Wt);class Kt{constructor(){const e=Gt;this[e(501)]="",this.renditions=new Map,this[e(511)]="",this[e(507)]="",this[e(484)]=[],this[e(493)]=0,this[e(487)]=0,this.cleaning=!1}[Xt(500)](){const e=Xt;this[e(481)]||this[e(493)]-this.lastCleanPos>1e5&&(this[e(481)]=!0,this[e(504)](this[e(487)],this[e(487)]+5e3),this[e(487)]=this[e(487)]+5e3,this[e(481)]=!1)}[Xt(496)](e,t,i){const n=Xt;var r;this[n(493)]++,null===(r=this[n(502)][n(508)](e))||void 0===r||r[n(496)](t,i,this[n(493)])}[Xt(494)](){const e=Xt;let t=0;for(let i of this.renditions[e(480)]())t+=i[e(489)]();return t}[Xt(504)](e,t){const i=Xt;for(let n of this.renditions[i(480)]())for(let[r,s]of n[i(517)]())s.pos>=e&&s[i(493)]<=t&&n[i(517)]().delete(r)}[Xt(488)](e,t){const i=Xt;this[i(502)][i(495)](e,t),this[i(519)]()}[Xt(492)](){return this[Xt(502)]}[Xt(498)](){const e=Xt;let t=new Map;return this[e(502)][e(510)]((function(i,n){const r=e;i[r(485)]||t[r(495)](n,i)})),t}[Xt(479)](e){const t=Xt;let i;return this.renditions[t(510)]((function(n){const r=t;n[r(517)]()[r(510)]((function(t){e[r(512)](t.uri)&&(i=n)}))})),i}[Xt(519)](){const e=Xt;let t=new Array;this[e(502)][e(510)]((function(i){const n=e;i[n(485)]||t[n(503)](Number(i[n(515)]))}
2)),t[e(520)]((function(e,t){return e-t})),this[e(484)]=t,this[e(502)][e(510)]((t=>{const i=e;!t[i(485)]&&(t[i(506)]=this[i(514)](t[i(515)]),t[i(506)]+1==this[i(484)][i(478)]&&(t[i(491)]=!0))}))}[Xt(514)](e){const t=Xt;let i=0,n=-1;return this[t(484)][t(510)]((function(t){e==t&&(n=i),i++})),n}}function zt(){const e=["next","98873yXSOrh","setSettings","2VeFcFN","Not performing decision since time between requests has not passed yet.","Products","BUCKET","LAST_USED_CDN","2059026gvNhQA","CDNLoader","open","delete","then","Performing decision request with URL ","Removing ","response","isUsingLegacy","disable","getCdnList","throw","_loader","origin","707287HmuZtD","signManifestUsingApi","apply","12JbVxDt","lastIndexOf","-js"," from manifest hashmap since older than ","send","decisionReloadIntervalPerManifestMilliseconds","_manifestMap","onFailedApiResponse","has","224472Geaxra","slice","value","PROFILE_NAME","forEach","onload","488390nmTmcc","657189SlfPVd","Storing ","p2p","onSucessfullApiResponse","devHost","startMonitoring","getRouteAndFilename","AS_ENABLED"," for /decision requests","deleteOldestFromManifestMap","Using ","isValidUrl","shouldPerformDecision","activeSwitching","verbose","registerCommonVariable","getIsEnabled","stringify","getPluginVersion"," in manifest hashmap","host","route","enabled","parse","includes","fileName","get","Using development environment -> ","GET","1229664QGhoXz","createUpdateTimer","gotEmptyResponse","replace","_jwtAuthType","__awaiter","performHashmapCleanup","readyState","Creating setTimeout for decision request with resource ","formatParameters","status","qualityPriority"," + (host: ","BalancerVariables","unregisterCommonVariable","P2PLoader","onerror","size","DECISION_FINISHED","getInstance","split","_jwtToken","true","now","Origin","BALANCER","Empty response received from Balancer API","Error parsing Balancer API response: ","options","debug","loadBalancerData"];return(zt=function(){return e})()}function Yt(e,t){const i=zt();return(Yt=function(e,t){return i[e-=275]})(e,t)}const Qt=Yt;!function(e){const t=Yt,i=e();for(;;)try{if(207816==-parseInt(t(294))/1*(parseInt(t(296))/2)+parseInt(t(327))/3+parseInt(t(318))/4*(-parseInt(t(333))/5)+parseInt(t(301))/6+parseInt(t(315))/7+parseInt(t(363))/8+-parseInt(t(334))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(zt);class Jt{constructor(e,t,i){const n=Qt;this[n(324)]=new Map,this[n(313)]=e,this[n(367)]=t,this[n(283)]=i}loadBalancerData(e,i,n,o,l,d,c,h,p,f,g,m,v){return y=this,b=function*(){const y=Yt;if(!this[y(313)][y(350)]())return void t.default[y(281)]()[y(349)](oe.default[y(298)][y(287)],oe.default.BalancerVariables[y(280)],!0);if(!this.shouldPerformDecision(i))return r.default.debug(s.BalancerTag,y(297)),void this[y(364)](e,i,n,o,null!=l&&l,null!=d&&d,h,p,f,g,m);const _=Date[y(285)](),b=u[y(345)](i)?this[y(340)](i):{route:"",fileName:""};r.default[y(348)](s.BalancerTag,y(361)+d);let T=d?a.df[y(338)]:a.df[y(354)];T=f||T,r.default.debug(s.BalancerTag,y(344)+T+y(342));const S=new XMLHttpRequest;let E=T+"/"+e+"/"+(h?h+"/":"")+"decision";E=E[y(366)]("//","/"),E="https://"+E;const A={resource:""+b.route+b[y(359)],live:""+n,extended:y(284),npawPluginInfo:"true",originCode:null!=p?p:"",v:t.default[y(352)]()[y(282)](y(320))[0],dynamicRules:null!=g?g:"",deviceInfo:null!=m?m:"",authData:v?JSON[y(351)](v):""},w=this;yield new Promise(((e,n)=>{const o=y;S[o(332)]=function(){const n=o;var l;if(4===S[n(370)]){if(S.status>0&&(10===w[n(324)][n(279)]&&!w[n(324)][n(326)](i)&&w[n(343)](),w[n(369)](),w[n(324)].set(i,Date[n(285)]()),r.default[n(348)](s.BalancerTag,n(335)+i+n(353))),S[n(373)]>=200&&S[n(373)]<=300){const e=Date[n(285)]()-_;w[n(313)].CDNLoader[n(337)](e);try{if(S[n(308)]){w.options=JSON[n(357)](S[n(308)]),t.default[n(281)]()[n(349)](oe.default[n(298)][n(287)],oe.default[n(275)].PROFILE_NAME,h),t.default[n(281)]()[n(349)](oe.default[n(298)].BALANCER,oe.default[n(275)][n(299)],p),w._loader.storage.setSettings(w.options),w[n(313)][n(277)]&&(w[n(313)][n(277)].setSettings(w[n(290)]),w._loader[n(277)][n(339)]()),w[n(313)].CDNLoader[n(295)](w.options,b[n(355)]),w._loader[n(302)][n(339)]();const e=[a.m.cdnPriority,a.m[n(374)]][n(358)](w.options[n(347)])&&(w._loader.CDNLoader[n(311)]()[n(279)]>0||!0===(null===(l=w[n(290)][n(336)])||void 0===l?void 0:l[n(356)]));t.default[n(281)]()[n(309)]()?t.default.getInstance().setActiveSwitchingOnLegacy(e):t.default[n(281)]()[n(349)](oe.default.Products[n(287)],oe.default[n(275)].AS_ENABLED,e)}else r.default[n(291)](s.BalancerTag,n(288)),w[n(313)][n(277)][n(310)](),w[n(313)].CDNLoader[n(365)](),t.default[n(281)]()[n(349)](oe.default[n(298)][n(287)],oe.default.BalancerVariables[n(300)],n(286))}catch(e){r.default[n(291)](s.BalancerTag,n(289),e)}}else JSON[n(357)](S.response),t.default[n(281)]()[n(349)](oe.default[n(298)][n(287)],oe.default[n(275)][n(300)],"Origin"),r.default.debug(s.BalancerTag,"API call failed with status code "+S[n(373)]),w[n(313)][n(302)][n(325)]();t.default[n(281)]()[n(349)](oe.default[n(298)][n(287)],oe.default[n(275)].DECISION_FINISHED,!0)}e()},S[o(278)]=function(){const t=o;w[t(313)][t(302)][t(325)](),r.default[t(291)](s.BalancerTag,"API call failed due to a network error."),e()},c?S[o(303)](o(362),E+u[o(372)](A),!1):S[o(303)](o(362),E+u[o(372)](A)),t.default[o(281)]()[o(349)](oe.default[o(298)].BALANCER,oe.default[o(275)].DECISION_FINISHED,!1),t.default[o(281)]()[o(276)](oe.default.Products.BALANCER,oe.default[o(275)][o(330)]),t.default[o(281)]()[o(276)](oe.default[o(298)][o(287)],oe.default.BalancerVariables[o(299)]),t.default.getInstance()[o(276)](oe.default.Products.BALANCER,oe.default[o(275)][o(341)]),r.default.verbose(s.BalancerTag,o(306)+E+u.formatParameters(A)+o(375)+T+")"),w[o(283)]&&S.setRequestHeader("Authorization",w[o(367)]+" "+w._jwtToken),S[o(322)]()})),this[y(364)](e,i,n,o,null!=l&&l,null!=d&&d,h,p,f,g,m,v)},new((_=void 0)||(_=Promise))((function(e,t){const i=Yt;function n(e){const i=Yt;try{s(b[i(293)](e))}catch(e){t(e)}}function r(e){const i=Yt;try{s(b[i(312)](e))}catch(e){t(e)}}function s(t){const i=Yt;var s;t.done?e(t[i(329)]):(s=t[i(329)],s instanceof _?s:new _((function(e){e(s)})))[i(305)](n,r)}s((b=b[i(317)](y,[]))[i(293)]())}));var y,_,b}[Qt(364)](e,t,i,n,a,o,l,d,u,c,h,p){const f=Qt;n>0&&(r.default[f(348)](s.BalancerTag,f(371)+t),setTimeout((()=>{const r=f;var s;this[r(292)](e,t,i,n,a,o,null!==(s=this[r(290)][r(316)])&&void 0!==s&&s,l,d,u,c,h,p)}),1e3*n))}[Qt(340)](e){const t=Qt,i=new URL(e),n=i[t(314)]+i.pathname,r=n[t(319)]("/")+1;return{route:n[t(328)](0,r),fileName:n[t(328)](r)}}[Qt(346)](e){const t=Qt;var i;if(!this[t(324)][t(326)](e))return!0;{const n=null!==(i=this._manifestMap[t(360)](e))&&void 0!==i?i:Date[t(285)]();if(Date[t(285)]()-n>a.df.decisionReloadIntervalPerManifestMilliseconds)return!0}return!1}[Qt(369)](){const e=Qt;this[e(324)][e(331)](((t,i)=>{const n=e;Date[n(285)]()-t>a.df[n(323)]&&(r.default.verbose(s.BalancerTag,n(307)+i+n(321)+a.df[n(323)]+"ms"),this[n(324)][n(304)](i))}))}deleteOldestFromManifestMap(){const e=Qt;let t,i=1/0;
2this[e(324)].forEach(((e,n)=>{e<i&&(i=e,t=n)})),void 0!==t&&this[e(324)][e(304)](t)}}const $t=ei;function Zt(){const e=["progressDownloadedBytesLastUpdate","52LXopXE","value","483AYgZUo","58359yxzmWs","105444AJXSWU","4481696cukQWG","208671WMhtyl","instantBandwidth","__awaiter","done","endTime","throw","now","limit","downloadTimeMs","delay","size","209105tVLUYS","apply","next","bandwidth","startTime","470850DDwbWr"];return(Zt=function(){return e})()}function ei(e,t){const i=Zt();return(ei=function(e,t){return i[e-=437]})(e,t)}!function(e){const t=ei,i=e();for(;;)try{if(196237==parseInt(t(446))/1+parseInt(t(438))/2+parseInt(t(443))/3*(parseInt(t(440))/4)+parseInt(t(457))/5+parseInt(t(444))/6+parseInt(t(442))/7+-parseInt(t(445))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Zt);class ti{[$t(453)](e,t){return i=this,r=function*(){const i=ei;let n=t[i(456)]/(t[i(454)]/1e3)*8;if(0!=e&&n>e){let n=1e3*t.size*8/e,r=(Date[i(452)](),t[i(437)],n-t[i(454)]);r>0&&(yield u[i(455)](r)),t[i(450)]=Date[i(452)](),t[i(454)]=t[i(450)]-t[i(437)],t[i(460)]=t[i(456)]/(t[i(454)]/1e3),t[i(447)]=0,t[i(439)]=t[i(450)]}},new((n=void 0)||(n=Promise))((function(e,t){function s(e){const i=ei;try{o(r[i(459)](e))}catch(e){t(e)}}function a(e){const i=ei;try{o(r[i(451)](e))}catch(e){t(e)}}function o(t){const i=ei;var r;t[i(449)]?e(t[i(441)]):(r=t[i(441)],r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}o((r=r[ei(458)](i,[])).next())}));var i,n,r}}function ii(){var e=["unbanned_time","http_1XX","internal_switches_due_quality","cache_hit_chunks","internal_switches","cache_miss_chunks","network_latency_samples","video_downloaded_chunks","min_ping_time","internal_unbanned_time","30XTYTih","245132gNzPLE","internal_switches_due_errors","http_3XX","5mwdhsh","7701715lRXZJi","http_2XX","max_ping_time","136SnXmsR","http_5XX","downloaded_chunks","time","avg_ping_time","min_response_bytes","min_response_time","3064692GGEzJZ","internal_provider","video_time","99639pPIuOL","min_throughput","27125527Fmogwp","resource","internal_banned","compressed_video_bytes","internal_switches_due_connectivity","min_network_latency","switches_due_quality","response_time_samples","errors","5199080qQzyOd","max_response_time","internal_unbanned","is_banned","provider","http_4XX","2844XuDFDd","max_bandwidth","switches_due_connectivity","116nMZMPR","internal_is_banned","downloaded_bytes"];return(ii=function(){return e})()}function ni(e,t){var i=ii();return(ni=function(e,t){return i[e-=232]})(e,t)}!function(e){for(var t=ni,i=e();;)try{if(630967==parseInt(t(279))/1*(parseInt(t(282))/2)+parseInt(t(244))/3*(parseInt(t(245))/4)+parseInt(t(248))/5*(parseInt(t(259))/6)+parseInt(t(249))/7+parseInt(t(252))/8*(parseInt(t(262))/9)+parseInt(t(273))/10+-parseInt(t(264))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ii);class ri{constructor(e,t,i,n,r,s,a,o,l,d,u,c,h,p,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B,U,V,F,q,j,H,G,W,X,K,z,Y,Q,J,$,Z,ee,te,ie,ne,re,se){var ae=ni;this[ae(277)]=e,this[ae(260)]=t,this.is_p2p=i,this[ae(233)]=r,this[ae(254)]=s,this.response_bytes=_,this[ae(257)]=b,this.max_response_bytes=T,this.response_bytes_samples=S,this.response_time=E,this[ae(258)]=A,this[ae(274)]=w,this[ae(271)]=P,this.network_latency=C,this[ae(269)]=L,this.max_network_latency=D,this[ae(240)]=k,this.throughput=I,this[ae(263)]=R,this.max_throughput=N,this.throughput_samples=O,this[ae(272)]=a,this[ae(235)]=M,this[ae(250)]=x,this[ae(247)]=B,this[ae(278)]=U,this[ae(253)]=V,this[ae(234)]=F,this.banned_time=q,this[ae(267)]=H,this.uncompressed_video_bytes=j,this.switches=G,this[ae(281)]=W,this.switches_due_errors=X,this[ae(270)]=K,this[ae(255)]=o,this[ae(280)]=l,this.min_bandwidth=d,this.banned=Y,this.unbanned=Q,this[ae(256)]=u,this[ae(242)]=c,this[ae(251)]=h,this[ae(276)]=z,this.is_active=n,this[ae(265)]=p,this.response_time=E,this[ae(237)]=f,this[ae(239)]=g,this.video_downloaded_bytes=m,this[ae(241)]=v,this[ae(261)]=y,this[ae(232)]=J,this[ae(266)]=$,this[ae(275)]=Z,this[ae(238)]=ee,this[ae(236)]=te,this[ae(268)]=ie,this[ae(246)]=ne,this.internal_banned_time=re,this[ae(243)]=se}}function si(e,t){var i=ai();return(si=function(e,t){return i[e-=340]})(e,t)}function ai(){var e=["errors","peers_available","min_network_latency","2516259MsKYgU","min_throughput","resource","max_peers_parallel_used","response_time_samples","max_network_latency","video_downloaded_chunks","3375815KydLtd","max_response_time","9351992scKDfS","64nHMmJI","network_latency_samples","upload_time","peers","19004RKyuNl","network_latency","peers_parallel_used","throughput","is_p2p","6280422pkBwTz","peer_connection_time","late_uploaded_chunks","max_peers_available","other_errors","min_response_time","6815018icASnM","video_downloaded_bytes","min_ping_time","downloaded_bytes","time","max_bandwidth","min_bandwidth","timeout_errors","response_bytes","active_peers","max_response_bytes","missed_downloaded_chunks","479096mQrJDF","max_ping_time","uploaded_chunks"];return(ai=function(){return e})()}!function(e){for(var t=si,i=e();;)try{if(590218==parseInt(t(353))/1*(-parseInt(t(357))/2)+-parseInt(t(343))/3+parseInt(t(380))/4+parseInt(t(350))/5+parseInt(t(362))/6+-parseInt(t(368))/7+parseInt(t(352))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ai);class oi{constructor(e,t,i,n,r,s,a,o,l,d,u,c,h,p,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B,U,V,F,q,j,H,G,W,X,K,z,Y,Q,J){var $=si;this.provider=e,this.internal_provider=t,this[$(361)]=i,this[$(371)]=n,this.downloaded_chunks=r,this[$(340)]=s,this[$(372)]=a,this[$(373)]=o,this[$(374)]=l,this.avg_ping_time=d,this[$(370)]=u,this[$(381)]=c,this[$(345)]=h,this[$(369)]=p,this[$(349)]=f,this.video_time=g,this.uploaded_bytes=m,this[$(382)]=v,this[$(355)]=y,this[$(364)]=_,this.late_uploaded_bytes=b,this.late_downloaded_bytes=T,this[$(379)]=S,this[$(375)]=E,this[$(366)]=A,this[$(377)]=w,this[$(356)]=P,this[$(376)]=C,this.min_response_bytes=L,this[$(378)]=D,this.response_bytes_samples=k,this.response_time=I,this[$(367)]=R,this[$(351)]=N,this[$(347)]=O,this[$(358)]=M,this[$(342)]=x,this[$(348)]=B,this[$(354)]=U,this[$(360)]=V,this[$(344)]=F,this.max_throughput=q,this.throughput_samples=j,this[$(341)]=H,this[$(365)]=G,this.min_peers_available=W,this.peers_used=X,this[$(359)]=K,this[$(346)]=z,this.min_peers_parallel_used=Y,this.peer_discovery_time=Q,this[$(363)]=J}}function li(){var e=["priorityCdn","videoId","requestPlatform","apiCallsMinResponseTime","33736AlzqVa","p2pAvailable","15816690NyvEJH","4aNTApU","bucket","apiCallsMaxResponseTime","447qhtnwk","bolinaAvailable","28369MXWsDu","5990733pcTDwK","isLive","apiCallsAvgResponseTime","6791890AemoYX","11812yHemgo","activeSwitchingPriority","4174104IudkoD","forceDecision","apiCallResponses","9JqkmQh","apiCallErrors","announcedCdns","chunkDuration"];return(li=function(){return e})()}function di(e,t){var i=li();return(di=function(e,t){return i[e-=240]})(e,t)}!function(e){for(var t=di,i=e();;)try{if(884378==-parseInt(t(262))/1*(-parseInt(t(257))/2)+parseInt(t(260))/3*(parseInt(t(241))/4)+-parseInt(t(240))
2/5+-parseInt(t(243))/6+parseInt(t(263))/7+parseInt(t(254))/8*(parseInt(t(246))/9)+parseInt(t(256))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(li);class ui{constructor(e,t,i,n,r,s,a,o,l,d,u,c,h,p,f,g){var m=di;this[m(247)]=e,this[m(245)]=t,this[m(253)]=i,this[m(265)]=n,this[m(259)]=r,this[m(258)]=s,this[m(264)]=a,this[m(251)]=o,this[m(244)]=l,this[m(252)]=d,this[m(255)]=u,this[m(261)]=c,this[m(242)]=h,this[m(250)]=p,this[m(249)]=f,this[m(248)]=g}}const ci=pi;function hi(){const e=["lastReportedCodavelSwitchesDueToConnectivity","CDN","get","highestPingTime","codavelBanTime","_instance","getSegmentDuration","otherErrors","lastReportedCodavelSwitchesDueToErrors","getPluginVersion","host","peersAvailable","stringify","codavelUnbanCount","report","absent","minNetworkLatency","value","codavelAllBanned","lastReportedCodavelUnbanTime","millis","token","activePeers","downloadMillis","433005msXqol","140328IDzeUV","downloadChunksVideo","uuid","getPingTime","sumThroughput","BALANCER_BITRATE","profileName","cacheHit","registerCommonVariable","minThroughput","http_2XX","totalFailures","throw","apiCallsAvgResponseTime","http5xxResponses","clone","trunc","codavelSwitchesDueToErrors","lastCdnStats","http4xxResponses","samplesThroughput","http_4XX","minPeersAvailable","isCodavel","discardedDownloadedBytes","lastReportedCodavelBanTime","total","Consumer","4322934kDckJY","takeIf","switchesDueToConnectivity","lastReportedCodavelSwitchesDueToQuality","peersUsed","downloadedChunks","codavelUnbanTime","getForceDecision","apply","uploadedChunks","resetOnPing","getViewCode","getReportInterval","maxApiCallResponseTime","NQS","apiCallErrors","some","lastReportedCodavelBanCount","updateData","bucket","verbose","codavelBanCount","videoTime","maxPeersParallelUsed","pushPeriodicDataFromCallback","reportRequest","stopped","lowestSegmentBandwidth","unBannedCount","set","timeoutErrors","lastReportedCodavelUnbanCount","usedOrProbed","bolinaAvailable","downloadMillisVideo","maxPingTime","every","cacheMiss","totalFail","announcedCdns","banned","CDNLoader","http1xxResponses","downloadedChunksVideo","forceDecision","lowestPingTime","requestPlatform","lateUploadedBytes","getCdnCacheMisses","compressedBytes","downloadedBytesVideo","sumVideoTime","accountCode","samplesResponseTime","http3xxResponses","codavelSwitchesDueToConnectivity","MAX_SAFE_INTEGER","http2xxResponses","minPingTime","missedDownloadedChunks","maxThroughput","http_1XX","timeout","AnalyticsVariables","sumResponseBytes","downloadedSegments","lastP2pStats","http_5XX","lastReportedCodavelSwitches","name","isUsingLegacy","p2pAvailable","forEach","updatePeerMetrics","4276080LROPyK","minResponseBytes","GET","processedApiCall","sumVideoBytes","switches","minApiCallResponseTime","peerDiscoveryTime","lateUploadedChunks","internal_provider","avgPingTime","then","bannedTime","maxPeersAvailable","maxResponseBytes","discardedUploadedChunks","-js","resource","3175371GEDshm","codavelSwitches","takeMin","lateDownloadedBytes","Plugin","values","2227470WgxiSe","updateAvailability","takeMax","__awaiter","BalancerVariables","unbannedCount","uploadedBytes","peerConnectionTime","uploadedTime","downloadedBytes","8IFeenL","error","switchesDueToErrors","minResponseTime","getInstance","maxResponseTime","samplesResponseBytes","updateCodavelBanTimes","getCdnList","bannedCount","failedRequests","maxBandwidth","getCommonVariable","errors","8uYSQFn","offline","isLive","BLACK_HOLE","priorityCdn","getOptions","loader","active","discardedUploadedBytes","714432LhxHot","apiCallResponses","getFastDataSessionToken","split","maxNetworkLatency","CODAVEL","sumNetworkLatency","totalPeers","videoId","peersParallelUsed","uncompressedBytes","samplesNetworkLatency","apiCallsMinResponseTime","switchesDueToQuality","getFastDataService","wasStartSent","startsWith","codavelSwitchesDueToQuality","getTime","12yEtOEh","http_3XX","minPeersParallelUsed","unbannedTime","P2PLoader","Products","minBandwidth","started","sumResponseTime","downloadBytesVideo","done","getIsLive","P2P"];return(hi=function(){return e})()}function pi(e,t){const i=hi();return(pi=function(e,t){return i[e-=366]})(e,t)}!function(e){const t=pi,i=e();for(;;)try{if(425513==parseInt(t(579))/1*(parseInt(t(401))/2)+parseInt(t(400))/3*(-parseInt(t(551))/4)+parseInt(t(527))/5+parseInt(t(560))/6+-parseInt(t(429))/7+-parseInt(t(537))/8*(-parseInt(t(521))/9)+-parseInt(t(503))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(hi);class fi{static[ci(541)](e){const t=ci;return null==this[t(381)]&&null!=e?this._instance=new fi(e):null!=e&&null!=this[t(381)]&&(null==e?void 0:e[t(403)])!=this[t(381)][t(557)][t(403)]&&(this[t(381)].report(),this[t(381)]=new fi(e)),this._instance}constructor(e){const t=ci;this[t(370)]=!1,this[t(455)]=!1,this[t(419)]=new Map,this[t(495)]=new Map,this[t(386)]="",this[t(397)]="",this[t(481)]="",this.profileName="",this[t(520)]="",this[t(426)]=void 0,this[t(395)]=void 0,this[t(446)]=void 0,this[t(460)]=void 0,this.lastReportedCodavelSwitches=void 0,this.lastReportedCodavelSwitchesDueToQuality=void 0,this[t(384)]=void 0,this[t(376)]=void 0,this[t(557)]=e}[ci(447)](e,i,n,r,o){var l,d,u,c;return d=this,c=function*(){const d=pi;if(this[d(386)]=e,this[d(397)]=i,this[d(481)]=n,this[d(407)]=null!=r?r:"",this[d(520)]=o,!(t.default[d(541)]()[d(499)]()&&this[d(397)][d(576)]("undefined")||this[d(370)])){const e=a.xC[d(377)];t.default[d(541)]()[d(453)](t.default.getInstance()[d(556)]()[d(552)]?oe.default[d(428)][d(554)]:oe.default.Consumer[d(443)],e,e,1e3*this[d(557)][d(441)](),null!==(l=t.default.getInstance()[d(549)](oe.default[d(368)].VIDEO_ANALYTICS,oe.default[d(492)].METHOD_OPTION))&&void 0!==l?l:s.Method[d(505
2)],(()=>{const e=d;if(t.default[e(541)]()[e(575)]())return fi.getInstance().report()}),(()=>{})),this[d(370)]=!0}},new((u=void 0)||(u=Promise))((function(e,t){function i(e){try{r(c.next(e))}catch(e){t(e)}}function n(e){const i=pi;try{r(c[i(413)](e))}catch(e){t(e)}}function r(t){const r=pi;var s;t[r(373)]?e(t[r(393)]):(s=t[r(393)],s instanceof u?s:new u((function(e){e(s)})))[r(514)](i,n)}r((c=c[pi(437)](d,[])).next())}))}[ci(390)](){const e=ci;try{if(!this.stopped){const i=this[e(557)][e(470)][e(545)](),n=Array.from(i[e(526)]())[e(465)]((t=>!t[e(461)])),a=new Map;let o;o=n?new Map:new Map(i);let l=0,d=0;this.loader[e(470)][e(544)](),this.loader[e(367)][e(502)]();let u=!1;if(o[e(501)]((t=>{const i=e;t[i(528)]();const n=t[i(416)](),r=this[i(419)][i(378)](t[i(498)]);l+=n[i(507)]||0,d+=n[i(480)]||0;const s={downloadedBytesVideo:n[i(479)],downloadedChunksVideo:n[i(472)],videoTime:n[i(463)],downloadedBytes:n[i(536)],downloadedChunks:n[i(434)],sumResponseBytes:n[i(493)],minResponseBytes:n[i(504)],maxResponseBytes:n.maxResponseBytes,samplesResponseBytes:n[i(543)],sumResponseTime:n.sumResponseTime,minResponseTime:n.minResponseTime,maxResponseTime:n[i(542)],samplesResponseTime:n[i(482)],sumNetworkLatency:n[i(566)],minNetworkLatency:n[i(392)],maxNetworkLatency:n.maxNetworkLatency,samplesNetworkLatency:n[i(571)],sumThroughput:n.sumThroughput,minThroughput:n[i(410)],maxThroughput:n[i(489)],samplesThroughput:n[i(421)],totalFailures:n[i(467)],http_1XX:n.http1xxResponses,http_2XX:n[i(486)],http_3XX:n[i(483)],http_4XX:n[i(420)],http_5XX:n[i(415)],unbannedTime:n[i(366)],bannedTime:n[i(515)],compressedBytes:n[i(478)],uncompressedBytes:n[i(570)],switches:n[i(508)],switchesDueToConnectivity:n[i(431)],switchesDueToErrors:n[i(539)],switchesDueToQuality:n.switchesDueToQuality,millis:n[i(399)],bannedCount:n.bannedCount,unbannedCount:n.unBannedCount,avgPingTime:n[i(513)],minPingTime:n[i(474)]===Number[i(485)]?0:n[i(474)],maxPingTime:n[i(379)],cacheHit:n.getCdnCacheHits(),cacheMiss:n.getCdnCacheMisses(),minBandwidth:n.lowestSegmentBandwidth===Number[i(485)]?0:n[i(456)],maxBandwidth:n.highestSegmentBandwidth};r&&(s.downloadedBytesVideo-=r[i(479)],s.downloadedChunksVideo-=r[i(472)],s.videoTime-=r[i(463)],s.downloadedBytes-=r[i(536)],s[i(434)]-=r[i(434)],s[i(412)]-=r[i(467)],null!=s[i(490)]&&null!=r.http1xxResponses&&(s[i(490)]-=r[i(471)]),null!=s[i(411)]&&null!=r[i(486)]&&(s[i(411)]-=r.http2xxResponses),null!=s.http_3XX&&null!=r[i(483)]&&(s[i(580)]-=r[i(483)]),null!=s[i(422)]&&null!=r[i(420)]&&(s[i(422)]-=r.http4xxResponses),null!=s[i(496)]&&null!=r[i(415)]&&(s[i(496)]-=r.http5xxResponses),null!=s[i(478)]&&null!=r[i(478)]&&(s[i(478)]-=r[i(478)]),null!=s.uncompressedBytes&&null!=r.uncompressedBytes&&(s[i(570)]-=r[i(570)]),null!=s[i(508)]&&null!=r.switches&&(s[i(508)]-=r.switches),null!=s[i(431)]&&null!=r[i(431)]&&(s[i(431)]-=r[i(431)]),null!=s[i(539)]&&null!=r[i(539)]&&(s[i(539)]-=r[i(539)]),null!=s[i(573)]&&null!=r[i(573)]&&(s.switchesDueToQuality-=r.switchesDueToQuality),s[i(396)]-=r.downloadMillis,s[i(546)]-=r.bannedCount,s.unbannedCount-=r[i(457)],s[i(513)]-=r.avgPingTime,s.minPingTime=0==s.minPingTime?s[i(487)]:s[i(487)]-r.lowestPingTime,s[i(464)]=0==s[i(464)]?s[i(464)]:s[i(464)]-r[i(379)],s[i(408)]-=r.getCdnCacheHits(),s[i(466)]-=r[i(477)](),s[i(369)]=0==s.minBandwidth?s[i(369)]:s[i(369)]-r[i(456)],s[i(548)]=0==s.maxBandwidth?s[i(548)]:s[i(548)]-r.highestSegmentBandwidth);const o=t.isCodavel()?i(565):t.provider;if(t[i(424)]())if(u){const e=new ri(o,t[i(512)],!1,t[i(558)],this[i(430)](s.downloadedBytes,(e=>0!=e)),this[i(430)](s[i(434)],(e=>0!=e)),this[i(430)](s.totalFailures,(e=>0!=e)),this[i(430)](s[i(396)],(e=>0!=e)),this[i(430)](s.maxBandwidth,(e=>0!=e)),this[i(430)](s.minBandwidth,(e=>0!=e)),this[i(430)](s[i(513)],(e=>0!=e)),this[i(430)](s.minPingTime,(e=>0!=e)),this[i(430)](s[i(464)],(e=>0!=e)),this[i(520)],this[i(430)](s[i(408)],(e=>0!=e)),this[i(430)](s[i(466)],(e=>0!=e)),this[i(430)](s.downloadedBytesVideo,(e=>0!=e)),this[i(430)](s[i(472)],(e=>0!=e)),this[i(430)](s[i(451)],(e=>0!=e)),s.sumResponseBytes,this[i(523)](s[i(504)]),this[i(529)](s[i(517)]),s[i(543)],s[i(371)],this[i(523)](s[i(540)]),this.takeMax(s.maxResponseTime),s[i(482)],s[i(566)],this.takeMin(s[i(392)]),this[i(529)](s.maxNetworkLatency),s[i(571)],s[i(405)],this[i(523)](s[i(410)]),this[i(529)](s[i(489)]),s[i(421)],this[i(430)](s.http_1XX,(e=>0!=e)),this.takeIf(s[i(411)],(e=>0!=e)),this[i(430)](s[i(580)],(e=>0!=e)),this[i(430)](s[i(422)],(e=>0!=e)),this[i(430)](s[i(496)],(e=>0!=e)),void 0,void 0,this[i(430)](s.uncompressedBytes,(e=>0!=e)),this[i(430)](s.compressedBytes,(e=>0!=e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,t[i(469)],this[i(430)](s[i(546)],(e=>0!=e)),this[i(430)](s[i(532)],(e=>0!=e)),this[i(430)](s.switches,(e=>0!=e)),this[i(430)](s[i(431)],(e=>0!=e)),this[i(430)](s[i(539)],(e=>0!=e)),this[i(430)](s[i(573)],(e=>0!=e)),s.bannedTime,s[i(366)]);a.set(t[i(498)],e),this[i(419)].set(t[i(498)],n)}else{let e=0;null!=this[i(557)].CDNLoader[i(450)]&&(e=null!=this[i(446)]?this.loader[i(470)][i(450)]-this[i(446)]:this[i(557)][i(470)].codavelBanCount);let r=0;null!=this.loader[i(470)].codavelUnbanCount&&(r=null!=this[i(460)]?this[i(557)][i(470)][i(389)]-this.lastReportedCodavelUnbanCount:this[i(557)][i(470)][i(389)]);let l=0;null!=this[i(557)][i(470)].codavelBanTime&&(l=null!=this[i(426)]?this.loader[i(470)][i(380)]-this[i(426)]:this[i(557)][i(470)][i(380)]);let d=0;null!=this[i(557)][i(470)][i(435)]&&(d=null!=this[i(395)]?this[i(557)][i(470)][i(435)]-this[i(395)]:this.loader[i(470)][i(435)]);let c=0;null!=this.loader[i(470)][i(522)]&&(c=null!=this[i(497)]?this[i(557)].CDNLoader[i(522)]-this[i(497)]:this[i(557)].CDNLoader[i(522)]);let h=0;null!=this.loader[i(470)][i(577)]&&(h=null!=this.lastReportedCodavelSwitchesDueToQuality?this[i(557)][i(470)].codavelSwitchesDueToQuality-this[i(432)]:this[i(557)][i(470)][i(577)]);let p=0;null!=this[i(557)].CDNLoader.codavelSwitchesDueToConnectivity&&(p=null!=this[i(376)]?this[i(557)][i(470)][i(484)]-this[i(376)]:this[i(557)].CDNLoader[i(484)]);let f=0;null!=this[i(557)][i(470)].codavelSwitchesDueToErrors&&(f=null!=this.lastReportedCodavelSwitchesDueToErrors?this[i(557)][i(470)][i(418)]-this[i(384)]:this[i(557)][i(470)][i(418)]);const g=new ri(o,t[i(512)],!1,t.active,this.takeIf(s[i(536)],(e=>0!=e)),this[i(430)](s.downloadedChunks,(e=>0!=e)),this[i(430)](s[i(412)],(e=>0!=e)),this[i(430)](s[i(396)],(e=>0!=e)),this.takeIf(s[i(548)],(e=>0!=e)),this[i(430)](s[i(369)],(e=>0!=e)),this[i(430)](s[i(513)],(e=>0!=e)),this.takeIf(s[i(487)],(e=>0!=e)),this.takeIf(s[i(464)],(e=>0!=e)),this[i(520)],this[i(430)](s[i(408)],(e=>0!=e)),this[i(430)](s.cacheMiss,(e=>0!=e)),this[i(430)](s[i(479)],(e=>0!=e)),this[i(430)](s[i(472)],(e=>0!=e)),this[i(430)](s[i(451)],(e=>0!=e)),s[i(493)],this[i(523)](s.minResponseBytes),this[i(529)](s.maxResponseBytes),s[i(543)],s[i(371)],this[i(523)](s[i(540)]),this.takeMax(s[i(542)]),s[i(482)],s.sumNetworkLatency,this[i(523)](s[i(392)]),this[i(529)](s[i(564)]),s.samplesNetworkLatency,s[i(405)],this[i(523)](s.minThroughput),this.takeMax(s[i(489)]),s.samplesThroughput,this[i(430)](s.http_1XX,(e=>0!=e)),this[i(430)](s[i(411)],(e=>0!=e)),this[i(430)](s[i(580)],(e=>0!=e)),this[i(430)](s[i(422)],(e=>0!=e)),this[i(430)](s.http_5XX,(e=>0!=e)),d,l,this[i(430)](s.uncompressedBytes,(e=>0!=e)),this.takeIf(s[i(478)],(e=>0!=e)),this.takeIf(c,(e=>0!=e)),this[i(430)](p,(e=>0!=e)),this[i(430)](f,(e=>0!=e)),this[i(430)](h,(e=>0!=e)),this[i(557)].CDNLoader[i(394)],this[i(430)](e,(e=>0!=e)),this.takeIf(r,(e=>0!=e)),t[i(469)],this[i(430)](s[i(546)],(e=>0!=e)),this[i(430)](s[i(532)],(e=>0!=e)),this.takeIf(s[i(508)],(e=>0!=e)),this.takeIf(s[i(431)],(e=>0!=e)),this[i(430)](s[i(539)],(e=>0!=e)),this[i(430)](s.switchesDueToQuality,(e=>0!=e)),s[i(515)],s.unbannedTime);a[i(458)](t[i(498)],g),this[i(419)][i(458)](t[i(498)],n),u=!0}else{const e=new ri(o,t[i(512)],!1,t.active,this[i(430)](s.downloadedBytes,(e=>0!=e)),this[i(430)](s[i(434)],(e=>0!=e)),this.takeIf(s[i(412)],(e=>0!=e)),this.takeIf(s.millis,(e=>0!=e)),this[i(430)](s[i(548)],(e=>0!=e)),this.takeIf(s[i(369)],(e=>0!=e)),this[i(430)](s[i(513)],(e=>0!=e)),this[i(430)](s[i(487)],(e=>0!=e)),this[i(430)](s[i(464)],(e=>
20!=e)),this[i(520)],this.takeIf(s[i(408)],(e=>0!=e)),this[i(430)](s.cacheMiss,(e=>0!=e)),this[i(430)](s[i(479)],(e=>0!=e)),this[i(430)](s[i(472)],(e=>0!=e)),this[i(430)](s.videoTime,(e=>0!=e)),s[i(493)],this[i(523)](s.minResponseBytes),this[i(529)](s.maxResponseBytes),s.samplesResponseBytes,s[i(371)],this[i(523)](s.minResponseTime),this[i(529)](s[i(542)]),s[i(482)],s[i(566)],this[i(523)](s[i(392)]),this[i(529)](s[i(564)]),s[i(571)],s[i(405)],this[i(523)](s.minThroughput),this[i(529)](s.maxThroughput),s.samplesThroughput,this.takeIf(s.http_1XX,(e=>0!=e)),this[i(430)](s.http_2XX,(e=>0!=e)),this[i(430)](s[i(580)],(e=>0!=e)),this[i(430)](s[i(422)],(e=>0!=e)),this[i(430)](s.http_5XX,(e=>0!=e)),s[i(366)],s[i(515)],this[i(430)](s[i(570)],(e=>0!=e)),this.takeIf(s.compressedBytes,(e=>0!=e)),this[i(430)](s.switches,(e=>0!=e)),this[i(430)](s.switchesDueToConnectivity,(e=>0!=e)),this[i(430)](s[i(539)],(e=>0!=e)),this[i(430)](s[i(573)],(e=>0!=e)),t[i(469)],this[i(430)](s[i(546)],(e=>0!=e)),this.takeIf(s[i(532)],(e=>0!=e)));a[i(458)](t.name,e),this[i(419)][i(458)](t[i(498)],n)}})),this[e(557)].P2PLoader.isEnabled()){const t=this[e(557)][e(367)].getStats(),i=this[e(495)].get(e(375));l+=t[e(507)]||0,d+=t.sumVideoTime||0;const n={downloadedBytes:t[e(536)],downloadedChunks:t[e(494)],errors:t.failedRequests[e(427)],millis:t[e(399)],maxBandwidth:t[e(548)],minBandwidth:t.minBandwidth===Number[e(485)]?0:t[e(369)],avgPingTime:t[e(513)],minPingTime:t.minPingTime===Number[e(485)]?0:t[e(487)],maxPingTime:t.maxPingTime,downloadMillisVideo:t.downloadMillisVideo,downloadBytesVideo:t[e(372)],downloadChunksVideo:t[e(402)],uploadedBytes:t[e(533)],uploadedChunks:t[e(438)],uploadedTime:t[e(535)],lateUploadedChunks:t[e(518)],lateUploadedBytes:t[e(559)],lateDownloadedBytes:t[e(425)],missedDownloadedChunks:t[e(547)][e(391)],timeoutErrors:t[e(547)][e(491)],otherErrors:t[e(547)][e(538)],activePeers:t[e(398)],totalPeers:t[e(567)],sumResponseBytes:t[e(493)],minResponseBytes:t[e(504)],maxResponseBytes:t[e(517)],samplesResponseBytes:t[e(543)],sumResponseTime:t[e(371)],minResponseTime:t[e(540)],maxResponseTime:t[e(542)],samplesResponseTime:t.samplesResponseTime,sumNetworkLatency:t[e(566)],minNetworkLatency:t.minNetworkLatency,maxNetworkLatency:t[e(564)],samplesNetworkLatency:t.samplesNetworkLatency,sumThroughput:t[e(405)],minThroughput:t.minThroughput,maxThroughput:t.maxThroughput,samplesThroughput:t.samplesThroughput,peersAvailable:t.peersAvailable,minPeersAvailable:t[e(423)],maxPeersAvailable:t[e(516)],peersUsed:t[e(433)],peersParallelUsed:t[e(569)],minPeersParallelUsed:t[e(581)],maxPeersParallelUsed:t[e(452)],peerDiscoveryTime:t[e(510)],peerConnectionTime:t[e(534)]};i&&(n[e(536)]-=i.downloadedBytes,n[e(434)]-=i[e(494)],n[e(550)]-=i[e(547)].total,n[e(396)]-=i.downloadMillis,n[e(548)]=0==n[e(548)]?n[e(548)]:n.maxBandwidth-i[e(548)],n[e(369)]=0==n[e(369)]?n[e(369)]:n[e(369)]-i.minBandwidth,n[e(513)]-=i[e(513)],n.minPingTime=0==n[e(487)]?n[e(487)]:n[e(487)]-i[e(487)],n[e(464)]=0==n.maxPingTime?n[e(464)]:n[e(464)]-i.maxPingTime,n[e(487)]-=i[e(487)],n.maxPingTime-=i[e(464)],n[e(463)]-=i[e(463)],n.downloadBytesVideo-=i[e(372)],n[e(402)]-=i[e(402)],n.uploadedBytes-=i[e(533)],n[e(438)]-=i.uploadedChunks,n.uploadedTime-=i[e(535)],n[e(511)]-=i[e(518)],n[e(476)]-=i.discardedUploadedBytes,n[e(524)]-=i[e(425)],n[e(488)]-=i[e(547)][e(391)],n[e(459)]-=i[e(547)][e(491)],n[e(383)]-=i[e(547)].error,n[e(398)]-=i[e(398)],n.totalPeers-=i.totalPeers,null!=n[e(387)]&&null!=i[e(387)]&&(n[e(387)]-=i[e(387)]),null!=n[e(433)]&&null!=i[e(433)]&&(n.peersUsed-=i[e(433)]),null!=n.peersParallelUsed&&null!=i[e(569)]&&(n.peersParallelUsed-=i[e(569)]),null!=n[e(510)]&&null!=i[e(510)]&&(n[e(510)]-=i[e(510)]),null!=n[e(534)]&&null!=i[e(534)]&&(n[e(534)]-=i[e(534)]));const r=new oi("P2P",e(375),!0,this[e(430)](n[e(536)],(e=>0!=e)),this[e(430)](n[e(434)],(e=>0!=e)),this[e(430)](n[e(550)],(e=>0!=e)),this[e(430)](n.millis,(e=>0!=e)),this.takeIf(n[e(548)],(e=>0!=e)),this[e(430)](n[e(369)],(e=>
20!=e)),this.takeIf(n.avgPingTime,(e=>0!=e)),this.takeIf(n[e(487)],(e=>0!=e)),this[e(430)](n.maxPingTime,(e=>0!=e)),this[e(520)],this[e(430)](n.downloadBytesVideo,(e=>0!=e)),this[e(430)](n[e(402)],(e=>0!=e)),this.takeIf(n[e(463)],(e=>0!=e)),this[e(430)](n.uploadedBytes,(e=>0!=e)),this[e(430)](n[e(438)],(e=>0!=e)),this[e(430)](n[e(535)],(e=>0!=e)),this[e(430)](n[e(511)],(e=>0!=e)),this[e(430)](n.lateUploadedBytes,(e=>0!=e)),this.takeIf(n[e(524)],(e=>0!=e)),this[e(430)](n.missedDownloadedChunks,(e=>0!=e)),this[e(430)](n[e(459)],(e=>0!=e)),this[e(430)](n[e(383)],(e=>0!=e)),this.takeIf(n[e(398)],(e=>0!=e)),this.takeIf(n[e(567)],(e=>0!=e)),n.sumResponseBytes,n[e(504)],n[e(517)],n[e(543)],n.sumResponseTime,n[e(540)],n[e(542)],n[e(482)],n[e(566)],n[e(392)],n[e(564)],n[e(571)],n[e(405)],n.minThroughput,n[e(489)],n.samplesThroughput,this[e(430)](n[e(387)],(e=>0!=e)),this[e(529)](n.maxPeersAvailable),this.takeMin(n[e(423)]),this[e(430)](n.peersUsed,(e=>0!=e)),this.takeIf(n[e(569)],(e=>0!=e)),this.takeMax(n[e(452)]),this[e(523)](n[e(581)]),this[e(430)](n[e(510)],(e=>0!=e)),this[e(430)](n[e(534)],(e=>0!=e)));a[e(458)](e(375),r),this[e(495)][e(458)](e(375),t)}const c={};a[e(501)](((e,t)=>{c[t]=e}));const h=d>0?8*l*1e3/d:0;let p;if(t.default[e(541)]().registerCommonVariable(oe.default[e(368)].BALANCER,oe.default.BalancerVariables.BALANCER_TRAFFIC,l),t.default[e(541)]()[e(409)](oe.default.Products.BALANCER,oe.default[e(531)][e(406)],h),this.loader[e(470)][e(506)]&&(p=new ui(this[e(557)][e(470)][e(444)],this[e(557)][e(470)][e(561)],void 0!==this[e(557)][e(470)][e(509)]?Math[e(417)](this[e(557)][e(470)][e(509)]):void 0,void 0!==this.loader.CDNLoader.avgApiCallResponseTime?Math[e(417)](this[e(557)][e(470)].avgApiCallResponseTime):void 0,void 0!==this[e(557)][e(470)][e(442)]?Math[e(417)](this[e(557)][e(470)][e(442)]):void 0,this[e(557)].CDNLoader.getBucket(),this[e(557)][e(470)][e(374)](),this[e(397)],this[e(557)][e(470)][e(436)](),e(525),this[e(557)][e(470)].p2pAvailable,this[e(557)].CDNLoader[e(462)],this.loader[e(470)].activeSwitchingPriority,this[e(557)][e(470)][e(555)],this.loader[e(470)][e(382)](),this[e(557)][e(470)][e(468)])),o[e(501)]((t=>{t[e(439)]()})),this.loader[e(367)].isEnabled()&&this[e(557)][e(367)][e(439)](),this.loader[e(470)][e(439)](),r.default[e(449)](s.BalancerTag,"BalancerPing: "+JSON[e(388)](c)),a.size>0)return this[e(454)](this.token,this[e(481)],this[e(407)],this[e(520)],JSON[e(388)](c),p)}}catch(e){}}hasValuesChanged(e){const t=ci;return Object.keys(e)[t(445)]((t=>0!=e[t]))}[ci(430)](e,t){return void 0!==e&&t(e)?e:void 0}takeMin(e){return void 0!==e?e:Number[ci(485)]}takeMax(e){return void 0!==e?e:Number.MIN_SAFE_INTEGER}[ci(454)](e,i,n,r,s,a){const o=ci;if(""==s||"{}"==s)return;let l={};return l=null!=a?{timemark:(new Date)[o(578)](),code:t.default[o(541)]()[o(499)]()?t.default[o(541)]()[o(440)]():e,sessionRoot:t.default[o(541)]()[o(562)](),v:t.default[o(385)]()[o(563)](o(519))[0],pluginVersion:t.default.getPluginVersion(),pingTime:t.default[o(541)]().getFastDataService()[o(404)](),token:e,accountCode:i,profileName:n,data:s,api_errors:a[o(444)],api_responses:a[o(561)],api_min_response_time:a[o(572)],api_avg_response_time:a[o(414)],api_max_response_time:a[o(414)],bucket:a[o(448)],is_live:a[o(553)],video_id:a[o(568)],force_decision:a[o(473)],request_platform:a[o(475)],p2p_available:a[o(500)],bolina_available:a.bolinaAvailable,active_switching_priority:a.activeSwitchingPriority,priority_cdn:a[o(555)],chunk_duration:a.chunkDuration,announced_cdns:a.announcedCdns}:{timemark:(new Date).getTime(),code:t.default[o(541)]()[o(499)]()?t.default[o(541)]()[o(440)]():e,sessionRoot:t.default[o(541)]()[o(562)](),v:t.default.getPluginVersion().split("-js")[0],pingTime:t.default[o(541)]()[o(574)]()[o(404)](),token:e,accountCode:i,profileName:n,data:s},l}}const gi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let mi;const vi=new Uint8Array(16);function yi(){if(!mi&&(mi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mi(vi)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));const bi=function(e,t,i){if(gi.randomUUID&&!t&&!e)return gi.randomUUID();const n=(e=e||{}).random||(e.rng||yi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(let e=0;e<16;++e)t[i+e]=n[e];return t}return function(e,t=0){return _i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]}(n)},Ti=Ei;function Si(){const e=["set","bandwidth","getRendition","readyStateChangeEM","allowSpecialDelimitersInUrl","data","throw","download","updateCDNStatsOnSuccess","downloadMillis","downloadedSegments","setManifestResource","185757woOycV","Content-Length","pathname","cdnName","balanceManifests","apply","getInstance","getCommonVariable","_resource","camelToSnake","authData","off","delete","onProcessSegmentFail","isDev","readyState","options","processSegment","getActiveRequests"," for ","setActive","removeActiveSegment","now","Success","VIDEO_ANALYTICS","toLowerCase","5105QTANUS","P2PLoader","request","1RxnLgF","isMedia","useP2P","value","changeStatusCDN","getStats","storage","AnalyticsVariables","319396xEUVtO","hasOwnProperty","retries","onProgress","size","status","loadBalancerData","byteLength","Products","getIsEnabled","isManifest","resource","then","next","verbose","statsReportBusinessObject","enableCDN will be deprecated use setActive instead.","getReportInterval","updateCDNStatsOnFailure","7qlYBSj","getSegment","_segments","signManifestUsingApi","reportTime","setMaxB
2andwith","totalBandwidth","onProcessSegmentSuccess","updateData","isAudio","updateUrl","onAbort","trunc","newDownloadedSegment","debug","downloadAvgBw","bandwidthPosition","abort","2937108MVvZKQ","total","bucketName","getFastDataSessionToken","loadEM","forceDecisionCall","crypto.getRandomValues() not available. Falling back to Math.random-based UUID","totalDownloadedBytes","uuid","startTime","replace","errorEM","_accountCode","_$1","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx","P2P PATH FOR ID ","isEnabled","readTimeoutMilliseconds","loadEndEM","DEVICE_ANALYTICS","renditionCount","getMaxBandwidth","currentRenditionBandwidth","host","APP_ANALYTICS_DEVICE_STRING","requestReadTimeout","response","d1.npaw.com","VIEW_CODE","P2P","1442349voKDAl","push","SEGMENT FAILED WITH STATUS ","enable","_options","onSuccess","stringify","Fail"," isAudio ","enableCDN","downloadedBytes","clean","profileName","loadCDNBalancerData","timeBetweenHeads","_balancerBusinessObject","jwtAuthType","toString","failed","apiHost","updateProgressStats","limit","1912QzIocI","2012832Uwoifd","jwtToken","statusCode","storeSegment","segmentsMap","url","the status is -> ","timeout","loadStartEM","updateTime","realBodySize","getResponseHeader","isLive","3814664NhgmWS","170QMFmss","disable","done","CDNLoader","warn"];return(Si=function(){return e})()}function Ei(e,t){const i=Si();return(Ei=function(e,t){return i[e-=133]})(e,t)}!function(e){const t=Ei,i=e();for(;;)try{if(348559==-parseInt(t(226))/1*(parseInt(t(234))/2)+-parseInt(t(143))/3+parseInt(t(165))/4*(-parseInt(t(223))/5)+parseInt(t(271))/6+-parseInt(t(253))/7*(-parseInt(t(179))/8)+parseInt(t(166))/9+-parseInt(t(180))/10*(-parseInt(t(197))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Si);class Ai{constructor(e,t,i){const n=Ei;this[n(255)]=new Map,this[n(170)]=new Map,this[n(287)]=!0,this[n(283)]=e,this[n(147)]=t,this._resource=new Kt,this[n(232)]=new _e(this),this[n(162)]=i,this._options[n(157)]&&this[n(147)][n(157)]>=1e3&&(a.wc.timeBetweenBurstsMilliseconds=this[n(147)][n(157)]),this.P2PLoader=new J(this._accountCode,t,this.storage),this.CDNLoader=new ge(t,this[n(205)],this[n(224)],this[n(162)]),this[n(249)]=fi.getInstance(this),ae[n(203)](this),K.getInstance(this[n(224)]),this[n(279)]=(()=>{const e=Ei;try{return bi()}catch(t){return r.default[e(184)](s.BalancerTag,e(277),t),(()=>{const e=Ei;return e(285)[e(281)](/[xy]/g,(t=>{const i=e,n=16*Math.random()|0;return("x"===t?n:3&n|8)[i(160)](16)}))})()}})();const o=new Jt(this,null==t?void 0:t[n(159)],null==t?void 0:t[n(167)]);this._balancerBusinessObject=o,(t[n(276)]||t[n(256)])&&this.loadCDNBalancerData(!0)}[Ti(251)](){const e=Ti;return!this[e(147)].reportTime||this[e(147)].reportTime<1?5:this[e(147)][e(257)]}[Ti(206)](e){const t=Ti,i={};for(const n in e)e[t(235)](n)&&(i[n[t(281)](/([A-Z])/g,t(284))[t(222)]()]=e[n]);return i}[Ti(156)](e){const i=Ti;var n,r,s,a,o,l,d,u,c,h;const p=this[i(147)].dynamicRules?JSON[i(149)](this[i(206)](this[i(147)].dynamicRules)):"",f=t.default[i(203)]()[i(204)](oe.default.Products[i(290)],oe.default.DeviceVariables[i(137)])||"";null!=e&&e&&this[i(158)][i(240)](this._accountCode,"/",null!==(n=this._options[i(178)])&&void 0!==n&&n,null!==(r=this[i(147)][i(175)])&&void 0!==r?r:0,null!==(s=this._options.debug)&&void 0!==s&&s,null!==(a=this[i(147)][i(211)])&&void 0!==a&&a,null!==(o=this._options[i(256)])&&void 0!==o&&o,this[i(147)].profileName,this[i(147)][i(273)],this[i(147)][i(136)],p,f,this[i(147)][i(207)]),this[i(147)][i(245)]&&""!=this[i(147)][i(245)]&&this[i(158)][i(240)](this[i(283)],this[i(147)][i(245)],null!==(l=this[i(147)][i(178)])&&void 0!==l&&l,null!==(d=this[i(147)][i(175)])&&void 0!==d?d:0,null!==(u=this._options.debug)&&void 0!==u&&u,null!==(c=this._options[i(211)])&&void 0!==c&&c,null!==(h=this[i(147)][i(256)])&&void 0!==h&&h,this._options[i(155)],this[i(147)][i(273)],this._options[i(136)],p,f,this[i(147)][i(207)])}[Ti(214)](e,i,n,o,l=a._C[Ti(236)],d=!1,c){const h=Ti,p=u.isMedia(e[h(199)]),f=!p&&u[h(244)](e[h(199)],this._options[h(189)]),g=this[h(224)][h(287)]()&&p;r.default[h(248)](s.BalancerTag,h(286)+e[h(199)]);const m=new Ht(e[h(199)],e.href,this._resource,o,l,g,d);if(m[h(192)]=i,m.headers=o,this._segments[h(185)](m.id,m),!f){const t=this[h(205)][h(187)](e.pathname);null!=t&&(r.default[h(248)](s.BalancerTag,"Detected rendition -> "+t[h(186)]+" "+(null==t?void 0:t[h(269)])+h(151)+t[h(262)]+h(216)+e),m.duration=t.targetDuration,m.rendition=t,!t[h(262)]&&(this[h(183)][h(135)]=t[h(186)],this.CDNLoader.currentRenditionPos=t[h(269)]+1,this[h(183)][h(133)]=this[h(205)].getVideoRenditions()[h(238)]))}this[h(205)]&&this._resource[h(154)]();const v=t.default[h(203)]()[h(204)](oe.default[h(242)][h(221)],oe.default[h(233)][h(141)]);let y=t.default[h(203)]()[h(274)]()+(v?"_"+v:"");!y&&(y=this.uuid),this[h(249)][h(261)](h(140),y,this[h(283)],this[h(147)][h(155)],e[h(160)]()),m[h(244)]=f,m.isMedia=p,i&&(m.on(a.yL[h(220)],(e=>{return t=this,r=function*(){this.onProcessSegmentSuccess(m),n[0](m)}
2,new((i=void 0)||(i=Promise))((function(e,n){const s=Ei;function a(e){const t=Ei;try{l(r[t(247)](e))}catch(e){n(e)}}function o(e){const t=Ei;try{l(r[t(191)](e))}catch(e){n(e)}}function l(t){const n=Ei;var r;t[n(182)]?e(t[n(229)]):(r=t[n(229)],r instanceof i?r:new i((function(e){e(r)})))[n(246)](a,o)}l((r=r[s(202)](t,[]))[s(247)]())}));var t,i,r})),m.on(a.yL[h(150)],(e=>{const t=h;this[t(210)](m,!0),0==m[t(236)]&&n.length>1&&n[1](),r.default.error(s.BalancerTag,"Segment request failed, no more retries "+m.route)})));const _=this[h(183)][h(263)](m);return m[h(244)]&&this[h(147)][h(201)]&&(m[h(171)]=null!=_?_:m.url),_!==h(142)?this[h(183)][h(215)]()[h(185)](m.id,m):(m[h(200)]=h(142),m.cdnProvider=h(142),this.P2PLoader[h(225)](m,void 0)),m[h(280)]=Date[h(219)](),m}[Ti(210)](e,t){const i=Ti,n=e[i(200)];e[i(161)]=!0,this[i(183)][i(252)](n,e),e.triedP2P&&1==e.useP2P&&(e[i(228)]=!1,this[i(183)][i(263)](e))}onProcessSegmentSuccess(e){const t=Ti;ae[t(203)]()[t(266)](e),K[t(203)]()[t(266)](e),e.off(a.yL[t(220)]),e[t(208)](a.yL[t(150)]);const i=this.CDNLoader[t(134)](e[t(200)]);i>0&&(new ti)[t(164)](i,e),this[t(183)][t(193)](e),this[t(183)][t(218)](e),this[t(224)].isEnabled()&&e[t(227)]&&!this.P2PLoader[t(254)](e)&&this[t(224)][t(169)](e),this[t(255)][t(209)](e.id)}[Ti(152)](e,t){const i=Ti;return r.default.warn(s.BalancerTag,i(250)),this[i(217)](e,t)}[Ti(217)](e,t){const i=Ti;return e===i(142)?(t?this.P2PLoader[i(146)]():this[i(224)][i(181)](),!0):this.CDNLoader[i(230)](e,t)}[Ti(258)](e,t){return e!==Ti(142)&&(this.CDNLoader.setMaxBandwidth(e,t)||!1)}[Ti(264)](e,t){const i=Ti;t&&!t[i(161)]&&t[i(173)]&&(r.default[i(267)](s.BalancerTag,"Request was canceled due a timeout -> "+t[i(171)]),this[i(210)](t,!1))}[Ti(275)](e,t,i){}[Ti(174)](e,t,i){const n=Ti;null!=t&&i.total>0&&this[n(224)][n(287)]()&&t[n(227)]&&!this[n(224)][n(254)](t)&&e[n(139)]&&e.response[n(241)]&&e[n(139)][n(241)]>0&&(t.data=e[n(139)],t[n(176)]=i[n(272)],this.P2PLoader[n(169)](t))}progressEM(e,t,i){const n=Ti;null!=t&&(this[n(224)].isEnabled()&&t[n(227)]&&!this[n(224)][n(254)](t)&&e[n(139)]&&e[n(139)][n(241)]&&e[n(139)][n(241)]>0&&(r.default[n(267)](s.BalancerTag,n(172)+e[n(239)]),t[n(190)]=e[n(139)],i[n(272)]>0&&(t[n(176)]=i[n(272)]),this.P2PLoader[n(169)](t)),t[n(237)](e,i),this[n(183)][n(163)]())}[Ti(188)](e,t,i){const n=Ti;switch(e[n(212)]){case 2:t&&!t[n(138)]&&(t[n(138)]=setTimeout((()=>this[n(173)](e,t)),a._C[n(288)]));break;case 4:if(null!=t){if(clearTimeout(t[n(138)]),delete t.requestReadTimeout,t[n(168)]=e[n(239)],e[n(239)]>=200&&e.status<400){const r=t[n(148)](e[n(139)],e[n(177)](n(198))||"0",i[n(213)][n(189)]);return t[n(244)]&&i[n(196)](t.url),r?this[n(260)](t):this.onProcessSegmentFail(t,!1),!0}return r.default[n(267)](s.BalancerTag,n(145)+e[n(239)]+" -> "+t.id),this[n(210)](t,!1),!1}}return!0}[Ti(173)](e,t){const i=Ti;t.timeout=!0,e[i(270)]()}[Ti(289)](e,t,i){}[Ti(282)](e,t,i){}[Ti(231)](){const e=Ti,t=this[e(183)][e(231)](),i=this.P2PLoader.getStats();let n=!1,r=0;return i&&this[e(224)]&&this[e(183)][e(231)]()[e(278)]>0&&(n=!0,r=8*i[e(153)]/(i[e(194)]/1e3)),this.P2PLoader.isEnabled()&&(t.cdns[e(144)]({downloadedBytes:i[e(153)]||0,downloadedChunks:i[e(195)]||0,bandwidth:Math[e(265)](r||0),instantBandwidth:Math[e(265)](0),lastInstantBandwidth:Math[e(265)](0),peakBandwidth:Math[e(265)](0),failures:0,totalFailures:0,retries:0,downloadTime:i.downloadMillis,provider:e(142),profileName:e(142),isActive:this[e(224)][e(287)](),ptb:0,usedOnce:n,hugeChunks:0,firstHugeChunkSize:0,lastChunksLapse:0,maxBandwidth:0,banned:!1,lastBandwidth:0,scoringBandwidth:0}),t[e(259)]=t[e(259)]+(i[e(268)]||0),t[e(278)]=t.totalDownloadedBytes+(i.downloadedBytes||0)),t}[Ti(146)](){this.isEnabled=!0}[Ti(181)](){this[Ti(287)]=!1}[Ti(243)](){return this.isEnabled}}const wi=Ci;function Pi(){const e=["now","addInterceptor"," UniqPeers: ","P2P Error on event load end","loadstart","setManifestResource","getActiveRequests","P2PLoader"," byte length-> ","updateUrl","notice","addEventListener","getInstance","updateP2PId","71770DRclvI","interceptors","getSegment","GET","retryBecauseNewHeaders"," size -> ","toFixed","devHost","string","pathname","requestHeader","method","downloadedChunks","readyState","1104626bnwKif","12069459HrVGml","realBodySize","undefined","CDNLoader","getI
2p","FORCE","next","sliceByFirstSpecial","abort","Error occurred for URL: ","segmentsMap","responseHeader","isSubtitles","apply","P2P TIMEOUTERROR BY ME: ","data","call","Error in openAndSend: ","useP2P","forEach","responseType","P2P READY FOR ","ms id:","getPeersAhead","_accountCode","balancer","provider","getRecommendedManifest","&rnpaw=","P2P2 Download done -> "," PEER ID -> ","sendJoin","__awaiter","debug","body","getNewUrl"," TIMEOUTS ","statusText","isCdnBalancerSupported","progress","signManifestUsingApi","openAndSend","manifest","2749926gwvQRH","P2P DISPATCH LOAD END","loadend","progressEM","XHR-not-intercepted -> ","dispatchEvent","response","simpleRequest","18566AdcXZa","getUploadRequestsFailed","getVersion","balanceSubtitles"," original -> ","resetP2PConnection","enable","peers: ","downloadedBytes","segments-> (","resource","isAsync","error","getResponseHeader","1446072lNDJBJ","STREBOPX","getId","4055IhQqjS","timeouts","MB(CDN/SB/P2P) ","apiHost","lastDecisionTimestamp","trim","setResourceInfo","438NtrxbG","P2P Error on event load start","disable","rnpaw","Sending join to tracker due to new manifest","Error processing segment for header: ","load","loadStartEM","request failed"," real size-> ","P2P Error on event ready state change","getBitmovinSendHttpRequest","removeInterceptors"," peer version: ","processSegment","elapsedTime","onAbort","components","length","blob","isEnabled","getPeers","loader","host","HTTP for -> ","then","byteLength","defineProperty","request","Destroying CDN Balancer","loadInterceptor","open","origRes","params","prototype"," ip: ","entries","send","peer","getAllResponseHeaders","size","getUploadedUniqPeers","media","isTheoplayer","verbose","getAccountCode","cdns","overrideMimeType","14LCqjVf","credentials","forceHttp","getUploadedBytes","Fetching segment via P2P for -> ","3620hMvjbg","getUploadedChunks","loadCDNBalancerData","getPeersNothing","buffer","p2pId","getLoader","useTheoplayer","ms timeout: ","setRequestHeader","arraybuffer","status","segment","toString","P2P Error on event load event","P2P TIMEOUTERROR BY NO DATA ME:","url","readystatechange"," peer id: ","split","balanceAudio","join","P2P TIMEOUTERROR ","isBitmovin","value","headers","shift","set","Error calling original setRequestHeader: ","loadEndEM","Error in original send: ","balanceManifests","?rnpaw="," segmnet p2p id -> ","Could not parse URL ","onreadystatechange","363AHEkHN","search","slice","isManifest","timeout","responseURL","options","getIsEnabled","defaultChunkDownloadTimeout","startsWith","P2P Failure Update url on problems with p2p ","done","destroy","STREBOOS","Range","connectTimeoutMilliseconds","includes","P2P","delete","kb ","isDev","P2P DISPATCH READY STATE","Fetching segment via CDN for -> "];return(Pi=function(){return e})()}function Ci(e,t){const i=Pi();return(Ci=function(e,t){return i[e-=304]})(e,t)}!function(e){const t=Ci,i=e();for(;;)try{if(690048==parseInt(t(348))/1+-parseInt(t(400))/2*(parseInt(t(424))/3)+-parseInt(t(477))/4*(parseInt(t(417))/5)+parseInt(t(392))/6+parseInt(t(472))/7*(-parseInt(t(414))/8)+parseInt(t(349))/9+parseInt(t(334))/10*(parseInt(t(513))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Pi);class Li extends w{constructor(e,t){const i=wi;var n;if(super(),this.isEnabled=!0,this[i(305)]=0,this[i(500)]=!1,this[i(467)]=!1,this.lastDecisionTimestamp=0,this.apiHost="gnsnpaw.com",this[i(373)]=e,this[i(519)]=new T,this[i(446)]=new Ai(this[i(373)],this[i(519)],this[i(420)]),this[i(335)]=new y(this),t&&void 0!==(null===(n=t[i(441)])||void 0===n?void 0:n[i(374)])&&!t[i(441)][i(374)])return this.isEnabled=!1,this[i(446)][i(426)](),void this[i(446)][i(327)].disable();const o=this;this[i(360)]=XMLHttpRequest[i(458)][i(413)],XMLHttpRequest.prototype[i(413)]=function(e){return o.responseHeader.call(this,e)},this.allResponseHeader=XMLHttpRequest[i(458)][i(463)],XMLHttpRequest[i(458)][i(463)]=function(){const e=i;return o.allResponseHeader[e(365)](this)},this[i(357)]=XMLHttpRequest.prototype.abort,XMLHttpRequest[i(458)][i(357)]=function(){const e=i,t=this[e(489)];o.getLoader()[e(440)](this,t),o[e(357)][e(365)](this)},this[i(471)]=XMLHttpRequest[i(458)].overrideMimeType,XMLHttpRequest.prototype[i(471)]=function(e){const t=i;o.overrideMimeType[t(365)](this,e)}
2,this[i(344)]=XMLHttpRequest[i(458)][i(486)],XMLHttpRequest[i(458)][i(486)]=function(e,t,...n){const a=i,l=this[a(489)];if(l)try{l.headers[e]=t,l[a(338)]=0==l[a(338)]?1:l[a(338)]}catch(e){r.default[a(412)](s.BalancerTag,a(429)+e)}try{o[a(344)].call(this,e,t,...n)}catch(e){throw r.default[a(412)](s.BalancerTag,a(505)+e),e}},this[i(461)]=XMLHttpRequest[i(458)].send,XMLHttpRequest[i(458)][i(461)]=function(e,...t){var i,n,l,d,u,c,h,p,f,g,m,v,y,_,b;return y=this,b=function*(){const y=Ci;(!this[y(517)]||this[y(517)]>a._C[y(312)])&&this[y(411)]&&(this[y(517)]=a._C[y(312)]);const _=this.segment;if((!o.isEnabled||!_||_[y(516)])&&(!_||!(null!==(i=o.options[y(508)])&&void 0!==i&&i||null!==(n=o.options[y(389)])&&void 0!==n&&n)))try{return void o[y(461)].call(this,e,...t)}catch(e){throw r.default.error(s.BalancerTag,y(507)+e),e}if(1==_[y(338)])return _[y(338)]=2,_[y(333)](),void o[y(390)](this,_);try{const e=o[y(483)]().getStats()[y(470)];let t=0,i=0,n=0,a=0,p=0,f=0,g=(null===(l=o.getLoader())||void 0===l?void 0:l[y(327)][y(475)]())||0;const m=(null===(d=o[y(483)]())||void 0===d?void 0:d[y(327)][y(478)]())||0;g=g/1024/1024;for(let r=0;r<e.length;r++)e[r][y(375)]===y(314)?(i+=e[r][y(408)],a+=e[r].downloadedChunks):e[r][y(375)]===y(310)||e[r].provider===y(415)?(p+=e[r][y(408)],f+=e[r][y(346)]):(t+=e[r][y(408)],n+=e[r][y(346)]);const v=null===(u=o[y(483)]())||void 0===u?void 0:u[y(327)].getUploadRequests(),_=null===(c=o[y(483)]())||void 0===c?void 0:c[y(327)][y(401)](),b=null===(h=o[y(483)]())||void 0===h?void 0:h[y(327)][y(465)]();let T=0,S=0,E=0;try{T=i/(i+t+p)*100,S=p/(i+t+p)*100,E=g/((i+t+p)/1024/1024)*100}catch(e){}const A=o.getLoader()[y(327)][y(445)]()[y(464)]||0,w=" ("+o[y(483)]()[y(327)].getPeersBehind()+"/"+o.getLoader()[y(327)][y(480)]()+"/"+o[y(483)]()[y(327)][y(372)]()+") ";r.default[y(468)](s.BalancerTag,"P2P/SMB Traffic "+T[y(340)](2)+"% "+S[y(340)](2)+"%\n"+y(419)+(t/1024/1024).toFixed(2)+"/"+(p/1024/1024)[y(340)](2)+"/"+(i/1024/1024).toFixed(2)+"\n"+y(409)+n+"/"+f+"/"+a+")\n"+y(407)+A+w+"\nuploaded: (MB/#/%) "+g.toFixed(2)+"/"+m+"/"+E[y(340)](2)+"\nur: "+v+"|"+_+y(322)+b)}catch(e){}const b=Date[y(320)]();_[y(333)]();let T=o[y(446)][y(327)][y(336)](_);if("P2P"!==_.cdnName||_[y(474)])r.default[y(468)](s.BalancerTag,(_[y(474)]?y(354):"")+y(448)+_[y(456)]),o[y(483)]().CDNLoader[y(326)]()[y(504)](_.id,_),r.default[y(330)](s.BalancerTag,y(319)+_[y(456)]),o.send[y(365)](this,e,...t);else{let e=!1;r.default[y(330)](s.BalancerTag,y(476)+_[y(456)]),_.forceHttp=!0,_[y(367)]=!1;let t=null==T?void 0:T[y(364)],i=T&&(null==T?void 0:T[y(364)][y(450)])>0&&(null==t?void 0:t[y(450)])===(null==T?void 0:T[y(350)])&&(null==T?void 0:T[y(350)])&&(null==T?void 0:T.realBodySize)>0,n=0;for(;!i;)yield new Promise((e=>setTimeout(e,20))),T=o[y(446)][y(327)][y(336)](_),t=null==T?void 0:T[y(364)],n=(null==t?void 0:t[y(450)])||0,i=T&&(null==T?void 0:T[y(350)])>0&&(null==T?void 0:T[y(364)][y(450)])>0&&(null==t?void 0:t[y(450)])===(null==T?void 0:T[y(350)])&&null!=(null==T?void 0:T[y(350)]),Date[y(320)]()-b>a.LI[y(517)]?(i=!0,t=void 0,e=!0,r.default[y(468)](s.BalancerTag,y(363)+o.loader[y(327)][y(416)]()+" TIME: "+(Date.now()-b)+" peer id: "+_.peer.id+y(437)+_[y(462)].getVersion()+y(459)+_[y(462)].getIp()+" "+n/((null==T?void 0:T.realBodySize)||1)*100+"%")):Date[y(320)]()-b>2e3&&(null==T||null==T[y(364)]||n<20)&&(i=!0,t=void 0,e=!0,r.default[y(468)](s.BalancerTag,y(492)+o.loader[y(327)].getId()+" "+(Date[y(320)]()-b>2e3)+y(495)+_[y(462)].id+y(437)+_[y(462)][y(402)]()+y(459)+_[y(462)].getIp()+" last length -> "+n));if(t&&(t=t[y(515)](0,t[y(450)])),e&&(_[y(462)]&&(_[y(462)][y(418)]=_[y(462)][y(418)]+1),r.default[y(468)](s.BalancerTag,y(499)+_.origRes+" "+_.id+" "+(null===(p=null==T?void 0:T[y(364)])||void 0===p?void 0:p[y(450)])+" "+(null==T?void 0:T[y(350)])+y(379)+(null===(f=_[y(462)])||void 0===f?void 0:f.id)+y(385)+_[y(462)].timeouts)),r.default[y(468)](s.BalancerTag,y(370)+_[y(456)]+" "+(null==t?void 0:t[y(450)])+" "+(null==T?void 0:T[y(350)])+" peer id -> "+_.peer.id+y(510)+_[y(482)]),T=o[y(446)][y(327)].getSegment(_),t&&(null===(g=null==T?void 0:T.data)||void 0===g?void 0:g[y(450)])==(null==T?void 0:T[y(350)])&&null!=(null==T?void 0:T[y(350)])&&(null==T?void 0:T[y(350)])>0){r.default[y(330)](s.BalancerTag,_[y(456)]+" downloaded through P2P. Size: "+((null===(m=null==T?void 0:T[y(364)])||void 0===m?void 0:m[y(450)])/1048576).toFixed(2)+"MB"),t instanceof Uint8Array&&(t=t[y(481)]);const e=new CustomEvent(y(494)),i=new CustomEvent(y(394)),n=new CustomEvent(y(430)),a=new CustomEvent(y(324));Object.defineProperty(this,y(398),{writable:!0}),Object[y(451)](this,y(488),{writable:!0}),Object[y(451)](this,y(386),{writable:!0}),Object[y(451)](this,"readyState",{writable:!0}),Object.defineProperty(this,y(450),{writable:!0}),Object.defineProperty(this,y(518),{writable:!0}),Object[y(451)](this,"responseType",{writable:!0}),this[y(450)]=t[y(450)],this[y(398)]=t,this[y(488)]=200,this[y(386)]="OK",this.readyState=XMLHttpRequest.DONE,this[y(518)]=_[y(456)],this[y(369)]=y(487),r.default.verbose(s.BalancerTag,"P2P DISPATCH LOAD START");try{this[y(397)](a)}catch(e){r.default.verbose(s.BalancerTag,y(425))}yield new Promise((e=>setTimeout(e,6))),r.default[y(468)](s.BalancerTag,y(318));try{this[y(397)](e)}catch(e){r.default.verbose(s.BalancerTag,y(434))}r.default[y(468)](s.BalancerTag,"P2P DISPATCH LOAD ");try{this[y(397)](n)}catch(e){r.default[y(468)](s.BalancerTag,y(491))}r.default[y(468)](s.BalancerTag,y(393));try{this[y(397)](i)}catch(e){r.default[y(468)](s.BalancerTag,y(323))}r.default[y(468)](s.BalancerTag,y(378)+(Date[y(320)]()-b)+y(371)+_[y(482)]+y(339)+t[y(450)]/1024+y(316)+_.origRes+" peer version "+_[y(462)][y(402)]()+y(459)+_[y(462)][y(353)]())}else r.default.verbose(s.BalancerTag,y(307)+(Date[y(320)]()-b)+y(485)+a.L
2I[y(517)]+y(328)+(null===(v=null==T?void 0:T[y(364)])||void 0===v?void 0:v[y(450)])+y(433)+(null==T?void 0:T[y(350)])+y(404)+_[y(456)]),_.forceHttp=!0,o[y(483)]()[y(352)][y(326)]()[y(504)](_.id,_),o[y(483)]().CDNLoader[y(329)](_),o[y(390)](this,_)}},new((_=void 0)||(_=Promise))((function(e,t){function i(e){const i=Ci;try{r(b[i(355)](e))}catch(e){t(e)}}function n(e){try{r(b.throw(e))}catch(e){t(e)}}function r(t){const r=Ci;var s;t[r(308)]?e(t[r(501)]):(s=t[r(501)],s instanceof _?s:new _((function(e){e(s)})))[r(449)](i,n)}r((b=b[Ci(362)](y,[])).next())}))},this[i(455)]=XMLHttpRequest.prototype[i(455)],XMLHttpRequest.prototype.open=function(e,t,n=!0,...a){const l=i;var d;if(this[l(411)]=n,!o[l(444)])return o[l(455)][l(365)](this,e,t,n,...a);let c=t;typeof t!==l(342)&&(c=t[l(490)]());let h=c;const p=h[l(496)]("?");h=u[l(356)](h,o[l(519)].allowSpecialDelimitersInUrl);try{const i=new URL(h),r=u[l(516)](i[l(343)]),s=u.isMedia(i.pathname),f=u.isAudio(i[l(343)]),g=u[l(361)](i[l(343)]);if(null==this[l(489)]&&Object.defineProperty(this,"segment",{writable:!0}),c[l(313)](l(377))||c.includes(l(509))){const e=new URL(c),i=e.searchParams;i[l(315)](l(427)),e[l(514)]=i[l(490)](),t=e[l(490)]()}else if(e===l(337)&&(r||s||f&&o[l(519)][l(497)]||g&&o[l(519)][l(403)])){let t;p.length>1&&(t=p[1]);let i=this[l(489)];null==i&&(i=o[l(399)](p[0],t,{})),null==this[l(489)]&&(this[l(489)]=i),this.addEventListener(l(430),(function(e){const t=l;o[t(483)]()[t(431)](this,i,e)})),this[l(331)](l(324),(function(e){o[l(483)]().loadStartEM(this,i,e)}));const r=this[l(512)],s=e=>{const t=l;null==r||r[t(365)](this,e),o[t(483)]().readyStateChangeEM(this,i,o)};o[l(500)]||o[l(467)]?this.onreadystatechange=s:this[l(331)]("readystatechange",s),this[l(331)](l(388),(function(e){const t=l;o[t(483)]()[t(395)](this,i,e)})),this[l(331)]("loadend",(function(e){const t=l;o[t(483)]()[t(506)](this,i,e)})),this[l(331)]("error",(function(e){}));const u=i.getNewUrl(null!==(d=o.options.signManifestUsingApi)&&void 0!==d&&d);return o[l(455)][l(365)](this,e,u,n,...a)}}catch(e){r.default[l(382)](s.BalancerTag,l(511)+h)}return r.default[l(382)](s.BalancerTag,l(396)+t),o[l(455)][l(365)](this,e,t,n,...a)}}[wi(309)](){const e=wi;r.default[e(382)](s.BalancerTag,e(453)),ae[e(332)]().stopMonitor(),this[e(446)][e(327)][e(309)](),this[e(444)]&&(XMLHttpRequest[e(458)][e(413)]=this[e(360)],XMLHttpRequest[e(458)][e(463)]=this.allResponseHeader,XMLHttpRequest[e(458)].abort=this[e(357)],XMLHttpRequest[e(458)].overrideMimeType=this[e(471)],XMLHttpRequest.prototype[e(486)]=this[e(344)],XMLHttpRequest[e(458)][e(461)]=this.send,XMLHttpRequest[e(458)][e(455)]=this[e(455)]),this[e(335)][e(436)]()}[wi(469)](){return this._accountCode}setOptions(e){const t=wi;var i;for(const i in e)this[t(519)][i]=e[i];this[t(420)]=(null!==(i=this.options[t(447)])&&void 0!==i?i:this[t(519)][t(317)])?a.df[t(341)]:a.df[t(447)],this[t(446)]=new Ai(this._accountCode,this[t(519)],this[t(420)])}[wi(390)](e,t){const i=wi;var n,a;try{const r=t[i(384)](null!==(n=this[i(519)][i(389)])&&void 0!==n&&n);(0===e[i(347)]||4===e[i(347)])&&e.open("GET",r),(null==t?void 0:t[i(502)])&&Object[i(460)](t.headers)[i(368)]((([t,n])=>{e[i(486)](t,n)})),e[i(461)]()}catch(e){throw r.default.error(s.BalancerTag,i(366)+e),r.default.error(s.BalancerTag,i(358)+t.getNewUrl(null!==(a=this.options[i(389)])&&void 0!==a&&a)),e}}[wi(452)](e,t,i,n,r,s,a){const o=wi;this[o(446)][o(438)](e,!0,i,n,r,s,a)}[wi(325)](e){const t=wi,i=Date[t(320)]()-this[t(421)];e&&(this[t(519)][t(410)]!==e||i>a.df.decisionCallWaitTime)&&(this[t(519)][t(410)]=e,this[t(446)]&&this[t(446)][t(327)]&&this[t(446)][t(327)][t(444)]()&&(r.default[t(382)](s.BalancerTag,t(428)),this.loader[t(327)][t(380)]()),!this[t(446)]&&(this[t(446)]=new Ai(this[t(373)],this[t(519)],this[t(420)])),this[t(446)][t(352)][t(423)](e),this.loader[t(479)](),this[t(421)]=Date[t(320)]())}getLoader(){return this[wi(446)]}[wi(321)](e,t){const i=wi;this[i(335)][i(454)](e,t)}[wi(376)](){return this[wi(446)].CDNLoader.getRecommendedManifest()}[wi(484)](){this.isTheoplayer=!0}[wi(435)](){const e=wi;return this[e(500)]=!0,function(t,i){const n=e;return typeof t===n(351)||!t[n(306)](n(466))&&!t[n(306)](n(391))?null:{getResponse:()=>new Promise(((e,t)=>{const n=Ci;var r;let s=Date[n(320)]();const a={request:i,url:i.url,headers:[],status:0,statusText:"",body:void 0},o=new XMLHttpRequest;o[n(369)]=null!==(r=i[n(369)])&&void 0!==r?r:"arraybuffer",o[n(512)]=function(r){const l=n;var d,c;if(2===o[l(347)])a.timeToFirstByte=(Date[l(320)]()-s)/1e3;else if(4===o[l(347)])if(a[l(488)]=o[l(488)],a[l(386)]=o[l(386)],a[l(439)]=(Date[l(320)]()-s)/1e3,o[l(488)]>=200&&o[l(488)]<400){o[l(369)]!==l(487)&&o[l(369)]!==l(443)?(a[l(383)]=u.ifByteArrayToString(o[l(398)]),a[l(442)]=a[l(383)][l(442)]):(a[l(383)]=o[l(398)],o.responseType===l(487)?a[l(442)]=a[l(383)].byteLength:o.responseType===l(443)&&(a[l(442)]=a[l(383)][l(464)]));const t=o[l(463)]()[l(422)]()[l(496)](/[\r\n]+/).map((e=>{const t=l,i=e.split(": ");return{name:i[t(503)](),value:i[t(498)](": ")}}));a[l(502)]=t,e(a)}else t({error:l(432),response:{request:{method:i[l(345)],url:i[l(493)],headers:i[l(502)],responseType:null!==(d=i.responseType)&&void 0!==d?d:"",credentials:null!==(c=i[l(473)])&&void 0!==c?c:""},url:i[l(493)],headers:{},status:o[l(488)],statusText:o.statusText}})},o[n(455)](i[n(345)],i[n(493)]);for(const e in i[n(502)])o[n(486)](e,i[n(502)][e]);o[n(461)](null==i?void 0:i[n(383)])})),cancel(){},setProgressListener(){}}}}[wi(405)](){const e=wi;this[e(446)][e(327)].resetP2PConnection(),this.options[e(410)]=void 0}[wi(399)](e,t,i){const n=wi;var a;
2try{const r=new URL(e),s=this.loader[n(438)](r,!1,[],i);s[n(457)]=t;const o=(null==i?void 0:i[n(311)])||"",l=s[n(384)](null!==(a=this[n(519)][n(389)])&&void 0!==a&&a);return this.loader[n(359)].set(l+o,r[n(490)]()),s}catch(e){throw r.default.error(s.BalancerTag,"Error in simpleRequest: "+e),e}}[wi(406)](){const e=wi;this.isEnabled=!0,this[e(446)][e(406)](),this[e(446)][e(327)][e(406)]()}disable(){const e=wi;this[e(444)]=!1,this.loader[e(426)](),this.loader[e(327)][e(426)]()}[wi(304)](){return this[wi(444)]}[wi(387)](){return!0}reload(e){const t=wi;null!=e&&(this[t(519)]=new T(e)),this.loader.P2PLoader.destroy(),this[t(446)]=new Ai(this[t(373)],this[t(519)],this[t(420)]),this[t(444)]=!0}}var Di=i(6014),ki=i.n(Di);class Ii{constructor(){}static getInstance(e=!1){return this._instance&&!e||(this._instance=new Ii),this._instance}showUnsupportedWarning(){Ii.warningShown||(r.default.notice("DiagnosticTool"," DiagnosticTools is not supported in this build version."),Ii.warningShown=!0)}destroy(){this.showUnsupportedWarning()}start(e){this.showUnsupportedWarning()}setSettings(e){this.showUnsupportedWarning()}clearReportTimeout(){this.showUnsupportedWarning()}setOptions(e){this.showUnsupportedWarning()}setBalancerEnabled(e){this.showUnsupportedWarning()}setVideoAnalyticsEnabled(e){this.showUnsupportedWarning()}setAdsAnalyticsEnabled(e){this.showUnsupportedWarning()}getReportTimeout(){return this.showUnsupportedWarning(),Ii.defaultReportTimeout}setReportTimeout(e){this.showUnsupportedWarning()}cleanCdnList(){this.showUnsupportedWarning()}addCdn(e,t){this.showUnsupportedWarning()}updateCdnInfo(e,t,i,n){this.showUnsupportedWarning()}wasSelectorCommunicationSuccessful(e,t){this.showUnsupportedWarning()}setInterceptedRequests(e){this.showUnsupportedWarning()}setActiveSwitchingEnabled(e){this.showUnsupportedWarning()}wasActiveSwitchingDecisionPerformed(e){this.showUnsupportedWarning()}setSwitchedCdns(e){this.showUnsupportedWarning()}usedSelectorAPIResponse(e){this.showUnsupportedWarning()}setTriedSendingBalancerStats(e){this.showUnsupportedWarning()}addNQSRequest(e){this.showUnsupportedWarning()}addNQSEvent(e,t){this.showUnsupportedWarning()}registeredPlayer(e){this.showUnsupportedWarning()}setTriedSendingNQSStats(e){this.showUnsupportedWarning()}addNQSAdRequest(e){this.showUnsupportedWarning()}addNQSAdEvent(e,t){this.showUnsupportedWarning()}registeredAdsPlayer(e){this.showUnsupportedWarning()}setTriedSendingNQSAdStats(e){this.showUnsupportedWarning()}report(){this.showUnsupportedWarning()}}Ii.defaultReportTimeout=3e5,Ii.warningShown=!1;var Ri=i(2507),Ni=i.n(Ri),Oi=i(4954),Mi=i.n(Oi),xi=i(3782),Bi=i.n(xi),Ui=i(7061),Vi=i.n(Ui),Fi=i(2071),qi=i.n(Fi),ji=i(3398),Hi=i.n(ji);class Gi{constructor(e,t,i,n=!1,r,a){this.method=s.Method.GET,this.service=e,this.params=t||{},this.body=i,this.force=n,this.onSuccessCallback=r,this.onFailCallback=a}getService(){return this.service}getMethod(){return this.method}setMethod(e){this.method=e}getParams(){return this.params}getForce(){return this.force}getOnSuccess(){return this.onSuccessCallback}getOnFail(){return this.onFailCallback}getParam(e){return this.params[e]}setParam(e,t){return this.params[e]=t,this}setParams(e){this.params=e}getBody(){return this.body}setBody(e){this.body=e}isPost(){return this.method===s.Method.POST}}var Wi,Xi=i(3473);!function(e){e[e.stopped=0]="stopped",e[e.started=1]="started"}(Wi||(Wi={}));class Ki{constructor(e){this._core=t.default.getInstance(),this._coreStorage=this._core.getCoreStorage(),this._expirationManager=new Xi.default(this._coreStorage.getSessionExpire()||s.ExpireDefault.DEFAULT_SESSION_TIMEOUT_MS,s.ExpireDefault.DEFAULT_MAX_DURATION_SESSION_MS,this._coreStorage),this._status=this._expirationManager.isStarted()?Wi.started:Wi.stopped,this._processing=!1,this._processTimeout=null,this._retryCounter=0,this._startRequest=null,this._requests=[],this._flushResolve=null,this._flushReject=null,this._flushRequestsFailed=[],this._flushTimeout=null,this.onRequestQueued=[],this.onWillSendRequest=[],this.onRequestSent=[],e&&"number"==typeof e.maxWaitingRequests&&e.maxWaitingRequests>0?this._maxWaitingRequests=e.maxWaitingRequests:this._maxWaitingRequests=50}destroy(){this._expirationManager.reset(),this._status=Wi.stopped,this._processing=!1,this._clearRequestProcessingTimeout(),this._retryCounter=0,this._startRequest=null,this._requests=[],this._clearFlushState(),this.onRequestQueued=[],this.onWillSendRequest=[],this.onRequestSent=[]}setMaxWaitingRequests(e){"number"==typeof e&&e>0&&(this._maxWaitingRequests=e)}_getLastStartStopIndices(){let e=-1,t=-1;for(let i=this._requests.length-1;i>=0;i--){switch(this._requests[i].getService()){case Bi().Service.SESSION_START:-1===e&&(e=i);break;case Bi().Service.SESSION_STOP:-1===t&&(t=i)}if(-1!==e&&-1!==t)break}return{indexStart:e,indexStop:t}}_queueableEvent(){const{indexStart:e,indexStop:t}=this._getLastStartStopIndices();let i;switch(this._status){case Wi.stopped:i=-1!==e&&e>t;break;case Wi.started:i=-1===e||-1!==e&&e>t;break;default:i=!1}return i}queueRequest(e){let t=!1;if(this._requests.length>=this._maxWaitingRequests)r.default.warn(s.SessionsTag,`Too many requests waiting for token (${this._requests.length}/${this._maxWaitingRequests}), dropping request`);else{t=!0,this._requests.push(e);for(const t of this.onRequestQueued)t(e);this._processRequests()}return t}flush(e){return new Promise(((t,i)=>{if(this._flushResolve)i(this._createFlushError("FLUSH_IN_PROGRESS"));else{this._flushResolve=t,this._flushReject=i,this._flushRequestsFailed=[],("number"!=typeof e||e<=0)&&(e=2500),this._flushTimeout=setTimeout((()=>{this._clearFlushState(),i(this._createFlushError("FLUSH_TIMEOUT",{timeoutMs:e}))}),e);try{this._processRequests()}catch(e){this._clearFlushState(),i(this._createFlushError("FLUSH_PROCESSING_ERROR",{originalError:e}))}}}))}_createFlushError(e,t){return{code:e,details:t}}_clearFlushState(){this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=null),this._flushResolve=null,this._flushReject=null,this._flushRequestsFailed=[]}_processRequests(){var e,t;let i;if(this._clearRequestProcessingTimeout(),0===this._requests.length)this._flushRequestsFailed.length>0?null===(e=this._flushReject)||void 0===e||e.call(this,this._createFlushError("FLUSH_REQUESTS_FAILED",{failedRequests:this._flushRequestsFailed})):null===(t=this._flushResolve)||void 0===t||t.call(this),this._clearFlushState();else if(this._processing);else if(""===this._core.getFastDataSessionToken())this._delayRequestProcessing(1e3);else if(this.hasExpired())this._processing=!0,this._recoverExpiredSession(),this._processing=!1,this._delayRequestProcessing(1e3);else if(this._processing=!0,i=this._requests[0],this._sendableRequest(i)){this._prepareRequestParam
2s(i);for(const e of this.onWillSendRequest)e(i);r.default.notice(s.SessionsTag,this._getRequestDescription(i)),this._core.pushData(this._core.getOptions().offline?oe.default.Consumer.BLACK_HOLE:oe.default.Consumer.NQS,i.getService(),i.getMethod(),i.getParams(),(()=>{this._processRequestSucceeded(i)}),(()=>{this._processRequestFailed(i)}))}else this._processRequestNotSend(i)}_sendableRequest(e){let t;switch(e.getService()){case Bi().Service.SESSION_START:t=this._status===Wi.stopped,t||(e.getForce()?(t=!0,r.default.debug(s.SessionsTag,this._getRequestDescription(e)," sending request even though session is already started.")):r.default.debug(s.SessionsTag,this._getRequestDescription(e),"session is already started. Discarding request."));break;case Bi().Service.SESSION_STOP:default:t=this._status===Wi.started,t||(e.getForce()?(t=!0,r.default.debug(s.SessionsTag,this._getRequestDescription(e)," sending request even though session is not started.")):r.default.debug(s.SessionsTag,this._getRequestDescription(e),"cannot be sent since session is not started yet. Discarding request."))}return t}
2_prepareRequestParams(e){const t=e.getService();e.setParam("sessionId",e.getParam("sessionId")||this._core.getFastDataSessionToken()),t==Bi().Service.SESSION_START&&e.setParam("beatTime",e.getParam("beatTime")||this._core.getFastDataService().getBeatTime())}_processRequestSucceeded(e){switch(this._expirationManager.onRequestSent(),e.getService()){case Bi().Service.SESSION_START:this._status=Wi.started,this._startRequest=e;break;case Bi().Service.SESSION_STOP:this._closeSession()}for(const t of this.onRequestSent)t(e);this._retryCounter=0;const t=e.getOnSuccess();t&&t(),this._requests.shift(),this._processing=!1,this._processRequests()}_processRequestFailed(e){let t,i;this._retryCounter<Ki._MAX_RETRIES?(r.default.debug(s.SessionsTag,`${this._getRequestDescription(e)} failed ${this._retryCounter+1}/${Ki._MAX_RETRIES}. Retrying...`),this._retryCounter++,i=100,t=!1):(r.default.warn(s.SessionsTag,`${this._getRequestDescription(e)}failed. Discarding request...`),this._flushReject&&this._flushRequestsFailed.push(e),this._retryCounter=0,i=0,t=!0);const n=e.getOnFail();n&&n(),t&&this._requests.shift(),this._processing=!1,i<=0?this._processRequests():this._delayRequestProcessing(i)}_processRequestNotSend(e){let t;switch(e.getService()){case Bi().Service.SESSION_START:t=this._status===Wi.started?e.getOnSuccess():e.getOnFail();break;case Bi().Service.SESSION_STOP:t=this._status===Wi.stopped?e.getOnSuccess():e.getOnFail();break;default:t=e.getOnFail()}t&&t(),this._requests.shift(),this._processing=!1,this._processRequests()}_delayRequestProcessing(e){this._clearRequestProcessingTimeout(),this._processTimeout=setTimeout((()=>{this._processTimeout=null,this._processRequests()}),e)}_clearRequestProcessingTimeout(){this._processTimeout&&(clearTimeout(this._processTimeout),this._processTimeout=null)}hasExpired(){return this._expirationManager.isStarted()&&this._expirationManager.isExpired()}_recoverExpiredSession(){const e=this._startRequest?this._startRequest:new Gi(Bi().Service.SESSION_START,{}),t=Object.assign({},e.getParams());delete t.sessionId,delete t.sessionRoot,delete t.beatTime,e.setParams(t),this._requests.unshift(e),this._closeSession(),setTimeout((()=>{this._core.throwEvent(s.CoreEvents.SESSION_EXPIRE)}),s.ExpireDefault.STOP_VIEWS_AFTER_SESSION_EXPIRE_MS)}shouldSendStats(){return this._status==Wi.started}isActive(){return this._queueableEvent()}_getRequestDescription(e){let t;switch(e.getService()){case Bi().Service.SESSION_START:case Bi().Service.SESSION_STOP:case Bi().Service.NAV:case Bi().Service.SESSION_ERROR:t=e.getParams().route||"";break;case Bi().Service.EVENT:case Bi().Service.EVENT_END:t=e.getParams().name||"";break;default:t=""}return`[${this._core.getFastDataSessionToken()}] ${e.getService()} ${t}`}_closeSession(){this._status=Wi.stopped,this._expirationManager.reset(),this._coreStorage.removeStoredData(),this._coreStorage.removeSession(),this._coreStorage.removeLastActive(),this._core.refreshSessionToken(),this._startRequest=null}}Ki._MAX_RETRIES=3;var zi=i(9637),Yi=i(1146);class Qi{constructor(e){this.options=new(Vi()),this._previousSessionMetrics=null,this.core=t.default.getInstance(),this.coreStorage=this.core.getCoreStorage(),this.requestHandler=new Ki(this.options),this.requestHandler.onRequestQueued.push(this.onRequestQueued.bind(this)),this.requestHandler.onWillSendRequest.push(this.onWillSendRequest.bind(this)),this.requestHandler.onRequestSent.push(this.onRequestSent.bind(this)),this.accountCode=e,this.requestBuilder=new(qi()),this._suspended=!1,this._suspensionTime=0,this._beat=new(Mi())(this._sendBeat.bind(this),Qi.BEAT_INTERVAL),this._lastNavigation={page:"",route:""},this._registeredProperties=null,this._listenersRequestQueued=[],this._listenersRequestWillSend=[],this._listenersRequestSent=[]}destroy(){this._beat.stop(),this.requestHandler.destroy(),this._listenersRequestQueued=[],this._listenersRequestWillSend=[],this._listenersRequestSent=[]}start(e,t={},i,n,a=!1){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot start session since session is using legacy"),void(null==n||n());e&&this.setOptions(e),this._registeredProperties=this.coreStorage.getAppAnalyticsReg
2isteredProperties(),this._logFireSessionStartEvent(t);let o=this._getParamsJson(t,null,null,!0,!0);o=this._parseInternalParams(o),this._sendSession(Bi().Service.SESSION_START,o,a,i,n)}stop(e={},t,i,n=!1){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot stop session since session is using legacy"),void(null==i||i());this._logFireSessionStopEvent(e),e=this._parseInternalParams(e),this._sendSession(Bi().Service.SESSION_STOP,e,n,t,i),this._previousSessionMetrics=null}sendEvent(e="",t={},i={},n={},a=!1,o,l){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot send session event since session is using legacy"),void(null==l||l());this._logFireEventListener(e);const d=this._getParamsJson(t,i,e,!1,!1,a);Ni().assign(d.params,n||{});const u=this._parseInternalParams(d);this._sendSession(Bi().Service.EVENT,u,!1,o,l)}sendEventEnd(e="",t={},i,n){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot send session event since session is using legacy"),void(null==n||n());this._logFireEventEndListener(e);const a=this._getParamsJson(null,null,e,!1,!1,!1);Ni().assign(a.params,t||{});const o=this._parseInternalParams(a);this._sendSession(Bi().Service.EVENT_END,o,!1,i,n)}fireNav(e={},t,i){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot send session navigation since session is using legacy"),void(null==i||i());this._logFireNavListener(e);let n=this._getParamsJson(e,null,null,!0);n=this._parseInternalParams(n),this._checkDifferentNavigation(n)?(this._sendSession(Bi().Service.NAV,n,!1,t,i),this._lastNavigation.page=n.page,this._lastNavigation.route=n.route):(r.default.warn(s.SessionsTag,"Same navigation detected and ignored for Page and Route"),null==i||i())}fireError(e,t,i="",n="",a=0,o={},l={},d,u){if(this.core.isUsingLegacy())return r.default.warn(s.SessionsTag,"Cannot send session error since session is using legacy"),void(null==u||u());this._logFireSessionErrorEvent(e,t,i,n,a,o,l);let c=this._getParamsJson(o,l,null,!1);c=this._parseInternalParams(c),c.errorCode=e,c.errorMsg=t,c.errorType=i,c.errorMetadata=n,c.duration=a,this._sendSession(Bi().Service.SESSION_ERROR,c,!1,d,u)}_sendBeat(e){const t={diffTime:e};this._sendSession(Bi().Service.BEAT,t,!1)}_getParamsJson(e,t,i,n,a,o){const l={};if(i&&(l.name=i),l.dimensions=e||{},l.values=t||{},this._registeredProperties){for(const e in this._registeredProperties.dimensions)l.dimensions[e]=this._registeredProperties.dimensions[e];for(const e in this._registeredProperties.values)l.values[e]=this._registeredProperties.values[e]}const d={params:l};n&&(d.params.dimensions.page&&(d.params.page=d.params.dimensions.page,delete d.params.dimensions.page),d.params.dimensions.route&&(d.params.route=d.params.dimensions.route,delete d.params.dimensions.route),a||delete d.params.dimensions,delete d.params.values),o&&(d.params.hasEndDatetime=o);try{d.params&&(d.params.dimensions&&"object"==typeof d.params.dimensions&&0===Object.keys(d.params.dimensions).length&&delete d.params.dimensions,d.params.values&&"object"==typeof d.params.values&&0===Object.keys(d.params.values).length&&delete d.params.values)}catch(e){r.default.error(s.SessionsTag,"Error removing empty dimensions and values from params json",e)}return d}_parseInternalParams(e){return e&&(e.params||e)||{}}_checkDifferentNavigation(e){e=e||{};const t=this._lastNavigation&&e.route===this._lastNavigation.route,i=this._lastNavigation&&e.page===this._lastNavigation.page;return!t||!i}_sendSession(e,t,i,n,a){if(!this.core.isUsingLegacy())if(null!==(t=this.requestBuilder.buildParams(t,e,[this,new Yi.default(this.options)]))&&this.options.enabled){const r=new Gi(e,t,void 0,i,n,a);this.isMethodPostEnabled()&&r.setMethod(s.Method.POST),this.requestHandler.queueRequest(r)}else r.default.warn(s.SessionsTag,"Cannot send session request since either params are not available or options are disabled"),null==a||a()}suspend(){if(r.default.notice(s.SessionsTag,"Suspending session"),this.isActive()){this._suspensionTime=(new Date).getTime();const e=this._beat.chrono.startTime?this._suspensionTime-this._beat.chrono.startTime:0;this._sendBeat(e)}this._suspended=!0,this._beat.stop()}resume(){if(r.default.notice(s.SessionsTag,"Resuming session"),this._suspended=!1,this.isActive()){const e=(new Date).getTime();e-this._suspensionTime<this.core.getFastDataService().getSessionExpireTime()&&this._sendBeat(e-this._suspensionTime),this._beat.start()}}setOptions(e){try{if(e&&Object.keys(e).length>0){const t=new(Hi()),i={};for(const n in e)t.exists(n)?i[t.getNewName(n)]=e[n]:i[n]=e[n];this.options&&Object.keys(this.options).length>0?Object.assign(this.options,i):this.options=i,this.requestHandler&&void 0!==i.maxWaitingRequests&&this.requestHandler.setMaxWaitingRequests(i.maxWaitingRequests)}}catch(e){}}getOptions(){return this.options}isUsingLegacy(){return this.core.isUsingLegacy()}getAccountCode(){return this.accountCode}isActive(){return this.requestHandler.isActive()}expiredSession(){return this.requestHandler.hasExpired()}flush(e){return this.requestHandler.flush(e)}register(e={},t={}){this._registeredProperties={dimensions:e,values:t}
2,this.coreStorage.setAppAnalyticsRegisteredProperties(JSON.stringify(this._registeredProperties))}registerOnce(e,t){this._registeredProperties||this.register(e,t)}unregister(){this._registeredProperties=null,this.coreStorage.removeAppAnalyticsRegisteredProperties()}_fireListeners(e,t){e.forEach((e=>{e&&"function"==typeof e&&e(t)}))}onRequestQueued(e){this._fireListeners(this._listenersRequestQueued,e)}onWillSendRequest(e){e.getService()===Bi().Service.SESSION_STOP&&this._beat.stop(),this._fireListeners(this._listenersRequestWillSend,e)}onRequestSent(e){e.getService()===Bi().Service.SESSION_STOP||this._beat.isRunning||this._suspended||this._beat.start(),this._fireListeners(this._listenersRequestSent,e)}addListenerRequestQueued(e){e&&this._listenersRequestQueued.push(e)}addListenerRequestWillSend(e){e&&this._listenersRequestWillSend.push(e)}addListenerRequestSent(e){e&&this._listenersRequestSent.push(e)}getSessionMetrics(){const e=Ni().getMetricsFrom(this.options["session.metrics"])||{},t=Ni().filterChangedMetrics(e,this._previousSessionMetrics);try{this._previousSessionMetrics=JSON.parse(JSON.stringify(e))}catch(t){r.default.warn(s.SessionsTag,"Failed to deep copy session metrics for previous state. Storing shallow copy.",t),this._previousSessionMetrics=Object.assign({},e)}return t}isPlayerLogsEnabled(){return r.default.debug(s.SessionsTag,"isPlayerLogsEnabled: "+this.options["debug.playerLogs.enabled"]),Ni().parseBoolean(this.options["debug.playerLogs.enabled"])}isSimpleNewSession(){return!!this.options&&Ni().parseBoolean(this.options.simpleNewSession)}isPluginLogsEnabled(){return r.default.debug(s.SessionsTag,"isPluginLogsEnabled: "+this.options["debug.pluginLogs.enabled"]),Ni().parseBoolean(this.options["debug.pluginLogs.enabled"])}isMethodPostEnabled(){return this.options.method&&this.options.method.toUpperCase()===zi.POST}getSessionRoot(){return this.core.getFastDataSessionToken()}getSessionHost(){return this.core.getFastDataSessionHost()}_sendPluginLogs(e,t,i){if(!this.core.isUsingLegacy()&&this.isPluginLogsEnabled()){try{if(i&&i.logType&&i.logAction){const e=this.core.getFastDataSessionToken();r.default.notice(s.SessionsTag,e.length?"["+e+"] ":i.logType+": Action "+i.logAction)}}catch(e){}if(i.timemark=(new Date).getTime(),null!==(i=this.requestBuilder.buildParams(i,t))&&this.options.enabled){const e=new Gi(t,i);this.isMethodPostEnabled()&&e.setMethod(s.Method.POST),this.requestHandler.queueRequest(e)}}}_logFireSessionStartEvent(e){const t={logs:{data:e},logAction:"startSession",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_START,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}_logFireSessionErrorEvent(e,t,i="",n="",r=0,s={},a={}){const o={logs:{data:{code:e,msg:t,errorType:i,metadata:n,duration:r,dimensions:s,values:a}},logAction:"errorSession",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_START,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,o)}_logFireSessionStopEvent(e){const t={logs:{data:e},logAction:"stopSession",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_START,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}_logFireEventListener(e){const t={logs:{data:e},logAction:"eventSession",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_EVENT,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}_logFireEventEndListener(e){const t={logs:{data:e},logAction:"eventEndSession",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_EVENT_END,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}_logFireNavListener(e){const t={logs:{data:e},logAction:"nav",logType:"pluginMethod"};this._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_NAV,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}}Qi.BEAT_INTERVAL=3e4;var Ji=i(2602),$i=i(108);class Zi{constructor(e){this.appAnalyticsStarted=!1,this.appAnalyticsStopped=!1,this.session=e,this.session.addListenerRequestQueued(this.onRequestQueued.bind(this)),this.session.addListenerRequestWillSend(this.onRequestWillSend.bind(this)),this.session.addListenerRequestSent(this.onRequestSent.bind(this))}destroy(){this.session.destroy()}setOptions(e){this.session.setOptions(e)}getOptions(){return this.session.getOptions()}newSession(e,t={}){this.session.isUsingLegacy()||(this._logFireNewSessionListener(null!=e?e:{},t),this.session.isSimpleNewSession()||(this.appAnalyticsStarted||this.appAnalyticsStopped)&&this.endSession(),e&&this.setOptions(e),this.begin(t))}begin(e={}){this.session.isUsingLegacy()||(this._logBeginEvent(e),this.appAnalyticsStopped&&(this.appAnalyticsStopped=!1),this.appAnalyticsStarted||(this.appAnalyticsStarted=!0,this.session.expiredSession()||this.session.start(void 0,e,void 0,void 0,!0)))}endSession(e={}){this.session.isUsingLegacy()||this.appAnalyticsStarted&&(this.appAnalyticsStopped=!0,this.appAnalyticsStarted=!1,this.session.stop(e,void 0,void 0,!0))}fireSessionStart(e={}){this.begin(e)}fireSessionStop(e={}){this.endSession(e)}fireEvent(e="",t={},i={},n={},r=!1){this.session.sendEvent(e,t,i,n,r)}fireEventEnd(e=""){this.session.sendEventEnd(e)}fireError(e,t,i="",n="",r=0,s={},a={}){this.session.isUsingLegacy()||this.session.isActive()&&this.session.fireError(e,t,i,n,r,s,a)}trackAppError(e,t,i,n,r,s,a,o){if(!this.ensureSessionStarted(`track app error with code '${e}'`))return;const l=this.buildDimensionMap({errorType:i,errorSource:n,page:s,fatal:a});this.session.fireError(e,t,null!=i?i:"",null!=r?r:"",null!=o?o:0,l,{})}trackLogEvent(e,t,i,n,r){this.ensureSessionStarted(`track log event with level '${e}' and category '${t}'`)&&this.processSessionEvent("logEvent",{logLevel:e,logCategory:t,errorSource:i,page:n,metadata:r})}trackANREvent(e,t,i){this.ensureSessionStarted(`track ANR event of type '${e}'`)&&this.processSessionEvent("anrEvent",{anrType:e,page:t},{duration:i})}trackLoginResult(e,t,i,n,r,s){this.ensureSessionStarted(`track login result with status '${t}'`)&&this.processSessionEvent("appLoginResult",{authType:e,authStatus:t,retryCounter:i,page:n},{},{profileId:r,username:s})}trackSignupResult(e,t,i,n,r,s){this.ensureSessionStarted(`track signup result with status '${t}'`)&&this.processSessionEvent("appSignupResult",{authType:e,authStatus:t,retryCounter:i,page:n},{},{profileId:r,username:s})}trackAppStatus(e,t,i,n,r,s,a,o){this.ensureSessionStarted("track app status monitoring event")&&this.processSessionEvent("appStatusMonitoring",{batteryLevel:e,availableMemory:t,networkType:i,appForegroundBackgroun
2d:n,diskSpace:r},{batteryPercentage:s,memoryMB:a,diskMB:o})}trackAPIResponse(e,t,i,n,r,s,a){this.ensureSessionStarted(`track API response for endpoint '${t}'`)&&this.processSessionEvent("apiResponsePerformance",{apiProvider:e,apiEndpoint:t,method:i,apiResponseCode:n,httpStatus:r.toString(),page:s},{apiResponseTime:a})}trackEPGPerformance(e,t,i,n,r){this.ensureSessionStarted(`track EPG performance for provider '${e}'`)&&this.processSessionEvent("epgPerformance",{epgProvider:e,refreshStatus:t,page:i},{refreshDuration:n,channelsLoaded:r})}trackRemoteControlEvent(e,t,i,n){this.ensureSessionStarted(`track remote control event for button '${e}'`)&&this.processSessionEvent("remoteControlEvent",{rcuButton:e,actionTaken:t,eventSuccess:i,page:n})}fireCrashError(e,t,i="",n=0,r={},s={}){this.session.isUsingLegacy()||this.session.isActive()&&this.session.fireError(e,t,"Crash",i,n,r,s)}fireNavigation(e={}){this.session.isUsingLegacy()||this.session.isActive()&&(this.appAnalyticsStarted=!0,this.session.fireNav(e))}fireNav(e={}){this.fireNavigation(e)}isActive(){return this.session.isActive()}isStarted(){return this.appAnalyticsStarted}getSessionRoot(){return this.isActive()?this.session.getSessionRoot():null}getSessionHost(){return this.isActive()?this.session.getSessionHost():null}_logBeginEvent(e){const t={logs:{data:e},logAction:"beginSession",logType:"pluginMethod"};this.session._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_BEGIN,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,t)}_logFireNewSessionListener(e,t){const i={logs:{data:e,params:t},logAction:"newSession",logType:"pluginMethod"};this.session._sendPluginLogs(Bi().WillSendLog.WILL_SEND_LOG_INFINITY_NAV,Bi().Service.APP_ANALYTICS_PLUGIN_LOGS,i)}onRequestQueued(e){r.default.debug(s.AppAnalyticsTag,"Request queued",e)}onRequestWillSend(e){r.default.debug(s.AppAnalyticsTag,"Request send",e)}onRequestSent(e){r.default.debug(s.AppAnalyticsTag,"Request sent",e)}ensureSessionStarted(e){return!!this.isStarted()||(r.default.error(s.AppAnalyticsTag,`Cannot ${e} because AppAnalytics session is not started. Call fireSessionStart() first.`),!1)}buildDimensionMap(e={}){const t={};return Object.keys(e).forEach((i=>{const n=e[i];null!=n&&(t[i]=String(n))})),t}buildMetricsMap(e={}){const t={};return Object.keys(e).forEach((i=>{const n=e[i];if(null!=n){const e=Number(n);Number.isNaN(e)||(t[i]=e)}})),t}processSessionEvent(e,t={},i={},n={},r=!1){const s=this.buildDimensionMap(t),a=this.buildMetricsMap(i),o=this.buildDimensionMap(n);this.session.sendEvent(e,s,a,o,r)}onSessionStart(e){this.session.addListenerRequestSent((t=>{t.getService()===$i.A.Service.SESSION_START&&e()}))}onSessionStop(e){this.session.addListenerRequestSent((t=>{t.getService()===$i.A.Service.SESSION_STOP&&e()}))}}var en,tn=i(5804),nn=i.n(tn);class rn{constructor(){this.autoTrackNavigation=!0,this.autoTrackAttribution=!0,this.highlightContentAfter=1e3,this.manageAnonymousUsers=!1,this.pageRules=[]}static buildFromObject(e){let t;return"object"==typeof e&&null!==e?(t=new rn,"boolean"==typeof e.autoTrackNavigation&&(t.autoTrackNavigation=e.autoTrackNavigation),"boolean"==typeof e.autoTrackAttribution&&(t.autoTrackAttribution=e.autoTrackAttribution),"number"==typeof e.highlightContentAfter&&(t.highlightContentAfter=e.highlightContentAfter),"boolean"==typeof e.manageAnonymousUsers&&(t.manageAnonymousUsers=e.manageAnonymousUsers),"object"==typeof e.pageRules&&Array.isArray(e.pageRules)&&(t.pageRules=e.pageRules)):t=null,t}validate(){const e=new rn;this.highlightContentAfter<1e3&&(this.highlightContentAfter=e.highlightContentAfter,r.default.warn(s.ProductAnalyticsTag,"Invalid higlightContentAfter value. Using default value instead."))}}window.npawtmConfig=window.npawtmConfig||{};class sn{constructor(e){this.fireEvent=e,"undefined"==typeof window||"object"!=typeof window.npawtmConfig?this.config=null:this.config=window.npawtmConfig}identify(e){let t,i;return i=null,t=[],this.config?(i=this.getPage(e),null===i?r.default.warn(s.ProductAnalyticsTag,"no page found"):t=this.getEvents(i)):r.default.warn(s.ProductAnalyticsTag,"no config descriptor available"),"undefined"==typeof window?r.default.warn(s.ProductAnalyticsTag,"Product Analytics Config: cannot bind events since DOM is not available"):t.length>0&&window.addEventListener("load",(()=>{this.bindElements(t)})),i}getPage(e){let t,i,n,r,s,a=null;if("object"==typeof e&&null!==e&&this.config&&this.config.urls&&this.config.regexes&&this.config.domains&&this.config.domains.includes(e.hostname.toLowerCase()))for(n=this.config.urls[e.pathname],void 0!==n&&void 0!==n.page&&(
2a=n.page),t=e.pathname+e.search,s=0;s<this.config.regexes.length&&null===a;s++)i=this.config.regexes[s],r=new RegExp(i.regex),t.match(r)&&(a=i.page);return a}getEvents(e){let t=this.config&&this.config.events?this.config.events[e]:null;return null==t&&(t=[]),t}bindElements(e){let t,i,n,a,o;for(o=0;o<e.length;o++)if(t=e[o],n=document.querySelector(t.selector),null===n)r.default.warn(s.ProductAnalyticsTag,"element "+t.selector+" not found");else if(0===t.events.length)r.default.warn(s.ProductAnalyticsTag,"element "+t.selector+" has no events to bind");else for(a=0;a<t.events.length;a++)i=t.events[a],n.npawEventInfo=t,n.npawEventType=i,n.addEventListener(i,(e=>{this.elementEvent(e.currentTarget.npawEventInfo,e.currentTarget.npawEventType)}))}elementEvent(e,t){const i="["+t+"] "+e.name;this.fireEvent?this.fireEvent(i,t,{uiElement:e.name,eventName:i,eventType:t}):r.default.warn(s.ProductAnalyticsTag,"Cannot trigger event since no handler has been provided")}}!function(e){e.userProfile="User Profile",e.user="User",e.navigation="Navigation",e.attribution="Attribution",e.section="Section",e.contentPlayback="Content Playback",e.search="Search",e.externalApplication="External Application",e.engagement="Engagement",e.interaction="Interaction",e.custom="Custom Event"}(en||(en={}));const an=en;class on{constructor(e,t,i,n,r){if(this.session=e,this.session.addListenerRequestQueued(this.onRequestQueued.bind(this)),this.session.addListenerRequestWillSend(this.onRequestWillSend.bind(this)),this.session.addListenerRequestSent(this.onRequestSent.bind(this)),this.initialized=!1,this.settings=new rn,this.page=null,this.config=null,this.searchQuery="",this.url=null,"undefined"!=typeof window&&void 0!==window.location)try{this.url=new URL(window.location.href)}catch(e){this.url=null}this.contentHighlighted=null,this.contentHighlightTimeout=null,this.pendingVideoEvents={},this.adapters={},this.getReferral=t,this.setAnalyticsOptions=i,this.addVideoRequestListener=n,this.removeVideoRequestListener=r,this.videoListenerAccessor=this.videoListener.bind(this)}initialize(e){let t;if(void 0===e)this.settings=new rn,r.default.warn(s.ProductAnalyticsTag,"Settings not supplied: using default ones.");else if(e instanceof rn)this.settings=e;else{const t=rn.buildFromObject(e);null===t?(this.settings=new rn,r.default.warn(s.ProductAnalyticsTag,"Invalid settings supplied: using default ones.")):this.settings=t}this.settings.validate(),this.config=new sn(this.fireEventInternal.bind(this)),this.identify(),this.initialized=!0;const i=this.getUserId(),n={};null===i?Object.assign(n,this.getAnonymousUserOptions()):Object.assign(n,this.getAuthenticatedUserOptions(i,this.getProfileId())),this.setAnalyticsOptions(n),this.session.start(),this.settings.autoTrackNavigation&&("undefined"==typeof window?r.default.warn(s.ProductAnalyticsTag,"Cannot auto track cached navigation since DOM is not available."):(window.removeEventListener("pageshow",this.trackNavigationCached),window.addEventListener("pageshow",this.trackNavigationCached.bind(this))),this.trackNavigationInternal()),this.settings.autoTrackAttribution&&(t=null===this.url?"":this.url.search,this.trackAttributionInternal(new URLSearchParams(t)))}identify(){let e,t,i;for(null===this.config?this.page=null:this.page=this.config.identify(this.url),i=0;i<this.settings.pageRules.length&&null===this.page&&null!==this.url;i++)if(e=this.settings.pageRules[i],void 0!==e.rule&&void 0!==e.page){try{t=new RegExp(e.rule)}catch(i){t=null,r.default.warn(s.ProductAnalyticsTag,"Error processing rule",e.rule,e.page)}null!==t&&null!==this.url.pathname.match(t)&&(this.page=this.url.pathname.replace(t,e.page))}null===this.page&&null!==this.url&&(this.page=this.url.pathname)}destroy(){r.default.warn(s.ProductAnalyticsTag,"ProductAnalytics instance destroyed through destroy");for(const e of Object.keys(this.adapters))this.removeAdapter(e);this.contentFocusOut(),this.initialized=!1,this.settings=new rn,this.page=null,this.config=null,this.searchQuery="",this.url=null}getAuthenticatedUserOptions(e,t){return void 0!==t&&""!==t||(t=null),{userId:e,"user.type":"Registered",profileId:t}}getAnonymousUserOptions(){return{userId:this.settings.manageAnonymousUsers?this.getDeviceUUID():null,"user.type":"Unregistered",profileId:null}}getOptions(){return this.session.getOptions()}getUserId(){const e=this.getOptions();let t;return t=Object.prototype.hasOwnProperty.call(e,"userId")?e.userId:Object.prototype.hasOwnProperty.call(e,"user.name")?e["user.name"]:null,void 0===t?t=null:"string"==typeof t&&(""!==t.trim()&&"unregistered user"!==t.trim().toLowerCase()||(t=null)),t}getProfileId(){const e=this.getOptions();let t;return t=Object.prototype.hasOwnProperty.call(e,"profileId")?e.profileId:null,t}getDeviceUUID(){const e=this.getOptions();let t;return t=e["device.isAnonymous"]?null:e["device.id"]||(new(nn())).getKey(),t}adapterTrackStart(e){this.initialized&&this.trackPlayerInteraction("start",{},{},e)}registerAdapter(e,t){this.initialized&&(e?(this.removeAdapter(t),this.adapters[this.getVideoKey(t)]=e,1===Object.keys(this.adapters).length&&this.addVideoRequestListener(this.videoListenerAccessor)):r.default.warn(s.ProductAnalyticsTag,"Cannot bind adapter start since adapter is unavailable."))}removeAdapter(e){e=this.getVideoKey(e),delete this.adapters[e],delete this.pendingVideoEvents[e],0===Object.keys(this.adapters).length&&this.removeVideoRequestListener(this.videoListenerAccessor)}getAdapter(e){return this.adapters[this.getVideoKey(e)]||null}getVideoKey(e){return e||on.VIDEOKEY_DEFAULT_IDENTIFIER}videoListener(e,t,i){e===Bi().Service.START&&this.adapterTrackStart(t)}newSession(){this.initialized?(this.session.stop(),this.session.start()):r.default.warn(s.ProductAnalyticsTag,"Cannot start a new session since Product Analytics is uninitialized.")}endSession(){this.initialized?this.session.stop():r.default.warn(s.ProductAnalyticsTag,"Cannot end session since Product Analytics is uninitialized.")}sessionActive(){return this.session.isActive()}loginSuccessful(e,t,i,n,a){if(this.checkState("log in successfully"))if("string"!=typeof e&&"number"!=typeof e)r.default.warn(s.ProductAnalyticsTag,"Cannot log in successfully since userId is unavailable.");else if(""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot log in successfully since userId is unset.");else{this.fireEventInternal("User Login Successful",an.user,{username:e,paIsBounce
2:!0,paIgnoreSession:!0},n,a),null!=t&&""!==t&&this._userProfileSelectedEvent(t,i,n,a);const r=this.getAuthenticatedUserOptions(e,t);this.setAnalyticsOptions(r),this.newSession()}}loginUnsuccessful(e,t){this.checkState("log in unsuccessful")&&this.fireEventInternal("User Login Unsuccessful",an.user,{paIsBounce:!0,paIgnoreSession:!1},e,t)}logout(e,t){if(this.checkState("log out")){this.fireEventInternal("User Logout",an.user,{paIsBounce:!0,paIgnoreSession:!1},e,t);const i=this.getAnonymousUserOptions();this.setAnalyticsOptions(i),this.newSession()}}userProfileCreated(e,t,i,n){if(this.checkState("create user profile"))if("string"!=typeof e&&"number"!=typeof e)r.default.warn(s.ProductAnalyticsTag,"Cannot create user profile since profileId is unavailable.");else if(""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot create user profile since profileId is unset.");else{const r=this._getUserProfileDimensions(e,t,!1);this.fireEventInternal("User Profile Created",an.userProfile,r,i,n)}}userProfileSelected(e,t,i,n){if(this.checkState("select user profile"))if("string"!=typeof e&&"number"!=typeof e)r.default.warn(s.ProductAnalyticsTag,"Cannot select user profile since profileId is unavailable.");else if(""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot select user profile since profileId is unset.");else{this._userProfileSelectedEvent(e,t,i,n);const r=this.getAuthenticatedUserOptions(this.getUserId(),e);this.setAnalyticsOptions(r),this.newSession()}}_userProfileSelectedEvent(e,t,i,n){const r=this._getUserProfileDimensions(e,t,!0);this.fireEventInternal("User Profile Selected",an.userProfile,r,i,n)}userProfileDeleted(e,t,i){if(this.checkState("delete user profile"))if("string"!=typeof e&&"number"!=typeof e)r.default.warn(s.ProductAnalyticsTag,"Cannot delete user profile since profileId is unavailable.");else if(""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot delete user profile since profileId is unset.");else{const n=this._getUserProfileDimensions(e,null,!1);this.fireEventInternal("User Profile Deleted",an.userProfile,n,t,i)}}_getUserProfileDimensions(e,t,i){const n={profileId:e,paIsBounce:!0,paIgnoreSession:"boolean"==typeof i&&i};return null!=t&&(n.profileType=t),n}trackNavByRoute(e,t,i){if(this.checkState("track navigation"))if("string"!=typeof e||""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot track navigation since route has not been supplied.");else{let n;try{n=new URL(e)}catch(e){n=null}null===n?r.default.warn(s.ProductAnalyticsTag,"Cannot track navigation since route is invalid."):(this.url=n,this.identify(),this.trackNavigationInternal(t,i))}}trackNavByName(e,t,i){this.checkState("track navigation")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track navigation since page is invalid."):(this.page=e,this.trackNavigationInternal(t,i)))}trackNavigationCached(e){e.persisted&&this.trackNavigationInternal()}trackNavigationInternal(e,t){let i,n,r;null===this.url?(i="",n="",r=""):(i=this.url.href,n=this.url.pathname,r=this.url.hostname),this.checkState("track navigation")&&this.fireEventInternal("paNavigation",an.navigation,{paIsBounce:!1,paIgnoreSession:!1,paRoute:n,paRouteDomain:r,paFullRoute:i,paReferrer:this.getReferral()||""},e,t,!0)}trackAttribution(e,t,i,n,a,o,l){if(this.checkState("track attribution"))if(this.settings.autoTrackAttribution)r.default.warn(s.ProductAnalyticsTag,"Automatic attribution tracking is enabled: this request won't be processed.");else{const d={};"string"==typeof e&&(d.utm_source=e),"string"==typeof t&&(d.utm_medium=t),"string"==typeof i&&(d.utm_campaign=i),"string"==typeof n&&(d.utm_term=n),"string"==typeof a&&(d.utm_content=a),Object.keys(d).length>0?this.trackAttributionInternal(new URLSearchParams(d),o,l):r.default.warn(s.ProductAnalyticsTag,"Cannot track attribution since parameters are invalid.")}}trackAttributionInternal(e,t,i){const n=this._getUTMParams(e),r=null===this.url?"":this.url.href;this.checkState("track attribution")&&n&&this.fireEventInternal("Attribution",an.attribution,Object.assign({paIsBounce:!0,paIgnoreSession:!1,utmUrl:r},n),t,i)}_getUTMParams(e){let t,i,n;const r=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],s={};return e.forEach((function(e,a){i=r.indexOf(a.toLowerCase()),-1!==i&&(n=r[i],t=n.split("_"),t.length>1&&(n=t[0]+t[1].charAt(0).toUpperCase()+t[1].slice(1)),s[n]=e)})),Object.keys(s).length>0?s:null}trackSectionVisible(e,t,i,n){this.checkState("track section visible")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track section visible since section is invali
2d."):"number"!=typeof t||t<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track section visible since sectionOrder is invalid."):this.fireEventInternal("Section Visible",an.section,{paIsBounce:!0,paIgnoreSession:!1,sectionOrder:t,section:e},i,n))}trackSectionHidden(e,t,i,n){this.checkState("track section hidden")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track section hidden since section is invalid."):"number"!=typeof t||t<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track section hidden since sectionOrder is invalid."):this.fireEventInternal("Section Hidden",an.section,{paIsBounce:!0,paIgnoreSession:!1,sectionOrder:t,section:e},i,n))}contentFocusIn(e,t,i,n,a,o,l){this.contentFocusOut(),this.checkState("track content highlight")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track content highlight since section is invalid."):"number"!=typeof t||t<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content highlight since sectionOrder is invalid."):"number"!=typeof i||i<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content highlight since column is invali
2d."):"number"!=typeof n||n<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content highlight since row is invalid."):"string"!=typeof a||""===a?r.default.warn(s.ProductAnalyticsTag,"Cannot track content highlight since contentID is invalid."):(this.contentHighlighted={sectionOrder:t,section:e,column:i,row:n,contentID:a,dimensions:o,metrics:l},this.contentHighlightTimeout=setTimeout(this._trackContentHiglight.bind(this),this.settings.highlightContentAfter)))}contentFocusOut(){null!==this.contentHighlightTimeout&&clearTimeout(this.contentHighlightTimeout),this.contentHighlighted=null,this.contentHighlightTimeout=null}_trackContentHiglight(){this.contentHighlighted?this.fireEventInternal("Section Content Highlight",an.section,{paIsBounce:!0,paIgnoreSession:!1,sectionOrder:this.contentHighlighted.sectionOrder,section:this.contentHighlighted.section,column:this.contentHighlighted.column,row:this.contentHighlighted.row,contentId:this.contentHighlighted.contentID},this.contentHighlighted.dimensions,this.contentHighlighted.metrics):r.default.warn(s.ProductAnalyticsTag,"Cannot highlight content since no content is selected")}trackContentClick(e,t,i,n,a,o,l){this.checkState("track content click")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track content click since section is invalid."):"number"!=typeof t||t<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content click since sectionOrder is invalid."):"number"!=typeof i||i<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content click since column is invali
2d."):"number"!=typeof n||n<1?r.default.warn(s.ProductAnalyticsTag,"Cannot track content click since row is invalid."):"string"!=typeof a||""===a?r.default.warn(s.ProductAnalyticsTag,"Cannot track content click since contentID is invalid."):this.fireEventInternal("Section Content Click",an.section,{paIsBounce:!1,paIgnoreSession:!1,sectionOrder:t,section:e,column:i,row:n,contentId:a},o,l))}trackPlay(e,t,i,n){this.checkState("track play")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track play since contentID is invalid."):this.handlePlayerEvent("Content Play",e,t||{},i||{},this.getVideoKey(n)))}trackPlayerInteraction(e,t,i,n){if(this.checkState("track player interaction"))if("string"!=typeof e||""===e)r.default.warn(s.ProductAnalyticsTag,"Cannot track player interaction since interaction name is invalid.");else{const r="Content Play "+e,s=null;this.handlePlayerEvent(r,s,t||{},i||{},this.getVideoKey(n))}}handlePlayerEvent(e,t,i,n,a){var o;const l=this.getAdapter(a);null==l?r.default.warn(s.ProductAnalyticsTag,"Cannot track player event since video adapter is not available"):l.flags.isStarted?(null===(o=this.pendingVideoEvents[a])||void 0===o||o.forEach((e=>{this.trackPlayerEvent(e.eventName,e.contentId,e.dimensions,e.metrics,e.videoKey)})),delete this.pendingVideoEvents[a],this.trackPlayerEvent(e,t,i,n,a)):(null==this.pendingVideoEvents[a]&&(this.pendingVideoEvents[a]=[]),this.pendingVideoEvents[a].push({eventName:e,contentID:t,dimensions:i,metrics:n,videoKey:a}))}trackPlayerEvent(e,t,i,n,r){const s={paIsBounce:!1,paIgnoreSession:!1};null!==t&&(s.contentId=t),this.fireEventAdapter(e,s,i,n,r)}trackSearchQuery(e,t,i){this.checkState("track search query")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track search query since no searchQuery has been supplied."):(this.searchQuery=e,this.fireEventInternal("Search Query",an.search,{paIsBounce:!1,paIgnoreSession:!1,query:this.searchQuery},t,i)))}trackSearchResult(e,t,i,n){if(this.checkState("track search result"))if("number"!=typeof e)r.default.warn(s.ProductAnalyticsTag,"Cannot track search result since resultCount is invalid.");else{const r="string"==typeof t&&""!==t?t:this.searchQuery;this.fireEventInternal("Search Results",an.search,{paIsBounce:!0,paIgnoreSession:!1,query:r,resultCount:e},i,n)}}trackSearchClick(e,t,i,n,a,o,l,d){if(this.checkState("track search click"))if("number"!=typeof i||i<1)r.default.warn(s.ProductAnalyticsTag,"Cannot track search click since column is invali
2d.");else if("number"!=typeof n||n<1)r.default.warn(s.ProductAnalyticsTag,"Cannot track search click since row is invalid.");else if("string"!=typeof a||""===a)r.default.warn(s.ProductAnalyticsTag,"Cannot track search click since contentID is invalid.");else{const r="string"==typeof o&&""!==o?o:this.searchQuery;"string"==typeof e&&""!==e||(e="Search"),("number"!=typeof t||t<1)&&(t=1),this.fireEventInternal("Search Result Click",an.search,{paIsBounce:!1,paIgnoreSession:!1,query:r,section:e,sectionOrder:t,column:i,row:n,contentId:a},l,d)}}trackExternalAppLaunch(e,t,i){this.checkState("track external application launch")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track external application launch since appName is invalid."):this.fireEventInternal("External Application Launch",an.externalApplication,{paIsBounce:!1,paIgnoreSession:!1,paExtAppName:e},t,i))}trackExternalAppExit(e,t,i){this.checkState("track external application exit")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track external application exit since appName is invalid."):this.fireEventInternal("External Application Exit",an.externalApplication,{paIsBounce:!1,paIgnoreSession:!1,paExtAppName:e},t,i))}trackEngagementEvent(e,t,i,n){this.checkState("track engagement")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Cannot track engagement event since eventName is invalid."):"string"!=typeof t||""===t?r.default.warn(s.ProductAnalyticsTag,"Cannot track engagement event since contentID is invali
2d."):this.fireEventInternal("Engagement "+e,an.engagement,{paIsBounce:!1,paIgnoreSession:!1,contentId:t},i,n))}trackClick(e,t,i,n){"boolean"!=typeof n&&(n=!1),this.checkState("track click event")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Click cannot be tracked since controlName is invalid."):this.fireEventInternal("Click",an.interaction,{paIsBounce:!1,paIgnoreSession:!1,controlName:e},t,i,n))}trackEvent(e,t,i,n){"boolean"!=typeof n&&(n=!1),this.checkState("track custom event")&&("string"!=typeof e||""===e?r.default.warn(s.ProductAnalyticsTag,"Event cannot be tracked since eventName is invalid."):this.fireEventInternal("Custom "+e,an.custom,{paIsBounce:!1,paIgnoreSession:!1},t,i,n))}fireEventInternal(e,t,i={},n={},a={},o=!1){r.default.notice(s.ProductAnalyticsTag,e);const l=this.buildDimensions(t,i,n);this.session.sendEvent(e,l.custom,a,l.top,o)}fireEventAdapter(e,t,i,n,a){r.default.notice(s.ProductAnalyticsTag,e);const o=this.getAdapter(a);if(o){const r=this.buildDimensions(an.contentPlayback,t,i);o.fireEvent(e,r.custom,n,r.top)}else r.default.warn(s.ProductAnalyticsTag,"Cannot fire "+e+" event since adapter is unavailable.")}buildDimensions(e,t={},i={}){let n;n={paPage:this.page},n=Object.assign(n,t),n=Object.assign(n,i),n=Object.assign(n,{eventType:e,eventSource:"Product Analytics"});const r=["contentid","contentId","contentID","utmSource","utmMedium","utmCampaign","utmTerm","utmContent","profileId","profile_id","username"],s={};for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&-1!==r.indexOf(e)&&(s[e]=n[e]);return r.forEach((function(e){delete n[e]})),{custom:n,top:s}}checkState(e){let t;return this.initialized?t=!0:(t=!1,r.default.warn("Cannot "+e+" since Product Analytics is uninitialized.")),t}onRequestQueued(e){}onRequestWillSend(e){}onRequestSent(e){}}on.VIDEOKEY_DEFAULT_IDENTIFIER="default",i.g.LogLevel=r.LogLevel,i.g.NpawPluginOptions=Ji.A;class ln{constructor(e,i){this.core=t.default.getInstance(e,i,!0),this.cdnBalancer=new Li(e,i),this.session=new Qi(e),this.appAnalytics=new Zi(this.session),this.videoAnalytics=new(ki().Plugin)(this.appAnalytics,this.session),this.productAnalytics=new on(this.session,this.videoAnalytics.getReferral.bind(this.videoAnalytics),this.setAnalyticsOptions.bind(this),this.videoAnalytics.addOnWillSendRequestListener.bind(this.videoAnalytics),this.videoAnalytics.removeOnWillSendRequestListener.bind(this.videoAnalytics)),this.diagnostic=Ii.getInstance(!0)}destroy(){var e;null===(e=this.cdnBalancer)||void 0===e||e.destroy(),this.videoAnalytics.videos.getVideoKeys().forEach((e=>{var t,i;void 0!==this.videoAnalytics&&(null===(t=this.videoAnalytics.getAdapter(e))||void 0===t||t.fireStop(),null===(i=this.videoAnalytics.getAdsAdapter(e))||void 0===i||i.fireStop())})),this.videoAnalytics.destroy(),this.productAnalytics.destroy(),this.session.destroy(),this.core.destroy()}setLogLevel(e){r.default.setLogLevel(e)}isBalancerSupported(){var e;return!(!this.cdnBalancer||!(null===(e=this.cdnBalancer)||void 0===e?void 0:e.isCdnBalancerSupported()))||(r.default.warn(s.AnalyticsTag,"Balancer is not available in this build."),!1)}setBalancerOptions(e){var t;this.isBalancerSupported()&&(null===(t=this.cdnBalancer)||void 0===t||t.setOptions(e))}setManifestResource(e){this.isBalancerSupported()&&this.cdnBalancer.setManifestResource(e)}addInterceptor(e,t){this.isBalancerSupported()&&this.cdnBalancer.addInterceptor(e,t)}getBitmovinSendHttpRequest(){return this.isBalancerSupported()?this.cdnBalancer.getBitmovinSendHttpRequest():void 0}getRecommendedManifest(){return this.isBalancerSupported()?this.cdnBalancer.getRecommendedManifest():void 0}isBalancerEnabled(){var e;return!(!this.cdnBalancer||!(null===(e=this.cdnBalancer)||void 0===e?void 0:e.isCdnBalancerSupported()))&&this.cdnBalancer.getIsEnabled()}setChronoDuration(e,t,i){this.videoAnalytics.setChronoDuration(e,t,i)}startChrono(e,t){this.videoAnalytics.startChrono(e,t)}stopChrono(e,t){this.videoAnalytics.stopChrono(e,t)}registerAdapter(e,t,i,n,r){this.core.isUsingLegacy()||this.registerAdapterInModule(!1,e,t,i,n,r)}registerAdapterFromClass(e,t,i,n,a){void 0!==t&&"function"==typeof t?this.registerAdapterFromClassInModule(!1,e,new t,i,n,a):r.default.error(s.AnalyticsTag,"Adapter is not val
2id")}registerAdapterFromString(e,t,i,n,a){void 0!==t&&"string"==typeof t?(this.videoAnalytics.registerAdapter(e,t,i,n),this.registerAdapterProductAnalytics(n),null==a||a()):r.default.error(s.AnalyticsTag,"The provided adapter is not from a valid type")}registerDefaultAdapter(e,t){this.core.isUsingLegacy()||(this.videoAnalytics.registerAdapter(void 0,{},t,e),this.registerAdapterProductAnalytics(e))}removeAdapter(e){this.core.isUsingLegacy()||(e&&this.videoAnalytics.videos.existsVideo(e)&&this.getAdapter(e)&&this.getAdapter(e).fireStop&&this.getAdapter(e).fireStop(),this.productAnalytics.removeAdapter(e),this.videoAnalytics.removeAdapter(e))}getAdapter(e){return this.videoAnalytics.getAdapter(e)}getAdsAdapter(e){return void 0!==this.videoAnalytics?this.videoAnalytics.getAdsAdapter(e):void 0}registerAdsAdapter(e,t,i,n,r){this.core.isUsingLegacy()||this.registerAdapterInModule(!0,e,t,i,n,r)}registerAdsAdapterFromClass(e,t,i,n,a){void 0!==t&&"function"==typeof t?this.registerAdapterFromClassInModule(!0,e,new t,i,n,a):r.default.error(s.AnalyticsTag,"Adapter is not valid")}registerAdsAdapterFromString(e,t,i,n,a){void 0!==t&&"string"==typeof t?(this.videoAnalytics.registerAdsAdapter(e,t,i,n),null==a||a()):r.default.error(s.AnalyticsTag,"The provided adapter is not from a valid type")}updateAdsAdapter(e,t){t=null!=t?t:"default",void 0!==e&&""!=e?this.videoAnalytics.updateAdsAdapter(e,t):r.default.debug(s.AnalyticsTag,"Invalid ads adapter name")}registerDefaultAdsAdapter(e,t){this.core.isUsingLegacy()||this.videoAnalytics.registerAdsAdapter(void 0,"{}",t,e)}removeAdsAdapter(e){this.core.isUsingLegacy()||this.videoAnalytics.removeAdsAdapter(e)}setAnalyticsOptions(e){this.core.isUsingLegacy()||(this.videoAnalytics.setOptions(e),this.session.setOptions(this.videoAnalytics.options),this.core.setOptions(this.videoAnalytics.options))}setVideoOptions(e,t){e?this.videoAnalytics.setVideoOptions(e,null!=t?t:"default"):r.default.debug(s.AnalyticsTag,"Provided options object is not valid")}updateMetrics(e,t){e?this.videoAnalytics.updateCustomMetrics(e,null!=t?t:"default"):r.default.debug(s.AnalyticsTag,"Provided metrics object is not valid")}fireOfflineEvents(){this.core.isUsingLegacy()||(this.videoAnalytics.videos.getVideoKeys().length>0?r.default.notice(s.AnalyticsTag,"Unable to send offline events because there's at least one adapter registered"):this.core.sendOfflineEvents())}registerAdapterFromClassInModule(e,t,i,n,r,s){e?this.videoAnalytics.registerAdsAdapter(t,i,n,r):(this.videoAnalytics.registerAdapter(t,i,n,r),this.registerAdapterProductAnalytics(r)),null==s||s()}registerAdapterInModule(e,t,i,n,s,a){if(0===i.length&&r.default.error("Adapter URL can't be empty!"),"undefined"!=typeof fetch)fetch(i).then((e=>e.json())).then((i=>{const r=JSON.stringify(i);e?this.videoAnalytics.registerAdsAdapter(t,r,n,s):(this.videoAnalytics.registerAdapter(t,r,n,s),this.registerAdapterProductAnalytics(s)),null==a||a()}));else{const r=new XMLHttpRequest;r.addEventListener("readystatechange",(()=>{if(4===r.readyState&&r.status>=200&&r.status<400){const i=r.response;e?this.videoAnalytics.registerAdsAdapter(t,i,n,s):(this.videoAnalytics.registerAdapter(t,i,n,s),this.registerAdapterProductAnalytics(s)),null==a||a()}})),r.open("GET",i),r.send()}}registerAdapterProductAnalytics(e){const t=this.videoAnalytics.getAdapter(e);this.productAnalytics.registerAdapter(t,e)}}})(),n.default})(),e.exports=t()},865:e=>{e.exports=function(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(e){n=e}return[n,i]}},842:function(e){var t,i,n,r,s;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");
vendor: 6,504 bytes, line 2
2if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,c=u.substring(0,u.lastIndexOf("/")+1)+a.path;d.path=s.normalizePath(c)}else d.path=o.path,a.params||(d.params=o.params,a.query||(d.query=o.query));return null===d.path&&(d.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(d)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},286:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>Fd});var n=i(840),r=i.n(n),s=i(697),a=i.n(s);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}var l=i(545),d=i.n(l),u=i(417),c=i(662);function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,c.A)(e,t)}var p=i(865),f=i.n(p),g=i(36),m=i.n(g),v=i(784),y=i.n(v);function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var b=i(501),T=i(842),S=i.n(T);const E=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=r().location&&r().location.href||"");var i="function"==typeof r().URL,n=/^\/\//.test(e),s=!r().location&&!/\/\//i.test(e);if(i?e=new(r().URL)(e,r().location||"http://example.com"):/\/\//i.test(e)||(e=S().buildAbsoluteURL(r().location&&r().location.href||"",e)),i){var a=new URL(t,e);return s?a.href.slice(18):n?a.href.slice(a.protocol.length):a.href}return S().buildAbsoluteURL(e,t)};var A=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function w(e){for(var t,i=(t=e,r().atob?r().atob(t):Buffer.from(t,"base64").toString("binary")),n=new Uint8Array(i.length),s=0;s<i.length;s++)n[s]=i.charCodeAt(s);return n}var P,C,L,D=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return h(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(A),k=String.fromCharCode(9),I=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},R=function(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n},N=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}h(t,e);var i=t.prototype;return i.push=function(e){var t,i,n=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,i){var n=i(e);return n===e?t:t.concat([n])}),[e]).forEach((function(e){for(var r=0;r<n.customParsers.length;r++)if(n.customParsers[r].call(n,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void n.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void n.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return i=o(I(t[1]),{type:"tag",tagType:"byterange"}),void n.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"map"},t[1]){var s=R(t[1]);s.URI&&(i.uri=s.URI),s.BYTERANGE&&(i.byterange=I(s.BYTERANGE))}n.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=R(t[1]),i.attributes.RESOLUTION){var a=i.attributes.RESOLUTION.split("x"),l={};a[0]&&(l.width=parseInt(a[0],10)),a[1]&&(l.height=parseInt(a[1],10)),i.attributes.RESOLUTION=l}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}n.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=R(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e))n.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))n.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return i={type:"tag",tagType:"program-date-time"}
vendor: 13,103 bytes, line 2
2,t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=R(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void n.trigger("data",i);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=R(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"skip"}).attributes=R(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(k)),void n.trigger("data",i);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part"}).attributes=R(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=I(i.attributes.BYTERANGE)),void n.trigger("data",i);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"server-control"}).attributes=R(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void n.trigger("data",i);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part-inf"}).attributes=R(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void n.trigger("data",i);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"preload-hint"}).attributes=R(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void n.trigger("data",i);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"rendition-report"}).attributes=R(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void n.trigger("data",i);n.trigger("data",{type:"tag",data:e.slice(4)})}}}else n.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,s=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push((function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:n,segment:s}),!0}))},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push((function(e){return t.test(e)?i(e):e}))},t}(A),O=function(e){var t={};return Object.keys(e).forEach((function(i){var n;t[(n=i,n.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[i]})),t},M=function(e){var t=e.serverControl,i=e.targetDuration,n=e.partTargetDuration;if(t){var r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=i&&3*i,l=n&&2*n;i&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:r+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[s]<o&&(this.trigger("warn",{message:r+" clamping HOLD-BACK ("+t[s]+") to targetDuration * 3 ("+o+")"}),t[s]=o),n&&!t.hasOwnProperty(a)&&(t[a]=3*n,this.trigger("info",{message:r+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[a]+")."})),n&&t[a]<l&&(this.trigger("warn",{message:r+" clamping PART-HOLD-BACK ("+t[a]+") to partTargetDuration * 2 ("+l+")."}),t[a]=l)}},x=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new D,t.parseStream=new N,t.lineStream.pipe(t.parseStream);var i,n,r=(0,u.A)(t),s=[],a={},l=!1,d=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var p=0,f=0;return t.on("end",(function(){a.uri||!a.parts&&!a.preloadHints||(!a.map&&i&&(a.map=i),!a.key&&n&&(a.key=n),a.timeline||"number"!=typeof h||(a.timeline=h),t.manifest.preloadSegment=a)})),t.parseStream.on("data",(function(e){var t,u;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(e.offset=p)),"offset"in e&&(a.byterange=t,t.offset=e.offset),p=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:w(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){i={},e.uri&&(i.uri=e.uri),e.byterange&&(i.byterange=e.byterange),n&&(i.key=n)},"stream-inf":function(){this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(a.attributes||(a.attributes={}),o(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],(u={default:/yes/i.test(e.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(u.language=e.attributes.LANGUAGE),e.attributes.URI&&(u.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(u.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(u.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(u.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,M.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data},skip:function(){this.manifest.skip=O(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;l=!0;var i=this.manifest.segments.length,n=O(e.attributes);a.parts=a.parts||[],a.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=f),f=n.byterange.offset+n.byterange.length);var r=a.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+r+" for segment #"+i,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,i){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+i+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=O(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),M.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,i=O(e.attributes),n=i.type&&"PART"===i.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=n?f:0,n&&(f=i.byterange.offset+i.byterange.length)));var r=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t,e.attributes,["TYPE","URI"]),i.type)for(var s=0;s<a.preloadHints.length-1;s++){var o=a.preloadHints[s];o.type&&o.type===i.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t+" has the same TYPE "+i.type+" as preload hint #"+s})}},"rendition-report":function(){var t=O(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var i=this.manifest.renditionReports.length-1,n=["LAST-MSN","URI"];l&&n.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+i,e.attributes,n)},"part-inf":function(){this.manifest.partInf=O(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),M.call(this,this.manifest)}}[e.tagType]||d).call(r)}
vendor: 3,152 bytes, line 2
2,uri:function(){a.uri=e.uri,s.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),n&&(a.key=n),a.timeline=h,i&&(a.map=i),f=0,a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)})),t}h(t,e);var i=t.prototype;return i.warnOnMissingAttributes_=function(e,t,i){var n=[];i.forEach((function(e){t.hasOwnProperty(e)||n.push(e)})),n.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+n.join(", ")})},i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push("\n"),this.trigger("end")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(A),B={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},U=["video","audio","text"],V=["Video","Audio","Text"],F=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})):e},q=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),U.forEach((function(n){var r=B[n].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=n;var s=e.substring(0,r[1].length),a=e.replace(s,"");i.push({type:s,details:a,mediaType:n})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},j=function(e){return void 0===e&&(e=""),B.audio.test(e.trim().toLowerCase())},H=function(e){if(e&&"string"==typeof e){var t,i=e.toLowerCase().split(",").map((function(e){return F(e.trim())})),n="video";1===i.length&&j(i[0])?n="audio":1===i.length&&(void 0===(t=i[0])&&(t=""),B.text.test(t.trim().toLowerCase()))&&(n="application");var r="mp4";return i.every((function(e){return B.mp4.test(e)}))?r="mp4":i.every((function(e){return B.webm.test(e)}))?r="webm":i.every((function(e){return B.ogg.test(e)}))&&(r="ogg"),n+"/"+r+';codecs="'+e+'"'}},G=function(e){return void 0===e&&(e=""),r().MediaSource&&r().MediaSource.isTypeSupported&&r().MediaSource.isTypeSupported(H(e))||!1},W=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<V.length;t++)if(B["muxer"+V[t]].test(e))return!0;return!1}))},X="mp4a.40.2",K=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,z=/^application\/dash\+xml/i,Y=function(e){return K.test(e)?"hls":z.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},Q=i(978),J=function(e){return!!e&&"object"==typeof e},$=function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.reduce((function(t,i){return"object"!=typeof i||Object.keys(i).forEac
2h((function(n){Array.isArray(t[n])&&Array.isArray(i[n])?t[n]=t[n].concat(i[n]):J(t[n])&&J(i[n])?t[n]=e(t[n],i[n]):t[n]=i[n]})),t}),{})},Z=function(e){return Object.keys(e).map((function(t){return e[t]}))},ee=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},te=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},ie=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i;return-1},ne=function(e){var t=e.baseUrl,i=void 0===t?"":t,n=e.source,s=void 0===n?"":n,a=e.range,o=void 0===a?"":a,l=e.indexRange,d=void 0===l?"":l,u={uri:s,resolvedUri:E(i||"",s)};if(o||d){var c,h=(o||d).split("-"),p=r().BigInt?r().BigInt(h[0]):parseInt(h[0],10),f=r().BigInt?r().BigInt(h[1]):parseInt(h[1],10);p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p)),f<Number.MAX_SAFE_INTEGER&&"bigint"==typeof f&&(f=Number(f)),"bigint"==typeof(c="bigint"==typeof f||"bigint"==typeof p?r().BigInt(f)-r().BigInt(p)+r().BigInt(1):f-p+1)&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),u.byterange={length:c,offset:p}}return u},re=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},se={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration,s=e.periodDuration,a=re(e.endNumber),o=t/n;return"number"==typeof a?{start:0,end:a}:"number"==typeof s?{start:0,end:s/o}:{start:0,end:r/o}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,s=void 0===r?1:r,a=e.duration,o=e.periodStart,l=void 0===o?0:o,d=e.minimumUpdatePeriod,u=void 0===d?0:d,c=e.timeShiftBufferDepth,h=void 0===c?1/0:c,p=re(e.endNumber),f=(t+i)/1e3,g=n+l,m=f+u-g,v=Math.ceil(m*s/a),y=Math.floor((f-g-h)*s/a),_=Math.floor((f-g)*s/a);return{start:Math.max(0,y),end:"number"==typeof p?p:Math.min(v,_)}}},ae=function(e){var t=e.type,i=e.duration,n=e.timescale,r=void 0===n?1:n,s=e.periodDuration,a=e.sourceDuration,o=se[t](e),l=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}(o.start,o.end).map(function(e){return function(t){var i=e.duration,n=e.timescale,r=void 0===n?1:n,s=e.periodStart,a=e.startNumber;return{number:(void 0===a?1:a)+t,duration:i/r,timeline:s,time:t*i}}}(e));if("static"===t){var d=l.length-1,u="number"==typeof s?s:a;l[d].duration=u-i/r*d}return l},oe=function(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,s=e.indexRange,a=void 0===s?"":s,o=e.periodStart,l=e.presentationTime,d=e.number,u=void 0===d?0:d,c=e.duration;if(!t)throw new Error("NO_BASE_URL");var h=ne({baseUrl:t,source:n.sourceURL,range:n.range}),p=ne({baseUrl:t,source:t,indexRange:a});if(p.map=h,c){var f=ae(e);f.length&&(p.duration=f[0].duration,p.timeline=f[0].timeline)}else r&&(p.duration=r,p.timeline=o);return p.presentationTime=l||o,p.number=u,[p]},le=function(e,t,i){var n,s=e.sidx.map?e.sidx.map:null,a=e.sidx.duration,o=e.timeline||0,l=e.sidx.byterange,d=l.offset+l.length,u=t.timescale,c=t.references.filter((function(e){return 1!==e.referenceType})),h=[],p=e.endList?"static":"dynamic",f=e.sidx.timeline,g=f,m=e.mediaSequence||0;n="bigint"==typeof t.firstOffset?r().BigInt(d)+t.firstOffset:d+t.firstOffset;for(var v=0;v<c.length;v++){var y,_=t.references[v],b=_.referencedSize,T=_.subsegmentDuration;y="bigint"==typeof n?n+r().BigInt(b)-r().BigInt(1):n+b-1;var S=oe({baseUrl:i,timescale:u,timeline:o,periodStart:f,presentationTime:g,number:m,duration:T,sourceDuration:a,indexRange:n+"-"+y,type:p})[0];s&&(S.map=s),h.push(S),n+="bigint"==typeof n?r().BigInt(b):b,g+=T/u,m++}return e.segments=h,e},de=["AUDIO","SUBTITLES"],ue=1/60,ce=function(e){return(t=e,i=function(e){return e.timeline},Z(t.reduce((function(e,t){return t.forEach((function(t){e[i(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,i},he=function(e){var t,i,n=[];return t=e,i=function(e,t,i,r){n=n.concat(e.playlists||[])},de.forEach((function(e){for(var n in t.mediaGroups[e])for(var r in t.mediaGroups[e][n]){var s=t.mediaGroups[e][n][r];i(s)}})),n},pe=function(e){var t=e.playlist,i=e.mediaSequence;t.mediaSequence=i,t.segments.forEach((function(e,i){e.number=t.mediaSequence+i}))},fe=function(e){return e&&e.uri+"-"+(i="bigint"==typeof(t=e.byterange).offset||"bigint"==typeof t.length?r().BigInt(t.offset)+r().BigInt(t.length)-r().BigInt(1):t.offset+t.length-1,t.offset+"-"+i);var t,i},ge=function(e){return Z(e.reduce((function(e,t){var i,n=t.attributes.id+(t.attributes.lang||"");e[n]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments)),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):(e[n]=t,e[n].attributes.timelineStarts=[]);return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t;return e.discontinuityStarts=(t=e.segments||[],"discontinuity",t.reduce((function(e,t,i){return t.discontinuity&&e.push(i),e}),[])),e}))},me=function(e,t){var i=fe(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&le(e,n,e.sidx.resolvedUri),e},ve=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e)e[i]=me(e[i],t);return e},ye=function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,s=e.discontinuityStarts,a={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth}
vendor: 4,297 bytes, line 2
2,t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:s,timelineStarts:i.timelineStarts,segments:n};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a},_e=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},be=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Te=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Se=function(e){return e?Object.keys(e).reduce((function(t,i){var n=e[i];return t.concat(n.playlists)}),[]):[]},Ee=function(e){var t,i=e.dashPlaylists,n=e.locations,r=e.sidxMapping,s=void 0===r?{}:r,a=e.previousManifest;if(!i.length)return{};var o=i[0].attributes,l=o.sourceDuration,d=o.type,u=o.suggestedPresentationDelay,c=o.minimumUpdatePeriod,h=ge(i.filter(_e)).map(ye),p=ge(i.filter(be)),f=ge(i.filter(Te)),g=i.map((function(e){return e.attributes.captionServices})).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:l,playlists:ve(h,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),n&&(m.locations=n),"dynamic"===d&&(m.suggestedPresentationDelay=u);var v,y,_,b,T,S,E,A=0===m.playlists.length,w=p.length?function(e,t,i){var n;void 0===t&&(t={}),void 0===i&&(i=!1);var r=e.reduce((function(e,r){var s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"",o=r.attributes.label||"main";if(a&&!r.attributes.label){var l=s?" ("+s+")":"";o=""+r.attributes.lang+l}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});var d=me(function(e,t){var i,n=e.attributes,r=e.segments,s=e.sidx,a=e.mediaSequence,o=e.discontinuitySequence,l=e.discontinuityStarts,d={attributes:(i={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:n.timelineStarts,mediaSequence:a,segments:r};return n.contentProtection&&(d.contentProtection=n.contentProtection),s&&(d.sidx=s),t&&(d.attributes.AUDIO="audio",d.attributes.SUBTITLES="subs"),d}(r,i),t);return e[o].playlists.push(d),void 0===n&&"main"===s&&((n=r).default=!0),e}),{});return n||(r[Object.keys(r)[0]].default=!0),r}(p,s,A):null,P=f.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,i){var n=i.attributes.lang||"text";return e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(me(function(e){var t,i=e.attributes,n=e.segments,r=e.mediaSequence,s=e.discontinuityStarts,a=e.discontinuitySequence;void 0===n&&(n=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var o=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t);return i.codecs&&(o.CODECS=i.codecs),{attributes:o,uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:s,discontinuitySequence:a,mediaSequence:r,segments:n}}(i),t)),e}),{})}(f,s):null,C=h.concat(Se(w),Se(P)),L=C.map((function(e){return e.timelineStarts}));return m.timelineStarts=ce(L),v=C,y=m.timelineStarts,v.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=ie(y,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),w&&(m.mediaGroups.AUDIO.audio=w),P&&(m.mediaGroups.SUBTITLES.subs=P),g.length&&(m.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var i=t.channel,n=t.language;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])})),e):e}),{})),a?(b=(_={oldManifest:a,newManifest:m}).oldManifest,T=_.newManifest,S=b.playlists.concat(he(b)),E=T.playlists.concat(he(T)),T.timelineStarts=ce([b.timelineStarts,T.timelineStarts]),function(e){var t=e.oldPlaylists,i=e.timelineStarts;
vendor: 6,617 bytes, line 2
2e.newPlaylists.forEach((function(e){e.discontinuitySequence=ie(i,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var r=e.segments[0],s=ie(n.segments,(function(e){return Math.abs(e.presentationTime-r.presentationTime)<ue}));if(-1===s)return pe({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),pe({playlist:e,mediaSequence:n.segments[s].number})}}))}({oldPlaylists:S,newPlaylists:E,timelineStarts:T.timelineStarts}),T):m},Ae=function(e,t,i){var n=e.NOW,r=e.clientOffset,s=e.availabilityStartTime,a=e.timescale,o=void 0===a?1:a,l=e.periodStart,d=void 0===l?0:l,u=e.minimumUpdatePeriod,c=(n+r)/1e3+(void 0===u?0:u)-(s+d);return Math.ceil((c*o-t)/i)},we=function(e,t){for(var i=e.type,n=e.minimumUpdatePeriod,r=void 0===n?0:n,s=e.media,a=void 0===s?"":s,o=e.sourceDuration,l=e.timescale,d=void 0===l?1:l,u=e.startNumber,c=void 0===u?1:u,h=e.periodStart,p=[],f=-1,g=0;g<t.length;g++){var m=t[g],v=m.d,y=m.r||0,_=m.t||0;f<0&&(f=_),_&&_>f&&(f=_);var b=void 0;if(y<0){var T=g+1;b=T===t.length?"dynamic"===i&&r>0&&a.indexOf("$Number$")>0?Ae(e,f,v):(o*d-f)/v:(t[T].t-f)/v}else b=y+1;for(var S=c+p.length+b,E=c+p.length;E<S;)p.push({number:E,duration:v/d,time:f,timeline:h}),f+=v,E++}return p},Pe=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Ce=function(e,t){return e.replace(Pe,function(e){return function(t,i,n,r){if("$$"===t)return"$";if(void 0===e[i])return t;var s=""+e[i];return"RepresentationID"===i?s:(r=n?parseInt(r,10):1,s.length>=r?s:""+new Array(r-s.length+1).join("0")+s)}}(t))},Le=function(e,t){var i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},n=e.initialization,r=void 0===n?{sourceURL:"",range:""}:n,s=ne({baseUrl:e.baseUrl,source:Ce(r.sourceURL,i),range:r.range}),a=function(e,t){return e.duration||t?e.duration?ae(e):we(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return a.map((function(t){i.Number=t.number,i.Time=t.time;var n=Ce(e.media||"",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:E(e.baseUrl||"",n),map:s,number:t.number,presentationTime:o}}))},De=function(e,t){var i=e.duration,n=e.segmentUrls,r=void 0===n?[]:n,s=e.periodStart;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var a,o=r.map((function(t){return function(e,t){var i=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,s=ne({baseUrl:i,source:r.sourceURL,range:r.range}),a=ne({baseUrl:i,source:t.media,range:t.mediaRange});return a.map=s,a}(e,t)}));return i&&(a=ae(e)),t&&(a=we(e,t)),a.map((function(t,i){if(o[i]){var n=o[i],r=e.timescale||1,a=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=s+(t.time-a)/r,n}})).filter((function(e){return e}))},ke=function(e){var t,i,n=e.attributes,r=e.segmentInfo;r.template?(i=Le,t=$(n,r.template)):r.base?(i=oe,t=$(n,r.base)):r.list&&(i=De,t=$(n,r.list));var s={attributes:n};if(!i)return s;var a=i(t,r.segmentTimeline);if(t.duration){var o=t,l=o.duration,d=o.timescale,u=void 0===d?1:d;t.duration=l/u}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},Ie=function(e,t){return te(e.childNodes).filter((function(e){return e.tagName===t}))},Re=function(e){return e.textContent.trim()},Ne=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],l=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(s||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)},Oe={mediaPresentationDuration:function(e){return Ne(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return Ne(e)},suggestedPresentationDelay:function(e){return Ne(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Ne(e)},start:function(e){return Ne(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Ne(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Me=function(e){return e&&e.attributes?te(e.attributes).reduce((function(e,t){var i=Oe[t.name]||Oe.DEFAULT;return e[t.name]=i(t.value),e}),{}):{}},xe={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Be=function(e,t){return t.length?ee(e.map((function(e){return t.map((function(t){return E(e,Re(t))}))}))):e},Ue=function(e){var t=Ie(e,"SegmentTemplate")[0],i=Ie(e,"SegmentList")[0],n=i&&Ie(i,"SegmentURL").map((function(e){return $({tag:"SegmentURL"},Me(e))})),r=Ie(e,"SegmentBase")[0],s=i||t,a=s&&Ie(s,"SegmentTimeline")[0],o=i||r||t,l=o&&Ie(o,"Initialization")[0],d=t&&Me(t);d&&l?d.initialization=l&&Me(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var u={template:d,segmentTimeline:a&&Ie(a,"S").map((function(e){return Me(e)})),list:i&&$(Me(i),{segmentUrls:n,initialization:Me(l)}),base:r&&$(Me(r),{initialization:Me(l)})};return Object.keys(u).forEach((function(e){u[e]||delete u[e]})),u},Ve=function(e,t){return function(i,n){var r=Be(t,Ie(i.node,"BaseURL")),s=$(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(s.periodDuration=i.attributes.duration);var a=Ie(i.node,"AdaptationSet"),o=Ue(i.node);return ee(a.map(function(e,t,i){return function(n){var r,s=Me(n),a=Be(t,Ie(n,"BaseURL")),o=Ie(n,"Role")[0],l={role:Me(o)},d=$(e,s,l),u=Ie(n,"Accessibility")[0],c="urn:scte:dash:cc:cea-608:2
2015"===(r=Me(u)).schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t,i;if(i=e,/^CC\d=/.test(e)){var n=e.split("=");t=n[0],i=n[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:i}})):"urn:scte:dash:cc:cea-708:2015"===r.schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var i=e.split("="),n=i[0],r=i[1],s=void 0===r?"":r;t.channel=n,t.language=e,s.split(",").forEach((function(e){var i=e.split(":"),n=i[0],r=i[1];"lang"===n?t.language=r:"er"===n?t.easyReader=Number(r):"war"===n?t.aspectRatio=Number(r):"3D"===n&&(t["3D"]=Number(r))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;c&&(d=$(d,{captionServices:c}));var h=Ie(n,"Label")[0];if(h&&h.childNodes.length){var p=h.childNodes[0].nodeValue.trim();d=$(d,{label:p})}var f=Ie(n,"ContentProtection").reduce((function(e,t){var i=Me(t),n=xe[i.schemeIdUri];if(n){e[n]={attributes:i};var r=Ie(t,"cenc:pssh")[0];if(r){var s=Re(r),a=s&&w(s);e[n].pssh=a}}return e}),{});Object.keys(f).length&&(d=$(d,{contentProtection:f}));var g=Ue(n),m=Ie(n,"Representation"),v=$(i,g);return ee(m.map(function(e,t,i){return function(n){var r=Ie(n,"BaseURL"),s=Be(t,r),a=$(e,Me(n)),o=Ue(n);return s.map((function(e){return{segmentInfo:$(i,o),attributes:$(a,{baseUrl:e})}}))}}(d,a,v)))}}(s,r,o)))}},Fe=function(e){if(""===e)throw new Error("DASH_EMPTY_MANIFEST");var t,i,n=new Q.DOMParser;try{i=(t=n.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return i},qe=i(962),je=i.n(qe),He=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Ge=r().BigInt||Number,We=[Ge("0x1"),Ge("0x100"),Ge("0x10000"),Ge("0x1000000"),Ge("0x100000000"),Ge("0x10000000000"),Ge("0x1000000000000"),Ge("0x100000000000000"),Ge("0x10000000000000000")],Xe=(P=new Uint16Array([65484]),255===(C=new Uint8Array(P.buffer,P.byteOffset,P.byteLength))[0]||C[0],function(e,t){var i=void 0===t?{}:t,n=i.signed,r=void 0!==n&&n,s=i.le,a=void 0!==s&&s;e=He(e);var o=a?"reduce":"reduceRight",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,n){var r=a?n:Math.abs(n+1-e.length);return t+Ge(i)*We[r]}),Ge(0));if(r){var d=We[e.length]/Ge(2)-Ge(1);(l=Ge(l))>d&&(l-=d,l-=d,l-=Ge(2))}return Number(l)}),Ke=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},ze=function(e,t,i){var n=void 0===i?{}:i,r=n.offset,s=void 0===r?0:r,a=n.mask,o=void 0===a?[]:a;e=He(e);var l=(t=He(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[s+i]:e[s+i])}))},Ye=He([73,68,51]),Qe=function e(t,i){return void 0===i&&(i=0),(t=He(t)).length-i<10||!ze(t,Ye,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=He(e))[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?n+20:n+10}(t,i),e(t,i))},Je=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Ke(e):e}),$e=function(e){e=He(e);for(var t=[],i=0;e.length>i;){var n=e[i],r=0,s=0,a=e[++s];for(s++;128&a;)r=(127&a)<<7,a=e[s],s++;r+=127&a;for(var o=0;o<L.length;o++){var l=L[o],d=l.id,u=l.parser;if(n===d){t.push(u(e.subarray(s,s+r)));break}}i+=r+s}return t};L=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,He(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=$e(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:$e(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var Ze=function e(t,i,n){void 0===n&&(n=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Je(e)})):[Je(e)]}(i),t=He(t);var r=[];if(!i.length)return r;for(var s=0;s<t.length;){var a=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])>>>0,o=t.subarray(s+4,s+8);if(0===a)break;var l=s+a;if(l>t.length){if(n)break;l=t.length}var d=t.subarray(s+8,l);ze(o,i[0])&&(1===i.length?r.push(d):r.push.apply(r,e(d,i.slice(1),n))),s=l}return r}
vendor: 7,678 bytes, line 2
2,et={EBML:He([26,69,223,163]),DocType:He([66,130]),Segment:He([24,83,128,103]),SegmentInfo:He([21,73,169,102]),Tracks:He([22,84,174,107]),Track:He([174]),TrackNumber:He([215]),DefaultDuration:He([35,227,131]),TrackEntry:He([174]),TrackType:He([131]),FlagDefault:He([136]),CodecID:He([134]),CodecPrivate:He([99,162]),VideoTrack:He([224]),AudioTrack:He([225]),Cluster:He([31,67,182,117]),Timestamp:He([231]),TimestampScale:He([42,215,177]),BlockGroup:He([160]),BlockDuration:He([155]),Block:He([161]),SimpleBlock:He([163])},tt=[128,64,32,16,8,4,2,1],it=function(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var r=function(e){for(var t=1,i=0;i<tt.length&&!(e&tt[i]);i++)t++;return t}(e[t]),s=e.subarray(t,t+r);return i&&((s=Array.prototype.slice.call(e,t,t+r))[0]^=tt[r-1]),{length:r,value:Xe(s,{signed:n}),bytes:s}},nt=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?function(e,t){var i=(void 0===t?{}:t).le,n=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var r,s=(r=e=Ge(e),Math.ceil(function(e){return e.toString(2).length}(r)/8)),a=new Uint8Array(new ArrayBuffer(s)),o=0;o<s;o++){var l=n?o:Math.abs(o+1-a.length);a[l]=Number(e/We[o]&Ge(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a}(t):t},rt=function e(t,i,n){if(n>=i.length)return i.length;var r=it(i,n,!1);if(ze(t.bytes,r.bytes))return n;var s=it(i,n+r.length);return e(t,i,n+s.length+s.value+r.length)},st=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return nt(e)})):[nt(e)]}(i),t=He(t);var n=[];if(!i.length)return n;for(var r=0;r<t.length;){var s=it(t,r,!1),a=it(t,r+s.length),o=r+s.length+a.length;127===a.value&&(a.value=rt(s,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,d=t.subarray(o,l);ze(i[0],s.bytes)&&(1===i.length?n.push(d):n=n.concat(e(d,i.slice(1)))),r+=s.length+a.length+d.length}return n},at=He([0,0,0,1]),ot=He([0,0,1]),lt=He([0,0,3]),dt=function(e){for(var t=[],i=1;i<e.length-2;)ze(e.subarray(i,i+3),lt)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var n=e.length-t.length,r=new Uint8Array(n),s=0;for(i=0;i<n;s++,i++)s===t[0]&&(s++,t.shift()),r[i]=e[s];return r},ut=function(e,t,i,n){void 0===n&&(n=1/0),e=He(e),i=[].concat(i);for(var r,s=0,a=0;s<e.length&&(a<n||r);){var o=void 0;if(ze(e.subarray(s),at)?o=4:ze(e.subarray(s),ot)&&(o=3),o){if(a++,r)return dt(e.subarray(r,s));var l=void 0;"h264"===t?l=31&e[s+o]:"h265"===t&&(l=e[s+o]>>1&63),-1!==i.indexOf(l)&&(r=s+o),s+=o+("h264"===t?1:2)}else s++}return e.subarray(0,0)},ct={webm:He([119,101,98,109]),matroska:He([109,97,116,114,111,115,107,97]),flac:He([102,76,97,67]),ogg:He([79,103,103,83]),ac3:He([11,119]),riff:He([82,73,70,70]),avi:He([65,86,73]),wav:He([87,65,86,69]),"3gp":He([102,116,121,112,51,103]),mp4:He([102,116,121,112]),fmp4:He([115,116,121,112]),mov:He([102,116,121,112,113,116]),moov:He([109,111,111,118]),moof:He([109,111,111,102])},ht={aac:function(e){var t=Qe(e);return ze(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Qe(e);return ze(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=st(e,[et.EBML,et.DocType])[0];return ze(t,ct.webm)},mkv:function(e){var t=st(e,[et.EBML,et.DocType])[0];return ze(t,ct.matroska)},mp4:function(e){return!ht["3gp"](e)&&!ht.mov(e)&&(!(!ze(e,ct.mp4,{offset:4})&&!ze(e,ct.fmp4,{offset:4}))||!(!ze(e,ct.moof,{offset:4})&&!ze(e,ct.moov,{offset:4}))||void 0)},mov:function(e){return ze(e,ct.mov,{offset:4})},"3gp":function(e){return ze(e,ct["3gp"],{offset:4})},ac3:function(e){var t=Qe(e);return ze(e,ct.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Qe(e);return ze(e,ct.flac,{offset:t})},ogg:function(e){return ze(e,ct.ogg)},avi:function(e){return ze(e,ct.riff)&&ze(e,ct.avi,{offset:8})},wav:function(e){return ze(e,ct.riff)&&ze(e,ct.wav,{offset:8})},h264:function(e){return function(e,t,i){return ut(e,"h264",7,3)}(e).length},h265:function(e){return function(e,t,i){return ut(e,"h265",[32,33],3)}(e).length}},pt=Object.keys(ht).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);pt.forEach((function(e){var t=ht[e];ht[e]=function(e){return t(He(e))}}));for(var ft,gt=ht,mt=function(e){e=He(e);for(var t=0;t<pt.length;t++){var i=pt[t];if(gt[i](e))return i}return""},vt=i(622),yt="7.18.1",_t={},bt=function(e,t){return _t[e]=_t[e]||[],t&&(_t[e]=_t[e].concat(t)),_t[e]},Tt=function(e,t){var i=bt(e).indexOf(t);return!(i<=-1||(_t[e]=_t[e].slice(),_t[e].splice(i,1),0))},St={prefixed:!0},Et=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],At=Et[0],wt=0;wt<Et.length;wt++)if(Et[wt][1]in a()){ft=Et[wt];break}if(ft){for(var Pt=0;Pt<ft.length;Pt++)St[At[Pt]]=ft[Pt];St.prefixed=ft[0]!==At[0]}var Ct=[],Lt=function e(t){var i,n="info",s=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i("log",n,t)};return i=function(e,t){return function(i,n,s){var a=t.levels[n],o=new RegExp("^("+a+")$");if("log"!==i&&s.unshift(i.toUpperCase()+":"),s.unshift(e+":"),Ct){Ct.push([].concat(s));var l=Ct.length-1e3;Ct.splice(0,l>0?l:0)}if(r().console){var d=r().console[i];d||"debug"!==i||(d=r().console.info||r().console.log),d&&a&&o.test(i)&&d[Array.isArray(s)?"apply":"call"](r().console,s)}}}(t,s),s.createLogger=function(i){return e(t+": "+i)},s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},s.level=function(e){if("string"==typeof e){if(!s.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(s.history=function(){return Ct?[].concat(Ct):[]}).filter=function(e){return(Ct||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},s.history.clear=function(){Ct&&(Ct.length=0)},s.history.disable=function(){null!==Ct&&(Ct.length=0,Ct=null)},s.history.enable=function(){null===Ct&&(Ct=[])},s.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("error",n,t)},s.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("warn",n,t)},s.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("debug",n,t)},s}("VIDEOJS"),Dt=Lt.createLogger,kt=Object.prototype.toString,It=function(e){return Ot(e)?Object.keys(e):[]};function Rt(e,t){It(e).forEach((function(i){return t(e[i],i)}))}function Nt(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?o.apply(void 0,[e].concat(i)):(i.forEach((function(t){t&&Rt(t,(function(t,i){e[i]=t}))})),e)}function Ot(e){return!!e&&"object"==typeof e}function Mt(e){return Ot(e)&&"[object Object]"===kt.call(e)&&e.constructor===Object}function xt(e,t){if(!e||!t)return"";if("function"==typeof r().getComputedStyle){var i;try{i=r().getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}var Bt,Ut,Vt,Ft=r().navigator&&r().navigator.userAgent||"",qt=/AppleWeb
2Kit\/([\d.]+)/i.exec(Ft),jt=qt?parseFloat(qt.pop()):null,Ht=/iPod/i.test(Ft),Gt=(Bt=Ft.match(/OS (\d+)_/i))&&Bt[1]?Bt[1]:null,Wt=/Android/i.test(Ft),Xt=function(){var e=Ft.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),Kt=Wt&&Xt<5&&jt<537,zt=/Firefox/i.test(Ft),Yt=/Edg/i.test(Ft),Qt=!Yt&&(/Chrome/i.test(Ft)||/CriOS/i.test(Ft)),Jt=function(){var e=Ft.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),$t=(Ut=/MSIE\s(\d+)\.\d/.exec(Ft),!(Vt=Ut&&parseFloat(Ut[1]))&&/Trident\/7.0/i.test(Ft)&&/rv:11.0/.test(Ft)&&(Vt=11),Vt),Zt=/Safari/i.test(Ft)&&!Qt&&!Wt&&!Yt,ei=/Windows/i.test(Ft),ti=Boolean(di()&&("ontouchstart"in r()||r().navigator.maxTouchPoints||r().DocumentTouch&&r().document instanceof r().DocumentTouch)),ii=/iPad/i.test(Ft)||Zt&&ti&&!/iPhone/i.test(Ft),ni=/iPhone/i.test(Ft)&&!ii,ri=ni||ii||Ht,si=(Zt||ri)&&!Qt,ai=Object.freeze({__proto__:null,IS_IPOD:Ht,IOS_VERSION:Gt,IS_ANDROID:Wt,ANDROID_VERSION:Xt,IS_NATIVE_ANDROID:Kt,IS_FIREFOX:zt,IS_EDGE:Yt,IS_CHROME:Qt,CHROME_VERSION:Jt,IE_VERSION:$t,IS_SAFARI:Zt,IS_WINDOWS:ei,TOUCH_ENABLED:ti,IS_IPAD:ii,IS_IPHONE:ni,IS_IOS:ri,IS_ANY_SAFARI:si});function oi(e){return"string"==typeof e&&Boolean(e.trim())}function li(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function di(){return a()===r().document}function ui(e){return Ot(e)&&1===e.nodeType}function ci(){try{return r().parent!==r().self}catch(e){return!0}}function hi(e){return function(t,i){if(!oi(t))return a()[e](null);oi(i)&&(i=a().querySelector(i));var n=ui(i)?i:a();return n[e]&&n[e](t)}}function pi(e,t,i,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={});var r=a().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Lt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+i+"."),r.setAttribute(e,i)):"textContent"===e?fi(r,i):r[e]===i&&"tabIndex"!==e||(r[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ni(r,n),r}function fi(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function gi(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function mi(e,t){return li(t),e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className);var i}function vi(e,t){return e.classList?e.classList.add(t):mi(e,t)||(e.className=(e.className+" "+t).trim()),e}function yi(e,t){return e?(e.classList?e.classList.remove(t):(li(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(Lt.warn("removeClass was called with an element that doesn't exist"),null)}function _i(e,t,i){var n=mi(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n)return i?vi(e,t):yi(e,t),e}function bi(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function Ti(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,n=i.length-1;n>=0;n--){var r=i[n].name,s=i[n].value;
vendor: 12,284 bytes, line 2
2"boolean"!=typeof e[r]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(s=null!==s),t[r]=s}return t}function Si(e,t){return e.getAttribute(t)}function Ei(e,t,i){e.setAttribute(t,i)}function Ai(e,t){e.removeAttribute(t)}function wi(){a().body.focus(),a().onselectstart=function(){return!1}}function Pi(){a().onselectstart=function(){return!0}}function Ci(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(xt(e,"height"))),i.width||(i.width=parseFloat(xt(e,"width"))),i}}function Li(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;e.offsetParent&&e!==a()[St.fullscreenElement];)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:n,top:r,width:t,height:i}}function Di(e,t){var i={x:0,y:0};if(ri)for(var n=e;n&&"html"!==n.nodeName.toLowerCase();){var r=xt(n,"transform");if(/^matrix/.test(r)){var s=r.slice(7,-1).split(/,\s/).map(Number);i.x+=s[4],i.y+=s[5]}else if(/^matrix3d/.test(r)){var a=r.slice(9,-1).split(/,\s/).map(Number);i.x+=a[12],i.y+=a[13]}n=n.parentNode}var o={},l=Li(t.target),d=Li(e),u=d.width,c=d.height,h=t.offsetY-(d.top-l.top),p=t.offsetX-(d.left-l.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-d.left,h=t.changedTouches[0].pageY+d.top,ri&&(p-=i.x,h-=i.y)),o.y=1-Math.max(0,Math.min(1,h/c)),o.x=Math.max(0,Math.min(1,p/u)),o}function ki(e){return Ot(e)&&3===e.nodeType}function Ii(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ri(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),ui(e)||ki(e)?e:"string"==typeof e&&/\S/.test(e)?a().createTextNode(e):void 0})).filter((function(e){return e}))}function Ni(e,t){return Ri(t).forEach((function(t){return e.appendChild(t)})),e}function Oi(e,t){return Ni(Ii(e),t)}function Mi(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}var xi,Bi=hi("querySelector"),Ui=hi("querySelectorAll"),Vi=Object.freeze({__proto__:null,isReal:di,isEl:ui,isInFrame:ci,createEl:pi,textContent:fi,prependTo:gi,hasClass:mi,addClass:vi,removeClass:yi,toggleClass:_i,setAttributes:bi,getAttributes:Ti,getAttribute:Si,setAttribute:Ei,removeAttribute:Ai,blockTextSelection:wi,unblockTextSelection:Pi,getBoundingClientRect:Ci,findPosition:Li,getPointerPosition:Di,isTextNode:ki,emptyEl:Ii,normalizeContent:Ri,appendContent:Ni,insertContent:Oi,isSingleLeftClick:Mi,$:Bi,$$:Ui}),Fi=!1,qi=function(){if(!1!==xi.options.autoSetup){var e=Array.prototype.slice.call(a().getElementsByTagName("video")),t=Array.prototype.slice.call(a().getElementsByTagName("audio")),i=Array.prototype.slice.call(a().getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(var r=0,s=n.length;r<s;r++){var o=n[r];if(!o||!o.getAttribute){ji(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&xi(o)}else Fi||ji(1)}};function ji(e,t){di()&&(t&&(xi=t),r().setTimeout(qi,e))}function Hi(){Fi=!0,r().removeEventListener("load",Hi)}di()&&("complete"===a().readyState?Hi():r().addEventListener("load",Hi));var Gi,Wi=function(e){var t=a().createElement("style");return t.className=e,t},Xi=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Ki=3;function zi(){return Ki++}r().WeakMap||(Gi=function(){function e(){this.vdata="vdata"+Math.floor(r().performance&&r().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var i=e[this.vdata]||zi();return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];Lt("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Yi,Qi=r().WeakMap?new WeakMap:new Gi;function Ji(e,t){if(Qi.has(e)){var i=Qi.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Qi.delete(e)}}function $i(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function Zi(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var n=e||r().event;for(var s in e={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(e[s]=n[s]));if(e.target||(e.target=e.srcElement||a()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a().documentElement,l=a().body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var en=function(){if("boolean"!=typeof Yi){Yi=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Yi=!0}});r().addEventListener("test",null,e),r().removeEventListener("test",null,e)}catch(e){}}return Yi},tn=["touchstart","touchmove"];function nn(e,t,i){if(Array.isArray(t))return $i(nn,e,t,i);Qi.has(e)||Qi.set(e,{});var n=Qi.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=zi()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=Zi(t);var r=n.handlers[t.type];if(r)for(var s=r.slice(0),a=0,o=s.length;a<o&&!t.isImmediatePropagationStopped();a++)try{s[a].call(e,t,i)}catch(e){Lt.error(e)}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;en()&&tn.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function rn(e,t,i){if(Qi.has(e)){var n=Qi.get(e);if(n.handlers){if(Array.isArray(t))return $i(rn,e,t,i);var r=function(e,t){n.handlers[t]=[],Ji(e,t)};if(void 0!==t){var s=n.handlers[t];if(s)if(i){if(i.guid)for(var a=0;a<s.length;a++)s[a].guid===i.guid&&s.splice(a--,1);Ji(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function sn(e,t,i){var n=Qi.has(e)?Qi.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Zi(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)sn.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){Qi.has(t.target)||Qi.set(t.target,{});var s=Qi.get(t.target);t.target[t.type]&&(s.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),s.disabled=!1)}return!t.defaultPrevented}function an(e,t,i){if(Array.isArray(t))return $i(an,e,t,i);var n=function n(){rn(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||zi(),nn(e,t,n)}function on(e,t,i){var n=function n(){rn(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||zi(),nn(e,t,n)}var ln,dn=Object.freeze({__proto__:null,fixEvent:Zi,on:nn,off:rn,trigger:sn,one:an,any:on}),un=30,cn=function(e,t,i){t.guid||(t.guid=zi());var n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},hn=function(e,t){var i=r().performance.now();return function(){var n=r().performance.now();n-i>=t&&(e.apply(void 0,arguments),i=n)}},pn=function(){};pn.prototype.allowedEvents_={},pn.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},nn(this,e,t),this.addEventListener=i},pn.prototype.addEventListener=pn.prototype.on,pn.prototype.off=function(e,t){rn(this,e,t)},pn.prototype.removeEventListener=pn.prototype.off,pn.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},an(this,e,t),this.addEventListener=i},pn.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},on(this,e,t),this.addEventListener=i},pn.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Zi(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),sn(this,e)},pn.prototype.dispatchEvent=pn.prototype.trigger,pn.prototype.queueTrigger=function(e){var t=this;ln||(ln=new Map);var i=e.type||e,n=ln.get(this);n||(n=new Map,ln.set(this,n));var s=n.get(i);n.delete(i),r().clearTimeout(s);var a=r().setTimeout((function(){0===n.size&&(n=null,ln.delete(t)),t.trigger(e)}),0);n.set(i,a)};var fn=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},gn=function(e){return e instanceof pn||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},mn=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},vn=function(e,t,i){if(!e||!e.nodeName&&!gn(e))throw new Error("Invalid target for "+fn(t)+"#"+i+"; must be a DOM node or evented object.")},yn=function(e,t,i){if(!mn(e))throw new Error("Invalid event type for "+fn(t)+"#"+i+"; must be a non-empty string or array.")},_n=function(e,t,i){if("function"!=typeof e)throw new Error("Invalid listener for "+fn(t)+"#"+i+"; must be a function.")},bn=function(e,t,i){var n,r,s,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],s=t[1]):(n=t[0],r=t[1],s=t[2]),vn(n,e,i),yn(r,e,i),_n(s,e,i),{isTargetingSelf:a,target:n,type:r,listener:s=cn(e,s)}},Tn=function(e,t,i,n){vn(e,e,t),e.nodeName?dn[t](e,i,n):e[t](i,n)},Sn={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=bn(this,i,"on"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(Tn(a,"on",o,l),!s){var d=function(){return e.off(a,o,l)};d.guid=l.guid;var u=function(){return e.off("dispose",d)};u.guid=l.guid,Tn(this,"on","dispose",d),Tn(a,"on","dispose",u)}},one:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=bn(this,i,"one"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)Tn(a,"one",o,l);else{var d=function t(){e.off(a,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};d.guid=l.guid,Tn(a,"one",o,d)}},any:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=bn(this,i,"any"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)Tn(a,"any",o,l);else{var d=function t(){e.off(a,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};d.guid=l.guid,Tn(a,"any",o,d)}},off:function(e,t,i){if(!e||mn(e))rn(this.eventBusEl_,e,t);else{var n=e,r=t;vn(n,this,"off"),yn(r,this,"off"),_n(i,this,"off"),i=cn(this,i),this.off("dispose",i),n.nodeName?(rn(n,r,i),rn(n,"dispose",i)):gn(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){vn(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?e.type:e;if(!mn(i)){var n="Invalid event type for "+fn(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(n);(this.log||Lt).error(n)}return sn(this.eventBusEl_,e,t)}};function En(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=pi("span",{className:"vjs-event-bus"});return Nt(e,Sn),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()}
vendor: 5,894 bytes, line 2
2)),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Qi.has(e)&&Qi.delete(e)})),r().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var An={state:{},setState:function(e){var t,i=this;return"function"==typeof e&&(e=e()),Rt(e,(function(e,n){i.state[n]!==e&&((t=t||{})[n]={from:i.state[n],to:e}),i.state[n]=e})),t&&gn(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function wn(e,t){return Nt(e,An),e.state=Nt({},e.state,t),"function"==typeof e.handleStateChanged&&gn(e)&&e.on("statechanged",e.handleStateChanged),e}var Pn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Cn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Ln(){for(var e={},t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((function(t){t&&Rt(t,(function(t,i){Mt(t)?(Mt(e[i])||(e[i]={}),e[i]=Ln(e[i],t)):e[i]=t}))})),e}var Dn=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var i in this.map_)e.call(t,this.map_[i],i,this)},e}(),kn=r().Map?r().Map:Dn,In=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}(),Rn=r().Set?r().Set:In,Nn=function(){function e(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Ln({},this.options_),t=this.options_=Ln(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+zi()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(En(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),wn(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Rn,this.setIntervalIds_=new Rn,this.rafIds_=new Rn,this.namedRafs_=new kn,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Ln(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,i){return pi(e,t,i)},t.localize=function(e,t,i){void 0===i&&(i=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[n],a=n&&n.split("-")[0],o=r&&r[a],l=i;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-1],r=n;return void 0===n&&(r=e),r}))),l},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return n},t.addChild=function(t,i,n){var r,s;if(void 0===i&&(i={}),void 0===n&&(n=this.children_.length),"string"==typeof t){s=Cn(t);var a=i.componentClass||s;i.name=s;var o=e.getComponent(a);if(!o)throw new Error("Component "+a+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(s=s||r.name&&Cn(r.name()))&&(this.childNameIndex_[s]=r,this.childNameIndex_[Pn(s)]=r),"function"==typeof r.el&&r.el()){var l=null;this.children_[n+1]&&(this.children_[n+1].el_?l=this.children_[n+1].el_:ui(this.children_[n+1])&&(l=this.children_[n+1])),this.contentEl().insertBefore(r.el(),l)}return r},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Cn(e.name())]=null,this.childNameIndex_[Pn(e.name())]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,i=this.options_.children;if(i){var n,r=this.options_,s=e.getComponent("Tech");(n=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var n,r;return"string"==typeof e?r=i[n=e]||t.options_[n]||{}:(n=e.name,r=e),{name:n,opts:r}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||Cn(t.name));return i&&!s.isTech(i)}
vendor: 5,098 bytes, line 2
2)).forEach((function(e){var i=e.name,n=e.opts;if(void 0!==r[i]&&(n=r[i]),!1!==n){!0===n&&(n={}),n.playerOptions=t.options_.playerOptions;var s=t.addChild(i,n);s&&(t[i]=s)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Bi(e,t||this.contentEl())},t.$$=function(e,t){return Ui(e,t||this.contentEl())},t.hasClass=function(e){return mi(this.el_,e)},t.addClass=function(e){vi(this.el_,e)},t.removeClass=function(e){yi(this.el_,e)},t.toggleClass=function(e,t){_i(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return Si(this.el_,e)},t.setAttribute=function(e,t){Ei(this.el_,e,t)},t.removeAttribute=function(e){Ai(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Cn(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=xt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var i="offset"+Cn(e);t=this.el_[i]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(d().isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,i=null;this.on("touchstart",(function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=r().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(i){var n=t.touches[0].pageX-i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}}));var n=function(){e=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){i=null,!0===e&&r().performance.now()-t<200&&(n.preventDefault(),this.trigger("tap"))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=cn(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var i=function(i){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},t.setTimeout=function(e,t){var i,n=this;return e=cn(this,e),this.clearTimersOnDispose_(),i=r().setTimeout((function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),r().clearTimeout(e)),e},t.setInterval=function(e,t){e=cn(this,e),this.clearTimersOnDispose_();var i=r().setInterval(e,t);return this.setIntervalIds_.add(i),i},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),r().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=cn(this,e),t=r().requestAnimationFrame((function(){i.rafIds_.has(t)&&i.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var i=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=cn(this,t);var n=this.requestAnimationFrame((function(){t(),i.namedRafs_.has(e)&&i.namedRafs_.delete(e)}));return this.namedRafs_.set(e,n),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),r().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
2h((function(t){var i=t[0],n=t[1];e[i].forEach((function(t,i){return e[n](i)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,i){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n=e.getComponent("Tech"),r=n&&n.isTech(i),s=e===i||e.prototype.isPrototypeOf(i.prototype);if(r||!s)throw new Error('Illegal component, "'+t+'"; '+(r?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");t=Cn(t),e.components_||(e.components_={});var a=e.getComponent("Player");if("Player"===t&&a&&a.players){var o=a.players,l=Object.keys(o);if(o&&l.length>0&&l.map((function(e){return o[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,e.components_[Pn(t)]=i,i},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function On(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,n,i.length-1),i[n][t]}function Mn(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:On.bind(null,"start",0,e),end:On.bind(null,"end",1,e)},r().Symbol&&r().Symbol.iterator&&(t[r().Symbol.iterator]=function(){return(e||[]).values()}),t}function xn(e,t){return Array.isArray(e)?Mn(e):void 0===e||void 0===t?Mn():Mn([[e,t]])}function Bn(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=xn(0,0));for(var s=0;s<e.length;s++)i=e.start(s),(n=e.end(s))>t&&(n=t),r+=n-i;return r/t}function Un(e){if(e instanceof Un)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Ot(e)&&("number"==typeof e.code&&(this.code=e.code),Nt(this,e)),this.message||(this.message=Un.defaultMessages[this.code]||"")}Nn.prototype.supportsRaf_="function"==typeof r().requestAnimationFrame&&"function"==typeof r().cancelAnimationFrame,Nn.registerComponent("Component",Nn),Un.prototype.code=0,Un.prototype.message="",Un.prototype.status=null,Un.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Un.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Vn=0;Vn<Un.errorTypes.length;Vn++)Un[Un.errorTypes[Vn]]=Vn,Un.prototype[Un.errorTypes[Vn]]=Vn;function Fn(e){return null!=e&&"function"==typeof e.then}function qn(e){Fn(e)&&e.then(null,(function(e){}))}var jn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Hn="vjs-modal-dialog",Gn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleKeyDown_=function(e){return n.handleKeyDown(e)},n.close_=function(e){return n.close(e)},n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=pi("div",{className:Hn+"-content"},{role:"document"}),n.descEl_=pi("p",{className:Hn+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),fi(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return Hn+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},i.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpe
vendor: 9,225 bytes, line 2
2n&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Oi(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},i.empty=function(){this.trigger("beforemodalempty"),Ii(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return void 0!==e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=a().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),d().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(d().isEventKey(e,"Tab")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}a().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof r().HTMLAnchorElement||e instanceof r().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r().HTMLInputElement||e instanceof r().HTMLSelectElement||e instanceof r().HTMLTextAreaElement||e instanceof r().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r().HTMLIFrameElement||e instanceof r().HTMLObjectElement||e instanceof r().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(Nn);Gn.prototype.options_={pauseOnOpen:!0,temporary:!0},Nn.registerComponent("ModalDialog",Gn);var Wn=function(e){function t(t){var i;void 0===t&&(t=[]),(i=e.call(this)||this).tracks_=[],Object.defineProperty((0,u.A)(i),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<t.length;n++)i.addTrack(t[n]);return i}h(t,e);var i=t.prototype;return i.addTrack=function(e){var t=this,i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get:function(){return this.tracks_[i]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},gn(e)&&e.addEventListener("labelchange",e.labelchange_)},i.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},i.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(pn);for(var Xn in Wn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Wn.prototype.allowedEvents_)Wn.prototype["on"+Xn]=null;var Kn=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},zn=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].enabled){Kn(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,i}h(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&Kn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,Kn(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Wn),Yn=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},Qn=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].selected){Yn(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,Object.defineProperty((0,u.A)(i),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),i}h(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.selected&&Yn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,Yn(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(Wn),Jn=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Wn),$n=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Zn=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},t.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),er={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},tr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ir={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},nr={disabled:"disabled",hidden:"hidden",showing:"showing"},rr=function(e){function t(t){var i;void 0===t&&(t={}),i=e.call(this)||this;var n={id:t.id||"vjs_track_"+zi(),kind:t.kind||"",language:t.language||""},r=t.label||"",s=function(e){Object.defineProperty((0,u.A)(i),e,{get:function(){return n[e]},set:function(){}})};for(var a in n)s(a);return Object.defineProperty((0,u.A)(i),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),i}return h(t,e),t}(pn),sr=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=a().createElement("a");i.href=e;for(var n={},s=0;s<t.length;
2s++)n[t[s]]=i[t[s]];return"http:"===n.protocol&&(n.host=n.host.replace(/:80$/,"")),"https:"===n.protocol&&(n.host=n.host.replace(/:443$/,"")),n.protocol||(n.protocol=r().location.protocol),n.host||(n.host=r().location.host),n},ar=function(e){if(!e.match(/^https?:\/\//)){var t=a().createElement("a");t.href=e,e=t.href}return e},or=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},lr=function(e,t){void 0===t&&(t=r().location);var i=sr(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},dr=Object.freeze({__proto__:null,parseUrl:sr,getAbsoluteURL:ar,getFileExtension:or,isCrossOrigin:lr}),ur=function(e,t){var i=new(r().WebVTT.Parser)(r(),r().vttjs,r().WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r().console&&r().console.groupCollapsed&&r().console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return Lt.error(e)})),r().console&&r().console.groupEnd&&r().console.groupEnd()),i.flush()},cr=function(e,t){var i={uri:e},n=lr(e);n&&(i.cors=n);var s="use-credentials"===t.tech_.crossOrigin();s&&(i.withCredentials=s),m()(i,cn(this,(function(e,i,n){if(e)return Lt.error(e,i);t.loaded_=!0,"function"!=typeof r().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return ur(n,t);Lt.error("vttjs failed to load, stopping trying to process "+t.src)})):ur(n,t)})))},hr=function(e){function t(t){var i;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var n=Ln(t,{kind:ir[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=nr[n.mode]||"disabled",s=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden"),(i=e.call(this,n)||this).tech_=n.tech,i.cues_=[],i.activeCues_=[],i.preload_=!1!==i.tech_.preloadTextTracks;var a=new Zn(i.cues_),o=new Zn(i.activeCues_),l=!1,d=cn((0,u.A)(i),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1))}));return i.tech_.one("dispose",(function(){i.tech_.off("timeupdate",d)})),"disabled"!==r&&i.tech_.on("timeupdate",d),Object.defineProperties((0,u.A)(i),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return r},set:function(e){nr[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||cr(this.src,this),this.tech_.off("timeupdate",d),"disabled"!==r&&this.tech_.on("timeupdate",d),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var s=0;s<t.length;s++)-1===this.activeCues_.indexOf(t[s])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),n.src?(i.src=n.src,i.preload_||(i.loaded_=!0),(i.preload_||"subtitles"!==n.kind&&"captions"!==n.kind)&&cr(i.src,(0,u.A)(i))):i.loaded_=!0,i}h(t,e);var i=t.prototype;return i.addCue=function(e){var t=e;if(r().vttjs&&!(e instanceof r().vttjs.VTTCue)){for(var i in t=new(r().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},i.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(rr);hr.prototype.allowedEvents_={cuechange:"cuechange"};var pr=function(e){function t(t){var i;void 0===t&&(t={});var n=Ln(t,{kind:tr[t.kind]||""});i=e.call(this,n)||this;var r=!1;return Object.defineProperty((0,u.A)(i),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),n.enabled&&(i.enabled=n.enabled),i.loaded_=!0,i}return h(t,e),t}(rr),fr=function(e){function t(t){var i;void 0===t&&(t={});var n=Ln(t,{kind:er[t.kind]||""});i=e.call(this,n)||this;var r=!1;return Object.defineProperty((0,u.A)(i),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),n.selected&&(i.selected=n.selected),i}return h(t,e),t}(rr),gr=function(e){function t(t){var i,n;void 0===t&&(t={}),i=e.call(this)||this;var r=new hr(t);return i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties((0,u.A)(i),{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=0,r.addEventListener("loadeddata",(function(){n=2,i.trigger({type:"load",target:(0,u.A)(i)})})),i}return h(t,e),t}(pn);gr.prototype.allowedEvents_={load:"load"},gr.NONE=0,gr.LOADING=1,gr.LOADED=2,gr.ERROR=3;
vendor: 3,916 bytes, line 2
2var mr={audio:{ListClass:zn,TrackClass:pr,capitalName:"Audio"},video:{ListClass:Qn,TrackClass:fr,capitalName:"Video"},text:{ListClass:Jn,TrackClass:hr,capitalName:"Text"}};Object.keys(mr).forEach((function(e){mr[e].getterName=e+"Tracks",mr[e].privateName=e+"Tracks_"}));var vr={remoteText:{ListClass:Jn,TrackClass:hr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:$n,TrackClass:gr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},yr=o({},mr,vr);vr.names=Object.keys(vr),mr.names=Object.keys(mr),yr.names=[].concat(vr.names).concat(mr.names);var _r=function(e){function t(t,i){var n;return void 0===t&&(t={}),void 0===i&&(i=function(){}),t.reportTouchActivity=!1,(n=e.call(this,null,t,i)||this).onDurationChange_=function(e){return n.onDurationChange(e)},n.trackProgress_=function(e){return n.trackProgress(e)},n.trackCurrentTime_=function(e){return n.trackCurrentTime(e)},n.stopTrackingCurrentTime_=function(e){return n.stopTrackingCurrentTime(e)},n.disposeSourceHandler_=function(e){return n.disposeSourceHandler(e)},n.hasStarted_=!1,n.on("playing",(function(){this.hasStarted_=!0})),n.on("loadstart",(function(){this.hasStarted_=!1})),yr.names.forEach((function(e){var i=yr[e];t&&t[i.getterName]&&(n[i.privateName]=t[i.getterName])})),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(n["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!==t.preloadTextTracks,n.autoRemoteTextTracks_=new yr.text.ListClass,n.initTrackListeners(),t.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}h(t,e);var i=t.prototype;return i.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(cn(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){return xn(0,0)},i.bufferedPercent=function(){return Bn(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(mr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.clearTracks=function(e){var t=this;
vendor: 4,621 bytes, line 2
2(e=[].concat(e)).forEach((function(e){for(var i=t[e+"Tracks"]()||[],n=i.length;n--;){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},i.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(e){return void 0!==e&&(this.error_=new Un(e),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?xn(0,0):xn()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var e=this;mr.names.forEach((function(t){var i=mr[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},i.addWebVttScript_=function(){var e=this;if(!r().WebVTT)if(a().body.contains(this.el())){if(!this.options_["vtt.js"]&&Mt(y())&&Object.keys(y()).length>0)return void this.trigger("vttjsloaded");var t=a().createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),r().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var s=function(){return e.trigger("texttrackchange")},a=function(){s();for(var e=0;e<t.length;e++){var i=t[e];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",s)}))},i.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,r){void 0===r&&(r={});var s=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var a=new yr.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,i)},i.createRemoteTextTrack=function(e){var t=Ln(e,{tech:this});return new vr.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Lt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready((function(){return i.autoRemoteTextTracks_.addTrack(n.track)})),n},i.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var e=this.options_.Promise||r().Promise;if(e)return e.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Cn(e),t.techs_[e]=i,t.techs_[Pn(e)]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=Cn(e),r()&&r().videojs&&r().videojs[e]?(Lt.warn("The "+e+" tech w
2as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r().videojs[e]):void 0)},t}(Nn);yr.names.forEach((function(e){var t=yr[e];_r.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),_r.prototype.featuresVolumeControl=!0,_r.prototype.featuresMuteControl=!0,_r.prototype.featuresFullscreenResize=!1,_r.prototype.featuresPlaybackRate=!1,_r.prototype.featuresProgressEvents=!1,_r.prototype.featuresSourceset=!1,_r.prototype.featuresTimeupdateEvents=!1,_r.prototype.featuresNativeTextTracks=!1,_r.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i,n=e.sourceHandlers||[],r=0;r<n.length;r++)if(i=n[r].canPlayType(t))return i;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,i))return n[r];return null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:Lt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Nn.registerComponent("Tech",_r),_r.registerTech("Tech",_r),_r.defaultTechOrder_=[];var br={},Tr={},Sr={};function Er(e,t,i){e.setTimeout((function(){return Dr(t,br[t.type],i,e)}),1)}function Ar(e,t,i,n){void 0===n&&(n=null);var r="call"+Cn(i),s=e.reduce(Lr(r),n),a=s===Sr,o=a?null:t[i](s);return function(e,t,i,n){for(var r=e.length-1;r>=0;r--){var s=e[r];s[t]&&s[t](n,i)}}(e,i,o,a),o}var wr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Pr={setCurrentTime:1,setMuted:1,setVolume:1},Cr={play:1,pause:1};function Lr(e){return function(t,i){return t===Sr?Sr:i[e]?i[e](t):t}}function Dr(e,t,i,n,r,s){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===s&&(s=!1);var a=t,o=a[0],l=a.slice(1);if("string"==typeof o)Dr(e,br[o],i,n,r,s);else if(o){var d=function(e,t){var i=Tr[e.id()],n=null;if(null==i)return n=t(e),Tr[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var s=i[r],a=s[0],o=s[1];a===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}(n,o);if(!d.setSource)return r.push(d),Dr(e,l,i,n,r,s);d.setSource(Nt({},e),(function(t,a){if(t)return Dr(e,l,i,n,r,s);r.push(d),Dr(a,e.type===a.type?l:br[a.type],i,n,r,s)}))}else l.length?Dr(e,l,i,n,r,s):s?i(e,r):Dr(e,br["*"],i,n,r,!0)}var kr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Ir=function(e){void 0===e&&(e="");var t=or(e);return kr[t.toLowerCase()]||""},Rr=function e(t){if(Array.isArray(t)){var i=[];t.forEach((function(t){t=e(t),Array.isArray(t)?i=i.concat(t):Ot(t)&&i.push(t)})),t=i}else t="string"==typeof t&&t.trim()?[Nr({src:t})]:Ot(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Nr(t)]:[];return t};function Nr(e){if(!e.type){var t=Ir(e.src);t&&(e.type=t)}return e}var Or=function(e){function t(t,i,n){var r,s=Ln({createEl:!1},i);if(r=e.call(this,t,s,n)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)t.src(i.playerOptions.sources);else for(var a=0,o=i.playerOptions.techOrder;a<o.length;a++){var l=Cn(o[a]),d=_r.getTech(l);if(l||(d=Nn.getComponent(l)),d&&d.isSupported()){t.loadTech_(l);break}}return r}return h(t,e),t}(Nn);Nn.registerComponent("MediaLoader",Or);var Mr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseOver_=function(e){return n.handleMouseOver(e)},n.handleMouseOut_=function(e){return n.handleMouseOut(e)},n.handleClick_=function(e){return n.handleClick(e)},n.handleKeyDown_=function(e){return n.handleKeyDown(e)},n.emitTapEvents(),n.enable(),n}h(t,e);var i=t.prototype;return i.createEl=function(e,t,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={}),t=Nt({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&Lt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=Nt({role:"button"},i),this.tabIndex_=t.tabIndex;var n=pi(e,t,i);return n.appendChild(pi("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n},i.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},i.createControlTextEl=function(e){return this.controlTextEl_=pi("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},i.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,fi(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)},i.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},i.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},i.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},i.handleLanguagechange=function(){this.controlText(this.controlText_)},i.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.handleKeyDown=function(t){d().isEventKey(t,"Space")||d().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Nn);Nn.registerComponent("ClickableComponent",Mr);var xr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update(),n.update_=function(e){return n.update(e)},t.on("posterchange",n.update_),n}h(t,e);var i=t.prototype;return i.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},i.createEl=function(){return pi("div",{className:"vjs-poster",tabIndex:-1})},i.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},i.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},i.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||($t||Yt)&&t||this.player_.tech(!0).focus(),this.player_.paused()?qn(this.player_.play()):this.player_.pause()}},t}(Mr);Nn.registerComponent("PosterImage",xr);var Br="#222",Ur={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',
vendor: 4,683 bytes, line 2
2script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Vr(e,t){var i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Fr(e,t,i){try{e.style[t]=i}catch(e){return}}var qr=function(e){function t(t,i,n){var s;s=e.call(this,t,i,n)||this;var a=function(e){return s.updateDisplay(e)};return t.on("loadstart",(function(e){return s.toggleDisplay(e)})),t.on("texttrackchange",a),t.on("loadedmetadata",(function(e){return s.preselectTrack(e)})),t.ready(cn((0,u.A)(s),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",a),t.on("playerresize",a),r().addEventListener("orientationchange",a),t.on("dispose",(function(){return r().removeEventListener("orientationchange",a)}));for(var e=this.options_.playerOptions.tracks||[],i=0;i<e.length;i++)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}}))),s}h(t,e);var i=t.prototype;return i.preselectTrack=function(){for(var e,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage,a=0;a<r.length;a++){var o=r[a];s&&s.enabled&&s.language&&s.language===o.language&&o.kind in n?o.kind===s.kind?i=o:i||(i=o):s&&!s.enabled?(i=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in n&&!t&&(t=o):e=o)}i?i.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){"function"==typeof r().WebVTT&&r().WebVTT.processCues(r(),[],this.el_)},i.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var i=[],n=0;n<e.length;++n){var r=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var s=null,a=null,o=e.length;o--;){var l=e[o];"showing"===l.mode&&("descriptions"===l.kind?s=l:a=l)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):s&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(s))}},i.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var s=i[n];if(s){var a=s.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&Fr(a.firstChild,"color",Vr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Fr(a.firstChild,"backgroundColor",Vr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Fr(a,"backgroundColor",Vr(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Br:"raised"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Br:"depressed"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Br:"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Br)),t.fontPercent&&1!==t.fontPercent){var o=r().parseFloat(a.style.fontSize);a.style.fontSize=o*t.fontPercent+"px",a.style.height="auto",a.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Ur[t.fontFamily])}}},i.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof r().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],i=0;i<e.length;++i)for(var n=e[i],s=0;s<n.activeCues.length;++s)t.push(n.activeCues[s]);r().WebVTT.processCues(r(),t,this.el_);for(var a=0;a<e.length;++a){for(var o=e[a],l=0;l<o.activeCues.length;++l){var d=o.activeCues[l].displayState;vi(d,"vjs-text-track-cue"),vi(d,"vjs-text-track-cue-"+(o.language?o.language:a)),o.language&&Ei(d,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(Nn);Nn.registerComponent("TextTrackDisplay",qr);var jr=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),i=this.localize(t?"Audio Player":"
2Video Player"),n=pi("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}(Nn);Nn.registerComponent("LoadingSpinner",jr);var Hr=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var i=t.prototype;return i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={});var n=pi("button",t=Nt({className:this.buildCSSClass()},t),i=Nt({type:"button"},i));return n.appendChild(pi("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return Lt.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),Nn.prototype.addChild.call(this,e,t)},i.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(t){d().isEventKey(t,"Space")||d().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Mr);Nn.registerComponent("Button",Hr);var Gr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).mouseused_=!1,n.on("mousedown",(function(e){return n.handleMouseDown(e)})),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return qn(t),void(!this.player_.tech(!0)||($t||Yt)&&i||this.player_.tech(!0).focus())}var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var s=function(){return r.focus()};Fn(t)?t.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.tech(!0).focus()},i.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},i.handleMouseDown=function(e){this.mouseused_=!0},t}(Hr);Gr.prototype.controlText_="Play Video",Nn.registerComponent("BigPlayButton",Gr);var Wr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).controlText(i&&i.controlText||n.localize("Close")),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(t){d().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Hr);Nn.registerComponent("CloseButton",Wr);var Xr=function(e){function t(t,i){var n;return void 0===i&&(i={}),n=e.call(this,t,i)||this,i.replay=void 0===i.replay||i.replay,n.on(t,"play",(function(e){return n.handlePlay(e)})),n.on(t,"pause",(function(e){return n.handlePause(e)})),i.replay&&n.on(t,"ended",(function(e){return n.handleEnded(e)})),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.player_.paused()?qn(this.player_.play()):this.player_.pause()},i.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},i.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Hr);Xr.prototype.controlText_="Play",Nn.registerComponent("PlayToggle",Xr);var Kr=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),(r=r>0||a>0?r+":":"")+(n=((r||s>=10)&&n<10?"0"+n:n)+":")+(i<10?"0"+i:i)},zr=Kr;function Yr(e,t){return void 0===t&&(t=e),zr(e,t)}var Qr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,["timeupdate","ended"],(function(e){return n.updateContent(e)})),n.updateTextNode_(),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t=this.buildCSSClass(),i=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),n=pi("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return i.appendChild(n),this.contentEl_=pi("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},i.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=Yr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,Lt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=a().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},i.updateContent=function(e){},t}(Nn);Qr.prototype.labelText_="Time",Qr.prototype.controlText_="Time",Nn.registerComponent("TimeDisplay",Qr);var Jr=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(Qr);Jr.prototype.labelText_="Current Time",Jr.prototype.controlText_="Current Time",Nn.registerComponent("CurrentTimeDisplay",Jr);var $r=function(e){function t(t,i){var n,r=function(e){return n.updateContent(e)};return(n=e.call(this,t,i)||this).on(t,"durationchange",r),n.on(t,"loadstart",r),n.on(t,"loadedmetadata",r),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(Qr);$r.prototype.labelText_="Duration",$r.prototype.controlText_="Duration",Nn.registerComponent("DurationDisplay",$r);var Zr=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=e.prototype.createEl.call(this,"div"),n=e.prototype.createEl.call(this,"span",{textContent:"/"});return i.appendChild(n),t.appendChild(i),t},t}(Nn);Nn.registerComponent("TimeDivider",Zr);var es=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"durationchange",(function(e){return n.updateContent(e)})),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(pi("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},i.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(Qr);es.prototype.labelText_="Remaining Time",es.prototype.controlText_="Remaining Time",Nn.registerComponent("RemainingTimeDisplay",es);var ts=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).updateShowing(),n.on(n.player(),"durationchange",(function(e){return n.updateShowing(e)})),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=pi("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(pi("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(a().createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},i.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Nn);Nn.registerComponent("LiveDisplay",ts);var is=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&(n.updateLiveEdgeStatusHandler_=function(e){return n.updateLiveEdgeStatus(e)},n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatusHandler_)),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=pi("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},i.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Hr);is.prototype.controlText_="Seek to live, currently playing live",Nn.registerComponent("SeekToLive",is);var ns=function(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))},rs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseDown_=function(e){return n.handleMouseDown(e)},n.handleMouseUp_=function(e){return n.handleMouseUp(e)},n.handleKeyDown_=function(e){return n.handleKeyDown(e)},n.handleClick_=function(e){return n.handleClick(e)},n.handleMouseMove_=function(e){return n.handleMouseMove(e)},n.update_=function(e){return n.update(e)},n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}h(t,e);var i=t.prototype;return i.enabled=function(){return this.enabled_},i.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},i.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.createEl=function(t,i,n){return void 0===i&&(i={}),void 0===n&&(n={}),i.className=i.className+" vjs-slider",i=Nt({tabIndex:0},i),n=Nt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},i.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Qt||e.preventDefault(),wi(),this.addClass("vjs-sliding"),this.trigger("slideractive"),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,!0)},i.handleMouseMove=function(e){},i.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Pi(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},i.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var i=e.vertical()?"height":"width";e.bar.el().style[i]=(100*t).toFixed(2)+"%"}))),t}}
vendor: 15,028 bytes, line 2
2,i.getProgress=function(){return Number(ns(this.getPercent(),0,1).toFixed(4))},i.calculateDistance=function(e){var t=Di(this.el_,e);return this.vertical()?t.y:t.x},i.handleKeyDown=function(t){d().isEventKey(t,"Left")||d().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):d().isEventKey(t,"Right")||d().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){e.stopPropagation(),e.preventDefault()},i.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Nn);Nn.registerComponent("Slider",rs);var ss=function(e,t){return ns(e/t*100,0,100).toFixed(2)+"%"},as=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).partEls_=[],n.on(t,"progress",(function(e){return n.update(e)})),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=pi("span",{className:"vjs-control-text"}),n=pi("span",{textContent:this.localize("Loaded")}),r=a().createTextNode(": ");return this.percentageEl_=pi("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(i),i.appendChild(n),i.appendChild(r),i.appendChild(this.percentageEl_),t},i.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},i.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,i=t.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),s=t.partEls_,a=ss(r,n);t.percent_!==a&&(t.el_.style.width=a,fi(t.percentageEl_,a),t.percent_=a);for(var o=0;o<i.length;o++){var l=i.start(o),d=i.end(o),u=s[o];u||(u=t.el_.appendChild(pi()),s[o]=u),u.dataset.start===l&&u.dataset.end===d||(u.dataset.start=l,u.dataset.end=d,u.style.left=ss(l,r),u.style.width=ss(d-l,r))}for(var c=s.length;c>i.length;c--)t.el_.removeChild(s[c-1]);s.length=i.length}))},t}(Nn);Nn.registerComponent("LoadProgressBar",as);var os=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=hn(cn((0,u.A)(n),n.update),un),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,i){var n=Li(this.el_),r=Ci(this.player_.el()),s=e.width*t;if(r&&n){var a=e.left-r.left+s,o=e.width-s+(r.right-e.right),l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(i)}},i.write=function(e){fi(this.el_,e)},i.updateTime=function(e,t,i,n){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var s,a=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-t*o;s=(l<1?"":"-")+Yr(l,o)}else s=Yr(i,a);r.update(e,t,s),n&&n()}))},t}(Nn);Nn.registerComponent("TimeTooltip",os);var ls=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=hn(cn((0,u.A)(n),n.update),un),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(e,t){var i=this.getChild("timeTooltip");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}},t}(Nn);ls.prototype.options_={children:[]},ri||Wt||ls.prototype.options_.children.push("timeTooltip"),Nn.registerComponent("PlayProgressBar",ls);var ds=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=hn(cn((0,u.A)(n),n.update),un),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,(function(){i.el_.style.left=e.width*t+"px"}))},t}(Nn);ds.prototype.options_={children:["timeTooltip"]},Nn.registerComponent("MouseTimeDisplay",ds);var us=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).setEventHandlers_(),n}h(t,e);var i=t.prototype;return i.setEventHandlers_=function(){var e=this;this.update_=cn(this,this.update),this.update=hn(this.update_,un),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a()&&"visibilityState"in a()&&this.on(a(),"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(e){"hidden"===a().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,un))},i.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(t){var i=this;if("hidden"!==a().visibilityState){var n=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),t=i.player_.liveTracker,r=i.player_.duration();t&&t.isLive()&&(r=i.player_.liveTracker.liveCurrentTime()),i.percent_!==n&&(i.el_.setAttribute("aria-valuenow",(100*n).toFixed(2)),i.percent_=n),i.currentTime_===e&&i.duration_===r||(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[Yr(e,r),Yr(r,r)],"{1} of {2}")),i.currentTime_=e,i.duration_=r),i.bar&&i.bar.update(Ci(i.el()),i.getProgress())})),n}},i.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},i.handleMouseDown=function(t){Mi(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},i.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Mi(e)){var i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var s=r.seekableStart(),a=r.liveCurrentTime();if((i=s+n*r.liveWindow())>=a&&(i=a),i<=s&&(i=s+.1),i===1/0)return}else(i=n*this.player_.duration())===this.player_.duration()&&(i-=.1);this.userSeek_(i)}},i.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?qn(this.player_.play()):this.update_()},i.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},i.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},i.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){var i=this.player_.liveTracker;if(d().isEventKey(t,"Space")||d().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(d().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(d().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(d()(t))){t.preventDefault(),t.stopPropagation();var n=10*(d().codes[d()(t)]-d().codes[0])/100;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else d().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):d().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},i.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a()&&"visibilityState"in a()&&this.off(a(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(rs);us.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ri||Wt||us.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Nn.registerComponent("SeekBar",us);var cs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseMove=hn(cn((0,u.A)(n),n.handleMouseMove),un),n.throttledHandleMouseSeek=hn(cn((0,u.A)(n),n.handleMouseSeek),un),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.handleMouseDownHandler_=function(e){return n.handleMouseDown(e)},n.enable(),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(i||n){var r=t.el(),s=Li(r),a=Di(r,e).x;a=ns(a,0,1),n&&n.update(s,a),i&&i.update(s,t.getProgress())}}},i.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},i.enabled=function(){return this.enabled_},i.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&qn(this.player_.play())}},i.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},i.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Nn);cs.prototype.options_={children:["seekBar"]},Nn.registerComponent("ProgressControl",cs);var hs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return n.handlePictureInPictureChange(e)})),n.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return n.handlePictureInPictureEnabledChange(e)})),n.disable(),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},i.handlePictureInPictureEnabledChange=function(){a().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},i.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},i.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Hr);hs.prototype.controlText_="Picture-in-Picture",Nn.registerComponent("PictureInPictureToggle",hs);var ps=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"fullscreenchange",(function(e){return n.handleFullscreenChange(e)})),!1===a()[t.fsApi_.fullscreenEnabled]&&n.disable(),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Hr);ps.prototype.controlText_="Fullscreen",Nn.registerComponent("FullscreenToggle",ps);var fs=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(Nn);Nn.registerComponent("VolumeLevel",fs);var gs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=hn(cn((0,u.A)(n),n.update),un),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,i,n){if(!i){var r=Ci(this.el_),s=Ci(this.player_.el()),a=e.width*t;if(!s||!r)return;var o=e.left-s.left+a,l=e.width-a+(s.right-e.right),d=r.width/2;o<d?d+=d-o:l<d&&(d=l),d<0?d=0:d>r.width&&(d=r.width),this.el_.style.right="-"+d+"px"}this.write(n+"%")},i.write=function(e){fi(this.el_,e)},i.updateVolume=function(e,t,i,n,r){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){s.update(e,t,i,n.toFixed(0)),r&&r()}))},t}(Nn);
vendor: 4,314 bytes, line 2
2Nn.registerComponent("VolumeLevelTooltip",gs);var ms=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=hn(cn((0,u.A)(n),n.update),un),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t,i){var n=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,(function(){i?n.el_.style.bottom=e.height*t+"px":n.el_.style.left=e.width*t+"px"}))},t}(Nn);ms.prototype.options_={children:["volumeLevelTooltip"]},Nn.registerComponent("MouseVolumeLevelDisplay",ms);var vs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on("slideractive",(function(e){return n.updateLastVolume_(e)})),n.on(t,"volumechange",(function(e){return n.updateARIAAttributes(e)})),t.ready((function(){return n.updateARIAAttributes()})),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(t){Mi(t)&&e.prototype.handleMouseDown.call(this,t)},i.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var i=this.el(),n=Ci(i),r=this.vertical(),s=Di(i,e);s=r?s.y:s.x,s=ns(s,0,1),t.update(n,s,r)}Mi(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},i.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},i.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(rs);vs.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},ri||Wt||vs.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),vs.prototype.playerEvent="volumechange",Nn.registerComponent("VolumeBar",vs);var ys=function(e){function t(t,i){var n;return void 0===i&&(i={}),i.vertical=i.vertical||!1,(void 0===i.volumeBar||Mt(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),n=e.call(this,t,i)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.A)(n),t),n.throttledHandleMouseMove=hn(cn((0,u.A)(n),n.handleMouseMove),un),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.on("mousedown",(function(e){return n.handleMouseDown(e)})),n.on("touchstart",(function(e){return n.handleMouseDown(e)})),n.on("mousemove",(function(e){return n.handleMouseMove(e)})),n.on(n.volumeBar,["focus","slideractive"],(function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")})),n.on(n.volumeBar,["blur","sliderinactive"],(function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")})),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Nn);ys.prototype.options_={children:["volumeBar"]}
vendor: 27,620 bytes, line 2
2,Nn.registerComponent("VolumeControl",ys);var _s=function(e){function t(t,i){var n;return n=e.call(this,t,i)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.A)(n),t),n.on(t,["loadstart","volumechange"],(function(e){return n.update(e)})),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.update=function(e){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){var e=this.player_.volume(),t=3;ri&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)yi(this.el_,"vjs-vol-"+i);vi(this.el_,"vjs-vol-"+t)},i.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Hr);_s.prototype.controlText_="Mute",Nn.registerComponent("MuteToggle",_s);var bs=function(e){function t(t,i){var n;return void 0===i&&(i={}),void 0!==i.inline?i.inline=i.inline:i.inline=!0,(void 0===i.volumeControl||Mt(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),(n=e.call(this,t,i)||this).handleKeyPressHandler_=function(e){return n.handleKeyPress(e)},n.on(t,["loadstart"],(function(e){return n.volumePanelState_(e)})),n.on(n.muteToggle,"keyup",(function(e){return n.handleKeyPress(e)})),n.on(n.volumeControl,"keyup",(function(e){return n.handleVolumeControlKeyUp(e)})),n.on("keydown",(function(e){return n.handleKeyPress(e)})),n.on("mouseover",(function(e){return n.handleMouseOver(e)})),n.on("mouseout",(function(e){return n.handleMouseOut(e)})),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}h(t,e);var i=t.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},i.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(e){d().isEventKey(e,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(e){this.addClass("vjs-hover"),nn(a(),"keyup",this.handleKeyPressHandler_)},i.handleMouseOut=function(e){this.removeClass("vjs-hover"),rn(a(),"keyup",this.handleKeyPressHandler_)},i.handleKeyPress=function(e){d().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Nn);bs.prototype.options_={children:["muteToggle","volumeControl"]},Nn.registerComponent("VolumePanel",bs);var Ts=function(e){function t(t,i){var n;return n=e.call(this,t,i)||this,i&&(n.menuButton_=i.menuButton),n.focusedChild_=-1,n.on("keydown",(function(e){return n.handleKeyDown(e)})),n.boundHandleBlur_=function(e){return n.handleBlur(e)},n.boundHandleTapClick_=function(e){return n.handleTapClick(e)},n}h(t,e);var i=t.prototype;return i.addEventListenerForItem=function(e){e instanceof Nn&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(e){e instanceof Nn&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},i.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},i.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=pi(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),nn(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},i.handleBlur=function(e){var t=e.relatedTarget||a().activeElement;if(!this.children().some((function(e){return e.el()===t}))){var i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},i.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var i=t.filter((function(t){return t.el()===e.target}))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},i.handleKeyDown=function(e){d().isEventKey(e,"Left")||d().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(d().isEventKey(e,"Right")||d().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},i.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},i.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},i.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Nn);Nn.registerComponent("Menu",Ts);var Ss=function(e){function t(t,i){var n;void 0===i&&(i={}),(n=e.call(this,t,i)||this).menuButton_=new Hr(t,i),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Hr.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0;var s=function(e){return n.handleClick(e)};return n.handleMenuKeyUp_=function(e){return n.handleMenuKeyUp(e)},n.on(n.menuButton_,"tap",s),n.on(n.menuButton_,"click",s),n.on(n.menuButton_,"keydown",(function(e){return n.handleKeyDown(e)})),n.on(n.menuButton_,"mouseenter",(function(){n.addClass("vjs-hover"),n.menu.show(),nn(a(),"keyup",n.handleMenuKeyUp_)})),n.on("mouseleave",(function(e){return n.handleMouseLeave(e)})),n.on("keydown",(function(e){return n.handleSubmenuKeyDown(e)})),n}h(t,e);var i=t.prototype;return i.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},i.createMenu=function(){var e=new Ts(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=pi("li",{className:"vjs-menu-title",textContent:Cn(this.options_.title),tabIndex:-1}),i=new Nn(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},i.createItems=function(){},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Hr.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},i.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},i.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},i.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(e){this.removeClass("vjs-hover"),rn(a(),"keyup",this.handleMenuKeyUp_)},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(e){d().isEventKey(e,"Esc")||d().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),d().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(d().isEventKey(e,"Up")||d().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(e){(d().isEventKey(e,"Esc")||d().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},i.handleSubmenuKeyDown=function(e){(d().isEventKey(e,"Esc")||d().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),d().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ri&&ci())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Nn);Nn.registerComponent("MenuButton",Ss);var Es=function(e){function t(t,i){var n,r=i.tracks;if((n=e.call(this,t,i)||this).items.length<=1&&n.hide(),!r)return(0,u.A)(n);var s=cn((0,u.A)(n),n.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),r.addEventListener("labelchange",s),n.player_.on("ready",s),n.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s),r.removeEventListener("labelchange",s)})),n}return h(t,e),t}(Ss);Nn.registerComponent("TrackButton",Es);var As=["Tab","Esc","Up","Down","Right","Left"],ws=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).selectable=i.selectable,n.isSelected_=i.selected||!1,n.multiSelectable=i.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}h(t,e);var i=t.prototype;return i.createEl=function(t,i,n){this.nonIconControl=!0;var r=e.prototype.createEl.call(this,"li",Nt({className:"vjs-menu-item",tabIndex:-1},i),n);return r.replaceChild(pi("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r},i.handleKeyDown=function(t){As.some((function(e){return d().isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){this.selected(!0)},i.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Mr);Nn.registerComponent("MenuItem",ws);var Ps=function(e){function t(t,i){var n,s=i.track,o=t.textTracks();i.label=s.label||s.language||"Unknown",i.selected="showing"===s.mode,(n=e.call(this,t,i)||this).track=s,n.kinds=(i.kinds||[i.kind||n.track.kind]).filter(Boolean);var l,d=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply((0,u.A)(n),t)},c=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply((0,u.A)(n),t)};return t.on(["loadstart","texttrackchange"],d),o.addEventListener("change",d),o.addEventListener("selectedlanguagechange",c),n.on("dispose",(function(){t.off(["loadstart","texttrackchange"],d),o.removeEventListener("change",d),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange&&n.on(["tap","click"],(function(){if("object"!=typeof r().Event)try{l=new(r().Event)("change")}catch(e){}l||(l=a().createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)})),n.handleTracksChange(),n}h(t,e);var i=t.prototype;return i.handleClick=function(t){var i=this.track,n=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),n)for(var r=0;r<n.length;r++){var s=n[r];-1!==this.kinds.indexOf(s.kind)&&(s===i?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled"))}},i.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(ws);Nn.registerComponent("TextTrackMenuItem",Ps);var Cs=function(e){function t(t,i){return i.track={player:t,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,e.call(this,t,i)||this}h(t,e);var i=t.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var s=t[n];if(this.options_.kinds.indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},i.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var s=t[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ps);Nn.registerComponent("OffTextTrackMenuItem",Cs);var Ls=function(e){function t(t,i){return void 0===i&&(i={}),i.tracks=t.textTracks(),e.call(this,t,i)||this}return h(t,e),t.prototype.createItems=function(e,t){var i;void 0===e&&(e=[]),void 0===t&&(t=Ps),this.label_&&(i=this.label_+" off"),e.push(new Cs(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var s=n[r];if(this.kinds_.indexOf(s.kind)>-1){var a=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+s.kind+"-menu-item"),e.push(a)}}return e},t}(Es);Nn.registerComponent("TextTrackButton",Ls);var Ds=function(e){function t(t,i){var n,r=i.track,s=i.cue,a=t.currentTime();return i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,(n=e.call(this,t,i)||this).track=r,n.cue=s,r.addEventListener("cuechange",cn((0,u.A)(n),n.update)),n}h(t,e);var i=t.prototype;return i.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},i.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(ws);Nn.registerComponent("ChaptersTrackMenuItem",Ds);var ks=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},i.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},i.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},i.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Cn(this.kind_))},i.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},i.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],s=new Ds(this.player_,{track:this.track_,cue:r});e.push(s)}return e},t}(Ls);ks.prototype.kind_="chapters",ks.prototype.controlText_="Chapters",Nn.registerComponent("ChaptersButton",ks);var Is=function(e){function t(t,i,n){var r;r=e.call(this,t,i,n)||this;var s=t.textTracks(),a=cn((0,u.A)(r),r.handleTracksChange);return s.addEventListener("change",a),r.on("dispose",(function(){s.removeEventListener("change",a)})),r}h(t,e);var i=t.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var s=t[n];if(s.kind!==this.kind_&&"showing"===s.mode){i=!0;break}}i?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Ls);Is.prototype.kind_="descriptions",Is.prototype.controlText_="Descriptions",Nn.registerComponent("DescriptionsButton",Is);var Rs=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Ls);Rs.prototype.kind_="subtitles",Rs.prototype.controlText_="Subtitles",Nn.registerComponent("SubtitlesButton",Rs);var Ns=function(e){function t(t,i){var n;return i.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",(n=e.call(this,t,i)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+i.kind+" settings dialog"),n}return h(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ps);Nn.registerComponent("CaptionSettingsMenuItem",Ns);var Os=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ns(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Ls);Os.prototype.kind_="captions",Os.prototype.controlText_="Captions",Nn.registerComponent("CaptionsButton",Os);var Ms=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),s=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(s.appendChild(pi("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(pi("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r},t}(Ps);Nn.registerComponent("SubsCapsMenuItem",Ms);var xs=function(e){function t(t,i){var n;return void 0===i&&(i={}),(n=e.call(this,t,i)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions"),n.menuButton_.controlText(Cn(n.label_)),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ns(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,Ms)},t}(Ls);xs.prototype.kinds_=["captions","subtitles"],xs.prototype.controlText_="Subtitles",Nn.registerComponent("SubsCapsButton",xs);var Bs=function(e){function t(t,i){var n,r=i.track,s=t.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,(n=e.call(this,t,i)||this).track=r,n.addClass("vjs-"+r.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply((0,u.A)(n),t)};return s.addEventListener("change",a),n.on("dispose",(function(){s.removeEventListener("change",a)})),n}h(t,e);var i=t.prototype;return i.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),s=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(s.appendChild(pi("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(pi("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r},i.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var i=this.player_.audioTracks(),n=0;n<i.length;n++){var r=i[n];r!==this.track&&(r.enabled=r===this.track)}},i.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(ws);Nn.registerComponent("AudioTrackMenuItem",Bs);var Us=function(e){function t(t,i){return void 0===i&&(i={}),i.tracks=t.audioTracks(),e.call(this,t,i)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new Bs(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},t}(Es);Us.prototype.controlText_="Audio Track",Nn.registerComponent("AudioTrackButton",Us);var Vs=function(e){function t(t,i){var n,r=i.rate,s=parseFloat(r,10);return i.label=r,i.selected=s===t.playbackRate(),i.selectable=!0,i.multiSelectable=!1,(n=e.call(this,t,i)||this).label=r,n.rate=s,n.on(t,"ratechange",(function(e){return n.update(e)})),n}h(t,e);var i=t.prototype;return i.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(ws);Vs.prototype.contentElType="button",Nn.registerComponent("PlaybackRateMenuItem",Vs);var Fs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).menuButton_.el_.setAttribute("aria-describedby",n.labelElId_),n.updateVisibility(),n.updateLabel(),n.on(t,"loadstart",(function(e){return n.updateVisibility(e)})),n.on(t,"ratechange",(function(e){return n.updateLabel(e)})),n.on(t,"playbackrateschange",(function(e){return n.handlePlaybackRateschange(e)})),n}h(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=pi("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},i.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){for(var e=this.playbackRates(),t=[],i=e.length-1;i>=0;i--)t.push(new Vs(this.player(),{rate:e[i]+"x"}));return t},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(e){var t=this.player().playbackRate(),i=this.playbackRates(),n=(i.indexOf(t)+1)%i.length;this.player().playbackRate(i[n])},i.handlePlaybackRateschange=function(e){this.update()},i.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Ss);Fs.prototype.controlText_="Playback Rate",Nn.registerComponent("PlaybackRateMenuButton",Fs);var qs=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(t,i,n){return void 0===t&&(t="div"),void 0===i&&(i={}),void 0===n&&(n={}),i.className||(i.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,i,n)},t}(Nn);Nn.registerComponent("Spacer",qs);var js=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(qs);Nn.registerComponent("CustomControlSpacer",js);var Hs=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Nn);Hs.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a()&&Hs.prototype.options_.children.splice(Hs.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Nn.registerComponent("ControlBar",Hs);var Gs=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"error",(function(e){return n.open(e)})),n}h(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},i.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Gn);Gs.prototype.options_=o({},Gn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Nn.registerComponent("ErrorDisplay",Gs);var Ws="vjs-text-track-settings",Xs=["#000","Black"],Ks=["#00F","Blue"],zs=["#0FF","Cyan"],Ys=["#0F0","Green"],Qs=["#F0F","Magenta"],Js=["#F00","Red"],$s=["#FFF","White"],Zs=["#FF0","Yellow"],ea=["1","Opaque"],ta=["0.5","Semi-Transparent"],ia=["0","Transparent"],na={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Xs,$s,Js,Ys,Ks,Zs,Qs,zs]},backgroundOpacity:{selector:".vjs-bg-opacity >
2 select",id:"captions-background-opacity-%s",label:"Transparency",options:[ea,ta,ia]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[$s,Xs,Js,Ys,Ks,Zs,Qs,zs]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ea,ta]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[ia,ta,ea]}};function ra(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}na.windowColor.options=na.backgroundColor.options;var sa=function(e){function t(t,i){var n;return i.temporary=!1,(n=e.call(this,t,i)||this).updateDisplay=n.updateDisplay.bind((0,u.A)(n)),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=pi("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===i.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",(function(){n.saveSettings(),n.close()})),n.on(n.$(".vjs-default-button"),"click",(function(){n.setDefaults(),n.updateDisplay()})),Rt(na,(function(e){n.on(n.$(e.selector),"change",n.updateDisplay)})),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}h(t,e);var i=t.prototype;return i.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},i.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="label");var r=na[e],s=r.id.replace("%s",this.id_),a=[t,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+a+'">'].concat(r.options.map((function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',n.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},i.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return pi("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return pi("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.createElControls_=function(){var e=this.localize("restore all settings to the default values");return pi("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var e,t,i,n=this;
vendor: 24,163 bytes, line 2
2return t=function(e,t,i){var r,s,a=(r=n.$(t.selector),s=t.parser,ra(r.options[r.options.selectedIndex].value,s));return void 0!==a&&(e[i]=a),e},void 0===(i={})&&(i=0),It(e=na).reduce((function(i,n){return t(i,e[n],n)}),i)},i.setValues=function(e){var t=this;Rt(na,(function(i,n){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(ra(e.options[n].value,i)===t){e.selectedIndex=n;break}}(t.$(i.selector),e[n],i.parser)}))},i.setDefaults=function(){var e=this;Rt(na,(function(t){var i=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=i}))},i.restoreSettings=function(){var e;try{e=JSON.parse(r().localStorage.getItem(Ws))}catch(e){Lt.warn(e)}e&&this.setValues(e)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?r().localStorage.setItem(Ws,JSON.stringify(e)):r().localStorage.removeItem(Ws)}catch(e){Lt.warn(e)}}},i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},t}(Gn);Nn.registerComponent("TextTrackSettings",sa);var aa=function(e){function t(t,i){var n,s=i.ResizeObserver||r().ResizeObserver;null===i.ResizeObserver&&(s=!1);var a=Ln({createEl:!s,reportTouchActivity:!1},i);return(n=e.call(this,t,a)||this).ResizeObserver=i.ResizeObserver||r().ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=function(e,t,i,n){var s;void 0===n&&(n=r());var a=function(){var t=this,i=arguments,r=function(){s=null,r=null,e.apply(t,i)};n.clearTimeout(s),s=n.setTimeout(r,100)};return a.cancel=function(){n.clearTimeout(s),s=null},a}((function(){n.resizeHandler()}),0,0,(0,u.A)(n)),s?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(t.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var e=n.debouncedHandler_,t=n.unloadListener_=function(){rn(this,"resize",e),rn(this,"unload",t),t=null};nn(n.el_.contentWindow,"unload",t),nn(n.el_.contentWindow,"resize",e)}},n.one("load",n.loadListener_)),n}h(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(Nn);Nn.registerComponent("ResizeManager",aa);var oa={trackingThreshold:20,liveTolerance:15},la=function(e){function t(t,i){var n,r=Ln(oa,i,{createEl:!1});return(n=e.call(this,t,r)||this).handleVisibilityChange_=function(e){return n.handleVisibilityChange(e)},n.trackLiveHandler_=function(){return n.trackLive_()},n.handlePlay_=function(e){return n.handlePlay(e)},n.handleFirstTimeupdate_=function(e){return n.handleFirstTimeupdate(e)},n.handleSeeked_=function(e){return n.handleSeeked(e)},n.seekToLiveEdge_=function(e){return n.seekToLiveEdge(e)},n.reset_(),n.on(n.player_,"durationchange",(function(e){return n.handleDurationchange(e)})),n.on(n.player_,"canplay",(function(){return n.toggleTracking()})),$t&&"hidden"in a()&&"visibilityState"in a()&&n.on(a(),"visibilitychange",n.handleVisibilityChange_),n}h(t,e);var i=t.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(a().hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(r().performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;var n=this.liveCurrentTime(),s=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-s)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.toggleTracking()},i.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,un),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},i.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},i.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},i.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},i.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0},i.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return"number"==typeof this.trackingInterval_},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(a(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Nn);Nn.registerComponent("LiveTracker",la);var da,ua=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var i=e.$$("source"),n=[],r="";if(!i.length)return!1;for(var s=0;s<i.length;s++){var a=i[s].src;a&&-1===n.indexOf(a)&&n.push(a)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},ca=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=a().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=a().createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",r().Element.prototype.appendChild.call(this,i),this.innerHTML}}),ha=function(e,t){for(var i={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i},pa=function(e){var t=e.el();if(!t.resetSourceWatch_){var i={},n=function(e){return ha([e.el(),r().HTMLMediaElement.prototype,r().Element.prototype,ca],"innerHTML")}(e),s=function(i){return function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=i.apply(t,r);return ua(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(i[e]=t[e],t[e]=s(i[e]))})),Object.defineProperty(t,"innerHTML",Ln(n,{set:s(n.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(i).forEach((function(e){t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)}},fa=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?ar(r().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return r().Element.prototype.setAttribute.call(this,"src",e),e}}),ga=function(e,t,i,n){void 0===n&&(n=!0);var r=function(i){return Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0})},s={configurable:!0,enumerable:!0,get:function(){var e=i();return r(e),e}};return n&&(s.set=r),Object.defineProperty(e,t,s)},ma=function(e){function t(t,i){var n;n=e.call(this,t,i)||this;var r=t.source,s=!1;if(r&&(n.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),t.enableSourceset&&n.setupSourcesetHandling_(),n.isScrubbing_=!1,n.el_.hasChildNodes()){for(var a=n.el_.childNodes,o=a.length,l=[];o--;){var d=a[o];"track"===d.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(d),n.remoteTextTracks().addTrack(d.track),n.textTracks().addTrack(d.track),s||n.el_.hasAttribute("crossorigin")||!lr(d.src)||(s=!0)):l.push(d))}for(var u=0;u<l.length;u++)n.el_.removeChild(l[u])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&s&&Lt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),n.restoreMetadataTracksInIOSNativePlayer_(),(ti||ni||Kt)&&!0===t.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}h(t,e);var i=t.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){!function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var i=function(e){return ha([e.el(),r().HTMLMediaElement.prototype,fa],"src")}(e),n=t.setAttribute,s=t.load;Object.defineProperty(t,"src",Ln(i,{set:function(n){var r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(i,r){var s=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),s},t.load=function(){var i=s.call(t);return ua(e)||(e.triggerSourceset(""),pa(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):ua(e)||pa(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=s,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}}}(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),i=function(){e=[];for(var i=0;i<t.length;i++){var n=t[i];"metadata"===n.kind&&e.push({track:n,storedMode:n.mode})}};i(),t.addEventListener("change",i),this.on("dispose",(function(){return t.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<e.length;n++){var r=e[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",i),t.removeEventListener("change",n),t.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",i),t.addEventListener("change",i),t.removeEventListener("change",n)}))},i.overrideNative_=function(e,t){var i=this;if(t===this["featuresNative"+e+"Tracks"]){var n=e.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach((function(e){i.el()[n+"Tracks"].removeEventListener(e,i[n+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},i.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},i.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},i.proxyNativeTracksForType_=function(e){var t=this,i=mr[e],n=this.el()[i.getterName],r=this[i.getterName]();if(this["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var s={change:function(i){var n={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(n),"text"===e&&t[vr.remoteText.getterName]().trigger(n)},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<r.length;t++){for(var i=!1,s=0;s<n.length;s++)if(n[s]===r[t]){i=!0;break}i||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[i.getterName+"Listeners_"]=s,Object.keys(s).forEach((function(e){var i=s[e];n.addEventListener(e,i),t.on("dispose",(function(t){return n.removeEventListener(e,i)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},i.proxyNativeTracks_=function(){var e=this;mr.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},i.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=a().createElement("video");var n=Ln({},this.options_.tag&&Ti(this.options_.tag));ti&&!0===this.options_.nativeControlsForTouch||delete n.controls,bi(e,Nt(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Ei(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],s=0;s<r.length;s++){var o=r[s],l=this.options_[o];void 0!==l&&(l?Ei(e,o,o):Ai(e,o),e[o]=l)}return e},i.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},i.setScrubbing=function(e){this.isScrubbing_=e},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&si?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Lt(e,"Video is not ready. (Video.js)")}},i.duration=function(){var e=this;return this.el_.duration===1/0&&Wt&&Qt&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):this.el_.duration||NaN},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)}))}},i.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=r().navigator&&r().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},i.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)qn(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},i.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},i.reset=function(){t.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(e){this.el_.controls=!!e},i.addTextTrack=function(t,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},i.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var i=a().createElement("track");return t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t.default&&(i.default=t.default),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},i.addRemoteTextTrack=function(t,i){var n=e.prototype.addRemoteTextTrack.call(this,t,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},i.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var i=this.$$("track"),n=i.length;n--;)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])},i.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r().performance&&"function"==typeof r().performance.now?e.creationTime=r().performance.now():r().performance&&r().performance.timing&&"number"==typeof r().performance.timing.navigationStart&&(e.creationTime=r().Date.now()-r().performance.timing.navigationStart),e},t}(_r);ga(ma,"TEST_VID",(function(){if(di()){var e=a().createElement("video"),t=a().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),ma.isSupported=function(){try{ma.TEST_VID.volume=.5}catch(e){return!1}return!(!ma.TEST_VID||!ma.TEST_VID.canPlayType)},ma.canPlayType=function(e){return ma.TEST_VID.canPlayType(e)},ma.canPlaySource=function(e,t){return ma.canPlayType(e.type)},ma.canControlVolume=function(){try{var e=ma.TEST_VID.volume;ma.TEST_VID.volume=e/2+.1;var t=e!==ma.TEST_VID.volume;return t&&ri?(r().setTimeout((function(){ma&&ma.prototype&&(ma.prototype.featuresVolumeControl=e!==ma.TEST_VID.volume)})),!1):t}catch(e){return!1}},ma.canMuteVolume=function(){try{var e=ma.TEST_VID.muted;return ma.TEST_VID.muted=!e,ma.TEST_VID.muted?Ei(ma.TEST_VID,"muted","muted"):Ai(ma.TEST_VID,"muted"),e!==ma.TEST_VID.muted}catch(e){return!1}},ma.canControlPlaybackRate=function(){if(Wt&&Qt&&Jt<58)return!1;try{var e=ma.TEST_VID.playbackRate;return ma.TEST_VID.playbackRate=e/2+.1,e!==ma.TEST_VID.playbackRate}catch(e){return!1}},ma.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(a().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},ma.supportsNativeTextTracks=function(){return si||ri&&Qt},ma.supportsNativeVideoTracks=function(){return!(!ma.TEST_VID||!ma.TEST_VID.videoTracks)},ma.supportsNativeAudioTracks=function(){return!(!ma.TEST_VID||!ma.TEST_VID.audioTracks)},ma.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],i=e[1];ga(ma.prototype,t,(function(){return ma[i]()}),!0)})),ma.prototype.featuresVolumeControl=ma.canControlVolume(),ma.prototype.movingMediaElementInDOM=!ri,ma.prototype.featuresFullscreenResize=!0,ma.prototype.featuresProgressEvents=!0,ma.prototype.featuresTimeupdateEvents=!0,ma.patchCanPlayType=function(){Xt>=4&&!zt&&!Qt&&(da=ma.TEST_VID&&ma.TEST_VID.constructor.prototype.canPlayType,ma.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":da.call(this,e)})},ma.unpatchCanPlayType=function(){var e=ma.TEST_VID.constructor.prototype.canPlayType;return da&&(ma.TEST_VID.constructor.prototype.canPlayType=da),e},ma.patchCanPlayType(),ma.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},ma.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){ma.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){ma.prototype["set"+Cn(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){ma.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){ma.prototype["set"+Cn(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){ma.prototype[e]=function(){return this.el_[e]()}})),_r.withSourceHandlers(ma),ma.nativeSourceHandler={},ma.nativeSourceHandler.canPlayType=function(e){try{return ma.TEST_VID.canPlayType(e)}catch(e){return""}},ma.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return ma.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=or(e.src);return ma.nativeSourceHandler.canPlayType("video/"+i)}return""},ma.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},ma.nativeSourceHandler.dispose=function(){},ma.registerSourceHandler(ma.nativeSourceHandler),_r.registerTech("Html5",ma);var va=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ya={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},_a=["tiny","xsmall","small","medium","large","xlarge","huge"],ba={};_a.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;ba[e]="vjs-layout-"+t}));var Ta={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Sa=function(e){function t(i,n,r){var s;if(i.id=i.id||n.id||"vjs_video_"+zi(),(n=Nt(t.getTagSettings(i),n)
vendor: 4,208 bytes, line 2
2).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof i.closest){var o=i.closest("[lang]");o&&o.getAttribute&&(n.language=o.getAttribute("lang"))}else for(var l=i;l&&1===l.nodeType;){if(Ti(l).hasOwnProperty("lang")){n.language=l.getAttribute("lang");break}l=l.parentNode}if((s=e.call(this,null,n,r)||this).boundDocumentFullscreenChange_=function(e){return s.documentFullscreenChange_(e)},s.boundFullWindowOnEscKey_=function(e){return s.fullWindowOnEscKey(e)},s.boundUpdateStyleEl_=function(e){return s.updateStyleEl_(e)},s.boundApplyInitTime_=function(e){return s.applyInitTime_(e)},s.boundUpdateCurrentBreakpoint_=function(e){return s.updateCurrentBreakpoint_(e)},s.boundHandleTechClick_=function(e){return s.handleTechClick_(e)},s.boundHandleTechDoubleClick_=function(e){return s.handleTechDoubleClick_(e)},s.boundHandleTechTouchStart_=function(e){return s.handleTechTouchStart_(e)},s.boundHandleTechTouchMove_=function(e){return s.handleTechTouchMove_(e)},s.boundHandleTechTouchEnd_=function(e){return s.handleTechTouchEnd_(e)},s.boundHandleTechTap_=function(e){return s.handleTechTap_(e)},s.isFullscreen_=!1,s.log=Dt(s.id_),s.fsApi_=St,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=i,s.tagAttributes=i&&Ti(i),s.language(s.options_.language),n.languages){var d={};Object.getOwnPropertyNames(n.languages).forEach((function(e){d[e.toLowerCase()]=n.languages[e]})),s.languages_=d}else s.languages_=t.prototype.options_.languages;s.resetCache_(),s.poster_=n.poster||"",s.controls_=!!n.controls,i.controls=!1,i.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],i.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach((function(e){if("function"!=typeof s[e])throw new Error('plugin "'+e+'" does not exist')})),s.scrubbing_=!1,s.el_=s.createEl(),En((0,u.A)(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(nn(a(),s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var c=Ln(s.options_);n.plugins&&Object.keys(n.plugins).forEach((function(e){s[e](n.plugins[e])})),n.debug&&s.debug(!0),s.options_.playerOptions=c,s.middleware_=[],s.playbackRates(n.playbackRates),s.initChildren(),s.isAudio("audio"===i.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),ti&&s.addClass("vjs-touch-enabled"),ri||s.addClass("vjs-workinghover"),t.players[s.id_]=(0,u.A)(s);var h=yt.split(".")[0];return s.addClass("vjs-v"+h),s.userActive(!0),s.reportUserActivity(),s.one("play",(function(e){return s.listenForUserActivity_(e)})),s.on("stageclick",(function(e){return s.handleStageClick_(e)})),s.on("keydown",(function(e){return s.handleKeyDown(e)})),s.on("languagechange",(function(e){return s.handleLanguagechange(e)})),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s}h(t,e);var i=t.prototype;return i.dispose=function(){var i=this;this.trigger("dispose"),this.off("dispose"),rn(a(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),rn(a(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Tr[this.id()]=null,yr.names.forEac
vendor: 4,152 bytes, line 2
2h((function(e){var t=yr[e],n=i[t.getterName]();n&&n.off&&n.off()})),e.prototype.dispose.call(this)},i.createEl=function(){var t,i=this.tag,n=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();n?t=this.el_=i.parentNode:s||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=Ti(i);if(s){for(t=this.el_=i,i=this.tag=a().createElement("video");t.children.length;)i.appendChild(t.firstChild);mi(t,"video-js")||vi(t,"video-js"),t.appendChild(i),n=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{i[e]=t[e]}catch(e){}}))}if(i.setAttribute("tabindex","-1"),o.tabindex="-1",($t||Qt&&ei)&&(i.setAttribute("role","application"),o.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){s&&"class"===e||t.setAttribute(e,o[e]),s&&i.setAttribute(e,o[e])})),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=t.player=this,this.addClass("vjs-paused"),!0!==r().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Wi("vjs-styles-dimensions");var l=Bi(".vjs-styles-defaults"),d=Bi("head");d.insertBefore(this.styleEl_,l?l.nextSibling:d.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var u=i.getElementsByTagName("a"),c=0;c<u.length;c++){var h=u.item(c);vi(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!n&&i.parentNode.insertBefore(t,i),gi(i,t),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},i.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):Lt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},i.width=function(e){return this.dimension("width",e)},i.height=function(e){return this.dimension("height",e)},i.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?Lt.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},i.fluid=function(e){var t,i,n=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,gn(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),i=function(){n.on(["playerreset","resize"],n.boundUpdateStyleEl_)},gn(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(!0!==r().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),s=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),Xi(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*s+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),o>
vendor: 4,392 bytes, line 2
2=0&&(l.height=o))}},i.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=Cn(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(_r.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);var a={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};yr.names.forEach((function(e){var t=yr[e];a[t.getterName]=i[t.privateName]})),Nt(a,this.options_[n]),Nt(a,this.options_[r]),Nt(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o,l,d=_r.getTech(e);if(!d)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new d(a),this.tech_.ready(cn(this,this.handleTechReady_),!0),o=this.textTracksJson_||[],l=this.tech_,o.forEach((function(e){var t=l.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return t.addCue(e)}))})),l.textTracks(),va.forEach((function(e){i.on(i.tech_,e,(function(t){return i["handleTech"+Cn(e)+"_"](t)}))})),Object.keys(ya).forEach((function(e){i.on(i.tech_,e,(function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+ya[e]+"_"].bind(i),event:t}):i["handleTech"+ya[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return i.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return i.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return i.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return i.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return i.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return i.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return i.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return i.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return i.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return i.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return i.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return i.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return i.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return i.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return i.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return i.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return i.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||gi(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var e,t,i,n=this;yr.names.forEach((function(e){var t=yr[e];n[t.privateName]=n[t.getterName]()})),this.textTracksJson_=(e=this.tech_,t=e.$$("track"),i=Array.prototype.map.call(t,(function(e){return e.track})),Array.prototype.map.call(t,(function(e){var t=jn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(jn))),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(e){return void 0===e&&Lt.warn("Using the tech directly can be dangerous. I hope you know 
2what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},i.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},i.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},i.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var i,n=function(){var e=t.muted();t.muted(!0);var i=function(){t.muted(e)};t.playTerminatedQueue_.push(i);var n=t.play();if(Fn(n))return n.catch((function(e){throw i(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():n():Fn(i=this.play())&&(i=i.catch(n)),Fn(i))return i.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},i.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r<n.length;r++){var s=n[r];if(s.type&&s.src&&s.src===t)return s.type}return Ir(t)}(this,t)),this.cache_.source=Ln({},e,{src:t,type:i});for(var n=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],s=this.$$("source"),a=[],o=0;o<s.length;o++){var l=Ti(s[o]);r.push(l),l.src&&l.src===t&&a.push(l.src)}a.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},i.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var i=function(e){return t.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var i=t.techGet("currentSrc");t.lastSource_.tech=i,t.updateSourceCaches_(i)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},i.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function i(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",i))}))},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(Lt.warn("Passing the `starttime` option to the player will be deprecated 
2in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?qn(this.play()):this.pause()))},i.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var i=this.el(),n=a()[this.fsApi_.fullscreenElement]===i;!n&&i.matches?n=i.matches(":"+this.fsApi_.fullscreen):!n&&i.msMatchesSelector&&(n=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},i.handleTechFullscreenChange_=function(e,t){var i=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){i.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},i.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var e=this.tech_.error();this.error(e)},i.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},i.getCache=function(){return this.cache_},i.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},i.techCall_=function(e,t){this.ready((function(){if(e in Pr)return function(e,t,i,n){return t[i](e.reduce(Lr(i),n))}(this.middleware_,this.tech_,e,t);if(e in Cr)return Ar(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Lt(e),e}}),!0)},i.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in wr)return function(e,t,i){return e.reduceRight(Lr(i),t[i]())}(this.middleware_,this.tech_,e);if(e in Cr)return Ar(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Lt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Lt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Lt(t),t}}},i.play=function(){var e=this,t=this.options_.Promise||r().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},i.play_=function(e){var t=this;void 0===e&&(e=qn),this.playCallbacks_.push(e);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(i||!si&&!ri||this.load());var n=this.techGet_("play");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},i.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}
vendor: 7,989 bytes, line 2
2))},i.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},i.pause=function(){this.techCall_("pause")},i.paused=function(){return!1!==this.techGet_("paused")},i.played=function(){return this.techGet_("played")||xn(0,0)},i.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=xn(0,0)),e},i.bufferedPercent=function(){return Bn(this.buffered(),this.duration())},i.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return i>t&&(i=t),i},i.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},i.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},i.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},i.requestFullscreen=function(e){var t=this.options_.Promise||r().Promise;if(t){var i=this;return new t((function(t,n){function r(){i.off("fullscreenerror",a),i.off("fullscreenchange",s)}function s(){r(),t()}function a(e,t){r(),n(t)}i.one("fullscreenchange",s),i.one("fullscreenerror",a);var o=i.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(t,n))}))}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(e){var t,i=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](t);return n&&n.then((function(){return i.isFullscreen(!0)}),(function(){return i.isFullscreen(!1)})),n}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var e=this.options_.Promise||r().Promise;if(e){var t=this;return new e((function(e,i){function n(){t.off("fullscreenerror",s),t.off("fullscreenchange",r)}function r(){n(),e()}function s(e,t){n(),i(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",s);var a=t.exitFullscreenHelper_();a&&(a.then(n,n),a.then(e,i))}))}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=a()[this.fsApi_.exitFullscreen]();return t&&qn(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a().documentElement.style.overflow,nn(a(),"keydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow="hidden",vi(a().body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(e){d().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,rn(a(),"keydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow=this.docOrigOverflow,yi(a().body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"in a()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"in a())return a().exitPictureInPicture()},i.handleKeyDown=function(e){var t,i,n=this.options_.userActions;n&&n.hotkeys&&(t=this.el_.ownerDocument.activeElement,i=t.tagName.toLowerCase(),t.isContentEditable||("input"===i?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(i))||("function"==typeof n.hotkeys?n.hotkeys.call(this,e):this.handleHotkeys(e)))},i.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void 0===i?function(e){return d().isEventKey(e,"f")}:i,r=t.muteKey,s=void 0===r?function(e){return d().isEventKey(e,"m")}:r,o=t.playPauseKey,l=void 0===o?function(e){return d().isEventKey(e,"k")||d().isEventKey(e,"Space")}:o;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();var u=Nn.getComponent("FullscreenToggle");!1!==a()[this.fsApi_.fullscreenEnabled]&&u.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),Nn.getComponent("MuteToggle").prototype.handleClick.call(this,e)):l.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Nn.getComponent("PlayToggle").prototype.handleClick.call(this,e))},i.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],s=_r.getTech(r);if(s||(s=Nn.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e)))return t}else Lt.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},i.selectSource=function(e){var t,i,n=this,r=this.options_.techOrder.map((function(e){return[e,_r.getTech(e)]})).filter((function(e){var t=e[0],i=e[1];return i?i.isSupported():(Lt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),s=function(e,t,i){var n;return e.some((function(e){return t.some((function(t){if(n=i(e,t))return!0}))})),n},a=function(e,t){var i=e[0];if(e[1].canPlaySource(t,n.options_[i.toLowerCase()]))return{source:t,tech:i}};return t=this.options_.sourceOrder?s(e,r,(i=a,function(e,t){return i(t,e)})):s(r,e,a),t||!1},i.handleSrc_=function(e,t){var i=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var n=Rr(e);if(n.length){if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Er(this,n[0],(function(e,r){var s,a;if(i.middleware_=r,t||(i.cache_.sources=n),i.updateSourceCaches_(e),i.src_(e))return n.length>1?i.handleSrc_(n.slice(1)):(i.changingSrc_=!1,i.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void i.triggerReady());
vendor: 4,133 bytes, line 2
2s=r,a=i.tech_,s.forEach((function(e){return e.setTech&&e.setTech(a)}))})),this.options_.retryOnError&&n.length>1){var r=function(){i.error(null),i.handleSrc_(n.slice(1),!0)},s=function(){i.off("error",r)};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=function(){i.off("error",r),i.off("playing",s)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},i.src=function(e){return this.handleSrc_(e,!1)},i.src_=function(e){var t,i,n=this,r=this.selectSource([e]);return!r||(t=r.tech,i=this.techName_,Cn(t)!==Cn(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){n.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},i.load=function(){this.techCall_("load")},i.reset=function(){var e=this,t=this.options_.Promise||r().Promise;this.paused()||!t?this.doReset_():qn(this.play().then((function(){return e.doReset_()})))},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),gn(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,i=e.remainingTimeDisplay;t&&t.updateContent(),i&&i.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},i.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},i.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},i.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},i.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},i.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-control
2s"),this.trigger("usingcustomcontrols")))},i.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(bt("beforeerror").forEach((function(i){var n=i(t,e);Ot(n)&&!Array.isArray(n)||"string"==typeof n||"number"==typeof n||null===n?e=n:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var i=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),void this.one("loadstart",(function(){this.off(["click","touchstart"],i)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Un(e),this.addClass("vjs-error"),Lt.error("(CODE:"+this.error_.code+" "+Un.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),bt("error").forEach((function(e){return e(t,t.error_)}))},i.reportUserActivity=function(e){this.userActivity_=!0},i.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},i.listenForUserActivity_=function(){var e,t,i,n=cn(this,this.reportUserActivity),r=function(t){n(),this.clearInterval(e)};this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",r),this.on("mouseleave",r);var s,a=this.getChild("controlBar");!a||ri||Wt||(a.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},i.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},i.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},i.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},i.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},i.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),gn(this)&&this.trigger("languagechange"))},i.languages=function(){return Ln(t.prototype.options_.languages,this.languages_)},i.toJSON=function(){var e=Ln(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=Ln(n)).player=void 0,e.tracks[i]=n}return e},i.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var n=new Gn(this,t);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<_a.length;i++){var n=_a[i];
vendor: 7,050 bytes, line 2
2if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(ba[e]),this.addClass(ba[n]),this.breakpoint_=n;break}}},i.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},i.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Nt({},Ta,e),this.updateCurrentBreakpoint_()),Nt(this.breakpoints_)},i.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return ba[this.breakpoint_]||""},i.loadMedia=function(e,t){var i=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Ln(e);var n=this.cache_.media,r=n.artwork,s=n.poster,a=n.src,o=n.textTracks;!r&&s&&(this.cache_.media.artwork=[{src:s,type:Ir(s)}]),a&&this.src(a),s&&this.poster(s),Array.isArray(o)&&o.forEach((function(e){return i.addRemoteTextTrack(e,!1)})),this.ready(t)}},i.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Ir(t.poster)}]),t}return Ln(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},i=Ti(e),n=i["data-setup"];if(mi(e,"vjs-fill")&&(i.fill=!0),mi(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=f()(n||"{}"),s=r[0],a=r[1];s&&Lt.error(s),Nt(i,a)}if(Nt(t,i),e.hasChildNodes())for(var o=e.childNodes,l=0,d=o.length;l<d;l++){var u=o[l],c=u.nodeName.toLowerCase();"source"===c?t.sources.push(Ti(u)):"track"===c&&t.tracks.push(Ti(u))}return t},i.flexNotSupported_=function(){var e=a().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},i.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},i.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(Nn);yr.names.forEach((function(e){var t=yr[e];Sa.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Sa.prototype.crossorigin=Sa.prototype.crossOrigin,Sa.players={};var Ea=r().navigator;Sa.prototype.options_={techOrder:_r.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ea&&(Ea.languages&&Ea.languages[0]||Ea.userLanguage||Ea.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Sa.prototype[e]=function(){return this.techGet_(e)}})),va.forEach((function(e){Sa.prototype["handleTech"+Cn(e)+"_"]=function(){return this.trigger(e)}})),Nn.registerComponent("Player",Sa);var Aa="plugin",wa="activePlugins_",Pa={},Ca=function(e){return Pa.hasOwnProperty(e)},La=function(e){return Ca(e)?Pa[e]:void 0},Da=function(e,t){e[wa]=e[wa]||{},e[wa][t]=!0},ka=function(e,t,i){var n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},Ia=function(e,t){return t.prototype.name=e,function(){ka(this,{name:e,plugin:t,instance:null},!0);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];var s=function(e,t,i){if(_())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&(0,c.A)(r,i.prototype),r}(t,[this].concat(n));return this[e]=function(){return s},ka(this,s.getEventHash()),s}},Ra=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),En(this),delete this.trigger,wn(this,this.constructor.defaultState),Da(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),sn(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[wa][e]=!1,this.player=this.state=null,t[e]=Ia(e,Pa[e])},e.isBasic=function(t){var i="string"==typeof t?La(t):t;return"function"==typeof i&&!e.prototype.isPrototypeOf(i.prototype)},e.registerPlugin=function(t,i){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Ca(t))Lt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Sa.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof i)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof i+".");return Pa[t]=i,t!==Aa&&(e.isBasic(i)?Sa.prototype[t]=function(e,t){var i=function(){ka(this,{name:e,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return Da(this,e),ka(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(t,i):Sa.prototype[t]=Ia(t,i)),i},e.deregisterPlugin=function(e){if(e===Aa)throw new Error("Cannot de-register base plugin.");Ca(e)&&(delete Pa[e],delete Sa.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Pa)),e.forEach((function(e){var i=La(e);i&&((t=t||{})[e]=i)})),t},e.getPluginVersion=function(e){var t=La(e);return t&&t.VERSION||""},e}();Ra.getPlugin=La,Ra.BASE_PLUGIN_NAME=Aa,Ra.registerPlugin(Aa,Ra),Sa.prototype.usingPlugin=function(e){return!!this[wa]&&!0===this[wa][e]},Sa.prototype.hasPlugin=function(e){return!!Ca(e)};var Na=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Oa(e,t,i){var n=Oa.getPlayer(e);if(n)return t&&Lt.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"==typeof e?Bi("#"+Na(e)):e;if(!ui(r))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||Lt.warn("The element supplied is not included in the DOM"),t=t||{},bt("beforesetup").forEach((function(e){var i=e(r,Ln(t));Ot(i)&&!Array.isArray(i)?t=Ln(t,i):Lt.error("please return an object in beforesetup hooks")}));var s=Nn.getComponent("Player");return n=new s(r,t,i),bt("setup").forEach((function(e){return e(n)})),n}if(Oa.hooks_=_t,Oa.hooks=bt,Oa.hook=function(e,t){bt(e,t)},Oa.hookOnce=function(e,t){bt(e,[].concat(t).map((function(t){return function i(){return Tt(e,i),t.apply(void 0,arguments)}})))},Oa.removeHook=Tt,!0!==r().VIDEOJS_NO_DYNAMIC_STYLE&&di()){var Ma=Bi(".vjs-styles-defaults");if(!Ma){Ma=Wi("vjs-styles-defaults");var xa=Bi("head");xa&&xa.insertBefore(Ma,xa.firstChild),Xi(Ma,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}ji(1,Oa),Oa.VERSION=yt,Oa.options=Sa.prototype.options_,Oa.getPlayers=function(){return Sa.players},Oa.getPlayer=function(e){var t,i=Sa.players;if("string"==typeof e){var n=Na(e),r=i[n];if(r)return r;t=Bi("#"+n)}else t=e;if(ui(t)){var s=t,a=s.player,o=s.playerId;if(a||i[o])return a||i[o]}},Oa.getAllPlayers=function(){return Object.keys(Sa.players).map((function(e){return Sa.players[e]})).filter(Boolean)},Oa.players=Sa.players,Oa.getComponent=Nn.getComponent,Oa.registerComponent=function(e,t){_r.isTech(t)&&Lt.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Nn.registerComponent.call(Nn,e,t)},Oa.getTech=_r.getTech,Oa.registerTech=_r.registerTech,Oa.use=function(e,t){br[e]=br[e]||[],br[e].push(t)},Object.defineProperty(Oa,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Oa.middleware,"TERMINATOR",{value:Sr,writeable:!1,enumerable:!0}),Oa.browser=ai,Oa.TOUCH_ENABLED=ti,Oa.extend=function(e,t){void 0===t&&(t={});var i=function(){e.apply(this,arguments)},n={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"==typeof t&&(i=t),(0,b.A)(i,e),e&&(i.super_=e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},Oa.mergeOptions=Ln,Oa.bind=cn,Oa.registerPlugin=Ra.registerPlugin,Oa.deregisterPlugin=Ra.deregisterPlugin,Oa.plugin=function(e,t){return Lt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ra.registerPlugin(e,t)},Oa.getPlugins=Ra.getPlugins,Oa.getPlugin=Ra.getPlugin,Oa.getPluginVersion=Ra.getPluginVersion,Oa.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),Oa.options.languages=Ln(Oa.options.languages,((i={})[e]=t,i)),Oa.options.languages[e]},Oa.log=Lt,Oa.createLogger=Dt,Oa.createTimeRange=Oa.createTimeRanges=xn,Oa.formatTime=Yr,Oa.setFormatTime=function(e){zr=e},Oa.resetFormatTime=function(){zr=Kr},Oa.parseUrl=sr,Oa.isCrossOrigin=lr,Oa.EventTarget=pn,Oa.on=nn,Oa.one=an,Oa.off=rn,Oa.trigger=sn,Oa.xhr=m(),Oa.TextTrack=hr,Oa.AudioTrack=pr,Oa.VideoTrack=fr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Oa[e]=function(){return Lt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Vi[e].apply(null,arguments)}})),Oa.computedStyle=xt,Oa.dom=Vi,Oa.url=dr,Oa.defineLazyProperty=ga,Oa.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Ba=E,Ua=function(e,t,i){return e&&i&&i.responseURL&&t!==i.responseURL?i.responseURL:t},Va=function(e){return Oa.log.debug?Oa.log.debug.bind(Oa,"VHS:",e+" >"):function(){}},Fa=1/30,qa=.1,ja=function(e,t){var i,n=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return Oa.createTimeRanges(n)},Ha=function(e,t){return ja(e,(function(e,i){return e-qa<=t&&i+qa>=t}))},Ga=function(e,t){return ja(e,(function(e){return e-Fa>=t}))},Wa=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},Xa=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Ka=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},za=function(e,t){var i=0;if(!e||!e.length)return i;for(var n=0;n<e.length;n++){var r=e.start(n),s=e.end(n);t>s||(i+=t>r&&t<=s?s-t:s-r)}return i},Ya=Oa.createTimeRange,Qa=function(e,t){if(!t.preload)return t.duration;var i=0;
vendor: 5,597 bytes, line 2
2return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Ja=function(e){return(e.segments||[]).reduce((function(e,t,i){return t.parts?t.parts.forEach((function(n,r){e.push({duration:n.duration,segmentIndex:i,partIndex:r,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e}),[])},$a=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Za=function(e){var t=e.preloadSegment;if(t){var i=t.parts;return(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0)+(i&&i.length?i.length:0)}},eo=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var i=$a(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},to=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var n=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=Qa(e,r),void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;var r=function(e,t){for(var i,n=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(i=e.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=Qa(e,i),void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:n.result+i},io=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return r()[1/0]}return to(e,t,i)},no=function(e){var t=e.defaultDuration,i=e.durationList,n=e.startIndex,r=e.endIndex,s=0;if(n>r){var a=[r,n];n=a[0],r=a[1]}if(n<0){for(var o=n;o<Math.min(0,r);o++)s+=t;n=0}for(var l=n;l<r;l++)s+=i[l].duration;return s},ro=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return io(e);if(null===t)return null;t=t||0;var r=to(e,e.mediaSequence+e.segments.length,t);return i&&(r-=n="number"==typeof n?n:eo(null,e)),Math.max(0,r)},so=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ao=function(e){return e.excludeUntil&&e.excludeUntil===1/0},oo=function(e){var t=so(e);return!e.disabled&&!t},lo=function(e,t){return t.attributes&&t.attributes[e]},uo=function(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!oo(e)&&(e.attributes.BANDWIDTH||0)<i})).length},co=function(e,t){return!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri))},ho=function(e,t){var i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},n=!1;for(var r in i){for(var s in i[r])if(n=t(i[r][s]))break;if(n)break}return!!n},po=function(e){if(!e||!e.playlists||!e.playlists.length)return ho(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;return n&&n.split(",").every((function(e){return j(e)}))||ho(e,(function(e){return co(i,e)}))?"continue":{v:!1}},i=0;i<e.playlists.length;i++){var n=t(i);if("continue"!==n&&"object"==typeof n)return n.v}return!0},fo={liveEdgeDelay:eo,duration:io,seekable:function(e,t,i){var n=t||0,r=ro(e,t,!0,i);return null===r?Ya():Ya(n,r)},getMediaInfoForTime:function(e){for(var t=e.playlist,i=e.currentTime,n=e.startingSegmentIndex,r=e.startingPartIndex,s=e.startTime,a=e.experimentalExactManifestTimings,o=i-s,l=Ja(t),d=0,u=0;u<l.length;u++){var c=l[u];if(n===c.segmentIndex&&("number"!=typeof r||"number"!=typeof c.partIndex||r===c.partIndex)){d=u;break}}if(o<0){if(d>0)for(var h=d-1;h>=0;h--){var p=l[h];if(o+=p.duration,a){if(o<0)continue}else if(o+Fa<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:s-no({defaultDuration:t.targetDuration,durationList:l,startIndex:d,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i}}if(d<0){for(var f=d;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i};d=0}for(var g=d;g<l.length;g++){var m=l[g];if(o-=m.duration,a){if(o>0)continue}else if(o-Fa>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s+no({defaultDuration:t.targetDuration,durationList:l,startIndex:d,endIndex:g})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:i}},isEnabled:oo,isDisabled:function(e){return e.disabled},isBlacklisted:so,isIncompatible:ao,playlistEnd:ro,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:lo,estimateSegmentRequestTime:function(e,t,i,n){return void 0===n&&(n=0),lo("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:uo,isAudioOnly:po,playlistMatch:co,segmentDurationWithParts:Qa},go=Oa.log,mo=function(e,t){return e+"-"+t},vo=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(i){if(e.mediaGroups[i])for(var n in e.mediaGroups[i])for(var r in e.mediaGroups[i][n]){var s=e.mediaGroups[i][n][r];t(s,i,n,r)}}))}
vendor: 10,624 bytes, line 2
2,yo=function(e){var t=e.playlist,i=e.uri,n=e.id;t.id=n,t.playlistErrors_=0,i&&(t.uri=i),t.attributes=t.attributes||{}},_o=function(e,t){e.uri=t;for(var i=0;i<e.playlists.length;i++)if(!e.playlists[i].uri){var n="placeholder-uri-"+i;e.playlists[i].uri=n}var r=po(e);vo(e,(function(t,i,n,s){var a="placeholder-uri-"+i+"-"+n+"-"+s;if(!t.playlists||!t.playlists.length){if(r&&"AUDIO"===i&&!t.uri)for(var l=0;l<e.playlists.length;l++){var d=e.playlists[l];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===n)return}t.playlists=[o({},t)]}t.playlists.forEach((function(t,i){var n=mo(i,a);t.uri?t.resolvedUri=t.resolvedUri||Ba(e.uri,t.uri):(t.uri=0===i?a:n,t.resolvedUri=t.uri),t.id=t.id||n,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];yo({playlist:i,id:mo(t,i.uri)}),i.resolvedUri=Ba(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||go.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){vo(e,(function(t){t.uri&&(t.resolvedUri=Ba(e.uri,t.uri))}))}(e)},bo=Oa.mergeOptions,To=Oa.EventTarget,So=function(e,t){if(!e)return t;var i=bo(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(var n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=bo(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Eo=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Ba(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Ba(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Ba(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Ba(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Ba(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Ba(t,e.uri))}))},Ao=function(e){var t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(var n=0;n<i.preloadHints.length;n++)if("MAP"===i.preloadHints[n].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},wo=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},Po=function(e,t,i){void 0===i&&(i=wo);var n=bo(e,{}),r=n.playlists[t.id];if(!r)return null;if(i(r,t))return null;t.segments=Ao(t);var s=bo(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(var a=0;a<t.skip.skippedSegments;a++)t.segments.unshift({skipped:!0})}s.segments=function(e,t,i){var n=e.slice(),r=t.slice();i=i||0;for(var s,a=[],o=0;o<r.length;o++){var l=n[o+i],d=r[o];l?(s=l.map||s,a.push(So(l,d))):(s&&!d.map&&(d.map=s),a.push(d))}return a}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((function(e){Eo(e,s.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===t.id&&(n.playlists[o]=s);return n.playlists[t.id]=s,n.playlists[t.uri]=s,vo(e,(function(e,i,n,r){if(e.playlists)for(var s=0;s<e.playlists.length;s++)t.id===e.playlists[s].id&&(e.playlists[s]=t)})),n},Co=function(e,t){var i=e.segments||[],n=i[i.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],s=r&&r.duration||n&&n.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Lo=function(e){function t(t,i,n){var r;if(void 0===n&&(n={}),r=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");r.logger_=Va("PlaylistLoader");var s=n,a=s.withCredentials,o=void 0!==a&&a,l=s.handleManifestRedirects,d=void 0!==l&&l;r.src=t,r.vhs_=i,r.withCredentials=o,r.handleManifestRedirects=d;var c=i.options_;return r.customTagParsers=c&&c.customTagParsers||[],r.customTagMappers=c&&c.customTagMappers||[],r.experimentalLLHLS=c&&c.experimentalLLHLS||!1,Oa.browser.IE_VERSION&&(r.experimentalLLHLS=!1),r.state="HAVE_NOTHING",r.handleMediaupdatetimeout_=r.handleMediaupdatetimeout_.bind((0,u.A)(r)),r.on("mediaupdatetimeout",r.handleMediaupdatetimeout_),r}h(t,e);var i=t.prototype;return i.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),i=Ba(this.master.uri,t.uri);this.experimentalLLHLS&&(i=function(e,t){if(t.endList||!t.serverControl)return e;var i={};if(t.serverControl.canBlockReload){var n=t.preloadSegment,s=t.mediaSequence+t.segments.length;if(n){var a=n.parts||[],o=Za(t)-1;o>-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var l=new(r().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&l.searchParams.set(e,i[e])})),e=l.toString()}return e}(i,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials},(function(t,i){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},i.playlistRequestError=function(e,t,i){var n=t.uri,r=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+n+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},i.parseManifest_=function(e){var t=this,i=e.url;return function(e){var t=e.onwarn,i=e.oninfo,n=e.manifestString,r=e.customTagParsers,s=void 0===r?[]:r,a=e.customTagMappers,o=void 0===a?[]:a,l=e.experimentalLLHLS,d=new x;t&&d.on("warn",t),i&&d.on("info",i),s.forEach((function(e){return d.addParser(e)})),o.forEach((function(e){return d.addTagMapper(e)})),d.push(n),d.end();var u=d.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){u.hasOwnProperty(e)&&delete u[e]})),u.segments&&u.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!u.targetDuration){var c=10;u.segments&&u.segments.length&&(c=u.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+c),u.targetDuration=c}var h=$a(u);if(h.length&&!u.partTargetDuration){var p=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+p),go.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),u.partTargetDuration=p}return u}({onwarn:function(e){var n=e.message;return t.logger_("m3u8-parser warn for "+i+": "+n)},oninfo:function(e){var n=e.message;return t.logger_("m3u8-parser info for "+i+": "+n)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},i.haveMetadata=function(e){var t=e.playlistString,i=e.playlistObject,n=e.url,r=e.id;this.request=null,this.state="HAVE_METADATA";var s=i||this.parseManifest_({url:n,manifestString:t});s.lastRequest=Date.now(),yo({playlist:s,uri:n,id:r});var a=Po(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,a?(this.master=a,this.media_=this.master.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Co(this.media(),!!a)),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),r().clearTimeout(this.mediaUpdateTimeout),r().clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e,t){var i=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(r().clearTimeout(this.finalRenditionTimeout),t){var n=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=r().setTimeout(this.media.bind(this,e,!1),n)}else{var s=this.state,a=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===s?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Co(e,!0)),a){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,n){if(i.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ua(i.handleManifestRedirects,e.resolvedUri,n),t)return i.playlistRequestError(i.request,e,s);i.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===s?i.trigger("loadedmetadata"):i.trigger("mediachange")}}))}}},i.pause=function(){this.mediaUpdateTimeout&&(r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},i.load=function(e){var t=this;this.mediaUpdateTimeout&&(r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var i=this.media();if(e){var n=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=r().setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},i.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=r().setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},i.start=function(){var e=this;
2if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=r().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Ua(e.handleManifestRedirects,e.src,i);var n=e.parseManifest_({manifestString:i.responseText,url:e.src});e.setupInitialPlaylist(n)}}))},i.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},i.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,_o(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Ao(e),e.segments.forEach((function(t){Eo(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||r().location.href;this.master=function(e,t){var i=mo(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r().location.href,resolvedUri:r().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(To),Do=Oa.xhr,ko=Oa.mergeOptions,Io=function(e,t,i,n){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),window.isPlayingEventSent||function(e){if(e?.url.includes(".mpd")||e?.url.includes(".m3u8")){let t=Mo(e);Ro("Manifest_Request",{type:"Manifest_Request",TIME:e.requestTime||Date.now(),payload:JSON.stringify(t)}),xo("Manifest_Request_1",e.requestTime)}if(e?.url.includes("init.")){let t=Mo(e),i={type:"Segment_Init_Request",TIME:e.requestTime||Date.now(),payload:JSON.stringify(t)};Ro("Segment_Init_Request",i),Bo(e)?(Ro("Audio_Init_Request",i),xo("Audio_Init_Request_1",e.requestTime)):(Ro("Video_Init_Request",i),xo("Video_Init_Request_1",e.requestTime))}if(e?.url?.includes(".mp4")&&!e?.url?.includes("init.")){let t=Mo(e),i={type:"Segment_Chunk_Request",TIME:e.requestTime||Date.now(),payload:JSON.stringify(t)};Ro("Segment_Chunk_Request",i),Bo(e)?(Ro("Audio_Chunk_Request",i),xo("Audio_Chunk_Request_1",e.requestTime)):(Ro("Video_Chunk_Request",i),xo("Video_Chunk_Request_1",e.requestTime))}}(e),i.headers&&(e.responseHeaders=i.headers,!window.isPlayingEventSent)&&function(e,t){if(e?.url.includes(".mpd")||e?.url.includes(".m3u8")){let i=Oo(e,t);Ro("Manifest_Response",{type:"Manifest_Response",TIME:Date.now(),payload:JSON.stringify(i)}),xo("Manifest_Response_1",Date.now())}if(e?.url?.includes("init.")){let i=Oo(e,t),n={type:"Segment_Init_Response",TIME:Date.now(),payload:JSON.stringify(i)};Ro("Segment_Init_Response",n),Bo(e)?(xo("Audio_Init_Response_1",Date.now()),Ro("Audio_Init_Response",n)):(xo("Video_Init_Response_1",Date.now()),Ro("Video_Init_Response",n))}if(e?.url?.includes(".mp4")&&!e?.url?.includes("init.")){let i=Oo(e,t),n={type:"Segment_Chunk_Response",TIME:Date.now(),payload:JSON.stringify(i)};Ro("Segment_Chunk_Response",n),Bo(e)?(xo("Audio_Chunk_Response_1",Date.now()),Ro("Audio_Chunk_Response",n)):(xo("Video_Chunk_Response_1",Date.now()),Ro("Video_Chunk_Response",n))}}(i,e.bandwidth||""),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText))),window.isPlayingEventSent||function(e,t){if(e?.url?.includes("init.")){let i={type:"Segment_Init_Error",TIME:Date.now(),URL:e?.url,payload:JSON.stringify(t)};Ro("Segment_Init_Error",i),Ro(Bo(e)?"Audio_Init_Error":"Video_Init_Error",i)}if(e?.url?.includes(".mp4")&&!e?.url?.includes("init.")){let i={type:"Segment_Chunk_Error",TIME:Date.now(),URL:e?.url,payload:JSON.stringify(t)};Ro("Segment_Chunk_Error",i),Ro(Bo(e)?"Audio_Chunk_Error":"Video_Chunk_Error",i)}}(i,t)),n(t,e)};function Ro(e,t){window?.storeMixPanelMetricsInSS(e,t),window&&window.convivaAnalytic&&window.convivaAnalytic.reportEvent&&e&&window.convivaAnalytic.reportEvent(e,t)}var No=function(){var e=function e(t,i){t=ko({timeout:45e3},t);var n=e.beforeRequest||Oa.Vhs.xhr.beforeRequest;if(n&&"function"==typeof n){var r=n(t);r&&(t=r)}var s=(!0===Oa.Vhs.xhr.original?Do:Oa.Vhs.xhr)(t,(function(e,t){return Io(s,e,t,i)})),a=s.abort;return s.abort=function(){return s.aborted=!0,a.apply(s,arguments)}
2,s.uri=t.uri,s.requestTime=Date.now(),s};return e.original=!0,e};function Oo(e,t){let i={};return i.url=e.url||"",i.time=Date.now()||"",i.contentLength=e.headers["content-length"]||"",i.bandwidth=t||"",i}function Mo(e){const t={};return t.url=e.url||"",t.time=e.requestTime||Date.now(),t.bandwidth=e.bandwidth||"",t}function xo(e,t){window.storeMixPanelMetricsInSS(e,t)}function Bo(e){let t=["AAC_","DDPLUS_","ATMOS_","audio"],i=!1;for(let n=0;n<t.length;n++)if(e?.url.includes(t[n])){i=!0;break}return i}var Uo=function(e){var t,i={};return e.byterange&&(i.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?r().BigInt(t.offset)+r().BigInt(t.length)-r().BigInt(1):t.offset+t.length-1)),i},Vo=function(e,t){return e.start(t)+"-"+e.end(t)},Fo=function(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},qo=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},jo=function(e){var t={};return Object.keys(e).forEach((function(i){var n=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},Ho=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Go=function(e){return e.resolvedUri},Wo=function(e){for(var t=Array.prototype.slice.call(e),i=16,n="",r=0;r<t.length/i;r++)n+=t.slice(r*i,r*i+i).map(Fo).join("")+" "+t.slice(r*i,r*i+i).map(qo).join("")+"\n";return n},Xo=Object.freeze({__proto__:null,createTransferableMessage:jo,initSegmentId:Ho,segmentKeyId:Go,hexDump:Wo,tagDump:function(e){var t=e.bytes;return Wo(t)},textRanges:function(e){var t,i="";for(t=0;t<e.length;t++)i+=Vo(e,t)+" ";return i}}),Ko=function e(t){var i=t.programTime,n=t.playlist,r=t.retryCount,s=void 0===r?2:r,a=t.seekTo,o=t.pauseAfterSeek,l=void 0===o||o,d=t.tech,u=t.callback;if(!u)throw new Error("seekToProgramTime: callback must be provided");if(void 0===i||!n||!a)return u({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!d.hasStarted_)return u({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(n))return u({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var c=function(e,t){var i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var n=t.segments[0];if(i<n.dateTimeObject)return null;for(var r=0;r<t.segments.length-1&&(n=t.segments[r],!(i<t.segments[r+1].dateTimeObject));r++);var s,a=t.segments[t.segments.length-1],o=a.dateTimeObject,l=a.videoTimingInfo?(s=a.videoTimingInfo).transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds:a.duration+.25*a.duration;return i>new Date(o.getTime()+1e3*l)?null:(i>o&&(n=a),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:fo.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(i,n);if(!c)return u({message:i+" was not found in the stream"});var h=c.segment,p=function(e,t){var i,n;try{i=new Date(e),n=new Date(t)}catch(e){}var r=i.getTime();return(n.getTime()-r)/1e3}(h.dateTimeObject,i);if("estimate"===c.type)return 0===s?u({message:i+" is not buffered yet. Try again"}):(a(c.estimatedStart+p),void d.one("seeked",(function(){e({programTime:i,playlist:n,retryCount:s-1,seekTo:a,pauseAfterSeek:l,tech:d,callback:u})})));var f=h.start+p;d.one("seeked",(function(){return u(null,d.currentTime())})),l&&d.pause(),a(f)},zo=function(e,t){if(4===e.readyState)return t()},Yo=Oa.EventTarget,Qo=Oa.mergeOptions,Jo=function(e,t){if(!wo(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var i=0;i<e.segments.length;i++){var n=e.segments[i],r=t.segments[i];if(n.uri!==r.uri)return!1;if(n.byterange||r.byterange){var s=n.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}}return!0},$o=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Zo=function(e,t){var i={};for(var n in e){var r=e[n].sidx;if(r){var s=fe(r);if(!t[s])break;var a=t[s].sidxInfo;$o(a,r)&&(i[s]=t[s])}}return i},el=function(e){function t(t,i,n,r){var s;void 0===n&&(n={}),(s=e.call(this)||this).masterPlaylistLoader_=r||(0,u.A)(s),r||(s.isMaster_=!0);var a=n,o=a.withCredentials,l=void 0!==o&&o,d=a.handleManifestRedirects,c=void 0!==d&&d;
vendor: 14,615 bytes, line 2
2if(s.vhs_=i,s.withCredentials=l,s.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",(function(){s.refreshXml_()})),s.on("mediaupdatetimeout",(function(){s.refreshMedia_(s.media().id)})),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.logger_=Va("DashPlaylistLoader"),s.isMaster_?(s.masterPlaylistLoader_.srcUrl=t,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=t,s}h(t,e);var i=t.prototype;return i.requestErrored_=function(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)},i.addSidxSegments_=function(e,t,i){var n=this,s=e.sidx&&fe(e.sidx);if(e.sidx&&s&&!this.masterPlaylistLoader_.sidxMapping_[s]){var a=Ua(this.handleManifestRedirects,e.sidx.resolvedUri),o=function(r,a){if(!n.requestErrored_(r,a,t)){var o,l=n.masterPlaylistLoader_.sidxMapping_;try{o=je()(He(a.response).subarray(8))}catch(e){return void n.requestErrored_(e,a,t)}return l[s]={sidxInfo:e.sidx,sidx:o},le(e,o,e.sidx.resolvedUri),i(!0)}};this.request=function(e,t,i){var n,r=[],s=!1,a=function(e,t,n,r){return t.abort(),s=!0,i(e,t,n,r)},o=function(e,t){if(!s){if(e)return a(e,t,"",r);var i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return He(t[0]);var n=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(n),s=0;return t.forEach((function(e){e=He(e),r.set(e,s),s+=e.byteLength})),r}(r,Ke(i,!0)),n=n||Qe(r),r.length<10||n&&r.length<n+2)return zo(t,(function(){return a(e,t,"",r)}));var o=mt(r);return"ts"===o&&r.length<188||!o&&r.length<376?zo(t,(function(){return a(e,t,"",r)})):a(null,t,o,r)}},l={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,Io(e,null,{statusCode:e.status},o)}))}},d=t(l,(function(e,t){return Io(d,e,t,o)}));return d}(a,this.vhs_.xhr,(function(t,i,r,s){if(t)return o(t,i);if(!r||"mp4"!==r)return o({status:i.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},i);var l=e.sidx.byterange,d=l.offset,u=l.length;if(s.length>=u+d)return o(t,{response:s.subarray(d,d+u),status:i.status,uri:i.uri});n.request=n.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:Uo({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=r().setTimeout((function(){return i(!1)}),0)},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r().clearTimeout(this.minimumUpdatePeriodTimeout_),r().clearTimeout(this.mediaRequest_),r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,(function(n){t.haveMetadata({startingState:i,playlist:e})})))},i.haveMetadata=function(e){var t=e.startingState,i=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},i.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(r().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},i.load=function(e){var t=this;r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r().setTimeout((function(){return t.load()}),n)}else this.started?i&&!i.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},i.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,i){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=r().setTimeout((function(){return e.haveMaster_()}),0)},i.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(i,n){if(!t.requestErrored_(i,n)){var r=n.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?t.masterLoaded_=Date.parse(n.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Ua(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,n),r?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(n,r)}))):e(n,r)}if("HAVE_NOTHING"===t.state){if(n?.url.includes(".mpd")||n?.url.includes(".m3u8")){let e={url:n.url||""};Ro("Manifest_Error",{type:"Manifest_Error",TIME:n.requestTime||"",payload:JSON.stringify(e)})}t.started=!1}}))},i.syncClientServerClock_=function(e){var t,i=this,n=(t=this.masterPlaylistLoader_.masterXml_,function(e){var t=Ie(e,"UTCTiming")[0];if(!t)return null;var i=Me(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i}(Fe(t)));return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Ba(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(t,r){if(i.request){if(t)return i.masterPlaylistLoader_.clientOffset_=i.masterLoaded_-Date.now(),e();var s;s="HEAD"===n.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):i.masterLoaded_:Date.parse(r.responseText),i.masterPlaylistLoader_.clientOffset_=s-Date.now(),e()}})))},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,t=function(e){var t=e.srcUrl,i=function(e,t){void 0===t&&(t={});var i=function(e,t){void 0===t&&(t={});var i=t,n=i.manifestUri,r=void 0===n?"":n,s=i.NOW,a=void 0===s?Date.now():s,o=i.clientOffset,l=void 0===o?0:o,d=Ie(e,"Period");if(!d.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var u=Ie(e,"Location"),c=Me(e),h=Be([r],Ie(e,"BaseURL"));c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=a,c.clientOffset=l,u.length&&(c.locations=u.map(Re));var p=[];return d.forEach((function(e,t){var i=Me(e),n=p[t-1];i.start=function(e){var t=e.attributes,i=e.priorPeriodAttributes,n=e.mpdType;return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==n?null:0}({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:c.type}),p.push({node:e,attributes:i})})),{locations:c.locations,representationInfo:ee(p.map(Ve(c,h)))}}(Fe(e),t),n=i.representationInfo.map(ke);return Ee({dashPlaylists:n,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})}(e.masterXml,{manifestUri:t,clientOffset:e.clientOffset,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest}),n=i.mediaGroups.AUDIO.audio;for(const e in n){const t=n[e].playlists;for(const i in t)"ec-3"==t[i].attributes.CODECS&&delete n[e]}return _o(i,t),i}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=function(e,t,i){for(var n=!0,r=Qo(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),s=0;s<t.playlists.length;s++){var a=t.playlists[s];if(a.sidx){var o=fe(a.sidx);i&&i[o]&&i[o].sidx&&le(a,i[o].sidx,a.sidx.resolvedUri)}var l=Po(r,a,Jo);l&&(r=l,n=!1)}return vo(t,(function(e,t,i,s){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,o=Po(r,e.playlists[0],Jo);o&&((r=o).mediaGroups[t][i][s].playlists[0]=r.playlists[a],n=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:r}(e,t,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=t||e;var i=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return i&&i!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)},i.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(r().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},i.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=r().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},i.refreshXml_=function(){var e=this;this.requestMaster_((function(t,i){var n,r,s;i&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(n=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,s=Zo(n.playlists,r),vo(n,(function(e,t,i,n){if(e.playlists&&e.playlists.length){var a=e.playlists;s=Qo(s,Zo(a,r))}})),s),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},i.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,n=!this.media_||this.media_!==i[e];n?this.media_=i[e]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function e(){t.media().endList||(t.mediaUpdateTimeout=r().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Co(t.media(),Boolean(n))))}(),this.trigger("loadedplaylist")},t}(Yo),tl={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},il=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},nl=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(i){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),i=il(new Worker(t));i.objURL=t;var n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},rl=function(e){return"var browserWorkerPolyFill = "+il.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},sl=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},al=rl(sl((function(){var e=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,s;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(s=[],n=arguments.length,n=1;n<arguments.length;++n)s.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,s)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,n,r,s,a,o,l,d,u,c,h,p,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B,U,V,F,q,j=e,H=Math.pow(2,32),G={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
vendor: 4,191 bytes, line 2
2Number(t):t:i.getUint32(0)*H+i.getUint32(4)},MAX_UINT32:H},W=G.MAX_UINT32;!function(){var e;if(E={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in E)E.hasOwnProperty(e)&&(E[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);A=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),P=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),L=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),D={video:C,audio:L},R=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),I=new Uint8Array([0,0,0,0,0,0,0,0]),N=new Uint8Array([0,0,0,0,0,0,0,0]),O=N,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),x=N,k=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},n=function(){return t(E.dinf,t(E.dref,R))},r=function(e){return t(E.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return t(E.hdlr,D[e])},g=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(E.mdhd,i)},f=function(e){return t(E.mdia,g(e),m(e.type),o(e))},a=function(e){return t(E.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(E.minf,"video"===e.type?t(E.vmhd,k):t(E.smhd,I),n(),y(e))},l=function(e,i){for(var n=[],r=i.length;r--;)n[r]=b(i[r]);return t.apply(null,[E.moof,a(e)].concat(n))},d=function(e){for(var i=e.length,n=[];i--;)n[i]=h(e[i]);return t.apply(null,[E.moov,c(4294967295)].concat(n).concat(u(e)))},u=function(e){for(var i=e.length,n=[];i--;)n[i]=T(e[i]);return t.apply(null,[E.mvex].concat(n))},c=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(E.mvhd,i)},v=function(e){var i,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)i=r[n].flags,s[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(E.sdtp,s)},y=function(e){return t(E.stbl,_(e),t(E.stts,x),t(E.stsc,O),t(E.stsz,M),t(E.stco,N))},_=function(e){return t(E.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?B(e):U(e))},B=function(e){var i,n,r=e.sps||[],s=e.pps||[],a=[],o=[];for(i=0;i<r.length;i++)a.push((65280&r[i].byteLength)>>>8),a.push(255&r[i].byteLength),a=a.concat(Array.prototype.slice.call(r[i]));for(i=0;i<s.length;i++)o.push((65280&s[i].byteLength)>>>8),o.push(255&s[i].byteLength),o=o.concat(Array.prototype.slice.call(s[i]));if(n=[E.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(E.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),t(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.s
vendor: 4,397 bytes, line 2
2arRatio[0],d=e.sarRatio[1];n.push(t(E.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return t.apply(null,n)},U=function(e){return t(E.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},p=function(e){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(E.tkhd,i)},b=function(e){var i,n,r,s,a,o;return i=t(E.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),n=t(E.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(r=S(e,92),t(E.traf,i,n,r)):(s=v(e),r=S(e,s.length+92),t(E.traf,i,n,r,s))},h=function(e){return e.duration=e.duration||4294967295,t(E.trak,p(e),f(e))},T=function(e){var i=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(i[i.length-1]=0),t(E.trex,i)},q=function(e,t){var i=0,n=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,i|n|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,i){var n,r,s,a,o,l;for(i+=20+16*(a=e.samples||[]).length,s=q(a,i),(r=new Uint8Array(s.length+16*a.length)).set(s),n=s.length,l=0;l<a.length;l++)o=a[l],r[n++]=(4278190080&o.duration)>>>24,r[n++]=(16711680&o.duration)>>>16,r[n++]=(65280&o.duration)>>>8,r[n++]=255&o.duration,r[n++]=(4278190080&o.size)>>>24,r[n++]=(16711680&o.size)>>>16,r[n++]=(65280&o.size)>>>8,r[n++]=255&o.size,r[n++]=o.flags.isLeading<<2|o.flags.dependsOn,r[n++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[n++]=61440&o.flags.degradationPriority,r[n++]=15&o.flags.degradationPriority,r[n++]=(4278190080&o.compositionTimeOffset)>>>24,r[n++]=(16711680&o.compositionTimeOffset)>>>16,r[n++]=(65280&o.compositionTimeOffset)>>>8,r[n++]=255&o.compositionTimeOffset;return t(E.trun,r)},V=function(e,i){var n,r,s,a,o,l;for(i+=20+8*(a=e.samples||[]).length,s=q(a,i),(n=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l<a.length;l++)o=a[l],n[r++]=(4278190080&o.duration)>>>24,n[r++]=(16711680&o.duration)>>>16,n[r++]=(65280&o.duration)>>>8,n[r++]=255&o.duration,n[r++]=(4278190080&o.size)>>>24,n[r++]=(16711680&o.size)>>>16,n[r++]=(65280&o.size)>>>8,n[r++]=255&o.size;return t(E.trun,n)},S=function(e,t){return"audio"===e.type?V(e,t):F(e,t)},s=function(){return t(E.ftyp,A,w,A,P)};var X,K,z,Y,Q,J,$,Z,ee=function(e){return t(E.mdat,e)},te=l,ie=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ne=[33,16,5,32,164,27],re=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],se=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;J=function(e,t){return K(Q(e,t))},$=function(e,t){return z(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var oe=ae,le=K=function(e){return e*ae},de=(z=function(e,t){return e*t},Y=function(e){return e/ae}),ue=(Q=function(e,t){return e/t},J),ce=$,he=Z,pe=function(e,t,i,n){var r,s,a,o,l,d=0,u=0,c=0;if(t.length&&(r=ue(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(oe/(e.samplerate/1024)),i&&n&&(d=r-Math.max(i,n),c=(u=Math.floor(d/s))*s),!(u<1||c>45e3))){for((a=function(){if(!X){var e={96e3:[ne,[227,64],se(154),[56]],88200:[ne,[231],se(170),[56]],64e3:[ne,[248,192],se(240),[56]],48e3:[ne,[255,192],se(268),[55,148,128],se(54),[112]],44100:[ne,[25
vendor: 4,172 bytes, line 2
25,192],se(268),[55,163,128],se(84),[112]],32e3:[ne,[255,192],se(268),[55,234],se(226),[112]],24e3:[ne,[255,192],se(268),[55,255,128],se(268),[111,112],se(126),[224]],16e3:[ne,[255,192],se(268),[55,255,128],se(268),[111,255],se(269),[223,108],se(195),[1,192]],12e3:[re,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,253,128],se(259),[56]],11025:[re,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,255,192],se(268),[55,175,128],se(108),[112]],8e3:[re,se(268),[3,121,16],se(47),[7]]};t=e,X=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return X}()[e.samplerate])||(a=t[0].data),o=0;o<u;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return e.baseMediaDecodeTime-=Math.floor(ce(c,e.samplerate)),c}},fe=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ge=function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/9e4,i=Math.floor(i)),i},me=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},ve=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ce(0,0),new Ce(0,1),new Ce(1,0),new Ce(1,1)],this.parse708captions_&&(this.cc708Stream_=new Se({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(ve.prototype=new j).push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,n=0,r=0}return i}(e.escapedRBSP)).payload&&4===t.payloadType&&(i=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)}(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=function(e,t){var i,n,r,s,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)s={type:3&t[2+(r=3*i)],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a}(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},ve.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},ve.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}
vendor: 15,936 bytes, line 2
2),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},ve.prototype.flush=function(){return this.flushStream("flush")},ve.prototype.partialFlush=function(){return this.flushStream("partialFlush")},ve.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},ve.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},ve.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},ve.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},ve.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},ve.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},_e=function(e){return 32<=e&&e<=127||160<=e&&e<=255},be=function(e){this.windowNum=e,this.reset()};be.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},be.prototype.getText=function(){return this.rows.join("\n")},be.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},be.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Te=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new be(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};Te.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Te.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Te.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Se=function e(t){t=t||{},e.prototype.init.call(this);var i,n=this,r=t.captionServices||{},s={};Object.keys(r).forEach((function(e){i=r[e],/^SERVICE/.test(e)&&(s[e]=i.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(n.new708Packet(),n.add708Bytes(e)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(e))}};Se.prototype=new j,Se.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Se.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Se.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)n=31&(s=t[r++]),7==(i=s>>5)&&n>0&&(i=s=t[r++]),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},Se.prototype.pushServiceBlock=function(e,t,i){var n,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+i&&r<s.length;r++)n=s[r],_e(n)?r=this.handleText(r,a):24===n?r=this.multiByteCharacter(r,a):16===n?r=this.extendedCommands(r,a):128<=n&&n<=135?r=this.setCurrentWindow(r,a):152<=n&&n<=159?r=this.defineWindow(r,a):136===n?r=this.clearWindows(r,a):140===n?r=this.deleteWindows(r,a):137===n?r=this.displayWindows(r,a):138===n?r=this.hideWindows(r,a):139===n?r=this.toggleWindows(r,a):151===n?r=this.setWindowAttributes(r,a):144===n?r=this.setPenAttributes(r,a):145===n?r=this.setPenColor(r,a):146===n?r=this.setPenLocation(r,a):143===n?a=this.reset(r,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&r++},Se.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return _e(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Se.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Se.prototype.initService=function(e,t){var i,n,r=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new Te(e,n,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},Se.prototype.handleText=function(e,t,i){var n,r,s,a,o=i&&i.isExtended,l=i&&i.isMultiByte,d=this.current708Packet.data,u=o?4096:0,c=d[e],h=d[e+1],p=t.currentWindow;return t.textDecoder_&&!o?(l?(r=[c,h],e++):r=[c],n=t.textDecoder_.decode(new Uint8Array(r))):(a=ye[s=u|c]||s,n=4096&s&&s===a?"":String.fromCharCode(a)),p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(n),e},Se.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],r=i[e+2];return _e(n)&&_e(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Se.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Se.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var s=t.currentWindow;return n=i[++e],s.visible=(32&n)>>5,s.rowLock=(16&n)>>4,s.columnLock=(8&n)>>3,s.priority=7&n,n=i[++e],s.relativePositioning=(128&n)>>7,s.anchorVertical=127&n,n=i[++e],s.anchorHorizontal=n,n=i[++e],s.anchorPoint=(240&n)>>4,s.rowCount=15&n,n=i[++e],s.columnCount=63&n,n=i[++e],s.windowStyle=(56&n)>>3,s.penStyle=7&n,s.virtualRowCount=s.rowCount+1,e},Se.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return n=i[++e],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++e],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++e],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},Se.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Se.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Se.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},Se.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},Se.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},Se.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},Se.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},Se.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return n=i[++e],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++e],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},Se.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return n=i[++e],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++e],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++e],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},Se.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},Se.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Ee={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ae=function(e){return null===e?"":(e=Ee[e]||e,String.fromCharCode(e))},we=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Pe=function(){for(var e=[],t=15;t--;)e.push("");return e},Ce=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Pe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Pe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Pe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))s=Ae((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),s=Ae((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~r||this.addFormatting(e.pts,["i"]),1&~r||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var a=we.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16&~t||(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&(14&~r||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(n)&&(0===r&&(r=null),s=Ae(n),s+=Ae(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};Ce.prototype=new j,Ce.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Ce.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Pe(),this.nonDisplayed_=Pe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ce.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ce.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ce.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ce.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ce.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ce.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ce.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ce.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ce.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Pe(),this.displayed_=Pe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ce.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ce.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ce.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ce.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ce.prototype.shiftRowsUp_=function(){var e;
vendor: 5,206 bytes, line 2
2for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Ce.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var Le={CaptionStream:ve,Cea608Stream:Ce,Cea708Stream:Se},De={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ke="shared",Ie=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Re=function e(t){var i,n;e.prototype.init.call(this),this.type_=t||ke,this.push=function(e){this.type_!==ke&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=Ie(e.dts,n),e.pts=Ie(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Re.prototype=new j;var Ne,Oe=Re,Me=Ie,xe=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},Be=function(e,t,i){return decodeURIComponent(xe(e,t,i))},Ue=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ve={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Be(e.data,1,t),e.value=Be(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Be(e.data,1,t),e.url=Be(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(xe(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Ne=function(e){var t,i={descriptor:e&&e.descriptor},n=0,r=[],s=0;if(Ne.prototype.init.call(this),this.dispatchType=De.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(n=Ue(e.data.subarray(6,10)),n+=10),!(s<n)){for(t={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<n;)t.data.set(r[0].data.subarray(0,n-l),l),l+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();i=10,64&t.data[5]&&(i+=4,i+=Ue(t.data.subarray(10,14)),n-=Ue(t.data.subarray(16,20)));do{if((a=Ue(t.data.subarray(i+4,i+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,Ve[o.id]&&(Ve[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner)){var d=o.data,u=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;u*=4,u+=3&d[7],o.timeStamp=u,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<n);this.trigger("data",t)}}},Ne.prototype=new j;var Fe,qe,je,He=Ne,Ge=Oe,We=188;(Fe=function(){var e=new Uint8Array(We),t=0;Fe.prototype.init.call(this),this.push=function(i){var n,r=0,s=We;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;s<n.byteLength;)71!==n[r]||71!==n[s]?(r++,s++):(this.trigger("data",n.subarray(r,s)),r+=We,s+=We);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){t===We&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new j,qe=function(){var e,t,i,n;qe.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===De.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:s===De.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:s===De.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
vendor: 4,694 bytes, line 2
2else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=De.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=De.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},qe.prototype=new j,qe.STREAM_TYPES={h264:27,adts:15},je=function(){var e,t=this,i=!1,n={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,i,n){var r,s,a=new Uint8Array(e.size),o={type:i},l=0,d=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],a.set(s.data,d),d+=s.data.byteLength;var u,c,h,p;c=o,p=(u=a)[0]<<16|u[1]<<8|u[2],c.data=new Uint8Array,1===p&&(c.packetLength=6+(u[4]<<8|u[5]),c.dataAlignmentIndicator=!!(4&u[6]),192&(h=u[7])&&(c.pts=(14&u[9])<<27|(255&u[10])<<20|(254&u[11])<<12|(255&u[12])<<5|(254&u[13])>>>3,c.pts*=4,c.pts+=(6&u[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&u[14])<<27|(255&u[15])<<20|(254&u[16])<<12|(255&u[17])<<5|(254&u[18])>>>3,c.dts*=4,c.dts+=(6&u[18])>>>1)),c.data=u.subarray(9+u[8])),r="video"===i||o.packetLength<=e.size,(n||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};je.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case De.H264_STREAM_TYPE:e=n,t="video";break;case De.ADTS_STREAM_TYPE:e=r,t="audio";break;case De.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}},je.prototype=new j;var Xe={PAT_PID:0,MP2T_PACKET_LENGTH:We,TransportPacketStream:Fe,TransportParseStream:qe,ElementaryStream:je,TimestampRolloverStream:Ge,CaptionStream:Le.CaptionStream,Cea608Stream:Le.Cea608Stream,Cea708Stream:Le.Cea708Stream,MetadataStream:He};for(var Ke in De)De.hasOwnProperty(Ke)&&(Xe[Ke]=De[Ke]);var ze,Ye=Xe,Qe=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ze=function(e){var t,i=0;ze.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+i+" outside syncword"})},this.push=function(n){var r,s,a,o,l,d=0;if(e||(i=0),"audio"===n.type){var u;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+n.data.byteLength)).set(a),t.set(n.data,a.byteLength)):t=n.data;d+7<t.length;)if(255===t[d]&&240==(246&t[d+1])){if("number"==typeof u&&(this.skipWarn_(u,d),u=null),s=2*(1&~t[d+1]),r=(3&t[d+3])<<11|t[d+4]<<3|(224&t[d+5])>>5,l=9e4*(o=1024*(1+(3&t[d+6])))/Qe[(60&t[d+2])>>>2],t.byteLength-d<r)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[d+2]>>>6&3),channelcount:(1&t[d+2])<<2|(192&t[d+3])>>>6,samplerate:Qe[(60&t[d+2])>>>2],samplingfrequencyindex:(60&t[d+2])>>>2,samplesize:16,data:t.subarray(d+7+s,d+r)}),i++,d+=r}else"number"!=typeof u&&(u=d),d++;"number"==typeof u&&(this.skipWarn_(u,d),u=null),t=t.subarray(d)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ze.prototype=new j;var Je,$e,Ze,et=ze,tt=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),i=new DataView(s.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),s=i>>>32-r;return(n-=r)>0?i<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;
vendor: 4,895 bytes, line 2
2for(e=0;e<n;++e)if(i&2147483648>>>e)return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};$e=function(){var e,t,i=0;$e.prototype.init.call(this),this.push=function(n){var r;t?((r=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),r.set(n.data,t.byteLength),t=r):t=n.data;for(var s=t.byteLength;i<s-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<s);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},$e.prototype=new j,Ze={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Je=function(){var e,t,i,n,r,s,a,o=new $e;Je.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:n,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},r=function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},s=function(e){var t,i,n,r,s,o,l,d,u,c,h,p,f=0,g=0,m=0,v=0,y=[1,1];if(i=(t=new tt(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Ze[i]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:16*(d+1)-2*f-2*g,height:(2-c)*(u+1)*16-2*m-2*v,sarRatio:y}}},Je.prototype=new j;var it,nt={H264Stream:Je,NalByteStream:$e},rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],st=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},at=function e(t,i){return t.length-i<10||t[i]!=="I".charCodeAt(0)||t[i+1]!=="D".charCodeAt(0)||t[i+2]!=="3".charCodeAt(0)?i:e(t,i+=st(t,i))},ot=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},lt={isLikelyAacData:function(e){var t=at(e,0);return e.length>
2=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:st,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&!(240&~e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return rt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=ot(e.subarray(10,14)));do{if((i=ot(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){var s=unescape(function(e,t,i){var n,r="";for(n=0;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r}(n,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=n.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return(o*=4)+(3&a[7])}break}}t+=10,t+=i}while(t<e.byteLength);return null}};(it=function(){var e=new Uint8Array,t=0;it.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,r,s,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=lt.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=lt.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new j;var dt,ut,ct,ht,pt=it,ft=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],gt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],mt=nt.H264Stream,vt=lt.isLikelyAacData,yt=function(e,t){t.stream=e,this.trigger("log",t)},_t=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var r=i[n];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",yt.bind(e,r))}},bt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Tt=function(e,t,i,n,r,s){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:s,baseMediaDecodeTime:e}};ut=function(e,t){var i,n=[],r=0,s=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,ut.prototype.init.call(this),this.push=function(t){me(e,t),e&&ft.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,l,d,u,c,h,p;0!==n.length?(o=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))}(n,e,r),e.baseMediaDecodeTime=ge(e,t.keepOriginalTimestamps),p=pe(e,o,s,a),e.samples=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n}(o),d=ee(function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r}(o)),n=[],l=te(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),fe(e),c=Math.ceil(9216e4/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Tt(ue(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){fe(e),n=[],this.trigger("reset")}},ut.prototype=new j,dt=function(e,t){var i,n,r,s=[],a=[];i=(t=t||{}).firstSequenceNumber||0,dt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){me(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],gt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var n,r,o,l,d,u,c,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();
vendor: 13,541 bytes, line 2
2if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r}(s),(o=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r}(n))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e}(o)),a.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");fe(e),o=f}me(e,o),e.samples=function(e,t){var i,n,r,s,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(s=e[i],n=0;n<s.length;n++)a=s[n],o+=(r=ie(a,o)).size,l.push(r);return l}(o),d=ee(function(e){var t,i,n,r,s,a,o=0,l=e.byteLength,d=e.nalCount,u=new Uint8Array(l+4*d),c=new DataView(u.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(s=r[i],n=0;n<s.length;n++)a=s[n],c.setUint32(o,a.data.byteLength),o+=4,u.set(a.data,o),o+=a.data.byteLength;return u}(o)),e.baseMediaDecodeTime=ge(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Tt(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=te(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),this.trigger("data",{track:e,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){fe(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var i,n,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&bt(e.pps[0],s.pps[0])&&e.sps&&bt(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=s,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,s,o,l,d;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(n=a[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===i?e:i===e.length?null:((d=e.slice(i)).byteLength=s,d.duration=l,d.nalCount=o,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,n,r,s,o,l;for(t=a.length-1,i=e.length-1,s=null,o=!1;t>=0&&i>=0;){if(n=a[t],r=e[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?t--:(t===a.length-1&&(s=i),i--)}if(!o&&null===s)return null;if(0===(l=o?i:s))return e;var d=e.slice(l),u=d.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return d.byteLength=u.byteLength,d.duration=u.duration,d.nalCount=u.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){a=e}},dt.prototype=new j,ht=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ht.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},ht.prototype=new j,ht.prototype.flush=function(e){var t,i,n,r,a=0,o={captions:[],captionStreams:{},metadata:[],info:{}},l=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(l=this.videoTrack.timelineStartInfo.pts,gt.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(l=this.audioTrack.timelineStartInfo.pts,ft.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,n=function(e){var t,i=s(),n=d(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}(this.pendingTracks),o.initSegment=new Uint8Array(n.byteLength),o.initSegment.set(n),o.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)o.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=he(t.startPts,l,this.keepOriginalTimestamps),t.endTime=he(t.endPts,l,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=he(i.pts,l,this.keepOriginalTimestamps),o.metadata.push(i);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),r=0;r<o.captions.length;r++)t=o.captions[r],this.trigger("caption",t);for(r=0;r<o.metadata.length;r++)i=o.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},ht.prototype.setRemux=function(e){this.remuxTracks=e},ct=function(e){var t,i,n=this,r=!0;ct.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new Ye.MetadataStream,r.aacStream=new pt,r.audioTimestampRolloverStream=new Ye.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new Ye.TimestampRolloverStream("timed-metadata"),r.adtsStream=new et,r.coalesceStream=new ht(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new ut(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),_t(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new Ye.MetadataStream,r.packetStream=new Ye.TransportPacketStream,r.parseStream=new Ye.TransportParseStream,r.elementaryStream=new Ye.ElementaryStream,r.timestampRolloverStream=new Ye.TimestampRolloverStream,r.adtsStream=new et,r.h264Stream=new mt,r.captionStream=new Ye.CaptionStream(e),r.coalesceStream=new ht(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?i||"audio"!==s.tracks[a].type||((i=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new dt(t,e),r.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new ut(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,n.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),_t(this,r)},this.setBaseMediaDecodeTime=function(n){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,fe(i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,fe(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(r){var t=vt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ct.prototype=new j;var St,Et,At,wt={Transmuxer:ct,VideoSegmentStream:dt,AudioSegmentStream:ut,AUDIO_PROPERTIES:ft,VIDEO_PROPERTIES:gt,generateSegmentTimingInfo:Tt},Pt=function(e){return e>>>0},Ct=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Lt=Pt,Dt=function e(t,i){var n,r,s,a,o,l=[];
vendor: 4,289 bytes, line 2
2if(!i.length)return null;for(n=0;n<t.byteLength;)r=Lt(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),s=Ct(t.subarray(n+4,n+8)),a=r>1?n+r:t.byteLength,s===i[0]&&(1===i.length?l.push(t.subarray(n+8,a)):(o=e(t.subarray(n+8,a),i.slice(1))).length&&(l=l.concat(o))),n=a;return l},kt=Pt,It=G.getUint64,Rt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},Ot="undefined"!=typeof window?window:void 0!==Nt?Nt:"undefined"!=typeof self?self:{},Mt=function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},xt=Le.CaptionStream,Bt=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null},Ut=function(e,t){var i=Dt(e,["moof","traf"]),n=Dt(e,["mdat"]),r={},s=[];return n.forEach((function(e,t){var n=i[t];s.push({mdat:e,traf:n})})),s.forEach((function(e){var i,n,s=e.mdat,a=e.traf,o=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],s=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],d=65536&n.flags[0],u=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),s&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),d&&(n.durationIsEmpty=!0),!r&&u&&(n.baseDataOffsetIsMoof=!0),n}(Dt(a,["tfhd"])[0]),l=o.trackId,d=Dt(a,["tfdt"]),u=d.length>0?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=It(e.subarray(4)):t.baseMediaDecodeTime=kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t}(d[0]).baseMediaDecodeTime:0,c=Dt(a,["trun"]);t===l&&c.length>0&&(i=function(e,t,i){var n=t,r=i.defaultSampleDuration||0,s=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],s=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],d=8&i.flags[1],u=n.getUint32(4),c=8;for(r&&(i.dataOffset=n.getInt32(c),c+=4),s&&u&&(t={flags:Rt(e.subarray(c,c+4))},c+=4,a&&(t.duration=n.getUint32(c),c+=4),o&&(t.size=n.getUint32(c),c+=4),d&&(1===i.version?t.compositionTimeOffset=n.getInt32(c):t.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(t),u--);u--;)t={},a&&(t.duration=n.getUint32(c),c+=4),o&&(t.size=n.getUint32(c),c+=4),l&&(t.flags=Rt(e.subarray(c,c+4)),c+=4),d&&(1===i.version?t.compositionTimeOffset=n.getInt32(c):t.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(t);return i}(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof n?(e.pts=n+Ot.BigInt(e.compositionTimeOffset),n+=Ot.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(t)})),o}(c,u,o),n=function(e,t,i){var n,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var d=e.subarray(r+1,r+1+s),u=Bt(r,t);if(n={nalUnitType:"sei_rbsp",size:s,data:d,escapedRBSP:Mt(d),trackId:i},u)n.pts=u.pts,n.dts=u.dts,a=u;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+i+". See mux.js#223."});break}n.pts=a.pts,n.dts=a.dts}l.seiNals.push(n)}return l}(s,i,l),r[l]||(r[l]={seiNals:[],logs:[]}),r[l].seiNals=r[l].seiNals.concat(n.seiNals),r[l].logs=r[l].logs.concat(n.logs))})),r},Vt=function(){var e,t,i,n,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new xt,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,r.captions.push(e),r.captionStream
vendor: 6,059 bytes, line 2
2s[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||i===e[0]&&n===t[i])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))i=s[0],n=a[i];else if(null===i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,s,a)}return o=function(e,t,i){if(null===t)return null;var n=Ut(e,t)[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}}(e,i,n),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Ft=Pt,qt=function(e){return("00"+e.toString(16)).slice(-2)},jt=G.getUint64;St=function(e,t){var i=Dt(t,["moof","traf"]).reduce((function(t,i){var n,r,s=Dt(i,["tfhd"])[0],a=Ft(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),o=e[a]||9e4,l=Dt(i,["tfdt"])[0],d=new DataView(l.buffer,l.byteOffset,l.byteLength);return"bigint"==typeof(n=1===l[0]?jt(l.subarray(4,12)):d.getUint32(4))?r=n/Ot.BigInt(o):"number"!=typeof n||isNaN(n)||(r=n/o),r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r<t&&(t=r),t}),1/0);return"bigint"==typeof i||isFinite(i)?i:0},At=function(e){var t=0===e[0]?12:20;return Ft(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Et=function(e){var t=Dt(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,r={},s=Dt(e,["tkhd"])[0];s&&(n=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===n?t.getUint32(12):t.getUint32(20));var a=Dt(e,["mdia","hdlr"])[0];if(a){var o=Ct(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=Dt(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);r.codec=Ct(d.subarray(4,8));var u,c=Dt(d,[r.codec])[0];c&&(/^[asm]vc[1-9]$/i.test(r.codec)?(u=c.subarray(78),"avcC"===Ct(u.subarray(4,8))&&u.length>11?(r.codec+=".",r.codec+=qt(u[9]),r.codec+=qt(u[10]),r.codec+=qt(u[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(u=c.subarray(28),"esds"===Ct(u.subarray(4,8))&&u.length>20&&0!==u[19]?(r.codec+="."+qt(u[19]),r.codec+="."+qt(u[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Dt(e,["mdia","mdhd"])[0];h&&(r.timescale=At(h)),i.push(r)})),i};var Ht=St,Gt=Et,Wt=function(e){var t=31&e[1];return(t<<=8)|e[2]},Xt=function(e){return!!(64&e[1])},Kt=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},zt=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Yt={parseType:function(e,t){var i=Wt(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=Xt(e),i=4+Kt(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Xt(e),n=4+Kt(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var s=12+((15&e[n+10])<<8|e[n+11]);s<r;){var a=n+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Xt,parsePesType:function(e,t){switch(t[Wt(e)]){case De.H264_STREAM_TYPE:return"video";case De.ADTS_STREAM_TYPE:return"audio";case De.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Xt(e))return null;var t=4+Kt(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+Kt(e),i=e.subarray(t),n=0,r=0,s=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===zt(31&i[r+3])&&(s=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===zt(31&i[r+3])&&(s=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===zt(31&i[r+3])&&(s=!0),s}},Qt=Me,Jt={};Jt.ts=Yt,Jt.aac=lt;var $t=oe,Zt=188,ei=71,ti=function(e,t,i){for(var n,r,s,a,o=0,l=Zt,d=!1;l<=e.byteLength;)if(e[o]!==ei||e[l]!==ei&&l!==e.byteLength)o++,l++;else{if(n=e.subarray(o,l),"pes"===Jt.ts.parseType(n,t.pid)&&(r=Jt.ts.parsePesType(n,t.table),s=Jt.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=Jt.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),d=!0)),d)break;o+=Zt,l+=Zt}for(o=(l=e.byteLength)-Zt,d=!1;o>=0;)if(e[o]!==ei||e[l]!==ei&&l!==e.byteLength)o--,l--;else{if(n=e.subarray(o,l),"pes"===Jt.ts.parseType(n,t.pid)&&(r=Jt.ts.parsePesType(n,t.table),s=Jt.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=Jt.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),d=!0)),d)break;o-=Zt,l-=Zt}},ii=function(e,t,i){for(var n,r,s,a,o,l,d,u=0,c=Zt,h=!1,p={data:[],size:0};c<e.byteLength;)if(e[u]!==ei||e[c]!==ei)u++,c++;else{if(n=e.subarray(u,c),"pes"===Jt.ts.parseType(n,t.pid)&&(r=Jt.ts.parsePesType(n,t.table),s=Jt.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(s&&!h&&(a=Jt.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0),!i.firstKeyFrame))){if
vendor: 6,573 bytes, line 2
2(s&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)d=p.data.shift(),o.set(d,l),l+=d.byteLength;if(Jt.ts.videoPacketContainsKeyFrame(o)){var f=Jt.ts.parsePesTime(o);f?(i.firstKeyFrame=f,i.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(n),p.size+=n.byteLength}if(h&&i.firstKeyFrame)break;u+=Zt,c+=Zt}for(u=(c=e.byteLength)-Zt,h=!1;u>=0;)if(e[u]!==ei||e[c]!==ei)u--,c--;else{if(n=e.subarray(u,c),"pes"===Jt.ts.parseType(n,t.pid)&&(r=Jt.ts.parsePesType(n,t.table),s=Jt.ts.parsePayloadUnitStartIndicator(n),"video"===r&&s&&(a=Jt.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0)),h)break;u-=Zt,c-=Zt}},ni=function(e,t){var i;return i=Jt.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(Jt.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=Jt.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=Jt.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=Jt.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=Jt.aac.parseSampleRate(t)),n++,o+=a;break;default:o++}if(i)return null}if(null===r||null===s)return null;var l=$t/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*n*l,pts:s+1024*n*l}]}}(e):function(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,r=Zt;r<e.byteLength;)if(e[n]!==ei||e[r]!==ei)n++,r++;else{switch(i=e.subarray(n,r),Jt.ts.parseType(i,t.pid)){case"pat":t.pid=Jt.ts.parsePat(i);break;case"pmt":var s=Jt.ts.parsePmt(i);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}n+=Zt,r+=Zt}}(e,t),t.table)if(t.table.hasOwnProperty(n))switch(t.table[n]){case De.H264_STREAM_TYPE:i.video=[],ii(e,t,i),0===i.video.length&&delete i.video;break;case De.ADTS_STREAM_TYPE:i.audio=[],ti(e,t,i),0===i.audio.length&&delete i.audio}return i}(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=Qt(e.dts,i),e.pts=Qt(e.pts,i),e.dtsTime=e.dts/$t,e.ptsTime=e.pts/$t}))}if(e.video&&e.video.length){var n=t;if((void 0===n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=Qt(e.dts,n),e.pts=Qt(e.pts,n),e.dtsTime=e.dts/$t,e.ptsTime=e.pts/$t})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=Qt(r.dts,n),r.pts=Qt(r.pts,n),r.dtsTime=r.dts/$t,r.ptsTime=r.pts/$t}}}(i,t),i):null},ri=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new wt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};var n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var i={start:{decode:de(t.start.dts),presentation:de(t.start.pts)},end:{decode:de(t.end.dts),presentation:de(t.end.pts)},baseMediaDecodeTime:de(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=de(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){var i={start:{decode:de(t.start.dts),presentation:de(t.start.pts)},end:{decode:de(t.end.dts),presentation:de(t.end.pts)},baseMediaDecodeTime:de(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=de(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:de(t.start),end:de(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:de(t.start),end:de(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Vt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,i=e.data,n=Ht(t,i);this.self.postMessage({action:"probeMp4StartTime",startTime:n,data:i},[i.buffer])},t.probeMp4Tracks=function(e){var t=e.data,i=Gt(t);this.self.postMessage({action:"probeMp4Tracks",tracks:i,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,i=e.baseStartTime,n="number"!=typeof i||isNaN(i)?void 0:i*oe,r=ni(t,n),s=null;r&&((s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(le(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(le(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();
vendor: 9,031 bytes, line 2
2self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new ri(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ri(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),ol=nl(al),ll=function(e){var t=e.transmuxer,i=e.bytes,n=e.audioAppendStart,r=e.gopsToAlignWith,s=e.remux,a=e.onData,o=e.onTrackInfo,l=e.onAudioTimingInfo,d=e.onVideoTimingInfo,u=e.onVideoSegmentTimingInfo,c=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,g=e.onEndedTimeline,m=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},_=v;if(t.onmessage=function(i){t.currentTransmux===e&&("data"===i.data.action&&function(e,t,i){var n=e.data.segment,r=n.type,s=n.initSegment,a=n.captions,o=n.captionStreams,l=n.metadata,d=n.videoFrameDtsTime,u=n.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:o,metadata:l});var c=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==d&&(h.videoFrameDtsTime=d),void 0!==u&&(h.videoFramePtsTime=u),i(h)}(i,y,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(i,y),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&d(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&u(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(_=!1,g()),"log"===i.data.action&&m(i.data.log),"transmuxed"===i.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,i=e.callback;t.buffer=[],i(t)}({transmuxedData:y,callback:f}),dl(t))))},n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),i.byteLength){var b=i instanceof ArrayBuffer?i:i.buffer,T=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:b,byteOffset:T,byteLength:i.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},dl=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():ll(e.currentTransmux))},ul=function(e,t){e.postMessage({action:t}),dl(e)},cl=function(e){!function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void ul(t,e);t.transmuxQueue.push(ul.bind(null,t,e))}("reset",e)},hl=function(e){var t=e.transmuxer,i=e.endAction||e.action,n=e.callback,r=o({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function r(s){s.data.action===i&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),n(s.data))})),e.data){var s=e.data instanceof ArrayBuffer;r.byteOffset=s?0:e.data.byteOffset,r.byteLength=e.data.byteLength;var a=[s?e.data:e.data.buffer];t.postMessage(r,a)}else t.postMessage(r)},pl=-101,fl=-102,gl=function(e){e.forEach((function(e){e.abort()}))},ml=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:pl,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:fl,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t}:null},vl=function(e,t,i){return function(n,r){var s=r.response,a=ml(n,r);if(a)return i(a,e);if(16!==s.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},e);for(var o=new DataView(s),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),d=0;d<t.length;d++)t[d].bytes=l;return i(null,e)}},yl=function(e,t){var i=mt(e.map.bytes);if("mp4"!==i){var n=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(i||"unknown")+" container for initialization segment at URL: "+n,code:2})}hl({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(i){var n=i.tracks,r=i.data;return e.map.bytes=r,n.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},_l=function(e){var t=e.segment,i=e.bytes,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,d=e.isEndOfTimeline,u=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=t.map&&t.map.tracks||{},g=Boolean(f.audio&&f.video),m=r.bind(null,t,"audio","start"),v=r.bind(null,t,"audio","end"),y=r.bind(null,t,"video","start"),_=r.bind(null,t,"video","end");hl({action:"probeTs",transmuxer:t.transmuxer,data:i,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=i=e.data;var r=e.result;r&&(n(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:g}),n=null,r.hasAudio&&!g&&m(r.audioStart),r.hasVideo&&y(r.videoStart),m=null,y=null),function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ll(e);e.transmuxer.transmuxQueue.push(e)}({bytes:i,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:g,onData:function(e){e.type="combined"===e.type?"video":e.type,c(t,e)},onTrackInfo:function(e){n&&(g&&(e.isMuxed=!0),n(t,e))},onAudioTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),_&&void 0!==e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){a(e)},onId3:function(e,i){o(t,e,i)},onCaptions:function(e){l(t,[e])},isEndOfTimeline:d,onEndedTimeline:function(){u()},onTransmuxerLog:p,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},bl=function(e){var t=e.segment,i=e.bytes,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,d=e.isEndOfTimeline,u=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=new Uint8Array(i);if(function(e){return Ze(e,["moof"]).length>0}(f)){t.isFmp4=!0;var g=t.map.tracks,m={isFmp4:!0,hasVideo:!!g.video,hasAudio:!!g.audio};g.audio&&g.audio.codec&&"enca"!==g.audio.codec&&(m.audioCodec=g.audio.codec),g.video&&g.video.codec&&"encv"!==g.video.codec&&(m.videoCodec=g.video.codec),g.video&&g.audio&&(m.isMuxed=!0),n(t,m);var v=function(e){c(t,{data:f,type:m.hasAudio&&!m.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),h(null,t,{})};hl({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var n=e.data,s=e.startTime;i=n.buffer,t.bytes=f=n,m.hasAudio&&!m.isMuxed&&r(t,"audio","start",s),m.hasVideo&&r(t,"video","start",s),g.video&&n.byteLength&&t.transmuxer?hl({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[g.video.id],callback:function(e){i=e.data.buffer,t.bytes=f=e.data,e.logs.forEach((function(e){p(Oa.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=mt(f)),"ts"!==t.container&&"aac"!==t.container)return n(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});_l({segment:t,bytes:i,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:p})}else h(null,t,{})},Tl=function(e,t){var i,n=e.id,r=e.key,s=e.encryptedBytes,a=e.decryptionWorker;a.addEventListener("message",(function e(i){if(i.data.source===n){a.removeEventListener("message",e);var r=i.data.decrypted;t(new Uint8Array(r.bytes,r.byteOffset,r.byteLength))}})),i=r.bytes.slice?r.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.bytes)),a.postMessage(jo({source:n,encrypted:s,key:i,iv:r.iv}),[s.buffer,i.buffer])},Sl=function(e){var t=e.xhr,i=e.xhrOptions,n=e.decryptionWorker,r=e.segment,s=e.abortFn,a=e.progressFn,o=e.trackInfoFn,l=e.timingInfoFn,d=e.videoSegmentTimingInfoFn,u=e.audioSegmentTimingInfoFn,c=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,g=e.dataFn,m=e.doneFn,v=e.onTransmuxerLog,y=[],_=function(e){var t=e.activeXhrs,i=e.decryptionWorker,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,d=e.isEndOfTimeline,u=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=0,g=!1;return function(e,m){if(!g){if(e)return g=!0,gl(t),h(e,m);
vendor: 16,348 bytes, line 2
2if((f+=1)===t.length){var v=function(){if(m.encryptedBytes)return function(e){var t=e.decryptionWorker,i=e.segment,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,d=e.isEndOfTimeline,u=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Tl({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:t},(function(e){i.bytes=e,bl({segment:i,bytes:i.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:p})}))}({decryptionWorker:i,segment:m,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:p});bl({segment:m,bytes:m.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:p})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return Tl({decryptionWorker:i,id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key},(function(e){m.map.bytes=e,yl(m,(function(e){if(e)return gl(t),h(e,m);v()}))}));v()}}}}({activeXhrs:y,decryptionWorker:n,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:g,doneFn:m,onTransmuxerLog:v});if(r.key&&!r.key.bytes){var b=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&b.push(r.map.key);var T=t(Oa.mergeOptions(i,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),vl(r,b,_));y.push(T)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var S=t(Oa.mergeOptions(i,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),vl(r,[r.map.key],_));y.push(S)}var E=Oa.mergeOptions(i,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Uo(r.map)}),A=function(e){var t=e.segment,i=e.finishProcessingFn;return function(e,n){var r=ml(e,n);if(r)return i(r,t);var s=new Uint8Array(n.response);if(t.map.key)return t.map.encryptedBytes=s,i(null,t);t.map.bytes=s,yl(t,(function(e){if(e)return e.xhr=n,e.status=n.status,i(e,t);i(null,t)}))}}({segment:r,finishProcessingFn:_}),w=t(E,A);y.push(w)}var P=Oa.mergeOptions(i,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Uo(r)}),C=t(P,function(e){var t=e.segment,i=e.finishProcessingFn,n=e.responseType;return function(e,r){var s=ml(e,r);if(s)return i(s,t);var a="arraybuffer"!==n&&r.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer}(r.responseText.substring(t.lastReachedChar||0)):r.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),t.key?t.encryptedBytes=new Uint8Array(a):t.bytes=new Uint8Array(a),i(null,t)}}({segment:r,finishProcessingFn:_,responseType:P.responseType}));C.addEventListener("progress",function(e){var t=e.segment,i=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Oa.mergeOptions(t.stats,(r=(n=e).target,(s={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-r.requestTime||0}).bytesReceived=n.loaded,s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3),s)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),i(e,t);var n,r,s}}({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:g})),y.push(C);var L={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,i=e.abortFn;return function(e){e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}}({loadendState:L,abortFn:s}))})),function(){return gl(y)}},El=Va("CodecUtils"),Al=function(e,t){var i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},wl=function(e){var t={};return e.forEach((function(e){var i=e.mediaType,n=e.type,r=e.details;t[i]=t[i]||[],t[i].push(F(""+n+r))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return El("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Pl=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Cl=function(e,t){var i=t.attributes||{},n=wl(function(e){var t=e.attributes||{};if(t.CODECS)return q(t.CODECS)}(t)||[]);if(Al(e,t)&&!n.audio&&!function(e,t){if(!Al(e,t))return!0;var i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(var r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1}(e,t)){var r=wl(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return q(r.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);r.audio&&(n.audio=r.audio)}return n},Ll=Va("PlaylistSelector"),Dl=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},kl=function(e,t){if(!e)return"";var i=r().getComputedStyle(e);return i?i[t]:""},Il=function(e,t){var i=e.slice();e.sort((function(e,n){var r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r}))},Rl=function(e,t){var i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||r().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n||r().Number.MAX_VALUE)},Nl=function(e,t,i,n,s,a){if(e){var o={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:s},l=e.playlists;fo.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var d=l.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||r().Number.MAX_VALUE,width:t,height:i,playlist:e}}));Il(d,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(d=d.filter((function(e){return!fo.isIncompatible(e.playlist)}))).filter((function(e){return fo.isEnabled(e.playlist)}));u.length||(u=d.filter((function(e){return!fo.isDisabled(e.playlist)})));var c=u.filter((function(e){return e.bandwidth*tl.BANDWIDTH_VARIANCE<t})),h=c[c.length-1],p=c.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===s){var f=p||u[0]||d[0];if(f&&f.playlist){var g="sortedPlaylistReps";return p&&(g="bandwidthBestRep"),u[0]&&(g="enabledPlaylistReps"),Ll("choosing "+Dl(f)+" using "+g+" with options",o),f.playlist}return Ll("could not choose a playlist with options",o),null}var m=c.filter((function(e){return e.width&&e.height}));Il(m,(function(e,t){return e.width-t.width}));var v=m.filter((function(e){return e.width===i&&e.height===n}));h=v[v.length-1];var y,_,b,T,S=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(S||(_=(y=m.filter((function(e){return e.width>i||e.height>n}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=_[_.length-1],b=_.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),a.experimentalLeastPixelDiffSelector){var E=m.map((function(e){return e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-n),e}));Il(E,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=E[0]}var A=T||b||S||p||u[0]||d[0];if(A&&A.playlist){var w="sortedPlaylistReps";return T?w="leastPixelDiffRep":b?w="resolutionPlusOneRep":S?w="resolutionBestRep":p?w="bandwidthBestRep":u[0]&&(w="enabledPlaylistReps"),Ll("choosing "+Dl(A)+" using "+w+" with options",o),A.playlist}return Ll("could not choose a playlist with options",o),null}},Ol=function(){var e=this.useDevicePixelRatio&&r().devicePixelRatio||1;return Nl(this.playlists.master,this.systemBandwidth,parseInt(kl(this.tech_.el(),"width"),10)*e,parseInt(kl(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Ml=function(e,t,i){var n,r;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime>=e&&r.endTime<=t&&i.removeCue(r)},xl=function(e){return"number"==typeof e&&isFinite(e)},Bl=1/60,Ul=function(e){var t=e.startOfSegment,i=e.duration,n=e.segment,r=e.part,s=e.playlist,a=s.mediaSequence,o=s.id,l=s.segments,d=void 0===l?[]:l,u=e.mediaIndex,c=e.partIndex,h=e.timeline,p=d.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var g="number"==typeof c,m=e.segment.uri?"segment":"pre-segment",v=g?Za({preloadSegment:n})-1:0;return m+" ["+(a+u)+"/"+(a+p)+"]"+(g?" part ["+c+"/"+v+"]":"")+" segment start/end ["+n.start+" => "+n.end+"]"+(g?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},Vl=function(e){return e+"TimingInfo"},Fl=function(e){var t=e.timelineChangeController,i=e.currentTimeline,n=e.segmentTimeline,r=e.loaderType,s=e.audioDisabled;if(i===n)return!1;if("audio"===r){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==n}if("main"===r&&s){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==n}return!1},ql=function(e){var t=e.segmentDuration,i=e.maxDuration;return!!t&&Math.round(t)>i+Fa},jl=function(e){function t(t,i){var n;if(n=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=t.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.partIndex=null,n.hasPlayed_=t.hasPlayed,n.currentTime_=t.currentTime,n.seekable_=t.seekable,n.seeking_=t.seeking,n.duration_=t.duration,n.mediaSource_=t.mediaSource,n.vhs_=t.vhs,n.loaderType_=t.loaderType,n.currentMediaInfo_=void 0,n.startingMediaInfo_=void 0,n.segmentMetadataTrack_=t.segmentMetadataTrack,n.goalBufferLength_=t.goalBufferLength,n.sourceType_=t.sourceType,n.sourceUpdater_=t.sourceUpdater,n.inbandTextTracks_=t.inbandTextTracks,n.state_="INIT",n.timelineChangeController_=t.timelineChangeController,n.shouldSaveSegmentTimingInfo_=!0,n.parse708captions_=t.parse708captions,n.captionServices_=t.captionServices,n.experimentalExactManifestTimings=t.experimentalExactManifestTimings,n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.xhrOptions_=null,n.pendingSegments_=[],n.audioDisabled_=!1,n.isPendingTimestampOffset_=!1,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=Oa.browser.IE_VERSION>=11,n.appendInitSegment_={audio:!0,video:!0},n.playlistOfLastInitSegment_={audio:null,video:null},n.callQueue_=[],n.loadQueue_=[],n.metadataQueue_={id3:[],caption:[]},n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=t.cacheEncryptionKeys,n.keyCache_={},n.decrypter_=t.decrypter,n.syncController_=t.syncController,n.syncPoint_={segmentIndex:0,time:0},n.transmuxer_=n.createTransmuxer_(),n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",(function(){n.isEndOfStream_()||(n.ended_=!1)})),n.fetchAtBuffer_=!1,n.logger_=Va("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty((0,u.A)(n),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),n.sourceUpdater_.on("ready",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"main"===n.loaderType_&&n.timelineChangeController_.on("pendingtimelinechange",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"audio"===n.loaderType_&&n.timelineChangeController_.on("timelinechange",(function(){n.hasEnoughInfoToLoad_()&&n.processLoadQueue_(),n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),n}h(t,e);var i=t.prototype;return i.createTransmuxer_=function(){return function(e){var t=new ol;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:e}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},i.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&r().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},i.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,r().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},i.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},i.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&cl(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Oa.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,i=e.hasVideo,n=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Ho(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},i.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Go(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(n||e).resolvedUri};return n&&(r.bytes=n.bytes),r},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_("playlist update ["+r
vendor: 11,456 bytes, line 2
2+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var s=e.mediaSequence-i.mediaSequence;if(this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}n&&(n.mediaIndex-=s,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}},i.pause=function(){this.checkBufferTimeout_&&(r().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return null===this.checkBufferTimeout_},i.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&cl(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},i.remove=function(e,t,i,n){if(void 0===i&&(i=function(){}),void 0===n&&(n=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r=1,s=function(){0==--r&&i()};for(var a in!n&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil((t-n)*vt.ONE_SECOND_IN_TS),s=Math.ceil((i-n)*vt.ONE_SECOND_IN_TS),a=e.slice(),o=e.length;o--&&!(e[o].pts<=s););if(-1===o)return a;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s)),this.inbandTextTracks_)Ml(e,t,this.inbandTextTracks_[a]);Ml(e,t,this.segmentMetadataTrack_),s()}else this.logger_("skipping remove because no source updater or starting media info")},i.monitorBuffer_=function(){this.checkBufferTimeout_&&r().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r().setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r().setTimeout(this.monitorBufferTick_.bind(this),500)},i.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},i.isEndOfStream_=function(e,t,i){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===i&&(i=this.partIndex),!t||!this.mediaSource_)return!1;var n="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,s=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s},i.chooseNextRequest_=function(){var e=this.buffered_(),t=Ka(e)||0,i=za(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,r=i>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];for(var n=[],r=0,s=0;s<t.length;s++){var a=t[s];if(e===a.timeline&&(n.push(s),(r+=a.duration)>i))return s}return 0===n.length?0:n[n.length-1]}(this.currentTimeline_,s,t);else if(null!==this.mediaIndex){var o=s[this.mediaIndex],l="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=o.end?o.end:t,o.parts&&o.parts[l+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=l+1):a.mediaIndex=this.mediaIndex+1}else{var d=fo.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),u=d.segmentIndex,c=d.startTime,h=d.partIndex;a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=u,a.startOfSegment=c,a.partIndex=h}var p=s[a.mediaIndex],f=p&&"number"==typeof a.partIndex&&p.parts&&p.parts[a.partIndex];if(!p||"number"==typeof a.partIndex&&!f)return null;if("number"!=typeof a.partIndex&&p.parts&&(a.partIndex=0,f=p.parts[0]),!i&&f&&!f.independent)if(0===a.partIndex){var g=s[a.mediaIndex-1],m=g.parts&&g.parts.length&&g.parts[g.parts.length-1];m&&m.independent&&(a.mediaIndex-=1,a.partIndex=g.parts.length-1,a.independent="previous segment")}else p.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(a)},i.generateSegmentInfo_=function(e){var t=e.independent,i=e.playlist,n=e.mediaIndex,r=e.startOfSegment,s=e.isSyncRequest,a=e.partIndex,o=e.forceTimestampOffset,l=e.getMediaInfoForTime,d=i.segments[n],u="number"==typeof a&&d.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||d.resolvedUri,mediaIndex:n,partIndex:u?a:null,isSyncRequest:s,startOfSegment:r,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:u&&u.duration||d.duration,segment:d,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});var p=Ka(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,i){if(null==t||!e.length)return[];var n,r=Math.ceil((t-i+3)*vt.ONE_SECOND_IN_TS);for(n=0;n<e.length&&!(e[n].pts>r);n++);return e.slice(n)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},i.timestampOffsetForSegment_=function(e){return i=(t=e).segmentTimeline,n=t.currentTimeline,r=t.startOfSegment,s=t.buffered,t.overrideCheck||i!==n?i<n?r:s.length?s.end(s.length-1):r:null;var t,i,n,r,s},i.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=fo.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),s=function(e,t,i){return void 0===i&&(i=1),((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(r<=s)){var a=function(e){var t=e.currentTime,i=e.bandwidth,n=e.duration,r=e.segmentDuration,s=e.timeUntilRebuffer,a=e.currentTimeline,o=e.syncController,l=e.master.playlists.filter((function(e){return!fo.isIncompatible(e)})),d=l.filter(fo.isEnabled);d.length||(d=l.filter((function(e){return!fo.isDisabled(e)})));var u=d.filter(fo.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var l=o.getSyncPoint(e,n,a,t)?1:2;return{playlist:e,rebufferingImpact:fo.estimateSegmentRequestTime(r,i,e)*l-s}})),c=u.filter((function(e){return e.rebufferingImpact<=0}));return Il(c,(function(e,t){return Rl(t.playlist,e.playlist)})),c.length?c[0]:(Il(u,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),u[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var o=r-s-a.rebufferingImpact,l=.5;s<=Fa&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*tl.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(e){this.logger_("Aborting "+Ul(e)),this.mediaRequestsAborted+=1},i.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},i.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++){var s=i[r];if(s!==n[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},i.handleTimingInfo_=function(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,s=Vl(t);r[s]=r[s]||{},r[s][i]=n,this.logger_("timinginfo: "+t+" - "+i+" - "+n),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(e,t){var i=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach((function(e){s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)})),Object.keys(s).forEach((function(e){var t=s[e],a=t.startTime,o=t.endTime,l=t.captions,d=i.inbandTextTracks_;i.logger_("adding cues from "+a+" -> "+o+" for "+e),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);var r=t.textTracks().getTrackById(n);if(r)e[i]=r;else{var s=i,a=i,o=!1,l=(t.options_.vhs&&t.options_.vhs.captionServices||{})[n];l&&(s=l.label,a=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,default:o,label:s,language:a},!1).track}}}(d,i.vhs_.tech_,e),Ml(a,o,d[e]),function(e){var t=e.inbandTextTracks,i=e.captionArray,n=e.timestampOffset;if(i){var s=r().WebKitDataCue||r().VTTCue;
vendor: 4,156 bytes, line 2
2i.forEach((function(e){var i=e.stream;t[i].addCue(new s(e.startTime+n,e.endTime+n,e.text))}))}}({captionArray:l,inbandTextTracks:d,timestampOffset:n})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},i.handleId3_=function(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,i){e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,i,this.vhs_.tech_),function(e){var t=e.inbandTextTracks,i=e.metadataArray,n=e.timestampOffset,s=e.videoDuration;if(i){var a=r().WebKitDataCue||r().VTTCue,o=t.metadataTrack_;if(o&&(i.forEach((function(e){var t=e.cueTime+n;!("number"!=typeof t||r().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var i=new a(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Oa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Oa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Oa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(i),o.addCue(i)}))})),o.cues&&o.cues.length)){for(var l=o.cues,d=[],u=0;u<l.length;u++)l[u]&&d.push(l[u]);var c=d.reduce((function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),h=Object.keys(c).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var i=c[e],n=Number(h[t+1])||s;i.forEach((function(e){e.endTime=n}))}))}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},i.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},i.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!(!e||this.getCurrentMediaInfo_()&&Fl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},i.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var i=t.hasAudio,n=t.hasVideo,r=t.isMuxed;return!(n&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!r&&!e.audioTimingInfo||Fl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.ke
vendor: 15,011 bytes, line 2
2y,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Vl(t.type)].start;else{var n,r=this.getCurrentMediaInfo_(),s="main"===this.loaderType_&&r&&r.hasVideo;s&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});var a=this.chooseNextRequest_();if(a.mediaIndex!==i.mediaIndex||a.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},i.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},i.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,n=e.map,r=e.playlist;if(n){var s=Ho(n);if(this.activeInitSegmentId_===s)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=s}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,i):null},i.handleQuotaExceededError_=function(e,t){var i=this,n=e.segmentInfo,s=e.type,a=e.bytes,o=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Xa(o).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Xa(l).join(", "));var d=o.length?o.start(0):0,u=o.length?o.end(o.length-1):0,c=l.length?l.start(0):0,h=l.length?l.end(l.length-1):0;if(u-d<=1&&h-c<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+a.byteLength+", audio buffer: "+Xa(o).join(", ")+", video buffer: "+Xa(l).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:n,type:s,bytes:a}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){i.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=r().setTimeout((function(){i.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),i.quotaExceededErrorRetryTimeout_=null,i.processCallQueue_()}),1e3)}),!0)},i.handleAppendError_=function(e,t){var i=e.segmentInfo,n=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(n+" append of "+r.length+"b failed for segment #"+i.mediaIndex+" in playlist "+i.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:i,type:n,bytes:r}))},i.appendToSourceBuffer_=function(e){var t,i,n,r=e.segmentInfo,s=e.type,a=e.initSegment,o=e.data,l=e.bytes;if(!l){var d=[o],u=o.byteLength;a&&(d.unshift(a),u+=a.byteLength),n=0,(t={bytes:u,segments:d}).bytes&&(i=new Uint8Array(t.bytes),t.segments.forEach((function(e){i.set(e,n),n+=e.byteLength}))),l=i}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:s,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:r,type:s,bytes:l}))},i.handleSegmentTimingInfo_=function(e,t,i){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment,r=e+"TimingInfo";n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}},i.appendData_=function(e,t){var i=t.type,n=t.data;if(n&&n.byteLength&&("audio"!==i||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:n})}},i.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var i=o({},e,{forceTimestampOffset:!0});o(e,t.generateSegmentInfo_(i)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},i.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var i=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,a=n||r&&s;this.logger_("Requesting "+Ul(e)),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Sl({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(i){var n=i.message,r=i.level,s=i.stream;t.logger_(Ul(e)+" logged from transmuxer stream "+s+" as a "+r+": "+n)}})},i.trimBackBuffer_=function(e){var t=function(e,t,i){var n=t-tl.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));var r=t-i;return Math.min(r,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},i.createSimplifiedSegmentObj_=function(e){var t=e.segment,i=e.part,n={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var s=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=s}return t.map&&(n.map=this.initSegmentForMap(t.map)),n},i.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime,this.mediaRequests<=4)&&(this.mediaRequests,this.mediaBytesTransferred,this.mediaTransferDuration)},i.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Bl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Bl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},i.segmentRequestFinished_=function(e,t,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===fl)return;return this.pause(),e.code===pl?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var n=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}},i.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},i.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},i.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,n=e.mediaIndex,r=e.firstVideoFrameTimeForData,s=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,o=e.videoTimingInfo,l=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return l.start;var d=i.segments[n-1];return 0!==n&&d&&void 0!==d.start&&d.end===r+s?o.start:r},i.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var i=t.hasAudio,n=t.hasVideo,r=t.isMuxed,s="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},i.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},i.checkForIllegalMediaSwitch=function(e){var t=function(e,t,i){return"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},i.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},i.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)},i.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=function(e,t){if("hls"!==t)return null;var i,n,s=(i={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},n=0,["video","audio"].forEach((function(e){var t=i[e+"TimingInfo"];if(t){var s,a=t.start,o=t.end;"bigint"==typeof a||"bigint"==typeof o?s=r().BigInt(o)-r().BigInt(a):"number"==typeof a&&"number"==typeof o&&(s=o-a),void 0!==s&&s>n&&(n=s)}})),"bigint"==typeof n&&n<Number.MAX_SAFE_INTEGER&&(n=Number(n)),n);if(!s)return null;var a=e.playlist.targetDuration,o=ql({segmentDuration:s,maxDuration:2*a}),l=ql({segmentDuration:s,maxDuration:a}),d="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+s+" when the reported duration is "+e.duration+" and the target duration is "+a+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return o||l?{severity:o?"warn":"info",message:d}:null}(e,this.sourceType_);if(t&&("warn"===t.severity?Oa.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+Ul(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var i=e.segment,n=e.part,s=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,a=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(s||a)return this.logger_("bad "+(s?"segment":"part")+" "+Ul(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_
vendor: 5,482 bytes, line 2
2(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Ul(e))},i.recordThroughput_=function(e){if(e.duration<Bl)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Bl);else{var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},i.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(xl(i)&&xl(n)){Ml(i,n,this.segmentMetadataTrack_);var s=r().WebKitDataCue||r().VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},o=new s(i,n,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}},t}(Oa.EventTarget);function Hl(){}var Gl,Wl=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Xl=["video","audio"],Kl=function(e,t){var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},zl=function e(t,i){if(0!==i.queue.length){var n=0,r=i.queue[n];if("mediaSource"!==r.type){if("mediaSource"!==t&&i.ready()&&"closed"!==i.mediaSource.readyState&&!Kl(t,i)){if(r.type!==t){if(n=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null}(t,i.queue),null===n)return;r=i.queue[n]}return i.queue.splice(n,1),i.queuePending[t]=r,r.action(t,i),r.doneFn?void 0:(i.queuePending[t]=null,void e(t,i))}}else i.updating()||"closed"===i.mediaSource.readyState||(i.queue.shift(),r.action(i),r.doneFn&&r.doneFn(),e("audio",i),e("video",i))}},Yl=function(e,t){var i=t[e+"Buffer"],n=Wl(e);i&&(i.removeEventListener("updateend",t["on"+n+"UpdateEnd_"]),i.removeEventListener("error",t["on"+n+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Ql=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Jl=function(e,t,i){return function(n,r){var s=r[n+"Buffer"];if(Ql(r.mediaSource,s)){r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+n+"Buffer");try{s.appendBuffer(e)}catch(e){r.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+n+"Buffer"),r.queuePending[n]=null,i(e)}}}},$l=function(e,t){return function(i,n){var r=n[i+"Buffer"];if(Ql(n.mediaSource,r)){n.logger_("Removing "+e+" to "+t+" from "+i+"Buffer");try{r.remove(e,t)}catch(r){n.logger_("Remove "+e+" to "+t+" from "+i+"Buffer failed")}}}},Zl=function(e){return function(t,i){var n=i[t+"Buffer"];Ql(i.mediaSource,n)&&(i.logger_("Setting "+t+"timestampOffset to "+e),n.timestampOffset=e)}},ed=function(e){return function(t,i){e()}},td=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Oa.log.warn("Failed to call media source endOfStream",e)}}}},id=function(e,t){return function(i){var n=Wl(e),r=H(t);i.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var s=i.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",i["on"+n+"UpdateEnd_"]),s.addEventListener("error",i["on"+n+"Error_"]),i.codecs[e]=t,i[e+"Buffer"]=s}},nd=function(e){return function(t){var i=t[e+"Buffer"];if(Yl(e,t),Ql(t.mediaSource,i)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(i)}catch(t){Oa.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},rd=function(e){return function(t,i){var n=i[t+"Buffer"],r=H(e);Ql(i.mediaSource,n)&&i.codecs[t]!==e&&(i.logger_("changing "+t+"Buffer codec from "+i.codecs[t]+" to "+e),n.changeType(r),i.codecs[t]=e)}},sd=function(e){var t=e.type,i=e.sourceUpdater,n=e.action,r=e.doneFn,s=e.name;i.queue.push({type:t,action:n,doneFn:r,name:s}),zl(t,i)},ad=function(e,t){return function(i){if(t.queuePending[e]){var n=t.queuePending[e].doneFn;t.queuePending[e]=null,n&&n(t[e+"Error_"])}zl(e,t)}},od=function(e){function t(t){var i;return(i=e.call(this)||this).mediaSource=t,i.sourceopenListener_=function(){return zl("mediaSource",(0,u.A)(i))},i.mediaSource.addEventListener("sourceopen",i.sourceopenListener_),i.logger_=Va("SourceUpdater"),i.audioTimestampOffset_=0,i.videoTimestampOffset_=0,i.queue=[],i.queuePending={audio:null,video:null},i.delayedAudioAppendQueue_=[],i.videoAppendQueued_=!1,i.codecs={},i.onVideoUpdateEnd_=ad("video",(0,u.A)(i)),i.onAudioUpdateEnd_=ad("audio",(0,u.A)(i)),i.onVideoError_=function(e){i.videoError_=e},i.onAudioError_=function(e){i.audioError_=e},i.createdSourceBuffers_=!1,i.initializedEme_=!1,i.triggeredReady_=!1,i}h(t,e);var i=t.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
2,i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(e,t){sd({type:"mediaSource",sourceUpdater:this,action:id(e,t),name:"addSourceBuffer"})},i.abort=function(e){sd({type:e,sourceUpdater:this,action:function(e,t){if("open"===t.mediaSource.readyState){var i=t[e+"Buffer"];if(Ql(t.mediaSource,i)){t.logger_("calling abort on "+e+"Buffer");try{i.abort()}catch(t){Oa.log.warn("Failed to abort on "+e+"Buffer",t)}}}},name:"abort"})},i.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?sd({type:"mediaSource",sourceUpdater:this,action:nd(e),name:"removeSourceBuffer"}):Oa.log.error("removeSourceBuffer is not supported!")},i.canRemoveSourceBuffer=function(){return!Oa.browser.IE_VERSION&&!Oa.browser.IS_FIREFOX&&r().MediaSource&&r().MediaSource.prototype&&"function"==typeof r().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return r().SourceBuffer&&r().SourceBuffer.prototype&&"function"==typeof r().SourceBuffer.prototype.changeType},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(e,t){this.canChangeType()?sd({type:e,sourceUpdater:this,action:rd(t),name:"changeType"}):Oa.log.error("changeType is not supported!")},i.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(i){var n=e[i];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(i,n);t.canChangeType()&&t.changeType(i,n)}))},i.appendBuffer=function(e,t){var i=this,n=e.segmentInfo,r=e.type,s=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+s.length+" until video append");if(sd({type:r,sourceUpdater:this,action:Jl(s,n||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){i.appendBuffer.apply(i,e)}))}},i.audioBuffered=function(){return Ql(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Oa.createTimeRange()},i.videoBuffered=function(){return Ql(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Oa.createTimeRange()},i.buffered=function(){var e=Ql(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Ql(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var i=null,n=null,r=0,s=[],a=[];if(!(e&&e.length&&t&&t.length))return Oa.createTimeRange();for(var o=e.length;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?2==++r&&(i=s[o].time):"end"===s[o].type&&1==--r&&(n=s[o].time),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return Oa.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(e,t){var i;void 0===t&&(t=Hl),sd({type:"mediaSource",sourceUpdater:this,action:(i=e,function(e){e.logger_("Setting mediaSource duration to "+i);try{e.mediaSource.duration=i}catch(e){Oa.log.warn("Failed to set media source duration",e)}}),name:"duration",doneFn:t})},i.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=Hl),"string"!=typeof e&&(e=void 0),sd({type:"mediaSource",sourceUpdater:this,action:td(e),name:"endOfStream",doneFn:t})},i.removeAudio=function(e,t,i){void 0===i&&(i=Hl),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?sd({type:"audio",sourceUpdater:this,action:$l(e,t),doneFn:i,name:"remove"}):i()},i.removeVideo=function(e,t,i){void 0===i&&(i=Hl),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?sd({type:"video",sourceUpdater:this,action:$l(e,t),doneFn:i,name:"remove"}):i()},i.updating=function(){return!(!Kl("audio",this)&&!Kl("video",this))},i.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(sd({type:"audio",sourceUpdater:this,action:Zl(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},i.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(sd({type:"video",sourceUpdater:this,action:Zl(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},i.audioQueueCallback=function(e){this.audioBuffer&&sd({type:"audio",sourceUpdater:this,action:ed(e),name:"callback"})},i.videoQueueCallback=function(e){this.videoBuffer&&sd({type:"video",sourceUpdater:this,action:ed(e),name:"callback"})},i.dispose=function(){var e=this;this.trigger("dispose"),Xl.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Yl(t,e)}))}
vendor: 4,312 bytes, line 2
2)),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Oa.EventTarget),ld=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},dd=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),ud=function(e){function t(t,i){var n;return void 0===i&&(i={}),(n=e.call(this,t,i)||this).mediaSource_=null,n.subtitlesTrack_=null,n.loaderType_="subtitle",n.featuresNativeTextTracks_=t.featuresNativeTextTracks,n.shouldSaveSegmentTimingInfo_=!1,n}h(t,e);var i=t.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Oa.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Oa.createTimeRanges([[t,i]])},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Ho(e),n=this.initSegments_[i];if(t&&!n&&e.bytes){var r=dd.byteLength+e.bytes.byteLength,s=new Uint8Array(r);s.set(e.bytes),s.set(dd,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},i.remove=function(e,t){Ml(e,t,this.subtitlesTrack_)},i.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline))return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}},i.timestampOffsetForSegment_=function(){return null},i.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},i.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},i.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(e,t,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===pl&&this.handleTimeout_(),e.code===fl?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),this.state="APPENDING",this.trigger("appending");var a=s.segment;if(a.map&&(a.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!=typeof r().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,l=function(){n.subtitlesTrack_.tech_.off("vttjsloaded",o),n.stopForError({message:"Error loading vtt.js"})};return o=function(){n.subtitlesTrack_.tech_.off("vttjserror",l),n.segmentRequestFinished_(e,t,i)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",l)}a.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,s.cues.forEach((function(e){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new(r().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var i=0;i<t.length;i++){for(var n=[],r=0,s=0;s<t.length;s++)t[i].startTime===t[s].startTime&&t[i].endTime===t[s].endTime&&t[i].text===t[s].text&&++r>1&&n.push(t[s]);
vendor: 4,418 bytes, line 2
2n.length&&n.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(e){var t,i=!1;"function"==typeof r().TextDecoder?t=new(r().TextDecoder)("utf8"):(t=r().WebVTT.StringDecoder(),i=!0);var n=new(r().WebVTT.Parser)(r(),r().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){e.timestampmap=t},n.onparsingerror=function(e){Oa.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var s=e.segment.map.bytes;i&&(s=ld(s)),n.parse(s)}var a=e.bytes;i&&(a=ld(a)),n.parse(a),n.flush()},i.updateTimeMapping_=function(e,t,i){var n=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,s=r.MPEGTS/vt.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=s,e.endTime+=s})),!i.syncInfo){var a=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(a,o-n.duration)}}}else n.empty=!0},t}(jl),cd=function(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},hd=[{name:"VOD",run:function(e,t,i,n,r){return i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var s=null,a=null,o=Ja(t);r=r||0;for(var l=0;l<o.length;l++){var d=o[t.endList||0===r?l:o.length-(l+1)],u=d.segment,c=e.timelineToDatetimeMappings[u.timeline];if(c&&u.dateTimeObject){var h=u.dateTimeObject.getTime()/1e3+c;if(u.parts&&"number"==typeof d.partIndex)for(var p=0;p<d.partIndex;p++)h+=u.parts[p].duration;var f=Math.abs(r-h);if(null!==a&&(0===f||a<f))break;a=f,s={time:h,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}}return s}},{name:"Segment",run:function(e,t,i,n,r){var s=null,a=null;r=r||0;for(var o=Ja(t),l=0;l<o.length;l++){var d=o[t.endList||0===r?l:o.length-(l+1)],u=d.segment,c=d.part&&d.part.start||u&&u.start;if(u.timeline===n&&void 0!==c){var h=Math.abs(r-c);if(null!==a&&a<h)break;(!s||null===a||a>=h)&&(a=h,s={time:c,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],d=t.discontinuitySequence+o+1,u=e.discontinuities[d];if(u){var c=Math.abs(r-u.time);if(null!==a&&a<c)break;(!s||null===a||a>=c)&&(a=c,s={time:u.time,segmentIndex:l,partIndex:null})}}return s}},{name:"Playlist",run:function(e,t,i,n,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],pd=function(e){function t(t){var i;return(i=e.call(this)||this).timelines=[],i.discontinuities=[],i.timelineToDatetimeMappings={},i.logger_=Va("SyncController"),i}h(t,e);var i=t.prototype;return i.getSyncPoint=function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null},i.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+no({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))},i.runStrategies_=function(e,t,i,n){for(var r=[],s=0;s<hd.length;s++){var a=hd[s],o=a.run(this,e,t,i,n);o&&(o.strategy=a.name,r.push({strategy:a.name,syncPoint:o}))}return r},i.selectSyncPoint_=function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,s=1;s<e.length;s++){var a=Math.abs(e[s].syncPoint[t.key]-t.value);a<n&&(n=a,i=e[s].syncPoint,r=e[s].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+("number"==typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i},i.saveExpiredSegmentInfo=function(e,t){var i=t.mediaSequence-e.mediaSequence;if(i>86400)Oa.log.warn("Not saving expired segment info. Media sequence gap "+i+" is too large.");else for(var n=i-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start}
vendor: 12,556 bytes, line 2
2,this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},i.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}},i.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,i=e.shouldSaveTimelineMapping,n=this.calculateSegmentTimeMapping_(t,t.timingInfo,i),r=t.segment;n&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var s=r.dateTimeObject;r.discontinuity&&i&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)},i.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},i.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},i.calculateSegmentTimeMapping_=function(e,t,i){var n,r,s=e.segment,a=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),n=e.startOfSegment,r=t.end+o.mapping;else{if(!o)return!1;n=t.start+o.mapping,r=t.end+o.mapping}return a&&(a.start=n,a.end=r),(!s.start||n<s.start)&&(s.start=n),s.end=r,!0},i.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){var l;l=a<0?i.start-no({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):i.end+no({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:l,accuracy:o}}}},i.dispose=function(){this.trigger("dispose"),this.off()},t}(Oa.EventTarget),fd=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}h(t,e);var i=t.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return"number"==typeof i&&"number"==typeof n&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return"number"==typeof i&&"number"==typeof n&&(this.lastTimelineChanges_[t]={type:t,from:i,to:n},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Oa.EventTarget),gd=rl(sl((function(){function e(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var t=e((function(e){function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0})),i=e((function(e){function t(i,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(i,n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),n=e((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),s=null,a=function(){function e(e){var t,i,n;s||(s=function(){var e,t,i,n,r,s,a,o,l=[[[],[],[],[],[]],[[],[],[],[],[]]],d=l[0],u=l[1],c=d[4],h=u[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=i=0;!c[t];t^=n||1,i=f[i]||1)for(s=(s=i^i<<1^i<<2^i<<3^i<<4)>>8^255&s^99,c[t]=s,h[s]=t,o=16843009*p[r=p[n=p[t]]]^65537*r^257*n^16843008*t,a=257*p[s]^16843008*s,e=0;e<4;e++)d[e][t]=a=a<<24^a>>>8,u[e][s]=o=o<<24^o>>>8;for(e=0;e<5;e++)d[e]=d[e].slice(0),u[e]=u[e].slice(0);return l}()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],o=e.length,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var d=e.slice(0),u=[];for(this._key=[d,u],t=o;t<4*o+28;t++)n=d[t-1],(t%o==0||8===o&&t%o==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],t%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),d[t]=d[t-o]^n;for(i=0;t;i++,t--)n=d[3&i?t:t-4],u[i]=t<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return e.prototype.decrypt=function(e,t,i,n,r,s){var a,o,l,d,u=this._key[1],c=e^u[0],h=n^u[1],p=i^u[2],f=t^u[3],g=u.length/4-2,m=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(d=0;d<g;d++)a=y[c>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^u[m],o=y[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&c]^u[m+1],l=y[p>>>24]^_[f>>16&255]^b[c>>8&255]^T[255&h]^u[m+2],f=y[f>>>24]^_[c>>16&255]^b[h>>8&255]^T[255&p]^u[m+3],m+=4,c=a,h=o,p=l;for(d=0;d<4;d++)r[(3&-d)+s]=S[c>>>24]<<24^S[h>>16&255]<<16^S[p>>8&255]<<8^S[255&f]^u[m++],a=c,c=h,h=p,p=f,f=a},e}(),o=function(e){function t(){var t;return(t=e.call(this,r)||this).jobs=[],t.delay=1,t.timeout_=null,t}n(t,e);var i=t.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(r),l=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},d=function(){function e(t,i,n,r){var s=e.STEP,a=new Int32Array(t.buffer),d=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),i,n,d)),u=s;u<a.length;u+=s)n=new Uint32Array([l(a[u-4]),l(a[u-3]),l(a[u-2]),l(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),i,n,d));this.asyncStream_.push((function(){var e;r(null,(e=d).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,i,n){return function(){var r=function(e,t,i){var n,r,s,o,d,u,c,h,p,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),g=new a(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),v=new Int32Array(m.buffer);for(n=i[0],r=i[1],s=i[2],o=i[3],p=0;p<f.length;p+=4)d=l(f[p]),u=l(f[p+1]),c=l(f[p+2]),h=l(f[p+3]),g.decrypt(d,u,c,h,v,p),v[p]=l(v[p]^n),v[p+1]=l(v[p+1]^r),v[p+2]=l(v[p+2]^s),v[p+3]=l(v[p+3]^o),n=d,r=u,s=c,o=h;return m}(e,t,i);n.set(r,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();self.onmessage=function(e){var t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new d(i,n,r,(function(e,i){var n,r;self.postMessage((n={source:t.source,decrypted:i},r={},Object.keys(n).forEach((function(e){var t=n[e];ArrayBuffer.isView(t)?r[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:r[e]=t})),r),[i.buffer])}))}}))),md=nl(gd),vd=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},yd=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},_d=function(e,t){t.activePlaylistLoader=e,e.load()},bd={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;yd(i,n);var s=n.activeTrack(),a=n.activeGroup(),o=(a.filter((function(e){return e.default}))[0]||a[0]).id,l=n.tracks[o];if(s!==l){for(var d in Oa.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),n.tracks)n.tracks[d].enabled=n.tracks[d]===l;n.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e];Oa.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),yd(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}},Td={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",bd[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[e],a=i.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",bd[e](e,i))}},Sd={AUDIO:function(e,t){var i=t.vhs,n=t.sourceType,r=t.segmentLoaders[e],s=t.requestOptions,a=t.master.mediaGroups,o=t.mediaTypes[e],l=o.groups,d=o.tracks,u=o.logger_,c=t.masterPlaylistLoader,h=po(c.master);for(var p in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=c.master.playlists)),a[e])for(var f in l[p]||(l[p]=[]),a[e][p]){var g=a[e][p][f],m=void 0;if(h?(u("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),g.isMasterPlaylist=!0,m=null):m="vhs-json"===n&&g.playlists?new Lo(g.playlists[0],i,s):g.resolvedUri?new Lo(g.resolvedUri,i,s):g.playlists&&"dash"===n?new el(g.playlists[0],i,s,c):null,g=Oa.mergeOptions({id:f,playlistLoader:m},g),Td[e](e,g.playlistLoader,t),l[p].push(g),void 0===d[f]){var v=new Oa.AudioTrack({id:f,kind:vd(g),enabled:!1,language:g.language,default:g.default,label:f});d[f]=v}}r.on("error",bd[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.vhs,r=t.sourceType,s=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[e],d=l.groups,u=l.tracks,c=t.masterPlaylistLoader;for(var h in o[e])for(var p in d[h]||(d[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],g=void 0;if("hls"===r)g=new Lo(f.resolvedUri,n,a);else if("dash"===r){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;g=new el(f.playlists[0],n,a,c)}else"vhs-json"===r&&(g=new Lo(f.playlists?f.playlists[0]:f.resolvedUri,n,a));if(f=Oa.mergeOptions({id:p,playlistLoader:g},f),Td[e](e,f.playlistLoader,t),d[h].push(f),void 0===u[p]){var m=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;u[p]=m}}s.on("error",bd[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,a=r.tracks;for(var o in n[e])for(var l in s[o]||(s[o]=[]),n[e][o]){var d=n[e][o][l];if(/^(?:CC|SERVICE)/.test(d.instreamId)){var u=i.options_.vhs&&i.options_.vhs.captionServices||{},c={label:l,language:d.language,instreamId:d.instreamId,default:d.default&&d.autoselect};if(u[c.instreamId]&&(c=Oa.mergeOptions(c,u[c.instreamId])),void 0===c.default&&delete c.default,s[o].push(Oa.mergeOptions({id:l},d)),void 0===a[l]){var h=i.addRemoteTextTrack({id:c.instreamId,
vendor: 8,715 bytes, line 2
2kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;a[l]=h}}}}},Ed=function e(t,i){for(var n=0;n<t.length;n++){if(co(i,t[n]))return!0;if(t[n].playlists&&e(t[n].playlists,i))return!0}return!1},Ad={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if("showing"===i[n].mode||"hidden"===i[n].mode)return i[n];return null}}},wd=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Pd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Cd=function(e){function t(t){var i;i=e.call(this)||this;var n=t.src,s=t.handleManifestRedirects,a=t.withCredentials,o=t.tech,l=t.bandwidth,d=t.externVhs,c=t.useCueTags,h=t.blacklistDuration,p=t.enableLowInitialPlaylist,f=t.sourceType,g=t.cacheEncryptionKeys,m=t.experimentalBufferBasedABR,v=t.experimentalLeastPixelDiffSelector,y=t.captionServices;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");var _=t.maxPlaylistRetries;null==_&&(_=1/0),Gl=d,i.experimentalBufferBasedABR=Boolean(m),i.experimentalLeastPixelDiffSelector=Boolean(v),i.withCredentials=a,i.tech_=o,i.vhs_=o.vhs,i.sourceType_=f,i.useCueTags_=c,i.blacklistDuration=h,i.maxPlaylistRetries=_,i.enableLowInitialPlaylist=p,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:a,handleManifestRedirects:s,maxPlaylistRetries:_,timeout:null},i.on("error",i.pauseLoading),i.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hl,activeTrack:Hl,getActiveGroup:Hl,onGroupChanged:Hl,onTrackChanged:Hl,lastTrack_:null,logger_:Va("MediaGroups["+t+"]")}})),e}(),i.mediaSource=new(r().MediaSource),i.handleDurationChange_=i.handleDurationChange_.bind((0,u.A)(i)),i.handleSourceOpen_=i.handleSourceOpen_.bind((0,u.A)(i)),i.handleSourceEnded_=i.handleSourceEnded_.bind((0,u.A)(i)),i.mediaSource.addEventListener("durationchange",i.handleDurationChange_),i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_),i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_),i.seekable_=Oa.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new pd(t),i.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new md,i.sourceUpdater_=new od(i.mediaSource),i.inbandTextTracks_={},i.timelineChangeController_=new fd;var b={vhs:i.vhs_,parse708captions:t.parse708captions,captionServices:y,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.duration()},hasPlayed:function(){return i.hasPlayed_},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:l,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};i.masterPlaylistLoader_="dash"===i.sourceType_?new el(n,i.vhs_,i.requestOptions_):new Lo(n,i.vhs_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new jl(Oa.mergeOptions(b,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),t),i.audioSegmentLoader_=new jl(Oa.mergeOptions(b,{loaderType:"audio"}),t),i.subtitleSegmentLoader_=new ud(Oa.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),t),i.setupSegmentLoaderListeners_(),i.experimentalBufferBasedABR&&(i.masterPlaylistLoader_.one("loadedplaylist",(function(){return i.startABRTimer_()})),i.tech_.on("pause",(function(){return i.stopABRTimer_()})),i.tech_.on("play",(function(){return i.startABRTimer_()}))),wd.forEach((function(e){i[e+"_"]=Pd.bind((0,u.A)(i),e)})),i.logger_=Va("MPC"),i.triggeredFmp4Usage=!1,"none"===i.tech_.preload()?(i.loadOnPlay_=function(){i.loadOnPlay_=null,i.masterPlaylistLoader_.load()},i.tech_.one("play",i.loadOnPlay_)):i.masterPlaylistLoader_.load(),i.timeToLoadedData__=-1,i.mainAppendsToLoadedData__=-1,i.audioAppendsToLoadedData__=-1;var T="none"===i.tech_.preload()?"play":"loadstart";return i.tech_.one(T,(function(){var e=Date.now();i.tech_.one("loadeddata",(function(){i.timeToLoadedData__=Date.now()-e,i.mainAppendsToLoadedData__=i.mainSegmentLoader_.mediaAppends,i.audioAppendsToLoadedData__=i.audioSegmentLoader_.mediaAppends}))})),i}h(t,e);var i=t.prototype;return i.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},i.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},i.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},i.timeToLoadedData_=function(){return this.timeToLoadedData__},i.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},i.switchMedia_=function(e,t,i){var n=this.media(),r=n&&(n.id||n.uri),s=e.id||e.uri;r&&r!==s&&(this.logger_("switch media "+r+" -> "+s+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,i)},i.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=r().setInterval((function(){return e.checkABR_()}),250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r().clearInterval(this.abrTimer_),this.abrTimer_=null)},i.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var i,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)i=this.mediaTypes_.AUDIO.activeTrack();else{var s=n.main||r.length&&n[r[0]];for(var a in s)if(s[a].default){i={label:a};break}}if(!i)return t;var o=[];for(var l in n)if(n[l][i.label]){var d=n[l][i.label];if(d.playlists&&d.playlists.length)o.push.apply(o,d.playlists);else if(d.uri)o.push(d);else if(e.playlists.length)for(var u=0;u<e.playlists.length;u++){var c=e.playlists[u];c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===l&&o.push(c)}}return o.length?o:t},i.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;uo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Sd[t](t,e)}));var t=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.vhs,s=e.segmentLoaders,a=s.AUDIO,o=s.main;["AUDIO","SUBTITLES"].forEach((function(i){t[i].activeGroup=function(e,t){return function(i){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,s=n.media();if(!s)return null;var a=null;s.attributes[e]&&(a=r[s.attributes[e]]);var o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&po(t.master))for(var l=0;l<o.length;l++){var d=r[o[l]];if(Ed(d,s)){a=d;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((function(e){return e.id===i.id}))[0]||null}}(i,e),t[i].activeTrack=Ad[i](i,e),t[i].onGroupChanged=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,s=t.mediaTypes[e],a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,d=s.lastGroup_;o&&d&&o.id===d.id||(s.lastGroup_=o,s.lastTrack_=a,yd(n,s),o&&!o.isMasterPlaylist&&(o.playlistLoader?(n.resyncLoader(),_d(o.playlistLoader,s)):l&&r.resetEverything()))}}(i,e),t[i].onGroupChanging=function(e,t){return function(){var i=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,i.abort(),i.pause()}}(i,e),t[i].onTrackChanged=function(e,t){return function(){var i=t.masterPlaylistLoader,n=t.segmentLoaders,r=n[e],s=n.main,a=t.mediaTypes[e],o=a.activeTrack(),l=a.getActiveGroup(),d=a.activePlaylistLoader,u=a.lastTrack_;if((!u||!o||u.id!==o.id)&&(a.lastGroup_=l,a.lastTrack_=o,yd(r,a),l)){if(l.isMasterPlaylist){if(!o||!u||o.id===u.id)return;var c=t.vhs.masterPlaylistController_,h=c.selectPlaylist();if(c.media()===h)return;return a.logger_("track change. Switching master audio from "+u.id+" to "+o.id),i.pause(),s.resetEverything(),void c.fastQualityChange_(h)}
vendor: 16,910 bytes, line 2
2if("AUDIO"===e){if(!l.playlistLoader)return s.setAudio(!0),void s.resetEverything();r.setAudio(!0),s.setAudio(!1)}d!==l.playlistLoader?(r.track&&r.track(o),r.resetEverything(),_d(l.playlistLoader,a)):_d(l.playlistLoader,a)}}}(i,e),t[i].getActiveGroup=function(e,t){var i=t.mediaTypes;return function(){var t=i[e].activeTrack();return t?i[e].activeGroup(t):null}}(i,e)}));var l=t.AUDIO.activeGroup();if(l){var d=(l.filter((function(e){return e.default}))[0]||l[0]).id;t.AUDIO.tracks[d].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}i.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),i.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var u=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"}),n.trigger({type:"usage",name:"hls-audio-change"})};for(var c in n.audioTracks().addEventListener("change",u),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(function(){n.audioTracks().removeEventListener("change",u),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio"),t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[c])}({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(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var i;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(i=e.selectInitialPlaylist()),i||(i=e.selectPlaylist()),!i||!e.shouldSwitchToMedia_(i))return;if(e.initialMedia_=i,e.switchMedia_(e.initialMedia_,"initial"),"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(),i=1.5*t.targetDuration*1e3;uo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,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();"playlist-unchanged"!==t.lastExcludeReason_&&e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),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"})}))},i.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())},i.triggerPresenceUsage_=function(e,t){var i=e.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var s in i.AUDIO)for(var a in i.AUDIO[s])i.AUDIO[s][a].uri||(n=!1);n&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(i.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Gl.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(i.AUDIO[r[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"}))},i.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,i=e.buffered,n=e.currentTime,r=e.nextPlaylist,s=e.bufferLowWaterLine,a=e.bufferHighWaterLine,o=e.duration,l=e.experimentalBufferBasedABR,d=e.log;if(!r)return Oa.log.warn("We received no playlist to switch to. Please check your stream."),!1;var u="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return d(u+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var c=Boolean(Ha(i,n).length);if(!t.endList)return c||"number"!=typeof t.partTargetDuration?(d(u+" as current playlist is live"),!0):(d("not "+u+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=za(i,n),p=l?tl.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:tl.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return d(u+" as duration < max low water line ("+o+" < "+p+")"),!0;var f=r.attributes.BANDWIDTH,g=t.attributes.BANDWIDTH;if(f<g&&(!l||h<a)){var m=u+" as next bandwidth < current bandwidth ("+f+" < "+g+")";return l&&(m+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+a+")"),d(m),!0}if((!l||f>g)&&h>=s){var v=u+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+s+")";return l&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+g+")"),d(v),!0}return d("not "+u+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),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()}))},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},i.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Oa.browser.IE_VERSION||Oa.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},i.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}},i.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(Oa.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},i.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")},i.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}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")},i.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},i.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var i=Gl.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=qa;var s=r.end(r.length-1);return s-n<=qa&&i-s<=qa},i.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var i=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!i)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));i.playlistErrors_++;var n,r=this.masterPlaylistLoader_.master.playlists,s=r.filter(oo),a=1===s.length&&s[0]===i;if(1===r.length&&t!==1/0)return Oa.log.warn("Problem encountered with playlist "+i.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var o=!1;r.forEach((function(e){if(e!==i){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(o=!0,delete e.excludeUntil)}})),o&&(Oa.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n=i.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,i.excludeUntil=n,e.reason&&(i.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var d=e.internal?this.logger_:Oa.log.warn,u=e.message?" "+e.message:"";d((e.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+u+" Switching to playlist "+l.id+"."),l.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=l.targetDuration/2*1e3||5e3,h="number"==typeof l.lastRequest&&Date.now()-l.lastRequest<=c;return this.switchMedia_(l,"exclude",a||h)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(e,t){var i=this,n=[],r="all"===e;(r||"main"===e)&&n.push(this.masterPlaylistLoader_);var s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((function(e){var t=i.mediaTypes_[e]&&i.mediaTypes_[e].activePlaylistLoader;t&&n.push(t)})),["main","audio","subtitle"].forEach((function(t){var r=i[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||n.push(r)})),n.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},i.setCurrentTime=function(e){var t=Ha(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},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Gl.Playlist.duration(e):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var n=this.masterPlaylistLoader_.master,r=Gl.Playlist.seekable(t,i,Gl.Playlist.liveEdgeDelay(n,t));if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Gl.Playlist.seekable(t,i,Gl.Playlist.liveEdgeDelay(n,t))).length)return}var s,a;this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Oa.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+Wa(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.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 i=this.tech_.buffered(),n=Gl.Playlist.duration(this.masterPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}},i.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var i=e.mediaTypes_[t].groups;
vendor: 18,403 bytes, line 2
2for(var n in i)i[n].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()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)},i.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};t.video=t.main;var i=Cl(this.master(),this.media()),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(n.video=i.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(n.video+=","+(i.audio||t.main.audioCodec||X)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||r)&&(n.audio=i.audio||t.main.audioCodec||t.audio.audioCodec||X,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),n.audio||n.video){var s,a={};if(["video","audio"].forEach((function(e){if(n.hasOwnProperty(e)&&(r=t[e].isFmp4,o=n[e],!(r?G(o):W(o)))){var i=t[e].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[e]),"audio"===e&&(s=i)}var r,o})),r&&s&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+s+' does not support codec(s): "'+n.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var i=(q(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(q(n[t]||"")[0]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+n[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return n}var d=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:d,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},i.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)}}},i.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,i=[];Object.keys(t).forEach((function(n){var r=t[n];if(-1===i.indexOf(r.id)){i.push(r.id);var s=Cl(e.master,r),a=[];!s.audio||W(s.audio)||G(s.audio)||a.push("audio codec "+s.audio),!s.video||W(s.video)||G(s.video)||a.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&a.push("text codec "+s.text),a.length&&(r.excludeUntil=1/0,e.logger_("excluding "+r.id+" for unsupported: "+a.join(", ")))}}))},i.excludeIncompatibleVariants_=function(e){var t=this,i=[],n=this.master().playlists,r=wl(q(e)),s=Pl(r),a=r.video&&q(r.video)[0]||null,o=r.audio&&q(r.audio)[0]||null;Object.keys(n).forEach((function(e){var r=n[e];if(-1===i.indexOf(r.id)&&r.excludeUntil!==1/0){i.push(r.id);var l=[],d=Cl(t.masterPlaylistLoader_.master,r),u=Pl(d);if(d.audio||d.video){if(u!==s&&l.push('codec count "'+u+'" !== "'+s+'"'),!t.sourceUpdater_.canChangeType()){var c=d.video&&q(d.video)[0]||null,h=d.audio&&q(d.audio)[0]||null;c&&a&&c.type.toLowerCase()!==a.type.toLowerCase()&&l.push('video codec "'+c.type+'" !== "'+a.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&l.push('audio codec "'+h.type+'" !== "'+o.type+'"')}l.length&&(r.excludeUntil=1/0,t.logger_("blacklisting "+r.id+": "+l.join(" && ")))}}}))},i.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var n,s=i,a=0;a<e.segments.length;a++){var o=e.segments[a];if(n||(n=cd(t,s+o.duration/2)),n){if("cueIn"in o){n.endTime=s,n.adEndTime=s,s+=o.duration,n=null;continue}if(s<n.endTime){s+=o.duration;continue}n.endTime+=o.duration}else if("cueOut"in o&&((n=new(r().VTTCue)(s,s+o.duration,o.cueOut)).adStartTime=s,n.adEndTime=s+parseFloat(o.cueOut),t.addCue(n)),"cueOutCont"in o){var l=o.cueOutCont.split("/").map(parseFloat),d=l[0],u=l[1];(n=new(r().VTTCue)(s,s+o.duration,"")).adStartTime=s-d,n.adEndTime=n.adStartTime+u,t.addCue(n)}s+=o.duration}}(e,this.cueTagsTrack_,t)},i.goalBufferLength=function(){var e=this.tech_.currentTime(),t=tl.GOAL_BUFFER_LENGTH,i=tl.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,tl.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)},i.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=tl.BUFFER_LOW_WATER_LINE,i=tl.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,tl.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,tl.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.experimentalBufferBasedABR?r:n)},i.bufferHighWaterLine=function(){return tl.BUFFER_HIGH_WATER_LINE},t}(Oa.EventTarget),Ld=function(e,t,i){var n,r,s,a=e.masterPlaylistController_,o=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes){var l=t.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=Cl(a.master(),t),this.playlist=t,this.id=i,this.enabled=(n=e.playlists,r=t.id,s=o,function(e){var t=n.master.playlists[r],i=ao(t),a=oo(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||i||(s(),e?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),e)})},Dd=["seeking","seeked","pause","playing","error"],kd=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_=Va("PlaybackWatcher"),this.logger_("initialize");var i=function(){return t.monitorCurrentTime_()},n=function(){return t.monitorCurrentTime_()},s=function(){return t.techWaiting_()},a=function(){return t.cancelTimer_()},o=this.masterPlaylistController_,l=["main","subtitle","audio"],d={};l.forEach((function(e){d[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},o[e+"SegmentLoader_"].on("appendsdone",d[e].updateend),o[e+"SegmentLoader_"].on("playlistupdate",d[e].reset),t.tech_.on(["seeked","seeking"],d[e].reset)}));var u=function(e){["main","audio"].forEach((function(i){o[i+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=function(){return u("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(Dd,a),this.tech_.on("canplay",n),this.tech_.one("play",i),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",s),t.tech_.off(Dd,a),t.tech_.off("canplay",n),t.tech_.off("play",i),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),l.forEach((function(e){o[e+"SegmentLoader_"].off("appendsdone",d[e].updateend),o[e+"SegmentLoader_"].off("playlistupdate",d[e].reset),t.tech_.off(["seeked","seeking"],d[e].reset)})),t.checkCurrentTimeTimeout_&&r().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r().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_,i=t[e+"SegmentLoader_"],n=i.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[e+"Buffered_"],n);this[e+"Buffered_"]=n,r?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:Xa(n)}),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_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+qa>=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(),i=this.tech_.currentTime();if(this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,i)){var n=t.start(0);e=n+(n===t.end(0)?0:qa)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+Wa(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var r=this.masterPlaylistController_.sourceUpdater_,s=this.tech_.buffered(),a=r.audioBuffer?r.audioBuffered():null,o=r.videoBuffer?r.videoBuffered():null,l=this.media(),d=l.partTargetDuration?l.partTargetDuration:2*(l.targetDuration-Fa),u=[a,o],c=0;c<u.length;c++)if(u[c]&&za(u[c],i)<d)return!1;var h=Ga(s,i);return 0!==h.length&&(e=h.start(0)+qa,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+i+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Ha(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.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()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.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 s=Ga(r,t);if(s.length>0){var a=s.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+s.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,i,n){if(void 0===n&&(n=!1),!e.length)return!1;var r=e.end(e.length-1)+qa;return!i.endList&&n&&(r=e.end(e.length-1)+3*i.targetDuration),t>r},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,i=e.audioBuffered,n=e.currentTime;if(t){var r;if(t.length&&i.length){var s=Ha(t,n-3),a=Ha(t,n),o=Ha(i,n);o.length&&!a.length&&s.length&&(r={start:s.end(0),end:o.end(0)})}else Ga(t,n).length||(r=this.gapFromVideoUnderflow_(t,n));return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Ga(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Fa),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 i=function(e){if(e.length<2)return Oa.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return Oa.createTimeRanges(t)}(e),n=0;n<i.length;n++){var r=i.start(n),s=i.end(n);if(t-r<4&&t-r>2)return{start:r,end:s}}return null},e}(),Id={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Rd=function e(t,i){var n=0,r=0,s=Oa.mergeOptions(Id,i);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=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())},l=function(){return Date.now()-n<1e3*s.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):s.getSource&&"function"==typeof s.getSource?(n=Date.now(),s.getSource.call(t,o)):void Oa.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function e(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",d),t.reloadSourceOnError=function(i){d(),e(t,i)}},Nd="2.13.1",Od={PlaylistLoader:Lo,Playlist:fo,utils:Xo,STANDARD_PLAYLIST_SELECTOR:Ol,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(fo.isEnabled);return Il(t,(function(e,t){return Rl(e,t)})),t.filter((function(t){return!!Cl(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Ol,movingAverageBandwidthSelector:function(e){var t=-1,i=-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&&r().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Nl(this.playlists.master,t,parseInt(kl(this.tech_.el(),"width"),10)*n,parseInt(kl(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Rl,comparePlaylistResolution:function(e,t){var i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||r().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||r().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:No()};Object.keys(tl).forEach((function(e){Object.defineProperty(Od,e,{get:function(){return Oa.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),tl[e]},set:function(t){Oa.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Oa.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):tl[e]=t}})}));var Md="videojs-vhs",xd=function(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};Od.canPlaySource=function(){return Oa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Bd=function(){if(!r().localStorage)return null;var e=r().localStorage.getItem(Md);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Od.supportsNativeHls=function(){if(!a()||!a().createElement)return!1;var e=a().createElement("video");return!!Oa.getTech("Html5").isSupported()&&["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))}))}(),Od.supportsNativeDash=!!(a()&&a().createElement&&Oa.getTech("Html5").isSupported())&&/maybe|probably/i.test(a().createElement("video").canPlayType("application/dash+xml")),Od.supportsTypeNatively=function(e){return"hls"===e?Od.supportsNativeHls:"dash"===e&&Od.supportsNativeDash},Od.isSupported=function(){return Oa.log.warn("HLS is no longer a tech. Please remove it from your player'
2s techOrder.")};var Ud=function(e){function t(t,i,n){var r;if(r=e.call(this,i,Oa.mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&Oa.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof n.initialBandwidth&&(r.options_.bandwidth=n.initialBandwidth),r.logger_=Va("VhsHandler"),i.options_&&i.options_.playerId){var s=Oa(i.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return Oa.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"hls-player-access"}),(0,u.A)(r)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return Oa.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"vhs-player-access"}),(0,u.A)(r)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return Oa.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),(0,u.A)(r)},configurable:!0}),r.player_=s}if(r.tech_=i,r.source_=t,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(a(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=a().fullscreenElement||a().webkitFullscreenElement||a().mozFullScreenElement||a().msFullscreenElement;t&&t.contains(r.tech_.el())?r.masterPlaylistController_.fastQualityChange_():r.masterPlaylistController_.checkABR_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}h(t,e);var i=t.prototype;return i.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_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Bd();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=tl.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===tl.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(e,t){var i=this;if(e){var n;this.setOptions_(),this.options_.src=0===(n=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(n.substring(n.indexOf(",")+1)):n,this.options_.tech=this.tech_,this.options_.externVhs=Od,this.options_.sourceType=Y(t),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Oa.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new Cd(this.options_);var s=Oa.mergeOptions({liveRangeSafeTimeDelta:qa},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new kd(s),this.masterPlaylistController_.on("error",(function(){var e=Oa.players[i.tech_.options_.playerId],t=i.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var a=this.options_.experimentalBufferBasedABR?Od.movingAverageBandwidthSelector(.55):Od.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Od.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(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=r().navigator.connection||r().navigator.mozConnection||r().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){var n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},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(){Oa.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 i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return i.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return i.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return i.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return Xa(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Xa(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!r().localStorage)return!1;var t=Bd();t=t?Oa.mergeOptions(t,e):e;try{r().localStorage.setItem(Md,JSON.stringify(t))}catch(e){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=i).representations=function(){var t=e.masterPlaylistController_.master(),i=po(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((function(e){return!ao(e)})).map((function(t,i){return new Ld(e,t,t.id)}
2)):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){i.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_=r().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(e){var t=e.player,i=e.sourceKeySystems,n=e.audioMedia,r=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var s,a,o=(s=n?r.concat([n]):r,a=Object.keys(i),s.reduce((function(e,t){if(!t.contentProtection)return e;var i=a.reduce((function(e,i){var n=t.contentProtection[i];return n&&n.pssh&&(e[i]={pssh:n.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[])),l=[],d=[];return o.forEach((function(e){d.push(new Promise((function(e,i){t.tech_.one("keysessioncreated",e)}))),l.push(new Promise((function(i,n){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?n(e):i()}))})))})),Promise.race([Promise.all(l),Promise.race(d)])}({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})}))},i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},i.setupEme_=function(){var e,t,i,n=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,s=(e={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:r&&r.media()},t=e.player,!(!(i=function(e,t,i){if(!e)return e;var n={};t&&t.attributes&&t.attributes.CODECS&&(n=wl(q(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);var r=H(n.video),s=H(n.audio),a={};for(var o in e)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(a[o].url=e[o]);return Oa.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia))||(t.currentSource().keySystems=i,i&&!t.eme&&(Oa.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))));this.player_.tech_.on("keystatuschange",(function(e){"output-restricted"===e.status&&n.masterPlaylistController_.blacklistCurrentPlaylist({playlist:n.masterPlaylistController_.media(),message:"DRM keystatus changed to "+e.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Oa.browser.IE_VERSION&&s?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},i.setupQualityLevels_=function(){var e=this,t=Oa.players[this.tech_.options_.playerId];
vendor: 4,634 bytes, line 2
2t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,i;t=e.qualityLevels_,(i=e).representations().forEach((function(e){t.addQualityLevel(e)})),xd(t,i.playlists)})),this.playlists.on("mediachange",(function(){xd(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":Nd,"mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return od.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.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_&&r().URL.revokeObjectURL&&(r().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},i.convertToProgramTime=function(e,t){return function(e){var t=e.playlist,i=e.time,n=void 0===i?void 0:i,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===n)return r({message:"getProgramTime: playlist and time must be provided"});var s=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i,n=0,r=0;r<t.segments.length&&!(e<=(n=(i=t.segments[r]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration));r++);var s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*s.duration)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(n,t);if(!s)return r({message:"valid programTime was not found"});if("estimate"===s.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var a={mediaSeconds:n},o=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)}(n,s.segment);return o&&(a.programDateTime=o.toISOString()),r(null,a)}({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},i.seekToProgramTime=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=2),Ko({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Oa.getComponent("Component")),Vd={name:"videojs-http-streaming",VERSION:Nd,canHandleSource:function(e,t){void 0===t&&(t={});var i=Oa.mergeOptions(Oa.options,t);return Vd.canPlayType(e.type,i)},handleSource:function(e,t,i){void 0===i&&(i={});var n=Oa.mergeOptions(Oa.options,i);return t.vhs=new Ud(e,t,n),Oa.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Oa.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=No(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var i=Oa.mergeOptions(Oa.options,t),n=i.vhs,r=(n=void 0===n?{}:n).overrideNative,s=void 0===r?!Oa.browser.IS_ANY_SAFARI:r,a=i.hls,o=(a=void 0===a?{}:a).overrideNative,l=void 0!==o&&o,d=Y(e);return d&&(!Od.supportsTypeNatively(d)||l||s)?"maybe":""}};G("avc1.4d400d,mp4a.40.2")&&Oa.getTech("Html5").registerSourceHandler(Vd,0),Oa.VhsHandler=Ud,Object.defineProperty(Oa,"HlsHandler",{get:function(){return Oa.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Ud},configurable:!0}),Oa.VhsSourceHandler=Vd,Object.defineProperty(Oa,"HlsSourceHandler",{get:function(){return Oa.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Vd},configurable:!0}),Oa.Vhs=Od,Object.defineProperty(Oa,"Hls",{get:function(){return Oa.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Od},configurable:!0}),Oa.use||(Oa.registerComponent("Hls",Od),Oa.registerComponent("
2Vhs",Od)),Oa.options.vhs=Oa.options.vhs||{},Oa.options.hls=Oa.options.hls||{},Oa.getPlugin&&Oa.getPlugin("reloadSourceOnError")||(Oa.registerPlugin||Oa.plugin)("reloadSourceOnError",(function(e){Rd(this,e)}));const Fd=Oa},446:function(e,t,i){e.exports=function(e,t){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),r=i(t),s={fullscreen:{enterOnRotate:!0,exitOnRotate:!0,alwaysInLandscapeMode:!0,iOS:!0}},a=r.default.screen;a.lockOrientationUniversal=function(e){return a.orientation&&a.orientation.lock(e).then((function(){}),(function(e){return console.log(e)}))||a.mozLockOrientation&&a.mozLockOrientation(e)||a.msLockOrientation&&a.msLockOrientation(e)};var o=function(){return"number"==typeof r.default.orientation||a&&a.orientation&&a.orientation.angle?r.default.orientation:(n.default.log("angle unknown"),0)},l=function(e){var t=this;(n.default.browser.IS_ANDROID||n.default.browser.IS_IOS)&&this.ready((function(){!function(e,t){e.addClass("vjs-landscape-fullscreen"),t.fullscreen.iOS&&n.default.browser.IS_IOS&&n.default.browser.IOS_VERSION>9&&!e.el_.ownerDocument.querySelector(".bc-iframe")&&(e.tech_.el_.setAttribute("playsinline","playsinline"),e.tech_.supportsFullScreen=function(){return!1});var i=function(){var i=o();90!==i&&270!==i&&-90!==i||t.fullscreen.enterOnRotate&&!1===e.paused()&&(e.requestFullscreen(),a.lockOrientationUniversal("landscape")),0!==i&&180!==i||t.fullscreen.exitOnRotate&&e.isFullscreen()&&e.exitFullscreen()};n.default.browser.IS_IOS?r.default.addEventListener("orientationchange",i):a&&a.orientation&&(a.orientation.onchange=i),e.on("fullscreenchange",(function(i){(n.default.browser.IS_ANDROID||n.default.browser.IS_IOS)&&!o()&&e.isFullscreen()&&t.fullscreen.alwaysInLandscapeMode&&a.lockOrientationUniversal("landscape")})),e.on("dispose",(function(){r.default.removeEventListener("orientationchange",i)}))}(t,n.default.mergeOptions(s,e))}))};return(n.default.registerPlugin||n.default.plugin)("landscapeFullscreen",l),l.VERSION="11.1111.0",l}(i(286),i(840))},784:(e,t,i)=>{var n=i(840),r=e.exports={WebVTT:i(311),VTTCue:i(184),VTTRegion:i(891)};n.vttjs=r,n.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=s,n.VTTRegion=a},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},311:(e,t,i)=>{var n=i(697),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=r(null)}function l(e,t,i,n){var r=n?e.split(n):[e];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(i);2===a.length&&t(a[0].trim(),a[1].trim())}}function d(e,t,i){var n=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function d(){e=e.replace(/^\s+/,"")}if(d(),t.startTime=r(),d(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),d(),t.endTime=r(),d(),function(e,t){var n=new o;l(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),n.percent(e,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(e){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(e){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(e){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};
vendor: 4,807 bytes, line 2
2var u=n.createElement&&n.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function g(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(e,t){return!f[t.localName]||f[t.localName]===e.localName}function r(t,i){var n=c[t];if(!n)return null;var r=e.document.createElement(n),s=p[t];return s&&i&&(r[s]=i.trim()),r}for(var s,o,l=e.document.createElement("div"),d=l,g=[];null!==(s=i());)if("<"!==s[0])d.appendChild(e.document.createTextNode((o=s,u.innerHTML=o,o=u.textContent,u.textContent="",o)));else{if("/"===s[1]){g.length&&g[g.length-1]===s.substr(2).replace(">","")&&(g.pop(),d=d.parentNode);continue}var m,v=a(s.substr(1,s.length-2));if(v){m=e.document.createProcessingInstruction("timestamp",v),d.appendChild(m);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(m=r(y[1],y[3])))continue;if(!n(d,m))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(h.hasOwnProperty(i)){var n=t?"background-color":"color",r=h[i];m.style[n]=r}})),m.className=_.join(" ")}g.push(y[1]),d.appendChild(m),d=m}return l}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<m.length;t++){var i=m[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function y(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function r(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var s=i.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):i}return"ruby"===t.tagName?r(e):t.childNodes?(n(e,t),r(e)):void 0}for(n(t,e);i=r(t);)for(var s=0;s<i.length;s++)if(v(i.charCodeAt(s)))return"rtl";return"ltr"}function _(){}function b(e,t,i){_.call(this),this.cue=t,this.cueDiv=g(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")}
vendor: 5,724 bytes, line 2
2)}}function T(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,i,n){var r=new T(t),s=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var d=r.lineHeight,u=d*Math.round(a),c=i[l]+d,h=o[0];Math.abs(u)>c&&(u=u<0?-1:1,u*=Math.ceil(c/d)*d),a<0&&(u+=""===s.vertical?i.height:i.width,o=o.reverse()),r.move(h,u)}else{var p=r.lineHeight/i.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,s=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(f.toCSSCompatValues(i))}function E(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},E.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=T.getSimpleBoxPosition(n),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new b(e,o,a),n.appendChild(i.div),S(0,i,s,r),o.displayState=i.div,r.push(T.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},E.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},E.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,i=this;function n(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var u=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new s(s.Errors.BadSignature);i.state="HEADER"}for(var c=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(c?c=!1:r=n(),i.state){case"HEADER":/:/.test(r)?(t=r).match(/X-TIMESTAMP-MAP/)?l(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;l(e,(function(e,i){switch(e){case"MPEGT":t.integer(e+"S",i);break;case"LOCA":t.set(e+"L",a(i))}}),/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):l(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(l(e,(function(e,i){switch(e){case"id":t.set(e,i);break;case"width":t.percent(e,i);break;
vendor: 2,295 bytes, line 2
2case"lines":t.integer(e,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var r=new o;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;t.set(e+"X",r.get("x")),t.set(e+"Y",r.get("y"));break;case"scroll":t.alt(e,i,["up"])}}),/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}(t)}),/:/):r||(i.state="ID");continue;case"NOTE":r||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){i.state="NOTE";break}if(!r)continue;i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,"");try{i.cue.align="center"}catch(e){i.cue.align="middle"}if(i.state="CUE",-1===r.indexOf("--\x3e")){i.cue.id=r;continue}case"CUE":try{d(r,i.cue,i.regionList)}catch(e){i.reportOrThrowError(e),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(c=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(i.state="ID");continue}}}catch(e){i.reportOrThrowError(e),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=E},184:e=>{var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function r(e,i,r){this.hasBeenReset=!1;var s="",a=!1,o=e,l=i,d=r,u=null,c="",h=!0,p="auto",f="start",g="auto",m="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a}
vendor: 3,067 bytes, line 2
2,set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return d},set:function(e){d=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=n(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=n(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=n(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},891:e=>{var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
vendor: 8,454 bytes, line 2
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===i?console.warn("Scroll: an invalid or illegal string was specified."):l=i}}})}},542:()=>{},634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,i)=>{var n=i(738).default;function r(){"use strict";e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var t,i={},s=Object.prototype,a=s.hasOwnProperty,o=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},d=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,i){return e[t]=i}}function p(e,t,i,n){var r=t&&t.prototype instanceof b?t:b,s=Object.create(r.prototype),a=new N(n||[]);return o(s,"_invoke",{value:D(e,i,a)}),s}function f(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=p;var g="suspendedStart",m="suspendedYield",v="executing",y="completed",_={};function b(){}function T(){}function S(){}var E={};h(E,d,(function(){return this}));var A=Object.getPrototypeOf,w=A&&A(A(O([])));w&&w!==s&&a.call(w,d)&&(E=w);var P=S.prototype=b.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function i(r,s,o,l){var d=f(e[r],e,s);if("throw"!==d.type){var u=d.arg,c=u.value;return c&&"object"==n(c)&&a.call(c,"__await")?t.resolve(c.__await).then((function(e){i("next",e,o,l)}),(function(e){i("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return i("throw",e,o,l)}))}l(d.arg)}var r;o(this,"_invoke",{value:function(e,n){function s(){return new t((function(t,r){i(e,n,t,r)}))}return r=r?r.then(s,s):s()}})}function D(e,i,n){var r=g;return function(s,a){if(r===v)throw Error("Generator is already running");if(r===y){if("throw"===s)throw a;return{value:t,done:!0}}for(n.method=s,n.arg=a;;){var o=n.delegate;if(o){var l=k(o,n);if(l){if(l===_)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===g)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var d=f(e,i,n);if("normal"===d.type){if(r=n.done?y:m,d.arg===_)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(r=y,n.method="throw",n.arg=d.arg)}}}function k(e,i){var n=i.method,r=e.iterator[n];if(r===t)return i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=t,k(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var s=f(r,e.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,_;var a=s.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,_):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,_)}function I(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 R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function O(e){if(e||""===e){var i=e[d];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,s=function i(){for(;++r<e.length;)if(a.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=t,i.done=!0,i};return s.next=s}}throw new TypeError(n(e)+" is not iterable")}return T.prototype=S,o(P,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:T,configurable:!0}),T.displayName=h(S,c,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,h(e,c,"GeneratorFunction")),e.prototype=Object.create(P),e},i.awrap=function(e){return{__await:e}},C(L.prototype),h(L.prototype,u,(function(){return this})),i.AsyncIterator=L,i.async=function(e,t,n,r,s){void 0===s&&(s=Promise);var a=new L(p(e,t,n,r),s);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(P),h(P,c,"Generator"),h(P,d,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},i.values=O,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var i in this)"t"===i.charAt(0)&&a.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},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 i=this;function n(n,r){return o.type="throw",o.arg=e,i.next=n,r&&(i.method="next",i.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var l=a.call(s,"catchLoc"),d=a.call(s,"finallyLoc");if(l&&d){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!d)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(s)},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),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),R(i),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;R(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:O(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),_}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==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.exports.__esModule=!0,e.exports.default=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,i)=>{var n=i(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},417:(e,t,i)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(t,{A:()=>n})},501:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(662);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,n.A)(e,t)}},662:(e,t,i)=>{"use strict";
2function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}i.d(t,{A:()=>n})}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,i){if(e){if("string"==typeof e)return t(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,i):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t,i,n,r,s,a){try{var o=e[s](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function a(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var a=e.apply(t,i);function o(e){s(a,n,r,o,l,"next",e)}function l(e){s(a,n,r,o,l,"throw",e)}o(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(t){var i=function(t,i){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(i)?i:i+""}function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function u(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,i){return(t=l(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.r(n),i.d(n,{default:()=>Os});var h=i(756),p=i.n(h),f="USER_MAIL",g="USER_MOB",m="userCurrentProfile",v="widevine/getLicense",y=3e5,_={qualityChange:"Quality Changed",subTitleChange:"Subtitle Language Change",audioLanguageChange:"Audio Language Change",seek_scrub:"Scrub/Seek",firstPlay:"firstplay",onReplay:" onReplay",playbackEnded:"playbackended",skipIntro:"Skip Intro",watchCredits:"Watch Credits",resume:"Resume",muteChanged:"mutechanged",exitBeforeAdStart:"exitBeforeAdStart",ribbin_ctas:"Ribbon CTAs",playerCtas:"Player CTAs",ribbonImpression:"Ribbon Impression",adCompleted:"adcompleted",adSkipped:"adskipped",adErrors:"aderrors",userClosedAd:"userclosedad",adClicked:"adclicked",adStarted:"adstarted",adPaused:"adpaused",adInitialized:"Ad Initialized",pauseEvent:"pauseEvent",adView:"Ad View",playEvent:"playEvent",autoSeek:"autoSeek",audioBtnClicked:"audioBtnClicked",qualityBtnClicked:"qualityBtnClicked",subtitleBtnClicked:"subtitleBtnClicked",muteBtnClicked:"muteBtnClicked",updateBufferPlayHeadTime:"updateBuffer&PlayHeadTime",Not_Applicable:"Not-Applicable",ad_created:"Tech AD Loader Created",ad_request:"Ad Request",ad_response:"Ad Response",ad_impression:"Ad Impression",PARTNER_NAME:"partnerName",DEFAULT_PARTNER_ZEE5:"ZEE5",PLAN_ID:"planID",PLAYBACK_ERROR:"Playback Error",adSecondQuartile:"second_quartile",adThirdQuartile:"third__quartile",adRequest:"ad_request",adImpression:"ad_impression",adFirstQuartile:"first_quartile",PLAYER_VIEW_CHANGED:"Player View Changed",healthSpotViewed:"Healthspot Viewed",PIN_SCOREBOARD:"Pin Scoreboard",PIN:"Pin",UNPIN:"Unpin",SCORE_CLICK:"Score Click",tapToUnmute:"Tap To Unmute"},b="Casting Ended",T="Casting Failed",S="Casting Started",E=function(e){var t;return e&&(t=e.split(":").reduce((function(e,t){return 60*e+ +t}))),t},A=function(e){var t=(e||{}).singlePlayDetails,i=((void 0===t?{}:t)||{}).entitlement,n=(void 0===i?{}:i).isTVOD;return!(void 0!==n&&n)},w=function(){var e=navigator.userAgent,t=e.indexOf("Chrome")>-1,i=e.indexOf("MSIE")>-1||e.indexOf("rv:")>-1,n=e.indexOf("Firefox")>-1||e.includes("Firefox"),r=e.indexOf("Safari")>-1;t&&r&&(r=!1);var s=e.indexOf("OP")>-1;return t&&s&&(t=!1),t?"Chrome":n?"FireFox":i?"Ie":r?"Safari":s?"Opera":void 0},P=function(e){var t=e.element,i=e.className,n=e.text,r=void 0===n?"":n,s=e.attributes,a=void 0===s?[]:s,o=e.targetDiv;if(document.querySelector(".".concat(i)))return null;var l=document.createElement(t);r&&(l.innerHTML=r),a.forEach((function(e){var t=e.attribute,i=e.value;return l.setAttribute(t,i)})),o&&o.appendChild(l)},C=function(e){for(var t=window.atob(e),i=t.length,n=new Uint8Array(new ArrayBuffer(i)),r=0;r<i;r++)n[r]=t.charCodeAt(r);return n},L=function(){return Math.floor(10*Math.random())+1+Date.now()},D=function(e,t){"string"==typeof t?t&&localStorage.setItem(e,t):localStorage.setItem(e,JSON.stringify(t))},k=function(e){if("undefined"!=typeof window){var t=localStorage&&localStorage.getItem(e);return t&&"string"!=typeof t?JSON.parse(t):t||""}};function I(){var e=k(m);if(!e)return null;try{return JSON.parse(e)}catch(e){console.error('Failed to parse localStorage key "'.concat(m,'":'),e)}}var R=function(e){var t,i,n,r=Y("country")||"IN",s="IN"===r&&(null==e||null===(t=e.payload)||void 0===t?void 0:t.show_buy_plan_cta_for_kids_profile_in_india),a="IN"!==r&&(null==e||null===(i=e.payload)||void 0===i?void 0:i.show_buy_plan_cta_for_kids_profile_in_global);return null!==(n=s||a)&&void 0!==n&&n},N=function(e){return k("guest"===e?"guestToken":"token")},O=function(e){if("undefined"!=typeof window){var t=null;return localStorage&&localStorage.getItem(e)&&"string"==typeof(t=localStorage.getItem(e))?parseInt(t,10):t}};function M(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var x=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementById("keyMoments"),i=document.querySelector(".keyMomentsWra
2pper");e?(t&&(t.style.pointerEvents="auto"),i&&(i.style.pointerEvents="auto")):(t&&(t.style.pointerEvents="none"),i&&(i.style.pointerEvents="none"))},B=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".watermarkContainer");e&&t?t.style.display="block":t&&(t.style.display="none")},U=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".freeMinutesInfoContainer");e&&t?t.style.display="block":t&&(t.style.display="none")},V=function(e){if("undefined"!=typeof window){for(var t=e+"=",i=decodeURIComponent(document.cookie).split(";"),n=0;n<i.length;n++){for(var r=i[n];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""}},F=function(e){var t=window.translationsAndConfigs;switch(e=e.toLowerCase()){case"en":case"eng":case"english":return t.messages.english;case"hi":case"hin":case"hindi":return t.messages.hindi;case"mr":case"mar":case"mra":case"marathi":return t.messages.marathi;case"te":case"tel":case"telugu":return t.messages.telugu;case"kn":case"kan":case"kannada":return t.messages.kannada;case"ta":case"tam":case"tamil":return t.messages.tamil;case"ml":case"mal":case"malayalam":return t.messages.malayalam;case"bn":case"ben":case"bengali":return t.messages.bengali;case"gu":case"guj":case"gujarati":return t.messages.gujarati;case"ur":return"Urdu";case"pa":case"punjabi":return t.messages.punjabi;case"hr":case"bhojpuri":return t.messages.bhojpuri;case"or":return"Oriya";case"de":return"German";case"th":return"Thai";case"id":case"in":return"Indonesian";case"ms":return"Malay";case"ru":return"Russian";case"zho":return"Chinese";case"es":return"Spanish";case"ja":return"Japanese";case"fr":return"French";case"ko":return"Korean";case"Off":return t.messages.off;default:return e}},q=function(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=(e-3600*t-60*i).toFixed(0);return t.toString().padStart(2,"0")+":"+i.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")},j=function(){var e=window.navigator.userAgent.toLowerCase();return!!(e.match(/android/i)||e.match(/iphone/i)||e.match(/ipad/i)||e.match(/ipod/i)||e.match(/windows phone/i))},H=function(){var e;try{sessionStorage&&sessionStorage.getItem(_.PARTNER_NAME)?(e=sessionStorage.getItem(_.PARTNER_NAME),e=JSON.parse(e)):localStorage&&localStorage.getItem(_.PARTNER_NAME)&&(e=localStorage.getItem(_.PARTNER_NAME),e=JSON.parse(e))}catch(e){return _.DEFAULT_PARTNER_ZEE5}return e&&void 0!==e?e:_.DEFAULT_PARTNER_ZEE5},G=function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},W=function(e){var t=null;try{sessionStorage&&sessionStorage.getItem(e)&&(t=JSON.parse(sessionStorage.getItem(e)))}catch(e){console.log("Error:",null==e?void 0:e.message)}return t},X={1e3:"Z-4",1001:"Z-4",1002:"Z-4",1003:"Z-3",1004:"Z-4",1005:"Z-7",2e3:"Z-7",2001:"Z-7",3e3:"Z-3",3001:"Z-4",3002:"Z-3",3003:"Z-3",3004:"Z-7"},K=function t(i,n){var r={};for(var s in i)r[s]=i[s];for(var a in n)a in r&&"object"===e(r[a])&&"object"===e(n[a])?r[a]=t(r[a],n[a]):r[a]=n[a];return r},z=function(e){var t=Math.floor(e/60),i=e%60,n=Math.floor(t/60),r=t%60;return n>0?"".concat(n,"h:").concat(r,"m left"):r>0?"".concat(r,"m Left"):0===n&&0===r?"".concat(i,"s left"):void 0},Y=function(e){if("undefined"==typeof document)return null;var t=document.cookie,i=null;if(document.cookie&&document.cookie.indexOf(e.trim())>-1){var n=t&&t.split(";"),r=n&&n.filter((function(t){return t.indexOf(e.trim())>-1}));return r&&r.length&&r[0].split("=")[1]}return i},Q=function(e){return"".concat(e.nimbus_api,"/scoreCard/widget?tournamentId=").concat(e.ilt_tournament_id,"&seasonId=").concat(e.ilt_season_id)},J=function(){return!("undefined"==typeof window||!window||!window.location||!window.location.pathname.includes("b2b-consumption")&&!window.location.pathname.includes("b2b-live-tv"))},$=function(e){var t,i;return(null==e||null===(t=e.assetDetails)||void 0===t||null===(t=t.tags)||void 0===t?void 0:t.includes("live_event_fifa"))&&"live_event"===(null==e||null===(i=e.assetDetails)||void 0===i?void 0:i.asset_subtype)},Z=function(e,t){var i,n,r=(e||{}).logos,s=void 0===r?{}:r;return Object.keys(s).includes(t)?null===(i=s[t])||void 0===i?void 0:i.imgSrc:null===(n=s.default)||void 0===n?void 0:n.imgSrc},ee=function(e,t){var i=(t||{}).logos,n=void 0===i?{}:i;return Object.keys(n).includes(e)?"https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/z5-".concat(e,".svg"):"https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/new_ZEE5_Watermark_Logo.svg"},te=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".languageLogoContainer");e&&t?t.style.display="block":t&&(t.style.display="none")},ie=function(e){return e.trim().replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_<>&-]/g,"").replace(/_+/g,"_")},ne=i(417);function re(t,i){if(i&&("object"===e(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return(0,ne.A)(t)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}var ae=i(501),oe=i(286),le=i(697),de=i.n(le),ue=i(840),ce=i.n(ue);function he(){return he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},he.apply(this,arguments)}function pe(e,t){ce()&&ce().convivaAnalytic&&ce().convivaAnalytic.reportEvent&&e&&ce().convivaAnalytic.reportEvent(e,t)}var fe=function(e,t){if(e===t)return!0;
2if(e.byteLength!==t.byteLength)return!1;for(var i=new DataView(e),n=new DataView(t),r=0;r<i.byteLength;r++)if(i.getUint8(r)!==n.getUint8(r))return!1;return!0},ge=function(e){return e instanceof Uint8Array||e instanceof Uint16Array?e.buffer:e},me=function(){var e=oe.default.mergeOptions.apply(oe.default,arguments);return Object.keys(e).forEach((function(t){null===e[t]&&delete e[t]})),e},ve=oe.default.xhr.httpHandler;ve||(ve=function(e,t){return function(i,n,r){if(i)e(i);else{if(n.statusCode>=400&&n.statusCode<=599){var s=r;return t&&(s=String.fromCharCode.apply(null,new Uint8Array(r))),void e({cause:s})}e(null,r)}}});var ye=function(e,t,i,n){var r=function(e){var t=String.fromCharCode.apply(null,new Uint16Array(e)),i=(new(ce().DOMParser)).parseFromString(t,"application/xml"),n=i.getElementsByTagName("HttpHeaders")[0],r={};if(n)for(var s=n.getElementsByTagName("name"),a=n.getElementsByTagName("value"),o=0;o<s.length;o++)r[s[o].childNodes[0].nodeValue]=a[o].childNodes[0].nodeValue;var l,d=i.getElementsByTagName("Challenge")[0];return d&&(l=ce().atob(d.childNodes[0].nodeValue)),{headers:r,message:l}}(t),s=r.message,a=me(r.headers,i.emeHeaders,e.licenseHeaders);oe.default.xhr({uri:e.url,method:"post",headers:a,body:s,responseType:"arraybuffer"},ve(n,!0))},_e=function e(t){if(t?.options?.src){let e={};e.url=t.options.src||"",pe("DRM_Licence_Request",{TIME:Date.now(),payload:JSON.stringify(e)})}var i=t.mediaKeys,n=t.initDataType,r=t.initData,s=t.options,a=t.getLicense,o=t.removeSession,l=t.eventBus,d=i.createSession();return l.trigger("keysessioncreated"),pe("DRM_Session_Acquired",{}),new Promise((function(i,u){d.addEventListener("message",(function(e){"license-request"!==e.messageType&&"license-renewal"!==e.messageType||a(s,e.message).then((function(e){i(d.update(e)),pe("DRM_Licence_Response",{})})).catch((function(e){var t;t={type:"GET_LICENSE_FAILED",payload:JSON.stringify(e)},ce()&&ce().convivaAnalytic&&ce().convivaAnalytic.reportEvent&&ce().convivaAnalytic.reportEvent("customEvent",t),u(e)}))}),!1),d.addEventListener("keystatuseschange",(function(i){var n=!1;d.keyStatuses.forEach((function(e,t){switch(l.trigger({keyId:t,status:e,target:d,type:"keystatuschange"}),e){case"expired":n=!0;break;case"internal-error":oe.default.log.warn('Key status reported as "internal-error." Leaving the session open since we don\'t have enough details to know if this error is fatal.',i)}})),n&&d.close().then((function(){o(r),e(t)}))}),!1),d.generateRequest(n,r).catch((function(){u("Unable to create or initialize key session")}))}))};function be(){const e=new Date,t=localStorage.getItem("licenseOrCertificateStartDate")||e.toString(),i=e-new Date(t),n=Math.round(Math.abs(i)/1e3);return 0==n||n>43200}var Te=function(e,t){return function(i,n){return new Promise((function(r,s){e(i,n,(function(e,i){if(t&&t.trigger("licenserequestattempted"),e){s(e),console.log("Error in License");try{if(e&&e.toString().includes("ProgressEvent")){const e=3005;let t=ce()&&ce().isClearMedia||!1;if(t){try{ce()&&ce().convivaAnalytic&&ce().convivaAnalytic.reportEvent("vsferror","1-3005-0")}catch(e){console.log("Error in conviva VSF report event")}ce()&&ce().triggerFallbackPlayback()}else ce()&&ce().showErrorMessageOnLicenseFails(e,t)}}catch(e){console.log("Error in display error code")}}else!function(e){if(!ce().firstRequestTriggered){const t=new Uint8Array(e,0,e.byteLength);localStorage.setItem("licenseBuffer",t),ce().firstRequestTriggered=!0}}(i),r(i)}))}))}},Se=function(e,t){if("string"==typeof t&&(t={url:t}),!t.url&&!t.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return t.url&&!t.getLicense&&(t.getLicense="com.microsoft.playready"===e?function(e){return function(t,i,n){ye(e,i,t,n)}}(t):function(e){return function(t,i,n){var r=me({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);const s=function(e,t){const i=localStorage.getItem("licenseBuffer")&&localStorage.getItem("licenseBuffer").split(",")||[],n=e.byteLength;i&&0==i.length&&localStorage.setItem("licenseOrCertificateStartDate",new Date);const r=be();return r&&localStorage.setItem("licenseOrCertificateStartDate",new Date),!(i&&i.length>0&&n&&n<100&&!r&&(t(null,new Uint8Array(i)),1))}(i,n);s&&oe.default.xhr({uri:e.url,method:"POST",responseType:"arraybuffer",body:i,headers:r},ve(n,!0))}}(t)),t},Ee="com.apple.fps.1_0",Ae=function(e,t){return r=t,i=String.fromCharCode.apply(null,new Uint16Array(r.buffer)),(n=de().createElement("a")).href=i,n.hostname;var i,n,r},we=function(e){var t=e.video,i=e.initData,n=e.options,r=e.eventBus,s=n.keySystems[Ee],a=s.getCertificate||function(e){return function(t,i){var n=me(t.emeHeaders,e.certificateHeaders);const r=localStorage.getItem("iosCertificateBuffer")&&localStorage.getItem("iosCertificateBuffer").split(",")||[],s=new Uint8Array(r),a=be();r&&r.length>0&&!a?i(null,s):oe.default.xhr({uri:e.certificateUri,responseType:"arraybuffer",headers:n},ve((function(e,t){if(e)return void i(e);const n=new Uint8Array(t);console.log(n),localStorage.setItem("iosCertificateBuffer",n),localStorage.setItem("licenseOrCertificateStartDate",new Date),i(null,new Uint8Array(t))})))}}(s),o=s.getContentId||Ae,l=s.getLicense||function(e){return function(t,i,n,r){var s=me({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);oe.default.xhr({uri:e.licenseUri,method:"POST",responseType:"arraybuffer",body:n,headers:s},ve(r,!0))}}(s);return new Promise((function(e,t){a(n,(function(i,n){i?t(i):e(n)}))})).then((function(e){return function(e){var t=e.video,i=e.contentId,n=e.initData,r=e.cert,s=e.options,a=e.getLicense,o=e.eventBus;return new Promise((function(e,l){if(!t.webkitKeys)try{t.webkitSetMediaKeys(new(ce().WebKitMediaKeys)(Ee))}catch(e){return void l("Could not create MediaKeys")}var d;try{d=t.webkitKeys.createSession("video/mp4",function(e){var t=e.initData,i=e.id,n=e.cert;"string"==typeof i&&(i=function(e){for(var t=new ArrayBuffer(2*e.length),i=new Uint16Array(t),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}(i));var r=0,s=new ArrayBuffer(t.byteLength+4+i.byteLength+4+n.byteLength),a=new DataView(s);new Uint8Array(s,r,t.byteLength).set(t),r+=t.byteLength,a.setUint32(r,i.byteLength,!0),r+=4;var o=new Uint16Array(s,r,i.length);return o.set(i),r+=o.byteLength,a.setUint32(r,n.byteLength,!0),r+=4,new Uint8Array(s,r,n.byteLength).set(n),new Uint8Array(s,0,s.byteLength)}({id:i,initData:n,cert:r}))}catch(e){return void l("Could not create key session")}o.trigger("keysessioncreated"),d.contentId=i,d.addEventListener("webkitkeymessage",(function(e){a(s,i,e.message,(function(e,t){o&&o.trigger("licenserequestattempted"),e?l(e):d.update(new Uint8Array(t))}))})),d.addEventListener("webkitkeyadded",(function(){e()})),d.addEventListener("webkitkeyerror",(function(){var e=d.error;l("KeySession error: code "+e.code+", systemCode "+e.systemCode)}))}))}({video:t,cert:e,initData:i,getLicense:l,options:n,contentId:o(n,i),eventBus:r})}))},Pe="com.microsoft.playready",Ce=function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData===t)return void e.splice(i,1)},Le=function(e,t,i,n){if(!t||!t.keySystems)return Promise.resolve();var r,s,a=e.initData;
2return(r=t.keySystems,Object.keys(r).forEach((function(e){var t=function(e){if(e.supportedConfigurations)return e.supportedConfigurations;var t={},i=e.audioContentType,n=e.audioRobustness,r=e.videoContentType,s=e.videoRobustness,a=e.persistentState;return(i||n)&&(t.audioCapabilities=[he({},i?{contentType:i}:{},n?{robustness:n}:{})]),(r||s)&&(t.videoCapabilities=[he({},r?{contentType:r}:{},s?{robustness:s}:{})]),a&&(t.persistentState=a),[t]}(r[e]);s=s?s.catch((function(i){return ce().navigator.requestMediaKeySystemAccess(e,t)})):ce().navigator.requestMediaKeySystemAccess(e,t)})),s).then((function(r){var s=r.keySystem;return t.keySystems[s]&&t.keySystems[s].pssh&&(a=t.keySystems[s].pssh),function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData){var n=ge(e[i].initData),r=ge(t);if(fe(n,r))return!0}return!1}(i,a)||!a?Promise.resolve():(i.push({initData:a}),function(e){var t,i,n=e.video,r=e.initDataType,s=e.initData,a=e.keySystemAccess,o=e.options,l=e.removeSession,d=e.eventBus,u=Promise.resolve();return void 0===n.mediaKeysObject&&(n.mediaKeysObject=null,n.pendingSessionData=[],u=new Promise((function(e,r){if(n.keySystem=a.keySystem,!(i=Se(a.keySystem,o.keySystems[a.keySystem])).getCertificate)return e(a),void pe("DRM_Keys_Loaded",{});i.getCertificate(o,(function(i,n){i?r(i):(t=n,e())}))})).then((function(){return a.createMediaKeys()})).then((function(e){return function(e){var t=e.video,i=e.certificate,n=e.createdMediaKeys;t.mediaKeysObject=n;var r=[];i&&r.push(n.setServerCertificate(i));for(var s=0;s<t.pendingSessionData.length;s++){var a=t.pendingSessionData[s];r.push(_e({mediaKeys:t.mediaKeysObject,initDataType:a.initDataType,initData:a.initData,options:a.options,getLicense:a.getLicense,removeSession:a.removeSession,eventBus:a.eventBus}))}return t.pendingSessionData=[],r.push(t.setMediaKeys(n)),Promise.all(r)}({video:n,certificate:t,createdMediaKeys:e})})).catch((function(e){return e?Promise.reject(e):Promise.reject("Failed to create and initialize a MediaKeys object")}))),u.then((function(){var e=Se(n.keySystem,o.keySystems[n.keySystem]).getLicense;return function(e){var t=e.video,i=e.initDataType,n=e.initData,r=e.options,s=e.getLicense,a=e.removeSession,o=e.eventBus;return t.mediaKeysObject?_e({mediaKeys:t.mediaKeysObject,initDataType:i,initData:n,options:r,getLicense:s,removeSession:a,eventBus:o}):(t.pendingSessionData.push({initDataType:i,initData:n,options:r,getLicense:s,removeSession:a,eventBus:o}),Promise.resolve())}({video:n,initDataType:r,initData:s,options:o,getLicense:n.keySystem?Te(e,d):null,removeSession:l,eventBus:d})}))}({video:e.target,initDataType:e.initDataType,initData:a,keySystemAccess:r,options:t,removeSession:Ce.bind(null,i),eventBus:n}))}))},De=function(e,t,i,n){if(t.keySystems&&t.keySystems[Pe]&&!i.reduce((function(e,t){return e||t.playready}),!1)){var r=e.initData;t.keySystems[Pe]&&t.keySystems[Pe].pssh&&(r=t.keySystems[Pe].pssh),r&&(i.push({playready:!0,initData:r}),function(e){var t=e.video,i=e.initData,n=e.options,r=e.eventBus;t.msKeys&&delete t.msKeys;try{t.msSetMediaKeys(new(ce().MSMediaKeys)(Pe))}catch(e){throw new Error("Unable to create media keys for PlayReady key system. Error: "+e.message)}!function(e,t,i,n){var r=e.msKeys.createSession("video/mp4",t);if(!r)throw new Error("Could not create key session.");n.trigger("keysessioncreated"),r.addEventListener("mskeymessage",(function(e){!function(e,t,i,n){var r=e.keySystems[Pe];if("function"!=typeof r.getKey){"string"==typeof r?r={url:r}:"boolean"==typeof r&&(r={}),r.url||(r.url=i.destinationURL);var s=function(e,i){n&&n.trigger("licenserequestattempted"),e?n.trigger({message:"Unable to request key from url: "+r.url,target:t,type:"mskeyerror"}):t.update(new Uint8Array(i))};r.getLicense?r.getLicense(e,i.message.buffer,s):ye(r,i.message.buffer,e,s)}else r.getKey(e,i.destinationURL,i.message.buffer,(function(e,i){e?n.trigger({message:"Unable to get key: "+e,target:t,type:"mskeyerror"}):t.update(i)}))}(i,r,e,n)})),r.addEventListener("mskeyerror",(function(e){n.trigger({message:"Unexpected key error from key session with code: "+r.error.code+" and systemCode: "+r.error.systemCode,target:r,type:"mskeyerror"})})),r.addEventListener("mskeyadded",(function(){n.trigger({target:r,type:"mskeyadded"})}))}(t,i,n,r)}({video:e.target,initData:r,options:t,eventBus:n}))}},ke=function(e){return oe.default.mergeOptions(e.currentSource(),e.eme.o
2ptions)},Ie=function(e){var t=e.src();t!==e.eme.activeSrc&&(e.eme.activeSrc=t,e.eme.sessions=[])},Re=function(e){void 0===e&&(e={});var t=this,i=function(e){return function(t){var i={code:5};"string"==typeof t?i.message=t:t&&(t.message&&(i.message=t.message),t.cause&&(t.cause.length||t.cause.byteLength)&&(i.cause=t.cause)),e.error(i)}}(t);t.ready((function(){return function(e,t){if("video"===e.$(".vjs-tech").tagName.toLowerCase())if(Ie(e),ce().WebKitMediaKeys){var i=function(i){Ie(e),function(e,t,i){return t.keySystems&&t.keySystems[Ee]&&e.initData?we({video:e.target,initData:e.initData,options:t,eventBus:i}):Promise.resolve()}(i,ke(e),e.tech_).catch(t)};e.tech_.el_.addEventListener("webkitneedkey",(function(t){var n=ke(e).firstWebkitneedkeyTimeout||1e3,r=e.src();e.eme.webkitneedkey_=e.eme.webkitneedkey_||{},e.eme.webkitneedkey_.src!==r&&(e.eme.webkitneedkey_={handledFirstEvent:!1,src:r}),e.eme.webkitneedkey_.handledFirstEvent?i(t):(e.clearTimeout(e.eme.webkitneedkey_.timeout),e.eme.webkitneedkey_.timeout=e.setTimeout((function(){e.eme.webkitneedkey_.handledFirstEvent=!0,e.eme.webkitneedkey_.timeout=null,i(t)}),n))}))}else ce().MediaKeys?e.tech_.el_.addEventListener("encrypted",(function(i){Ie(e),Le(i,ke(e),e.eme.sessions,e.tech_).catch(t)})):ce().MSMediaKeys&&(e.tech_.el_.addEventListener("msneedkey",(function(i){Ie(e);try{De(i,ke(e),e.eme.sessions,e.tech_)}catch(e){t(e)}})),e.tech_.on("mskeyerror",t),e.on("dispose",(function(){e.tech_.off("mskeyerror",t)})))}(t,i)})),t.eme={initializeMediaKeys:function(n,r,s){void 0===n&&(n={}),void 0===r&&(r=function(){}),void 0===s&&(s=!1);var a=oe.default.mergeOptions(t.currentSource(),e,n),o={initDataType:"cenc",initData:null,target:t.tech_.el_};if(Ie(t),t.tech_.el_.setMediaKeys)Le(o,a,t.eme.sessions,t.tech_).then((function(){return r()})).catch((function(e){r(e),s||i(e)}));else if(t.tech_.el_.msSetMediaKeys){var l=function e(n){t.tech_.off("mskeyadded",e),t.tech_.off("mskeyerror",e),"mskeyerror"===n.type?(r(n.target.error),s||i(n.message)):r()};t.tech_.one("mskeyadded",l),t.tech_.one("mskeyerror",l);try{De(o,a,t.eme.sessions,t.tech_)}catch(e){t.tech_.off("mskeyadded",l),t.tech_.off("mskeyerror",l),r(e),s||i(e)}}},options:e}};(oe.default.registerPlugin||oe.default.plugin)("eme",Re);const Ne=Re;function Oe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i(446);var Me=function(e){var t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:function(){return t.enabled_()},set:function(e){t.enabled_(e)}}),t},xe=function(e){var t,i;function n(){var t,i=Oe(Oe(t=e.call(this)||this));return i.levels_=[],i.selectedIndex_=-1,Object.defineProperty(i,"selectedIndex",{get:function(){return i.selectedIndex_}}),Object.defineProperty(i,"length",{get:function(){return i.levels_.length}}),i||Oe(t)}i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i;var r=n.prototype;return r.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var i=this.levels_.length;return t=new Me(e),""+i in this||Object.defineProperty(this,i,{get:function(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},r.removeQualityLevel=function(e){for(var t=null,i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},r.getQualityLevelById=function(e){for(var t=0,i=this.length;t<i;t++){var n=this[t];if(n.id===e)return n}return null},r.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},n}(oe.default.EventTarget);for(var Be in xe.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},xe.prototype.allowedEvents_)xe.prototype["on"+Be]=null;var Ue="2.2.1",Ve=function(e){return t=this,oe.default.mergeOptions({},e),i=t.qualityLevels,n=new xe,t.on("dispose",(function e(){n.dispose(),t.qualityLevels=i,t.off("dispose",e)})),t.qualityLevels=function(){return n},t.qualityLevels.VERSION=Ue,n;var t,i,n};function Fe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(oe.default.registerPlugin||oe.default.plugin)("qualityLevels",Ve),Ve.VERSION=Ue;var je=oe.default.getComponent("MenuItem"),He=oe.default.getComponent("Component"),Ge=function(e){function t(t,i){return i.selectable=!0,i.multiSelectable=!1,e.call(this,t,i)||this}Fe(t,e);var i=t.prototype;return i.handleClick=function(){var t=this.options_;console.log("Changing quality to:",t.label),e.prototype.handleClick.call(this);var i=this.player().qualityLevels();i.selectedIndex_=t.index,i.trigger({type:"change",selectedIndex:t.index});for(var n=0;n<i.length;n++)t.index==i.length||t.index==n?i[n].enabled=!0:i[n].enabled=!1},i.update=function(){var e=this.player().qualityLevels().selectedIndex;this.selected(this.options_.index==e)},t}(je);He.registerComponent("SourceMenuItem",Ge);var We=oe.default.getComponent("MenuButton"),Xe=function(e){function t(t,i){var n;n=e.call(this,t,i)||this,We.apply(qe(n),arguments);var r=n.player().qualityLevels();if(i&&i.default)if("low"==i.default)for(var s=0;s<r.length;s++)r[s].enabled=0==s;else if(i.default="high")for(s=0;s<r.length;s++)r[s].enabled=s==r.length-1;return n.player().qualityLevels().on(["change","addqualitylevel"],oe.default.bind(qe(n),n.update)),n}Fe(t,e);var i=t.prototype;return i.createEl=function(){return oe.default.dom.createEl("div",{className:"vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})},i.buildCSSClass=function(){return We.prototype.buildCSSClass.call(this)+" vjs-icon-cog"},i.update=function(){return We.prototype.update.call(this)},i.createItems=function(){for(var e=[],t=this.player().qualityLevels(),i=[],n=!1,r=0;r<t.length;r++){var s=t.length-(r+1),a=s===t.selectedIndex;
2if(a&&(n=!0),t[s].height&&("240"==t[s].height||"480"==t[s].height||"720"==t[s].height||"576"==t[s].height||"1080"==t[s].height)){var o=`${s}`,l=s;if(t[s].height?("240"==t[s].height?o="Data Saver - 240p":"480"==t[s].height?o="SD - 480p":"576"==t[s].height?o="SD - 576p":"720"==t[s].height?o="HD - 720p":"1080"==t[s].height&&(o="Full HD - 1080p"),l=parseInt(t[s].height,10)):t[s].bitrate&&(o=`${Math.floor(t[s].bitrate/1e3)} kbps`,l=parseInt(t[s].bitrate,10)),i.indexOf(o)>=0)continue;i.push(o),e.push(new Ge(this.player_,{label:o,index:s,selected:a,sortVal:l}))}}return t.length>1&&n?e.push(new Ge(this.player_,{label:"Auto - Recommended",index:t.length,selected:!1,sortVal:99999})):t.length>1&&e.push(new Ge(this.player_,{label:"Auto - Recommended",index:t.length,selected:!0,sortVal:99999})),e.sort((function(e,t){return e.options_.sortVal<t.options_.sortVal?1:e.options_.sortVal>t.options_.sortVal?-1:0})),e},t}(We),Ke={},ze=function(e){var t=this;this.ready((function(){!function(e,t){if(e.addClass("vjs-http-source-selector"),console.log("videojs-http-source-selector initialized!"),console.log("player.techName_:"+e.techName_),"Html5"!=e.techName_)return!1;e.on(["loadedmetadata"],(function(t){if(e.qualityLevels(),oe.default.log("loadmetadata event"),"undefined"==e.videojs_http_source_selector_initialized||1==e.videojs_http_source_selector_initialized)console.log("player.videojs_http_source_selector_initialized == true");else{console.log("player.videojs_http_source_selector_initialized == false"),e.videojs_http_source_selector_initialized=!0;var i=e.controlBar,n=i.getChild("fullscreenToggle").el();i.el().insertBefore(i.addChild("SourceMenuButton").el(),n)}}))}(t,oe.default.mergeOptions(Ke,e))})),oe.default.registerComponent("SourceMenuButton",Xe),oe.default.registerComponent("SourceMenuItem",Ge)};(oe.default.registerPlugin||oe.default.plugin)("httpSourceSelector",ze),ze.VERSION="1.1.6",function(){function e(e){this.value=e}function t(t){var i,n;function r(i,n){try{var a=t[i](n),o=a.value;o instanceof e?Promise.resolve(o.value).then((function(e){r("next",e)}),(function(e){r("throw",e)})):s(a.done?"return":"normal",a.value)}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}(i=i.next)?r(i.key,i.arg):n=null}this._invoke=function(e,t){return new Promise((function(s,a){var o={key:e,arg:t,resolve:s,reject:a,next:null};n?n=n.next=o:(i=n=o,r(e,t))}))},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}();var Ye={},Qe=oe.default.registerPlugin||oe.default.plugin,Je=function(e){var t=this;this.ready((function(){!function(e,t){e.addClass("vjs-vtt-thumbnails"),e.vttThumbnails=new $e(e,t)}(t,oe.default.mergeOptions(Ye,e))}))},$e=function(){function e(t,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.options=i,this.listenForDurationChange(),this.initializeThumbnails(),this.registeredEvents={},this}return e.prototype.src=function(e){this.resetPlugin(),this.options.src=e,this.initializeThumbnails()},e.prototype.detach=function(){this.resetPlugin()},e.prototype.resetPlugin=function(){this.thumbnailHolder&&this.thumbnailHolder.parentNode.removeChild(this.thumbnailHolder),this.progressBar&&this.progressBar.removeEventListener("mouseenter",this.registeredEvents.progressBarMouseEnter),this.progressBar&&this.progressBar.removeEventListener("mouseleave",this.registeredEvents.progressBarMouseLeave),this.progressBar&&this.progressBar.removeEventListener("mousemove",this.registeredEvents.progressBarMouseMove),delete this.registeredEvents.progressBarMouseEnter,delete this.registeredEvents.progressBarMouseLeave,delete this.registeredEvents.progressBarMouseMove,delete this.progressBar,delete this.vttData,delete this.thumbnailHolder,delete this.lastStyle},e.prototype.listenForDurationChange=function(){this.player.on("durationchange",(function(){}))},e.prototype.initializeThumbnails=function(){var e=this;if(this.options.src){var t=this.getBaseUrl(),i=this.getFullyQualifiedUrl(this.options.src,t);this.getVttFile(i).then((function(t){e.vttData=e.processVtt(t),e.setupThumbnailElement()}))}},e.prototype.getBaseUrl=function(){return[window.location.protocol,"//",window.location.hostname,window.location.port?":"+window.location.port:"",window.location.pathname].join("").split(/([^\/]*)$/gi).shift()},e.prototype.getVttFile=function(e){var t=this;return new Promise((function(i,n){var r=new XMLHttpRequest;r.data={resolve:i},r.addEventListener("load",t.vttFileLoaded),r.open("GET",e),r.send()}))},e.prototype.vttFileLoaded=function(){this.data.resolve(this.responseText)},e.prototype.setupThumbnailElement=function(e){var t=this,i=this.player.$(".vjs-mouse-display");this.progressBar=this.player.$(".vjs-progress-control");var n=document.createElement("div");n.setAttribute("class","vjs-vtt-thumbnail-display"),this.progressBar.appendChild(n),this.thumbnailHolder=n,i&&i.classList.add("vjs-hidden"),this.registeredEvents.progressBarMouseEnter=function(){return t.onBarMouseenter()},this.registeredEvents.progressBarMouseLeave=function(){return t.onBarMouseleave()},this.progressBar.addEventListener("mouseenter",this.registeredEvents.progressBarMouseEnter),this.progressBar.addEventListener("mouseleave",this.registeredEvents.progressBarMouseLeave)},e.prototype.onBarMouseenter=function(){var e=this;this.mouseMoveCallback=function(t){e.onBarMousemove(t)},this.registeredEvents.progressBarMouseMove=this.mouseMoveCallback,this.progressBar.addEventListener("mousemove",this.registeredEvents.progressBarMouseMove),this.showThumbnailHolder()},e.prototype.onBarMouseleave=function(){this.registeredEvents.progressBarMouseMove&&this.progressBar.removeEventListener("mousemove",this.registeredEvents.progressBarMouseMove),this.hideThumbnailHolder()},e.prototype.getXCoord=function(e,t){var i=e.getBoundingClientRect(),n=document.documentElement;return t-(i.left+(window.pageXOffset||n.scrollLeft||0))},e.prototype.onBarMousemove=function(e){this.updateThumbnailStyle(this.getXCoord(this.progressBar,e.clientX),this.progressBar.offsetWidth)},e.prototype.getStyleForTime=function(e){for(var t=0;t<this.vttData.length;++t){var i=this.vttData[t];if(e>=i.start&&e<i.end)return i.css}},e.prototype.showThumbnailHolder=function(){this.thumbnailHolder.style.opacity="1"},e.prototype.hideThumbnailHolder=function(){this.thumbnailHolder.style.opacity="0"},e.prototype.updateThumbnailStyle=function(e,t){var i=(1-(t-e)/t)*this.player.duration(),n=this.getStyleForTime(i);if(!n)return this.hideThumbnailHolder();var r=(1-(t-e)/t)*t;if(this.thumbnailHolder.style.transform="translateX("+r+"px)",this.thumbnailHolder.style.marginLeft="-"+parseInt(n.width)/2+"px",!this.lastStyle||this.lastStyle!==n)for(var s in this.lastStyle=n,n)n.hasOwnProperty(s)&&(this.thumbnailHolder.style[s]=n[s])},e.prototype.processVtt=function(e){var t=this,i=[];
2return e.split(/[\r\n][\r\n]/i).forEach((function(e){if(e.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?[\r\n]{1}.*/gi)){var n=e.split(/[\r\n]/i),r=n[0].split(/ ?--> ?/i),s=r[0],a=r[1],o=n[1],l=t.getVttCss(o);i.push({start:t.getSecondsFromTimestamp(s),end:t.getSecondsFromTimestamp(a),css:l})}})),i},e.prototype.getFullyQualifiedUrl=function(e,t){return e.indexOf("//")>=0?e:0===t.indexOf("//")?[t.replace(/\/$/gi,""),this.trim(e,"/")].join("/"):t.indexOf("//")>0?[this.trim(t,"/"),this.trim(e,"/")].join("/"):e},e.prototype.getPropsFromDef=function(e){var t=e.split(/#xywh=/i),i=t[0],n=t[1].match(/[0-9]+/gi);return{x:n[0],y:n[1],w:n[2],h:n[3],image:i}},e.prototype.getVttCss=function(e){var t,i={};if(t=this.options.src.indexOf("//")>=0?this.options.src.split(/([^\/]*)$/gi).shift():this.getBaseUrl()+this.options.src.split(/([^\/]*)$/gi).shift(),!(e=this.getFullyQualifiedUrl(e,t)).match(/#xywh=/i))return i.background='url("'+e+'")',i;var n=this.getPropsFromDef(e);return i.background='url("'+n.image+'") no-repeat -'+n.x+"px -"+n.y+"px",i.width=n.w+"px",i.height=n.h+"px",i},e.prototype.doconstructTimestamp=function(e){var t=e.split("."),i=t[0].split(":");return{milliseconds:parseInt(t[1])||0,seconds:parseInt(i.pop())||0,minutes:parseInt(i.pop())||0,hours:parseInt(i.pop())||0}},e.prototype.getSecondsFromTimestamp=function(e){var t=this.doconstructTimestamp(e);return parseInt(3600*t.hours+60*t.minutes+t.seconds+t.milliseconds/1e3)},e.prototype.trim=function(e,t){var i=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),n=0,r=0;for(e+="",t&&(i=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),n=e.length,r=0;r<n;r++)if(-1===i.indexOf(e.charAt(r))){e=e.substring(r);break}for(r=(n=e.length)-1;r>=0;r--)if(-1===i.indexOf(e.charAt(r))){e=e.substring(0,r+1);break}return-1===i.indexOf(e.charAt(0))?e:""},e}();Qe("vttThumbnails",Je),Je.VERSION="0.0.13";var Ze=i(7),et=i.n(Ze),tt=u((function e(){o(this,e)}));c(tt,"DESTROY","player_destroy"),c(tt,"ENDED","playback_ended"),c(tt,"ERROR","player_error"),c(tt,"FULL_SCREEN_CHANGE","full_screen_changed"),c(tt,"LOAD_START","player_load_start"),c(tt,"LOADED_DATA","player_loaded_data"),c(tt,"PAUSE","player_pause"),c(tt,"PLAY","player_play"),c(tt,"PROGRESS","player_progress"),c(tt,"QUALITY_CHANGE","player_quality_change"),c(tt,"READY","player_ready"),c(tt,"RESUME","player_resume"),c(tt,"SEEKED","player_seeked"),c(tt,"SEEKING","player_seeking"),c(tt,"STARTED","player_started"),c(tt,"VOLUME_CHANGE","player_volume_change"),c(tt,"TIME_UPDATE","player_time_update"),c(tt,"META_DATA_LOADED","meta_data_loaded"),c(tt,"DISPOSE","player_dispose"),c(tt,"SUBTITLECHANGE","subtitleChanged"),c(tt,"SKIPINTRO","skipintro"),c(tt,"MUTE","mute"),c(tt,"ENTITLED_LANG_ERROR","entitledLanguagesError"),c(tt,"PLAYING","playing"),c(tt,"USER_ACTIVE","useractive"),c(tt,"USER_INACTIVE","userinactive");var it=function(){try{return 0!==(k(g)?k(g):"").trim().length}catch(e){console.error("Failure to get user details from local storage")}return!1},nt=function(){try{return 0!==(k(f)?k(f):"").trim().length}catch(e){console.error("Failure to get user details from local storage")}return!1};function rt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function st(e,t,i){try{return function(e,t){return(t.ignoreEvents||[]).includes(e)}(e,i)?null:function(e,t,i){var n,s,a=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},t),o=function(e,t){return e.reduce((function(e,i){return[].concat(r(e),r(t.ignoreProperties[i]||[]))}),[])}((null===(n=i.categoryMapping)||void 0===n||null===(n=n.ignorePropertiesForSpecificEvents)||void 0===n?void 0:n[e])||[],i),l=[].concat(r((null===(s=i.ignoreProperties)||void 0===s?void 0:s.forAllEvents)||[]),r(i.ignorePropertiesOfSDK||[]),r(o)),d=i.ignorePropertyForAllEventsWhoseValueIs||[],u=i.ignorePropertyForAllEventsIf||{};
2return Object.keys(a).forEach((function(e){var t=a[e];void 0!==t&&""!==t?(l.includes(e)||d.includes(t)||Object.prototype.hasOwnProperty.call(u,e)&&u[e]===t)&&delete a[e]:delete a[e]})),a}(e,t,i)}catch(e){return console.error("[Analytics Engine] Error processing rules",e),t}}var at,ot=function(){return u((function e(){var t=this;o(this,e),c(this,"playerDefferedEvents",[]),c(this,"setMixpanelVideoPlayer",(function(e){t.videoPlayer=e})),c(this,"setMixpanelPlayerConfig",(function(e){t.playerConfig=e})),c(this,"setClevertapEventPushRef",(function(e){t.clevertapEventPush=e})),c(this,"setMixpanelMetaData",(function(e){t.mixpanelMetaData=e,t.mixpanelMetaData&&0==Object.keys(t.mixpanelMetaData).length||(window&&window.mixpanel?window.mixpanel.opt_in_tracking():t.playerDefferedEvents.push({eventName:"optin",mixpanelProperties:{}}))})),c(this,"setMixpanelAdMetaData",(function(e){t.mixpanelAdsData=e})),c(this,"getCurrentQuality",(function(){var e="Auto";try{var t=window&&window.videoPlayer.qualityLevels()||{};return t&&t.length>0&&(e=t[t.selectedIndex].height||"Auto"),e}catch(t){return e}})),c(this,"isTalamossEnabaled",(function(){if(t.mixpanelMetaData.mixpanelDetail){var e=t.mixpanelMetaData.mixpanelDetail,i=e.origin,n=e.modelName,r=e.clickId;return!!(i&&n&&r&&"N/A"!==i&&"N/A"!==n&&"N/A"!==r)}return!1})),c(this,"triggerCleverTap",(function(e){var i=e.eventName,n=e.mixpanelProperties;t.clevertapEventPush&&t.clevertapEventPush({eventName:i,mixpanelProperties:n})})),c(this,"triggerMixpanelDefferedEvents",(function(){t.playerDefferedEvents&&t.playerDefferedEvents.length&&(t.playerDefferedEvents.forEach((function(e){"optin"===e.eventName?window.mixpanel.opt_in_tracking():(t.triggerCleverTap(e),window.mixpanel.track(e.eventName,e.mixpanelProperties))})),t.playerDefferedEvents=[])})),c(this,"queueMixpanelEvents",(function(e,i){window&&window.mixpanel?t.playerDefferedEvents.length?(t.playerDefferedEvents.push({eventName:e,mixpanelProperties:i}),t.triggerMixpanelDefferedEvents()):(t.triggerCleverTap({eventName:e,mixpanelProperties:i}),window.mixpanel.track(e,i)):t.playerDefferedEvents.push({eventName:e,mixpanelProperties:i})}))}),[{key:"MixpanelAnalyticsTracker",value:function(e){this.singlePlayDetails=e}},{key:"getMixpanelAnalyticDetails",value:function(){return!!(this.mixpanelMetaData&&this.mixpanelMetaData.analyticData&&this.mixpanelMetaData.mixpanelDetail)}},{key:"getSeriesName",value:function(e){return"episode"==e.asset_subtype||e.showDetails?this.mixpanelMetaData.assetName:this.mixpanelMetaData.show}},{key:"isSubtileSupport",value:function(){return!!(window&&window.videoPlayer&&window.videoPlayer.textTracks().length>0)}},{key:"getMixpanelAdsDetails",value:function(){return!(!this.mixpanelAdsData||"object"!==e(this.mixpanelAdsData)||!Object.keys(this.mixpanelAdsData).length)}},{key:"getMixpanelDetails",value:function(e){return void 0===e||"NA"===e||""===e?"N/A":"sports_vod"===e||"live_event"===e?"Sports ILT20":e}},{key:"getBillingType",value:function(e){var t=e||{},i=t.entitlement,n=(void 0===i?{}:i).isTrailer,r=void 0===n?0:n,s=t.trailerDetails,a=r?void 0===s?{}:s:e.assetDetails;return a&&a.billing_type&&!a.isBillingTypeSet?a.billing_type:"N/A"}},{key:"getBusinessType",value:function(e){var t=e||{},i=t.entitlement,n=(void 0===i?{}:i).isTrailer,r=void 0===n?0:n,s=t.trailerDetails,a=r?void 0===s?{}:s:e.assetDetails;return a&&a.business_type?a.business_type:this.mixpanelMetaData.mixpanelDetail.contentType?this.mixpanelMetaData.mixpanelDetail.contentType:"N/A"}},{key:"getCurrentAudioTrack",value:function(e){var t=(e||{}).assetDetails,i=(void 0===t?{}:t).audio_languages,n=void 0===i?["N/A"]:i;try{var r=this.videoPlayer.audioTracks().tracks_.filter((function(e){return!0===e.enabled}));return r.length>0?"default"===r[0].label?n[0]:r[0].label:n[0]}catch(e){return n[0]}}},{key:"videoMixpanelTrack",value:function(e){var t,i,n,r,s,a,o,l,d,u=e.mixpanelMetaData,c=e.eventName,h=e.watchDuration,p=e.playerDetails;this.mixpanelMetaData=u;var f,g=this.mixpanelMetaData&&this.mixpanelMetaData.mixpanelDetail&&this.mixpanelMetaData.mixpanelDetail.convivaSessionId||"NA",m=(u||{}).singlePlayData,v=(void 0===m?{}:m).assetDetails,y=void 0===v?{}:v,b=(y.content_partner_details,y.kids_safe),T=void 0===b?void 0:b,S=g.replace(/-/g,""),E={Source:1==this.getMixpanelAnalyticDetails()?this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.source):"N/A","Content Name":this.getMixpanelDetails(this.mixpanelMetaData.analyticData.original_title),"Unique ID":(null===(t=I())||void 0===t?void 0:t.userId)||V("guestToken")||"N/A","Content ID":this.getMixpanelDetails(this.mixpanelMetaData.contentID),Genre:this.getMixpanelDetails(this.mixpanelMetaData.gener),Characters:this.getMixpanelDetails(this.mixpanelMetaData.character),"Content Duration":this.getMixpanelDetails(this.mixpanelMetaData.duration),"Publishing Date":this.getMixpanelDetails(this.mixpanelMetaData.pubDate),Series:this.getSeriesName(u.singlePlayData),"Episode No":this.getMixpanelDetails(this.mixpanelMetaData.episodeNumber),"Content Specification":this.getMixpanelDetails(this.mixpanelMetaData.analyticData.asset_subtype),"Top Category":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.topCategory),"Channel Name":this.getMixpanelDetails(this.mixpanelMetaData.channel),"DRM Video":this.mixpanelMetaData.drmVideo,Subtitles:this.isSubtileSupport(),"Content Original Language":this.getMixpanelDetails(this.mixpanelMetaData.originalLanguage),"Audio Language":this.getCurrentAudioTrack(u.singlePlayData),"Subtitle Language":this.getMixpanelDetails(this.mixpanelMetaData.subtitle),"Tab Name":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.tabName),"Carousal Name":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.carouselName),"Carousal ID":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.carousalId),"Page Name":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.pageName:"N/A","Content Type":this.getBusinessType(u.singlePlayData),"Content Billing Type":this.getBillingType(this.mixpanelMetaData.singlePlayData)||"N/A","New Quality":this.getCurrentQuality()||"Auto",isEduauraa:1==this.getMixpanelAnalyticDetails()&&this.mixpanelMetaData.mixpanelDetail.isEduauraa,"Player Name":this.getMixpanelDetails(this.mixpanelMetaData.playerName),"Player Version":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.playerVersion),"Player Head Position":this.getMixpanelDetails(this.mixpanelMetaData.playerHeadPosition),"Vertical Index":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.verticalIndex:"N/A","Horizontal Index":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.horizontalIndex:"N/A","Image URL":this.getMixpanelDetails(this.mixpanelMetaData.analyticData.image_url?this.mixpanelMetaData.analyticData.image_url:"N/A"),Kids_Safe:T||"N/A","Profile ID":(null===(i=I())||void 0===i?void 0:i.id)||"N/A","Profile Number":(null===(n=I())||void 0===n?void 0:n.id)||"N/A","Profile Type":1===(null===(r=I())||void 0===r?void 0:r.profileType)?"Adult":0===(null===(s=I())||void 0===s?void 0:s.profileType)?"kids":"N/A","Profile Name":(null===(a=I())||void 0===a?void 0:a.name)||"N/A","Video Initiation Method":"N/A",isTalamoos:this.isTalamossEnabaled(),Is_email_present:nt()||!1,is_mobile_Present:it()||!1};if(p&&p.element&&(E.Element=p.element),p&&p.widgetName&&(E["Widget Name"]=p.widgetName),p&&p.buttonType&&(E["Button Type"]=p.buttonType),p&&p.previewStatus&&(E["Preview status"]=p.previewStatus),void 0!==h&&(this.watchDuration=h,E["Watch Duration"]=Math.floor(this.watchDuration)),"Skip Intro"===c&&(E["Player Head start position"]=Math.floor(p.playerHeadStartPosition),E["Player Head End Position"]=Math.floor(p.playerHeadEndPosition)),c===_.PLAYBACK_ERROR&&(E["Error Code"]=p.errorCode,E["Error Message"]=p.errorMessage),"Banner AutoPlay"===c&&(E["Video View"]=1,E["Video Autoplay"]="true",E["Conviva Session ID"]=S),"Video View"===c){var A=W("MIXPANEL_METRICS");E["User Click to SPAPI Request"]=A.SPAPI_Request_Time_1-A.CLICKED_EVT,E["SPAPI Request to Re
2sponse"]=A.SPAPI_Response_Time_1-A.SPAPI_Request_Time_1,E["Manifest Request to Response"]=A.Manifest_Response_1-A.Manifest_Request_1,E["Audio Init Chunk Request to Response"]=A.Audio_Init_Response_1-A.Audio_Init_Request_1,E["Video Init Chunk Request to Response"]=A.Video_Init_Response_1-A.Video_Init_Request_1,E["Audio Chunk Request to Response"]=A.Audio_Chunk_Response_1-A.Audio_Chunk_Request_1,E["Video Chunk Request to Response"]=A.Video_Chunk_Response_1-A.Video_Chunk_Request_1,E["DRM License Request to Response"]=A.DRM_Licence_Response_1-A.DRM_Licence_Request_1,E["User Click to First Frame Rendered for Video View"]=Date.now()-A.CLICKED_EVT,E["User Click to First Frame Rendered for Video View From Playing Event VideoJS"]=A.FIRST_FRAME_RENDERED-A.CLICKED_EVT,E.SPAPI_REQUEST_TIME=A.SPAPI_Request_Time_1,E.SPAPI_Response_Time=A.SPAPI_Response_Time_1,E.Manifest_Request=A.Manifest_Request,E.Manifest_Response=A.Manifest_Response,E.DRM_Licence_Request=A.DRM_Licence_Request_1,E.DRM_Licence_Response=A.DRM_Licence_Response_1,E.Audio_Init_Request=A.Audio_Init_Request,E.Audio_Init_Response=A.Audio_Init_Response,E.Audio_Chunk_Request=A.Audio_Chunk_Request,E.Audio_Chunk_Response=A.Audio_Chunk_Response,E.Video_Init_Request=A.Video_Init_Request,E.Video_Init_Response=A.Video_Init_Response,E.Video_Chunk_Request=A.Video_Chunk_Request,E.Video_Chunk_Response=A.Video_Chunk_Response,E.DRM_Licence_Response_FAILED=A.DRM_Licence_Response_FAILED||null,E["Video View"]=1,E["Video Autoplay"]=!0,E["Conviva Session ID"]=S,E.Affiliate=this.mixpanelMetaData.affiliate||"N/A",E.AutoPlay=this.mixpanelMetaData.autoPlay,sessionStorage.setItem("AutoPlay","Default")}if(c===_.seek_scrub){c="Scrub/Seek";var w=p.playerHeadStartPosition,P=p.playerHeadEndPosition,C=p.direction,L=p.seekScrubDuration;E["Player Head start position"]="N/A"===w?w:Math.floor(w),E["Player Head End Position"]="N/A"===P?P:Math.floor(P),E.Direction=C,E["Seek-Scrub Duration"]="N/A"===L?L:Math.floor(L)}if(c===_.audioLanguageChange&&(E["Old Audio Language"]=p.oldAudioLanguage,E["New Audio Language"]=p.newAudioLanguage,E["Language Type"]=null!=p&&p.isOriginalLanguage?"Original":"Dubbed",E["Change Source"]=p.audioChangeSource),c===_.subTitleChange&&(E["Old Subtitle Language"]=p.oldSubtitleLanguage,E["New Subtitle Language"]=p.newSubtitleLanguage),c===_.qualityChange&&(E["Old Quality"]=p.oldVideoQuality,E["New Quality"]=p.newVideoQuality),"Video Exit"===c&&(E["Talamoos origin"]=this.mixpanelMetaData.mixpanelDetail.origin,E["Talamoos modelName"]=this.mixpanelMetaData.mixpanelDetail.modelName,E["Talamoos clickID"]=this.mixpanelMetaData.mixpanelDetail.clickId),window.isSportsLive&&(E.isLive=!0),null!=u&&null!==(o=u.singlePlayData)&&void 0!==o&&null!==(o=o.assetDetails)&&void 0!==o&&o.asset_subtype&&"sports_vod"===u.singlePlayData.assetDetails.asset_subtype&&(E.isLive=!1),"Mute Changed"===c&&(E["Mute Value"]=p.muteValue,delete E["Player Head Position"]),"Video View"===c){var D,k,R,N=!1;(null!==(D=this.mixpanelMetaData.singlePlayData)&&void 0!==D&&null!==(D=D.tobaccoAdvisoryDetails)&&void 0!==D&&D.video_segments||null!==(k=this.mixpanelMetaData.singlePlayData)&&void 0!==k&&null!==(k=k.tobaccoAdvisoryDetails)&&void 0!==k&&k.aston_segments)&&(N=!0,null!==(R=this.mixpanelMetaData.singlePlayData)&&void 0!==R&&null!==(R=R.tobaccoAdvisoryDetails)&&void 0!==R&&R.aston_segments&&(E["Total Aston Bands"]=function(e){var t;return null==e||null===(t=e.tobaccoAdvisoryDetails)||void 0===t?void 0:t.aston_segments.length}(this.mixpanelMetaData.singlePlayData))),E["Contains HealthSpot"]=N}"Healthspot Viewed"===c&&(E["Healthspot Placement"]=p.healthSpotPlacement,p.advisoryVideoUrl&&(E["Advisory URL"]=p.advisoryVideoUrl)),"User Drop"===c&&(E["drop_off source"]=null===(f=this.mixpanelMetaData)||void 0===f?void 0:f.drop_off_source,E.Timestamp=this.watchDuration);var O=this.playerConfig,M=O.reportGA4Event,x=O.MixpanleRulesConfig,B=O.GA4RulesConfig,U=null!==(l=st(c,E,x))&&void 0!==l?l:{},F=null!==(d=st(c,E,B))&&void 0!==d?d:{};M&&M({eventName:ie(c),trackObject:F}),this.queueMixpanelEvents(c,U)}},{key:"adsMixpanelTrack",value:function(e){var t,i,n,r,s,a,o,l,d=e.mixpanelMetaData,u=e.mixpanelAdsData,c=e.eventName,h=(e.watchDuration,e.playerDetails);this.mixpanelMetaData=d,this.mixpanelAdsData=u;var p={Source:1==this.getMixpanelAnalyticDetails()?this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.source):"N/A","Content Name":this.getMixpanelDetails(this.mixpanelMetaData.analyticData.original_title),"Unique ID":(null===(t=I())||void 0===t?void 0:t.userId)||V("guestToken")||"N/A","Content ID":this.getMixpanelDetails(this.mixpanelMetaData.contentID),Genre:this.getMixpanelDetails(this.mixpanelMetaData.gener),Characters:this.getMixpanelDetails(this.mixpanelMetaData.character),"Content Duration":this.getMixpanelDetails(this.mixpanelMetaData.duration),"Publishing Date":this.getMixpanelDetails(this.mixpanelMetaData.pubDate),Series:this.getSeriesName(d.singlePlayData),"Episode No":this.getMixpanelDetails(this.mixpanelMetaData.episodeNumber),"Content Specification":this.getMixpanelDetails("NA"),"Top Category":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.topCategory),"Channel Name":this.getMixpanelDetails(this.mixpanelMetaData.channel),"DRM Video":this.mixpanelMetaData.drmVideo,Subtitles:this.isSubtileSupport(),"Content Original Language":this.getMixpanelDetails(this.mixpanelMetaData.originalLanguage),"Audio Language":this.getCurrentAudioTrack(d.singlePlayData),"Subtitle Language":this.getMixpanelDetails(this.mixpanelMetaData.subtitle),"Tab Name":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.tabName),"Carousal Name":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.carouselName),"Carousal ID":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.carousalId),"Page Name":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.pageName:"N/A","Content Type":this.getBusinessType(d.singlePlayData),"Content Billing Type":this.getBillingType(this.mixpanelMetaData.singlePlayData),"New Quality":this.getCurrentQuality()||"Auto",isEduauraa:1==this.getMixpanelAnalyticDetails()&&this.mixpanelMetaData.mixpanelDetail.isEduauraa,"Player Name":this.getMixpanelDetails(this.mixpanelMetaData.playerName),"Player Version":this.getMixpanelDetails(this.mixpanelMetaData.playerVersion),"Vertical Index":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.verticalIndex:"N/A","Horizontal Index":1==this.getMixpanelAnalyticDetails()?this.mixpanelMetaData.mixpanelDetail.horizontalIndex:"N/A","Image URL":this.getMixpanelDetails(this.mixpanelMetaData.analyticData.image_url?this.mixpanelMetaData.analyticData.image_url:"N/A"),"Talamoos origin":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.origin),"Talamoos modelName":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.modelName),"Talamoos clickID":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.clickId),isTalamoos:this.isTalamossEnabaled(),"Preview status":this.getMixpanelDetails(this.mixpanelMetaData.mixpanelDetail.previewStatus),"Advertiser ID":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.id):"N/A","Ad Title":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.title):"N/A","Ad Type":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.adType):"N/A","Ad Provider":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.managerName):"N/A","Ad Server Type":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.managerName):"N/A","Ad Position":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.type):"N/A","Ad Creative ID":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.creativeId):"N/A","Ad Location":"instream","Ad Duration":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.duration):"N/A","Ad Cue Time":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.cueTime):"N/A","Ad Destination URL":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.url):"N/A","Ad Pod Position":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.podPosition):"N/A","Midroll Position":1==this.getMixpanelAdsDetails()?this.getMixpanelDetails(this.mixpanelAdsData.midRollPosition):"N/A","Profile ID":(null===(i=I())||void 0===i?void 0:i.id)||"N/A","Profile Number":(null===(n=I())||void 0===n?void 0:n.id)||"N/A","Profile Type":1===(null===(r=I())||void 0===r?void 0:r.profileType)?"Adult":0===(null===(s=I())||void 0===s?void 0:s.profileType)?"kids":"N/A","Profile Name":(null===(a=I())||void 0===a?void 0:a.name)||"N/A",isLive:!(!window.isLive&&!window.isSportsLive),Is_email_present:nt()||!1,is_mobile_Present:it()||!1};"Ad View"===c&&(p["Video View"]=0,p["Talamoos origin"]=this.mixpanelMetaData.mixpanelDetail.origin,p["Talamoos modelName"]=this.mixpanelMetaData.mixpanelDetail.modelName,p["Talamoos clickID"]=this.mixpanelMetaData.mixpanelDetail.clickId,p["Preview status"]=this.mixpanelMetaData.mixpanelDetail.previewStatus,p["Ad Start Time"]=1==this.getMixpanelAdsDetails()?this.mixpanelAdsData.adStartTime&&this.mixpanelAdsData.adStartTime<1?this.mixpanelAdsData.adStartTime:Math.floor(this.mixpanelAdsData.adStartTime):"N/A"),"Ad Skip"===c&&(p.Element=h.element,p["Button Type"]=h.buttonType),"Ad Failure"===c&&(p["Failure Reason"]=h.failureReason),"Ad Clicks"===c&&(p["Player Head Position"]=h.playerHead),"Ad Initialized"!==c&&"Ad View"!==c&&"Ad Watch Duration"!==c&&"Ad click"!==c&&"End Card Impression"!==c||(p["Vertical Index"]=1==this.getMixpanelAnalyticDetails()&&this.mixpanelMetaData.mixpanelDetail.verticalIndex?this.mixpanelMetaData.mixpanelDetail.verticalIndex:"N/A",p["Horizontal Index"]=1==this.getMixpanelAnalyticDetails()&&this.mixpanelMetaData.mixpanelDetail.horizontalIndex?this.mixpanelMetaData.mixpanelDetail.horizontalIndex:"N/A");var f=this.playerConfig,g=f.reportGA4Event,m=f.MixpanleRulesConfig,v=f.GA4RulesConfig,y=null!==(o=st(c,p,m))&&void 0!==o?o:{},_=null!==(l=st(c,p,v))&&void 0!==l?l:{};g&&g({eventName:ie(c),trackObject:_}),this.queueMixpanelEvents(c,y)}},{key:"ReportEvent",value:function(e,t){var i={};if(this.mixpanelMetaData&&(!this.mixpanelMetaData||0!=Object.keys(this.mixpanelMetaData).length))switch(e){case _.adInitialized:this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration});break;case _.adStarted:e=_.adView,this.mixpanelAdsData.adStartTime=t.adStartTime,this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration});break;case _.adClicked:e="Ad Click",i={playerHead:t.adTimer},this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration});break;case _.userClosedAd:this.watchDuration=t,e="Ad Forced Exit",this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration});break;case _.adErrors:e="Ad Failure",i={failureReason:t},this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:{},eventName:e,watchDuration:this.watchDuration,playerDetails:i}
2);break;case _.exitBeforeAdStart:e="Exit Before Ad Start",this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration});break;case _.adSkipped:this.watchDuration=t,i={element:"Ad Skip",buttonType:"Player"},e="Ad Skip",this.mixpanelAdsData&&this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,watchDuration:this.watchDuration,eventName:e,playerDetails:i});break;case _.adCompleted:case _.playbackEnded:if(e==_.playbackEnded){this.watchDuration=t||0,i={previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Video Watch Duration",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i}),e="Video Exit",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});var n=document.querySelector(".gatingContainer"),r=document.querySelector(".freeMinutesInfoContainer");if(n||r){var s=n?"full_screen_pop-up":"consumption_screen";this.mixpanelMetaData.drop_off_source=s,this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:"User Drop",watchDuration:this.watchDuration,playerDetails:i})}}else this.watchDuration=t.watchDuration,e="Ad Watch Duration",this.mixpanelAdsData&&(t.type&&"EndCard"===t.type?(this.watchDuration=t.endcardDuration,this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:{},eventName:e,watchDuration:this.watchDuration})):(this.watchDuration=t.watchDuration,this.adsMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,mixpanelAdsData:this.mixpanelAdsData,eventName:e,watchDuration:this.watchDuration})));break;case _.firstPlay:e="Video View",this.mixpanelMetaData.autoPlay=t.autoPlay,this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration});break;case _.PLAYBACK_ERROR:i={errorCode:t.errorCode,errorMessage:t.errorMessage},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.autoSeek:e="Auto-seek",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.skipIntro:i={element:"Skip Intro",buttonType:"Player",playerHeadStartPosition:t.introStartTime,playerHeadEndPosition:t.introEndTime,previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.watchCredits:i={element:"Watch Credits",buttonType:"Player",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.pauseEvent:i={element:"Pause",buttonType:"Player",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Pause",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.playEvent:i={element:"Resume",buttonType:"Player",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e=_.resume,this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.onReplay:i={element:"Replay",buttonType:"Player",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Replay",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.seek_scrub:var a=t.from,o=t.to;i={previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus,playerHeadStartPosition:a,playerHeadEndPosition:o,direction:a<o?"forward":"backward",seekScrubDuration:a<o?Math.floor(o)-Math.floor(a):Math.floor(a)-Math.floor(o)},"N/A"===a&&(i.direction="N/A",i.seekScrubDuration="N/A"),this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i}
2);break;case _.audioLanguageChange:i={previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus,oldAudioLanguage:t.oldAudioLanguage,newAudioLanguage:t.newAudioLanguage,isOriginalLanguage:null==t?void 0:t.isOriginalLanguage,audioChangeSource:null==t?void 0:t.audioChangeSource},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.subTitleChange:i={previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus,oldSubtitleLanguage:t.oldSubtitleLanguage,newSubtitleLanguage:t.newSubtitleLanguage},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.qualityChange:i={previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus,oldVideoQuality:t.oldVideoQuality,newVideoQuality:t.newVideoQuality},this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.muteChanged:i={element:"Mute",buttonType:"Player",muteValue:t.muteValue?"on":"off"},e="Mute Changed",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.ribbin_ctas:case _.playerCtas:case _.ribbonImpression:i={element:"Settings",buttonType:"Player"},"Ribbon CTAs"!==e&&"Ribbon Impression"!==e||(i.buttonType="Ribbon"),t&&t.element&&(i.element=t.element),this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case S:case b:case T:this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.PLAYER_VIEW_CHANGED:i={element:"Fullscreen Toggle",buttonType:"Player"},e=_.PLAYER_VIEW_CHANGED,this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.healthSpotViewed:e=_.healthSpotViewed,i={healthSpotPlacement:t.healthSpotPlacement},t.advisoryVideoUrl&&(i.advisoryVideoUrl=t.advisoryVideoUrl),this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});case _.PIN_SCOREBOARD:i={widgetName:"Pin Scoreboard",buttonType:"View",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Widget Impression",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.SCORE_CLICK:i={widgetName:"Pin Scoreboard",element:"Score Click",buttonType:"Click",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Widget CTAs",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.PIN:i={widgetName:"Pin Scoreboard",element:"Pin",buttonType:"Click",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Widget CTAs",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i});break;case _.UNPIN:i={widgetName:"Pin Scoreboard",element:"Unpin",buttonType:"Click",previewStatus:this.mixpanelMetaData.mixpanelDetail.previewStatus},e="Widget CTAs",this.videoMixpanelTrack({mixpanelMetaData:this.mixpanelMetaData,eventName:e,watchDuration:this.watchDuration,playerDetails:i})}}}])}();function lt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function dt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var ut=function(){function e(){o(this,e),c(this,"setMixpanelPlayerConfig",(function(e){at.setMixpanelPlayerConfig(e)})),c(this,"setMixpanelVideoPlayer",(function(e){at.setMixpanelVideoPlayer(e)})),c(this,"setClevertapEventPushRef",(function(e){at.setClevertapEventPushRef(e)})),at=new ot}return u(e,[{key:"reportEvent",value:function(e,t){if(this.videoPlayer){if(e===_.firstPlay){this.oldSubtitleLanguage="off",this.newSubtitleLanguage="off",t=dt(dt({},t),{},{oldSubtitleLanguage:this.oldSubtitleLanguage,newSubtitleLanguage:this.newSubtitleLanguage});var i=this.videoPlayer.audioTracks().tracks_.filter((function(e){return!0===e.enabled}));i&&i.length>0?this.newAudioLanguage=i[0].label:this.newAudioLanguage="NA";var n=this.videoPlayer.qualityLevels();this.newVideoQuality="Auto",n&&n.length>0&&(this.newVideoQuality=n[n.selectedIndex].height||"Auto")}else if(e===_.subTitleChange){this.newSubtitleLanguage="off";var r=this.videoPlayer.textTracks().tracks_.filter((function(e){return"showing"===e.mode}));r&&r.length>0&&(this.newSubtitleLanguage=r[0].label),t={oldSubtitleLanguage:this.oldSubtitleLanguage,newSubtitleLanguage:this.newSubtitleLanguage},this.oldSubtitleLanguage=this.newSubtitleLanguage}else if(e===_.audioLanguageChange){var s,a,o,l,d,u;if(this.oldAudioLanguage===t.newAudioLanguage)return;t=t.oldAudioLanguage&&"N/A"!==t.oldAudioLanguage?{oldAudioLanguage:t.oldAudioLanguage,newAudioLanguage:t.newAudioLanguage||this.oldAudioLanguage,isOriginalLanguage:null===(o=t)||void 0===o?void 0:o.isOriginalLanguage,audioChangeSource:null===(l=t)||void 0===l?void 0:l.audioChangeSource}:{oldAudioLanguage:this.oldAudioLanguage||"NA",newAudioLanguage:t.newAudioLanguage||this.oldAudioLanguage,isOriginalLanguage:null===(d=t)||void 0===d?void 0:d.isOriginalLanguage,audioChangeSource:null===(u=t)||void 0===u?void 0:u.audioChangeSource},this.oldAudioLanguage=this.newAudioLanguage,this.newAudioLanguage=t.newAudioLanguage||this.oldAudioLanguage,this.isOriginalLanguage=null===(s=t)||void 0===s?void 0:s.isOriginalLanguage,this.audioChangeSource=null===(a=t)||void 0===a?void 0:a.audioChangeSource}else if(e===_.qualityChange){if(this.oldVideoQuality===t.newVideoQuality)return;t={oldVideoQuality:this.oldVideoQuality||"Auto",newVideoQuality:t.newVideoQuality||this.oldVideoQuality},this.oldVideoQuality=this.newVideoQuality,this.newVideoQuality=t.newVideoQuality||this.oldVideoQuality}at.ReportEvent(e,t)}}},{key:"setMixpanelData",value:function(e){at.setMixpanelMetaData(e)}},{key:"jsonInitilize",value:function(e,t){if(e&&t){this.videoPlayer=t;var i=e.singlePlayData||{},n=e.userData||{},r=i||{},s=r.entitlement,a=(void 0===s?{}:s).isTrailer,o=void 0===a?0:a,l=r.trailerDetails,d=o?void 0===l?{}:l:i.assetDetails,u={};e.mixpanelDetail&&(u.mixpanelDetail=e.mixpanelDetail),e.analyticData&&(u.anal
2yticData=e.analyticData),e.singlePlayData&&(u.singlePlayData=e.singlePlayData),e.autoplay="Yes",e.viewerGender=n&&n.gender||"NA",e.viewerAge=n&&n.age||"NA",e.playerVersion=window.convivaSDK&&window.convivaSDK.Gi&&window.convivaSDK.Gi.version||"4.5.7",e.connectionType=navigator.connection?navigator.connection.effectiveType:"NA",u.affiliate=H()||"NA",u.site=window.location.hostname,u.assetName=d.original_title,i.entitlement&&i.entitlement.isLive?u.streamUrl=i.keyOsDetails.video_token:d.is_drm?u.streamUrl=d.video||"NA":u.streamUrl=i.keyOsDetails&&i.keyOsDetails.hls_token,u.duration=d.duration,u.encodedFrameRate="NA",u.accessType="NA",u.contentID=d.id,u.viewerId=n&&n.id||"NA",u.viewerGender=n&&n.gender||"NA",u.viewerAge=n&&n.age||"NA",u.billing_type=d.billing_type||"NA",d.subtitle_languages&&d.subtitle_languages.length>0?u.subtitle=d.subtitle_languages:u.subtitle="NA",d.genres&&d.genres.length>0||d.genres&&d.genres.length>0?(u.gener=d.genres.map((function(e){return e.id})),u.lotamegener=d.genres.map((function(e){return e.id})).join(" ")):u.gener="NA",d.audio_languages&&d.audio_languages.length>0?(this.checkAudioValApi=d.audio_languages,u.audioLanguage=d.audio_languages,u.DisplayLanguage=d.audio_languages[0]):(u.audioLanguage="NA",u.DisplayLanguage="NA"),i.entitlement&&i.entitlement.isLive?(u.channel=d.original_title,d.countries&&d.countries.length>0?u.lotamecountries=d.countries.join(" "):u.lotamecountries="NA","episode"==d.asset_subtype?(u.episodeName=d.original_title||d.title,u.show=d.showDetails.original_title||d.showDetail
2s.title):(u.episodeName="NA",u.show="NA"),u.screen_height=window.screen.availHeight,u.screen_width=window.screen.availWidth,u.originalLanguage=d.languages&&d.languages[0]||"NA",u.lotameSeason=d.season):(u.episodeName="NA",u.category="NA",d.channels&&d.channels.length?u.channel=d.channels.map((function(e){return e.original_title})):u.channel="NA",u.ContentType="NA",u.pubDate="NA",u.show=d.original_title||d.title,u.originalLanguage="NA",u.audioLanguage=d.audio_languages||"NA"),u.originalLanguage=d.languages[0],u.pubDate=d.release_date,i.showDetails?(u.show=i.showDetails.original_title,u.season=i.showDetails.season):(u.show="NA",u.season="NA"),d.actors&&d.actors.length>0?(u.Actors=d.actors,u.character=d.actors):(u.Actors="N/A",u.character="N/A"),u.episodeNumber="episode"===d.asset_subtype&&d.orderid||"NA",u.drmVideo=!!d.is_drm,u.playerName="Web-Zee5";var c=0;if(i&&i.watchHistoryDetails){var h=(i||{}).watchHistoryDetails,p=void 0===h?{}:h;c=p.played_duration?p.played_duration:0}return u.playerHeadPosition=0!=c?q(c):"00:00:00",u}}},{key:"AdsInitilization",value:function(e){var t;t=function(e){console.log(e);var t,i=e.getAd();console.log(i);var n,r="N/A",s=window&&window.is_dai?"server-side":"client-side",a=window&&window.is_dai||!1;i&&i.j&&i.j.url?t=i.j.url:i&&i.j&&i.j.clickThroughUrl&&(t=i.j.clickThroughUrl);var o=i.getAdPodInfo().getPodIndex();n=0===o?"Pre-roll":-1===o?"Post-roll":"Mid-roll";var l={};return l.title=i.getTitle()||r,l.id=i.getAdId()||r,l.url=t||r,l.position=i.getAdPodInfo&&i.getAdPodInfo()&&i.getAdPodInfo().getAdPosition()||r,l.type=a?"Mid-roll":n,l.adType=i.getContentType&&i.getContentType()||r,l.system=i.getAdSystem&&i.getAdSystem()||r,l.midRollPosition=n&&"mid-roll"===n.toLowerCase()&&o&&o||r,l.noAds=i.getAdPodInfo&&i.getAdPodInfo().getTotalAds()||r,l.isAdPlayed=!0,l.isAllAdCompleted=!1,l.duration=i.getDuration&&i.getDuration()||r,l.bitrate=i.getVastMediaBitrate&&i.getVastMediaBitrate()||r,l.isSlate=!1,l.mediaFileApiFramework=i.getApiFramework()||r,l.unitName=r,l.cueTime=i.getAdPodInfo&&i.getAdPodInfo().getTimeOffset()||r,l.sequence=i.getAdPodInfo&&i.getAdPodInfo().getAdPosition()||r,l.creativeId=i.getCreativeId()||r,l.creativeName=i.getDescription()||r,l.breakId=r,l.category=r,l.classification=r,l.advertiser=i.getAdvertiserName()||r,l.advertiserCategory=r,l.advertiserId=r,l.campaignName=r,l.dayPart=r,l.managerVersion=r,l.sessionStartEvent=r,l.indiaexindia=r,l.technology=s,l.managerName=a?"dai":"ima",console.log(l),l}(e),at.setMixpanelAdMetaData(t)}},{key:"VmaxAdsInitilization",value:function(e){var t;t=function(e){var t,i="N/A",n=e["cue-point"];t=0===n?"Pre-roll":-1===n?"Post-roll":"Mid-roll";var r={};return r.title=e.adTitle||i,r.id=e.id||i,r.url=e.adClickThrough||i,r.position=e.pos||i,r.type=t,r.adType=t||i,r.system=i,r.midRollPosition=t&&"mid-roll"===t.toLowerCase()&&n&&n||i,r.noAds=i,r.isAdPlayed=!0,r.isAllAdCompleted=!1,r.duration=i,r.bitrate=i,r.isSlate=!1,r.mediaFileApiFramework=i,r.unitName=i,r.cueTime=i,r.sequence=i,r.creativeId=e.id||i,r.creativeName=e.name||i,r.breakId=i,r.category=i,r.classification=i,r.advertiser=e.advertiserMarketer||i,r.advertiserCategory=i,r.advertiserId=e.advertiserId||i,r.campaignName=e.campaignName||i,r.dayPart=i,r.managerVersion=i,r.sessionStartEvent=i,r.indiaexindia=i,r.technology="client-side",r.managerName="vmax",r}(e),at.setMixpanelAdMetaData(t)}}],[{key:"getInstance",value:function(){return e._instance||(e._instance=new e),e._instance}}])}();function ct(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ht(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ct(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var pt=function(){return u((function e(){o(this,e)}
2),[{key:"isConvivaAvailable",value:function(){return"undefined"!=typeof window&&window.convivaAnalytic}},{key:"updateConvivaIntitialContent",value:function(e,t){var i;if(this.isConvivaAvailable()){window.isConvivaSessionRequired=!0;var n="undefined"!=typeof window?window.playerAnalyticsObject:{};null===(i=window.convivaAnalytic)||void 0===i||i.setInitialContentInfo(ht(ht({},e),n),t)}}},{key:"parentalInititalContent",value:function(e,t){var i;if(this.isConvivaAvailable()){window.isConvivaSessionRequired=!0;var n="undefined"!=typeof window?window.playerAnalyticsObject:{};null===(i=window.convivaAnalytic)||void 0===i||i.setInitialContentInfo(ht(ht({},e),n),t)}}},{key:"reportPlaybackEndedConviva",value:function(){var e,t;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent((null===(t=window.Conviva)||void 0===t?void 0:t.Constants.PlayerState.STOPPED)||""))}},{key:"updateConvivaInfo",value:function(e){var t,i;this.isConvivaAvailable()&&null!==(t=window)&&void 0!==t&&t.convivaAnalytic&&null!==(i=window)&&void 0!==i&&null!==(i=i.convivaAnalytic)&&void 0!==i&&i.setContentInfo&&window.convivaAnalytic.setContentInfo(e)}},{key:"setConvivaAdAnalytics",value:function(e,t){if(this.isConvivaAvailable())try{var i,n,r,s={};s[null===(i=window.Conviva)||void 0===i?void 0:i.Constants.AD_TAG_URL]="adTagUrl",s[null===(n=window.Conviva)||void 0===n?void 0:n.Constants.AD_PRELOAD_FEATURE]=!0,s[null===(r=window.Conviva)||void 0===r?void 0:r.Constants.IMASDK_CONTENT_PLAYER]=e,window&&window.adsLoader&&"PREMIUM"!=t.toUpperCase()&&(window.convivaAdAnalytics.setAdListener(window.adsLoader,s),console.log("adLoader Object integrated to ConvivaAdSDK"),window.adsLoader="")}catch(e){console.error("error adding videoplayer to Conviva AD SDK==",e)}}},{key:"getConvivaAdditonalData",value:function(e){var t=e||{},i=t.user,n=(void 0===i?{}:i).gender,r=void 0===n?"Not-Received":n,s=t.age,a=void 0===s?"Not-Received":s;return{userAge:a&&"NA"!==a&&"Unknown"!==a?a.toString():"Not-Received",userGender:r&&"NA"!==r&&"Unknown"===r?"Not-Received":r}}},{key:"getConvivaAdMetadata",value:function(e){var t,i,n,r,s={},a=window.is_dai||!1,o=e.j&&e.j.j&&e.j.j[0]&&e.j.j[0].j||"N/A";if(s[window.Conviva.Constants.ASSET_NAME]=e.getTitle(),s[window.Conviva.Constants.STREAM_URL]=e.getMediaUrl&&e.getMediaUrl()||o,s[window.Conviva.Constants.DURATION]=e.getDuration&&e.getDuration()||"N/A",s[window.Conviva.Constants.IS_LIVE]=window&&window.isLive?window.Conviva.Constants.StreamType.LIVE:window.Conviva.Constants.StreamType.VOD,s[window.Conviva.Constants.ENCODED_FRAMERATE]=30,e.getWrapperAdIds()&&0!==e.getWrapperAdIds().length){var l=e.getWrapperAdIds().length;t=e.getWrapperAdSystems()[l-1],i=e.getWrapperAdIds()[l-1],n=e.getWrapperCreativeIds()[l-1]}else t=e.getAdSystem&&e.getAdSystem()||"N/A",i=e.getAdId&&e.getAdId()||"N/A",n=e.getCreativeId&&e.getCreativeId()||"N/A";var d=e.getAdPodInfo().getPodIndex();r=0===d?"Preroll":-1===d?"Postroll":"Midroll";var u="N/A";e.getAdvertiserName&&(u=e.getAdvertiserName());var c="N/A";return e.getDescription&&(c=e.getDescription()),s["c3.ad.id"]=(e.getAdId()||"N/A").toString(),s["c3.ad.creativeId"]=(e.getCreativeId()||"N/A").toString(),s["c3.ad.technology"]=a?window.Conviva.Constants.AdType.SERVER_SIDE:"Client Side",s["c3.ad.system"]=(e.getAdSystem()||"N/A").toString(),s["c3.ad.sequence"]=(e.getAdPodInfo().getAdPosition()||"N/A").toString(),s["c3.ad.mediaFileApiFramework"]=(e.getApiFramework()||"N/A").toString(),s["c3.ad.advertiser"]=u||"N/A",s["c3.ad.position"]=a?window.Conviva.Constants.AdPosition.MIDROLL:window.Conviva.Constants.AdPosition[r.toUpperCase()]||"NA",s["c3.ad.adManagerName"]=a?"dai":"ima",s["c3.ad.adManagerVersion"]=window.google.ima.VERSION||"N/A",s["c3.ad.appVersion"]=window.appVersion||"N/A",s["c3.ad.firstAdSystem"]=t||"N/A",s["c3.ad.firstAdId"]=i||"N/A",s["c3.ad.firstCreativeId"]=n||"N/A",s["c3.ad.advertiserCategory"]="N/A",s["c3.ad.advertiserId"]="N/A",s["c3.ad.breakId"]="N/A",s["c3.ad.campaignName"]="N/A",s["c3.ad.adStitcher"]=a?"Google DAI":"ima",s["c3.ad.category"]="N/A",s["c3.ad.classification"]="N/A",s["c3.ad.creativeName"]=c||"N/A",s["c3.ad.dayPart"]="N/A",s["c3.ad.sessionStartEvent"]="N/A",s["c3.ad.unitName"]="N/A",s["c3.ad.isSlate"]="false",s[window.Conviva.Constants.FRAMEWORK_NAME]=a?"Google imadai":"Google ima",s[window.Conviva.Constants.FRAMEWORK_VERSION]=window.google.ima.VERSION,s[window.Conviva.Constants.DEFAULT_RESOURCE]="AMAZON",s}},{key:"adStartedEvent",value:function(e){var t,i,n,r;if(this.isConvivaAvailable()){var s=this.getConvivaAdMetadata(e.getAd());if(null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent("adStarted",s),e&&e.getAd){var a,o=e.getAd().getVastMediaBitrate&&e.getAd().getVastMediaBitrate()?e.getAd().getVastMediaBitrate():0;null===(a=window.convivaAnalytic)||void 0===a||a.reportEvent("adBitrate",o)}null===(i=window.convivaAnalytic)||void 0===i||i.setContentInfo({adID:s["c3.ad.id"]}),null===(n=window.convivaAnalytic)||void 0===n||n.setContentInfo({"c3.csid":s["c3.ad.id"]}),null===(r=window.convivaAnalytic)||void 0===r||r.setContentInfo({adPosition:s["c3.ad.position"]})}}},{key:"adCompletedEvent",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adCompleted"))}},{key:"adProgressEvent",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adProgress"))}},{key:"adError",value:function(e){var t;this.isConvivaAvailable()&&(null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent("adError",e))}},{key:"adBreakStart",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adBreakStart"))}},{key:"adBreakEnd",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adBreakEnd"))}},{key:"adSkipped",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adSkipped"))}},{key:"playerProgress",value:function(){}},{key:"onAdPaused",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("adPaused"))}},{key:"adLoaded",value:function(){var e;this.isConvivaAvailable()&&(window.isConvivaSessionRequired||(window.isConvivaAdSessionRequired=!0,null===(e=window.convivaAnalytic)||void 0===e||e.setAdInitialInfo()))}},{key:"reportEvent",value:function(e,t){var i;this.isConvivaAvailable()&&(null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent(e,t))}},{key:"reportErrorEvent",value:function(e,t){var i;this.isConvivaAvailable()&&(null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent(e,t))}},{key:"createConvivaSessionOnSkip",value:function(e){if(this.isConvivaAvailable()){var t,i,n=e||{},r=n.singlePlayDetails,s=void 0===r?{}:r,a=(n.playerConfig,s||{}),o=a.assetDetails,l=void 0===o?{}:o,d=a.keyOsDetails,u=void 0===d?{}
2:d,c=a.showDetails,h=void 0===c?{}:c,p=a.tobaccoAdvisoryDetails,f=void 0===p?{}:p;window&&window.convivaAnalytic&&window.Conviva&&(null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent((null===(i=window.Conviva)||void 0===i?void 0:i.Constants.PlayerState.STOPPED)||""),this.updateConvivaIntitialContent(ht(ht(ht({},l),u),f),h))}}},{key:"createConvivaSessionParental",value:function(e){if(this.isConvivaAvailable()){var t,i,n=e||{},r=n.singlePlayDetails,s=void 0===r?{}:r,a=(n.playerConfig,s||{}),o=a.assetDetails,l=void 0===o?{}:o,d=a.keyOsDetails,u=void 0===d?{}:d,c=a.showDetails,h=void 0===c?{}:c;window&&window.convivaAnalytic&&window.Conviva&&(null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent((null===(i=window.Conviva)||void 0===i?void 0:i.Constants.PlayerState.STOPPED)||""),this.parentalInititalContent(ht(ht({},l),u),h),this.convivaSessionWaitStarted())}}},{key:"convivaSessionWaitStarted",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent(window.Conviva.Constants.Events.USER_WAIT_STARTED||""))}},{key:"convivaSessionWaitEnded",value:function(e){var t,i,n;this.isConvivaAvailable()&&(window.parentalPinPopUpEnabled=void 0,window.parentalPinIncorrect=void 0,null===(t=window.convivaSDK)||void 0===t||t.setPlayer(e),null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_ENDED)||""))}},{key:"convivaDrmSessionWaitStarted",value:function(e){var t,i,n;this.isConvivaAvailable()&&(null===(t=window.convivaSDK)||void 0===t||t.setPlayer(e),null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_ENDED)||""))}},{key:"updateBufferPlayHeadTime",value:function(){var e;this.isConvivaAvailable()&&(null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent("updateBufferPlayHeadTime"))}}])}();function ft(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function gt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ft(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var mt=function(){return u((function e(){o(this,e)}),[{key:"updateConvivaIntitialContent",value:function(e,t){window.isConvivaSessionRequired=!0;var i="undefined"!=typeof window?window.playerAnalyticsObject:{};window.keyMomentsconvivaAnalytic.setInitialContentInfoKeyMoments(gt(gt({},e),i),t)}},{key:"parentalInititalContent",value:function(e,t){window.isConvivaSessionRequired=!0;var i="undefined"!=typeof window?window.playerAnalyticsObject:{};window.keyMomentsconvivaAnalytic.setInitialContentInfoKeyMoments(gt(gt({},e),i),t)}},{key:"reportPlaybackEndedConviva",value:function(){var e;window.keyMomentsconvivaAnalytic.reportEvent((null===(e=window.Conviva)||void 0===e?void 0:e.Constants.PlayerState.STOPPED)||"")}},{key:"updateConvivaInfo",value:function(e){window.keyMomentsconvivaAnalytic.setContentInfo(e)}},{key:"setConvivaAdAnalytics",value:function(e,t){try{var i={};i[window.Conviva.Constants.AD_TAG_URL]="adTagUrl",i[window.Conviva.Constants.AD_PRELOAD_FEATURE]=!0,i[window.Conviva.Constants.IMASDK_CONTENT_PLAYER]=e,window&&window.adsLoader&&"PREMIUM"!=t.toUpperCase()&&(window.convivaAdAnalytics.setAdListener(window.adsLoader,i),console.log("adLoader Object integrated to ConvivaAdSDK"),window.adsLoader="")}catch(e){console.error("error adding videoplayer to Conviva AD SDK==",e)}}},{key:"getConvivaAdditonalData",value:function(e){var t=e||{},i=t.user,n=(void 0===i?{}:i).gender,r=void 0===n?"Not-Received":n,s=t.age,a=void 0===s?"Not-Received":s;return{userAge:a&&"NA"!==a&&"Unknown"!==a?a.toString():"Not-Received",userGender:r&&"NA"!==r&&"Unknown"===r?"Not-Received":r}}},{key:"getConvivaAdMetadata",value:function(e){var t,i,n,r,s,a,o,l,d,u,c={},h=window.is_dai||!1,p=e.j&&e.j.j&&e.j.j[0]&&e.j.j[0].j||"N/A";if(c[window.Conviva.Constants.ASSET_NAME]=e.getTitle(),c[window.Conviva.Constants.STREAM_URL]=e.getMediaUrl&&e.getMediaUrl()||p,c[window.Conviva.Constants.DURATION]=e.getDuration&&e.getDuration()||"N/A",c[window.Conviva.Constants.IS_LIVE]=window&&window.isLive?window.Conviva.Constants.StreamType.LIVE:window.Conviva.Constants.StreamType.VOD,c[window.Conviva.Constants.ENCODED_FRAMERATE]=30,e.getWrapperAdIds()&&0!==e.getWrapperAdIds().length){var f=e.getWrapperAdIds().length;o=e.getWrapperAdSystems()[f-1],l=e.getWrapperAdIds()[f-1],d=e.getWrapperCreativeIds()[f-1]}
2else o=e.getAdSystem&&e.getAdSystem()||"N/A",l=e.getAdId&&e.getAdId()||"N/A",d=e.getCreativeId&&e.getCreativeId()||"N/A";var g=e.getAdPodInfo().getPodIndex();u=0===g?"Pre-roll":-1===g?"Post-roll":"Mid-roll";var m="N/A";e.getAdvertiserName&&(m=e.getAdvertiserName());var v="N/A";return e.getDescription&&(v=e.getDescription()),c["c3.ad.id"]=(e.getAdId()||"N/A").toString(),c["c3.ad.creativeId"]=(e.getCreativeId()||"N/A").toString(),c["c3.ad.technology"]=h?null===(t=window.Conviva)||void 0===t||null===(t=t.Constants)||void 0===t||null===(t=t.AdType)||void 0===t?void 0:t.SERVER_SIDE:"Client Side",c["c3.ad.system"]=(e.getAdSystem()||"N/A").toString(),c["c3.ad.sequence"]=(e.getAdPodInfo().getAdPosition()||"N/A").toString(),c["c3.ad.mediaFileApiFramework"]=(e.getApiFramework()||"N/A").toString(),c["c3.ad.advertiser"]=m||"N/A",c["c3.ad.position"]=h?null===(i=window.Conviva)||void 0===i||null===(i=i.Constants)||void 0===i||null===(i=i.AdPosition)||void 0===i?void 0:i.MIDROLL:(null===(n=window.Conviva)||void 0===n||null===(n=n.Constants)||void 0===n||null===(n=n.AdPosition)||void 0===n?void 0:n[u.toUpperCase()])||"NA",c["c3.ad.adManagerName"]=h?"dai":"ima",c["c3.ad.adManagerVersion"]=window.google.ima.VERSION||"N/A",c["c3.ad.appVersion"]=window.appVersion||"N/A",c["c3.ad.firstAdSystem"]=o||"N/A",c["c3.ad.firstAdId"]=l||"N/A",c["c3.ad.firstCreativeId"]=d||"N/A",c["c3.ad.advertiserCategory"]="N/A",c["c3.ad.advertiserId"]="N/A",c["c3.ad.breakId"]="N/A",c["c3.ad.campaignName"]="N/A",c["c3.ad.adStitcher"]=h?"Google DAI":"ima",c["c3.ad.category"]="N/A",c["c3.ad.classification"]="N/A",c["c3.ad.creativeName"]=v||"N/A",c["c3.ad.dayPart"]="N/A",c["c3.ad.sessionStartEvent"]="N/A",c["c3.ad.unitName"]="N/A",c["c3.ad.isSlate"]="false",c[null===(r=window.Conviva)||void 0===r?void 0:r.Constants.FRAMEWORK_NAME]=h?"Google imadai":"Google ima",c[null===(s=window.Conviva)||void 0===s?void 0:s.Constants.FRAMEWORK_VERSION]=window.google.ima.VERSION,c[null===(a=window.Conviva)||void 0===a?void 0:a.Constants.DEFAULT_RESOURCE]="AMAZON",c}},{key:"adStartedEvent",value:function(e){var t,i,n,r=this.getConvivaAdMetadata(e.getAd());if(null===(t=window.keyMomentsconvivaAnalytic)||void 0===t||t.reportEvent("adStarted",r),e&&e.getAd){var s,a=e.getAd().getVastMediaBitrate&&e.getAd().getVastMediaBitrate()?e.getAd().getVastMediaBitrate():0;null===(s=window.keyMomentsconvivaAnalytic)||void 0===s||s.reportEvent("adBitrate",a)}null===(i=window.keyMomentsconvivaAnalytic)||void 0===i||i.setContentInfo({adID:r["c3.ad.id"]}),null===(n=window.keyMomentsconvivaAnalytic)||void 0===n||n.setContentInfo({"c3.csid":r["c3.ad.id"]})}},{key:"adCompletedEvent",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adCompleted")}},{key:"adProgressEvent",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adProgress")}},{key:"adError",value:function(e){var t;null===(t=window.keyMomentsconvivaAnalytic)||void 0===t||t.reportEvent("adError",e)}},{key:"adBreakStart",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adBreakStart")}},{key:"adBreakEnd",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adBreakEnd")}},{key:"adSkipped",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adSkipped")}},{key:"onAdPaused",value:function(){var e;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent("adPaused")}},{key:"adLoaded",value:function(){window.isConvivaSessionRequired||(window.isConvivaAdSessionRequired=!0,window.keyMomentsconvivaAnalytic.setAdInitialInfo())}},{key:"reportEvent",value:function(e,t){var i;null===(i=window.keyMomentsconvivaAnalytic)||void 0===i||i.reportEvent(e,t)}},{key:"reportErrorEvent",value:function(e,t){var i;null===(i=window.keyMomentsconvivaAnalytic)||void 0===i||i.reportEvent(e,t)}},{key:"createConvivaSessionOnSkip",value:function(e){var t,i,n=e||{},r=n.singlePlayDetails,s=void 0===r?{}:r,a=n.playerConfig,o=(((void 0===a?{}:a)||{}).userData,s||{}),l=o.assetDetails,d=void 0===l?{}:l,u=o.keyOsDetails,c=void 0===u?{}
2:u,h=o.showDetails,p=void 0===h?{}:h;window&&window.keyMomentsconvivaAnalytic&&window.Conviva&&(null===(t=window.keyMomentsconvivaAnalytic)||void 0===t||t.reportEvent((null===(i=window.Conviva)||void 0===i?void 0:i.Constants.PlayerState.STOPPED)||""),this.updateConvivaIntitialContent(gt(gt({},d),c),p))}},{key:"createConvivaSessionParental",value:function(e){var t,i,n=e||{},r=n.singlePlayDetails,s=void 0===r?{}:r,a=n.playerConfig,o=(((void 0===a?{}:a)||{}).userData,s||{}),l=o.assetDetails,d=void 0===l?{}:l,u=o.keyOsDetails,c=void 0===u?{}:u,h=o.showDetails,p=void 0===h?{}:h;window&&window.keyMomentsconvivaAnalytic&&window.Conviva&&(null===(t=window.keyMomentsconvivaAnalytic)||void 0===t||t.reportEvent(null===(i=window.Conviva)||void 0===i?void 0:i.Constants.PlayerState.STOPPED),this.parentalInititalContent(gt(gt({},d),c),p),this.convivaSessionWaitStarted())}},{key:"convivaSessionWaitStarted",value:function(){var e,t;null===(e=window.keyMomentsconvivaAnalytic)||void 0===e||e.reportEvent(null===(t=window.Conviva)||void 0===t?void 0:t.Constants.Events.USER_WAIT_STARTED)}},{key:"convivaSessionWaitEnded",value:function(e){var t,i,n;window.parentalPinPopUpEnabled=void 0,window.parentalPinIncorrect=void 0,null===(t=window.convivaSDK)||void 0===t||t.setPlayer(e),null===(i=window.keyMomentsconvivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_ENDED)||"")}},{key:"convivaDrmSessionWaitStarted",value:function(e){var t,i,n;null===(t=window.convivaSDK)||void 0===t||t.setPlayer(e),null===(i=window.keyMomentsconvivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_ENDED)||"")}},{key:"updateBufferPlayHeadTime",value:function(){window.keyMomentsconvivaAnalytic.reportEvent("updateBufferPlayHeadTime")}}])}();function vt(){var e=(window.translationsAndConfigs||{}).messages,t=void 0===e?{}:e,i=document.createElement("DIV");i.className="trailerInfoContainer",i.innerText=t.Player_Msg_WatchingTrailer;var n=document.querySelector(".playerComp");n&&n.appendChild(i)}var yt=u((function e(t,i,n,r){o(this,e),this.code=t,this.category=i,this.severity=n,this.message=r})),_t=function(e){return e[e.RECOVERABLE=0]="RECOVERABLE",e[e.CRITICAL=1]="CRITICAL",e}({}),bt=function(e){return e[e.NETWORK=0]="NETWORK",e[e.TEXT=1]="TEXT",e[e.MEDIA=2]="MEDIA",e[e.MANIFEST=3]="MANIFEST",e[e.STREAMING=4]="STREAMING",e[e.DRM=5]="DRM",e[e.PLAYER=6]="PLAYER",e[e.CAST=7]="CAST",e[e.ADS=8]="ADS",e}({}),Tt=function(e){return e[e.UNSUPPORTED_SCHEME=1e3]="UNSUPPORTED_SCHEME",e[e.BAD_HTTP_STATUS=1001]="BAD_HTTP_STATUS",e[e.HTTP_ERROR=1002]="HTTP_ERROR",e[e.TIMEOUT=1003]="TIMEOUT",e[e.MALFORMED_DATA_URI=1004]="MALFORMED_DATA_URI",e[e.REQUEST_FILTER_ERROR=1005]="REQUEST_FILTER_ERROR",e[e.INVALID_TEXT_HEADER=2e3]="INVALID_TEXT_HEADER",e[e.INVALID_TEXT_CUE=2001]="INVALID_TEXT_CUE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=3e3]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.NETWORK=3001]="NETWORK",e[e.DECODER=3002]="DECODER",e[e.ABORTED=3003]="ABORTED",e[e.CUSTOM=3004]="CUSTOM",e[e.FAILED_TO_REQUEST_ADS=9e3]="FAILED_TO_REQUEST_ADS",e}({});function St(){var e=document.createElement("div");e.setAttribute("class","initialShopIconContainer"),e.setAttribute("id","initialShopIconContainer");var t=document.createElement("span");t.setAttribute("class","shopIcon"),e.appendChild(t);var i=document.createElement("span"),n=(window.translationsAndConfigs||{}).messages,r=(void 0===n?{}:n).ContextualCommerce_ShopNudge,s=void 0===r?"Buy what you see":r;i.innerText=s,i.setAttribute("class","calloutContainer"),e.appendChild(i);var a=document.getElementById("video-tag");null==a||a.appendChild(e)}var Et=function(e){return e.CONFIG_TOBACCO="config_tobacco",e.CONFIG_GOOGLE_IMA="config_google_ima",e.CONFIG_PLAYER_RELOAD="config_player_reload",e.CONFIG_SPORTS="config_sports",e.FEATURE_ABR_CAPPING="feature_abr_capping",e.FEATURE_MIMETYPE_CHECK_ENABLED="feature_mimetype_check_enabled",e.CONFIG_PLAYER_OPTIONS_MOBILE="config_player_options_mobile",e.CONFIG_PLAYER_OPTIONS_DESKTOP="config_player_options_desktop",e.CONFIG_
2COMMERCE="config_commerce",e.CONFIG_REGISTRATION_POPUP="config_registration_popup",e.FEATURE_GATING="xmin_gating",e.CONFIG_PLAYER_ENTITLED_LANGUAGES="config_player_entitled_languages",e.CONFIG_PLAYER_LOGO="config_player_logo",e.MULTI_AUDIO="multi_audio_selection",e.CONFIG_PROFILES="config_profiles",e.CONFIG_NEW_SUBSCRIPTION_UI="config_new_sub_ui",e.DISABLE_UPNEXT_RECO_API="disable_upnext_reco_api",e.ENABLE_WATCH_HISTORY_VOD="enable_watch_history_vod",e.ENABLE_AD_MARKERS="enable_ad_markers",e}({});function At(e){var t=null==e?void 0:e.getFeatureFlagConfig(Et.CONFIG_NEW_SUBSCRIPTION_UI),i=I(),n=R(t),r=document.querySelector(".skip_intro_upgrade"),s=document.querySelector(".audio-selection-wrapper");if(!r&&!s){var a=null==e?void 0:e.upgradeData,o=!!a,l=document.querySelector(".skip_intro_container");if(o&&l&&(0!==(null==i?void 0:i.profileType)||n)){var d,u=document.createElement("DIV");u.className="skip_intro_upgrade";var c=null!==(d=null==a?void 0:a.title)&&void 0!==d?d:"";window.innerWidth<=600?u.innerHTML="<span>Upgrade</span>":u.innerHTML="<span>Upgrade to ".concat(c,"</span>"),u.addEventListener("click",(function(){null!=e&&e.redirectHandler&&"function"==typeof e.redirectHandler?e.redirectHandler("/myaccount/subscription"):window.location.href="/myaccount/subscription"})),null==l||l.insertBefore(u,l.firstChild)}}}function wt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Pt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Lt,Dt,kt,It,Rt,Nt,Ot,Mt,xt,Bt=!0,Ut=!1,Vt=!1,Ft={},qt=0,jt=0,Ht=0,Gt=0,Wt=!1,Xt=!1,Kt=!1,zt=5,Yt=null,Qt=0,Jt=0,$t=!1,Zt=!1,ei=!1,ti=!0,ii=!0,ni=!0,ri=!1,si=!1,ai=!0,oi=!1;function li(e){Ft=e,Vt=!1,Gt=0,arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(It=new mt,Rt=ut.getInstance()):(It=new pt,Rt=ut.getInstance()),Zt=!1,Nt=new Date,Ot=!1}function di(){var e;return null===(e=Ft)||void 0===e||null===(e=e.playerConfig)||void 0===e?void 0:e.isFeatureEnabled(Et.CONFIG_COMMERCE)}function ui(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=null===(e=Ft)||void 0===e||null===(e=e.playerConfig)||void 0===e?void 0:e.getFeatureFlagConfig(Et.CONFIG_COMMERCE),n=i.enabled,r=i.payload;return(n?r.commerce_assets:[]).includes(t)}function ci(){!function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.getElementById("initialShopIconContainer"),i=null==t?void 0:t.classList;i&&i.length&&(e?null==i||i.add("adjustShopIconContainerOnChromecast"):null==i||i.remove("adjustShopIconContainerOnChromecast"))}(!!document.querySelector(".chromeCastIcon"))}var hi=function(){Rt.reportEvent(_.PIN_SCOREBOARD,null)},pi=function(){var e=a(p().mark((function e(t){var i,n,r,s,a,o,l,d,u,c,h,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(r=t||{}).createScoreContainer,a=void 0===s?null:s,o=r.removeScorecardWidget,l=void 0===o?null:o,d=t.getFeatureFlagConfig("config_sports")||{},u=d.payload,c=u.pinnedScorecard_flag,h=u.pinnedScorecard_position,f=null!==(i=null===(n=Ft)||void 0===n||null===(n=n.singlePlayDetails)||void 0===n?void 0:n.entitlement)&&void 0!==i?i:{},g=f.isTrailer,m=void 0===g?0:g,v=t.userType,y=void 0===v?"guest":v,!a||!c||m||"premium"===(null==y?void 0:y.toLowerCase())||"ILT20 ConsumptionPage"===t.mixpanelData.pageName){e.next=29;break}return S=Y("xaccesstoken")||"",E=Q(t),e.prev=8,e.next=11,fetch(E,{headers:{"x-access-token":S}});case 11:if(200!==(null==(A=e.sent)?void 0:A.status)||null!=A&&A.json){e.next=16;break}return l(),clearInterval(kt),e.abrupt("return");case 16:return e.next=18,A.json();case 18:w=e.sent,T=w,Dt=!0,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(8),Dt=!1;case 26:Lt=null===(_=T)||void 0===_||null===(_=_.status)||void 0===_?void 0:_.toLowerCase(),Bt&&(fi(t),Bt=!1),"live"===(null===(b=T)||void 0===b||null===(b=b.status)||void 0===b?void 0:b.toLowerCase())?(M={teamA:null===(P=T)||void 0===P||null===(P=P.battingTeamDetail)||void 0===P?void 0:P.shortName,scoreA:null===(C=T)||void 0===C||null===(C=C.battingTeamDetail)||void 0===C?void 0:C.scores,oversA:null===(L=T)||void 0===L||null===(L=L.battingTeamDetail)||void 0===L?void 0:L.overs,teamB:null===(D=T)||void 0===D||null===(D=D.bowlingTeamDetail)||void 0===D?void 0:D.shortName,scoreB:null===(k=T)||void 0===k||null===(k=k.bowlingTeamDetail)||void 0===k?void 0:k.scores,oversB:null===(I=T)||void 0===I||null===(I=I.bowlingTeamDetail)||void 0===I?void 0:I.overs,matchId:null===(R=T)||void 0===R?void 0:R.matchId,tournamentId:null===(N=T)||void 0===N?void 0:N.tournamentId,title:null===(O=T)||void 0===O||null===(O=O.shortTitle)||void 0===O?void 0:O.replaceAll(" ","").toLowerCase(),currentAPIcheck:Dt,scoreBoardPosition:h}).teamA&&M.scoreA&&M.oversA&&M.matchId&&M.tournamentId&&M.title&&M.currentAPIcheck&&M.scoreBoardPosition&&a(M):(l(),clearInterval(kt));case 29:case"end":return e.stop()}}),e,null,[[8,23]])})));return function(t){return e.apply(this,arguments)}}();function fi(e){return gi.apply(this,arguments)}function gi(){return(gi=a(p().mark((function e(t){var i,n,r,s,o,l,d,u,c,h,f;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getFeatureFlagConfig("config_sports")||{},s=r.payload,o=null==s?void 0:s.pinnedScorecard_interval,l=null==s?void 0:s.pinnedScorecard_flag,d=null===(i=Ft)||void 0===i||null===(i=i.singlePlayDetails)||void 0===i?void 0:i.entitlement,u=d.isTrailer,c=void 0===u?0:u,h=t.userType,f=void 0===h?"guest":h,l&&"live"===(null===(n=Lt)||void 0===n?void 0:n.toLowerCase())&&!c&&"premium"!==(null==f?void 0:f.toLowerCase())&&"ILT20 ConsumptionPage"!==t.mixpanelData.pageName&&(hi(),Bt=!1,kt=setInterval(a(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:pi(t);case 1:case"end":return e.stop()}}),e)}))),1e3*o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mi(){return mi=a(p().mark((function e(t){var i,n,r,s,a,o,l,d,u,c,h,f,g,m,v,y,b,T,S,A,w,P,C,L,D,I,R,N,O,M,x,B,U,V,F,q,j,H,G,W=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=W.length>1&&void 0!==W[1]&&W[1],n=W.length>2&&void 0!==W[2]&&W[2],ii&&(ri=di(),ii=!1),r=document.querySelector(".initialShopIconContainer"),s=(Ft||{}).singlePlayDetails,a=(void 0===s?{}:s).assetDetails,l=(o=void 0===a?{}:a).asset_subtype,d=void 0===l?"":l,u=o.id,c=void 0===u?"":u,ri&&ui(c)&&n&&!r&&ti&&"movie"===d&&(St(),ti=!1),ci(),!Vt){Vt=!0,Xt=!1,ai=!0,f=(h=Ft||{}).singlePlayDetails,g=void 0===f?{}:f,m=h.playerConfig,v=void 0===m?{}:m,y=h.playableData,b=void 0===y?{}:y,T=(g||{}).assetDetails,S=(void 0===T?{}:T).tags,A=void 0===S?[]:S,P=(w=v||{}).userType,C=void 0===P?"guest":P,L=w.removeEduauraaMessage,D=void 0===L?null:L,I=w.createEduauraaMessage,R=void 0===I?null:I,N=w.clevertapEventPush,O=void 0===N?null:N,M=(b||{}).end_credits_start_s,x=void 0===M?"":M,B=window.translationsAndConfigs||{},U=B.messages,V=void 0===U?{}
2:U,i?ei=!0:(window.videoPlayer=t,ei=!1),Nt=new Date;try{null===(F=window.convivaSDK)||void 0===F||F.setPlayer(t),console.log("PlayerEvent, VideoPlayer Object integrated to ConvivaSDK")}catch(e){console.error("PlayerEvent, Error while adding video Player to conviva SDK",e)}It.setConvivaAdAnalytics(t,C),Wt&&(xi(),Wt=!1),A&&A.includes("Eduauraa")&&R?R():D&&D(),x&&(Gt=E(x),qt=Math.round(t.duration()),V.duration),"trailer"!=b.asset_subtype&&"promo"!=b.asset_subtype||vt(),bi(),Si(t),window.parentalPinIncorrect=void 0,window.parentalPinPopUpEnabled=void 0,Rt.setMixpanelVideoPlayer(t),Rt.setClevertapEventPushRef(O),Zt&&(Rt.reportEvent(_.onReplay,null),Zt=!1),window.contentExit=Ei;try{q=k("oldVolumeLevel")||"1",t.volume(q),(j=k("oldMutedStatus")||!1)&&"true"==j&&t.muted(!0)}catch(e){console.error("error in updating previous volume and mute status")}H=(H=sessionStorage.getItem(_.PLAN_ID))&&void 0!==H?JSON.parse(H):_.Not_Applicable,(G={})["c3.cm.planId"]=H,It.updateConvivaInfo(G),v.isSportsLiveEvent({assetType:g.assetDetails.asset_type,assetSubType:g.assetDetails.asset_subtype})&&setTimeout((function(){window.videoPlayer.liveTracker.atLiveEdge()||window.videoPlayer.liveTracker.seekToLiveEdge()}),3e3)}window&&window.chromePopupDisplayed&&t.pause(),Rt.reportEvent(_.playEvent,null);case 10:case"end":return e.stop()}}),e)}))),mi.apply(this,arguments)}function vi(e,t,i){var n,r,s;e&&"function"==typeof e.userActive&&e.userActive(!1);var a=i||{},o=a.playerConfig,l=void 0===o?{}:o,d=a.singlePlayDetails,u=void 0===d?{}:d,c=l||{},h=(c.getNativeStringByLangCode,c.audioLanguageMapper),p=void 0===h?{}:h,f=null==l?void 0:l.getFeatureFlagConfig(Et.FEATURE_GATING),g=null!==(n=null==f?void 0:f.enabled)&&void 0!==n&&n,m=u||{},v=m.assetDetails,y=void 0===v?{}:v,b=y.audio_languages,T=void 0===b?[]:b,S=y.entitled_languages,E=void 0===S?[]:S,A=y.ordered_audio_languages,w=void 0===A?[]:A,P=y.primary_language,C=void 0===P?"":P,L=y.content_gating,D=(void 0===L?{}:L).type,k=void 0===D?"":D,I=m.entitlement,R=(void 0===I?{}:I).isTrailer;if(g=g&&("subscription"===k||"login"===k),!(void 0!==R&&R||document.querySelector(".audio-selection-wrapper")||T.length<2)){var N=document.querySelector(".skip_intro_upgrade");N&&(N.style.display="none");var O=document.createElement("div");O.className="audio-selection-wrapper",O.style.pointerEvents="none";var M=document.createElement("div");M.className="audio-selection-title",M.innerHTML="Choose Your Language";var x=document.createElement("div");x.className="audio-selection-list",x.style.pointerEvents="auto";var B=new Set(E),U=w.find((function(e){return B.has(e)}))||w[0]||C;w.forEach((function(t,i){var n=document.createElement("span");n.style.pointerEvents="auto",n.className="audio-stream-item audio-".concat(t," ").concat(U===t?"activeAudioLang":"");var r=p[t.toLowerCase()]||F(t);if(n.innerHTML=C===t?"".concat(r," (Original)"):r,n.setAttribute("key","".concat(t)),E.includes(t)||g)n.setAttribute("data-isEntitled","true");else{n.setAttribute("data-isEntitled","false");var s=document.createElement("img");s.src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/lockIcon.svg",s.className="lock-icon",n.insertBefore(s,n.firstChild)}n.addEventListener("click",(function(){if("true"!==n.getAttribute("data-isEntitled"))return e&&(null==e||e.pause()),void("premium"===(null==l?void 0:l.userType)&&Fi()?null==l||l.showUpgradeSubscriptionPopup():null!=l&&l.redirectHandler&&"function"==typeof l.redirectHandler?l.redirectHandler("/myaccount/subscription"):window.location.href="/myaccount/subscription");localStorage.setItem("playerChipsClicked","true"),setTimeout((function(){localStorage.removeItem("playerChipsClicked")}),1e3);for(var i=null==e?void 0:e.audioTracks(),r=0;r<i.length;r++){var s=i[r];s.enabled=s.language===t}x.querySelectorAll(".audio-stream-item").forEach((function(e){return e.classList.remove("activeAudioLang")})),n.classList.add("activeAudioLang");var a=C===t,o={newAudioLanguage:p[t.toLowerCase()]||F(t),oldAudioLanguage:"N/A",isOriginalLanguage:a,audioChangeSource:"Player_Chips"};Rt.reportEvent(_.audioLanguageChange,o),It.updateConvivaInfo({playbackType:"Language Change"})})),x.appendChild(n)})),O.appendChild(M),O.appendChild(x);var V=e&&e.el();V&&V.appendChild(O);var q=null!==(r=null==t||null===(s=t.payload)||void 0===s?void 0:s.time_to_show)&&void 0!==r?r:1e3;setTimeout((function(){yi(e);var t=document.querySelector(".skip_intro_upgrade");t&&(t.style.display="block"),e&&"function"==typeof e.userActive&&e.userActive(!0)}),q)}}function yi(e){var t=document.querySelector(".audio-selection-wrapper"),i=e&&e.el();i&&i.removeChild(t)}function _i(){return window.specialPlan&&Object.keys(window.specialPlan).length}function bi(){var e,t=Ft||{},i=t.playerConfig,n=void 0===i?{}:i,r=t.isAdPlaying,s=void 0!==r&&r,a=n||{},o=a.triggerTeaserBanner,l=void 0===o?null:o,d=a.singlePlayDetails,u=document.querySelector(".subscription-nudge-container"),c=(n.getFeatureFlagConfig("config_sports")||{}).payload;if(null==d||null===(e=d.assetDetails)||void 0===e||!e.tier||s||u||l({playerRef:Ft}),!c.player_banner||s||u)var h=setInterval((function(){!c.player_banner||s||u||(clearInterval(h),l({playerRef:Ft}))}),500);else l({playerRef:Ft})}function Ti(){try{return(window&&window.convivaSDK&&window.convivaSDK.getSessionId?window.convivaSDK.getSessionId().toString():"N/A").replace(/-/g,"")}catch(e){return"NA"}}function Si(e){window.parentalPinPopUpEnabled&&It.convivaSessionWaitEnded(e)}function Ei(){var e=new Date,t=window.Math.abs(e-Nt)/1e3;Rt.reportEvent(_.playbackEnded,t)}function Ai(){var e=document.querySelector("#video-tag");null==e||e.focus()}function wi(e,t,i,n){var r=(Ft||{}).playerConfig,s=(void 0===r?{}:r)||{},a=s.updateAudioStream,o=void 0===a?null:a,l=s.audioLanguageMapper,d=void 0===l?{}:l,u=(n||{}).assetDetails,c=(void 0===u?{}:u).primary_language,h=(void 0===c?"":c)===e,p={newAudioLanguage:d[e.toLowerCase()]||F(e),oldAudioLanguage:"N/A",isOriginalLanguage:h,audioChangeSource:"Player_Settings"};"true"!==localStorage.getItem("playerChipsClicked")&&Rt.reportEvent(_.audioLanguageChange,p),It.updateConvivaInfo({playbackType:"Language Change"}),t&&(D("prefferedAudioStream",e),D("languageChangeTriggered","true"),"function"==typeof o&&o(e))}function Pi(e){return Ci.apply(this,arguments)}function Ci(){return Ci=a(p().mark((function e(t){var i,n,r,s,a,o,l,d,u,c,h,f,g,m,v,y,_,b,T,S,E,A,w,P,C,L,D,k,I,R,N,O,M,x,B,U,V,F,q,j,H,G,W,X,K,z,Y,Q,J,$,Z,ee,te;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(i=Ft||{}).playerConfig,r=void 0===n?{}:n,s=i.singlePlayDetails,a=void 0===s?{}:s,o=i.similarFromReco,l=void 0===o?[]:o,u=(d=r||{}).tvodObj,c=void 0===u?null:u,h=d.userType,f=void 0===h?"guest":h,g=d.endTime,m=void 0===g?null:g,v=d.toggleWatchTrailerButton,y=void 0===v?null:v,_=d.startTime,b=void 0===_?null:_,T=d.primaryMediaId,S=void 0===T?"":T,E=d.getSinglePlayDetails,A=void 0===E?
2null:E,w=d.goLiveCallback,P=void 0===w?null:w,C=d.toggleSubscriptionPopup,L=void 0===C?null:C,k=(D=a||{}).assetDetails,I=void 0===k?{}:k,R=D.showDetails,N=void 0===R?{}:R,O=D.entitlement,x=(M=void 0===O?{}:O).isAVOD,B=void 0===x?0:x,U=M.isTrailer,V=void 0===U?0:U,F=M.isPremiumPlayback,q=void 0===F?0:F,j=M.isAdAuthenticated,H=void 0===j?0:j,G=M.isLive,W=void 0!==G&&G,K=(X=I||{}).asset_subtype,z=void 0===K?"":K,Y=X.business_type,Q=void 0===Y?"":Y,J=X.billing_type,$=void 0===J?"":J,Z=window.location.pathname.indexOf("/latest1")>=0,ee=!Z&&window.location.pathname.indexOf("/latest")>=0,te=b&&!m&&!W,m||te?P():V&&ee&&!B?(window.isRevisedSubscriptionJourney&&window.isRevisedSubscriptionJourneyAutoPopup&&Fi()&&Vi(Q,$)&&L&&L(),r.triggerPopUp({name:"svodOrTvod"}),bi(),y({disable:!1})):V&&!I||B&&!V||q?""!==S&&z&&z.indexOf("trailer")>=0&&(B||q)?c&&c.showTvodOverlay?c.showTvodOverlay():A({contentId:S,parentalPinStatus:!0,parentalPinFlag:!0}):"premium"!==f&&B&&("trailer"===z||"preview"===z||"promo"===z||"free_downloadable"===Q&&"premium_downloadable"===N.business_type)?(window.isRevisedSubscriptionJourney&&window.isRevisedSubscriptionJourneyAutoPopup&&Fi()&&Vi(Q,$)&&L&&L(),r.triggerPopUp({name:"svodOrTvod"})):l&&l[0]&&l[0].id&&(r.requestToPlayNextVideo({contentid:l[0].id,indexObject:void 0,playerRef:Ft,similarFromReco:l}),sessionStorage.setItem("AutoPlay","Auto")):(document.fullscreenElement&&window.navigator.userAgent.match(/iPhone|iPad/i)&&Ut&&document.exitFullscreen(),B&&V&&!H?r.triggerPopUp({name:"adultPopup",isAdvertisementAuthenticated:!1}):H&&V?r.triggerPopUp({name:"adultPopup",isAdvertisementAuthenticated:!0}):(window.isRevisedSubscriptionJourney&&window.isRevisedSubscriptionJourneyAutoPopup&&Fi()&&Vi(Q,$)&&L&&L(),r.triggerPopUp({name:"svodOrTvod"}),bi()));case 9:case"end":return e.stop()}}),e)}))),Ci.apply(this,arguments)}function Li(){return Li=a(p().mark((function e(t){var i,n,r,s,a,o,l,d,u,c,h,f,g,m,v,y,_,b;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(i=Ft||{}).playerConfig,r=void 0===n?{}:n,s=i.singlePlayDetails,a=void 0===s?{}:s,o=(r||{}).userType,l=a.assetDetails&&a.assetDetails.asset_subtype,d=a.assetDetails&&a.assetDetails.id,c=!(u="trailer"===l||"promo"===l||"preview"===l)&&window.location.pathname.indexOf("/latest1")>=0,h=!u&&!c&&window.location.pathname.indexOf("/latest")>=0,"1"===(f={id:d,isChannel:window.location.pathname.indexOf("/live-tv")>=0,isLatestRoute:h,isLatest1Route:c,showId:"",isEpisodeConsumptionPage:!1}).id.split("-")[1]&&(g=a.assetDetails&&a.assetDetails.tvshow,f.showId=g,f.isEpisodeConsumptionPage=!0),e.next=11,r.singlePlayApiUrlGenerator(f);case 11:return m=e.sent,v=V("xaccesstoken"),y=N(o),_="bearer ".concat(k("token")),b={spApiContentUrl:m,xAccessToken:v,age:20,gender:"Male",userType:o,userId:y,isAutoplay:!1,isRecommended:!1,activeSubtitle:Ui(t),guestToken:"",authorization:_},e.abrupt("return",b);case 17:case"end":return e.stop()}}),e)}))),Li.apply(this,arguments)}function Di(e,t,i){var n=e.code,r=void 0===n?"N/A":n,s=e.message,a=void 0===s?"N/A":s,o=ki(r);r.toString()===Tt.MEDIA_ERR_SRC_NOT_SUPPORTED.toString()?(document.getElementsByClassName("main-container").length>0&&document.getElementsByClassName("main-container")[0].remove(),i.triggerPopUp({name:"networkRetry",playerErrorCode:o}),It.reportErrorEvent("vsferror","".concat(o)),document.querySelector(".vjs-loading-spinner").style.display="none"):r.toString()!==Tt.TIMEOUT.toString()&&r.toString()!==Tt.UNSUPPORTED_SCHEME.toString()&&r.toString()!==Tt.BAD_HTTP_STATUS.toString()&&r.toString()!==Tt.HTTP_ERROR.toString()&&r.toString()!==Tt.NETWORK.toString()||(t&&t.pause(),i.triggerPopUp({name:"networkRetry",playerErrorCode:o}),It.reportErrorEvent("vsferror","".concat(o))),It.updateConvivaInfo({infoMessage:JSON.stringify({errorCode:"".concat(o),errorMessage:"".concat(a),error:JSON.stringify(e)})})}function ki(e){var t=k("selfErrors")||{};t&&"string"==typeof t&&(t=JSON.parse(t));var i=k("errorMapping")||X,n=t[(i=i&&"string"==typeof i?JSON.parse(i):X)[e.toString()]]||{};return(n&&n.error_category_code&&n.error_category_code.toString()||"NA").concat("-",e.toString()).concat("-","0")}function Ii(){var e=Ft||{},t=e.playerConfig,i=void 0===t?{}:t,n=e.singlePlayDetails,r=Ri((void 0===n?{}:n).tobaccoAdvisoryDetails.video_segments,"preRoll");if(r&&r.video_uri){var s={healthSpotPlacement:"Pre-roll",advisoryVideoUrl:r.video_uri};Rt.reportEvent(_.healthSpotViewed,s),i.triggerPopUp({name:"tobaccoAdvisory",videoUrl:r.video_uri})}}function Ri(e,t,i){return"preRoll"===t?e.find((function(e){return 0===e.start_marker})):"midRoll"===t&&i?e.find((function(e){return i>e.start_marker&&i<e.start_marker+2&&0!==e.start_marker})):void 0}function Ni(t){var i=Ft||{},n=i.singlePlayDetails,r=void 0===n?{}:n,s=i.playerConfig,a=void 0===s?{}:s,o=i.playableData,l=void 0===o?{}:o,d=i.similarFromReco,u=void 0===d?[]:d,c=(r||{}).entitlement,h=(void 0===c?{}:c)||{},p=h.isAVOD,f=h.isTrailer,g=h.isAdAuthenticated,m=l||{},v=m.skip_available,y=void 0===v?{}:v,b=y.intro_start_s,T=void 0===b?"":b,S=y.intro_end_s,w=void 0===S?""
2:S,P=m.end_credits_start_s,C=void 0===P?"":P,L=m.asset_subtype,D=void 0===L?"":L,k=a.contentType,N=void 0===k?"":k,O=a.toggleWatchTrailerButton,M=void 0===O?null:O,x=a.getUpnextData,B=void 0===x?null:x,U=a.isFeatureEnabled(Et.DISABLE_UPNEXT_RECO_API),V=E(T),F=E(w),q=t.currentTime();!function(e,t){var i,n,r,s,a,o=Ft||{},l=o.singlePlayDetails,d=void 0===l?{}:l,u=o.playerConfig,c=void 0===u?{}:u,h=((null==c?void 0:c.getFeatureFlagConfig(Et.CONFIG_TOBACCO))||{}).payload;if(null!=d&&null!==(i=d.tobaccoAdvisoryDetails)&&void 0!==i&&i.aston_segments&&null!=h&&null!==(n=h.aston_band_config)&&void 0!==n&&n.enable){var p=function(e,t){return e.some((function(e){return t>e.start_marker&&t<e.end_marker}))}(d.tobaccoAdvisoryDetails.aston_segments,t);if(p){for(var f,g,m,v,y,b,T,S,E=e.audioTracks(),A="",w=0;w<E.length;w++){var P=E[w];P.enabled&&(A=P.language)}var C=null==h||null===(f=h.aston_band_config)||void 0===f?void 0:f.image_path_url;A&&null!=d&&null!==(g=d.tobaccoAdvisoryDetails)&&void 0!==g&&g.images&&null!=d&&null!==(m=d.tobaccoAdvisoryDetails)&&void 0!==m&&m.images[A]?C+=d.tobaccoAdvisoryDetails.images[A]:null!=d&&null!==(v=d.tobaccoAdvisoryDetails)&&void 0!==v&&null!==(v=v.images)&&void 0!==v&&v.en?C+=d.tobaccoAdvisoryDetails.images.en:null!=d&&null!==(y=d.assetDetails)&&void 0!==y&&y.audio_languages&&(null==d||null===(b=d.assetDetails)||void 0===b?void 0:b.audio_languages.length)>0&&null!=d&&null!==(T=d.tobaccoAdvisoryDetails)&&void 0!==T&&T.images&&null!=d&&null!==(S=d.tobaccoAdvisoryDetails)&&void 0!==S&&S.images[d.assetDetails.audio_languages[0]]&&(C+=d.tobaccoAdvisoryDetails.images[d.assetDetails.audio_languages[0]]),C&&function(e,t,i,n){var r=document.querySelector(".tobaccoAdvisory"),s={healthSpotPlacement:"Aston Band"};if(r&&r instanceof HTMLElement){if(r.getAttribute("data-language")!==i){r.setAttribute("data-language",i);var a=document.querySelector(".tobaccoAdvisoryIcon");a instanceof HTMLImageElement&&(a.src=t)}"block"!==r.style.display&&(n.reportEvent(_.healthSpotViewed,s),r.style.display="block")}else{var o=document.createElement("div");o.setAttribute("class","tobaccoAdvisory"),o.setAttribute("data-language",i),o.style.display="block";var l=document.createElement("img");l.setAttribute("class","tobaccoAdvisoryIcon"),l.src=t,o.appendChild(l);var d=e&&e.el();d&&d.appendChild(o),n.reportEvent(_.healthSpotViewed,s)}}(e,C,A,Rt)}else(a=document.querySelector(".tobaccoAdvisory"))&&a instanceof HTMLElement&&(a.style.display="none")}if(null!=d&&null!==(r=d.tobaccoAdvisoryDetails)&&void 0!==r&&r.video_segments&&null!=h&&null!==(s=h.video_segment_config)&&void 0!==s&&s.enable){var L=Ri(d.tobaccoAdvisoryDetails.video_segments,"midRoll",t);if(L&&L.video_uri&&!oi){oi=!0;var D={healthSpotPlacement:"Mid-roll",advisoryVideoUrl:L.video_uri};Rt.reportEvent(_.healthSpotViewed,D),c.triggerPopUp({name:"tobaccoAdvisory",videoUrl:L.video_uri})}}}(t,q);var j=document.getElementsByClassName("skip_intro_container")[0],H=document.getElementsByClassName("watch_credits_button")[0],G=Math.round(t.duration())||0,W=(window.translationsAndConfigs||{}).messages,X=void 0===W?{}:W;It.updateBufferPlayHeadTime(_.updateBufferPlayHeadTime);var K,z={contentLengthSec:0!=q?(1e3*q).toFixed(0).toString():_.Not_Applicable};It.updateConvivaInfo(z),q&&q>=V&&q<F&&!j&&"trailer"!==D?(function(e,t,i,n){var r,s=e,a=document.createElement("DIV");a.className="skip_intro_container";var o=document.createElement("DIV");o.className="skip_intro_button",o.innerHTML="SKIP INTRO",null==a||a.appendChild(o),null===(r=document.getElementsByClassName("video-js")[0])||void 0===r||r.appendChild(a),o.addEventListener("click",(function(){var e=document.getElementsByClassName("vjs-playing")[0];s.pause(),document.getElementsByClassName("video-js")[0].removeChild(a),s.currentTime(t),e?s.play():s.pause();var r={introStartTime:i,introEndTime:t};n.reportEvent("Skip Intro",r)}))}(t,F,V,Rt),At(a)):(q<V||q>=F)&&j&&(null==(K=document.querySelector(".skip_intro_upgrade"))||K.remove(),document.getElementsByClassName("video-js")[0].removeChild(j)),j&&At(a);var Y=document.querySelector(".initialShopIconContainer");if(Math.round(q)>=0&&Y&&document.getElementsByClassName("video-js")[0].removeChild(Y),ci(),ni&&(si=di(),ni=!1),si&&a.currentTime(q),Wt&&A(Ft)&&zt>0){var Q=document.getElementsByClassName("upNextStart");if(Q){for(var J=0;J<Q.length;J++)Q[J].style.display="none";var $=document.createElement("div");if($){$.className="upNextStart",C?($.innerHTML="".concat('Starts in <span class="second-color">').concat(zt," s")+"</span>",zt=Yt?Math.floor(Yt)-Math.floor(t.currentTime()):zt,Yt||(Yt=Math.floor(t.currentTime())+5),Math.floor(t.currentTime())>=Yt&&Math.floor(t.currentTime())<Math.floor(t.duration())&&(Yt=null,Pi(t))):$.innerHTML="".concat('Starts in <span class="second-color">').concat(Math.round(t.duration())-Math.round(t.currentTime())," s")+"</span>";var Z=document.getElementsByClassName("metadataContainer");if(Z&&Z[0]){var ee=sessionStorage.getItem("contentId");$.id=ee||"",Z[0].appendChild($),$.style.display="block"}}}}
2N&&"livetv"!==N&&(!p||!f||g&&f)&&((Ht=Gt>0?G-Gt:Object.keys(X).length&&!Gt?G-X.duration:G-5)>0&&(jt=Ht-60),!(0!==jt&&q>=jt)||Xt||Kt||ei||U||(B(),Kt=!0),!Wt&&q>=Ht&&"trailer"!==D&&"preview"!==D&&0!==Ht&&!H&&Xt&&ai?u&&u.length&&A(a)&&0!==q&&(function(t){var i,n=Ft||{},r=n.similarFromReco,s=void 0===r?[]:r,a=n.playerConfig,o=void 0===a?{}:a,l=o.modelName,d=void 0===l?"":l,u=o.requestToPlayNextVideo,c=void 0===u?null:u,h=o.toggleWatchTrailerButton,p=void 0===h?null:h,f=o.upgradeData,g=void 0===f?null:f,m=[];p({disable:!0}),Wt=!0;for(var v=0;v<s.length;v++){var y=Object.prototype.hasOwnProperty.call(s[v],"imageUrl")?"imageUrl":"image_url";m.push({imageUrl:"object"===e(s[v][y])?s[v][y].list:s[v][y],content_id:s[v].id,title:s[v].title,origin:s[v].origin,clickID:s[v].clickID})}var _=document.createElement("div");_.className="up-next-carousel",_.id="carouselSliderContainer";var b=!!g,T=document.createElement("div"),S=null==o?void 0:o.getFeatureFlagConfig(Et.CONFIG_NEW_SUBSCRIPTION_UI),E=I(),A=R(S);if(b&&(0!==(null==E?void 0:E.profileType)||A)){var w,P=null!==(w=null==g?void 0:g.title)&&void 0!==w?w:"";T.className="up-next-upgrade",T.innerHTML="\n        <div>\n          <span>Upgrade to</span>\n          <span>".concat(P,"</span>\n        </div>\n      ")}for(var C=0;C<m.length;C++){var L=document.createElement("div");L.setAttribute("id",m[C].content_id),L.setAttribute("data-contentId",m[C].content_id),L.className="carousel-item-slide","episode"==m[C].asset_subtype&&(L.setAttribute("data-episodeId",m[C].episode_number),L.setAttribute("data-seriesId",m[C].season.id));var D=document.createElement("div");D.className="mainCarouselDiv";var k=document.createElement("img");k.src=m[C].imageUrl,k.id=m[C].content_id,k.className="carousal-video",k.crossOrigin="anonymous",D.appendChild(k),sessionStorage.setItem("contentId",m[C].content_id);var N=document.createElement("div");if(N.className="metadataContainer",N.id=m[C].content_id,0===C){var O=document.createElement("div");O.className="upNext",O.innerHTML="UP NEXT",O.id=m[C].content_id,N.appendChild(O)}var M=m[C].title.split("-"),x=document.createElement("div");if(x.className="upNextTitle",x.innerHTML=M[0],x.id=m[C].content_id,N.appendChild(x),0===C&&Math.round(t.currentTime())>=qt){var B=document.createElement("div");B.className="upNextStart",B.innerHTML="".concat('Starts in <span class="second-color">').concat(Math.round(t.duration())-Math.round(t.currentTime())," s")+"</span>",B.id=m[C].content_id,N.appendChild(B)}
2D.id&&""!==D.id||(D.id=m[C].content_id),D.appendChild(N),L.appendChild(D),_.appendChild(L),b&&(_.appendChild(T),T.addEventListener("click",(function(){var e;null==t||null===(e=t.pause)||void 0===e||e.call(t),null!=o&&o.redirectHandler&&"function"==typeof o.redirectHandler?o.redirectHandler("/myaccount/subscription"):window.location.href="/myaccount/subscription"}))),L.addEventListener("click",(function(e){var i=e.target.id;t&&(t.pause(),xi(),ai=!1);for(var n={},r=0;r<m.length;r++)if(i===m[r].content_id){n={assetSubtype:m[r].origin?"Reco":void 0,talamoosModelName:d,origin:m[r].origin,clickID:m[r].clickID,horizontalIndex:r+1};break}c&&(c({contentid:i,indexObject:n,playerRef:Ft,similarFromReco:s}),sessionStorage.setItem("AutoPlay","Manual"));var a=document.getElementById("watchCreditsId");a&&null!==a&&a.remove(),Wt=!1}))}var U,V=document.createElement("div");if(m.length>2){V.setAttribute("class","carousal-button-container");var F=document.createElement("img");F.setAttribute("class","carousal-prev-button"),F.setAttribute("id","prevSlide"),F.setAttribute("src","https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/carousal-prev.png"),F.style.display="none";var q=document.createElement("img");q.setAttribute("class","carousal-next-button"),q.setAttribute("id","nextSlide"),q.setAttribute("src","https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/carousal-next.png"),V.appendChild(F),V.appendChild(q),q.addEventListener("click",(function(){var e=document.querySelector("#prevSlide");j(e)||(document.getElementById("prevSlide").style.display="block");var t=document.getElementById("carouselSliderContainer");t.scrollLeft+=280;var i=t.offsetWidth+t.scrollLeft;t.scrollWidth==i&&(document.getElementById("nextSlide").style.display="none")})),F.addEventListener("click",(function(){var e=document.querySelector("#nextSlide");j(e)||(document.getElementById("nextSlide").style.display="block");var t=document.getElementById("carouselSliderContainer");t.scrollLeft-=280,0==t.scrollLeft&&(document.getElementById("prevSlide").style.display="none",q.style.marginTop="0px")}))}(U="DIV"===(null===(i=document.querySelector(".playerContainer"))||void 0===i||null===(i=i.children)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.tagName)?document.querySelector("#video-tag"):document.querySelector(".playerContainer")).appendChild(_),U.appendChild(V);var j=function(e){var t=e.getBoundingClientRect();return t.top>0&&t.left>0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};/iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent)&&document.getElementById("carouselSliderContainer").addEventListener("scroll",Oi);var H=document.querySelector(".vjs-skip-wrapper");H&&null!==H&&H.classList.add("upNextCarouselActive")}(t),Gt>0&&function(e,t,i,n){var r=document.createElement("DIV");r.className="watch_credits_button ".concat(t?"carouselActive":""),r.id="watchCreditsId",r.innerHTML="WATCH CREDITS",document.getElementsByClassName("video-js")[0].appendChild(r),r.addEventListener("click",(function(){document.getElementsByClassName("video-js")[0].removeChild(r),xi("continueCredits",e),n.reportEvent("Watch Credits"),i&&i({disable:!1})}))}(t,Wt,M,Rt)):q<Ht&&Wt&&(xi(),Wt=!1,M({disable:!1})))}function Oi(){Qt=new Date,Jt||(Jt=document.querySelector(".up-next-carousel").scrollLeft),!1===$t&&($t=!0,setTimeout((function(){return Mi()}),200))}function Mi(){var e;Qt-Qt<200?setTimeout((function(){return Mi()}),200):($t=!1,e=Jt<document.querySelector(".up-next-carousel").scrollLeft?"Right":"Left",Jt=0,console.log("scroll direction",e))}function xi(e,t){var i,n;if(zt=5,n="DIV"===(null===(i=document.querySelector(".playerContainer"))||void 0===i||null===(i=i.children)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.tagName)?document.querySelector("#video-tag"):document.querySelector(".playerContainer"),Yt="continueCredits"===e?Math.floor(t.duration()):null,document.getElementsByClassName("up-next-carousel").length){/iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent)&&document.getElementById("carouselSliderContainer").removeEventListener("scroll",Oi);var r=document.querySelector(".up-next-carousel");n.removeChild(r);var s=document.querySelector(".carousal-button-container");s&&n.removeChild(s)}var a=document.querySelector(".video-js"),o=document.querySelector(".watch_credits_button");a&&o&&a.removeChild(o)}function Bi(e){var t=document.querySelector(".trailerInfoContainer");t&&(t.style.display=e?"block":"none")}function Ui(e){var t=null;return e.textTracks().tracks_.forEach((function(e){if("showing"===e.mode)return t=e.language})),t}function Vi(e,t){return"premium"===e||"premium_downloadable"===e||"club"===t||"premium"===t}function Fi(){var e=Ft.playerConfig,t=((void 0===e?{}:e)||{}).country,i=void 0===t?"IN":t;return i&&"in"===i.toLowerCase()}function qi(e){var t=document.querySelector(".teaser-wrapper");t?t.style.display=e?"block":"none":e&&bi()}function ji(e){if(null===localStorage.getItem("freeAvailableSecs"))return null;try{var t=JSON.parse(localStorage.getItem("freeAvailableSecs"));return void 0!==t[e]?t[e]:null}catch(e){return null}}function Hi(e){Kt=null==e?void 0:e.isUpNextPending,Xt=null==e?void 0:e.upNextApiState}var Gi=null,Wi=0,Xi=0;function Ki(e,t){return e.el().querySelector(".seek-time-display.".concat(t))}function zi(e,t,i){var n=Ki(e,i);e.paused()||e.pause(),n&&(n.textContent="".concat("forward"===i?"+":"-").concat(Math.abs(t),"s"),n.style.display="flex",n.classList.remove("fade-out"),n.classList.remove("pulse-animate"),n.offsetWidth,n.classList.add("pulse-animate"))}function Yi(e,t){var i=Ki(e,t);i&&(i.classList.add("fade-out"),setTimeout((function(){i.style.display="none",i.classList.remove("fade-out")}),100))}function Qi(e,t){if(t){window.autoSeek=!0;var i=t.currentTime()+e;i<0&&(i=0),t.currentTime(i),Ai()}}function Ji(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e,n=i&&i.el();if(n){var r=document.createElement("div");r.className="vjs-metadata-display",r.setAttribute("data-testid","metadata-display");var s=document.createElement("div");s.className="vjs-metadata-title",s.textContent=t.title||"",r.appendChild(s);var a=document.createElement("div");a.className="vjs-metadata-info";var o=t.metadata||[""];return a.textContent=o.join(" • "),r.appendChild(a),n.appendChild(r),i.on("fullscreenchange",(function(){i.isFullscreen()?r.style.display="flex":r.style.display="none"})),i.isFullscreen()||(r.style.display="none"),r}}var $i="6.9.0",Zi=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},en=function(e,t,i){Zi(0,i),e.trigger({type:t+i.type,originalEvent:i})};function tn(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&en(e,"content",t):en(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(Zi(0,t),e.trigger("resumeended")):en(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(en(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())en(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;en(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?en(e,"ad",t):e.ads.isContentResuming()&&en(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?en(this,"content",e):en(this,"ad",e))}var nn={},rn=function(){!function(e){if(oe.default.dom.isInFrame()&&"function"!=typeof ce().__tcfapi){for(var t,i=ce(),n={};i;){try{if(i.frames.__tcfapiLocator){t=i;break}}catch(e){}if(i===ce().top)break;i=i.parent}if(!t)return;ce().__tcfapi=function(e,i,r,s){var a=Math.random()+"",o={__tcfapiCall:{command:e,parameter:s,version:i,callId:a}};n[a]=r,t.postMessage(o,"*")},ce().addEventListener("message",(function(e){var t={};try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}var i=t.__tcfapiReturn;i&&"function"==typeof n[i.callId]&&(n[i.callId](i.returnValue,i.success),n[i.callId]=null)}),!1)}}(),"function"==typeof ce().__tcfapi&&ce().__tcfapi("addEventListener",2,(function(e,t){t&&(nn=e)}))},sn=function(e,t){return t?encodeURIComponent(e):e},an=function(e,t,i){if(e&&e[i])for(var n=e[i],r=Object.keys(n),s=0;s<r.length;s++)t["{mediainfo."+i+"."+r[s]+"}"]=n[r[s]]};function on(e,t,i){var n=this,r={};e=e.replace(/{([^}=]+)=([^}]+)}/g,(function(e,t,i){return r["{"+t+"}"]=i,"{"+t+"}"})),void 0===t&&(t=!1);var s={};for(var a in void 0!==i&&(s=i),s["{player.id}
2"]=this.options_["data-player"]||this.id_,s["{player.height}"]=this.currentHeight(),s["{player.width}"]=this.currentWidth(),s["{mediainfo.id}"]=this.mediainfo?this.mediainfo.id:"",s["{mediainfo.name}"]=this.mediainfo?this.mediainfo.name:"",s["{mediainfo.duration}"]=this.mediainfo?this.mediainfo.duration:"",s["{player.duration}"]=this.duration(),s["{player.pageUrl}"]=oe.default.dom.isInFrame()?de().referrer:ce().location.href,s["{playlistinfo.id}"]=this.playlistinfo?this.playlistinfo.id:"",s["{playlistinfo.name}"]=this.playlistinfo?this.playlistinfo.name:"",s["{timestamp}"]=(new Date).getTime(),s["{document.referrer}"]=de().referrer,s["{window.location.href}"]=ce().location.href,s["{random}"]=Math.floor(1e12*Math.random()),["description","tags","reference_id","ad_keys"].forEach((function(e){n.mediainfo&&n.mediainfo[e]?s["{mediainfo."+e+"}"]=n.mediainfo[e]:r["{mediainfo."+e+"}"]?s["{mediainfo."+e+"}"]=r["{mediainfo."+e+"}"]:s["{mediainfo."+e+"}"]=""})),an(this.mediainfo,s,"custom_fields"),an(this.mediainfo,s,"customFields"),Object.keys(nn).forEach((function(e){s["{tcf."+e+"}"]=nn[e]})),s["{tcf.gdprAppliesInt}"]=nn.gdprApplies?1:0,s)e=e.split(a).join(sn(s[a],t));for(var o in e=e.replace(/{pageVariable\.([^}]+)}/g,(function(e,i){for(var n,s=ce(),a=i.split("."),o=0;o<a.length;o++)o===a.length-1?n=s[a[o]]:s=s[a[o]];var l=typeof n;return null===n?"null":void 0===n?r["{pageVariable."+i+"}"]?r["{pageVariable."+i+"}"]:(oe.default.log.warn('Page variable "'+i+'" not found'),""):"string"!==l&&"number"!==l&&"boolean"!==l?(oe.default.log.warn('Page variable "'+i+'" is not a supported type'),""):sn(String(n),t)})),r)e=e.replace(o,r[o]);return e}var ln={processMetadataTracks:function(e,t){for(var i=e.textTracks(),n=function(i){"metadata"===i.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(i),t(e,i))},r=0;r<i.length;r++)n(i[r]);i.addEventListener("addtrack",(function(e){n(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},dn=function(e,t){return void 0!==t&&e.ads.includedCues[t]},un=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function cn(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}ln.processAdTrack=function(e,t,i,n){e.ads.includedCues={};for(var r=0;r<t.length;r++){var s=t[r],a=this.getSupportedAdCue(e,s);if(!this.isSupportedAdCue(e,s))return void oe.default.log.warn("Skipping as this is not a supported ad cue.",s);var o=this.getCueId(e,s),l=s.startTime;if(dn(e,o))return void oe.default.log("Skipping ad already seen with ID "+o);n&&n(e,a,o,l),i(e,a,o,l),un(e,o)}};var hn={},pn=oe.default;hn.isMiddlewareMediatorSupported=function(){return!pn.browser.IS_IOS&&!pn.browser.IS_ANDROID&&!!(pn.use&&pn.middleware&&pn.middleware.TERMINATOR)},hn.playMiddleware=function(e){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(e.ads&&!0===e.ads._shouldBlockPlay)return e.ads.debug("Using playMiddleware to block content playback"),e.ads._playBlocked=!0,pn.middleware.TERMINATOR},play:function(t,i){e.ads&&e.ads._playBlocked&&t?(e.ads.debug("Play call to Tech was terminated."),e.trigger("play"),e.addClass("vjs-has-started"),e.ads._playBlocked=!1):i&&i.catch&&i.catch((function(t){"NotAllowedError"!==t.name||oe.default.browser.IS_SAFARI||e.trigger("pause")}))}}},hn.testHook=function(e){pn=e};var fn=hn.playMiddleware,gn=hn.isMiddlewareMediatorSupported,mn=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,i){if("string"!=typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=i,i},e}(),vn=function(){function e(e){this.player=e}e._getName=function(){return"Anonymous State"};var t=e.prototype;return t.transitionTo=function(e){var t=this.player;this.cleanup(t);var i=new e(t);t.ads._state=i,t.ads.debug(this.constructor._getName()+" -> "+i.constructor._getName());for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];i.init.apply(i,[t].concat(r))},t.init=function(){},t.cleanup=function(){},t.onPlay=function(){},t.onPlaying=function(){},t.onEnded=function(){},t.onAdEnded=function(){},t.onAdsReady=function(){oe.default.log.warn("Unexpected adsready event")},t.onAdsError=function(){},t.onAdsCanceled=function(){},t.onAdTimeout=function(){},t.onAdStarted=function(){},t.onContentChanged=function(){},t.onContentResumed=function(){},t.onReadyForPostroll=function(){oe.default.log.warn("Unexpected readyforpostroll event")},t.onNoPreroll=function(){},t.onNoPostroll=function(){},t.startLinearAdMode=function(){oe.default.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.endLinearAdMode=function(){oe.default.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.skipLinearAdMode=function(){oe.default.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},t.isWaitingForAdBreak=function(){return!1},t.isContentResuming=function(){return!1},t.inAdBreak=function(){return!1},t.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},e}();function yn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}mn.registerState("State",vn);var _n=function(e){function t(t){var i;return(i=e.call(this,t)||this).contentResuming=!1,i.waitingForAdBreak=!1,i}yn(t,e);var i=t.prototype;return i.isAdState=function(){return!0},i.onPlaying=function(){var e=mn.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},i.onContentResumed=function(){var e=mn.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},i.isWaitingForAdBreak=function(){return this.waitingForAdBreak},i.isContentResuming=function(){return this.contentResuming},i.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(vn);mn.registerState("AdState",_n);var bn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e);var i=t.prototype;return i.isAdState=function(){return!1},i.onContentChanged=function(e){var t=mn.getState("BeforePreroll"),i=mn.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(i,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(vn);mn.registerState("ContentState",bn);var Tn,Sn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"AdsDone"};var i=t.prototype;return i.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},i.startLinearAdMode=function(){oe.default.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},t}(mn.getState("ContentState"));mn.registerState("AdsDone",Sn);var En=function(e){e.ads.debug("Starting ad break"),e.ads._inLinearAdMode=!0,e.trigger("adstart"),e.ads.shouldTakeSnapshots()&&(e.ads.snapshot=function(e){var t;t=oe.default.browser.IS_IOS&&e.ads.isLive(e)&&e.seekable().length>0?e.currentTime()-e.seekable().end(0):e.currentTime();var i=e.$(".vjs-tech"),n=e.textTracks?e.textTracks():[],r=[],s={ended:e.ended(),currentSrc:e.currentSrc(),sources:e.currentSources(),src:e.tech_.src(),currentTime:t,type:e.currentType()};i&&(s.style=i.getAttribute("style"));for(var a=0;a<n.length;a++){var o=n[a];r.push({track:o,mode:o.mode}),o.mode="disabled"}return s.suppressedTracks=r,s}(e)),e.ads.shouldPlayContentBehindAd(e)&&(e.ads.preAdVolume_=e.volume(),e.volume(0)),e.addClass("vjs-ad-playing"),e.hasClass("vjs-live")&&e.removeClass("vjs-live"),e.ads.removeNativePoster()},An=function(e,t){e.ads.debug("Ending ad break"),void 0===t&&(t=function(){}),e.ads.adType=null,e.ads._inLinearAdMode=!1,e.trigger("adend"),e.removeClass("vjs-ad-playing"),e.ads.isLive(e)&&e.addClass("vjs-live"),e.ads.shouldTakeSnapshots()?function(e,t){var i=e.ads.snapshot;if(void 0===t&&(t=function(){}),!0===e.ads.disableNextSnapshotRestore)return e.ads.disableNextSnapshotRestore=!1,delete e.ads.snapshot,void t();var n,r=e.$(".vjs-tech"),s=20,a=i.suppressedTracks,o=function(){for(var e=0;e<a.length;e++)(n=a[e]).track.mode=n.mode},l=function(){var t;if(oe.default.browser.IS_IOS&&e.ads.isLive(e)){if(i.currentTime<0&&(t=e.seekable().length>0?e.seekable().end(0)+i.currentTime:e.currentTime(),e.currentTime(t)),e.paused()){var n=e.play();n&&n.catch&&n.catch((function(e){oe.default.log.warn("Play promise rejected in IOS snapshot resume",e)}))}}else if(i.ended)e.currentTime(e.duration());else{e.currentTime(i.currentTime);var r=e.play();r&&r.catch&&r.catch((function(e){oe.default.log.warn("Play promise rejected in snapshot resume",e)}))}e.ads.shouldRemoveAutoplay_&&(e.autoplay(!1),e.ads.shouldRemoveAutoplay_=!1)},d=function t(){if(e.off("contentcanplay",t),Tn&&e.clearTimeout(Tn),(r=e.el().querySelector(".vjs-tech")).readyState>1)return l();if(void 0===r.seekable)return l();if(r.seekable.length>0)return l();if(s--)e.setTimeout(t,50);else try{l()}catch(e){oe.default.log.warn("Failed to resume the content after an advertisement",e)}};if("style"in i&&r.setAttribute("style",i.style||""),e.ads.videoElementRecycled())e.one("resumeended",(function(){delete e.ads.snapshot,t()})),e.one("contentloadedmetadata",o),oe.default.browser.IS_IOS&&!e.autoplay()&&(e.autoplay(!0),e.ads.shouldRemoveAutoplay_=!0),e.src(i.sources),e.one("contentcanplay",d),Tn=e.setTimeout(d,2e3);else{if(o(),!e.ended()){var u=e.play();u&&u.catch&&u.catch((function(e){oe.default.log.warn("Play promise rejected in snapshot restore",e)}))}delete e.ads.snapshot,t()}}(e,t):(e.volume(e.ads.preAdVolume_),t())},wn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"Preroll"};var i=t.prototype;return i.init=function(e,t,i){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),i||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var n=e.ads.settings.timeout;"number"==typeof e.ads.settings.prerollTimeout&&(n=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),n),t?this.handleAdsReady():this.adsReady=!1},i.onAdsReady=function(e){e.ads.inAdBreak()?oe.default.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},i.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},i.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},i.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},i.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},i.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},i.onAdsError=function(e){var t=this;oe.default.log("adserror (Preroll)"),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},i.startLinearAdMode=function(){var e=this.player;!this.adsReady||e.ads.inAdBreak()||this.isContentResuming()?oe.default.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(e),e.ads.adType="preroll",this.waitingForAdBreak=!1,En(e),e.ads._shouldBlockPlay=!1)},i.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,An(e))},i.skipLinearAdMode=function(){var e=this,t=this.player;t.ads.inAdBreak()||this.isContentResuming()?oe.default.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (Preroll)"),e.resumeAfterNoPreroll(t)}))},i.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},i.onNoPreroll=function(e){e.ads.inAdBreak()||this.isContentResuming()?oe.default.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},i.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},i.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||oe.default.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(e)},i.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},i.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},t}
2(mn.getState("AdState"));mn.registerState("Preroll",wn);var Pn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"BeforePreroll"};var i=t.prototype;return i.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},i.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},i.onPlay=function(e){var t=mn.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},i.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},i.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.shouldResumeToContent=!0},i.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},i.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},i.onContentChanged=function(){this.init(this.player)},t}(mn.getState("ContentState"));mn.registerState("BeforePreroll",Pn);var Cn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"Midroll"};var i=t.prototype;return i.init=function(e){e.ads.adType="midroll",En(e),e.addClass("vjs-ad-loading")},i.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),An(e))},i.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},i.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(mn.getState("AdState"));mn.registerState("Midroll",Cn);var Ln=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"Postroll"};var i=t.prototype;return i.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=mn.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var i=e.ads.settings.timeout;"number"==typeof e.ads.settings.postrollTimeout&&(i=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),i)}},i.startLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?oe.default.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(e.ads.adType="postroll",e.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,En(e))},i.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var e=this,t=this.player,i=mn.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),An(t,(function(){e.transitionTo(i)})))},i.skipLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?oe.default.log.warn("Unexpected skipLinearAdMode invocation"):(e.ads.debug("Postroll abort (skipLinearAdMode)"),e.trigger("adskip"),this.abort(e))},i.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},i.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},i.onContentChanged=function(e){if(this.isContentResuming()){var t=mn.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var i=mn.getState("Preroll");this.transitionTo(i)}},i.onNoPostroll=function(e){this.isContentResuming()||this.inAdBreak()?oe.default.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(e)},i.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},i.abort=function(e){var t=mn.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},i.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},t}(mn.getState("AdState"));mn.registerState("Postroll",Ln);var Dn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"ContentPlayback"};var i=t.prototype;return i.init=function(e){e.ads._shouldBlockPlay=!1}
2,i.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},i.onReadyForPostroll=function(e){var t=mn.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},i.startLinearAdMode=function(){var e=mn.getState("Midroll");this.transitionTo(e)},t}(mn.getState("ContentState"));mn.registerState("ContentPlayback",Dn);var kn=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"StitchedContentPlayback"};var i=t.prototype;return i.init=function(){this.player.ads._shouldBlockPlay=!1},i.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},i.startLinearAdMode=function(){var e=mn.getState("StitchedAdRoll");this.transitionTo(e)},t}(mn.getState("ContentState"));mn.registerState("StitchedContentPlayback",kn);var In=function(e){function t(){return e.apply(this,arguments)||this}yn(t,e),t._getName=function(){return"StitchedAdRoll"};var i=t.prototype;return i.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",En(this.player)},i.onPlaying=function(){},i.onContentResumed=function(){},i.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},i.endLinearAdMode=function(){var e=mn.getState("StitchedContentPlayback");An(this.player),this.transitionTo(e)},t}(mn.getState("AdState"));mn.registerState("StitchedAdRoll",In);var Rn=hn.isMiddlewareMediatorSupported,Nn=oe.default.getTech("Html5").Events,On={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:oe.default.options.normalizeAutoplay||!1},Mn=function(e){var t=this,i=oe.default.mergeOptions(On,e),n=[];Nn.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),t.on(n,tn),Rn()||function(e,t){t&&oe.default.log("Using cancelContentPlay to block content playback"),e.on("play",cn)}(t,i.debug),t.setTimeout((function(){t.ads._hasThereBeenALoadStartDuringPlayerLife||""===t.src()||oe.default.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),t.on("ended",(function(){t.hasClass("vjs-has-started")||t.addClass("vjs-has-started")})),t.on("contenttimeupdate",(function(){t.removeClass("vjs-waiting")})),t.on(["addurationchange","adcanplay"],(function(){if(!t.ads.settings.stitchedAds&&!t.hasStarted()&&(!t.ads.snapshot||t.currentSrc()!==t.ads.snapshot.currentSrc)&&t.ads.inAdBreak()){var e=t.play();e&&e.catch&&e.catch((function(e){oe.default.log.warn("Play promise rejected when playing ad",e)}))}})),t.on("nopreroll",(function(){t.ads.debug("Received nopreroll event"),t.ads.nopreroll_=!0})),t.on("nopostroll",(function(){t.ads.debug("Received nopostroll event"),t.ads.nopostroll_=!0})),t.on("playing",(function(){t.ads._cancelledPlay=!1,t.ads._pausedOnContentupdate=!1})),t.on("play",(function(){t.ads._playRequested=!0})),t.one("loadstart",(function(){t.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),t.on("loadeddata",(function(){t.ads._hasThereBeenALoadedData=!0})),t.on("loadedmetadata",(function(){t.ads._hasThereBeenALoadedMetaData=!0})),t.ads=function(e){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:$i,reset:function(){e.ads.disableNextSnapshotRestore=!1,e.ads._contentEnding=!1,e.ads._contentHasEnded=!1,e.ads.snapshot=null,e.ads.adType=null,e.ads._hasThereBeenALoadedData=!1,e.ads._hasThereBeenALoadedMetaData=!1,e.ads._cancelledPlay=!1,e.ads._shouldBlockPlay=!1,e.ads._playBlocked=!1,e.ads.nopreroll_=!1,e.ads.nopostroll_=!1,e.ads._playRequested=!1},startLinearAdMode:function(){e.ads._state.startLinearAdMode()},endLinearAdMode:function(){e.ads._state.endLinearAdMode()},skipLinearAdMode:function(){e.ads._state.skipLinearAdMode()},stitchedAds:function(e){return void 0!==e&&(oe.default.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!e),this.settings.stitchedAds},videoElementRecycled:function(){if(e.ads.shouldPlayContentBehindAd(e))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var t=e.tech_.src()!==this.snapshot.src,i=e.currentSrc()!==this.snapshot.currentSrc;return t||i},isLive:function(t){return void 0===t&&(t=e),"boolean"==typeof t.ads.settings.contentIsLive?t.ads.settings.contentIsLive:t.duration()===1/0||"8"===oe.default.browser.IOS_VERSION&&0===t.duration()},shouldPlayContentBehindAd:function(t){if(void 0===t&&(t=e),t)return!!t.ads.settings.liveCuePoints&&!oe.default.browser.IS_IOS&&!oe.default.browser.IS_ANDROID&&t.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(t){return void 0===t&&(t=e),!this.shouldPlayContentBehindAd(t)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var t=e.$(".vjs-tech");t&&t.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];1===t.length&&"string"==typeof t[0]?oe.default.log("ADS: "+t[0]):oe.default.log.apply(oe.default,["ADS:"].concat(t))}}}}(t),t.ads.settings=i,i.stitchedAds=!!i.stitchedAds,i.stitchedAds?t.ads._state=new(mn.getState("StitchedContentPlayback"))(t):t.ads._state=new(mn.getState("BeforePreroll"))(t),t.ads._state.init(t),t.ads.cueTextTracks=ln,t.ads.adMacroReplacement=on.bind(t),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}
2))}(t),t.on("contentchanged",t.ads.reset);var r=function(){var e=t.textTracks();if(!t.ads.shouldPlayContentBehindAd(t)&&t.ads.inAdBreak()&&t.tech_.featuresNativeTextTracks&&oe.default.browser.IS_IOS&&!Array.isArray(t.textTracks()))for(var i=0;i<e.length;i++){var n=e[i];"showing"===n.mode&&(n.mode="disabled")}};t.ready((function(){t.textTracks().addEventListener("change",r)})),t.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){t.ads._state.handleEvent(e.type)})),t.on("dispose",(function(){t.ads.reset(),t.textTracks().removeEventListener("change",r)})),rn(),t.ads.listenToTcf=rn};Mn.VERSION=$i,function(e){!function(){if(oe.default.getPlugin)return Boolean(oe.default.getPlugin("ads"));var e=oe.default.getComponent("Player");return Boolean(e&&e.prototype.ads)}(oe.default)&&((oe.default.registerPlugin||oe.default.plugin)("ads",e),gn()&&!oe.default.usingContribAdsMiddleware_&&(oe.default.use("*",fn),oe.default.usingContribAdsMiddleware_=!0,oe.default.log.debug("Play middleware has been registered with videojs")))}(Mn);var xn=function(){return u((function e(t){o(this,e),this.videoElement=t,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countDownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.createContainer()}),[{key:"createContainer",value:function(){this.adContainerDiv.style.position="absolute",this.adContainerDiv.style.zIndex="93",this.assignControlAttributes(this.adContainerDiv,"zee-ad-container"),this.videoElement.appendChild(this.adContainerDiv),this.createControls()}},{key:"createControls",value:function(){this.assignControlAttributes(this.controlsDiv,"zee-controls-div"),this.controlsDiv.style.width="100%",this.assignControlAttributes(this.countDownDiv,"zee-countdown-div"),this.controlsDiv.style.display="block",this.assignControlAttributes(this.seekBarDiv,"zee-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"zee-progress-div"),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countDownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.seekBarDiv.appendChild(this.progressDiv)}},{key:"updateAdUi",value:function(e,t,i,n,r){var s=Math.floor(t/60),a=Math.floor(t%60).toString();a.toString().length<2&&(a="0"+a);var o=": ";r>1&&(o=" ("+n+" of "+r+"): "),this.countDownDiv.innerHTML="Advertisement"+o+s+":"+a;var l=e/i*100;this.progressDiv.style.width=l+"%"}},{key:"showAdContainer",value:function(){this.adContainerDiv.style.display="block"}},{key:"hideAdContainer",value:function(){this.adContainerDiv.style.display="none"}},{key:"assignControlAttributes",value:function(e,t){e.id=t,e.className=t}}])}(),Bn=u((function e(){o(this,e)}));c(Bn,"AD_CLICKED","ad_clicked"),c(Bn,"AD_ENDED","ad_ended"),c(Bn,"AD_ERROR","ad_error"),c(Bn,"AD_LOADED","ad_loaded"),c(Bn,"AD_MANAGER_LOADED","ad_manager_loaded"),c(Bn,"AD_PAUSE","ad_pause"),c(Bn,"AD_PLAY","ad_play"),c(Bn,"AD_RESUME","ad_resume"),c(Bn,"AD_STARTED","ad_started"),c(Bn,"AD_PROGRESS","ad_progress"),c(Bn,"AD_BREAK_ENDED","break_end"),c(Bn,"BREAK_SKIPPED","break_skipped"),c(Bn,"AD_BREAK_STARTED","break_start"),c(Bn,"AD_COMPLETE","ad_complete"),c(Bn,"FIRST_QUARTILE","first_quartile"),c(Bn,"MIDPOINT","midpoint"),c(Bn,"REQUEST","ad_request"),c(Bn,"REQUEST_COMPLETE","ad_request_complete"),c(Bn,"REQUEST_START","ad_request_start"),c(Bn,"SKIPPED","skipped"),c(Bn,"THIRD_QUARTILE","third_quartile"),c(Bn,"PRE_ROLL_COMPLETED","pre_roll_completed"),c(Bn,"AD_BLOCKER_DETECTED","ad_blocker_detected"),c(Bn,"STREAM_LOADED","stream_loaded"),c(Bn,"STREAM_LOAD_ERROR","stream_load_error"),c(Bn,"AD_CREATED","ad_created"),c(Bn,"AD_IMPRESSION","ad_impression"),c(Bn,"SECOND_QUARTILE","second_quartile"),c(Bn,"LOADED","loaded"),c(Bn,"COMPLETE","complete"),c(Bn,"ERROR","error"),c(Bn,"CLICK","click"),c(Bn,"PAUSED","paused"),c(Bn,"RESUMED","resumed"),c(Bn,"ALL_ADS_COMPLETED","all_ads_completed");var Un=i(989),Vn=i.n(Un),Fn={NOT_RECEIVED:"Not-Received",NOT_APPLICABLE:"Not-Applicable",ZEE5:"ZEE5",LIVE:"Live",VOD:"VOD",DRM:"DRM",HLS:"HLS",DASH:"DASH",GUEST:"Guest",WEB:"Web",DEFAULT_PARTNER_ZEE5:"ZEE5",ORGANIC:"Organic",UNKNOWN:"Unknown",WIFI:"wifi",PLATFORM_NAME:"ZEE5-Web App",PLAYER_NAME:"Web-Zee5"},qn={TITLE:"content.title",PLATFORM_NAME:"device.name",DEVICE_CODE:"device.code",CONNECTION_TYPE:"network.connectionType",IS_LIVE:"content.isLive",DURATION:"content.duration",RENDITION:"content.rendition",STREAMING_PROTOCOL:"content.streamingProtocol",TV_SHOW:"content.tvShow",SEASON:"content.season",EPISODE_TITLE:"content.episodeTitle",CHANNEL:"content.channel",ID:"content.id",TYPE:"content.type",GENRE:"content.genre",LANGUAGE:"c
2ontent.language",SUBTITLES:"content.subtitles",CONTRACTED_RESOLUTION:"content.contractedResolution",PLAYBACK_TYPE:"content.playbackType",CUSTOM_DIMENSIONS:"content.customDimensions",AFFILIATE:"AFFILIATE",PLAN_ID:"PLAN_ID",IS_KIDS_PROFILE:"IS_KIDS_PROFILE",PROFILE_ID:"PROFILE_ID",IS_KIDS_SAFE:"IS_KIDS_SAFE",CONTENT_ORIGINAL_LANGUAGES:"CONTENT_ORIGINAL_LANGUAGES",AD_TECHNOLOGY:"AD_TECHNOLOGY"};function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Hn={},Gn={},Wn=I();function Xn(e){Hn=e}function Kn(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return"movie"===(null==t?void 0:t.asset_subtype)?Fn.NOT_APPLICABLE:(null==t?void 0:t.title)||(null==t?void 0:t.original_title)||Fn.NOT_APPLICABLE}function zn(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return(null==t?void 0:t.title)||(null==t?void 0:t.original_title)||Fn.NOT_APPLICABLE}function Yn(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return(null==t?void 0:t.id)||Fn.NOT_APPLICABLE}function Qn(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return(null==t?void 0:t.duration)||0}function Jn(){var e=(Hn||{}).showDetails,t=void 0===e?{}:e;return(null==t?void 0:t.title)||(null==t?void 0:t.original_title)||Fn.NOT_APPLICABLE}function $n(){var e=(Hn||{}).showDetails,t=void 0===e?{}:e;return(null==t?void 0:t.season)||Fn.NOT_APPLICABLE}function Zn(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return 9===(null==t?void 0:t.asset_type)?null==t?void 0:t.original_title:Fn.NOT_APPLICABLE}function er(){var e=(Hn||{}).assetDetails,t=void 0===e?{}:e;return(null==t?void 0:t.asset_subtype)||Fn.NOT_APPLICABLE}function tr(){var e=(Hn||{}).assetDetails,t=(void 0===e?{}:e).genres||[];return 0===t.length?Fn.NOT_RECEIVED:t.map((function(e){return e.id||e.value})).join(", ")}function ir(){var e=(Hn||{}).assetDetails,t=(void 0===e?{}:e)||{},i=t.ordered_audio_languages,n=void 0===i?[]:i,r=t.audio_languages,s=void 0===r?[]:r;return n[0]||s[0]||Fn.NOT_APPLICABLE}function nr(){var e=(Hn||{}).entitlement,t=void 0===e?{}:e;return null!=t&&t.isLive?Fn.LIVE:Fn.VOD}function rr(){var e=navigator.userAgent.toLowerCase();return/iphone/.test(e)?"iPhone":/ipad/.test(e)?"iPad":/ipod/.test(e)?"iPod":/android/.test(e)?/mobile/.test(e)?"AndroidPhone":"AndroidTablet":/windows nt/.test(e)?"PCWindows":/macintosh|mac os x/.test(e)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?"iPad":"PCMac":/linux/.test(e)?navigator.maxTouchPoints&&navigator.maxTouchPoints>1?"AndroidTablet":"PCLinux":/crios|chrome/.test(e)&&/cros/.test(e)?"ChromeOS":Fn.UNKNOWN}function sr(){var e,t,i,n;return c(c(c(c(c(c(c({},qn.AFFILIATE,H()),qn.PLAN_ID,(n=sessionStorage.getItem(_.PLAN_ID))&&void 0!==n?JSON.parse(n):_.Not_Applicable),qn.IS_KIDS_PROFILE,0===(null==Wn?void 0:Wn.profileType)),qn.PROFILE_ID,null==Wn?void 0:Wn.id),qn.IS_KIDS_SAFE,null===(e=Hn)||void 0===e||null===(e=e.assetDetails)||void 0===e?void 0:e.kids_safe),qn.CONTENT_ORIGINAL_LANGUAGES,null===(t=Hn)||void 0===t||null===(t=t.assetDetails)||void 0===t?void 0:t.audio_languages),qn.AD_TECHNOLOGY,0===(null===(i=Hn)||void 0===i||null===(i=i.entitlement)||void 0===i?void 0:i.is_dai)?"IMA":"DAI")}function ar(e,t){var i,n,r;return Xn(t||{}),function(e){Gn=e}(e||{}),c(c(c(c(c(c(c(c(c(c(i={},qn.EPISODE_TITLE,Kn()),qn.TITLE,"".concat(Yn()," - ").concat(zn())),qn.ID,Yn()),qn.PLATFORM_NAME,rr()),qn.DEVICE_CODE,rr()),qn.CONNECTION_TYPE,function(){try{return(navigator.connection||navigator.mozConnection||navigator.webkitConnection).effectiveType.toUpperCase()||Fn.UNKNOWN}catch(e){return Fn.UNKNOWN}}()),qn.DURATION,Qn()),qn.IS_LIVE,nr()===Fn.LIVE),qn.STREAMING_PROTOCOL,function(){try{var e,t,i=null===(e=Gn)||void 0===e||null===(t=e.el)||void 0===t?void 0:t.call(e);if(i){var n,r=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return jn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(i.querySelectorAll("source"));try{for(r.s();!(n=r.n()).done;){var s=n.value,a=s.src||s.getAttribute("src");if(a){if(a.includes(".mpd"))return Fn.DASH;if(a.includes(".m3u8"))return Fn.HLS}}}catch(e){r.e(e)}finally{r.f()}return Fn.UNKNOWN}return"Safari"===w()?Fn.HLS:Fn.DASH}catch(e){return Fn.UNKNOWN}}()),qn.TV_SHOW,Jn()),c(c(c(c(c(c(c(c(i,qn.SEASON,$n()),qn.CHANNEL,Zn()),qn.TYPE,er()),qn.GENRE,tr()),qn.LANGUAGE,ir()),qn.CONTRACTED_RESOLUTION,(n=window.screen.width,r=window.screen.height,"".concat(n,"x").concat(r))),qn.PLAYBACK_TYPE,nr()),qn.CUSTOM_DIMENSIONS,sr())}class or{constructor(){this.lastPlayhead=null}getVersion(){return"7.0.9-Bitmovin8-ads-jsclass"}getPlayhead(){let e=null;return this.player&&this.flags&&this.flags.isStarted&&(e=this.player.getCurrentTime()),e}getTitle(){return this.title}getAdInsertionType(){var e=null;return this.player&&this.player.ads.getModuleInfo&&(e="advertising-ima"==this.player.ads.getModuleInfo().name||"advertising-bitmovin"==this.player.ads.getModuleInfo().name?this.getNpawReference().Constants.AdInsertionType.ClientSide:this.getNpawReference().Constants.AdInsertionType.ServerSide),e}getDuration(){return this.duration}getResource(){return this.src}getRendition(){return this.getNpawUtils().buildRenditionString(this.width,this.height,this.bitrate)}getBitrate(){return 1e3*this.bitrate}getAudioEnabled(){let e=!0;return this.player&&(e=this.player.getVolume()>0&&!this.player.isMuted()),e}getIsSkippable(){return this.skippable}getIsFullscreen(){let e=!1;return this.player&&(e="fullscreen"===this.player.getViewMode()),e}getIsVisible(){let e=!1;return this.player&&this.player.getVideoElement&&this.player.getVideoElement()&&
2(e=this.getNpawUtils().calculateAdViewability(this.player.getVideoElement())),e}getCreativeId(){return this.creativeId}getPosition(){let e=this.position;const t=this.getVideo().getAdapter();return t&&!t.flags.isJoined&&(e=this.getNpawReference().Constants.AdPosition.Preroll),e}registerListeners(){const e=this.player.exports.PlayerEvent;this.monitorPlayhead(!0,!0),this.references={},this.references[e.AdBreakStarted]=this.breakStartListener.bind(this),this.references[e.AdBreakFinished]=this.breakEndListener.bind(this),this.references[e.AdStarted]=this.adStartListener.bind(this),this.references[e.AdFinished]=this.adEndListener.bind(this),this.references[e.AdQuartile]=this.quartileListener.bind(this),this.references[e.AdSkipped]=this.skipListener.bind(this),this.references[e.AdClicked]=this.clickListener.bind(this),this.references[e.AdError]=this.errorListener.bind(this),this.references[e.Destroy]=this.destroyListener.bind(this),this.references[e.Paused]=this.pauseListener.bind(this),this.references[e.Playing]=this.resumeListener.bind(this),this.references[e.TimeChanged]=this.timeupdateListener.bind(this);for(let e in this.references)this.player.on(e,this.references[e])}pauseListener(){this.firePause()}resumeListener(){this.fireResume()}timeupdateListener(){this.lastPlayhead=this.getPlayhead()}unregisterListeners(){this.monitor&&this.monitor.stop();try{if(this.player&&this.player.off&&this.references){for(let e in this.references)this.player.off(e,this.references[e]);delete this.references}}catch(e){}}breakStartListener(e){this.getVideo().fireInit();const t=this.getVideo().getAdapter();t&&t.firePause();const i=e.adBreak.position;"pre"===i?this.position=this.getNpawReference().Constants.AdPosition.Preroll:"post"===i||t&&0!==t.getDuration()&&(t.getPlayhead()||i)>t.getDuration()-1?this.position=this.getNpawReference().Constants.AdPosition.Postroll:this.position=this.getNpawReference().Constants.AdPosition.Midroll}breakEndListener(e){if(this.fireBreakStop(),this.getVideo().requestBuilder.lastSent.adPosition!==this.getNpawReference().Constants.AdPosition.Postroll){const e=this.getVideo().getAdapter();e&&e.fireResume()}else this.getVideo().fireStop()}adStartListener(e){e.ad&&e.ad.data&&(this.title=e.ad.data.adTitle,this.bitrate=e.ad.data.bitrate,this.creativeId=e.ad.data.creative?e.ad.data.creative.id:void 0,this.src=e.ad.mediaFileUrl,this.height=e.ad.height,this.width=e.ad.width,this.skippable=e.ad.skippable,this.duration=e.ad.duration),this.lastPlayhead=0,this.counter=0,this.fireStart(),this.fireJoin()}adEndListener(e){let t=this.getVideo().getPlayhead();this.fireStop({adPlayhead:this.lastPlayhead,playhead:t}),this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Postroll&&this.getVideo().fireStop(),this.lastPlayhead=0}quartileListener(e){let t=1;switch(e.quartile){case"midpoint":t=2;break;case"thirdQuartile":t=3}this.fireQuartile(t)}skipListener(e){let t=this.getVideo().getPlayhead();this.fireSkip({adPlayhead:this.lastPlayhead,playhead:t}),this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Postroll&&this.getVideo().fireStop(),this.lastPlayhead=0}clickListener(e){this.fireClick(e.clickThroughUrl)}errorListener(e){const t=e.data?e.data:e;this.fireError(t.code,t.message)}destroyListener(e){this.player=null,this.tag=null;let t=this.getVideo().getPlayhead();this.fireStop({adPlayhead:this.lastPlayhead,playhead:t}),this.lastPlayhead=0,this.getVideo().removeAdsAdapter()}}class lr{getResource(e){let t="";const i=this._getShaka(e);return"function"==typeof i.getManifestUri?t=i.getManifestUri():"function"==typeof i.getCurrentSrc&&(t=i.getCurrentSrc()),t}getBitrate(e){let t=-1;const i=this._getShaka(e);if("function"==typeof i.getStats)t=i.getStats().streamBandwidth;else if("function"==typeof i.getVideoTracks&&"function"==typeof i.getVideoTrackCurrentIndex){const e=i.getVideoTrackCurrentIndex(),n=i.getVideoTracks();for(let i in n){const r=n[i];r.index==e&&(t=r.bitrate)}}return t}isUsed(e){return!!this._getShaka(e)}getRendition(e){const t=this._getShaka(e),i=t.getStats();let n=this.getNpawUtils().buildRenditionString(i.width,i.height,i.streamBandwidth);const r=t.getVariantTracks();for(let e in r){const t=r[e];if(t.active&&"video"===t.type){n=this.getNpawUtils().buildRenditionString(t.width,t.height,t.bandwidth);break}}return n}_getShaka(e){const t=e.getTech();return t.shakaPlayer||t._shakaplayerInstance}}class dr{getTech(e){const t=e.getTech();return t.vhs||t.hls||t.hls_||t.hlsplayer}getRendition(e){let t=null;const i=this.getTech(e).currentLevel;if(void 0!==i&&-1!==i&&this.getTech(e).levels){const n=this.getTech(e).levels[i];n&&(t=this.getNpawUtils().buildRenditionString(n.width,n.height,n.bitrate))}return t}isUsed(e){return!!this.getTech(e)}getHls(e){return this.getTech(e)}getResource(e){let t=null;return this.getTech(e)&&this.getTech(e).url?t=this.getTech(e).url:this.getHls(e)&&this.getHls(e).source_&&(t=this.getHls(e).source_.src),t}getBitrate(e){let t=null;const i=this.getTech(e).currentLevel;if(void 0!==i&&-1!==i&&this.getTech(e).levels){const n=this.getTech(e).levels[i];n&&n.bitrate&&(t=n.bitrate)}return t}}class ur{getTech(e){return e.getTech().hlsProvider}getRendition(e){let t;const i=this.getTech(e).getQuality();return void 0!==i&&i.width&&i.height&&i.bitrate&&(t=this.getNpawUtils().buildRenditionString(i.width,i.height,i.bitrate)),t}isUsed(e){return!!this.getTech(e)}getHls(e){return this.getTech(e)}getResource(e){let t=null;const i=this.getTech(e).getQuality();return void 0!==i&&i.url&&i._urlId&&(t=i.url[i._urlId]),t}getBitrate(e){let t;const i=this.getTech(e).getQuality();return void 0!==i&&i.bitrate&&(t=i.bitrate),t}}class cr{getBitrate(e){return e.player.dash.shakaPlayer.getStats().streamBandwidth}getResource(e){let t="";const i=e.player.dash.shakaPlayer;return"function"==typeof i.getManifestUri?t=i.getManifestUri():"function"==typeof i.getAssetUri&&(t=i.getAssetUri()),t}isUsed(e){return e.player.dash&&e.player.dash.shakaPlayer}getRendition(e){const t=e.player.dash.shakaPlayer,i=t.getStats();let n=this.getNpawUtils().buildRenditionString(i.width,i.height,i.streamBandwidth);const r=t.getVariantTracks();for(let e in r){const t=r[e];t.active&&"video"===t.type&&(n=this.getNpawUtils().buildRenditionString(t.width,t.height,t.bandwidth))}return n}}class hr{getResource(e){return this._getDashPlayer(e).getSource()}_getDashPlayer(e){return e.player.dash.mediaPlayer}isUsed(e){return e.player.dash&&e.player.dash.mediaPlayer&&!e.player.dash.shakaPlayer}getRendition(e){let t=null;const i=this._getDashPlayer(e);if(i){const e=i.getQualityFor("video");if(e){const n=i.getBitrateInfoListFor("video")[e];n&&(t=this.getNpawUtils().buildRenditionString(n.width,n.height,n.bitrate))}}return t}getBitrate(e){let t=null;const i=this._getDashPlayer(e);if(i){const e=i.getQualityFor("video");e&&(t=i.getBitrateInfoListFor("video")[e].bitrate)}return t}}class pr{isUsed(e){return!!this.getHls(e)}getRendition(e){let t=null;const i=this.getHls(e).playlists.media();if(e.player.qualityLevels){const i=e.player.qualityLevels(),n=i[i.selectedIndex];n&&(t=this.getNpawUtils().buildRenditionString(n.width,n.height,n.bitrate))}else if(i&&i.attributes){const e=i.attributes;e.RESOLUTION?t=this.getNpawUtils().buildRenditionString(e.RESOLUTION.width,e.RESOLUTION.height,e.BANDWIDTH):e.BANDWIDTH?t=this.getNpawUtils().buildRenditionString(e.BANDWIDTH):e.NAME&&(t=e.NAME)}return t}getHls(e){return e.getTech().vhs||e.getTech().hls||e.getTech().hls_||e.getTech().hlsplayer}getTotalBytes(e){const t=this.getHls(e);let i=t.bytesReceived;return!i&&t.stats&&(i=t.stats.mediaBytesTransferred-e.acumBytes),i}getBitrate(e){let t=null;const i=this.getHls(e).playlists.media();if(e.player.qualityLevels){const i=e.player.qualityLevels(),n=i[i.selectedIndex];n&&(t=n.bitrate)}else i&&i.attributes&&i.attributes.BANDWIDTH?t=i.attributes.BANDWIDTH:e.player.tech_&&e.player.tech_.vhs&&e.player.tech_.vhs.stats?t=e.player.tech_.vhs.stats.bandwidth:e.player.tech_&&e.player.tech_.hls&&e.player.tech_.hls.bandwidth?t=e.player.tech_.hls.bandwidth:e.player.hls&&e.player.hls.bandwidth&&(t=e.player.hls.bandwidth);return t}}class fr{initProperties(){this.isGeneric=!0}getVersion(){return"7.0.10-videojs-ads-jsclass"}registerListeners(){if(this.references={adstart:this.adStartListener.bind(this),adend:this.adEndListener.bind(this),adskip:this.adSkipListener.bind(this),adserror:this.errorListener.bind(this),"ads-cl
2ick":this.clickListener.bind(this)},this.player)for(var e in this.references)this.player.on(e,this.references[e])}unregisterListeners(){if(this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}adStartListener(e){this.firePlayerLog("adStartListener",{}),this.fireStart(),this.fireJoin()}adEndListener(e){this.firePlayerLog("adEndListener",{}),this.fireStop()}adSkipListener(e){this.firePlayerLog("adSkipListener",{}),this.fireSkip()}errorListener(e){this.firePlayerLog("adErrorListener",{}),this.fireError()}clickListener(e){this.firePlayerLog("adClickListener",{}),this.fireClick()}}class gr{isUsed(){return"undefined"!=typeof google&&this.player.ima3&&this.player.ads}getVersion(){let e=null;return"undefined"!=typeof google&&google.ima&&(e="bcove-ima-jsclass "+google.ima.VERSION),e}getPlayhead(){let e=this.getVideo().getAdapter().player;return this.player.ima3&&this.player.ima3&&this.player.ima3.adPlayer&&(e=this.player.ima3.adPlayer),e.currentTime()}getDuration(){let e=null;if(this.player.ads&&this.player.ads.ad&&this.player.ads.ad.duration)e=this.player.ads.ad.duration;else{let t=this.getVideo().getAdapter().player;this.player.ima3&&(t=this.player.ima3.adPlayer),e=t&&t.duration?t.duration():null}return e}getPosition(){let e=this.getNpawReference().Constants.AdPosition.Midroll;if(this.player.ads&&this.player.ads.ad)switch(this.player.ads.ad.type){case"PREROLL":e=this.getNpawReference().Constants.AdPosition.Preroll;break;case"MIDROLL":e=this.getNpawReference().Constants.AdPosition.Midroll;break;case"POSTROLL":e=this.getNpawReference().Constants.AdPosition.Postroll}else this.getVideo().getAdapter().getPlayhead()>=this.getVideo().getAdapter().getDuration()&&(e=this.getNpawReference().Constants.AdPosition.Postroll);return this.getVideo().getAdapter().flags.isJoined||(e=this.getNpawReference().Constants.AdPosition.Preroll),e}getResource(){let e="unknown";return this.player.ima3&&(e=this.player.ima3.currentAd.getMediaUrl()),e}getTitle(){let e=null;return this.player.ima3&&this.player.ima3.currentAd&&(e=this.player.ima3.currentAd.getTitle()),e}getPlayerVersion(){let e=null;return this.player.ima3&&(e=this.player.ima3.VERSION),e}getGivenBreaks(){let e=null;return this.player.ima3&&(e=this.player.ima3.adsManager.getCuePoints().length),e}getBreaksTime(){let e=null;if(this.player.ima3){const t=this.player.ima3.adsManager.getCuePoints();for(let e in t)(!t[e]&&0!==t[e]||-1===t[e])&&(t[e]=this.getVideo().getAdapter().getDuration());e=t}return e}getGivenAds(){let e=null;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getAdPodInfo()&&(e=this.player.ima3.currentAd.getAdPodInfo().getTotalAds()),e}getAudioEnabled(){let e=null;return e=!this.player.muted()&&!!this.player.volume(),e}getIsSkippable(){let e=!1;return this.player.ima3&&(e=this.player.ima3.currentAd&&this.player.ima3.currentAd.isSkippable()),e}getIsFullscreen(){let e=null;if(this.getPlugin().deviceDetector.isIphone())e=!this.getPlugin().deviceDetector.isInBackground;else{let t=null;this.player.ima3&&(t=this.player.ima3.el),e=!!t&&window.innerHeight<=t.clientHeight+30&&window.innerWidth<=t.clientWidth+30}return e}getIsVisible(){let e=null;return this.getPlugin().deviceDetector.isIphone()?e=!this.getPlugin().deviceDetector.isInBackground:this.player.ima3&&(e=this.getNpawUtils().calculateAdViewability(this.player.ima3.el)),e}getBitrate(){let e=-1;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getVastMediaBitrate()&&(e=this.player.ima3.currentAd.getVastMediaBitrate()),e}getCreativeId(){let e=null;return this.player.ima3&&this.player.ima3.currentAd?e=this.player.ima3.currentAd.getCreativeAdId()||this.player.ima3.currentAd.getCreativeId():this.titles&&(e=this.titles[(this.getVideo().requestBuilder.lastSent.adNumber||1)-1]._creativeId),e}registerListeners(){if(this.monitorPlayhead(!0,!1),this.references={"ima3-started":this.startJoinListener.bind(this),"ima3-paused":this.pausedListener.bind(this),"ima3-resumed":this.resumedListener.bind(this),"ima3-complete":this.adEndedListener.bind(this),"ima3-skipped":this.skippedListener.bind(this),"ima3-ad-error":this.errorListener.bind(this),"ads-po
2d-ended":this.podEndListener.bind(this),"ads-click":this.clickListener.bind(this),"ads-first-quartile":this.firstQuartileListener.bind(this),"ads-midpoint":this.secondQuartileListener.bind(this),"ads-third-quartile":this.thirdQuartileListener.bind(this)},this.player)for(let e in this.references)this.player.on(e,this.references[e])}startJoinListener(e){this.getVideo().getAdapter()&&this.getVideo().getAdapter().firePause(),this.fireStart(),this.fireJoin()}pausedListener(e){this.firePause()}resumedListener(e){this.fireResume()}skippedListener(e){this.fireSkip(),this.getVideo().getAdapter()&&this.getVideo().getAdapter().fireResume()}adEndedListener(e){const t=this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Preroll?0:this.getVideo().getAdapter().lastPlayhead;this.fireStop({playhead:t,adPlayhead:this.getDuration()})}errorListener(e){if(this.player.ima3)if(e.getError&&e.getError()){const t=e.getError();this.fireError(t.getCode(),t.getMessage())}else this.fireError()}clickListener(e){if(this.player.ima3){let e=null;this.player.ima3.currentAd&&this.player.ima3.currentAd.g&&(e=this.player.ima3.currentAd.g.clickThroughUrl),this.fireClick(e)}}firstQuartileListener(e){this.fireQuartile(1)}secondQuartileListener(e){this.fireQuartile(2)}thirdQuartileListener(e){this.fireQuartile(3)}podEndListener(e){this.fireBreakStop()}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(let e in this.references)this.player.off(e,this.references[e]);delete this.references}}adPlayerErrorListener(e){const t=e.data.AdError;[1012,1005,301,402,302].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.NO_RESPONSE,t.getMessage()):[1007,1009,303].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.EMPTY,t.getMessage()):[403,100,503,101,102].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.WRONG,t.getMessage()):this.fireError(t.getErrorCode(),t.getMessage())}}class mr{getVersion(){return"7.0.3-jwplayer-ads-jsclass"}getDuration(){return this.duration}getResource(){return this.resource}getPlayhead(){return this.playhead}getTitle(){return this.title}getPosition(){var e=this.getNpawReference().Constants.AdPosition.Midroll;return this.getVideo().getAdapter()&&!this.getVideo().getAdapter().flags.isJoined?e=this.getNpawReference().Constants.AdPosition.Preroll:this.position!==this.getNpawReference().Constants.AdPosition.Preroll&&this.position!==this.getNpawReference().Constants.AdPosition.Midroll&&this.position!==this.getNpawReference().Constants.AdPosition.Postroll||(e=this.position),e}getGivenBreaks(){var e=null;return this.manager&&this.manager.adsManager&&this.manager.adsManager.getCuePoints&&(e=this.manager.adsManager.getCuePoints().length),e}getBreaksTime(){var e=null;if(this.manager&&this.manager.adsManager&&this.manager.adsManager.getCuePoints){var t=this.manager.adsManager.getCuePoints();for(var i in t)(!t[i]&&0!==t[i]||-1===t[i])&&(t[i]=this.getVideo()._adapter.getDuration());e=t}return e}getGivenAds(){return this.pod&&this.pod.getTotalAds?this.pod.getTotalAds():null}getAudioEnabled(){return!this.player.getMute()}getIsSkippable(){return this.skippable}getIsFullscreen(){if("function"==typeof this.player.getFullscreen)return this.player.getFullscreen();var e=this.player.getContainer();return window.innerHeight<=e.clientHeight+30&&window.innerWidth<=e.clientWidth+30}getIsVisible(){return this.getNpawUtils().calculateAdViewability(this.player.getContainer())}getCreativeId(){return this.creativeId}registerListeners(){for(var e in this.monitorPlayhead(!0,!1,1200),this.references={adTime:this.adTimeListener.bind(this),adStarted:this.adStartedListener.bind(this),adImpression:this.adImpressionListener.bind(this),adPause:this.adPauseListener.bind(this),adPlay:this.adPlayListener.bind(this),adSkipped:this.adSkippedListener.bind(this),adComplete:this.adCompleteListener.bind(this),adClick:this.adClickListener.bind(this),adError:this.adErrorListener.bind(this),adsManager:this.managerListener.bind(this)},this.references)this.player.on(e,this.references[e])}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}managerListener(e){this.manager=e}adTimeListener(e){this.playhead=e.position,this.duration=e.duration,this.getVideo()._adapter&&this.getVideo()._adapter.firePause(),e.ima&&e.ima.ad&&this._imaMetadata(e.ima.ad),this.firstStarted||(this.fireStart(),this.firstStarted=!0),this.fireJoin(),this._quartileHandler()}_imaMetadata(e){this.creativeId=e.getCreativeId()||e.getCreativeAdId(),this.resource=e.getMediaUrl(),this.clickThrough=e.g?e.g.clickThroughUrl:null,this.pod=e.getAdPodInfo(),this.skippable=!(e.getSkipTimeOffset()<=0)}_quartileHandler(){var e=this.playhead/this.duration;e>.75?this.fireQuartile(3):e>.5?this.fireQuartile(2):e>.25&&this.fireQuartile(1)}adStartedListener(e){this.position=e.adposition,this.resource=e.mediafile&&e.mediafile.file?e.mediafile.file:e.tag,this.title=e.adtitle}adImpressionListener(e){this.position=e.adposition,this.resource=e.mediafile&&e.mediafile.file?e.mediafile.file:e.tag,this.title=e.adtitle||e.tag,this.clickThrough=e.clickThroughUrl}adPauseListener(e){this.firePause()}adPlayListener(e){this.fireResume()}adSkippedListener(e){this.fireSkip(),this.firstStarted=!1}adCompleteListener(e){this.fireStop(),this.firstStarted=!1,this.resetValues()}adClickListener(e){this.fireClick(this.clickThrough)}adErrorListener(e){if(e.message){var t=e.message.toLowerCase();t.indexOf("ad tag empty")>-1?this.fireManifest(this.getNpawReference().Constants.ManifestError.EMPTY,e.message):t.indexOf("error loading ad tag")>-1||t.indexOf("invalid ad tag")>-1||t.indexOf("any valid ads")>-1?this.fireManifest(this.getNpawReference().Constants.ManifestError.WRONG,e.message):!e.adErrorCode||60006!==e.adErrorCode&&10403!==e.adErrorCode?(this.fireError(e.adErrorCode,e.message),this.fireStop(),this.resetValues(),t.indexOf("timeout")>-1&&this.fireBreakStop()):this.fireManifest(this.getNpawReference().Constants.ManifestError.WRONG,e.message)}}resetValues(){this.playhead=void 0,this.duration=void 0,this.position=void 0,this.resource=void 0,this.title=void 0}}class vr{getResource(e){var t="",i=this._getShaka(e);return"function"==typeof i.getManifestUri?t=i.getManifestUri():"function"==typeof i.getCurrentSrc&&(t=i.getCurrentSrc()),t}getBitrate(e){var t=-1,i=this._getShaka(e);if("function"==typeof i.getStats)t=i.getStats().streamBandwidth;else if("function"==typeof i.getVideoTracks&&"function"==typeof i.getVideoTrackCurrentIndex){var n=i.getVideoTrackCurrentIndex(),r=i.getVideoTracks();for(var s in r){var a=r[s];a.index==n&&(t=a.bitrate)}}return t}isUsed(e){return!!this._getShaka(e)}getRendition(e){var t=this._getShaka(e),i=t.getStats(),n=this.getNpawUtils().buildRenditionString(i.width,i.height,i.streamBandwidth),r=t.getVariantTracks();for(var s in r){var a=r[s];if(a.active&&"video"===a.type){n=this.getNpawUtils().buildRenditionString(a.width,a.height,a.bandwidth);break}}return n}_getShaka(e){var t=e.getTech();return t.shakaPlayer||t._shakaplayerInstance}}class yr{getTech(e){var t=e.getTech();return t.vhs||t.hls||t.hls_||t.hlsplayer}getRendition(e){var t=null,i=this.getTech(e).currentLevel;if(void 0!==i&&-1!==i&&this.getTech(e).levels){var n=this.getTech(e).levels[i];n&&(t=this.getNpawUtils().buildRenditionString(n.width,n.height,n.bitrate))}return t}isUsed(e){return!!this.getTech(e)}getHls(e){return this.getTech(e)}getResource(e){var t=null;return this.getTech(e)&&this.getTech(e).url?t=this.getTech(e).url:this.getHls(e)&&this.getHls(e).source_&&(t=this.getHls(e).source_.src),t}getBitrate(e){var t=null,i=this.getTech(e).currentLevel;if(void 0!==i&&-1!==i&&this.getTech(e).levels){var n=this.getTech(e).levels[i];n&&n.bitrate&&(t=n.bitrate)}return t}}class _r{getBitrate(e){return e.player.dash.shakaPlayer.getStats().streamBandwidth}getResource(e){var t="",i=e.player.dash.shakaPlayer;return"function"==typeof i.getManifestUri?t=i.getManifestUri():"function"==typeof i.getAssetUri&&(t=i.getAssetUri()),t}isUsed(e){return e.player.dash&&e.player.dash.shakaPlayer}getRendition(e){var t=e.player.dash.shakaPlayer,i=t.getStats(),n=this.getNpawUtils().buildRenditionString(i.width,i.height,i.streamBandwidth),r=t.getVariantTracks();for(var s in r){var a=r[s];a.active&&"video"===a.type&&(n=this.getNpawUtils().buildRenditionString(a.width,a.height,a.bandwidth))}return n}}class br{getResource(e){return this._getDashPlayer(e).getSource()}_getDashPlayer(e){return e.player.dash.mediaPlayer}isUsed(e){return e.player.dash&&e.player.dash.mediaPlayer&&!e.player.dash.shakaPlayer}getRendition(e){var t=null,i=this._getDashPlayer(e);if(i){var n=i.getQualityFor("video");if(n){var r=i.getBitrateInfoListFor("video")[n];r&&(t=this.getNpawUtils().buildRenditionString(r.width,r.height,r.bitrate))}}return t}getBitrate(e){var t=null,i=this._getDashPlayer(e);if(i){var n=i.getQualityFor("video");
2n&&(t=i.getBitrateInfoListFor("video")[n].bitrate)}return t}}class Tr{isUsed(e){return!!this.getHls(e)}getRendition(e){var t=null,i=this.getHls(e).playlists.media();if(e.player.qualityLevels){var n=e.player.qualityLevels(),r=n[n.selectedIndex];r&&(t=this.getNpawUtils().buildRenditionString(r.width,r.height,r.bitrate))}else if(i&&i.attributes){var s=i.attributes;s.RESOLUTION?t=this.getNpawUtils().buildRenditionString(s.RESOLUTION.width,s.RESOLUTION.height,s.BANDWIDTH):s.BANDWIDTH?t=this.getNpawUtils().buildRenditionString(s.BANDWIDTH):s.NAME&&(t=s.NAME)}return t}getHls(e){return e.getTech().vhs||e.getTech().hls||e.getTech().hls_||e.getTech().hlsplayer}getTotalBytes(e){var t=this.getHls(e),i=t.bytesReceived;return!i&&t.stats&&(i=t.stats.mediaBytesTransferred-e.acumBytes),i}getBitrate(e){var t=null,i=this.getHls(e).playlists.media();if(e.player.qualityLevels){var n=e.player.qualityLevels(),r=n[n.selectedIndex];r&&(t=r.bitrate)}else i&&i.attributes&&i.attributes.BANDWIDTH?t=i.attributes.BANDWIDTH:e.player.tech_&&e.player.tech_.vhs&&e.player.tech_.vhs.stats?t=e.player.tech_.vhs.stats.bandwidth:e.player.tech_&&e.player.tech_.hls&&e.player.tech_.hls.bandwidth?t=e.player.tech_.hls.bandwidth:e.player.hls&&e.player.hls.bandwidth&&(t=e.player.hls.bandwidth);return t}}class Sr{initProperties(){this.isGeneric=!0}getVersion(){return"7.0.4-videojs-ads-jsclass"}registerListeners(){if(this.references={adstart:this.adStartListener.bind(this),adend:this.adEndListener.bind(this),adskip:this.adSkipListener.bind(this),adserror:this.errorListener.bind(this),"ads-click":this.clickListener.bind(this),"ima3-first-quartile":this.firstQuartileListener.bind(this),"ima3-midpoint":this.secondQuartileListener.bind(this),"ima3-third-quartile":this.thirdQuartileListener.bind(this),"ads-first-quartile":this.firstQuartileListener.bind(this),"ads-midpoint":this.secondQuartileListener.bind(this),"ads-third-quartile":this.thirdQuartileListener.bind(this)},this.player)for(var e in this.references)this.player.on(e,this.references[e])}firstQuartileListener(e){this.fireQuartile(1)}secondQuartileListener(e){this.fireQuartile(2)}thirdQuartileListener(e){this.fireQuartile(3)}unregisterListeners(){if(this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}adStartListener(e){this.firePlayerLog("adStartListener",{}),this.fireStart(),this.fireJoin()}adEndListener(e){this.firePlayerLog("adEndListener",{}),this.fireStop()}adSkipListener(e){this.firePlayerLog("adSkipListener",{}),this.fireSkip()}errorListener(e){this.firePlayerLog("adErrorListener",{}),this.fireError()}clickListener(e){this.firePlayerLog("adClickListener",{}),this.fireClick()}}class Er{isUsed(){return this.player.ima3&&this.player.ads}getVersion(){var e;return"undefined"!=typeof google&&google.ima&&(e="bcove-ima-jsclass "+google.ima.VERSION),e}getPlayhead(){var e=this.getVideo().getAdapter().player;return this.player.ads&&this.player.ads.ad?this.player.ads.ad.currentTime:e.currentTime()}getDuration(){let e;if(this.player.ads&&this.player.ads.ad&&this.player.ads.ad.duration)e=this.player.ads.ad.duration;else{var t=this.getVideo().getAdapter().player;if(this.player.ima3&&this.player.ima3.currentAdEventInfo)return this.player.ima3.currentAdEventInfo.creativeLength[0];e=t&&t.duration?t.duration():null}return e}getPosition(){let e=this.getNpawReference().Constants.AdPosition.Midroll;const t=this.getVideo().getAdapter();if(this.player.ads&&this.player.ads.ad)switch(this.player.ads.ad.type){case"PREROLL":e=this.getNpawReference().Constants.AdPosition.Preroll;break;case"MIDROLL":e=this.getNpawReference().Constants.AdPosition.Midroll;break;case"POSTROLL":e=this.getNpawReference().Constants.AdPosition.Postroll}else t.flags.isJoined?t.getPlayhead()>.1&&t.getPlayhead()<t.getDuration()?e=this.getNpawReference().Constants.AdPosition.Midroll:t.getPlayhead()>=t.getDuration()&&(e=this.getNpawReference().Constants.AdPosition.Postroll):e=this.getNpawReference().Constants.AdPosition.Preroll;return e}getResource(){var e;return this.player.ima3&&(e=this.player.ima3.currentAd.getMediaUrl()),e}getTitle(){var e;return this.player.ima3&&this.player.ima3.currentAd&&(e=this.player.ima3.currentAd.getTitle()),e}getPlayerVersion(){var e;return this.player.ima3&&(e=this.player.ima3.VERSION),e}getGivenBreaks(){var e;return this.player.ima3&&(e=this.player.ima3.adsManager.getCuePoints().length),e}getBreaksTime(){var e;if(this.player.ima3){var t=this.player.ima3.adsManager.getCuePoints();for(var i in t)(!t[i]&&0!==t[i]||-1===t[i])&&(t[i]=this.getVideo().getAdapter().getDuration());e=t}return e}getGivenAds(){var e;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getAdPodInfo()&&(e=this.player.ima3.currentAd.getAdPodInfo().getTotalAds()),e}
2getAudioEnabled(){return!this.player.muted()&&!!this.player.volume()}getIsSkippable(){var e=!1;return this.player.ima3&&(e=this.player.ima3.currentAd&&this.player.ima3.currentAd.isSkippable()),e}getIsFullscreen(){var e,t;return this.getPlugin().deviceDetector.isIphone()?e=!this.getPlugin().deviceDetector.isInBackground:(this.player.ima3&&(t=this.player.ima3.el),e=!!t&&window.innerHeight<=t.clientHeight+30&&window.innerWidth<=t.clientWidth+30),e}getIsVisible(){var e;return this.getPlugin().deviceDetector.isIphone()?e=!this.getPlugin().deviceDetector.isInBackground:this.player.ima3&&(e=this.getNpawUtils().calculateAdViewability(this.player.ima3.el)),e}getBitrate(){var e;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getVastMediaBitrate()&&(e=this.player.ima3.currentAd.getVastMediaBitrate(),this.lastBitrate=e),this.lastBitrate&&!e?this.lastBitrate:-1}getCreativeId(){var e;return this.player.ima3&&this.player.ima3.currentAd?e=this.player.ima3.currentAd.getCreativeAdId()||this.player.ima3.currentAd.getCreativeId():this.titles&&(e=this.titles[(this.getVideo().requestBuilder.lastSent.adNumber||1)-1]._creativeId),e}registerListeners(){if(this.monitorPlayhead(!0,!1),this.references={"ads-ad-started":this.startJoinListener.bind(this),"ima3-paused":this.pausedListener.bind(this),"ima3-resumed":this.resumedListener.bind(this),"ima3-complete":this.adEndedListener.bind(this),"ima3-skipped":this.skippedListener.bind(this),"ima3-ad-error":this.errorListener.bind(this),"ima3-first-quartile":this.firstQuartileListener.bind(this),"ima3-midpoint":this.secondQuartileListener.bind(this),"ima3-third-quartile":this.thirdQuartileListener.bind(this),"ads-pod-ended":this.podEndListener.bind(this),"ads-click":this.clickListener.bind(this),"ads-first-quartile":this.firstQuartileListener.bind(this),"ads-midpoint":this.secondQuartileListener.bind(this),"ads-third-quartile":this.thirdQuartileListener.bind(this)},this.player)for(var e in this.references)this.player.on(e,this.references[e])}startJoinListener(e){this.getVideo().getAdapter()&&this.getVideo().getAdapter().firePause(),this.fireStart(),this.fireJoin()}pausedListener(e){this.firePause()}resumedListener(e){this.fireResume()}skippedListener(e){this.fireSkip(),this.getVideo().getAdapter()&&this.getVideo().getAdapter().fireResume()}adEndedListener(e){var t=this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Preroll?0:this.getVideo().getAdapter().lastPlayhead;this.fireStop({playhead:t,adPlayhead:this.getDuration()}),this.lastBitrate=void 0}errorListener(e){if(this.player.ima3)if(e.getError&&e.getError()){var t=e.getError();this.fireError(t.getCode(),t.getMessage())}else this.fireError()}clickListener(e){var t;this.player.ima3&&(this.player.ima3.currentAd&&this.player.ima3.currentAd.g&&(t=this.player.ima3.currentAd.g.clickThroughUrl),this.fireClick(t))}firstQuartileListener(e){this.fireQuartile(1)}secondQuartileListener(e){this.fireQuartile(2)}thirdQuartileListener(e){this.fireQuartile(3)}podEndListener(e){this.fireBreakStop()}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}adPlayerErrorListener(e){var t=e.data.AdError;[1012,1005,301,402,302].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.NO_RESPONSE,t.getMessage()):[1007,1009,303].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.EMPTY,t.getMessage()):[403,100,503,101,102].indexOf(t.getErrorCode())>=0?this.fireManifest(youbora.Constants.ManifestError.WRONG,t.getMessage()):this.fireError(t.getErrorCode(),t.getMessage())}}class Ar{isUsed(){return!this.player.ima3&&this.player.ads}getVersion(){return"7.0.4-videojs-bcove-ads-jsclass"}getPlayhead(){if(this.player.ads.ad)return this.player.ads.ad.currentTime}getPosition(){switch(this.player.ads.pod.ads_pod_index){case 0:return this.getNpawReference().Constants.AdPosition.Preroll;case-1:return this.getNpawReference().Constants.AdPosition.Postroll}return this.getNpawReference().Constants.AdPosition.Midroll}
2getResource(){if(this.player.ads.currentSrc)return this.player.ads.currentSrc}getTitle(){if(this.player.ads.ad&&this.player.ads.ad.title)return this.player.ads.ad.title}getDuration(){if(this.player.ads.ad&&this.player.ads.ad.duration)return this.lastDuration=this.player.ads.ad.duration,this.lastDuration}getPlayerName(){return"bcove-ads"}getPlayerVersion(){return this.player.ads.VERSION}registerListeners(){for(var e in this.monitorPlayhead(!0,!1),this.references=[],this.references["ads-ad-started"]=this.adStartListener.bind(this),this.references["ads-pause"]=this.adPausedListener.bind(this),this.references["ads-play"]=this.adResumedListener.bind(this),this.references["ads-ad-ended"]=this.adEndedListener.bind(this),this.references["ima3-skipped"]=this.adSkippedListener.bind(this),this.references["ima3-ad-error"]=this.errorListener.bind(this),this.references.adserror=this.errorListener.bind(this),this.references["ads-click"]=this.clickListener.bind(this),this.references["ads-first-quartile"]=this.firstQuartileListener.bind(this),this.references["ads-midpoint"]=this.secondQuartileListener.bind(this),this.references["ads-third-quartile"]=this.thirdQuartileListener.bind(this),this.references)this.player.on(e,this.references[e])}firstQuartileListener(e){this.fireQuartile(1)}secondQuartileListener(e){this.fireQuartile(2)}thirdQuartileListener(e){this.fireQuartile(3)}adStartListener(e){this.getVideo().getAdapter()&&this.getVideo().getAdapter().firePause(),this.fireStart(),this.fireJoin()}adPausedListener(e){this.firePause()}adResumedListener(e){this.fireResume()}adEndedListener(e){this.fireStop({adPlayhead:this.lastDuration});const t=this.getVideo().getAdapter();t&&t.fireResume()}adSkippedListener(e){this.fireStop({skipped:!0});const t=this.getVideo().getAdapter();t&&t.fireResume()}errorListener(e){this.fireError("Ad error")}clickListener(e){var t=null;this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.g&&(t=this.player.ima3.currentAd.g.clickThroughUrl),this.fireClick({url:t})}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);this.references=[]}}}class wr{getPosition(){var e=this.getNpawReference().Constants.AdPosition,t=e.Midroll,i=this.getVideo();let n="";null!==this.player&&null!==this.player.ads&&null!==this.player.ads.currentAdBreak&&null!==this.player.ads.currentAdBreak.integration&&(n=this.player.ads.currentAdBreak.integration);const r="google-ima"===n;if(i){var s=i.getAdapter();if(s){const n=i.getPlayhead(),a=i.getDuration()||0;n<.1||!r&&!s.flags.isJoined?t=e.Preroll:(r&&n+1>=a||!r&&n+1+this.getDuration()>=a)&&(t=e.Postroll)}}return t}quartileListener(e){var t=this.getPlayhead()/this.duration;t>=.25&&(this.fireQuartile(1),t>=.5&&(this.fireQuartile(2),t>=.75&&this.fireQuartile(3)))}resumeAdListener(e){this.fireResume()}getIsVisible(){try{var e=this.player?this.player.element:null}catch(e){}return!!e&&this.getNpawUtils().calculateAdViewability(e)}skipAdListener(e){this.fireSkip()}_getCurrentAd(){var e=this.player.ads,t=null;return e&&(e.currentAds&&e.currentAds[0]?t=e.currentAds[0]:e&&e.currentAdBreak&&e.currentAdBreak.ads[this.adCount-1]&&(t=e.currentAdBreak.ads[this.adCount-1])),t}errorAdListener(e){this.fireError(),this.flags.isStarted||(this.adCount=(this.adCount||0)+1)}getGivenBreaks(){var e=null;return this.player.ads.scheduledAdBreaks&&(e=this.player.ads.scheduledAdBreaks.length||e),e}getIsSkippable(){var e=this._getCurrentAd();return!(!e||!e.skipOffset)&&e.skipOffset>=0}getIsFullscreen(){var e=!1;return this.player.element&&this.player.element.clientWidth&&this.player.element.clientHeight&&(e=window.innerHeight<=this.player.element.clientHeight+30&&window.innerWidth<=this.player.element.clientWidth+30),e}getVersion(){return"7.0.14-theoplayer2-ads-jsclass"}getAudioEnabled(){return!this.player.muted&&this.player.volume>0}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.player.ads&&this.references){for(var e in this.references)this.player.ads.removeEventListener(e,this.references[e]);delete this.references}if(this.player&&this.playerReferences){for(var t in this.playerReferences)this.player.removeEventListener(t,this.playerReferences[t]);delete this.playerReferences}}
2breakBeginListener(e){this.adCount=0,this.actualSlot=e.ad}registerListeners(){if(this.player.ads){for(var e in this.isDAI=!1,this.getNpawUtils().logAllEvents(this.player.ads),this.monitorPlayhead(!0,!1,2e3),this.references={adbegin:this.playAdListener.bind(this),adend:this.endedAdListener.bind(this),aderror:this.errorAdListener.bind(this),adskip:this.skipAdListener.bind(this),adbreakbegin:this.breakBeginListener.bind(this),adbreakend:this.breakEndListener.bind(this)},"undefined"!=typeof google&&google.ima.dai&&(this.isDAI=!0),this.playerReferences={pause:this.pauseAdListener.bind(this),playing:this.resumeAdListener.bind(this),play:this.resumeAdListener.bind(this),timeupdate:this.quartileListener.bind(this)},this.references)this.player.ads.addEventListener(e,this.references[e]);for(var t in this.playerReferences)this.player.addEventListener(t,this.playerReferences[t])}}getPlayhead(){let e=this.player.currentTime;return 1==this.isDAI&&(e=this.player.currentTime-this.playhead),e}getDuration(){var e=this._getCurrentAd();return e&&e.duration?e.duration:this.player.duration}pauseAdListener(e){this.firePause()}breakEndListener(e){this.fireBreakStop();const t=this.getVideo().getAdapter();t&&t.fireResume(),this.getVideo().requestBuilder.lastSent.givenAds=void 0;const i=this.getNpawReference().Constants.AdPosition.Postroll;this.getPosition()===i&&0===this.player.ads.scheduledAds.length&&this.getVideo().getAdapter().fireStop({},"breakEndListener")}getGivenAds(){return this.actualSlot?this.actualSlot.ads.length:null}endedAdListener(e){const t=this.getVideo().getAdapter();t&&!t.flags.isStarted&&this.fireStart(),this.fireStop({adPlayhead:this.duration})}getResource(){var e=null,t=this._getCurrentAd();return t&&(t.mediaUrl?e=t.mediaUrl:t.mediaFiles&&(e=t.mediaFiles[0].resourceURI||t.mediaFiles[0].contentURL)),e}getTitle(){var e=this._getCurrentAd();return e&&e.title?e.title:"unknown"}playAdListener(e){this.adCount=(this.adCount||0)+1;var t=this.getVideo().getAdapter();t&&(t.ended=!1,t.fireInit(),t.firePause()),this.fireStart({adPlayhead:"0"}),this.fireJoin({adPlayhead:"0"}),this.duration=this.getDuration(),this.playhead=this.player.currentTime}}class Pr{getVersion(){return"7.0.3-chromecast-caf-ads-js"}getPlayerName(){return"Chromecast CAF Ads"}getPlayhead(){return this.player.getBreakClipCurrentTimeSec()}getDuration(){return this.player.getBreakClipDurationSec()}getPosition(){var e=this.getNpawReference().Constants.AdPosition.Midroll,t=this.plugin.getAdapter();return t&&(!t.flags.isJoined||t.getPlayhead()<1?e=this.getNpawReference().Constants.AdPosition.Preroll:t.getPlayhead()+1>=t.getDuration()&&(e=this.getNpawReference().Constants.AdPosition.Postroll)),e}getTitle(){return"unknown"}getResource(){return"unknown"}getCreativeId(){return this.clipId}getIsVisible(){return!0}getIsFullscreen(){return!0}getIsSkippable(){return this.isSkippable}getGivenAds(){return this.adsInBreak}getBreaksTime(){var e=this.player.getBreaks(),t=[];for(var i in e){var n=e[i].position,r=this.plugin?this.plugin.getAdapter():null;-1===n&&r&&(n=r.getDuration()),-1===t.indexOf(n)&&t.push(n)}return t}getGivenBreaks(){var e=this.player.getBreaks(),t=[];for(var i in e){var n=e[i].position,r=this.plugin?this.plugin.getAdapter():null;-1===n&&r&&(n=r.getDuration()),-1===t.indexOf(n)&&t.push(n)}return t.length}registerListeners(){var e=cast.framework.events;for(var t in this.monitorPlayhead(!0,!1,1200),this.references={},this.references[e.EventType.BREAK_CLIP_LOADING]=this.playListener.bind(this),this.references[e.EventType.BREAK_CLIP_STARTED]=this.joinListener.bind(this),this.references[e.EventType.BREAK_CLIP_ENDED]=this.stopListener.bind(this),this.references[e.EventType.BREAK_STARTED]=this.breakStartListener.bind(this),this.references[e.EventType.BREAK_ENDED]=this.breakEndListener.bind(this),this.references[e.EventType.PAUSE]=this.pauseListener.bind(this),this.references[e.EventType.PLAYING]=this.playingListener.bind(this),this.references)this.player.addEventListener(t,this.references[t])}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.removeEventListener(e,this.references[e]);this.references={}}}playListener(e){var t=this.plugin.getAdapter();t&&(t.fireStart({},"playListener-ads"),t.firePause({},"playListener-ads")),void 0!==e?(this.isSkippable=void 0!==e.whenSkippable,this.clipId=e.breakClipId):(this.isSkippable=!1,this.clipId=null)}joinListener(e){this._quartileTimer||(this._quartileTimer=setInterval(this.sendQuartile.bind(this),1e3));var t=this.plugin?this.plugin.getAdapter():null;t&&t.firePause({},"joinListener-ads"),this.plugin&&this.plugin.isBreakStarted&&(this.fireStart({},"joinListener"),this.fireJoin({},"joinListener"))}breakStartListener(e){this.adsInBreak=e.total,this.fireBreakStart(),this._quartileTimer||(this._quartileTimer=setInterval(this.sendQuartile.bind(this),1e3)),this.fireStart({},"breakStartListener"),this.fireJoin({},"breakStartListener")}stopListener(e){this.fireStop({},"stopListener")}breakEndListener(e){this.adsInBreak=void 0,this.fireBreakStop();var t=this.plugin?this.plugin.getAdapter():null;t&&t.fireResume({},"endListener-ads")}sendQuartile(e){var t=this.getPlayhead(),i=this.getDuration();t>i/4&&(this.fireQuartile(1),t>i/2&&(this.fireQuartile(2),t>.75*i&&(this.fireQuartile(3),this._quartileTimer&&(clearInterval(this._quartileTimer),this._quartileTimer=void 0))))}pauseListener(e){this.flags.isBuffering||this.firePause({},"pauseListener")}playingListener(e){this.fireResume({},"playingListener")}}class Cr{getVersion(){return"7.0.1-react-native-video-ads-jsclass"}getDuration(){return this.duration||0}getResource(){return this.resource||"N/A"}getPlayhead(){const e=this.getVideo().getAdapter();return e?e.playhead:void 0}getTitle(){return this.title||"N/A"}getPosition(){var e=this.getNpawReference().Constants.AdPosition.Midroll;return this.getVideo().getAdapter()&&!this.getVideo().getAdapter().flags.isJoined&&(e=this.getNpawReference().Constants.AdPosition.Preroll),e}onAdEvent(e){switch(e.event){case"FIRST_QUARTILE":this._quartileHandler(1);break;case"MIDPOINT":this._quartileHandler(2);break;case"THIRD_QUARTILE":this._quartileHandler(3);break;case"STARTED":this.adStartedListener();break;case"COMPLETED":this.adCompleteListener();break;case"CLICK":this.adClickListener();break;case"PAUSED":this.adPauseListener();break;case"RESUMED":this.adPlayListener();break;case"ERROR":this.adErrorListener();break;case"SKIPPED":this.adSkippedListener();break;case"CONTENT_RESUME_REQUESTED":this.adBreakFinished();break;case"CONTENT_PAUSE_REQUESTED":const e=this.getVideo().getAdapter();e.flags.isPaused||(e.firePause(),e.lastPlayhead=e.getPlayhead()),this.showingAds=!0;break;case"ALL_ADS_COMPLETED":this.getVideo().getAdapter().reactPlatform&&"ios"===this.getVideo().getAdapter().reactPlatform&&this.getVideo().getAdapter().fireStop({},"onAdEvent")}}isShowingAds(){return this.showingAds}_quartileHandler(e){this.fireQuartile(e)}adStartedListener(e){this.getVideo().getAdapter()&&this.getVideo().getAdapter().stopTimer&&clearTimeout(this.getVideo().getAdapter().stopTimer),this.showingAds=!0,this.getVideo().getAdapter().cancelSeek(),this.fireStart({},"adStartListener"),this.fireJoin({},"adStartListener")}adPauseListener(e){this.firePause({},"adPauseListener")}adPlayListener(e){this.fireResume({},"adPlayListener")}adSkippedListener(e){this.fireSkip({},"adSkippedListener")}adCompleteListener(e){this.fireStop({},"adCompleteListener"),this.resetValues()}adClickListener(e){this.fireClick(this.clickThrough)}adBreakFinished(e){this.fireBreakStop({},"adBreakFinished"),this.showingAds=!1}adErrorListener(e){if(e.message){var t=e.message.toLowerCase();t.indexOf("ad tag empty")>-1?this.fireManifest(this.getNpawReference().Constants.ManifestError.EMPTY,e.message):t.indexOf("error loading ad tag")>-1||t.indexOf("invalid ad tag")>-1||t.indexOf("any valid ads")>-1?this.fireManifest(this.getNpawReference().Constants.ManifestError.WRONG,e.message):!e.adErrorCode||60006!==e.adErrorCode&&10403!==e.adErrorCode?(this.fireError(e.adErrorCode,e.message),this.fireStop(),this.resetValues(),t.indexOf("timeout")>-1&&this.fireBreakStop()):this.fireManifest(this.getNpawReference().Constants.ManifestError.WRONG,e.message)}}resetValues(){this.playhead=void 0,this.duration=void 0,this.position=void 0,this.resource=void 0,this.title=void 0,this.showingAds=!1}}const Lr={video:{Hlsjs:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.media)}catch(e){return!0}}getVersion(){return"7.0.6-hlsjs-jsclass"}getPlayhead(){var e=null;return this.getVideo()&&this.getVideo().isBreakStarted?this._lastPlayhead:(this.tag&&(e=this.tag.currentTime),e)}getPlayrate(){var e=null;return this.tag&&(e=this.tag.playbackRate),e}getDroppedFrames(){var e=null;return this.tag&&(e=this.tag.webkitDroppedFrameCount),e}getDuration(){var e=null;
2return this.tag&&!this.getIsLive()&&(e=this.tag.duration),e}getBitrate(){var e=null;return-1!==this.player.currentLevel&&this.player.levels[this.player.currentLevel]&&(e=this.player.levels[this.player.currentLevel].bitrate),e}getRendition(){var e=null;if(-1!==this.player.currentLevel){var t=this.player.levels[this.player.currentLevel];t&&(t.name?e=t.name:t.bitrate&&(e=this.getNpawUtils().buildRenditionString(t.width,t.height,t.bitrate)))}return e}getIsLive(){var e=null;return this.player.levels&&this.player.levels[this.player.currentLevel]&&(e=this.player.levels[this.player.currentLevel].details.live),e}getLatency(){var e=this.player.latency;return e?1e3*e:void 0}getResource(){return this.player.url}getPlayerVersion(){return"undefined"!=typeof Hls?Hls.version:"unknown"}getPlayerName(){return"Hls.js"}registerListeners(){if(this.mediaFound=!(!this.player||!this.player.media),this._lastPlayhead=0,this.mediaFound)for(var e in this.hlsReference||this.hlsMediaReference||(this.tag=this.player?this.player.media:null,this._registerHlsRef()),this.references={play:this.playListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),seeking:this.seekingListener.bind(this),error:this.errorListener.bind(this),ended:this.endedListener.bind(this),progress:this.progressListener.bind(this),waiting:this.bufferingListener.bind(this),timeupdate:this.timeupdateListener.bind(this)},this.player.on(Hls.Events.LEVEL_SWITCHED,this.detectQualityChange.bind(this)),this.references)this.tag.addEventListener(e,this.references[e]);else this._registerHlsRef()}detectQualityChange(e,t){let i;const n=this.player.levels[t.level];n&&(n.name?i=n.name:n.bitrate&&(i=this.getNpawUtils().buildRenditionString(n.width,n.height,n.bitrate))),i&&this.storeNewRendition(i)}_registerHlsRef(){this.hlsReference=this.hlsErrorListener.bind(this),this.hlsMediaReference=this.getTagListener.bind(this),this.player.on("hlsError",this.hlsReference,this),this.player.on("hlsMediaAttached",this.hlsMediaReference)}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&(this.hlsReference&&this.player.off("hlsError",this.hlsReference,this),this.hlsMediaReference&&this.player.off("hlsMediaAttached",this.hlsMediaReference),this.player.off(Hls.Events.LEVEL_SWITCHED,this.detectQualityChange.bind(this)),this.hlsReference=null,this.hlsMediaReference=null),this.tag&&this.references){for(var e in this.references)this.tag.removeEventListener(e,this.references[e]);delete this.references}}progressListener(e){this._lastPlayhead=this.getPlayhead(),this.flags.isStarted?!this.flags.isJoined&&this.getVideo().getIsLive()&&this.fireJoin({},"progressListener"):this.getPlayhead()>1&&(this.startedOnce||!this.getVideo().getIsLive())&&(this.fireStart({},"progressListener"),this.fireJoin({},"progressListener"))}timeupdateListener(e){this._lastPlayhead=this.getPlayhead(),this.flags.isStarted?!this.flags.isJoined&&this.getVideo().getIsLive()&&this.fireJoin({},"timeupdateListener"):this.getPlayhead()>1&&(this.startedOnce||!this.getVideo().getIsLive())&&(this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"))}playListener(e){this.fireStart({},"playListener"),this.startedOnce=!0}pauseListener(e){this.flags.isBuffering||(this.firePause({},"pauseListener"),this.pauseStamp=e.timeStamp)}playingListener(e){this.fireJoin({},"playingListener"),this.fireBufferEnd({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.fireResume({},"playingListener")}seekingListener(e){this.fireSeekBegin({},!1,"seekingListener")}bufferingListener(e){this.tag&&2!==this.tag.readyState||this.fireBufferBegin({},!1,"bufferingListener")}errorListener(e){this.fireError(this.tag.error.code,"PLAY FAILURE",void 0,void 0,"errorListener")}endedListener(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),i||this.fireStop({},"endedListener")}hlsErrorListener(e,t){t.fatal&&this.fireFatalError(t.details,"PLAYER FAILURE",void 0,void 0,"hlsErrorListener")}getTagListener(){this.tag=this.player?this.player.media:null,this.mediaFound=!0,this.registerListeners()}},Bitmovin:class{adsAdapters={nativeAdsAdapter:or};getVersion(){return"7.0.11-bitmovin8-jsclass"}getPlayhead(){let e=this.player?this.player.getCurrentTime():null;return this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().flags.isStarted&&(e=this.lastPlayhead||0),e}getPlayrate(){return this.player?this.player.getPlaybackSpeed():null}getStopParams(){let e={};return this.getVideo().getPlayhead()>0&&(e={playhead:this.getVideo().getPlayhead()}),e}getDroppedFrames(){return this.player?this.player.getDroppedVideoFrames():null}getDuration(){let e=null;return this.player&&(this.lastDuration=this.player.getDuration()||this.lastDuration,e=this.lastDuration),e}getBitrate(){let e=null;if(this.player){const t=this.player.getPlaybackVideoData(),i=this.player.getVideoQuality();i&&i.bitrate?e=i.bitrate:t&&t.bitrate&&(e=t.bitrate)}return e}getRendition(){let e=null;if(this.player){const t=this.player.getPlaybackVideoData(),i=this.player.getVideoQuality();i&&i.bitrate?e=this.getNpawUtils().buildRenditionString(i.width,i.height,i.bitrate):t&&t.bitrate&&(e=this.getNpawUtils().buildRenditionString(t.width,t.height,t.bitrate))}return e}detectQualityChange(e){let t;e.targetQuality&&e.targetQuality.bitrate&&(t=this.getNpawUtils().buildRenditionString(e.targetQuality.width,e.targetQuality.height,e.targetQuality.bitrate)),t&&this.storeNewRendition&&this.storeNewRendition(t)}getTitle(){return this.player?this.player.getSource().title:null}getIsLive(){return this.player?this.player.isLive():null}getResource(){let e=null;if(this.player&&this.player.getSource&&this.player.getSource()){try{if(this.player.getStreamType&&this.player.getStreamType()&&this.player.getSource()[this.player.getStreamType()])return this.player.getSource()[this.player.getStreamType()]}catch(e){}e=this.player.getSource().progressive||this.player.getSource().hls}try{this.player&&this.player.getManifest&&this.player.getManifest()&&
2(e=this.player.getManifest().indexOf("MPD")>0?this.player.getSource().dash:this.player.getSource().hls)}catch(e){this.log.notice("Can't get manifest")}return e}getPlayerVersion(){return this.player?this.player.version:null}getPlayerName(){return"Bitmovin"}checkExistsPlayer(){try{return!!(this.player&&this.player.exports&&this.player.exports.PlayerEvent)}catch(e){return!1}}_checkAdsAdapter(){const e=this.getVideo().getAdsAdapter();e?e&&!e.player&&e.setPlayer(this.player):(this.plugin.setAdsAdapter(this.getAdapterClass("nativeAdsAdapter"),this.getVideo().getVideoKey()),this.getVideo().getAdsAdapter().registerListeners())}registerListeners(){if(!this.player||!this.player.exports||!this.player.exports.PlayerEvent)return this._registerRetryCount=(this._registerRetryCount||0)+1,void(this._registerRetryCount<50?setTimeout((()=>this.registerListeners()),100):this.log&&"function"==typeof this.log.warn&&this.log.warn("BitmovinAdapter","Player not ready after maximum retries. Skipping listener registration."));const e=this.player.exports.PlayerEvent;this.references={},this.references[e.Play]=this.playListener.bind(this),this.references[e.Paused]=this.pauseListener.bind(this),this.references[e.Playing]=this.playingListener.bind(this),this.references[e.Error]=this.errorListener.bind(this),this.references[e.Seek]=this.seekingListener.bind(this),this.references[e.TimeShift]=this.seekingListener.bind(this),this.references[e.TimeShifted]=this.seekedListener.bind(this),this.references[e.PlaybackFinished]=this.endedListener.bind(this),this.references[e.TimeChanged]=this.timeupdateListener.bind(this),this.references[e.SourceUnloaded]=this.endedListener.bind(this),this.references[e.Destroy]=this.destroyListener.bind(this),this.references[e.Ready]=this.readyListener.bind(this),this.references[e.AdBreakStarted]=this._checkAdsAdapter.bind(this),this.references[e.VideoPlaybackQualityChanged]=this.detectQualityChange.bind(this),this.references[e.StallStarted]=this.stallStartedListener.bind(this),this.references[e.StallEnded]=this.stallEndedListener.bind(this);for(let e in this.references)this.player.on(e,this.references[e]);this.plugin.setAdsAdapter(this.getAdapterClass("nativeAdsAdapter"),this.getVideo().getVideoKey()),this.getVideo().getAdsAdapter().registerListeners()}unregisterListeners(){try{if(this.getVideo()&&this.getVideo().removeAdsAdapter(),this.player&&this.player.off&&this.references){for(let e in this.references)this.player.off(e,this.references[e]);delete this.references}}catch(e){}}readyListener(e){this._checkAdsAdapter()}playListener(e){this.firePlayerLog("playListener",{}),this.lastPlayhead=0,this.fireStart(),this.failedView=!1}timeupdateListener(e){const t=this.lastPlayhead;if(this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().flags.isStarted||(this.lastPlayhead=this.player.getCurrentTime()),this.getPlayhead()>.2&&(this.getIsLive()||this.getPlayhead()+1<this.getDuration())&&(this.fireStart(),this.failedView=!1,this.flags.isJoined||this.fireJoin()),!this.player.isPaused()&&this.flags.isSeeking)if(this.plugin&&this.plugin.options&&this.plugin.options.ignoreSeekInTimeUpdate){const e=this.player.getCurrentTime();if(null!==this.seekStartPosition){const i=Math.abs(e-this.seekStartPosition),n=Math.abs(this.lastPlayhead-t),r=.25;i>r||n>r?(this.fireSeekEnd({},"timeupdateListener"),this.seekStartPosition=null):this.cancelSeek()}}else this.fireSeekEnd({},"timeupdateListener")}pauseListener(e){this.firePlayerLog("pauseListener",{}),e.issuer&&"ui-seek"===e.issuer?this.fireSeekBegin({},!1,"pauseListener"):this.firePause()}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireStart(),this.failedView=!1,this.fireResume()}errorListener(e){this.firePlayerLog("errorListener",{}),this.failedView||(this.flags.isStarted||(this.failedView=!0),this.fireError(e.code,e.name),this.fireStop(this.getStopParams()))}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.seekStartPosition=e.position??this.player.getCurrentTime(),this.fireSeekBegin({},!1,"seekingListener")}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}endedListener(e){this.firePlayerLog("endedListener",{}),this.fireStop(this.getStopParams())}stallStartedListener(e){this.firePlayerLog("stallStartedListener",{}),this.fireBufferBegin({},!1,"stallStartedListener")}stallEndedListener(e){this.firePlayerLog("stallEndedListener",{}),this.chronos&&this.chronos.buffer&&this.chronos.buffer.getDeltaTime(!1)<50?this.cancelBuffer():this.fireBufferEnd({},"stallEndedListener")}destroyListener(e){this.player=null,this.tag=null,this.fireStop(),this.getVideo().removeAdapter()}getVideoBufferLength(){return this.player?this.player.getVideoBufferLength():null}},Videojs:class{adsAdapters={bcoveImaAdsAdapter:gr,genericAdsAdapter:fr};additionalContexts={contribHlsTech:pr,dashTech:hr,dashShakaTech:cr,hlsJsTech:dr,streamrootHlsJsTech:ur,shakaTech:lr};isInAds(e=!1){try{const t=this.getVideo().getAdsAdapter();return e&&t&&void 0!==t.isDAI&&!t.isDAI?t.player.getCuePoints().includes(-1):this.player.ads&&this.player.ads.inAdBreak&&"function"==typeof this.player.ads.inAdBreak&&this.player.ads.inAdBreak()}catch(e){return!1}}getBitrate(){let e=null;const t=this.getUsedTech();return t&&t.getBitrate&&(e=t.getBitrate(this)),e}checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.el(
2))}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}bufferingListener(e){this.firePlayerLog("bufferingListener",{}),this.flags.isSeeking||this.fireBufferBegin({},!1,"bufferingListener")}getRendition(){let e=null;const t=this.getUsedTech();return t&&t.getRendition?e=t.getRendition(this):this.player.videoHeight()&&this.player.videoWidth()&&(e=this.getNpawUtils().buildRenditionString(this.player.videoHeight(),this.player.videoWidth())),e}getPlayerVersion(){let e=null;return"undefined"!=typeof videojs&&(e=videojs.VERSION),e}playListener(e){this.firePlayerLog("playListener",{}),this.isInAds()||(this.flags.isStarted?this.lastSrc&&this.lastSrc!==this.getResource()&&(this.fireStop({},"playListenerNewResource"),this.acumBytesFunc(),this.lastPlayhead=void 0,this._startEvent("playListenerNewResource"),this.lastSrc=this.getResource()):(this.lastSrc=this.getResource(),this._startEvent("playListenerNotStarted")))}loadAdsAdapter(){if(this.getVideo())if(!this.getVideo().getAdsAdapter()||this.getVideo().getAdsAdapter().isGeneric){let e=null;this.getAdapterClass("bcoveImaAdsAdapter").isUsed(this)?e=this.getAdapterClass("bcoveImaAdsAdapter"):null===this.getVideo().getAdsAdapter()&&(e=this.getAdapterClass("genericAdsAdapter"),e.initProperties()),e&&this.getVideo().setAdsAdapter(e,this.plugin,!0)}else this.getVideo().getAdsAdapter().registerImaEvents&&this.getVideo().getAdsAdapter().registerImaEvents()}errorModifyer(e,t,i){this.fatalList=e||[],this.nonFatalList=t||[],this.ignoreList=i||[]}getPlayrate(){return this.player.playbackRate()}timeupdateListener(e){this.isInAds()||(this.getPlayhead()>.1&&(this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),!this.flags.isPaused&&this.lastSeekPlayhead&&this.lastSeekPlayhead!==this.getPlayhead()&&(this.fireSeekEnd({},"timeupdateListener"),this.lastSeekPlayhead=!1)),this.flags.isJoined||(void 0===this.lastPlayhead&&(this.lastPlayhead=this.getPlayhead()),this.lastPlayhead!==this.getPlayhead()&&(this.player.options_&&this.plugin&&!this.getVideo().options["content.id"]&&(this.getVideo().options["content.id"]=this.player.options_["data-video-id"]),this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),this.lastPlayhead=void 0)),this.getVideo()._adsAdapter&&!this.getVideo()._adsAdapter.flags.isStarted&&(this.lastPlayhead=this.getPlayhead()))}getPlayhead(){let e=this.player.currentTime();return this.getVideo()._adsAdapter&&this.getVideo()._adsAdapter.flags.isStarted&&(e=this.lastPlayhead||e),e}getDuration(){var e=this.player.duration();return this.player.mediainfo&&void 0!==this.player.mediainfo.duration&&(e=this.player.mediainfo.duration),e}aderrorListener(e){this.loadAdsAdapter(),this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().adPlayerErrorListener&&this.getVideo().getAdsAdapter().adPlayerErrorListener(e)}_jointimePolling(e){this.getVideo()?this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().flags.isStarted||(0!==this.lastPlayhead&&"number"==typeof this.lastPlayhead&&this.lastPlayhead!==this.getPlayhead()&&(this.fireJoin({},"jointimePolling"),this.joinPolling&&this.joinPolling.stop()),this.lastPlayhead=this.getPlayhead()):this.joinPolling&&this.joinPolling.stop()}acumBytesFunc(){this.acumBytes+=this.getTotalBytes()||0}adsEndedListener(e){this.firePlayerLog("adsEndedListener",{}),this.adsEnded=!0,this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Postroll&&(this.getVideo().getAdapter().fireStop({},"adsEndedListener"),this.acumBytesFunc(),this.lastPlayhead=void 0)}getVersion(){return"7.0.11-videojs-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.flags.isPaused||this.fireSeekEnd({},"seekedListener"),this.lastSeekPlayhead=this.getPlayhead()}getTech(){return this.player.tech({IWillNotUseThisInPlugins:!0})}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){try{for(var e in this.references)this.player.off(e,this.references[e])}catch(e){}delete this.references}}_startEvent(e){this.loadAdsAdapter(),this.player.options_&&this.plugin&&!this.plugin.options["content.id"]&&(this.plugin.options["content.id"]=this.player.options_["data-vi
2deo-id"]),this.fireStart({},e),this.flags.isJoined||(this.joinPolling||(this.joinPolling=new(this.getNpawReference().Timer)(this._jointimePolling.bind(this),500)),this.joinPolling.start())}getIsLive(){var e=null;if(this.player.mediainfo&&(e=!0,"number"==typeof this.player.mediainfo.duration&&(e=this.player.mediainfo.duration<1||this.player.mediainfo.duration===1/0)),this.player.duration&&"function"==typeof this.player.duration){e=!0;var t=this.player.duration();"number"==typeof t&&(e=t<1||t===1/0)}return this.player.isLive&&"function"===this.player.isLive&&(e=this.player.isLive()),e}conditionalStop(e){this.firePlayerLog("conditionalStop",{}),this.isInAds(!0)||this.plugin&&(this.adsEnded=!1,this.fireStop({},"conditionalStop"),this.plugin&&!this.getVideo().options["content.id"]&&(this.getVideo().options["content.id"]=null),this.acumBytesFunc(),this.lastPlayhead=void 0)}getTitle(){var e=null;return this.player.mediainfo&&(e=this.player.mediainfo.name),e}getTotalBytes(){var e=null,t=this.getUsedTech();return t&&t.getTotalBytes&&(e=t.getTotalBytes(this)),e}registerListeners(){if(this.monitorPlayhead(!1,!1,1200),this.acumBytes=0,this.ignoreList=[],this.fatalList=[],this.nonFatalList=[],this.references={loadstart:this.loadstartListener.bind(this),adsready:this.loadAdsAdapter.bind(this),play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),ended:this.conditionalStop.bind(this),dispose:this.disposeListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),error:this.errorListener.bind(this),adserror:this.aderrorListener.bind(this),adsEnded:this.adsEndedListener.bind(this),texttrackchange:this.textListener.bind(this),waiting:this.bufferingListener.bind(this)},this.player)for(var e in this.references)this.player.on(e,this.references[e]);setTimeout(this.loadAdsAdapter.bind(this),50)}getResource(){var e=null,t=this.getUsedTech();return t&&t.getResource&&(e=t.getResource(this)),e||(e=this.player.currentSrc()),e}textListener(e){if(this.player.textTracks)for(var t=this.player.textTracks(),i=t.length,n=0;n<i;++n)t[n]&&"showing"===t[n].mode&&(this.getVideo().options["content.subtitles"]=t[n].label||t[n].language)}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}disposeListener(e){this.firePlayerLog("disposeListener",{}),this.plugin&&(this.getVideo().fireStop({},"disposeListener"),this.getVideo().removeAdsAdapter(),this.getVideo().removeAdapter())}loadstartListener(e){this.firePlayerLog("loadstartListener",{}),this.loadAdsAdapter()}getPlayerName(){var e="videojs";return this.getAdapterClass("contribHlsTech").isUsed(this)?e+="-hls":this.getAdapterClass("hlsJsTech").isUsed(this)?e+="-hlsjs":this.getAdapterClass("shakaTech").isUsed(this)?e+="-shaka":this.getAdapterClass("dashShakaTech").isUsed(this)?e+="-dash-shaka":this.getAdapterClass("dashTech").isUsed(this)&&(e+="-dash"),this.player.FreeWheelPlugin&&(e+="-fw"),this.player.mediainfo&&(e+="-bcove"),e}playingListener(e){this.firePlayerLog("playingListener",{}),this._startEvent("playingListener"),this.isInAds()||this.flags.isAdPaused||this.fireResume({},"playingListener"),this.getPlayhead()<1&&this.fireSeekEnd({},"playingListener"),this.fireBufferEnd({},"playingListener")}getUsedTech(){var e=null;if(this.getPlugin().getAdaptersProperties().usedTech){switch(this.getPlugin().getAdaptersProperties().usedTech.toLowerCase()){case"hls":this.getAdapterClass("contribHlsTech").isUsed(this)&&(e=this.getAdapterClass("contribHlsTech"));break;case"hlsjs":this.getAdapterClass("hlsJsTech").isUsed(this)&&(e=this.getAdapterClass("hlsJsTech"));break;case"shaka":this.getAdapterClass("shakaTech").isUsed(this)&&(e=this.getAdapterClass("shakaTech"));break;case"dashshaka":this.getAdapterClass("dashShakaTech").isUsed(this)&&(e=this.getAdapterClass("dashShakaTech"));break;case"streamrootHlsJsTech":this.getAdapterClass("streamrootHlsJsTech").isUsed(this)&&(e=this.getAdapterClass("streamrootHlsJsTech"));break;case"dash":this.getAdapterClass("dashTech").isUsed(this)&&(e=this.getAdapterClass("dashTech"))}if(null!=e)return e}return this.getAdapterClass("contribHlsTech").isUsed(this)?e=this.getAdapterClass("contribHlsTech"):this.getAdapterClass("hlsJsTech").isUsed(this)?e=this.getAdapterClass("hlsJsTech"):this.getAdapterClass("shakaTech").isUsed(this)?e=this.getAdapterClass("shakaTech"):this.getAdapterClass("dashShakaTech").isUsed(this)?e=this.getAdapterClass("dashShakaTech"):this.getAdapterClass("dashTech").isUsed(this)?e=this.getAdapterClass("dashTech"):this.getAdapterClass("streamrootHlsJsTech").isUsed(this)&&(e=this.getAdapterClass("streamrootHlsJsTech")),e}errorListener(e){this.firePlayerLog("errorListener",{});var t=!1,i=!1,n=null,r=null;
2this.player.error&&this.player.error()&&(n=Number(this.player.error().code),r=this.player.error().message),null!==n&&(this.ignoreList.includes(n)&&(t=!0),!i&&this.fatalList.includes(n)?i=!0:i&&this.nonFatalList.includes(n)&&(i=!1)),t||(i?(this.fireFatalError(n,r,void 0,void 0,"errorListener"),this.acumBytesFunc(),this.lastPlayhead=void 0,this.crashed=!0):this.fireError(n,r,void 0,void 0,"errorListener"))}},Shaka:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this._getTagFromPlayer())}catch(e){return!0}}getBitrate(){var e=this.player.getStats(),t=null;return void 0!==e.streamBandwidth&&(t=e.streamBandwidth),void 0!==e.streamStats&&(t=e.streamStats.videoBandwidth),t}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}bufferingListener(e){var t=this.tag||this._getTagFromPlayer(),i=this.flags.isSeeking||t&&t.seeking;this.firePlayerLog("bufferingListener-"+e.buffering+" isSeeking:"+i,{}),this.flags.isJoined?!0===e.buffering?i?this._bufferStartTime||(this._bufferStartTime=Date.now()):this.fireBufferBegin({},!1,"bufferingListenerEnabled"):!1===e.buffering&&(i?(this._seekDelayTimeout&&(clearTimeout(this._seekDelayTimeout),this._seekDelayTimeout=null),this._isInSeekSequence||(this.fireSeekBegin({},!1,"bufferingSeekBegin"),this._isInSeekSequence=!0,this._seekStartTime=Date.now()),this._bufferStartTime&&(this._accumulatedBufferDuration=(this._accumulatedBufferDuration||0)+(Date.now()-this._bufferStartTime),this._bufferStartTime=null),this._seekDelayTimeout=setTimeout(function(){var e=Date.now()-this._seekStartTime+(this._accumulatedBufferDuration||0);this.fireSeekEnd({seekDuration:e},"delayedSeekEndWithBuffer"),this._isInSeekSequence=!1,this._seekDelayTimeout=null,this._accumulatedBufferDuration=0,this._seekStartTime=null}.bind(this),2e3),this.cancelBuffer()):this.fireBufferEnd({},"bufferingListenerDisabled")):!0===e.buffering?this.fireBufferBegin({},!1,"bufferingListenerEnabled"):!1===e.buffering&&this.fireJoin({},"bufferingListenerNotJoined")}getLatency(){var e=this.player.getStats().liveLatency;return e?1e3*e:void 0}getRendition(){var e=this._getActiveTrack();return e?this.getNpawUtils().buildRenditionString(e.width,e.height,e.bandwidth):null}getPlayerVersion(){var e=null;return"undefined"!=typeof shaka&&(shaka.Player&&(e=shaka.Player.version),shaka.player&&(e=shaka.player.Player.version)),e}playListener(e){this.firePlayerLog("playListener",{}),this._callStart("playListener")}endedListener(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),i||(this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener"),this.bytes=0,this.supportBytes=!1)}getPlayrate(){return"function"==typeof this.player.getPlaybackRate&&this.player.getPlaybackRate()||1}timeupdateListener(e){this.getPlayhead()!==this.initialPlayhead&&"number"==typeof this.initialPlayhead?this._callStart("timeupdateListener"):this.initialPlayhead=this.getPlayhead()}getPlayhead(){var e=this.tag||this._getTagFromPlayer();return e?e.currentTime:null}getDuration(){var e=this.tag||this._getTagFromPlayer();return e?e.duration:null}getFramesPerSecond(){var e=this._getActiveTrack();return e?e.frameRate:null}getThroughput(){return this.player.getStats().estimatedBandwidth}getDroppedFrames(){return this.player.getStats().droppedFrames}supportTotalBytes(){return this.supportBytes}getTotalBytes(){return this.bytes}_registerTag(){if(this.tag=this.tag||this._getTagFromPlayer(),this.tag)for(var e in this.references)this.tag.addEventListener(e,this.references[e]);else setTimeout(this._registerTag.bind(this),50)}getVersion(){return"7.0.6-shaka-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.isPlayerOnBuffering()&&this.existPlayerBufferingMethod||(this.flags.isBuffering?this.fireBufferEnd({},"seekedListener"):this.flags.isSeeking&&!this._seekDelayTimeout&&(this.fireSeekEnd({},"seekedListener"),this._isInSeekSequence=!1))}unregisterListeners(){this.bytes=0,this.supportBytes=!1,this.monitor&&this.monitor.stop();const e=this.tag||this._getTagFromPlayer();if(e&&this.references){for(const t in this.references)e.removeEventListener(t,this.references[t]);delete this.references}if(this.player&&this.referencesPlayer){for(const e in this.referencesPlayer)this.player.removeEventListener(e,this.referencesPlayer[e]);delete this.referencesPlayer}}getIsLive(){return!!this.player.isLive()||!this.getDuration()}_callStart(e){this.flags.isStarted||(this.fireStart({},e),this.initialPlayhead=this.getPlayhead()),this._initialPlayheadChanged()&&(this.fireJoin({},e),this.initialPlayhead=this.getPlayhead())}getTitle(){var e=this.tag||this._getTagFromPlayer();return e?e.title:null}
2networkResponseFilter(e,t){try{if(e!=shaka.net.NetworkingEngine.RequestType.SEGMENT)return;t&&t.data&&(this.bytes+=t.data.byteLength)}catch(e){}}registerListeners(){for(var e in this.bytes=0,this.supportBytes=!1,this.existPlayerBufferingMethod=this.player.isBuffering&&"function"==typeof this.player.isBuffering,this.monitorPlayhead(!1,!0),this.references={play:this.playListener.bind(this),loadstart:this.autoplayListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),ended:this.endedListener.bind(this),timeupdate:this.timeupdateListener.bind(this)},this.referencesPlayer={error:this.errorListener.bind(this),buffering:this.bufferingListener.bind(this),loading:this.loadingListener.bind(this)},this.tag=null,this._registerTag(),this.referencesPlayer)this.player.addEventListener(e,this.referencesPlayer[e]);this.player&&this.player.getNetworkingEngine&&"function"==typeof this.player.getNetworkingEngine&&this.player.getNetworkingEngine().registerResponseFilter&&"function"==typeof this.player.getNetworkingEngine().registerResponseFilter&&(this.supportBytes=!0,this.player.getNetworkingEngine().registerResponseFilter(this.networkResponseFilter.bind(this)))}getResource(){var e=this.tag||this._getTagFromPlayer(),t=e?e.currentSrc:null;return this.player.getAssetUri&&this.player.getAssetUri()?t=this.player.getAssetUri():this.player.getManifestUri&&this.player.getManifestUri()&&(t=this.player.getManifestUri()),t}_initialPlayheadChanged(){var e=!1;if(!this.flags.isJoined){var t=this.getPlayhead(),i=this.initialPlayhead||0,n=this.getVideo()?this.getVideo().getIsLive():this.getIsLive();(0!==i&&n||!n)&&t>i?e=!0:n&&(this.initialPlayhead=t)}return e}seekingListener(e){this.firePlayerLog("seekingListener",{}),this._seekDelayTimeout&&(clearTimeout(this._seekDelayTimeout),this._seekDelayTimeout=null),this._isInSeekSequence||(this.fireSeekBegin({},!1,"seekingListener"),this._isInSeekSequence=!0),this.getVideo()&&this.getVideo().getIsLive()&&this.autoplayListener()}_getActiveTrack(){var e=null;if(this.player.getVariantTracks){var t=this.player.getVariantTracks();for(var i in t){var n=t[i];!n.active||"video"!==n.type&&"variant"!==n.type||(e=n)}}else if(this.player.getVideoTracks){var r=this.player.getVideoTracks();for(var s in r){var a=r[s];a.active&&(e=a)}}return e}getPlayerName(){return"Shaka"}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireResume({},"playingListener"),this._callStart("playingListener"),this.isPlayerOnBuffering()&&this.existPlayerBufferingMethod||this.fireJoin({},"playingListener")}isPlayerOnBuffering(){return!!this.existPlayerBufferingMethod&&this.player.isBuffering()}loadingListener(e){this.firePlayerLog("loadingListener",{}),this.flags.isStarted&&(this.fireStop({},"loadingListener"),this.bytes=0,this.supportBytes=!1)}autoplayListener(e){this.firePlayerLog("autoplayListener",{});var t=this.tag||this._getTagFromPlayer();t&&t.autoplay&&this._callStart("autoplayListener")}errorListener(e){this.firePlayerLog("errorListener",{});var t=e.detail&&e.detail.code?e.detail.code:e.code,i=e.detail&&e.detail.message?e.detail.message:"unknown",n=e.detail&&e.detail.category?e.detail.category:e.category,r=e.detail&&e.detail.severity?e.detail.severity:e.severity;n&&n<10&&n>0&&(i={1:"network",2:"text",3:"media",4:"manifest",5:"streaming",6:"drm",7:"player",8:"cast",9:"storage"}[n]||i),2===r&&-1===[1002,3016].indexOf(t)?this.fireFatalError(t,i,void 0,void 0,"errorListener"):this.fireError(t,i,void 0,void 0,"errorListener")}_getTagFromPlayer(){return this.player.getMediaElement?this.player.getMediaElement():this.player.a}},Html5:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player)}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}bufferingListener(e){this.firePlayerLog("waitingListener",{}),this.fireBufferBegin({},!1,"waitingListener")}getIsLive(){return this.player.duration===1/0}playListener(e){this.firePlayerLog("playListener",{}),this.player&&this.playhead&&this.checkReadyState(this.player.readyState,"playListener"),(void 0===this.lastResource||this.getResource()&&this.lastResource!==this.getResource())&&(this.lastResource=this.getResource().split("?")[0]),this.fireStart({},"playListener")}registerListeners(){for(var e in this.monitorPlayhead(!1,!1),this.references={play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),ended:this.endedListener.bind(this),loadstart:this.loadStartListener.bind(this),waiting:this.bufferingListener.bind(this),canplay:this.canPlayListener.bind(this),canplaythrough:this.canPlayThroughListener.bind(this),loadedmetadata:this.loadedMetadataListener.bind(this),loadeddata:this.loadedDataListener.bind(this)},this.references)this.player.addEventListener(e,this.references[e])}endedListener(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),i||(this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener"))}getPlayrate(){return this.player.playbackRate}getDroppedFrames(){return"function"==typeof this.player.getVideoPlaybackQuality?this.player.getVideoPlaybackQuality().droppedVideoFrames:null}canPlayListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayListener")}canPlayThroughListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayThroughListener")}timeupdateListener(e){(this.getPlayhead()>0||this.getVideo()&&this.getVideo().getIsLive())&&!this.player.error&&(this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"))}getResource(){return this.player.currentSrc}getPlayhead(){return this.player.currentTime}getDuration(){return this.player.duration}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}getPlayerName(){return"html5"}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireJoin({},"playingListener"),this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.flags.isBuffering&&this.fireBufferEnd({},"playingListener")}errorListener(e){this.firePlayerLog("errorListener",{});var t=null,i=null;try{e&&e.target&&e.target.error&&(i=e.target.error.code,t=e.target.error.message)}catch(e){}this.fireError(i,t,void 0,void 0,"errorListener")}loadedMetadataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedMetadataListener")}getVersion(){return"7.0.6-html5-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}loadStartListener(e){this.firePlayerLog("loadStartListener",{}),this.flags.isJoined&&this.getResource()&&this.getResource().split("?")[0]!==this.lastResource&&this.fireStop({},"loadStartListener")}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references)for(var e in this.references)this.player.removeEventListener(e,this.references[e]),delete this.references[e]}loadedDataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedDataListener")}},Flvjs:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player)}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}stalledListener(e){this.firePlayerLog("stalledListener",{}),this.fireBufferBegin({},!1,"stalledListener")}bufferingListener(e){this.firePlayerLog("waitingListener",{}),this.fireBufferBegin({},!1,"waitingListener")}getIsLive(){return this.player.duration===1/0}playListener(e){this.firePlayerLog("playListener",{}),this.player&&this.playhead&&this.checkReadyState(this.player.readyState,"playListener"),this.fireStart({},"playListener")}registerListeners(){for(var e in this.monitorPlayhead(!1,!1),this.references={play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),ended:this.endedListener.bind(this),loadstart:this.loadStartListener.bind(this),stalled:this.stalledListener.bind(this),waiting:this.bufferingListener.bind(this),canplay:this.canPlayListener.bind(this),canplaythrough:this.canPlayThroughListener.bind(this),loadedmediadata:this.loadedMediaDataListener.bind(this),loadeddata:this.loadedDataListener.bind(this)},this.references)this.player.addEventListener(e,this.references[e])}endedListener(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),i||(this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener"))}getPlayrate(){return this.player.playbackRate}canPlayListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayListener")}canPlayThroughListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayThroughListener")}timeupdateListener(e){(this.getPlayhead()>0||this.getVideo()&&this.getVideo().getIsLive())&&!this.player.error&&(this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"))}getResource(){return this.player.currentSrc}getPlayhead(){return this.player.currentTime}getDuration(){return this.player.duration}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}getPlayerName(){return"flvjs"}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireJoin({},"playingListener"),this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.flags.isBuffering&&this.fireBufferEnd({},"playingListener")}errorListener(e){this.firePlayerLog("errorListener",{});var t=null,i=null;try{e&&e.target&&e.target.error&&(i=e.target.error.code,t=e.target.error.message)}catch(e){}this.fireError(i,t,void 0,void 0,"errorListener")}loadedMediaDataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedMediaDataListener")}getVersion(){return"7.0.3-flvjs-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}loadStartListener(e){this.firePlayerLog("loadStartListener",{}),this.flags.isJoined&&this.fireStop({},"loadStartListener")}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references)for(var e in this.references)this.player.removeEventListener(e,this.references[e]),delete this.references[e]}loadedDataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedDataListener")}},Jwplayer:class{adsAdapters={genericAdsAdapter:mr};getVersion(){return"7.0.3-jwplayer-jsclass"}checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.getConfig().mediaElement)}catch(e){return!0}}getPlayhead(){if(this.getVideo()&&this.getVideo().isBreakStarted)return this._lastPlayhead;var e=this.player.getPosition();return e&&e<0&&(e=Math.abs(e),this.monitor&&this.monitor.stop()),e}getPlayrate(){var e=1;return this.tag&&this.tag.playbackRate?e=this.tag.playbackRate:this.player.getPlaybackRate&&(e=this.player.getPlaybackRate()),e}getDuration(){return this.duration||this.player.getDuration()||null}getBitrate(){var e=-1,t=this.player.getVisualQuality();return"number"==typeof this.player.getCurrentQuality()&&this.player.getQualityLevels()&&-1!==this.player.getCurrentQuality()&&(t=this.player.getQualityLevels()[this.player.getCurrentQuality()])&&t.bitrate&&(e=t.bitrate),t=this.player.getVisualQuality(),e<=0&&t&&t.bitrate?e=t.bitrate:e<=0&&t&&t.level&&t.level.bitrate&&(e=t.level.bitrate),e}getRendition(){var e=null,t=this.player.getVisualQuality();return t&&null!==t&&t.level?e=this.getNpawUtils().buildRenditionString(t.level.width,t.level.height,t.level.bitrate||0):"number"==typeof this.player.getCurrentQuality()&&this.player.getQualityLevels()&&-1!==this.player.getCurrentQuality()&&((t=this.player.getQualityLevels()[this.player.getCurrentQuality()])&&"auto"===t.label?e=this.getNpawUtils().buildRenditionString(t.bandwidth):t&&t.label?e=t.label:-1===this.player.getCurrentQuality()&&(e="auto")),e}getTitle(){return this.title}getIsLive(){var e=!1;return"boolean"==typeof this.isLive?e=this.isLive:this.getDuration()<=0&&(e=!0),e}getResource(){return this.player.getPlaylistItem().file}getPlayerVersion(){return this.player.version}getPlayerName(){return"JWPlayer"}setOptions(e){e&&e.media&&(this.isLive=e.media.isLive||this.isLive,this.title=e.media.title||this.title),e&&(this.isLive=e["content.isLive"]||this.isLive,this.title=e["content.title"]||this.title),this.getVideo().mergeOptions(e)}registerListeners(){for(var e in this._lastPlayhead=0,this.monitorPlayhead(!0,!0),this.references={beforePlay:this.beforeplayListener.bind(this),buffer:this.bufferListener.bind(this),play:this.playListener.bind(this),pause:this.pauseListener.bind(this),error:this.errorListener.bind(this),seek:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),complete:this.endedListener.bind(this),meta:this.metaListener.bind(this),playlistItem:this.playlistItemListener.bind(this),setupError:this.setupErrorListener.bind(this),idle:this.idleListener.bind(this),firstFrame:this.firstFrameListener.bind(this),time:this.timeListener.bind(this),adsManager:this.managerListener.bind(this),remove:this.removeListener.bind(this),playbackRateChanged:this.playrateListener.bind(this)},this.references)this.player.on(e,this.references[e])}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}timeListener(e){if(this._lastPlayhead=this.getPlayhead(),this.fatalErrored)return null;0!==e.position&&this._start({},"timeListener");var t=e.position;(e.currentTime||e.position)&&((this.previousPosition&&this.previousPosition<t||this.getIsLive())&&this.fireJoin({},"timeListener"),this.previousPosition=t)}playlistItemListener(e){this.firePlayerLog("playlistItemListener",{});var t=this.player.getPlaylistItem();if(t&&t.file.indexOf("/VideoError.mp4")>-1)return null;this.duration=void 0,this.throughput=-1,this.setOptions(this.player.getConfig().youbora),this.setOptions(t.y
2oubora),this.fireStop({},"playlistItemListener")}setupErrorListener(e){this.firePlayerLog("setupErrorListener",{}),this.fireError(e.message,void 0,void 0,void 0,"setupErrorListener")}checkForClientSideAds(){var e=this.getVideo().getAdsAdapter(),t=!1;return e&&void 0!==e.isDAI&&(e.isDAI||(t=e.player.getCuePoints().includes(-1))),t}idleListener(e){this.firePlayerLog("idleListener",{}),e.reason&&"complete"!==e.reason||this.checkForClientSideAds()||this.fireStop({},"idleListener")}firstFrameListener(e){this.firePlayerLog("firstFrameListener",{}),this.tag=this.player.getConfig().mediaElement,this.fireJoin({},"firstFrameListener")}beforeplayListener(e){this.firePlayerLog("beforeplayListener",{}),this.duration=void 0,this.throughput=-1,this.player.getPlaylistItem().youbora||this.setOptions(this.player.getConfig().youbora),this.flags.isStarted||(this._start({},"beforeplayListener"),this.tag=this.player.getConfig().mediaElement,this.fatalErrored=!1,this.getVideo().getAdsAdapter()||this.getVideo().setAdsAdapter(this.getAdapterClass("genericAdsAdapter"),this.plugin))}managerListener(e){this.firePlayerLog("managerListener",{}),this.getVideo().getAdsAdapter()||(this.getVideo().setAdsAdapter(this.getAdapterClass("genericAdsAdapter"),this.plugin),this.getVideo().getAdsAdapter().managerListener(e))}bufferListener(e){this.firePlayerLog("bufferListener",{}),this.flags.isPaused||this.fireBufferBegin({},!1,"firstFrameListener")}playListener(e){this.firePlayerLog("playListener",{}),this.fireBufferEnd({},"playListener"),this.fireSeekEnd({},"playListener"),this.fireResume({},"playListener"),this.monitor.skipNextTick()}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.flags.isSeeking&&this.fireSeekEnd({},"playListener"),this.firePause({},"pauseListener")}errorListener(e){this.firePlayerLog("errorListener",{}),e.message&&e.message.toLowerCase().includes("casting failed to load")||(e.code?this.fireError(e.code,e.message,void 0,void 0,"errorListener"):this.fireError(e.message,void 0,void 0,void 0,"errorListener"),(!e.message||e.message.toLowerCase().includes("network error")||e.message.toLowerCase().includes("could not be played")||e.message.toLowerCase().includes("cannot load")||e.message.toLowerCase().includes("cannot be played")||e.message.toLowerCase().includes("down")||e.message.toLowerCase().includes("fragloaderror")||e.message.toLowerCase().includes("levelloadtimeout")||e.message.toLowerCase().includes("file not found"))&&this.fireStop({},"errorListener"),e.code&&(e.code<3e5||e.code>309e3)&&(this.fireStop({},"errorListener"),this.fatalErrored=!0))}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}seekedListener(e){this.firePlayerLog("seekedListener",{}),"paused"!==this.player.getState()&&(this.fireSeekEnd({},"seekedListener"),this.monitor.skipNextTick())}endedListener(e){this.checkForClientSideAds()||(this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener"))}removeListener(e){this.firePlayerLog("removeListener",{}),this.getVideo().fireStop({},"removeListener")}playrateListener(e){this.monitor&&this.monitor.skipNextTick()}_start(e,t){!this.flags.isStarted&&this.player&&this.getVideo()&&(this._getDrm(),this.fireStart(e,t))}_getDrm(e){var t=this.player.getPlaylistItem(this.player.getPlaylistIndex());for(var i in t.allSources){var n=t.allSources[i];if(n.file===t.file&&n.drm&&"function"==typeof Object.keys){var r=Object.keys(n.drm);1===r.length&&this.getVideo().mergeOptions({"content.drm":r[0]});break}}}metaListener(e){this.duration=e.duration||this.duration,e.metadata&&(this.duration=e.metadata.duration||this.duration)}},Dashjs:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.getVideoElement())}catch(e){return!0}}getVersion(){return"7.0.14-dashjs-jsclass"}getPlayhead(){var e=null;return this.player&&(e=this.isLive?this.player.timeAsUTC():this.player.time()),e}getDroppedFrames(){var e=0;return this.player&&(e=this.player.getDashMetrics().getCurrentDroppedFrames().droppedFrames),e}getDuration(){var e=null;return this.player&&(e=this.player.duration()),e}getBitrate(){var e=this._getRenditionInfo();return e?e.bitrate:null}getRendition(){var e=this._getRenditionInfo();return e?this.getNpawUtils().buildRenditionString(e.width,e.height,e.bitrate):null}_getRenditionInfo(){let e=null;if(this.player)if("function"==typeof this.player.getQualityFor&&"function"==typeof this.player.getBitrateInfoListFor){const t=this.player.getQualityFor("video");t&&(e=this.player.getBitrateInfoListFor("video")[t])}else if("function"==typeof this.player.getCurrentRepresentationForType){const t=this.player.getCurrentRepresentationForType("video");t&&void 0!==t.bandwidth&&(e={bitrate:1e3*t.bitrateInKbit,height:t.height,width:t.width})}return e}getThroughput(){if(this.getCdnTraffic()&&0!==this.getCdnTraffic()&&this.plugin&&this.plugin.getPingTime()){this.lastDataValue||(this.lastDataValue=0);var e=this.lastDataValue;return this.lastDataValue=this.getCdnTraffic()+this.getP2PTraffic(),Math.round((this.lastDataValue-e)/this.plugin.getPingTime())}if(!this.throughput&&this.player&&this.player.getMetricsFor){var t=this.player.getMetricsFor("video"),i=this.player.getDashMetrics().getHttpRequests(t);if(!i)return null;for(var n=0,r=0,s=0;s<i.length;s++){var a=i[s];if("MediaSegment"===a.type&&a.responsecode>=200&&a.responsecode<400&&"video"===a._stream){var o=a._responseHeaders.match(/Content-Length: (.+)/i);if(o){var l=(a.interval-(a.tresponse-a.trequest))/1e3;n+=o[1]/l*8,r++}}}if(!n)return null;this.throughput=n/r}if(!this.throughput&&this.player&&this.player.getAverageThroughput){var d=this.player.getAverageThroughput("video"),u=this.player.getAverageThroughput("audio");this.throughput=1e3*(d+u)}return this.throughput}getIsLive(){return this.isLive||(this.isLive=!1),this.isLive}getResource(){var e=null;if(this.player)try{var t=this.player.getSource();"string"==typeof t&&(e=t)}catch(e){}return e}getPlayrate(){return this.player?this.player.getPlaybackRate():1}getPlayerName(){return"dashJS"}getPlayerVersion(){var e=null;return this.player&&(e=this.player.getVersion()),e}getLatency(){var e=null;return this.getIsLive()&&this.player&&this.player.getCurrentLiveLatency&&(e=1e3*this.player.getCurrentLiveLatency()),e}registerListeners(){this.emptyVideoBuffer=!1,this.emptyAudioBuffer=!1,this.emptyTextBuffer=!1;var e=dashjs.MediaPlayer.events;if(this.references={},this.references[e.MANIFEST_LOADED]=this.manifestLoaded.bind(this),this.references[e.PLAYBACK_STARTED]=this.playbackStarted.bind(this),this.references[e.PLAYBACK_WAITING]=this.playbackWaiting.bind(this),this.references[e.PLAYBACK_STALLED]=this.playbackStalled.bind(this),this.references[e.PLAYBACK_PLAYING]=this.playbackPlaying.bind(this),this.references[e.PLAYBACK_SEEKED]=this.playbackPlaying.bind(this),this.references[e.PLAYBACK_PAUSED]=this.playbackPaused.bind(this),this.references[e.PLAYBACK_ENDED]=this.playbackEnded.bind(this),this.references[e.ERROR]=this.errorListener.bind(this),this.references[e.PLAYBACK_ERROR]=this.playbackError.bind(this),this.references[e.PLAYBACK_SEEKING]=this.playbackSeeking.bind(this),this.references[e.BUFFER_LOADED]=this.processBufferLoaded.bind(this),this.references[e.BUFFER_EMPTY]=this.processBufferEmpty.bind(this),this.player)for(var t in this.references)this.player.on(t,this.references[t])}unregisterListeners(){if(this.emptyVideoBuffer=!1,this.emptyAudioBuffer=!1,this.emptyTextBuffer=!1,this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);delete this.references}}processBufferEmpty(e){"video"===e.mediaType?this.emptyVideoBuffer=!0:"audio"===e.mediaType?this.emptyAudioBuffer=!0:"text"===e.mediaType&&(this.emptyTextBuffer=!0)}processBufferLoaded(e){"video"===e.mediaType?this.emptyVideoBuffer=!1:"audio"===e.mediaType?this.emptyAudioBuffer=!1:"text"===e.mediaType&&(this.emptyTextBuffer=!1)}manifestLoaded(e){this.firePlayerLog("manifestLoaded",{}),this.isLive=e.data&&"dynamic"===e.data.type}playbackStarted(e){this.firePlayerLog("playbackStarted",{}),this.fireStart({},"playbackStarted")}playbackPaused(e){this.firePlayerLog("playbackPaused",{}),this.firePause({},"playbackPaused")}playbackPlaying(e){this.firePlayerLog("playbackPlaying",{}),this.flags.isSeeking?this.fireSeekEnd({},"playbackPlaying"):this.flags.isPaused&&this.fireResume({},"playbackPlaying"),this.fireBufferEnd({},"playbackPlaying"),this.fireJoin({},"playbackPlaying")}playbackWaiting(e){var t=this.isLegacyBufferBehaviourEnabled();this.firePlayerLog("playbackWaiting",{}),t&&!this.emptyVideoBuffer||this.fireBufferBegin({},!1,"playbackWaiting")}playbackStalled(e){this.firePlayerLog("playbackStalled",{}),this.fireBufferBegin({},!1,"playbackStalled")}errorListener(e){this.firePlayerLog("errorListener",{}),e.error.code?this.fireError(e.error.code,e.error.message,void 0,void 0,"errorListener"):this.fireError(e.error,"Error",void 0,void 0,"errorListener")}playbackError(e){this.firePlayerLog("playbackError",{}),e.error.code?this.fireError(e.error.code,e.error.message,void 0,void 0,"playbackError"):this.fireError(e.error,"Playback error",void 0,void 0,"playbackError")}playbackSeeking(e){this.firePlayerLog("playbackSeeking",{}),this.isLive&&this.fireStart({},"playbackSeeking"),this.fireSeekBegin({},!1,"playbackSeeking")}playbackEnded(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),e.isLast&&!i&&(this.firePlayerLog("playbackEnded",{}),this.fireStop({},"playbackEnded"))}getCdnTraffic(){if(this.player.getMetricsFor){var e=this.player.getMetricsFor("p2pweb");if(!e)return this.getNpawReference().Adapter.prototype.getCdnTraffic();var t=e.metricsP2PWeb;return t.videoAvgLength*t.chunksFromCDN+t.audioAvgLength*t.chunksFromCDN}return null}getP2PTraffic(){if(this.player.getMetricsFor){var e=this.player.getMetricsFor("p2pweb");if(!e)return this.getNpawReference().Adapter.prototype.getP2PTraffic();var t=e.metricsP2PWeb;return t.videoAvgLength*t.chunksFromP2P+t.audioAvgLength*t.chunksFromP2P}return null}},Nagra:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.el_)}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}stalledListener(e){this.firePlayerLog("stalledListener",{}),this.fireBufferBegin({},!1,"stalledListener")}bufferingListener(e){this.firePlayerLog("waitingListener",{}),this.fireBufferBegin({},!1,"waitingListener")}getIsLive(){return!!this.player.el_&&this.player.el_.duration===1/0}playListener(e){this.firePlayerLog("playListener",{}),this.player&&this.checkReadyState(this.player.readyState,"playListener"),this.fireStart({},"playListener")}registerListeners(){for(var e in this.monitorPlayhead(!1,!1),this.references={play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),ended:this.endedListener.bind(this),loadstart:this.loadStartListener.bind(this),stalled:this.stalledListener.bind(this),waiting:this.bufferingListener.bind(this),canplay:this.canPlayListener.bind(this),canplaythrough:this.canPlayThroughListener.bind(this),loadedmediadata:this.loadedMediaDataListener.bind(this),loadeddata:this.loadedDataListener.bind(this)},this.references)this.player.on(e,this.references[e])}endedListener(e){this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener")}getPlayrate(){return this.player.playbackRate()}canPlayListener(e){this.player&&this.checkReadyState(this.player.readyState,"canPlayListener")}canPlayThroughListener(e){this.player&&this.checkReadyState(this.player.readyState,"canPlayThroughListener")}timeupdateListener(e){(this.getPlayhead()>.1||this.getVideo()&&this.getVideo().getIsLive())&&!this.player.el_.error&&(this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"))}getResource(){return this.player.currentSrc()}getPlayhead(){return this.player.currentTime()}getDuration(){return this.player.duration()}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}getPlayerName(){return"nagra"}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.flags.isBuffering&&this.fireBufferEnd({},"playingListener")}errorListener(e){this.firePlayerLog("errorListener",{});var t=null,i=null;try{e&&e.target&&e.target.error&&(i=e.target.error.code,t=e.target.error.message)}catch(e){}this.fireError(i,t,void 0,void 0,"errorListener")}loadedMediaDataListener(e){this.player&&this.checkReadyState(this.player.readyState,"loadedMediaDataListener")}getVersion(){return"7.0.1-nagra-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}loadStartListener(e){this.firePlayerLog("loadStartListener",{}),this.flags.isJoined&&this.fireStop({},"loadStartListener")}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references)for(var e in this.references)this.player.removeEventListener(e,this.references[e]),delete this.references[e]}loadedDataListener(e){this.player&&this.checkReadyState(this.player.readyState,"loadedDataListener")}getPlayerVersion(){var e="Nagra";return window.OTV.versions.product&&(e+=window.OTV.versions.product),e}getThroughput(){return this.player&&this.player.otvtoolkit().networkStatistics.getNetworkUsage().downloadBitrate?this.player.otvtoolkit().networkStatistics.getNetworkUsage().downloadBitrate:null}getBitrate(){return this.player&&this.player.otvtoolkit().playbackStatistics.get
2StreamBitrate()?this.player.otvtoolkit().playbackStatistics.getStreamBitrate():null}getDroppedFrames(){let e=0;return this.player.otvtoolkit().renderingStatistics.getFrameDrops()&&(e=this.player.otvtoolkit().renderingStatistics.getFrameDrops()),e}getFramesPerSecond(){let e=null;return this.player.otvtoolkit().renderingStatistics.getFramesPerSecondNominal()&&(e=this.player.otvtoolkit().renderingStatistics.getFramesPerSecondNominal()),e}getRendition(){let e,t,i,n=this.player.tech_.shaka_.getVariantTracks();if(null!==n)for(const r of n)!0===r.active&&(e=r.width,t=r.height,i=r.bandwidth);return this.getNpawUtils().buildRenditionString(e,t,i)}},Brightcove:class{adsAdapters={bcoveAdsAdapter:Ar,bcoveImaAdsAdapter:Er,genericAdsAdapter:Sr};additionalContexts={contribHlsTech:Tr,dashTech:br,dashShakaTech:_r,hlsJsTech:yr,shakaTech:vr};isInAds(){try{return this.player.ads&&this.player.ads.inAdBreak&&"function"==typeof this.player.ads.inAdBreak&&this.player.ads.inAdBreak()}catch(e){return!1}}getBitrate(){var e=null,t=this.getUsedTech();return t&&t.getBitrate&&(e=t.getBitrate(this)),e}checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player.el())}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}bufferingListener(e){this.firePlayerLog("bufferingListener",{}),this.flags.isSeeking||this.fireBufferBegin({},!1,"bufferingListener")}getRendition(){var e=null,t=this.getUsedTech();return t&&t.getRendition&&(e=t.getRendition(this)),e}getPlayerVersion(){var e=null;return"undefined"!=typeof videojs&&(e=videojs.VERSION),e}playListener(e){this.firePlayerLog("playListener",{}),this.isInAds()||(this.flags.isStarted?this.lastSrc&&this.lastSrc!==this.getResource()&&(this.fireStop({},"playListenerNewResource"),this.acumBytesFunc(),this.lastPlayhead=void 0,this._startEvent("playListenerNewResource"),this.lastSrc=this.getResource()):(this.lastSrc=this.getResource(),this._startEvent("playListenerNotStarted")))}loadAdsAdapter(){var e;if(null===this.plugin.getAdsAdapter())if(this.getAdapterClass("bcoveImaAdsAdapter").isUsed()){if(e=this.getAdapterClass("bcoveImaAdsAdapter")){this.plugin.setAdsAdapter(e,this.getVideo().getVideoKey());const t=Object.keys(this.getAdapterClasses()).filter((e=>e.toLowerCase().includes("ads")));for(const e of t)this.getAdapterClass(e).unregisterListeners();this.getVideo().getAdsAdapter().registerListeners()}}else this.loadVideoJSAdsAdapter()}loadVideoJSAdsAdapter(){if(this.getVideo())if(!this.getVideo().getAdsAdapter()||this.getVideo().getAdsAdapter().isGeneric){var e=null;if(this.getAdapterClass("bcoveAdsAdapter").isUsed()?e=this.getAdapterClass("bcoveAdsAdapter"):null===this.getVideo().getAdsAdapter()&&(e=this.getAdapterClass("genericAdsAdapter")).initProperties(),e){this.plugin.setAdsAdapter(e,this.getVideo().getVideoKey());const t=Object.keys(this.getAdapterClasses()).filter((e=>e.toLowerCase().includes("ads")));for(const e of t)this.getAdapterClass(e).unregisterListeners();this.getVideo().getAdsAdapter().registerListeners()}}else this.getVideo().getAdsAdapter().registerImaEvents&&this.getVideo().getAdsAdapter().registerImaEvents()}errorModifyer(e,t,i){this.fatalList=e||[],this.nonFatalList=t||[],this.ignoreList=i||[]}getPlayrate(){return this.player.playbackRate()}timeupdateListener(e){this.isInAds()||(this.getPlayhead()>.1&&(this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),!this.flags.isPaused&&this.lastSeekPlayhead&&this.lastSeekPlayhead!==this.getPlayhead()&&(this.fireSeekEnd({},"timeupdateListener"),this.lastSeekPlayhead=!1)),this.flags.isJoined||(void 0===this.lastPlayhead&&(this.lastPlayhead=this.getPlayhead()),this.lastPlayhead!==this.getPlayhead()&&(this.player.options_&&this.plugin&&!this.getVideo().options["content.id"]&&(this.getVideo().options["content.id"]=this.player.options_["data-video-id"]),this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),this.lastPlayhead=void 0)),this.getVideo()._adsAdapter&&!this.getVideo()._adsAdapter.flags.isStarted&&(this.lastPlayhead=this.getPlayhead()))}getPlayhead(){return this.player.currentTime()}getDuration(){return this.player.mediainfo&&void 0!==this.player.mediainfo.duration?this.player.mediainfo.duration:this.getVideoJSDuration()}getVideoJSDuration(){var e=this.player.duration();return this.player.mediainfo&&void 0!==this.player.mediainfo.duration&&(e=this.player.mediainfo.duration),e}aderrorListener(e){this.loadAdsAdapter(),this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().adPlayerErrorListener&&this.getVideo().getAdsAdapter().adPlayerErrorListener(e)}_jointimePolling(e){this.getVideo()?this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().flags.isStarted||(0!==this.lastPlayhead&&"number"==typeof this.lastPlayhead&&this.lastPlayhead!==this.getPlayhead()&&(this.fireJoin({},"jointimePolling"),this.joinPolling&&this.joinPolling.stop()),this.lastPlayhead=this.getPlayhead()):this.joinPolling&&this.joinPolling.stop()}acumBytesFunc(){this.acumBytes+=this.getTotalBytes()||0}adsEndedListener(e){this.firePlayerLog("adsEndedListener",{}),this.adsEnded=!0,this.getVideo().requestBuilder.lastSent.adPosition===this.getNpawReference().Constants.AdPosition.Postroll&&(this.getVideo().fireStop({},"adsEndedListener"),this.acumBytesFunc(),this.lastPlayhead=void 0)}getVersion(){return"7.0.4-brightcove-videojs-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.lastSeekPlayhead=this.getPlayhead()}getTech(){return this.player.tech({IWillNotUseThisInPlugins:!0})}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){try{for(var e in this.references)this.player.off(e,this.references[e])}catch(e){}delete this.references}}_startEvent(e){this.loadAdsAdapter(),this.player.options_&&this.plugin&&!this.plugin.options["content.id"]&&(this.plugin.options["content.id"]=this.player.options_["data-vi
2deo-id"]),this.fireStart({},e),this.flags.isJoined||(this.joinPolling||(this.joinPolling=new(this.getNpawReference().Timer)(this._jointimePolling.bind(this),500)),this.joinPolling.start())}getIsLive(){var e=null;if(this.player.mediainfo&&(e=!0,"number"==typeof this.player.mediainfo.duration&&(e=this.player.mediainfo.duration<1||this.player.mediainfo.duration===1/0)),this.player.duration&&"function"==typeof this.player.duration){e=!0;var t=this.player.duration();"number"==typeof t&&(e=t<1||t===1/0)}return this.player.isLive&&"function"===this.player.isLive&&(e=this.player.isLive()),e}conditionalStop(e){this.firePlayerLog("conditionalStop",{}),this.isInAds()||this.plugin&&(this.adsEnded=!1,this.fireStop({},"conditionalStop"),this.plugin&&!this.getVideo().options["content.id"]&&(this.getVideo().options["content.id"]=null),this.acumBytesFunc(),this.lastPlayhead=void 0)}getTitle(){return this.player.mediainfo?this.player.mediainfo.name:this.getVideoJSTitle()}getVideoJSTitle(){var e=null;return this.player.mediainfo&&(e=this.player.mediainfo.name),e}getTotalBytes(){var e=null,t=this.getUsedTech();return t&&t.getTotalBytes&&(e=t.getTotalBytes(this)),e}registerListeners(){if(this.monitorPlayhead(!1,!1,1200),this.acumBytes=0,this.ignoreList=[],this.fatalList=[],this.nonFatalList=[],this.references={loadstart:this.loadstartListener.bind(this),adsready:this.loadAdsAdapter.bind(this),play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),ended:this.conditionalStop.bind(this),dispose:this.disposeListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),error:this.errorListener.bind(this),adserror:this.aderrorListener.bind(this),adsEnded:this.adsEndedListener.bind(this),texttrackchange:this.textListener.bind(this),waiting:this.bufferingListener.bind(this)},this.player)for(var e in this.references)this.player.on(e,this.references[e]);setTimeout(this.loadAdsAdapter.bind(this),50)}getResource(){var e=null,t=this.getUsedTech();return t&&t.getResource&&(e=t.getResource(this)),e||(e=this.player.currentSrc()),e}textListener(e){if(this.player.textTracks)for(var t=this.player.textTracks(),i=t.length,n=0;n<i;++n)t[n]&&"showing"===t[n].mode&&(this.getVideo().options["content.subtitles"]=t[n].label||t[n].language)}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}disposeListener(e){this.firePlayerLog("disposeListener",{}),this.plugin&&(this.getVideo().fireStop({},"disposeListener"),this.getVideo().removeAdsAdapter(),this.getVideo().removeAdapter())}loadstartListener(e){this.firePlayerLog("loadstartListener",{}),this.loadAdsAdapter()}getPlayerName(){var e=this.getVideoJSPlayerName();return this.player&&this.player.mediainfo&&(e+="-bcove"),e}getVideoJSPlayerName(){var e="videojs";return this.getAdapterClass("contribHlsTech").isUsed(this)?e+="-hls":this.getAdapterClass("hlsJsTech").isUsed(this)?e+="-hlsjs":this.getAdapterClass("shakaTech").isUsed(this)?e+="-shaka":this.getAdapterClass("dashShakaTech").isUsed(this)?e+="-dash-shaka":this.getAdapterClass("dashTech").isUsed(this)&&(e+="-dash"),this.player.FreeWheelPlugin&&(e+="-fw"),this.player.mediainfo&&(e+="-bcove"),e}playingListener(e){this.firePlayerLog("playingListener",{}),this._startEvent("playingListener"),this.fireResume({},"playingListener"),this.getPlayhead()<1&&this.fireSeekEnd({},"playingListener"),this.fireBufferEnd({},"playingListener")}getUsedTech(){var e=null;if(this.getPlugin().getAdaptersProperties().usedTech){switch(this.getPlugin().getAdaptersProperties().usedTech.toLowerCase()){case"hls":this.getAdapterClass("contribHlsTech").isUsed(this)&&(e=this.getAdapterClass("contribHlsTech"));break;case"hlsjs":this.getAdapterClass("hlsJsTech").isUsed(this)&&(e=this.getAdapterClass("hlsJsTech"));break;case"shaka":this.getAdapterClass("shakaTech").isUsed(this)&&(e=this.getAdapterClass("shakaTech"));break;case"dashshaka":this.getAdapterClass("dashShakaTech").isUsed(this)&&(e=this.getAdapterClass("dashShakaTech"));break;case"dash":this.getAdapterClass("dashTech").isUsed(this)&&(e=this.getAdapterClass("dashTech"))}if(null!=e)return e}return this.getAdapterClass("contribHlsTech").isUsed(this)?e=this.getAdapterClass("contribHlsTech"):this.getAdapterClass("hlsJsTech").isUsed(this)?e=this.getAdapterClass("hlsJsTech"):this.getAdapterClass("shakaTech").isUsed(this)?e=this.getAdapterClass("shakaTech"):this.getAdapterClass("dashShakaTech").isUsed(this)?e=this.getAdapterClass("dashShakaTech"):this.getAdapterClass("dashTech").isUsed(this)&&(e=this.getAdapterClass("dashTech")),e}errorListener(e){this.firePlayerLog("errorListener",{});this.fireError(null,null,void 0,void 0,"errorListener")}},Theoplayer:class{adsAdapters={nativeAdsAdapter:wr};checkExistsPlayer(){try{if(this.player.element)return this.checkExistsObjectOnPage(this.player.element)}catch(e){return!0}}getBitrate(){var e=-1,t=this.getActiveQuality();return t&&t.bandwidth&&(e=t.bandwidth),e}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.flags.isSeeking||this.firePause({},"pauseListener")}offlineListener(e){this.firePlayerLog("offlineListener",{}),this.fireError("OFFLINE_SOURCE","OFFLINE_SOURCE",void 0,void 0,"offlineListener")}getRendition(){this._setLanguage();var e=null,t=this.getActiveQuality();
2return t?e=t.name&&isNaN(t.name)?t.name:this.getNpawUtils().buildRenditionString(t.width,t.height,t.bandwidth):this.player.videoHeight&&this.player.videoWidth&&(e=this.getNpawUtils().buildRenditionString(this.player.videoWidth,this.player.videoHeight,0)),e}getLatency(){var e=null;return this.getIsLive()&&null!==this.player.currentProgramDateTime&&(e=(new Date).getTime()-this.player.currentProgramDateTime),e}getPlayerVersion(){var e="THEOplayer";return"undefined"!=typeof THEOplayer?e+=THEOplayer.version:"undefined"!=typeof theoplayer&&(e+=theoplayer.version),e}playListener(e){this.firePlayerLog("playListener",{}),this.player.autoplay||this.fireInit({},"playListener")}endedListener(e){this.firePlayerLog("endedListener",{}),this.flags.isStarted&&(this.fireStop({},"endedListener"),this.ended=!0)}getPlayrate(){try{return this.player.playbackRate}catch(e){}return 0}getActiveQuality(){for(var e=this.player.videoTracks,t=0;t<e.length;t++){var i=e.item(t);if(i.enabled)return i.activeQuality}return{}}playrateListener(e){this.monitor&&this.monitor.skipNextTick()}getPlayhead(){var e=null;try{this.player.ads&&this.player.ads.playing||this.flags.isSeeking&&this.flags.isPaused?e=this.lastPlayhead:(this.lastPlayhead=this.player.currentTime,e=this.player.currentTime)}catch(e){}return e}getDuration(){var e=null;return this.player.ads&&this.player.ads.playing?e=this.lastDuration||e:(this.lastDuration=this.player.duration,e=this.lastDuration),e}getThroughput(){return this.player&&this.player.metrics&&this.player.metrics.currentBandwidthEstimate?this.player.metrics.currentBandwidthEstimate:null}getDroppedFrames(){return this.player.metrics?this.player.metrics.droppedVideoFrames:null}getVersion(){return"7.0.14-theoplayer2-jsclass"}unregisterListeners(){if(this.getVideo()&&this.getVideo().removeAdsAdapter(),this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.removeEventListener(e,this.references[e]);delete this.references}if(this.player&&this.player.network&&this.networkReferences){for(var t in this.player.network.removeRequestInterceptor(this.requestInterceptor),this.player.network.removeResponseInterceptor(this.responseInterceptor),this.networkReferences)this.player.network.removeEventListener(t,this.networkReferences[t]);delete this.networkReferences,delete this.requestInterceptor,delete this.responseInterceptor}}stateChangeListener(e){1===e.readyState&&this.player.src!==this.previousSrc&&void 0!==this.player.src&&(this.fireInit({},"stateChangeListener"),this.previousSrc=this.player.src),0===e.currentTime&&0===e.readyState&&this.player.src!==this.previousSrc&&void 0!==this.player.src&&(this.fireStop(),this.previousSrc=this.player.src)}_segmentUrl(){var e=null;return this.getVideo()&&this.getVideo().options&&!this.getVideo().options["parse.manifest"]&&this.parsedUrl&&(e={parsedResource:this.parsedUrl}),e}getIsLive(){return isNaN(this.player.duration)?null:this.player.duration===1/0}_setLanguage(){if(this.getVideo()){var e=this.player.audioTracks;for(var t in e){var i=e[t];i.activeQuality&&(this.getVideo().options["content.language"]="und"===i.language?i.name||i.label:i.language)}}}registerListeners(){for(var e in this.getNpawUtils().logAllEvents(this.player),this.monitorPlayhead(!1,!0),this.references={play:this.playListener.bind(this),playing:this.playingListener.bind(this),pause:this.pauseListener.bind(this),seeking:this.seekingListener.bind(this),ended:this.endedListener.bind(this),error:this.errorListener.bind(this),readystatechange:this.stateChangeListener.bind(this),sourcechange:this.endedListener.bind(this),timeupdate:this.timeUpdateListener.bind(this),ratechange:this.playrateListener.bind(this),waiting:this.waitingListener.bind(this)},this.networkReferences={offline:this.offlineListener.bind(this)},this.references)this.player.addEventListener(e,this.references[e]);if(this.player.network)for(var t in this.networkReferences)this.player.network.addEventListener(t,this.networkReferences[t]);!this.getVideo().getAdsAdapter()&&this.player.ads&&(this.getAdapterClass("nativeAdsAdapter")._updatePlayer(this.player),this.plugin.setAdsAdapter(this.getAdapterClass("nativeAdsAdapter"),this.getVideo().getVideoKey()))}getResource(){return this.player.src&&!this.previousSrc&&(this.previousSrc=this.player.src),this.player.src||null}getURLToParse(){return this.parsedUrl}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}timeUpdateListener(e){this.player.ads&&this.player.ads.playing||(this.flags.isStarted||!e.currentTime||this.ended||(this.getIsLive()||e.currentTime+1<this.getDuration())&&(this.fireStart(this._segmentUrl(),"timeUpdateListener"),this.fireJoin(this._segmentUrl(),"timeUpdateListener")),this.flags.isPaused||(this.fireSeekEnd({},"timeUpdateListener"),this.fireBufferEnd({},"timeUpdateListener")))}getPlayerName(){return"THEOplayer"}playingListener(e){this.firePlayerLog("playingListener",{}),this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().flags.isStarted||(this.flags.isSeeking&&!this.flags.isPaused&&this.fireSeekEnd({},"playingListener"),this.flags.isBuffering&&!this.flags.isPaused&&this.fireBufferEnd({},"playingListener"),this.fireResume({},"playingListener"),this.player.ads&&this.player.ads.playing||(this.ended=!1,this.fireStart(this._segmentUrl(),"playingListener")),this.fireJoin({},"playingListener"))}waitingListener(e){this.firePlayerLog("waitingListener",{}),this.flags.isPaused||this.flags.isSeeking||this.fireBufferBegin({},!1,"waitingListener")}errorListener(e){var t,i,n,r,s,a,o,l,d;this.firePlayerLog("errorListener",{}),e.errorObject?(t=e.errorObject.code,r=e.errorObject.message,o=!!e.errorObject.cause&&e.errorObject.cause.message):r=e.error,this.player&&this.player.errorObject&&(i=this.player.errorObject.code,s=this.player.errorObject.message,l=!!this.player.errorObject.cause&&this.player.errorObject.cause.message),this.player&&this.player.error&&(n=this.player.error.code,a=this.player.error.message,d=this.player.error.cause);var u=[];r&&u.push("event: "+r),s&&u.push("player.errorObject: "+s),a&&u.push("player.error: "+a);var c=[];o&&c.push("event: "+o),l&&c.push("player.errorObject: "+l),d&&c.push("player.error: "+d);var h=[];t&&h.push("event: "+t),i&&h.push("player.errorObject: "+i),n&&h.push("player.error: "+n);var p=t||i||n||"GENERIC_ERROR",f="[MESSAGES] "+u.join(" - ")+" - [CAUSES] "+c.join(" - ")+" - [CODES] "+h.join(" - ");this.fireFatalError(p,f,void 0,void 0,"errorListener")}},NagraReactNative:class{getVersion(){return"7.0.1-nagra-react-native-jsclass"}getPlayhead(){return this.playhead}getIsLive(){return!this.duration}getDuration(){return this.duration}getResource(){return this.resource}setPlatform(e){this.reactPlatform=e}getRendition(){return this.width&&this.height?this.getNpawUtils().buildRenditionString(this.width,this.height):null}getPlayerName(){return"Nagra React Native"}unregisterListeners(){this.monitor&&this.monitor.stop()}onLoad(e){var t=e.naturalSize;t&&(this.width=Math.round(t.width),this.height=Math.round(t.height)),this.duration=e.duration,this.fireStart()}onLoadStart(e){this.resource=e.src,this.fireStart(),this.flags.isJoined||(this.isWaiting=!1,this.fireJoin()),this.fireBufferEnd({},"onLoadStart"),this.fireResume(),this.pausePlayhead=null}onPlaying(e){this.fireStart(),this.flags.isJoined||(this.isWaiting=!1,this.fireJoin()),this.pausePlayhead&&Math.abs(this.getPlayhead()-this.pausePlayhead)>.5&&!this.flags.isPaused&&(this.fireSeekEnd({},"onPlaying"),this.pausePlayhead=null),this.reactPlatform&&"ios"==this.reactPlatform&&!this.pausePlayhead&&(this.fireSeekEnd({},"onPlaying"),this.pausePlayhead=null),this.fireBufferEnd({},"onPlaying"),this.fireResume()}onProgress(e){this.playhead=e.currentTime,this.fireStart(),this.playhead>.5&&!this.flags.isJoined&&this.fireJoin(),this.pausePlayhead&&!this.flags.isPaused&&(Math.abs(this.getPlayhead()-this.pausePlayhead)>2?this.fireSeekEnd({},"onProgress"):this.isWaiting?(this.fireBufferBegin({},!0,"onProgress"),this.fireBufferEnd({},"onProgress")):(this.cancelSeek(),this.chronos.pause.pauseTime=null),this.isWaiting=!1,this.pausePlayhead=null)}onSeek(e){this.reactPlatform&&"ios"==this.reactPlatform&&this.fireSeekBegin({},!1,"onSeek")}onWaiting(e){this.isWaiting=!0,this.fireBufferBegin({},!1,"onWaiting")}
2onPaused(e){this.reactPlatform&&"android"==this.reactPlatform&&(this.pausePlayhead=this.getPlayhead(),this.fireSeekBegin({},!0,"onPaused")),this.firePause(),this.reactPlatform&&"android"==this.reactPlatform&&(this.chronos.pause.startTime=(new Date).getTime())}onError(e){this.fireError(e.code,e.nativeError)}onStopped(e){this.fireStop()}onEnd(e){this.fireStop()}},Chromecast:class{getPlayhead(){return this.player.getEstimatedTime||this.player.currentTime}getVersion(){return"7.0.2-chromecast-jsclass"}getDuration(){return this.player.duration}getBitrate(){if(this.castPlayer&&this.castPlayer.getStreamingProtocol){const e=this.castPlayer.getStreamingProtocol();let t=0;try{e.getStreamCount&&e.getStreamCount()>0&&(t=e.getStreamCount())}catch(e){}for(let t=0;t<e.getStreamCount();t++){const i=e.getStreamInfo(t);if(0===i.mimeType.indexOf("video/")){const n=e.getQualityLevel(t);if(i.bitrates&&i.bitrates[n])return i.bitrates[n]}}}}getRendition(){let e;if(this.player&&this.player.videoHeight&&this.player.videoWidth){let t=this.getVideo().getBitrate();t<=0&&(t=this.plugin.requestBuilder.lastSent.bitrate||-1),e=this.getNpawUtils().buildRenditionString(this.player.videoWidth,this.player.videoHeight,t)}return e}getResource(){let e;return this.player.currentSrc.startsWith("blob:")?this.castPlayer&&(e=this.castPlayer.getHost().url):e=this.player.currentSrc,e}getPlayrate(){return this.player.playbackRate}getDroppedFrames(){return this.player.webkitDroppedFrameCount}getPlayerVersion(){let e;return"undefined"!=typeof cast&&cast.player&&cast.player.api&&(e=cast.player.api.VERSION),e}getPlayerName(){return"Chromecast"}registerListeners(){this.getNpawUtils().logAllEvents(this.player),this.monitorPlayhead(!0,!1,1200),this.references={loadstart:this.playListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),abort:this.endedListener.bind(this),ended:this.endedListener.bind(this),buffering:this.bufferingListener.bind(this)},this.hostReferences={onAutoPause:this.autoPauseListener.bind(this)};for(let e in this.references)this.player.addEventListener(e,this.references[e]);if(this.castPlayer&&this.castPlayer.getHost&&this.castPlayer.getHost()){let e=this.castPlayer.getHost();for(let t in this.hostReferences)e[t]=this.hostReferences[t]}this.registerModelVersion()}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){if("function"==typeof this.player.removeEventListener)for(let e in this.references)this.player.removeEventListener(e,this.references[e]);delete this.references}if(this.castPlayer&&this.castPlayer.getHost&&this.castPlayer.getHost()){const e=this.castPlayer.getHost();for(let t in this.hostReferences)e[t]=void 0;delete this.hostReferences}}registerModelVersion(){if(void 0===this.getVideo().options["device.model"]){try{const{hardwareConcurrency:e,userAgent:t}=window.navigator,i=cast.receiver.CastReceiverManager.getInstance();if(i.canDisplayType('video/mp4; codecs="avc1.640033'))return void(this.getVideo().options["device.model"]="Chromecast with Google TV");if(t.includes("Android"))return void(this.getVideo().options["device.model"]="Chromecast Android");if(i.canDisplayType("video/mp4; codecs=hev1.1.6.L93.B0"))return void(this.getVideo().options["device.model"]="Chromecast Ultra");if(i.canDisplayType("video/mp4; codecs=avc1.64002A"))return void(this.getVideo().options["device.model"]="Chromecast 3");if(2===e)return void(this.getVideo().options["device.model"]="Chromecast 2");if(1===e)return void(this.getVideo().options["device.model"]="Chromecast 1")}catch(e){}this.getVideo().options["device.model"]="Chromecast"}}playListener(e){this.flags.isStarted&&this.fireStop({},"playListener"),this.fireStart({},"playListener")}pauseListener(e){this.flags.isBuffering||this.firePause({},"pauseListener")}playingListener(e){this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.fireBufferEnd({},"playingListener"),this.fireJoin({},"playingListener")}errorListener(e){this.fireError(e)}endedListener(e){this.fireStop({},"endedListener")}seekingListener(e){this.fireSeekBegin({},!1,"seekingListener")}bufferingListener(e){this.flags.isPaused&&this.fireResume({},"bufferingListener"),this.fireBufferBegin({},!1,"bufferingListener")}autoPauseListener(e){e?(this.fireResume({},"autoPauseListener"),this.fireBufferBegin({},!1,"autoPauseListener")):this.fireBufferEnd({},"autoPauseListener")}},ChromecastCaf:class{adsAdapters={nativeAdsAdapter:Pr};getVersion(){return"7.0.3-chromecast-caf-jsclass"}getPlayhead(){return this.player.getCurrentTimeSec()}getPlayrate(){let e=this.player.getPlaybackRate();return e||this.flags.isPaused||(e=1),e}getDroppedFrames(){return this.castMediaElement?this.castMediaElement.webkitDroppedFrameCount:void 0}getDuration(){return this.player.getDurationSec()}getBitrate(){return this.bitrate||0}getThroughput(){let e=this.throughput||-1;if(!this.throughput&&this.castMediaElement&&this.castMediaElement.webkitVideoDecodedByteCount&&this.castMediaElement.webkitAudioDecodedByteCount){const t=this.castMediaElement.webkitVideoDecodedByteCount,i=this.castMediaElement.webkitAudioDecodedByteCount,n=this.actualCount||0;this.actualCount=t&&i>t?t:i+t;const r=JSON.parse(this.plugin.getStoredData()).q.pt||5;e=Math.round((this.actualCount-n)/(r/1e3))}return e}getRendition(){const e=this.castMediaElement?this.castMediaElement.videoWidth:void 0,t=this.castMediaElement?this.castMediaElement.videoHeight:void 0;return this.getNpawUtils().buildRenditionString(e,t,this.getBitrate())}getTitle(){return this.player.getMediaInformation().metadata.title}getIsLive(){return-1===this.getDuration()}getResource(){let e;return this.player.getMediaInformation()&&(e=this.player.getMediaInformation().contentUrl||this.player.getMediaInformation().contentId),e}getPlayerVersion(){return cast&&cast.framework?cast.framework.VERSION:void 0}getPlayerName(){return"Chromecast"}registerListeners(){this.castMediaElement=void 0;for(let e in this.player)if("object"==typeof this.player[e])for(let t in this.player[e])this.player[e][t]&&"castMediaElement"===this.player[e][t].id&&(this.castMediaElement=this.player[e][t]);const e=cast.framework.events,t=cast.framework.events.DetailedErrorCode;for(var i in this.errorFilter=[t.MEDIAKEYS_UNKNOWN,t.MEDIAKEYS_UNSUPPORTED,t.MEDIAKEYS_WEBCRYPTO,t.SEGMENT_NETWORK,t.HLS_NETWORK_INVALID_SEGMENT,t.DASH_MANIFEST_NO_MIMETYPE,t.DASH_INVALID_SEGMENT_INFO,t.TEXT_UNKNOWN,t.SEGMENT_UNKNOWN,t.BREAK_SEEK_INTERCEPTOR_ERROR,t.APP,t.IMAGE_ERROR,t.LOAD_INTERRUPTED,t.MEDIA_ERROR_MESSAGE],this.getNpawUtils().logAllEvents(this.player,[null,e.EventType.PLAY,e.EventType.PAUSE,e.EventType.PLAYING,e.EventType.STALLED,e.EventType.SEEKING,e.EventType.SEEKED,e.EventType.ER
2ROR,e.EventType.CLIP_ENDED,e.EventType.BITRATE_CHANGED,e.EventType.SEGMENT_DOWNLOADED,e.EventType.BUFFERING,e.EventType.EMSG,e.EventType.ID3,e.EventType.MEDIA_FINISHED,e.EventType.MEDIA_STATUS,e.EventType.CACHE_HIT,e.EventType.BREAK_CLIP_STARTED,e.EventType.BREAK_ENDED,e.EventType.BREAK_CLIP_LOADING,e.EventType.BREAK_CLIP_STARTED,e.EventType.BREAK_CLIP_ENDED,e.EventType.BREAK_STARTED]),this.monitorPlayhead(!0,!0),this.references={},this.references[e.EventType.PLAY]=this.playListener.bind(this),this.references[e.EventType.STALLED]=this.playListener.bind(this),this.references[e.EventType.BUFFERING]=this.bufferingListener.bind(this),this.references[e.EventType.PAUSE]=this.pauseListener.bind(this),this.references[e.EventType.BREAK_CLIP_STARTED]=this.pauseListener.bind(this),this.references[e.EventType.BREAK_ENDED]=this.resumeListener.bind(this),this.references[e.EventType.PLAYING]=this.playingListener.bind(this),this.references[e.EventType.SEEKING]=this.seekingListener.bind(this),this.references[e.EventType.MEDIA_FINISHED]=this.endedListener.bind(this),this.references[e.EventType.ERROR]=this.errorListener.bind(this),this.references[e.EventType.BITRATE_CHANGED]=this.bitrateChangedListener.bind(this),this.references[e.EventType.SEGMENT_DOWNLOADED]=this.segmentListener.bind(this),this.references[e.EventType.BREAK_STARTED]=this.playAdListener.bind(this),this.references[e.EventType.TIME_UPDATE]=this.timeUpdateListener.bind(this),this.hostReferences={onAutoPause:this.autoPauseListener.bind(this)},this.references)this.player.addEventListener(i,this.references[i]);if(cast&&cast.player&&cast.player.api&&cast.player.api.Player&&cast.player.api.Player.getHost&&cast.player.api.Player.getHost())for(var n in this.hostReferences)cast.player.api.Player.getHost().addEventListener(n,this.hostReferences[n]);this.getVideo().getAdsAdapter()||(this.getAdapterClass("nativeAdsAdapter")._updatePlayer(this.player),this.plugin.setAdsAdapter(this.getAdapterClass("nativeAdsAdapter"),this.getVideo().getVideoKey())),this.registerModelVersion()}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.removeEventListener(e,this.references[e]);if(this.references={},cast&&cast.player&&cast.player.api&&cast.player.api.Player&&cast.player.api.Player.getHost&&cast.player.api.Player.getHost()&&this.hostReferences){for(var t in this.hostReferences)this.player.getHost().removeEventListener(t,this.hostReferences[t]);this.hostReferences={}}}}registerModelVersion(){if(void 0===this.getVideo().options["device.model"]){try{const{hardwareConcurrency:e,userAgent:t}=window.navigator,i=cast.framework.CastReceiverContext.getInstance();if(i.canDisplayType('video/mp4; codecs="avc1.640033'))return void(this.getVideo().options["device.model"]="Chromecast with Google TV");if(t.includes("Android"))return void(this.getVideo().options["device.model"]="Chromecast Android");if(i.canDisplayType("video/mp4; codecs=hev1.1.6.L93.B0"))return void(this.getVideo().options["device.model"]="Chromecast Ultra");if(i.canDisplayType("video/mp4; codecs=avc1.64002A"))return void(this.getVideo().options["device.model"]="Chromecast 3");if(2===e)return void(this.getVideo().options["device.model"]="Chromecast 2");if(1===e)return void(this.getVideo().options["device.model"]="Chromecast 1")}catch(e){}this.getVideo().options["device.model"]="Chromecast"}}playListener(e){this.flags.isStarted||(this.lastPlayhead=void 0,this.fireStart({},"playListener"))}playAdListener(e){this.playListener(),this.firePause({},"playAdListener")}bufferingListener(e){this.flags.isPaused?this.plugin&&this.getVideo().isBreakStarted||(this.fireResume({},"bufferingListener"),this.fireBufferBegin({},!1,"bufferingListener")):this.fireBufferBegin({},!1,"bufferingListener"),this.flags.isStarted||(this.lastPlayhead=void 0,this.fireStart({},"bufferingListener"))}pauseListener(e){this.flags.isBuffering||this.firePause({},"pauseListener")}resumeListener(e){this.fireResume({},"resumeListener")}playingListener(e){this.plugin&&this.getVideo().isBreakStarted||(this.fireResume({},"playingListener"),this.fireBufferEnd({},"playingListener"),this.fireJoin({},"playingListener"))}errorListener(e){const t=e.error,i=e.detailedErrorCode;if(i){if(this.errorFilter.indexOf(i)>=0)return;const e=cast.framework.events.DetailedErrorCode;let n=Object.keys(e).find((function(t){return e[t]===i}))||i;t&&t.shakaErrorCode&&(n="Shaka: "+t.shakaErrorCode+" , "+n),"LOAD_CANCELLED"===t?(this.fireFatalError(i,n),this._reset()):this.fireError(i,n)}}seekingListener(e){this.fireSeekBegin({},!1,"seekingListener")}endedListener(e){this.fireStop({},"endedListener"),this._reset()}bitrateChangedListener(e){this.bitrate=e.totalBitrate}segmentListener(e){this.throughput=e.size/(e.downloadTime/1e3)}timeUpdateListener(e){this.flags.isJoined||(null===this.lastPlayhead||void 0===this.lastPlayhead?this.lastPlayhead=this.getPlayhead():this.lastPlayhead<this.getPlayhead()&&this.plugin&&(!this.plugin.getAdsAdapter()||this.plugin.getAdsAdapter()&&!this.plugin.getAdsAdapter().flags.isStarted)&&this.fireJoin({},"timeUpdateListener"))}autoPauseListener(e){e?(this.fireResume({},"autoPauseListener"),this.fireBufferBegin({},!1,"autoPauseListener")):this.fireBufferEnd({},"autoPauseListener")}_reset(e){this.lastPlayhead=void 0,this.actualCount=0,this.bitrate=void 0}},ViaccessOrca:class{_getTagFromPlayer(){return this.player.videoElement?this.player.videoElement:null}checkExistsPlayer(){try{if(this._getTagFromPlayer())return this.checkExistsObjectOnPage(this._getTagFromPlayer())}catch(e){return!0}}getVersion(){return"7.0.3-viaccessorca-js"}getPlayhead(){return this.player.currentTime}getPlayrate(){return this.flags.isPaused?0:this.player.videoElement.playbackRate||1}getDroppedFrames(){return this.player.videoElement.webkitDroppedFrameCount}getDuration(){return this.player.duration}getBitrate(){if(this.player.quality>=0&&this.player.qualities&&this.player.qualities.length){var e=this.player.qualities[this.player.quality];return e.bitrate||e.bandwidth}return null}getRendition(){if(this.player.quality>=0&&this.player.qualities&&this.player.qualities.length){var e=this.player.qualities[this.player.quality],t=e.width,i=e.he
2ight;return t&&i||(t=this.player.videoElement.videoWidth,i=this.player.videoElement.videoHeight),this.getNpawUtils().buildRenditionString(t,i,e.bitrate||e.bandwidth)}return null}getTitle(){return this.player.videoElement.title||"Unknown"}getIsLive(){return"function"==typeof this.player.isLive?this.player.isLive():this.player.isLive}getResource(){return this.player&&this.player.media?this.player.media.url:void 0}getPlayerVersion(){return this.player.version}getPlayerName(){return"Viaccess Orca"}registerListeners(){for(var e in this.monitorPlayhead(!1,!1),this.references={play:this.playListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),buffering:this.bufferingListener.bind(this),ended:this.endedListener.bind(this),abort:this.endedListener.bind(this),destroyed:this.destroyedListener.bind(this),timeupdate:this.timeupdateListener.bind(this),trackschanged:this.changedListener.bind(this)},this.references)this.player.addEventListener&&this.player.addEventListener(e,this.references[e]),this.player.on&&this.player.on(e,this.references[e])}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references)for(var e in this.references)this.player.removeEventListener&&(this.player.removeEventListener(e,this.references[e]),delete this.references[e]),this.player.off&&(this.player.off(e,this.references[e]),delete this.references[e])}playListener(e){this.firePlayerLog("playListener",{}),this.fireStart({},"playListener"),this.fireResume({},"playListener")}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireJoin({},"playingListener"),this.fireBufferEnd({},"playingListener")}errorListener(e){this.firePlayerLog("errorListener",{});try{var t=e.code||e.data&&e.data.code||"unknown",i=e.message||e.data&&e.data.message||"unknown";this.fireError(t,i,void 0,void 0,"errorListener"),this.fireStop({},!1,"errorListener")}catch(e){this.fireError("unknown","unknown",void 0,void 0,"errorListener"),this.fireStop({},!1,"errorListener")}}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}bufferingListener(e){this.firePlayerLog("bufferingListener",{buffering:e.buffering}),!0===e.buffering?this.flags.isPaused||this.flags.isSeeking||this.fireBufferBegin({},!1,"bufferingListener"):!1===e.buffering&&this.fireBufferEnd({},"bufferingListener")}endedListener(e){this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener")}destroyedListener(e){this.firePlayerLog("destroyedListener",{}),this.fireStop({},"destroyedListener")}changedListener(e){e.emittedBy&&"manifest"===e.emittedBy&&(this.firePlayerLog("changedListener",{}),this.flags.isJoined&&this.fireStop({},"changedListener"))}timeupdateListener(e){}},Hbbtv:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player)}catch(e){return!0}}getPlayerName(){return"Hbbtv"}registerListeners(){this.states=["STOPPED","PLAYING","PAUSED","CONNECTING","BUFFERING","FINISHED","ERROR"],this.monitorPlayhead(!1,!0),this.player?(this.player.onPlayStateChange=function(e){this.playStateChangeListener()}.bind(this),this.player._video&&(this.player._video.onerror=function(e){this.onErrorListener(e)}.bind(this))):Log.error("The player reference set to the adapter is invalid.")}getResource(){return this.player.data||this.player.src}playStateChangeListener(){switch(this.firePlayerLog("stateValue"+this.player.playState,{}),this.player.playState){case 0:this.firePlayerLog("stopState",{}),this.fireStop({},"stopState");break;case 1:this.bufferPlayhead&&Math.abs(this.bufferPlayhead-this.player.playPosition)>10&&(this.fireSeekBegin({},!0,"playingState"),this.bufferPlayhead=void 0),this.firePlayerLog("playingState",{}),this.fireResume({},"playingState"),this.fireSeekEnd({},"playingState"),this.fireBufferEnd({},"playingState"),this.fireJoin({},"playingState");break;case 2:this.firePlayerLog("pausedState",{}),this.firePause({},"pausedState");break;case 3:this.firePlayerLog("connectionState",{}),this.fireStart({},"connectionState");break;case 4:this.bufferPlayhead=this.player.playPosition,this.firePlayerLog("bufferingState",{}),this.fireStart({},"bufferingState"),this.fireBufferBegin({},!1,"bufferingState");break;case 5:this.firePlayerLog("finishedState",{}),this.fireStop({},"finishedState")}}onErrorListener(e){this.firePlayerLog("onErrorListener",{}),this.fireError("FAILURE","FAILURE",null,null,"onErrorListener"),this.fireStop({},"onErrorListener")}getPlayhead(){return this.player.playPosition/1e3}getDuration(){return this.player.playTime/1e3}getVersion(){return"7.0.4-hbbtvhtml5-jsclass"}},ReactNativeVideo:class{adsAdapters={genericAdsAdapter:Cr};getVersion(){return"7.0.1-react-native-video-jsclass"}getPlayhead(){const e=this.getVideo().getAdsAdapter();return e&&e.isShowingAds()?this.lastPlayhead:this.playhead}getIsLive(){return void 0!==this.duration?!this.duration:void 0}getDuration(){return this.duration}getResource(){return this.resource}getRendition(){if(this.width&&this.height)return this.getNpawUtils().buildRenditionString(this.width,this.height)}getPlayerName(){return"React Native Video"}setPlatform(e){this.reactPlatform=e}registerListeners(){this.reactPlatform&&"ios"==this.reactPlatform&&this.monitorPlayhead(!0,!0,400),this.getVideo().getAdsAdapter()||this.plugin.setAdsAdapter(this.getAdapterClass("genericAdsAdapter"),this.getVideo().getVideoKey())}unregisterListeners(){this.monitor&&this.monitor.stop()}onLoad(e){this.reactPlatform&&"ios"==this.reactPlatform&&!this.monitor&&this.monitorPlayhead(!0,!0,400);const t=e.naturalSize;t&&(this.width=Math.round(t.width),this.height=Math.round(t.height)),this.duration=e.duration,this.fireStart({},"onLoad"),this.flags.isJoined||(this.onBuffering=!1,this.fireJoin({},"onLoadStart"),this.reactPlatform&&"ios"==this.reactPlatform&&this.monitor&&this.monitor.skipNextTick()),this.pausePlayhead&&Math.abs(this.getPlayhead()-this.pausePlayhead)>.5?this.fireSeekEnd({},"onLoadStart"):this.pausePlayhead&&(this.chronos.pause.pauseTime=void 0),this.pausePlayhead=void 0,this.fireResume({},"onLoadStart")}onLoadStart(e){this.reactPlatform&&"ios"==this.reactPlatform&&!this.monitor&&this.monitorPlayhead(!0,!0,400),e.src&&(this.resource=e.src.uri),this.fireStart({},"onLoadStart")}onPlaybackRateChange(e){this.playrate=e.playbackRate,this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().isShowingAds()||(this.playrate&&this.playhead>.1?(this.fireStart({},"onPlaybackRateChange"),this.flags.isJoined||(this.onBuffering=!1,this.reactPlatform&&"ios"==this.reactPlatform&&!this.monitor&&this.monitorPlayhead(!0,!0,400),this.fireJoin({},"onPlaybackRateChange"),this.reactPlatform&&"ios"==this.reactPlatform&&this.monitor&&this.monitor.skipNextTick()),this.pausePlayhead&&Math.abs(this.getPlayhead()-this.pausePlayhead)>.5&&!this.flags.isPaused?(this.fireSeekEnd({},"onPlaybackRateChange"),this.pausePlayhead=void 0):this.pausePlayhead&&Math.abs(this.getPlayhead()-this.pausePlayhead)<.5&&!this.onBuffering&&(this.cancelSeek(),this.pausePlayhead=void 0),this.fireResume({},"onPlaybackRateChange")):this.playhead>.1&&(this.reactPlatform&&"android"==this.reactPlatform&&(this.pausePlayhead=this.getPlayhead(),this.fireSeekBegin({},!0,"onPlaybackRateChange")),this.reactPlatform&&"ios"==this.reactPlatform&&(this.lastPlayhead=this.playhead),this.firePause({},"onPlaybackRateChange"),this.reactPlatform&&"android"==this.reactPlatform&&(this.chronos.pause.startTime=(new Date).getTime())))}onProgress(e){const t=this.getVideo().getAdsAdapter();t&&t.isShowingAds()&&this.reactPlatform&&"android"==this.reactPlatform&&!this.lastPlayhead?this.lastPlayhead=this.playhead:!t||t.isShowingAds()||this.flags.isPaused||(this.lastPlayhead=void 0),!t||t.isShowingAds()||this.duration||(this.duration=e.seekableDuration),this.playhead=e.currentTime,e.playableDuration-e.currentTime>.5&&this.fireStart({},"onProgress"),this.playhead>.5&&!this.flags.isJoined&&(this.onBuffering=!1,this.fireJoin({},"onProgress"),this.reactPlatform&&"ios"==this.reactPlatform&&this.monitor&&this.monitor.skipNextTick()),this.pausePlayhead&&!this.flags.isPaused&&(Math.abs(this.getPlayhead()-this.pausePlayhead)>2?this.fireSeekEnd({},"onProgress"):this.onBuffering?(this.fireBufferBegin({},!0,"onProgress"),this.fireBufferEnd({},"onProgress"),this.onBuffering=!1):this.chronos.pause.pauseTime=void 0,this.pausePlayhead=void 0),this.playrate&&(this.onBuffering=!1)}onBuffer(e){e.isBuffering&&void 0!==this.getPlayhead()&&this.reactPlatform&&"android"==this.reactPlatform&&(this.onBuffering=!0,this.fireBufferBegin({},!1,"onBuffer"))}onError(e){let t,i;this.reactPlatform&&"android"==this.reactPlatform?(t=e.error.errorCode,i=e.error.errorException):this.reactPlatform&&"ios"==this.reactPlatform&&(t=e.error.code,i=e.error.localizedDescription),this.fireError(t,i)}onEnd(e){this.reactPlatform&&"ios"==this.reactPlatform&&this.getVideo().getAdsAdapter()?this.stopTimer=setTimeout((()=>{this.fireStop()}),this.getVideo().options["ad.postRollTimeout"]||1e3):this.fireStop()}onAdEvent(e){this.getVideo()&&this.getVideo().getAdsAdapter()&&this.getVideo().getAdsAdapter().onAdEvent(e)}},Visualon:class{getVersion(){return"7.0.2-visualon-analytics-js"}getPlayhead(){return this.player.getPosition()}getFramesPerSecond(){const e=this.player.getAnalyticsInfo();if(e&&e.streamingFps)try{return parseInt(e.streamingFps,10)}catch(e){return 0}return 0}getDroppedFrames(){const e=this.player.getAnalyticsInfo();return e&&e.droppedFrames?e.droppedFrames:0}getDuration(){return this.player.getDuration()}getBitrate(){return this.targetBitrate}getTotalBytes(){var e=this.player.getAnalyticsInfo();if(e&&e.downloadBytes)return e.downloadBytes}getRendition(){return this.getNpawUtils().buildRenditionString(this.width,this.height,this.targetBitrate)}getIsLive(){return this.player.isLive()}getResource(){var e=this.player.getAnalyticsInfo();return e&&e.videoLinkURL?e.videoLinkURL:null}getPlayerVersion(){return this.player.getVersion()}getPlayerName(){return"VisualON"}registerListeners(){if("undefined"!=typeof voPlayer&&this.player)for(var e in this.references={},this.references[voPlayer.events.VO_OSMP_SRC_CB_OPEN_FINISHED]=this.openListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_STARTED]=this.playListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_PLAYING]=this.playingListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_WAITING]=this.bufferListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_PAUSED]=this.pauseListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_COMPLETE]=this.endListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_SEEK_START]=this.seekListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_SEEK_COMPLETE]=this.seekEndListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_PLAY_TIME_UPDATED]=this.timeUpdatedListener.bind(this),this.references[voPlayer.events.VO_OSMP_CB_ERROR_EVENTS]=this.errorListener.bind(this),this.references[voPlayer.events.VO_OSMP_SRC_ADAPTIVE_STREAMING_INFO_EVENT_BITRATE_CHANGE]=this.bitrateChangeListener.bind(this),this.references)this.player.addEventListener(e,this.references[e]);this._reset()}unregisterListeners(){if("undefined"!=typeof voPlayer&&this.player&&this.references){for(let e in this.references)this.player.off(e,this.references[e]);delete this.references}}bitrateChangeListener(e){e.mediaType&&"video"===e.mediaType&&(this.targetBitrate=e.bandwidth,this.width=e.width,this.height=e.height)}openListener(e){this.fireStop({},"openListener"),this._reset()}timeUpdatedListener(e){}playListener(e){this.fireStart({},"playListener")}pauseListener(e){this.firePause({},"pauseListener")}playingListener(e){this.fireStart({},"playingListener"),this.fireJoin({},"playingListener"),this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.fireBufferEnd({},"playingListener")}seekListener(e){this.fireSeekBegin({},!1,"seekListener")}seekEndListener(e){this.fireSeekEnd({},"seekEndListener")}endListener(e){this.fireStop({},"endListener"),this._reset()}bufferListener(e){this.fireBufferBegin({},!1,"bufferListener")}errorListener(e){this.fireError(e.code,e.message,void 0,void 0,"errorListener")}_reset(){this.width=null,this.height=null,this.targetBitrate=null}},BitmovinReactNative:class{onSourceLoaded(e){this.getLog().verbose("BitmovinReactNativeAdapter","onSourceLoaded:",e),this.firePlayerLog("onSourceLoaded",e),e&&e.source&&e.source.duration&&(this.duration=e.source.duration)}onAudioChanged(e){this.getLog().verbose("BitmovinReactNativeAdapter","onAudioChanged:",e),this.firePlayerLog("onAudioChanged",e)}onVideoDownloadQualityChanged(e){this.getLog().verbose("BitmovinReactNativeAdapter","onVideoDownloadQualityChanged:",e),this.firePlayerLog("onVideoDownloadQualityChanged",e)}onVideoPlaybackQualityChanged(e){this.getLog().verbose("BitmovinReactNativeAdapter","onVideoPlaybackQualityChanged:",e),this.firePlayerLog("onVideoPlaybackQualityChanged",e),e&&(e.width&&(this.width=e.width),e.height&&(this.height=e.height),e.bitrate&&(this.bitrate=e.bitrate),e&&e.newVideoQuality&&(this.width=e.newVideoQuality.width,this.height=e.newVideoQuality.height,this.bitrate=e.newVideoQuality.bitrate))}onReady(e){this.getLog().verbose("BitmovinReactNativeAdapter","onReady:",e),this.firePlayerLog("onReady",e)}onPlay(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPlay:",e),this.firePlayerLog("onPlay",e);var t="_onPlay";e&&e.name&&(t=e.name),this.flags.isStarted||this.fireStart({},t),this.flags.isStarted&&this.fireResume({},t)}onPlaying(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPlaying:",e),this.firePlayerLog("onPlaying",e);var t="_onPlay";e&&e.name&&(t=e.name),this.flags.isJoined||this.fireJoin({},t),this.flags.isStarted&&this.fireResume({},t)}onTimeChanged(e){this.getLog().verbose("BitmovinReactNativeAdapter","onTimeChanged:",e),this.firePlayerLog("onTimeChanged",e),e&&((e.currentTime||e.time)&&(this.playhead=e.currentTime),this.playhead=e.currentTime)}onPaused(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPaused:",e),this.firePlayerLog("onPaused",e);var t="_onPaused";e&&e.name&&(t=e.name),this.firePause({},t)}onSeek(e){this.getLog().verbose("BitmovinReactNativeAdapter","onSeek:",e),this.firePlayerLog("onSeek",e);var t="_onSeek";e&&e.name&&(t=e.name),this.isSeeking=!0,this.fireSeekBegin({},!1,t)}onSeeked(e){this.getLog().verbose("BitmovinReactNativeAdapter","onSeeked:",e),this.firePlayerLog("onSeeked",e);var t="_onSeeked";e&&e.name&&(t=e.name),this.seekIntervalId&&clearInterval(this.seekIntervalId),this.isSeeking=!1,this.seekIntervalId=setInterval((()=>{this.isSeeking||(this.fireSeekEnd({},t),clearInterval(this.seekIntervalId),this.seekIntervalId=null)}),500)}onPlaybackFinished(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPlaybackFinished:",e),this.firePlayerLog("onPlaybackFinished",e);var t="_onPlaybackFinished";e&&e.name&&(t=e.name),this.fireStop({},t)}onStallStarted(e){this.getLog().verbose("BitmovinReactNativeAdapter","onStallStarted:",e),this.firePlayerLog("onStallStarted",e);var t="_onStallStarted";e&&e.name&&(t=e.name),this.fireBufferBegin({},!1,t)}onStallEnded(e){this.getLog().verbose("BitmovinReactNativeAdapter","onStallEnded:",e),this.firePlayerLog("onStallEnded",e);var t="_onStallEnded";e&&e.name&&(t=e.name),this.chronos.buffer.getDeltaTime(!1)<50?this.cancelBuffer():this.fireBufferEnd({},t)}onPlayerWarning(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPlayerWarning:",e),this.firePlayerLog("onPlayerWarning",e);var t=null,i=null;e&&(e.code&&(t=e.code),e.message&&(i=e.message)),this.fireError(t,i)}onPlayerError(e){this.getLog().verbose("BitmovinReactNativeAdapter","onPlayerError:",e),this.firePlayerLog("onPlayerError",e);var t=null,i=null;e&&(e.code&&(t=e.code),e.message&&(i=e.message)),this.fireError(t,i)}onSourceError(e){this.getLog().verbose("BitmovinReactNativeAdapter","onSourceError:",e),this.firePlayerLog("onSourceError",e);var t=null,i=null;e&&(e.code&&(t=e.code),e.message&&(i=e.message)),this.fireError(t,i)}onSourceWarning(e){this.getLog(
2).verbose("BitmovinReactNativeAdapter","onSourceWarning:",e),this.firePlayerLog("onSourceWarning",e);var t=null,i=null;e&&(e.code&&(t=e.code),e.message&&(i=e.message)),this.fireError(t,i)}getBitrate(){return this.bitrate}onDestroy(e){this.fireStop()}getVersion(){return"7.0.2-bitmovin-react-native-jsclass"}getPlayhead(){return this.playhead}getIsLive(){return!this.duration}getDuration(){return this.duration}getResource(){return this.player&&this.player.source&&this.player.source.config?this.player.source.config.url:null}getTitle(){return this.player&&this.player.source&&this.player.source.config?this.player.source.config.title:null}setPlatform(e){this.reactPlatform=e}getRendition(){if(this.width&&this.height)return this.bitrate?this.getNpawUtils().buildRenditionString(this.width,this.height,this.bitrate):this.getNpawUtils().buildRenditionString(this.width,this.height)}getPlayerName(){return"Bitmovin React Native"}},MediaKindWmc:class{registerListeners(){this.inAdBreak=!1,this.lastSeenBitrate=0,this.lastPlayhead=0,this.lastDuration=0}registerWmcManager(e){if(this.wmcEventListeners=new Map,!e)return;this.wmcManager=e;const t=amc.AmcEvents,i=this._checkAdsAdapter.bind(this),n=this.errorListener.bind(this),r=this.playbackStartedListener.bind(this),s=this.bitrateChangedListener.bind(this),a=this.metricsUpdateListener.bind(this),o=this.programChangedListener.bind(this),l=this.seekCompletedListener.bind(this),d=this.stateChangedListener.bind(this),u=this.positionChangedListener.bind(this);this.wmcEventListeners.set(t.AMC_EVENT_AD_BREAK,i),this.wmcManager.addEventListener(t.AMC_EVENT_AD_BREAK,i),this.wmcEventListeners.set(t.AMC_EVENT_BIT_RATE_CHANGED,s),this.wmcManager.addEventListener(t.AMC_EVENT_BIT_RATE_CHANGED,s),this.wmcEventListeners.set(t.AMC_EVENT_ERROR,n),this.wmcManager.addEventListener(t.AMC_EVENT_ERROR,n),this.wmcEventListeners.set(t.AMC_EVENT_INIT_COMPLETE,r),this.wmcManager.addEventListener(t.AMC_EVENT_INIT_COMPLETE,r),this.wmcEventListeners.set(t.AMC_EVENT_METRICS_UPDATE,a),this.wmcManager.addEventListener(t.AMC_EVENT_METRICS_UPDATE,a),this.wmcEventListeners.set(t.AMC_EVENT_PLAYER_METADATA,a),this.wmcManager.addEventListener(t.AMC_EVENT_PLAYER_METADATA,a),this.wmcEventListeners.set(t.AMC_EVENT_PLAYOUT_METRIC_UPDATE,a),this.wmcManager.addEventListener(t.AMC_EVENT_PLAYOUT_METRIC_UPDATE,a),this.wmcEventListeners.set(t.AMC_EVENT_PLAY_READY,r),this.wmcManager.addEventListener(t.AMC_EVENT_PLAY_READY,r),this.wmcEventListeners.set(t.AMC_EVENT_PROGRAM_CHANGED,o),this.wmcManager.addEventListener(t.AMC_EVENT_PROGRAM_CHANGED,o),this.wmcEventListeners.set(t.AMC_EVENT_SEEK_COMPLETE,l),this.wmcManager.addEventListener(t.AMC_EVENT_SEEK_COMPLETE,l),this.wmcEventListeners.set(t.AMC_EVENT_STATE_CHANGED,d),this.wmcManager.addEventListener(t.AMC_EVENT_STATE_CHANGED,d),this.wmcEventListeners.set(t.AMC_EVENT_VIDEO_POSITION_CHANGED,u),this.wmcManager.addEventListener(t.AMC_EVENT_VIDEO_POSITION_CHANGED,u)}unregisterListeners(){this.wmcEventListeners.forEach(((e,t)=>{this.wmcManager.removeEventListener(t,e)})),this.wmcEventListeners.clear()}_checkAdsAdapter(){const e=this.getVideo().getAdsAdapter();return e?e&&!e.player&&e.setPlayer(this.player):(this.plugin.setAdsAdapter(this.getAdapterClass("nativeAdsAdapter"),this.getVideo().getVideoKey()),this.getVideo().getAdsAdapter().registerListeners(this.wmcManager)),null}playbackStartedListener(e){this.flags.isStarted||(this.firePlayerLog("playbackStarted",{}),this.lastPlayhead=0,this.fireStart({},"playbackStarted"),this.failedView=!1)}bitrateChangedListener(e){this.firePlayerLog("bitrateChangedListener",{}),e.value1&&(this.lastSeenBitrate=e.value1)}metricsUpdateListener(e){this.firePlayerLog("metricsUpdateListener",{}),e.value1&&(e.value1.audio&&e.value1.audio.codec&&(this.audioCodec=e.value1.audio.codec),e.value1.video&&(e.value1.video.codec&&(this.videoCodec=e.value1.video.codec),e.value1.video.frameRate&&(this.fps=e.value1.video.frameRate),e.value1.video.resolution&&(this.resolution=e.value1.video.resolution),e.value1.video.droppedFrames&&(this.droppedFrames=e.value1.video.droppedFrames),e.value1.video.latency&&(this.latency=e.value1.video.latency))
2)}programChangedListener(e){return this.firePlayerLog("programChangedListener",{}),null}seekCompletedListener(e){return this.firePlayerLog("seekCompletedListener",{}),this.flags.isSeeking||this.fireSeekBegin({},!1,"seekCompletedListener"),this.fireSeekEnd({},"seekCompletedListener"),null}stateChangedListener(e){switch(this.firePlayerLog("stateChangedListener",{}),e.value1){case amc.AmcConstants.IMC_STATE_PLAY_NONE:break;case amc.AmcConstants.IMC_STATE_PLAY_STARTED:this.inAdBreak||(this.flags.isStarted||this.fireStart({},"IMC_STATE_PLAY_STARTED"),this.flags.isJoined||this.fireJoin({},"IMC_STATE_PLAY_STARTED"));break;case amc.AmcConstants.IMC_STATE_PLAY_PAUSED:this.firePause({},"IMC_STATE_PLAY_PAUSED");break;case amc.AmcConstants.IMC_STATE_PLAY_RESUMED:this.flags.isSeeking?this.fireSeekEnd({},"IMC_STATE_PLAY_RESUMED"):this.flags.isBuffering&&this.fireBufferEnd({},"IMC_STATE_PLAY_RESUMED"),this.flags.isPaused&&this.fireResume({},"IMC_STATE_PLAY_RESUMED");break;case amc.AmcConstants.IMC_STATE_PLAY_STOPPED:this.inAdBreak||this.fireStop({},"IMC_STATE_PLAY_STOPPED");break;case amc.AmcConstants.IMC_STATE_SEEKING:this.inAdBreak||this.fireSeekBegin({},!1,"IMC_STATE_SEEKING");break;case amc.AmcConstants.IMC_STATE_PLAY_COMPLETED:this.inAdBreak||this.fireStop({},"IMC_STATE_PLAY_COMPLETED");break;case amc.AmcConstants.IMC_STATE_BUFFERING_STARTED:this.flags.isSeeking||this.fireBufferBegin({},!1,"IMC_STATE_BUFFERING_STARTED");break;case amc.AmcConstants.IMC_STATE_BUFFERING_STOPPED:this.flags.isSeeking?this.fireSeekBegin({},!1,"IMC_STATE_BUFFERING_STOPPED"):this.fireBufferEnd({},"IMC_STATE_BUFFERING_STOPPED");break;case amc.AmcConstants.IMC_STATE_DOWNLOAD_STARTED:case amc.AmcConstants.IMC_STATE_DOWNLOAD_STOPPED:case amc.AmcConstants.IMC_STATE_DOWNLOAD_COMPLETED:case amc.AmcConstants.IMC_STATE_DOWNLOAD_PAUSED:case amc.AmcConstants.IMC_STATE_DOWNLOAD_CANCELLED:case amc.AmcConstants.IMC_STATE_DOWNLOAD_PLAY_READY:break;case amc.AmcConstants.IMC_STATE_ADS_STARTED:this.inAdBreak=!0;break;case amc.AmcConstants.IMC_STATE_ADS_COMPLETED:this.inAdBreak=!1;break;case amc.AmcConstants.IMC_STATE_DONE:this.inAdBreak||this.fireStop({},"IMC_STATE_DONE")}return null}translateImcEvent(e){return{[amc.AmcConstants.IMC_STATE_PLAY_NONE]:"Play None",[amc.AmcConstants.IMC_STATE_PLAY_STARTED]:"Play Started",[amc.AmcConstants.IMC_STATE_PLAY_PAUSED]:"Play Paused",[amc.AmcConstants.IMC_STATE_PLAY_RESUMED]:"Play Resumed",[amc.AmcConstants.IMC_STATE_PLAY_STOPPED]:"Play Stopped",[amc.AmcConstants.IMC_STATE_PLAY_COMPLETED]:"Play Completed",[amc.AmcConstants.IMC_STATE_BUFFERING_STARTED]:"Buffering Started",[amc.AmcConstants.IMC_STATE_BUFFERING_STOPPED]:"Buffering Stopped",[amc.AmcConstants.IMC_STATE_SEEKING]:"Seeking",[amc.AmcConstants.IMC_STATE_ADS_STARTED]:"Ads Started",[amc.AmcConstants.IMC_STATE_ADS_COMPLETED]:"Ads Completed",[amc.AmcConstants.IMC_STATE_DOWNLOAD_STARTED]:"Download Started",[amc.AmcConstants.IMC_STATE_DOWNLOAD_STOPPED]:"Download Stopped",[amc.AmcConstants.IMC_STATE_DOWNLOAD_COMPLETED]:"Download Completed",[amc.AmcConstants.IMC_STATE_DOWNLOAD_PAUSED]:"Download Paused",[amc.AmcConstants.IMC_STATE_DOWNLOAD_CANCELLED]:"Download Cancelled",[amc.AmcConstants.IMC_STATE_DOWNLOAD_PLAY_READY]:"Download Play Ready",[amc.AmcConstants.IMC_STATE_DONE]:"Done"}[e]||"Unknown IMC Event"}positionChangedListener(e){return this.firePlayerLog("positionChangedListener",{}),e.value1?this.lastPlayhead=e.value1:e.videoPosition&&(this.lastPlayhead=e.videoPosition),e.videoDuration&&(this.lastDuration=e.videoDuration),this.getPlayhead()>.2&&(this.getIsLive()||this.getPlayhead()+1<this.getDuration())&&(this.flags.isStarted||(this.fireStart({},"positionChangedListener"),this.failedView=!1),this.flags.isJoined||this.fireJoin({},"positionChangedListener")),!this.player.doIsPaused()&&this.flags.isSeeking&&this.fireSeekEnd({},"positionChangedListener"),null}errorListener(e){if(!this.failedView)return this.firePlayerLog("errorListener",{}),this.flags.isStarted||(this.failedView=!0),e.code?this.fireError(e.code,e.message,void 0,void 0,"errorListener"):this.fireError(e,"Error",void 0,void 0,"errorListener"),this.fireStop(this.getStopParams()),null}getVersion(){return"7.0.1-mediakind-wmc-jsclass"}getPlayhead(){return this.player?this.player.getCurrentTime():this.lastPlayhead}_getPlayhead(){return this.getPlayhead()}getPlayrate(){return this.player?this.player.getPlaybackRate():null}getStopParams(){let e={};return this.getVideo().getPlayhead()>0&&(e={playhead:this.getVideo().getPlayhead()}),e}getDroppedFrames(){return this.player&&this.player.doGetPlayer?this.player.doGetPlayer().getDroppedVideoFrames():null}getDuration(){return this.player?this.player.doGetVideoDuration()??this.lastDuration:this.lastDuration}getBitrate(){if(this.lastSeenBitrate)return this.lastSeenBitrate;let e=null;if(this.player){const t=this.player.doGetPlayer().getPlaybackVideoData(),i=this.player.doGetPlayer().getVideoQuality();i&&i.bitrate?e=i.bitrate:t&&t.bitrate&&(e=t.bitrate)}return e}getRendition(){let e=null;const t=this.getBitrate(),i=this.getResolution();if(t&&i){const[n,r]=i.split("x").map(Number);e=this.getNpawUtils().buildRenditionString(n,r,t)}else if(this.player){const t=this.player.doGetPlayer().getPlaybackVideoData(),i=this.player.doGetPlayer().getVideoQuality(),n=this.player.doGetPlayer().getStreamType();i&&i.bitrate?e=this.getNpawUtils().buildRenditionString(i.width,i.height,i.bitrate):t&&t.bitrate?e=this.getNpawUtils().buildRenditionString(t.width,t.height,t.bitrate):"progressive"===n&&(i?e=this.getNpawUtils().buildRenditionString(i.width,t.height):t&&(e=this.getNpawUtils().buildRenditionString(t.width,t.height)))}return e}getIsLive(){return this.player?this.player.isLive():null}getPlayerVersion(){return this.wmcManager?this.wmcManager.getAmcVersion():null}getPlayerName(){return"MediaKind"}getFramesPerSecond(){if(this.fps)return this.fps;let e=null;if(this.player){const t=this.player.doGetPlayer().getPlaybackVideoData(),i=this.player.doGetPlayer().getVideoQuality();i&&i.frameRate?e=i.frameRate:t&&t.frameRate&&(e=t.frameRate)}return e}getThroughput(){return null}getVideoCodec(){if(this.videoCodec)return this.videoCodec;let e=null;if(this.player){const t=this.player.doGetPlayer().getPlaybackVideoData(),i=this.player.doGetPlayer().getVideoQuality();
2i&&i.codec?e=i.codec:t&&t.codec&&(e=t.codec)}return e}getAudioCodec(){return this.audioCodec?this.audioCodec:null}getTotalBytes(){return null}getResource(){return this.player&&this.player.doGetPlayer?this.player.manifestUrl||this.player.doGetPlayer().getSource():null}getResolution(){return this.resolution?this.resolution:null}getProgram(){let e=null;return wmcMgr.doGetProgramInfo&&(e=wmcMgr.doGetProgramInfo().name),e}},TCPlayer:class{checkExistsPlayer(){try{return this.checkExistsObjectOnPage(this.player)}catch(e){return!0}}pauseListener(e){this.firePlayerLog("pauseListener",{}),this.firePause({},"pauseListener")}bufferingListener(e){this.firePlayerLog("waitingListener",{}),this.fireBufferBegin({},!1,"waitingListener")}getIsLive(){return this.player.duration()===1/0}playListener(e){this.firePlayerLog("playListener",{}),this.player&&this.playhead&&this.checkReadyState(this.player.readyState,"playListener"),(void 0===this.lastResource||this.getResource()&&this.lastResource!==this.getResource())&&(this.lastResource=this.getResource().split("?")[0]),this.fireStart({},"playListener")}registerListeners(){this.references={play:this.playListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),loadstart:this.loadStartListener.bind(this),error:this.errorListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),ended:this.endedListener.bind(this),waiting:this.bufferingListener.bind(this),timeupdate:this.timeupdateListener.bind(this),canplay:this.canPlayListener.bind(this),canplaythrough:this.canPlayThroughListener.bind(this),loadedmetadata:this.loadedMetadataListener.bind(this),loadeddata:this.loadedDataListener.bind(this)};for(const e in this.references)this.references[e]&&this.player.on(e,this.references[e])}endedListener(e){const t=this.getVideo().getAdsAdapter();let i=!1;t&&void 0!==t.isDAI&&(t.isDAI||(i=t.player.getCuePoints().includes(-1))),i||(this.firePlayerLog("endedListener",{}),this.fireStop({},"endedListener"))}getPlayrate(){return this.player.playbackRate()}canPlayListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayListener")}canPlayThroughListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"canPlayThroughListener")}timeupdateListener(e){(this.getPlayhead()>0||this.getVideo()&&this.getVideo().getIsLive())&&!this.player.error&&(this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"))}getResource(){return this.player.src()}getPlayhead(){return this.player.currentTime()}getDuration(){return this.player.duration()}getDroppedFrames(){return this.player.getVideoPlaybackQuality().droppedVideoFrames}seekingListener(e){this.firePlayerLog("seekingListener",{}),this.fireSeekBegin({},!1,"seekingListener")}getPlayerName(){return"tcplayer"}playingListener(e){this.firePlayerLog("playingListener",{}),this.fireJoin({},"playingListener"),this.fireResume({},"playingListener"),this.fireSeekEnd({},"playingListener"),this.flags.isBuffering&&this.fireBufferEnd({},"playingListener")}errorListener(e){this.firePlayerLog("errorListener",{});var t=null,i=null;try{e&&e.target&&e.target.error&&(i=e.target.error.code,t=e.target.error.message)}catch(e){}this.fireError(i,t,void 0,void 0,"errorListener")}loadedMetadataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedMetadataListener")}getVersion(){return"7.0.0-tcplayer-jsclass"}seekedListener(e){this.firePlayerLog("seekedListener",{}),this.fireSeekEnd({},"seekedListener")}loadStartListener(e){this.firePlayerLog("loadStartListener",{}),this.flags.isJoined&&this.getResource()&&this.getResource().split("?")[0]!==this.lastResource&&this.fireStop({},"loadStartListener")}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references)for(var e in this.references)this.player.removeEventListener(e,this.references[e]),delete this.references[e]}loadedDataListener(e){this.player&&(this.playhead||this.getVideo()&&this.getVideo().getIsLive())&&this.checkReadyState(this.player.readyState,"loadedDataListener")}},AVPlay:class{checkExistsPlayer(){return!!this.player}getVersion(){return"7.0.2-samsungavplay-jsclass"}getPlayhead(){return this.player?(parseInt(this.player.getCurrentTime(),10)||0)/1e3:0}getIsLive(){return!(!this.player||!this.player.getStreamingProperty("IS_LIVE"))&&1===parseInt(this.player.getStreamingProperty("IS_LIVE"))}getDuration(){if(this.player){const e=parseInt(this.player.getDuration(),10);if(e&&e>0)return e/1e3}return-1}getPlayrate(){return 1}getPlayerName(){return"Tizen-AVPlay"}getPlayerVersion(){return this.player.getVersion()}registerListeners(){let e={onbufferingstart:this.onBufferingStart.bind(this),onbufferingprogress:this.onBufferingProgress.bind(this),onbufferingc
2omplete:this.onBufferingComplete.bind(this),onstreamcompleted:this.onStreamCompleted.bind(this),oncurrentplaytime:this.onCurrentPlayTime.bind(this),onevent:this.onEvent.bind(this),onerror:this.onError.bind(this)};this.player&&e&&this.player.setListener(e),this._wrapPlayerFunctions()}unregisterListeners(){this.player.setListener({}),this._unwrapPlayerFunctions()}onBufferingStart(){this.flags.isJoined&&this.fireBufferBegin({},!1,"onBufferingStart")}onBufferingComplete(){this.flags.isJoined?this.fireBufferEnd({},"onBufferingComplete"):this.fireJoin({},"onBufferingComplete")}onStreamCompleted(){this.fireStop({},"onStreamCompleted")}onError(e){this.fireError(e,"AVPlay error")}_wrapPlayerFunctions(){this.player&&(this.player.prepare&&"function"==typeof this.player.prepare&&(this.originalPrepare=this.player.prepare.bind(this.player),this.originalPrepare&&(this.player.prepare=(...e)=>{this.flags.initCalled||(this.flags.initCalled=!0,this.fireInit({},"prepare")),this.originalPrepare(...e)})),this.player.prepareAsync&&"function"==typeof this.player.prepareAsync&&(this.originalPrepareAsync=this.player.prepareAsync.bind(this.player),this.originalPrepareAsync&&(this.player.prepareAsync=(e,t)=>{this.flags.initCalled||(this.flags.initCalled=!0,this.fireInit({},"prepareAsyncWrapper")),this.originalPrepareAsync((()=>{"function"==typeof e&&e()}),(e=>{"function"==typeof t&&t(e)}))})),this.player.play&&"function"==typeof this.player.play&&(this.originalPlay=this.player.play.bind(this.player),this.originalPlay&&(this.player.play=()=>{this.flags.isPaused&&this.fireResume({},"playWrapper"),this.originalPlay()})),this.player.pause&&"function"==typeof this.player.pause&&(this.originalPause=this.player.pause.bind(this.player),this.originalPause&&(this.player.pause=()=>{this.firePause({},"pauseWrapper"),this.originalPause()})),this.player.seekTo&&"function"==typeof this.player.seekTo&&(this.originalSeekTo=this.player.seekTo.bind(this.player),this.originalSeekTo&&(this.player.seekTo=e=>{this.fireSeekBegin({},!1,"seekTo"),this.originalSeekTo(e),setTimeout((()=>{this.fireSeekEnd({},"seekToWrapper")}),500)})),this.player.stop&&"function"==typeof this.player.stop&&(this.originalStop=this.player.stop.bind(this.player),this.originalStop&&(this.player.stop=()=>{this.fireStop({},"stopWrapper"),this.originalStop()})))}_unwrapPlayerFunctions(){this.player&&(this.originalPrepare&&"function"==typeof this.originalPrepare&&(this.player.prepare=this.originalPrepare,this.originalPrepare=null),this.originalPrepareAsync&&"function"==typeof this.originalPrepareAsync&&(this.player.prepareAsync=this.originalPrepareAsync,this.originalPrepareAsync=null),this.originalPlay&&"function"==typeof this.originalPlay&&(this.player.play=this.originalPlay,this.originalPlay=null),this.originalPause&&"function"==typeof this.originalPause&&(this.player.pause=this.originalPause,this.originalPause=null),this.originalSeekTo&&"function"==typeof this.originalSeekTo&&(this.player.seekTo=this.originalSeekTo,this.originalSeekTo=null),this.originalStop&&"function"==typeof this.originalStop&&(this.player.stop=this.originalStop,this.originalStop=null))}}},ads:{Ima:class{pauseListener(e){this.firePause()}getAdInsertionType(){return this.isDAI?this.getNpawReference().Constants.AdInsertionType.ServerSide:this.getNpawReference().Constants.AdInsertionType.ClientSide}progressDAIListener(e){e.getStreamData&&e.getStreamData()?this.playhead=e.getStreamData().adProgressData.currentTime:"function"==typeof e.getAdData&&e.getAdData()&&(this.playhead=e.getAdData().currentTime),this.fireJoin()}getRendition(){let e=null;if(this.player)if(this.isDAI)this.width&&this.height&&(e=this.width+"x"+this.height);else{const t=this.player.getCurrentAd();e=t.getVastMediaWidth().toString()+"x"+t.getVastMediaHeight().toString()}return e}startDAIListener(e){this.isDAI=!0,this.playhead=0}getPlayerVersion(){return google.ima.VERSION}playListener(e){this.isDAI=!1,this.adPosition=this.getAdPosition();const t="function"==typeof e.getAdData?e.getAdData():null;this.totalAds=t&&t.adPodInfo?t.adPodInfo.totalAds:null,this.plugin.fireInit(void 0,"playListener",this.getVideo().getVideoKey()),this.getVideo().getAdapter()&&this.getVideo().getAdapter().firePause(),this.fireStart({adPlayhead:"0"})}getTitle2(){let e=this.advertiser;return this.player&&!this.isDAI&&(e=this.player.getCurrentAd().getAdvertiserName()),e}errorDAIListener(e){this.fireError(),this.fireStop()}secondQuartileListener(e){this.fireQuartile(2)}endedListener(e){this.lastDuration?this.fireStop({adPlayhead:this.lastDuration}):this.fireStop()}getGivenBreaks(){let e=null;return this.player&&this.player.getCuePoints&&(e=this.player.getCuePoints().length),e}loadedListener(e){const t="function"==typeof e.getAdData?e.getAdData():null;this.totalAds=t&&t.adPodInfo?t.adPodInfo.totalAds:void 0,this.clickUrl=t?t.clickThroughUrl:void 0,this.plugin.isBreakStarted&&this.playListener(e)}getPlayhead(){let e=this.playhead;return this.flags.isJoined?this.player&&!this.isDAI&&(e=this.getDuration()-this.player.getRemainingTime()):e=0,e}getDuration(){let e=this.duration;return this.player&&!this.isDAI&&(this.player.getCurrentAd&&this.player.getCurrentAd()&&(this.lastDuration=this.player.getCurrentAd().getDuration()),e=this.lastDuration),e}getGivenAds(){return this.totalAds}getIsSkippable(){let e=null;return this.player&&this.player.getCurrentAd&&(e=this.player.getCurrentAd().g.skippable),e}getCreativeId(){let e=null;return!this.isDAI&&this.player.getCurrentAd()&&(e=this.player.getCurrentAd().getCreativeId()),e}thirdQuartileListener(e){this.fireQuartile(3)}getAudioEnabled(){let e=null;return this.player&&(e=!this.player.getVolume||0!==this.player.getVolume()),e}getVersion(){return"7.0.9-ima-jsclass"}logListener(e){if("function"==typeof e.getAdData&&e.getAdData().adError){const t=e.getAdData().adError;this.fireError(t.getErrorCode(),t.getMessage()),this.fireStop()}}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(let e in this.references)this.player.removeEventListener(e,this.references[e]);this.references={}}}clickListener(e){let t=this.clickUrl;const i=this.player.getCurrentAd();i&&i.g&&i.g.clickThroughUrl&&(t=i.g.clickThroughUrl);const n=(new Date).getTime();this.lastUrl===t&&n<(this.lastTime||0)+2e3||(this.lastUrl=t,this.lastTime=n,this.fireClick(t))}getAdPosition(){let e=this.getNpawReference().Constants.AdPosition.Midroll;if(this.isDAI){const t=this.getVideo().getAdapter();t&&(!t.flags.isJoined||t.getPlayhead()<1)?e=this.getNpawReference().Constants.AdPosition.Preroll:t&&t.flags.isJoined&&t.getPlayhead()+this.duration+1>=t.getDuration()&&(e=this.getNpawReference().Constants.AdPosition.Postroll)}else switch(this.player.getCurrentAd().getAdPodInfo().getTimeOffset()){case 0:e=this.getNpawReference().Constants.AdPosition.Preroll;break;case-1:e=this.getNpawReference().Constants.AdPosition.Postroll}return e}firstQuartileListener(e){this.fireQuartile(1)}getIsLive(){let e=null;return this.player.levels&&this.player.levels[this.player.currentLevel]&&(e=this.player.levels[this.player.currentLevel].details.live),e}getTitle(){let e=this.title;return this.player&&!this.isDAI&&(e=this.player.getCurrentAd().getTitle()),e}registerListeners(){if(this.references={},google.ima.AdEvent){this.monitorPlayhead(!0,!1);const e=google.ima.AdEvent.Type;this.references[e.CONTENT_PAUSE_REQUESTED]=this.playListener.bind(this),this.references[e.LOADED]=this.loadedListener.bind(this),this.references[e.PAUSED]=this.pauseListener.bind(this),this.references[e.STARTED]=this.playingListener.bind(this),this.references[e.RESUMED]=this.playingListener.bind(this),this.references[google.ima.AdErrorEvent.Type.AD_ERROR]=this.errorListener.bind(this),this.references[e.COMPLETE]=this.endedListener.bind(this),this.references[e.CONTENT_RESUME_REQUESTED]=this.endedListener.bind(this),this.references[e.SKIPPED]=this.skippedListener.bind(this),this.references[e.CLICK]=this.clickListener.bind(this),this.references[e.ALL_ADS_COMPLETED]=this.endedViewListener.bind(this),this.references[e.LOG]=this.logListener.bind(this),this.references[e.FIRST_QUARTILE]=this.firstQuartileListener.bind(this),this.references[e.MIDPOINT]=this.secondQuartileListener.bind(this),this.references[e.THIRD_QUARTILE]=this.thirdQuartileListener.bind(this),this.references[e.CONTENT_RESUME_REQUESTED]=this.breakEndListener.bind(this)}if(google.ima.dai){const e=google.ima.dai.api.StreamEvent.Type;this.references[e.SKIPPED]=this.skippedL.bind(this),this.references[e.ERROR]=this.errorDAIListener.bind(this),this.references[e.AD_BREAK_STARTED]=this.startDAIListener.bind(this),this.references[e.AD_BREAK_ENDED]=this.stopDAIListener.bind(this),this.references[e.AD_PROGRESS]=this.progressDAIListener.bind(this),this.references[e.CLICK]=this.clickDAIListener.bind(this),this.references[e.STARTED]=this.joinDAIListener.bind(this),this.references[e.LOADED]=this.loadedDAIListener.bind(this),this.references[e.COMPLETE]=this.completeDAIListener.bind(this),this.references[e.FIRST_QUARTILE]=this.firstQuartileListener.bind(this),this.references[e.MIDPOINT]=this.secondQuartileListener.bind(this),this.references[e.THIRD_QUARTILE]=this.thirdQuartileListener.bind(this),this.references[e.PAUSED]=this.pauseDAIListener.bind(this),this.references[e.RESUMED]=this.resumeDAIListener.bind(this)}if(this.player)for(let e in this.references)this.player.addEventListener(e,this.references[e])}loadedDAIListener(e){if(e.getStreamData){const t=e.getStreamData();t&&(this.resource=t.url)}}stopDAIListener(e){this.fireStop({adPlayhead:this.duration}),this.getVideo().getAdapter()&&this.getVideo().getAdapter().fireResume(),this.fireBreakStop()}getResource(){let e=null;return!this.isDAI&&this.player.getCurrentAd()?e=this.player.getCurrentAd().getMediaUrl():this.isDAI&&(e=this.resource),e}getProvider(){let e=null;return!this.isDAI&&this.player.getCurrentAd()&&(e=this.player.getCurrentAd().getAdSystem(
2)),e}skippedL(){this.fireSkip()}skippedListener(e){this.fireSkip({adPlayhead:this.getPlayhead()})}joinDAIListener(e){const t=e.getAd();t&&(this.duration=t.getDuration(),this.title=t.getTitle(),this.width=t.getVastMediaWidth(),this.height=t.getVastMediaHeight(),this.advertiser=t.getAdvertiserName(),this.adPosition=this.getAdPosition()),this.getVideo().getAdapter()&&this.getVideo().getAdapter().firePause(),this.plugin.fireInit(void 0,"joinDAIListener",this.getVideo().getVideoKey()),this.fireStart(),this.fireJoin()}completeDAIListener(e){this.fireStop({},"completeDAIListener")}getPlayerName(){return"IMA"}getIsVisible(){let e=null;if(this.player){if(!this.contentPlayer)for(const e in this.player){const t=this.player[e];if(t&&t.videoHeight&&t.clientHeight){this.contentPlayer=t;break}}e=this.getNpawUtils().calculateAdViewability(this.contentPlayer)}return e}playingListener(e){this.fireStart({adPlayhead:"0"}),this.fireResume(),this.fireSeekEnd(),this.fireBufferEnd(),this.fireJoin({adPlayhead:"0"})}endedViewListener(e){this.getPosition()===this.getNpawReference().Constants.AdPosition.Postroll&&this.getVideo().getAdapter().fireStop({},"endedViewListener")}getPosition(){let e=null;return this.player&&(e=this.getVideo().getAdapter()&&!this.getVideo().getAdapter().flags.isJoined?this.getNpawReference().Constants.AdPosition.Preroll:this.getIsLive()?this.getNpawReference().Constants.AdPosition.Midroll:this.adPosition||this.getNpawReference().Constants.AdPosition.Midroll),e}errorListener(e){this.fireError(),this.fireStop()}breakEndListener(e){this.fireBreakStop()}getBreaksTime(){let e=null;return this.player&&this.player.getCuePoints&&(e=this.player.getCuePoints(),e.forEach(function(t,i){-1!==e[i]&&null!==e[i]&&void 0!==e[i]||(e[i]=this.plugin._adapter.getDuration())}.bind(this))),e}clickDAIListener(e){this.fireClick(this.clickUrl)}pauseDAIListener(e){this.firePause();var t=this.getVideo().getAdapter();t&&(t.flags.isAdPaused=!0)}resumeDAIListener(e){this.fireResume();var t=this.getVideo().getAdapter();t&&(t.flags.isAdPaused=!1)}},BrightcoveFreewheel:class{isUsed(){return!this.player.ima3&&this.player.ads}getVersion(){return"7.0.4-videojs-bcove-freewheel-ads-jsclass"}getPlayhead(){if(this.player.ads.ad)return this.player.ads.ad.currentTime()}getPosition(){switch(this.player.ads.ad.type){case"PREROLL":return this.getNpawReference().Constants.AdPosition.Preroll;case"POSTROLL":return this.videoEnded=!0,this.getNpawReference().Constants.AdPosition.Postroll}return this.getNpawReference().Constants.AdPosition.Midroll}getResource(){if(this.player.ads.contentSrc)return this.player.ads.contentSrc}getTitle(){if(this.player.ads.ad&&this.player.ads.ad.id)return this.player.ads.ad.id}getDuration(){if(this.player.ads.ad&&this.player.ads.ad.duration)return this.lastDuration=this.player.ads.ad.duration,this.lastDuration}getPlayerName(){return"Freewheel"}getPlayerVersion(){return"undefined"!=typeof tv&&tv.freewheel&&tv.freewheel.SDK?tv.freewheel.SDK.version:this.player.ads.VERSION}registerListeners(){for(var e in this.monitorPlayhead(!0,!1),this.references=[],this.references["ads-ad-started"]=this.adStartListener.bind(this),this.references["ads-ad-ended"]=this.adEndedListener.bind(this),this.references["ads-pause"]=this.adPausedListener.bind(this),this.references["ads-play"]=this.adResumedListener.bind(this),this.references["ads-first-quartile"]=this.firstQuartileListener.bind(this),this.references["ads-midpoint"]=this.secondQuartileListener.bind(this),this.references["ads-third-quartile"]=this.thirdQuartileListener.bind(this),this.references["ads-pod-ended"]=this.adPodEndListener.bind(this),this.references.adserror=this.errorListener.bind(this),this.references)this.player.on(e,this.references[e])}firstQuartileListener(e){this.fireQuartile(1)}secondQuartileListener(e){this.fireQuartile(2)}thirdQuartileListener(e){this.fireQuartile(3)}adPodEndListener(e){this.fireBreakStop()}adStartListener(e){this.fireStart(),this.fireJoin()}adPausedListener(e){this.firePause()}adResumedListener(e){this.fireResume()}adEndedListener(e){this.fireStop({adPlayhead:this.lastDuration}),this.fireStop();const t=this.getVideo().getAdapter();t&&(this.videoEnded?(t.fireStop(),this.videoEnded=null):t.fireResume())}errorListener(e){this.fireError("Ad error")}unregisterListeners(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var e in this.references)this.player.off(e,this.references[e]);this.references=[]}}}}},Dr=Lr;function kr(e,t,i){return t=se(t),re(e,Ir()?Reflect.construct(t,i||[],se(e).constructor):t.apply(e,i))}function Ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ir=function(){return!!e})()}var Rr=function(e){function t(){return o(this,t),kr(this,t,arguments)}return(0,ae.A)(t,e),u(t,[{key:"getPlayerName",value:function(){return Fn.PLAYER_NAME}}])}(Dr.video.Videojs),Nr=function(){return u((function e(){return o(this,e),c(this,"npawPlugin",null),c(this,"isInitialized",!1),e.instance||(e.instance=this),e.instance}),[{key:"initialize",value:function(e){if(!this.isInitialized)try{var t=e||"zee5";this.npawPlugin=new(Vn())(t,{components:{balancer:!1}}),this.npawPlugin.setLogLevel(1),this.isInitialized=!0,console.log("NPAW Plugin initialized with: ".concat(t)),Object.freeze(this)}catch(e){console.error("Failed to initialize NPAW Plugin:",e)}}},{key:"getPlugin",value:function(){return this.npawPlugin}},{key:"setUserOptions",value:function(e){if(this.npawPlugin)try{this.npawPlugin.setAnalyticsOptions({userName:e.userName||"Not-Applicable",userId:e.userId||"Not-Applicable","user.type":e.userType||"guest"})}catch(e){console.error("npaw setUserOptions failed",e)}}},{key:"registerVideoAdapter",value:function(e,t,i,n){if(this.npawPlugin){console.log("Registering video adapter for videojs Player... **");try{if(e){this.setUserOptions({userName:null==i?void 0:i.name,userId:(null==i?void 0:i.id)||V("guestToken"),userType:k("userType")});var r=ar(e,t);this.npawPlugin.registerAdapterFromClass(e,Rr,r,"",(function(){console.log("Video adapter registered successfully. **")})),this.npawPlugin.setAnalyticsOptions(c(c(c({},"app.name",Fn.PLATFORM_NAME),"app.releaseVersion",(null==n?void 0:n.appVersion)||"Not-Received"),"user.email",(null==i?void 0:i.email)||Fn.NOT_RECEIVED))}}catch(e){console.error("Failed to register video adapter:",e)}}else console.error("NPawPlugin not initialized. Call initialize() first.")}}])}();c(Nr,"instance",null);const Or=new Nr;function Mr(e,t,i){return t=se(t),re(e,xr()?Reflect.construct(t,i||[],se(e).constructor):t.apply(e,i))}function xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xr=function(){return!!e})()}var Br=function(e){function t(e,i,n,r){var s,a;return o(this,t),(a=Mr(this,t)).manager=r,a.videoElement=i,a.videoPlayer=e,a.isAdBreak=!1,a.mediaSource=n,a.adConfig=null===(s=a.mediaSource)||void 0===s||null===(s=s.advertising)||void 0===s?void 0:s.daiSettings,a.DAIParams=a.mediaSource.cust_params,a.adsUiElement=document.getElementById("ad-container"),a.initializeStreamManager(),a}return(0,ae.A)(t,e),u(t,[{key:"initializeStreamManager",value:function(){var e,t,i,n,r,s;this.streamManager=new google.ima.dai.api.StreamManager(this.videoElement,this.adsUiElement),null===(e=Or.getPlugin())||void 0===e||e.registerAdsAdapterFromClass(this.streamManager,Dr.ads.Ima),this.registerEvents(),this.adConfig&&this.adConfig.isLiveStream&&this.adConfig.assetKey?this.requestLiveStream(null===(t=this.adConfig)||void 0===t?void 0:t.assetKey,(null===(i=this.adConfig)||void 0===i?void 0:i.authToken)||null):this.requestVODStream(null===(n=this.adConfig)||void 0===n?void 0:n.contentSourceId,null===(r=this.adConfig)||void 0===r?void 0:r.videoId,(null===(s=this.adConfig)||void 0===s?void 0:s.authToken)||null)}},{key:"registerEvents",value:function(){this.streamManager.addEventListener([google.ima.dai.api.StreamEvent.Type.LOADED,google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,google.ima.dai.api.StreamEvent.Type.COMPLETE,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,google.ima.dai.api.StreamEvent.Type.MIDPOINT,google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,google.ima.dai.api.StreamEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.dai.api.StreamEvent.Type.SKIPPED,google.ima.dai.api.StreamEvent.Type.VIDEO_CLICKED,google.ima.dai.api.StreamEvent.Type.PAUSED,google.ima.dai.api.StreamEvent.Type.RESUMED,google.ima.dai.api.StreamEvent.Type.STARTED,google.ima.dai.api.StreamEvent.Type.CLICK],this.onStreamEvent.bind(this),!1),this.streamManager.addEventListener(google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,this.onAdProgress.bind(this)),this.videoPlayer.on("play",this.onMetaDataChangeListener.bind(this))}},{key:"requestVODStream",value:function(e,t,i){var n=new google.ima.dai.api.VODStreamRequest;n.contentSourceId=e,n.videoId=t,n.authToken=i,this.streamManager.requestStream(n)}},{key:"requestLiveStream",value:function(e,t){var i,n,r=new google.ima.dai.api.LiveStreamRequest;r.assetKey=e,r.authToken=t||"",r.adTagParameters={ppid:this.DAIParams.p
2pid,vid:this.DAIParams.vid,cust_params:(i=this.DAIParams.cust_params,n="",Object.keys(i).map((function(e,t){n+="".concat(e,"=").concat(i[e]),t!==Object.keys(i).length-1&&(n+="&")})),n)},this.streamManager.requestStream(r)}},{key:"onMetaDataChangeListener",value:function(){var e=this;this.videoPlayer.textTracks().on("addtrack",(function(t){var i=t.track;"metadata"===i.kind&&i.on("cuechange",(function(){var t=i.activeCues[0];if(t&&t.value.data){var n={};n[t.value.key]=t.value.data,n.duration=1/0,e.streamManager.onTimedMetadata(n)}}))}))}},{key:"onStreamEvent",value:function(e){switch(e.type){case google.ima.dai.api.StreamEvent.Type.LOADED:this.emit(Bn.LOADED,e);var t=e.getStreamData().url;this.emit(Bn.STREAM_LOADED,t);break;case google.ima.dai.api.StreamEvent.Type.STARTED:this.emit(Bn.AD_STARTED,e);break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:this.emit(Bn.COMPLETE,e);break;case google.ima.dai.api.StreamEvent.Type.ERROR:var i=e.data.errorMessage||"Failed to request ads stream",n=new yt(Tt.FAILED_TO_REQUEST_ADS,bt.ADS,_t.CRITICAL,i);"this.videoPlayer.eme is not a function"!==e.getStreamData().errorMessage&&this.emit(Bn.STREAM_LOAD_ERROR,n);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.emit(Bn.AD_BREAK_STARTED,e),this.isAdBreak=!0,this.videoPlayer.controls(!1);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.emit(Bn.AD_BREAK_ENDED,e),this.isAdBreak=!1,this.videoPlayer.controls(!0);break;case google.ima.dai.api.StreamEvent.Type.CLICK:this.emit(Bn.CLICK,e);break;case google.ima.dai.api.StreamEvent.Type.SKIPPED:this.emit(Bn.SKIPPED,e);break;case google.ima.dai.api.StreamEvent.Type.PAUSED:this.emit(Bn.PAUSED,e),this.isAdBreak&&(this.videoPlayer.controls(!0),this.videoPlayer.play());break;case google.ima.dai.api.StreamEvent.Type.RESUMED:this.emit(Bn.RESUMED,e),this.isAdBreak&&this.videoPlayer.controls(!1);break;default:console.log(e.type)}}},{key:"onAdProgress",value:function(e){this.emit(Bn.AD_PROGRESS,e);var t=e.getStreamData().adProgressData,i=Math.ceil(t.duration-t.currentTime),n=t.duration,r=t.currentTime;r=r>0?r:0,this.manager.onAdPlayheadUpdated(r,i,n,0,0)}},{key:"pause",value:function(){}},{key:"resume",value:function(){}},{key:"destroy",value:function(){console.log("Destroying")}}])}(et());function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Vr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fr(e,t,i){return Object.defineProperty(e,"prototype",{writable:!1}),e}function qr(e){return qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qr(e)}var jr=function(e,t,i){this.vjsPlayer=e,this.controller=i,this.contentTrackingTimer=null,this.contentComplete=!1,this.updateTimeIntervalHandle=null,this.updateTimeInterval=1e3,this.seekCheckIntervalHandle=null,this.seekCheckInterval=1e3,this.resizeCheckIntervalHandle=null,this.resizeCheckInterval=250,this.seekThreshold=100,this.contentEndedListeners=[],this.contentSource="",this.contentSourceType="",this.contentPlayheadTracker={currentTime:0,previousTime:0,seeking:!1,duration:0},this.vjsPlayerDimensions={width:this.getPlayerWidth(),height:this.getPlayerHeight()},this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this)),this.boundContentEndedListener=this.localContentEndedListener.bind(this),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("readyforpreroll",this.onReadyForPreroll.bind(this)),this.vjsPlayer.on("adtimeout",this.onAdTimeout.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),"onPlay"===this.controller.getSettings().requestMode&&this.vjsPlayer.one("play",this.controller.requestAds.bind(this.controller)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(t)};jr.prototype.setUpPlayerIntervals=function(){this.updateTimeIntervalHandle&&clearInterval(this.updateTimeIntervalHandle),this.seekCheckIntervalHandle&&clearInterval(this.seekCheckIntervalHandle),this.resizeCheckIntervalHandle&&clearInterval(this.resizeCheckIntervalHandle),this.updateTimeIntervalHandle=setInterval(this.updateCurrentTime.bind(this),this.updateTimeInterval),this.seekCheckIntervalHandle=setInterval(this.checkForSeeking.bind(this),this.seekCheckInterval),this.resizeCheckIntervalHandle=setInterval(this.checkForResize.bind(this),this.resizeCheckInterval)},jr.prototype.updateCurrentTime=function(){this.contentPlayheadTracker.seeking||(this.contentPlayheadTracker.currentTime=this.vjsPlayer.currentTime())},jr.prototype.checkForSeeking=function(){var e=1e3*(this.vjsPlayer.currentTime()-this.contentPlayheadTracker.previousTime);Math.abs(e)>this.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.vjsPlayer.currentTime()},jr.prototype.checkForResize=function(){var e=this.getPlayerWidth(),t=this.getPlayerHeight();e==this.vjsPlayerDimensions.width&&t==this.vjsPlayerDimensions.height||(this.vjsPlayerDimensions.width=e,this.vjsPlayerDimensions.height=t,this.controller.onPlayerResize(e,t))},jr.prototype.localContentEndedListener=function(){for(var e in this.contentComplete||(this.contentComplete=!0,this.controller.onContentComplete()),this.contentEndedListeners)"function"==typeof this.contentEndedListeners[e]&&this.contentEndedListeners[e]();
vendor: 5,295 bytes, line 2
2this.vjsPlayer.el()&&this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this))},jr.prototype.onNoPostroll=function(){this.vjsPlayer.trigger("nopostroll")},jr.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.controller.onPlayerDisposed(),this.contentComplete=!0,this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.adTimeoutTimeout&&clearTimeout(this.vjsPlayer.ads.adTimeoutTimeout);var e=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.resizeCheckIntervalHandle];for(var t in e)e[t]&&clearInterval(e[t])},jr.prototype.onReadyForPreroll=function(){this.controller.onPlayerReadyForPreroll()},jr.prototype.onAdTimeout=function(){this.controller.onAdTimeout()},jr.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.h5Player.hasAttribute("autoplay")&&this.controller.setSetting("adWillAutoPlay",!0),this.onVolumeChange(),this.vjsPlayer.on("fullscreenchange",this.onFullscreenChange.bind(this)),this.vjsPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.controller.onPlayerReady()},jr.prototype.onFullscreenChange=function(){this.vjsPlayer.isFullscreen()?this.controller.onPlayerEnterFullscreen():this.controller.onPlayerExitFullscreen()},jr.prototype.onVolumeChange=function(){var e=this.vjsPlayer.muted()?0:this.vjsPlayer.volume();this.controller.onPlayerVolumeChanged(e)},jr.prototype.injectAdContainerDiv=function(e){this.vjsControls.el().parentNode.appendChild(e)},jr.prototype.getContentPlayer=function(){return this.h5Player},jr.prototype.getVolume=function(){return this.vjsPlayer.muted()?0:this.vjsPlayer.volume()},jr.prototype.setVolume=function(e){this.vjsPlayer.volume(e),0==e?this.vjsPlayer.muted(!0):this.vjsPlayer.muted(!1)},jr.prototype.unmute=function(){this.vjsPlayer.muted(!1)},jr.prototype.mute=function(){this.vjsPlayer.muted(!0)},jr.prototype.play=function(){this.vjsPlayer.play()},jr.prototype.togglePlayback=function(){this.vjsPlayer.paused()?this.vjsPlayer.play():this.vjsPlayer.pause()},jr.prototype.getPlayerWidth=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).width;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).width),parseFloat(e)||this.vjsPlayer.width()},jr.prototype.getPlayerHeight=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).height;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).height),parseFloat(e)||this.vjsPlayer.height()},jr.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},jr.prototype.getPlayerId=function(){return this.vjsPlayer.id()},jr.prototype.toggleFullscreen=function(){this.vjsPlayer.isFullscreen()?this.vjsPlayer.exitFullscreen():this.vjsPlayer.requestFullscreen()},jr.prototype.getContentPlayheadTracker=function(){return this.contentPlayheadTracker},jr.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},jr.prototype.onAdLog=function(e){var t=e.getAdData(),i=void 0!==t.adError?t.adError.getMessage():void 0;this.vjsPlayer.trigger({type:"adslog",data:{AdError:i,AdEvent:e}})},jr.prototype.onAdBreakStart=function(){this.contentSource=this.vjsPlayer.currentSrc(),this.contentSourceType=this.vjsPlayer.currentType(),this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.startLinearAdMode(),this.vjsControls.hide(),this.vjsPlayer.pause()},jr.prototype.onAdBreakEnd=function(){this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.vjsControls.show()},jr.prototype.onAdStart=function(){this.vjsPlayer.trigger("ads-ad-started")},jr.prototype.onAllAdsCompleted=function(){1==this.contentComplete&&(this.contentSource&&this.vjsPlayer.currentSrc()!=this.contentSource&&this.vjsPlayer.src({src:this.contentSource,type:this.contentSourceType}),this.controller.onContentAndAdsCompleted())},jr.prototype.onAdsReady=function(){this.vjsPlayer.trigger("adsready")},jr.prototype.changeSource=function(e){this.vjsPlayer.currentSrc()&&(this.vjsPlayer.currentTime(0),this.vjsPlayer.pause()),e&&this.vjsPlayer.src(e),this.vjsPlayer.one("loadedmetadata",this.seekContentToZero.bind(this))},jr.prototype.seekContentToZero=function(){this.vjsPlayer.currentTime(0)},jr.prototype.triggerPlayerEvent=function(e,t){this.vjsPlayer.trigger(e,t)},jr.prototype.addContentEndedListener=function(e){this.contentEndedListeners.push(e)},jr.prototype.reset=function(){this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsControls.show(),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.contentComplete=!1};var Hr=function(e){this.controller=e,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countdownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.playPauseDiv=document.createElement("div"),this.muteDiv=document.createElement("div"),this.sliderDiv
vendor: 11,268 bytes, line 2
2=document.createElement("div"),this.sliderLevelDiv=document.createElement("div"),this.fullscreenDiv=document.createElement("div"),this.boundOnMouseUp=this.onMouseUp.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.controlPrefix=this.controller.getPlayerId()+"_",this.showCountdown=!0,!1===this.controller.getSettings().showCountdown&&(this.showCountdown=!1),this.isAdNonlinear=!1,this.createAdContainer()};Hr.prototype.createAdContainer=function(){this.assignControlAttributes(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.style.position="absolute",this.adContainerDiv.style.zIndex=1111,this.adContainerDiv.addEventListener("mouseenter",this.showAdControls.bind(this),!1),this.adContainerDiv.addEventListener("mouseleave",this.hideAdControls.bind(this),!1),this.adContainerDiv.addEventListener("click",this.onAdContainerClick.bind(this),!1),this.createControls(),this.controller.injectAdContainerDiv(this.adContainerDiv)},Hr.prototype.createControls=function(){this.assignControlAttributes(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.controller.getIsMobile()?this.countdownDiv.style.display="none":(this.assignControlAttributes(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel,this.countdownDiv.style.display=this.showCountdown?"block":"none"),this.assignControlAttributes(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"ima-progress-div"),this.assignControlAttributes(this.playPauseDiv,"ima-play-pause-div"),this.addClass(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener("click",this.onAdPlayPauseClick.bind(this),!1),this.assignControlAttributes(this.muteDiv,"ima-mute-div"),this.addClass(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener("click",this.onAdMuteClick.bind(this),!1),this.assignControlAttributes(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener("mousedown",this.onAdVolumeSliderMouseDown.bind(this),!1),this.controller.getIsIos()&&(this.sliderDiv.style.display="none"),this.assignControlAttributes(this.sliderLevelDiv,"ima-slider-level-div"),this.assignControlAttributes(this.fullscreenDiv,"ima-fullscreen-div"),this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener("click",this.onAdFullscreenClick.bind(this),!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countdownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv)},Hr.prototype.onAdPlayPauseClick=function(){this.controller.onAdPlayPauseClick()},Hr.prototype.onAdMuteClick=function(){this.controller.onAdMuteClick()},Hr.prototype.onAdFullscreenClick=function(){this.controller.toggleFullscreen()},Hr.prototype.onAdsPaused=function(){this.controller.sdkImpl.adPlaying=!1,this.addClass(this.playPauseDiv,"ima-paused"),this.removeClass(this.playPauseDiv,"ima-playing"),this.showAdControls()},Hr.prototype.onAdsResumed=function(){this.onAdsPlaying(),this.showAdControls()},Hr.prototype.onAdsPlaying=function(){this.controller.sdkImpl.adPlaying=!0,this.addClass(this.playPauseDiv,"ima-playing"),this.removeClass(this.playPauseDiv,"ima-paused")},Hr.prototype.updateAdUi=function(e,t,i,n,r){var s=Math.floor(t/60),a=Math.floor(t%60);a.toString().length<2&&(a="0"+a);var o=": ";r>1&&(o=" ("+n+" "+this.controller.getSettings().adLabelNofN+" "+r+"): "),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel+o+s+":"+a;var l=e/i*100;this.progressDiv.style.width=l+"%"},Hr.prototype.unmute=function(){this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*this.controller.getPlayerVolume()+"%"},Hr.prototype.mute=function(){this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"},Hr.prototype.onAdVolumeSliderMouseDown=function(){document.addEventListener("mouseup",this.boundOnMouseUp,!1),document.addEventListener("mousemove",this.boundOnMouseMove,!1)},Hr.prototype.onMouseMove=function(e){this.changeVolume(e)},Hr.prototype.onMouseUp=function(e){this.changeVolume(e),document.removeEventListener("mouseup",this.boundOnMouseUp),document.removeEventListener("mousemove",this.boundOnMouseMove)},Hr.prototype.changeVolume=function(e){var t=(e.clientX-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;t*=100,t=Math.min(Math.max(t,0),100),this.sliderLevelDiv.style.width=t+"%",0==this.percent?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted")):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted")),this.controller.setVolume(t/100)},Hr.prototype.showAdContainer=function(){this.adContainerDiv.style.display="block"},Hr.prototype.hideAdContainer=function(){this.adContainerDiv.style.display="none"},Hr.prototype.onAdContainerClick=function(){this.isAdNonlinear&&this.controller.togglePlayback()},Hr.prototype.reset=function(){this.hideAdContainer()},Hr.prototype.onAdError=function(){this.hideAdContainer()},Hr.prototype.onAdBreakStart=function(e){this.showAdContainer(),"application/javascript"!==e.getAd().getContentType()||this.controller.getSettings().showControlsForJSAds?this.controlsDiv.style.display="block":this.controlsDiv.style.display="none",this.onAdsPlaying(),this.hideAdControls()},Hr.prototype.onAdBreakEnd=function(){var e=this.controller.getCurrentAd();(null==e||e.isLinear())&&this.hideAdContainer(),this.controlsDiv.style.display="none",this.countdownDiv.innerHTML=""},Hr.prototype.onAllAdsCompleted=function(){this.hideAdContainer()},Hr.prototype.onLinearAdStart=function(){this.removeClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!1},Hr.prototype.onNonLinearAdLoad=function(){this.adContainerDiv.style.display="block",this.addClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!0},Hr.prototype.onPlayerEnterFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-non-fullscreen")},Hr.prototype.onPlayerExitFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-fullscreen")},Hr.prototype.onPlayerVolumeChanged=function(e){0==e?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*e+"%")},Hr.prototype.showAdControls=function(){this.controller.getSettings().disableAdControls||this.addClass(this.controlsDiv,"ima-controls-div-showing")},Hr.prototype.hideAdControls=function(){this.removeClass(this.controlsDiv,"ima-controls-div-showing")},Hr.prototype.assignControlAttributes=function(e,t){e.id=this.controlPrefix+t,e.className=this.controlPrefix+t+" "+t},Hr.prototype.getClassRegexp=function(e){return new RegExp("(^|[^A-Za-z-])"+e+"((?![A-Za-z-])|$)","gi")},Hr.prototype.elementHasClass=function(e,t){return this.getClassRegexp(t).test(e.className)},Hr.prototype.addClass=function(e,t){e.className=e.className.trim()+" "+t},Hr.prototype.removeClass=function(e,t){var i=this.getClassRegexp(t);e.className=e.className.trim().replace(i,"")},Hr.prototype.getAdContainerDiv=function(){return this.adContainerDiv},Hr.prototype.setShowCountdown=function(e){this.showCountdown=e,this.countdownDiv.style.display=this.showCountdown?"block":"none"};var Gr=function(e){this.controller=e,this.adDisplayContainer=null,this.adDisplayContainerInitialized=!1,this.adsLoader=null,this.adsManager=null,this.adsRenderingSettings=null,this.adsResponse=null,this.currentAd=null,this.adTrackingTimer=null,this.allAdsCompleted=!1,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.adBreakReadyListener=void 0,this.contentCompleteCalled=!1,this.isAdTimedOut=!1,this.adsManagerDimensions={width:0,height:0},this.autoPlayAdBreaks=!0,!1===this.controller.getSettings().autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1),this.controller.getSettings().locale&&google.ima.settings.setLocale(this.controller.getSettings().locale),this.controller.getSettings().disableFlashAds&&google.ima.settings.setDisableFlashAds(this.controller.getSettings().disableFlashAds),this.controller.getSettings().disableCustomPlaybackForIOS10Plus&&google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.controller.getSettings().disableCustomPlaybackForIOS10Plus),this.controller.getSettings().ppid&&google.ima.settings.setPpid(this.controller.getSettings().ppid),this.controller.getSettings().featureFlags&&google.ima.settings.setFeatureFlags(this.controller.getSettings().featureFlags)};Gr.prototype.initAdObjects=function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.controller.getAdContainerDiv(),this.controller.getContentPlayer()),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.controller.getSettings().vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),void 0!==this.controller.getSettings().vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.controller.getSettings().vpaidMode),this.controller.getSettings().locale&&this.adsLoader.getSettings().setLocale(this.controller.getSettings().locale),this.controller.getSettings().numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.controller.getSettings().numRedirects),this.controller.getSettings().sessionId&&this.adsLoader.getSettings().setSessionId(this.controller.getSettings().sessionId),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion("2.4.0"),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded.bind(this),!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsLoaderError.bind(this),!1),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-loader",adsLoader:this.adsLoader})},Gr.prototype.requestAds=function(){var e=new google.ima.AdsRequest;if(this.controller.getSettings().adTagUrl?e.adTagUrl=this.controller.getSettings().adTagUrl:e.adsResponse=this.controller.getSettings().adsResponse,this.controller.getSettings().forceNonLinearFullSlot&&(e.forceNonLinearFullSlot=!0),this.controller.getSettings().vastLoadTimeout&&(e.vastLoadTimeout=this.controller.getSettings().vastLoadTimeout),this.controller.getSettings().omidMode&&window.console.warn("The additional setting `omidMode` has been removed. Use `omidVendorAccess` instead."),this.controller.getSettings().omidVendorAccess){e.omidAccessModeRules={};var t=this.controller.getSettings().omidVendorAccess;
vendor: 16,384 bytes, line 2
2Object.keys(t).forEach((function(i){e.omidAccessModeRules[i]=t[i]}))}e.linearAdSlotWidth=this.controller.getPlayerWidth(),e.linearAdSlotHeight=this.controller.getPlayerHeight(),e.nonLinearAdSlotWidth=this.controller.getSettings().nonLinearWidth||this.controller.getPlayerWidth(),e.nonLinearAdSlotHeight=this.controller.getSettings().nonLinearHeight||this.controller.getPlayerHeight(),e.setAdWillAutoPlay(this.controller.adsWillAutoplay()),e.setAdWillPlayMuted(this.controller.adsWillPlayMuted());var i=this.controller.getSettings().adsRequest;i&&"object"===qr(i)&&Object.keys(i).forEach((function(t){e[t]=i[t]})),this.adsLoader.requestAds(e),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-request",AdsRequest:e})},Gr.prototype.onAdsManagerLoaded=function(e){this.createAdsRenderingSettings(),this.adsManager=e.getAdsManager(this.controller.getContentPlayheadTracker(),this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAllAdsCompleted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdLoaded.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdStarted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLog.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed.bind(this)),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-manager",adsManager:this.adsManager}),this.autoPlayAdBreaks||this.initAdsManager();var t=this.controller.getSettings().preventLateAdStart;t?t&&!this.isAdTimedOut&&this.controller.onAdsReady():this.controller.onAdsReady(),this.controller.getSettings().adsManagerLoadedCallback&&this.controller.getSettings().adsManagerLoadedCallback()},Gr.prototype.onAdsLoaderError=function(e){window.console.warn("AdsLoader error: "+e.getError()),this.controller.onErrorLoadingAds(e),this.adsManager&&this.adsManager.destroy()},Gr.prototype.initAdsManager=function(){try{var e=this.controller.getPlayerWidth(),t=this.controller.getPlayerHeight();this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.init(e,t),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.initializeAdDisplayContainer()}catch(e){this.onAdError(e)}},Gr.prototype.createAdsRenderingSettings=function(){if(this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.controller.getSettings().adsRenderingSettings)for(var e in this.controller.getSettings().adsRenderingSettings)""!==e&&(this.adsRenderingSettings[e]=this.controller.getSettings().adsRenderingSettings[e])},Gr.prototype.onAdError=function(e){var t=void 0!==e.getError?e.getError():e.stack;window.console.warn("Ad error: "+t),this.adsManager.destroy(),this.controller.onAdError(e),this.adsActive=!1,this.adPlaying=!1},Gr.prototype.onAdBreakReady=function(e){this.adBreakReadyListener(e)},Gr.prototype.onContentPauseRequested=function(e){this.adsActive=!0,this.adPlaying=!0,this.controller.onAdBreakStart(e)},Gr.prototype.onContentResumeRequested=function(e){this.adsActive=!1,this.adPlaying=!1,this.controller.onAdBreakEnd()},Gr.prototype.onAllAdsCompleted=function(e){this.allAdsCompleted=!0,this.controller.onAllAdsCompleted()},Gr.prototype.onAdLoaded=function(e){e.getAd().isLinear()||(this.controller.onNonLinearAdLoad(),this.controller.playContent())},Gr.prototype.onAdStarted=function(e){this.currentAd=e.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(this.onAdPlayheadTrackerInterval.bind(this),250),this.controller.onLinearAdStart()):this.controller.onNonLinearAdStart()},Gr.prototype.onAdPaused=function(){this.controller.onAdsPaused()},Gr.prototype.onAdResumed=function(e){this.controller.onAdsResumed()},Gr.prototype.onAdComplete=function(){this.currentAd.isLinear()&&clearInterval(this.adTrackingTimer)},Gr.prototype.onAdLog=function(e){this.controller.onAdLog(e)},Gr.prototype.onAdPlayheadTrackerInterval=function(){if(null!==this.adsManager){var e=this.adsManager.getRemainingTime(),t=this.currentAd.getDuration(),i=t-e;i=i>0?i:0;var n,r=0;this.currentAd.getAdPodInfo()&&(n=this.currentAd.getAdPodInfo().getAdPosition(),r=this.currentAd.getAdPodInfo().getTotalAds()),this.controller.onAdPlayheadUpdated(i,e,t,n,r)}},Gr.prototype.onContentComplete=function(){this.adsLoader&&(this.adsLoader.contentComplete(),this.contentCompleteCalled=!0),(this.adsManager&&this.adsManager.getCuePoints()&&!this.adsManager.getCuePoints().includes(-1)||!this.adsManager)&&this.controller.onNoPostroll(),this.allAdsCompleted&&this.controller.onContentAndAdsCompleted()},Gr.prototype.onPlayerDisposed=function(){this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)},Gr.prototype.onPlayerReadyForPreroll=function(){if(this.autoPlayAdBreaks){this.initAdsManager();try{this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start()}catch(e){this.onAdError(e)}}},Gr.prototype.onAdTimeout=function(){this.isAdTimedOut=!0},Gr.prototype.onPlayerReady=function(){this.initAdObjects(),(this.controller.getSettings().adTagUrl||this.controller.getSettings().adsResponse)&&"onLoad"===this.controller.getSettings().requestMode&&this.requestAds()},Gr.prototype.onPlayerEnterFullscreen=function(){this.adsManager&&this.adsManager.resize(window.screen.width,window.screen.height)},Gr.prototype.onPlayerExitFullscreen=function(){this.adsManager&&this.adsManager.resize(this.controller.getPlayerWidth(),this.controller.getPlayerHeight())},Gr.prototype.onPlayerVolumeChanged=function(e){this.adsManager&&this.adsManager.setVolume(e),this.adMuted=0==e},Gr.prototype.onPlayerResize=function(e,t){this.adsManager&&(this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.resize(e,t))},Gr.prototype.getCurrentAd=function(){return this.currentAd},Gr.prototype.setAdBreakReadyListener=function(e){this.adBreakReadyListener=e},Gr.prototype.isAdPlaying=function(){return this.adPlaying},Gr.prototype.isAdMuted=function(){return this.adMuted},Gr.prototype.pauseAds=function(){this.adsManager.pause(),this.adPlaying=!1},Gr.prototype.resumeAds=function(){this.adsManager.resume(),this.adPlaying=!0},Gr.prototype.unmute=function(){this.adsManager.setVolume(1),this.adMuted=!1},Gr.prototype.mute=function(){this.adsManager.setVolume(0),this.adMuted=!0},Gr.prototype.setVolume=function(e){this.adsManager.setVolume(e),this.adMuted=0==e},Gr.prototype.initializeAdDisplayContainer=function(){this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},Gr.prototype.playAdBreak=function(){this.autoPlayAdBreaks||(this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start())},Gr.prototype.addEventListener=function(e,t){this.adsManager&&this.adsManager.addEventListener(e,t)},Gr.prototype.getAdsManager=function(){return this.adsManager},Gr.prototype.reset=function(){this.adsActive=!1,this.adPlaying=!1,this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentCompleteCalled&&this.adsLoader.contentComplete(),this.contentCompleteCalled=!1,this.allAdsCompleted=!1};var Wr=function(e,t){this.settings={},this.contentAndAdsEndedListeners=[],this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,t.contribAdsSettings||{});this.playerWrapper=new jr(e,n,this),this.adUi=new Hr(this),this.sdkImpl=new Gr(this)};Wr.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,prerollTimeout:1e3,preventLateAdStart:!1,requestMode:"onLoad",showControlsForJSAds:!0,timeout:5e3},Wr.prototype.initWithSettings=function(e){this.settings=Object.assign({},Wr.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},Wr.prototype.warnAboutDeprecatedSettings=function(){var e=this;["adWillAutoplay","adsWillAutoplay","adWillPlayMuted","adsWillPlayMuted"].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.ima setting "+t+" is deprecated")}))},Wr.prototype.getSettings=function(){return this.settings},Wr.prototype.getIsMobile=function(){return this.isMobile},Wr.prototype.getIsIos=function(){return this.isIos},Wr.prototype.injectAdContainerDiv=function(e){this.playerWrapper.injectAdContainerDiv(e)},Wr.prototype.getAdContainerDiv=function(){return this.adUi.getAdContainerDiv()},Wr.prototype.getContentPlayer=function(){return this.playerWrapper.getContentPlayer()},Wr.prototype.getContentPlayheadTracker=function(){return this.playerWrapper.getContentPlayheadTracker()},Wr.prototype.requestAds=function(){this.sdkImpl.requestAds()},Wr.prototype.setSetting=function(e,t){this.settings[e]=t},Wr.prototype.onErrorLoadingAds=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},Wr.prototype.onAdPlayPauseClick=function(){this.sdkImpl.isAdPlaying()?(this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()):(this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds())},Wr.prototype.onAdMuteClick=function(){this.sdkImpl.isAdMuted()?(this.playerWrapper.unmute(),this.adUi.unmute(),this.sdkImpl.unmute()):(this.playerWrapper.mute(),this.adUi.mute(),this.sdkImpl.mute())},Wr.prototype.setVolume=function(e){this.playerWrapper.setVolume(e),this.sdkImpl.setVolume(e)},Wr.prototype.getPlayerVolume=function(){return this.playerWrapper.getVolume()},Wr.prototype.toggleFullscreen=function(){this.playerWrapper.toggleFullscreen()},Wr.prototype.onAdError=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},Wr.prototype.onAdBreakStart=function(e){this.playerWrapper.onAdBreakStart(),this.adUi.onAdBreakStart(e)},Wr.prototype.showAdContainer=function(){this.adUi.showAdContainer()},Wr.prototype.onAdBreakEnd=function(){this.playerWrapper.onAdBreakEnd(),this.adUi.onAdBreakEnd()},Wr.prototype.onAllAdsCompleted=function(){this.adUi.onAllAdsCompleted(),this.playerWrapper.onAllAdsCompleted()},Wr.prototype.onAdsPaused=function(){this.adUi.onAdsPaused()},Wr.prototype.onAdsResumed=function(){this.adUi.onAdsResumed()},Wr.prototype.onAdPlayheadUpdated=function(e,t,i,n,r){this.adUi.updateAdUi(e,t,i,n,r)},Wr.prototype.onAdLog=function(e){this.playerWrapper.onAdLog(e)},Wr.prototype.getCurrentAd=function(){return this.sdkImpl.getCurrentAd()},Wr.prototype.playContent=function(){this.playerWrapper.play()},Wr.prototype.onLinearAdStart=function(){this.adUi.onLinearAdStart(),this.playerWrapper.onAdStart()},Wr.prototype.onNonLinearAdLoad=function(){this.adUi.onNonLinearAdLoad()},Wr.prototype.onNonLinearAdStart=function(){this.adUi.onNonLinearAdLoad(),this.playerWrapper.onAdStart()},Wr.prototype.getPlayerWidth=function(){return this.playerWrapper.getPlayerWidth()},Wr.prototype.getPlayerHeight=function(){return this.playerWrapper.getPlayerHeight()},Wr.prototype.onAdsReady=function(){this.playerWrapper.onAdsReady()},Wr.prototype.onPlayerResize=function(e,t){this.sdkImpl.onPlayerResize(e,t)},Wr.prototype.onContentComplete=function(){this.sdkImpl.onContentComplete()},Wr.prototype.onNoPostroll=function(){this.playerWrapper.onNoPostroll()},Wr.prototype.onContentAndAdsCompleted=function(){for(var e in this.contentAndAdsEndedListeners)"function"==typeof this.contentAndAdsEndedListeners[e]&&this.contentAndAdsEndedListeners[e]()},Wr.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},Wr.prototype.onPlayerReadyForPreroll=function(){this.sdkImpl.onPlayerReadyForPreroll()},Wr.prototype.onAdTimeout=function(){this.sdkImpl.onAdTimeout()},Wr.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},Wr.prototype.onPlayerEnterFullscreen=function(){this.adUi.onPlayerEnterFullscreen(),this.sdkImpl.onPlayerEnterFullscreen()},Wr.prototype.onPlayerExitFullscreen=function(){this.adUi.onPlayerExitFullscreen(),this.sdkImpl.onPlayerExitFullscreen()},Wr.prototype.onPlayerVolumeChanged=function(e){this.adUi.onPlayerVolumeChanged(e),this.sdkImpl.onPlayerVolumeChanged(e)},Wr.prototype.setContentWithAdTag=function(e,t){this.reset(),this.settings.adTagUrl=t||this.settings.adTagUrl,this.playerWrapper.changeSource(e)},Wr.prototype.setContentWithAdsResponse=function(e,t){this.reset(),this.settings.adsResponse=t||this.settings.adsResponse,this.playerWrapper.changeSource(e)},Wr.prototype.setContentWithAdsRequest=function(e,t){this.reset(),this.settings.adsRequest=t||this.settings.adsRequest,this.playerWrapper.changeSource(e)},Wr.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset(),this.adUi.reset()},Wr.prototype.addContentEndedListener=function(e){this.playerWrapper.addContentEndedListener(e)},Wr.prototype.addContentAndAdsEndedListener=function(e){this.contentAndAdsEndedListeners.push(e)},Wr.prototype.setAdBreakReadyListener=function(e){this.sdkImpl.setAdBreakReadyListener(e)},Wr.prototype.setShowCountdown=function(e){this.adUi.setShowCountdown(e),this.showCountdown=e,this.adUi.countdownDiv.style.display=this.showCountdown?"block":"none"},Wr.prototype.initializeAdDisplayContainer=function(){this.sdkImpl.initializeAdDisplayContainer()},Wr.prototype.playAdBreak=function(){this.sdkImpl.playAdBreak()},Wr.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},Wr.prototype.getAdsManager=function(){return this.sdkImpl.getAdsManager()},Wr.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},Wr.prototype.changeAdTag=function(e){this.reset(),this.settings.adTagUrl=e},Wr.prototype.pauseAd=function(){this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()},Wr.prototype.resumeAd=function(){this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds()},Wr.prototype.togglePlayback=function(){this.playerWrapper.togglePlayback()},Wr.prototype.adsWillAutoplay=function(){return void 0!==this.settings.adsWillAutoplay?this.settings.adsWillAutoplay:void 0!==this.settings.adWillAutoplay?this.settings.adWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},Wr.prototype.adsWillPlayMuted=function(){return void 0!==this.settings.adsWillPlayMuted?this.settings.adsWillPlayMuted:void 0!==this.settings.adWillPlayMuted?this.settings.adWillPlayMuted:void 0!==this.playerWrapper.getPlayerOptions().muted?this.playerWrapper.getPlayerOptions().muted:0==this.playerWrapper.getVolume()},Wr.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var Xr=function(e,t,i){this.vjsPlayer=e,this.daiController=i,this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("pause",this.onPause.bind(this)),this.vjsPlayer.on("play",this.onPlay.bind(this)),this.vjsPlayer.on("seeked",this.onSeekEnd.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(t)};Xr.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.daiController.onPlayerDisposed()},Xr.prototype.onPause=function(){this.daiController.isInAdBreak()&&this.vjsControls.show()},Xr.prototype.
vendor: 11,218 bytes, line 2
2onPlay=function(){this.daiController.isInAdBreak()&&this.vjsControls.hide()},Xr.prototype.onSeekEnd=function(){this.daiController.onSeekEnd(this.vjsPlayer.currentTime())},Xr.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.daiController.onPlayerReady()},Xr.prototype.getStreamPlayer=function(){return this.h5Player},Xr.prototype.getVjsPlayer=function(){return this.vjsPlayer},Xr.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},Xr.prototype.getPlayerId=function(){return this.vjsPlayer.id()},Xr.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},Xr.prototype.onAdBreakStart=function(){this.vjsControls.hide()},Xr.prototype.onAdBreakEnd=function(){this.vjsControls.show()},Xr.prototype.reset=function(){this.vjsControls.show()};var Kr=function(e){this.daiController=e,this.streamPlayer=null,this.vjsPlayer=null,this.streamManager=null,this.uiSettings=new google.ima.dai.api.UiSettings,this.isAdBreak=!1,this.isSnapback=!1,this.snapForwardTime=0,this.timedMetadata,this.metadataLoaded={},this.SOURCE_TYPES={hls:"application/x-mpegURL",dash:"application/dash+xml"}};Kr.prototype.initImaDai=function(){this.streamPlayer=this.daiController.getStreamPlayer(),this.vjsPlayer=this.daiController.getVjsPlayer(),this.createAdUiDiv(),this.daiController.getSettings().locale&&this.uiSettings.setLocale(this.daiController.getSettings().locale),this.streamManager=new google.ima.dai.api.StreamManager(this.streamPlayer,this.adUiDiv,this.uiSettings),this.streamPlayer.addEventListener("pause",this.onStreamPause),this.streamPlayer.addEventListener("play",this.onStreamPlay),this.streamManager.addEventListener([google.ima.dai.api.StreamEvent.Type.LOADED,google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED],this.onStreamEvent.bind(this),!1),this.vjsPlayer.textTracks().onaddtrack=this.onAddTrack.bind(this),this.vjsPlayer.trigger({type:"stream-manager",StreamManager:this.streamManager}),this.requestStream()},Kr.prototype.onAddTrack=function(e){var t=this,i=e.track;"metadata"===i.kind&&(i.mode="hidden",i.addEventListener("cuechange",(function(e){var n,r=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Ur(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ur(e,t):void 0}}(e))||t){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(i.activeCues_);try{for(r.s();!(n=r.n()).done;){var s=n.value,a={};a[s.value.key]=s.value.data,t.streamManager.onTimedMetadata(a)}}catch(e){r.e(e)}finally{r.f()}})))},Kr.prototype.createAdUiDiv=function(){var e=document.createElement("div");e.id="ad-ui",e.style.height="calc(100% - 3em)",this.streamPlayer.parentNode.appendChild(e),this.adUiDiv=e},Kr.prototype.onStreamPause=function(){this.isAdBreak&&(this.adUiDiv.style.display="none")},Kr.prototype.onStreamPlay=function(){this.isAdBreak&&(this.adUiDiv.style.display="block")},Kr.prototype.onSeekEnd=function(e){if("live"!==this.daiController.getSettings().streamType)if(this.isSnapback)this.isSnapback=!1;else{var t=this.streamManager.previousCuePointForStreamTime(e);t&&!t.played&&(this.isSnapback=!0,this.snapForwardTime=e,this.vjsPlayer.currentTime(t.start))}},Kr.prototype.onStreamEvent=function(e){switch(e.type){case google.ima.dai.api.StreamEvent.Type.LOADED:this.loadUrl(e.getStreamData().url);break;case google.ima.dai.api.StreamEvent.Type.ERROR:window.console.warn("Error loading stream, attempting to play backup stream. "+e.getStreamData().errorMessage),this.daiController.onErrorLoadingAds(e),this.daiController.getSettings().fallbackStreamUrl&&this.loadurl(this.daiController.getSettings().fallbackStreamUrl);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.isAdBreak=!0,this.adUiDiv.style.display="block",this.daiController.onAdBreakStart();break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.isAdBreak=!1,this.adUiDiv.style.display="none",this.daiController.onAdBreakEnd(),this.snapForwardTime&&this.snapForwardTime>this.vjsPlayer.currentTime()&&(this.vjsPlayer.currentTime(this.snapForwardTime),this.snapForwardTime=0)}},Kr.prototype.loadUrl=function(e){this.vjsPlayer.ready(function(){var t=this.daiController.getSettings().streamFormat;this.vjsPlayer.src({src:e,type:this.SOURCE_TYPES[t]});var i=this.daiController.getSettings().bookmarkTime;if(i){var n=this.streamManager.streamTimeForContentTime(i);this.isSnapback=!0,this.vjsPlayer.currentTime(n)}}.bind(this))},Kr.prototype.requestStream=function(){var e,t=this.daiController.getSettings().streamType;if("vod"===t?((e=new google.ima.dai.api.VODStreamRequest).contentSourceId=this.daiController.getSettings().cmsId,e.videoId=this.daiController.getSettings().videoId):"live"===t?(e=new google.ima.dai.api.LiveStreamRequest).assetKey=this.daiController.getSettings().assetKey:window.console.warn("No valid stream type selected"),e.format=this.daiController.getSettings().streamFormat,this.daiController.getSettings().apiKey&&(e.apiKey=this.daiController.getSettings().apiKey),this.daiController.getSettings().authToken&&(e.authToken=this.daiController.getSettings().authToken),this.daiController.getSettings().adTagParameters&&(e.adTagParameters=this.daiController.getSettings().adTagParameters),this.daiController.getSettings().streamActivityMonitorId&&(e.streamActivityMonitorId=this.daiController.getSettings().streamActivityMonitorId),this.daiController.getSettings().omidMode){e.omidAccessModeRules={};var i=this.daiController.getSettings().omidMode;i.FULL&&(e.omidAccessModeRules[google.ima.OmidAccessMode.FULL]=i.FULL),i.DOMAIN&&(e.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN]=i.DOMAIN),i.LIMITED&&(e.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED]=i.LIMITED)}this.streamManager.requestStream(e),this.vjsPlayer.trigger({type:"stream-request",StreamRequest:e})},Kr.prototype.onPlayerReady=function(){this.initImaDai()},Kr.prototype.onPlayerDisposed=function(){this.streamManager&&this.streamManager.reset()},Kr.prototype.getStreamManager=function(){return this.StreamManager},Kr.prototype.reset=function(){this.StreamManager&&this.StreamManager.reset()};var zr=function(e,t){this.inAdBreak=!1,this.settings={},this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,t.contribAdsSettings||{});this.playerWrapper=new Xr(e,n,this),this.sdkImpl=new Kr(this)};zr.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,showControlsForJSAds:!0},zr.prototype.initWithSettings=function(e){this.settings=Object.assign({},zr.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},zr.prototype.warnAboutDeprecatedSettings=function(){var e=this;[].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.imaDai setting "+t+" is deprecated")}))},zr.prototype.getSettings=function(){return this.settings},zr.prototype.getIsMobile=function(){return this.isMobile},zr.prototype.getIsIos=function(){return this.isIos},zr.prototype.getStreamPlayer=function(){return this.playerWrapper.getStreamPlayer()},zr.prototype.getVjsPlayer=function(){return this.playerWrapper.getVjsPlayer()},zr.prototype.requestStream=function(){this.sdkImpl.requestStream()},zr.prototype.setSetting=function(e,t){this.settings[e]=t},zr.prototype.onErrorLoadingAds=function(e){this.playerWrapper.onAdError(e)},zr.prototype.onAdError=function(e){this.playerWrapper.onAdError(e)},zr.prototype.onAdBreakStart=function(){this.inAdBreak=!0,this.playerWrapper.onAdBreakStart()},zr.prototype.onAdBreakEnd=function(){this.inAdBreak=!1,this.playerWrapper.onAdBreakEnd()},zr.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},zr.prototype.isInAdBreak=function(){return this.inAdBreak},zr.prototype.onSeekEnd=function(e){this.sdkImpl.onSeekEnd(e)},zr.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},zr.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset()},zr.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},zr.prototype.getStreamManager=function(){return this.sdkImpl.getStreamManager()},zr.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},zr.prototype.streamWillAutoplay=function(){return void 0!==this.settings.streamWillAutoplay?this.settings.streamWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},zr.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var Yr=function(e,t){this.controller=new Wr(e,t),this.addContentAndAdsEndedListener=function(e){this.controller.addContentAndAdsEndedListener(e)}.bind(this),this.addContentEndedListener=function(e){this.controller.addContentEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}.bind(this),this.changeAdTag=function(e){this.controller.changeAdTag(e)}.bind(this),this.getAdsManager=function(){return this.controller.getAdsManager()}.bind(this),this.initializeAdDisplayContainer=function(){this.controller.initializeAdDisplayContainer()}.bind(this),this.pauseAd=function(){this.controller.pauseAd()}.bind(this),this.playAdBreak=function(){this.controller.playAdBreak()}.bind(this),this.requestAds=function(){this.controller.requestAds()}.bind(this),this.resumeAd=function(){this.controller.resumeAd()}.bind(this),this.setAdBreakReadyListener=function(e){this.controller.setAdBreakReadyListener(e)}.bind(this),this.setContentWithAdTag=function(e,t){this.controller.setContentWithAdTag(e,t)}.bind(this),this.setContentWithAdsResponse=function(e,t){this.controller.setContentWithAdsResponse(e,t)}.bind(this),this.setContentWithAdsRequest=function(e,t){this.controller.setContentWithAdsRequest(e,t)}.bind(this),this.setShowCountdown=function(e){this.controller.setShowCountdown(e)}.bind(this)},Qr=function(e,t){this.controller=new zr(e,t),this.streamEndedListener=function(e){this.controller.addStreamEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}
2.bind(this),this.getStreamManager=function(){return this.controller.getStreamManager()}.bind(this)},Jr=Fr((function e(t,i){Vr(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof i?(this.streamFormat=t,this.assetKey=i):window.console.error("assetKey error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),$r=Fr((function e(t,i,n){Vr(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof i?"string"==typeof n?(this.streamFormat=t,this.cmsId=i,this.videoId=n):window.console.error("videoId error: value must be string."):window.console.error("cmsId error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),Zr=oe.default.registerPlugin||oe.default.plugin;function es(e,t,i){return t=se(t),re(e,ts()?Reflect.construct(t,i||[],se(e).constructor):t.apply(e,i))}function ts(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ts=function(){return!!e})()}Zr("ima",(function(e){this.ima=new Yr(this,e)})),Zr("imaDai",(function(e,t){if(e instanceof Jr)t.streamType="live",t.assetKey=e.assetKey;else{if(!(e instanceof $r))return void window.console.error("initDai() first parameter must be an instance of LiveStream or VodStream.");t.streamType="vod",t.cmsId=e.cmsId,t.videoId=e.videoId}t.streamFormat=e.streamFormat,this.imaDai=new Qr(this,t)}));var is,ns=function(e){function t(e,i,n,r,s){var a;return o(this,t),c(a=es(this,t),"isAdBreak",!1),a.manager=r,a.videoPlayer=n,a.adConfig=i,a.videoElement=e,a.moatEnabled=!1,a.initialization(),a.convivaAnalyticsTracker=new pt,a.adsUtilsData=s,a}return(0,ae.A)(t,e),u(t,[{key:"initialization",value:function(){var e,t,i,n,r;e=window.isLive?(null===(t=this.adsUtilsData)||void 0===t?void 0:t.ads_vast_max_redirect_live)>0?null===(i=this.adsUtilsData)||void 0===i?void 0:i.ads_vast_max_redirect_live:"":(null===(n=this.adsUtilsData)||void 0===n?void 0:n.ads_vast_max_redirect_vod)>0?null===(r=this.adsUtilsData)||void 0===r?void 0:r.ads_vast_max_redirect_vod:"";var s={adsResponse:this.adConfig.adResponse?this.adConfig.adResponse:"",adTagUrl:this.adConfig.adTagUrl?this.adConfig.adTagUrl:""},a=K({vastLoadTimeout:500,numRedirects:4,adsRenderingSettings:{loadVideoTimeout:4e3,bitrate:-1,enablePreloading:!1},disableCustomPlaybackForIOS10Plus:!0,disableAdControls:!0,preventLateAdStart:!0,showCountdown:!1,disableFlashAds:!0,debug:!1,timeout:8e3,contribAdsSettings:{prerollTimeout:8e3}},this.adConfig.imaSettingsFromS3);(s=K(s,a)).numRedirects=e,this.videoPlayer.ima(s),this.videoPlayer.ima.initializeAdDisplayContainer(),this.videoPlayer.on("ads-manager",this.onAdsManagerLoaded.bind(this)),this.videoPlayer.on("ads-loader",this.onAdsLoaderLoaded.bind(this)),this.clickTrackingElement=document.getElementById("zee-ad-container"),this.clickTrackingElement.addEventListener("click",this.onAdUiClickListener.bind(this))}},{key:"onAdsManagerLoaded",value:function(e){var t;this.adsManager=e.adsManager,null===(t=Or.getPlugin())||void 0===t||t.registerAdsAdapterFromClass(this.adsManager,Dr.ads.Ima),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdErrorListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResume.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this.onAdEventListener.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this.onAdClicked.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_PROGRESS,this.onAdProgress.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLogsListener.bind(this))}},{key:"onAdLogsListener",value:function(e){if(e.type==google.ima.AdEvent.Type.LOG){var t=e.getAdData();if(t.adError){var i=t.adError.getMessage(),n=new yt(Tt.FAILED_TO_REQUEST_ADS,bt.ADS,_t.CRITICAL,i);
2n.errorMessage=n.message,this.emit(Bn.AD_ERROR,n)}}}},{key:"onAdsLoaderLoaded",value:function(e){console.log("Ad loader loaded"),this.adsLoader=e.adsLoader,this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdErrorListener.bind(this),!1),window.adsLoader=this.adsLoader}},{key:"onAdErrorListener",value:function(e){var t=e.getError();if(google.ima.AdError.Type.AD_LOAD==t.getType()){var i=t.getMessage(),n=new yt(Tt.FAILED_TO_REQUEST_ADS,bt.ADS,_t.CRITICAL,i);n.errorMessage=n.message,this.emit(Bn.AD_ERROR,n)}else{var r={errorMessage:t.getMessage()};this.emit(Bn.AD_ERROR,r)}this.destroy()}},{key:"onAdEventListener",value:function(e){var t=e.getAd();switch(e.type){case google.ima.AdEvent.Type.LOADED:try{if(Object.prototype.hasOwnProperty.call(t.getTraffickingParameters(),"moatenable")&&t.getTraffickingParameters().moatenable){this.moatEnabled=!0;var i={partnerCode:"zeedfpvideo717778523215",viewMode:google.ima.ViewMode.NORMAL};this.initMoatTracking(this.adsManager,i,this.clickTrackingElement)}}catch(e){console.log("Moat Validation")}this.emit(Bn.AD_LOADED,e);break;case google.ima.AdEvent.Type.STARTED:this.currentAd=e.getAd(),this.emit(Bn.AD_STARTED,e),this.isAdBreak=!0,this.onAdBreakStarted(),this.onAdUiOverlayCompanionBanner();break;case google.ima.AdEvent.Type.FIRST_QUARTILE:this.emit(Bn.FIRST_QUARTILE,t);break;case google.ima.AdEvent.Type.MIDPOINT:this.emit(Bn.MIDPOINT,t);break;case google.ima.AdEvent.Type.THIRD_QUARTILE:this.emit(Bn.THIRD_QUARTILE,t);break;case google.ima.AdEvent.Type.COMPLETE:this.moatEnabled=!1,this.emit(Bn.COMPLETE,t),this.isAdBreak=!1;break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.emit(Bn.ALL_ADS_COMPLETED,t);break;case google.ima.AdEvent.Type.SKIPPED:this.moatEnabled=!1,this.emit(Bn.SKIPPED,t);break;case google.ima.AdEvent.Type.PAUSED:this.clickTrackingElement.style.pointerEvents="auto",this.emit(Bn.AD_PAUSE,t)}}},{key:"initMoatTracking",value:function(e,t,i){if(!1===Object.prototype.hasOwnProperty.call(t,"partnerCode"))return!1;var n=document.createElement("script");i=i||e&&(void 0!==e.O?e.O.parentNode:document.body)||document.body;var r,s,a,o=[],l={adsManager:e,ids:t,imaSDK:!0,events:[],dispatchEvent:function(e){var t=this.sendEvent,i=this.events;t?(i&&(i.push(e),e=i),t(e)):i.push(e)}},d={complete:"AdVideoComplete",firstquartile:"AdVideoFirstQuartile",impression:"AdImpression",loaded:"AdLoaded",midpoint:"AdVideoMidpoint",pause:"AdPaused",skip:"AdSkipped",start:"AdVideoStart",thirdquartile:"AdVideoThirdQuartile",volumeChange:"AdVolumeChange"},u="";if(google&&google.ima&&e)for(r in u="_moatApi".concat(Math.floor(1e8*Math.random())),google.ima.AdEvent.Type){var c=function(t){if(l.sendEvent){for(t=o.length-1;t>=0;t--)e.removeEventListener(o[t].type,o[t].func);l.sendEvent(l.events)}else l.events.push({type:d[t.type]||t.type,adVolume:e.getVolume()})};e.addEventListener(google.ima.AdEvent.Type[r],c),o.push({type:google.ima.AdEvent.Type[r],func:c})}try{a=(s=i.ownerDocument).defaultView||s.parentWindow}catch(e){s=document,a=window}return a[u]=l,n.type="text/javascript",i&&i.appendChild(n),n.src="https://z.moatads.com/".concat(t.partnerCode,"/moatvideo.js#").concat(u),l}},{key:"onAdUiClickListener",value:function(){this.adsManager.resume(),this.clickTrackingElement.style.pointerEvents="none"}},{key:"onAdUiOverlayCompanionBanner",value:function(){var e=this.currentAd.getCompanionAds(320,50);if(e.length>0){var t=e[0].getContent(),i=document.getElementById("zee-ad-companion");i&&(i.style.display="flex");var n=document.querySelector(".adContainer");n&&(n.style.display="none"),i&&(i.innerHTML=t)}else{var r=document.getElementById("zee-ad-companion");r&&(r.style.display="none")}}},{key:"onAdBreakStarted",value:function(){this.countdownTimer=setInterval((function(){}),300)}},{key:"onContentPauseRequested",value:function(){console.log("Content pause requested"),this.videoPlayer&&!this.videoPlayer.paused()&&this.videoPlayer.pause()}},{key:"onContentResumeRequested",value:function(e){console.log("Content resume requested"),clearInterval(this.countdownTimer);var t=e.getAd().getAdPodInfo();t&&t.getPodIndex&&0==t.getPodIndex()&&t.getAdPosition()==t.getTotalAds()&&this.emit
2(Bn.PRE_ROLL_COMPLETED,t),this.videoPlayer&&this.videoPlayer.paused()&&this.videoPlayer.play()}},{key:"onAdClicked",value:function(e){this.emit(Bn.AD_CLICKED,e),this.emit(Bn.AD_PAUSE,e)}},{key:"onAdResume",value:function(){}},{key:"onAdProgress",value:function(e){this.emit(Bn.AD_PROGRESS,e.getAdData());var t=this.adsManager.getRemainingTime(),i=this.currentAd&&this.currentAd.getDuration()?this.currentAd.getDuration():0,n=i-t;n=n>0?n:0;var r,s=0;this.currentAd&&this.currentAd.getAdPodInfo()&&(r=this.currentAd.getAdPodInfo().getAdPosition(),s=this.currentAd.getAdPodInfo().getTotalAds()),this.manager.onAdPlayheadUpdated(n,t,i,r,s)}},{key:"pause",value:function(){this.adsManager&&this.adsManager.pause()}},{key:"resume",value:function(){this.adsManager&&this.adsManager.resume()}},{key:"destroy",value:function(){this.adsManager&&(this.clickTrackingElement.style.pointerEvents="none",this.adsManager.destroy(),clearInterval(this.countdownTimer))}}])}(et()),rs=function(e){return e.DAI="DAI",e.IMA="IMA",e.VMAX="VMAX",e}({});function ss(e,t,i){return t=se(t),re(e,as()?Reflect.construct(t,i||[],se(e).constructor):t.apply(e,i))}function as(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(as=function(){return!!e})()}var os=function(e){function t(e,i){var n;return o(this,t),(n=ss(this,t)).videoPlayer=e,n.videoElement=i,n.adUiContainer=document.createElement("div"),n.adUiContainer.id="ad-container",n.videoPlayer.el().appendChild(n.adUiContainer),n.adUi=new xn(e.el()),is=new pt,n.analyticsManager=ut.getInstance(),n.adLoadTimestamp=new Date,n}return(0,ae.A)(t,e),u(t,[{key:"setConfig",value:function(e){this.destroy(),this.mediaSource=e,this.adConfig=this.mediaSource.advertising,this.initializeAdProvider()}},{key:"initializeAdProvider",value:function(){var e;switch(null===(e=this.adConfig)||void 0===e?void 0:e.client){case rs.DAI:this.adProvider=new Br(this.videoPlayer,this.videoElement,this.mediaSource,this);break;case rs.IMA:this.adProvider=new ns(this.videoElement,this.adConfig.imaSettings,this.videoPlayer,this,void 0)}this.registerEvents()}},{key:"registerEvents",value:function(){this.adProvider&&(this.adProvider.on(Bn.AD_LOADED,this.onAdLoaded.bind(this)),this.adProvider.on(Bn.AD_STARTED,this.onAdStartedEvent.bind(this)),this.adProvider.on(Bn.AD_ENDED,this.onAdCompletedEvent.bind(this)),this.adProvider.on(Bn.COMPLETE,this.onAdCompletedEvent.bind(this)),this.adProvider.on(Bn.AD_PROGRESS,this.onAdProgressEvent.bind(this)),this.adProvider.on(Bn.AD_ERROR,this.onAdError.bind(this)),this.adProvider.on(Bn.AD_BREAK_STARTED,this.onAdBreakStart.bind(this)),this.adProvider.on(Bn.AD_BREAK_ENDED,this.onAdBreakEnd.bind(this)),this.adProvider.on(Bn.SKIPPED,this.onAdSkipped.bind(this)),this.adProvider.on(Bn.AD_PAUSE,this.onAdPaused.bind(this)),this.adProvider.on(Bn.AD_CLICKED,this.onAdClicked.bind(this)),this.adProvider.on(Bn.PRE_ROLL_COMPLETED,this.preRollCompleted.bind(this)),this.adProvider.on(Bn.STREAM_LOADED,this.googleDAIStreamLoaded.bind(this)),this.adProvider.on(Bn.STREAM_LOAD_ERROR,this.googleDAIStreamLoadError.bind(this)),this.adProvider.on(Bn.FIRST_QUARTILE,this.onAdFirstQuartile.bind(this)),this.adProvider.on(Bn.SECOND_QUARTILE,this.onAdSecondQuartile.bind(this)),this.adProvider.on(Bn.THIRD_QUARTILE,this.onAdThirdQuartile.bind(this)),this.adProvider.on(Bn.AD_IMPRESSION,this.onAdImpression.bind(this)),this.adProvider.on(Bn.REQUEST,this.onAdRequest.bind(this)))}},{key:"googleDAIStreamLoaded",value:function(e){console.log("VIDEOJS:","Google DAI stream loaded"),this.emit(Bn.STREAM_LOADED,e)}},{key:"googleDAIStreamLoadError",value:function(e){console.log("VIDEOJS:","Google DAI stream load error"),this.emit(Bn.STREAM_LOAD_ERROR,e)}},{key:"onAdPlayheadUpdated",value:function(e,t,i,n,r){this.adUi.updateAdUi(e,t,i,n,r)}},{key:"preRollCompleted",value:function(e){this.emit(Bn.PRE_ROLL_COMPLETED)}},{key:"onAdStartedEvent",value:function(e){var t;if("VMAX"===(null===(t=this.adConfig)||void 0===t?void 0:t.client))this.analyticsManager.VmaxAdsInitilization(e),this.analyticsManager.reportEvent(_.adInitialized,e);else{this.adUi.showAdContainer(),is.adStartedEvent(e),this.adProvider instanceof Br&&(this.adLoadTimestamp=new Date,this.analyticsManager.AdsInitilization(e),this.analyticsManager.reportEvent(_.adInitialized,e));var i="N/A";
2this.adLoadTimestamp?(i=(window.Math.abs(new Date-new Date(this.adLoadTimestamp))/1e3).toString(),this.adLoadTimestamp=null,e.adStartTime=i):e.adStartTime="N/A",this.analyticsManager.reportEvent(_.adStarted,e),this.emit(Bn.AD_STARTED)}}},{key:"onAdLoaded",value:function(e){try{window.convivaSDK&&window.convivaSDK.setPlayer(this.videoPlayer),console.log("onAdLoaded, VideoPlayer Object integrated to ConvivaSDK")}catch(e){console.error("ADS, Error while adding video Player to conviva SDK",e)}is.adLoaded(),this.adProvider instanceof ns&&(this.adLoadTimestamp=new Date,this.analyticsManager.AdsInitilization(e),this.analyticsManager.reportEvent(_.adInitialized,e))}},{key:"onAdPaused",value:function(e){this.adProvider instanceof Br&&(is.onAdPaused(),this.analyticsManager.reportEvent(_.adPaused,e))}},{key:"onAdCompletedEvent",value:function(e){this.adLoadTimestamp&&(this.adLoadTimestamp=null),this.adUi.hideAdContainer(),is.adCompletedEvent(),this.analyticsManager.reportEvent(_.adCompleted,e),this.emit(Bn.AD_COMPLETE)}},{key:"onAdProgressEvent",value:function(e){this.adProvider instanceof Br&&is.adProgressEvent()}},{key:"onAdError",value:function(e){this.adLoadTimestamp&&(this.adLoadTimestamp=null),this.emit(Bn.AD_ERROR,e),this.adUi.hideAdContainer(),this.analyticsManager.reportEvent(_.adErrors,e),is.adError(e)}},{key:"onAdBreakStart",value:function(e){this.adUi.showAdContainer(),this.adProvider instanceof Br&&is.adBreakStart()}},{key:"onAdBreakEnd",value:function(e){this.adUi.hideAdContainer(),this.adProvider instanceof Br&&is.adBreakEnd()}},{key:"onAdSkipped",value:function(e){this.adUi.hideAdContainer(),this.adProvider instanceof Br&&is.adSkipped(),this.analyticsManager.reportEvent(_.adSkipped,e)}},{key:"onAdClicked",value:function(e){this.analyticsManager.reportEvent(_.adClicked,e)}},{key:"onAdImpression",value:function(e){this.analyticsManager.reportEvent(_.adImpression,e)}},{key:"onAdFirstQuartile",value:function(e){this.analyticsManager.reportEvent(_.adFirstQuartile,e)}},{key:"onAdSecondQuartile",value:function(e){this.analyticsManager.reportEvent(_.adSecondQuartile,e)}},{key:"onAdThirdQuartile",value:function(e){this.analyticsManager.reportEvent(_.adThirdQuartile,e)}},{key:"onAdRequest",value:function(e){this.analyticsManager.reportEvent(_.adRequest,e)}},{key:"isAdBreak",value:function(){return!!this.adProvider&&this.adProvider.isAdBreak}},{key:"pauseAd",value:function(){this.adProvider&&this.adProvider.pause()}},{key:"resumeAd",value:function(){this.adProvider&&this.adProvider.resume()}},{key:"destroy",value:function(){this.adProvider&&(this.adUi.hideAdContainer(),this.deregisterEvents(),this.adProvider.destroy(),this.adProvider=null)}},{key:"deregisterEvents",value:function(){this.adProvider.removeListener(Bn.AD_LOADED,this.onAdLoaded.bind(this)),this.adProvider.removeListener(Bn.AD_STARTED,this.onAdStartedEvent.bind(this)),this.adProvider.removeListener(Bn.AD_ENDED,this.onAdCompletedEvent.bind(this)),this.adProvider.removeListener(Bn.COMPLETE,this.onAdCompletedEvent.bind(this)),this.adProvider.removeListener(Bn.AD_PROGRESS,this.onAdProgressEvent.bind(this)),this.adProvider.removeListener(Bn.AD_ERROR,this.onAdError.bind(this)),this.adProvider.removeListener(Bn.AD_BREAK_STARTED,this.onAdBreakStart.bind(this)),this.adProvider.removeListener(Bn.AD_BREAK_ENDED,this.onAdBreakEnd.bind(this)),this.adProvider.removeListener(Bn.SKIPPED,this.onAdSkipped.bind(this)),this.adProvider.removeListener(Bn.AD_PAUSE,this.onAdPaused.bind(this)),this.adProvider.removeListener(Bn.AD_CLICKED,this.onAdClicked.bind(this)),this.adProvider.removeListener(Bn.PRE_ROLL_COMPLETED,this.preRollCompleted.bind(this))}}])}(et()),ls=function(){return u((function e(t,i,n){o(this,e),this.videoPlayer=t,this.castPlayer=i,this.remotePlayerController=n}),[{key:"getChromecastCustomData",value:function(e){return function(e){return Li.apply(this,arguments)}(e)}},{key:"enableCastMode",value:function(){this.videoPlayer.pause(),this.removePlayerControls(),this.displayPosterImage(),this.disableTextTracks(),document.querySelector(".cast-player-seek-pause")||this.createCastControls(),window.isCastConnected||this.addCastEventListeners(),window.isCastConnected&&(this.removeEventListeners(),this.addCastEventListeners()),window.isCastConnected=!0}},{key:"displayPosterImage",value:function(){var e,t,i,n,r,s,a,o=(r=void 0===(n=(i=Ft||{}).playerConfig)?{}:n,a=(void 0===(s=i.singlePlayDetails)?{}:s).assetDetails,r.getPosterUrl({tagName:"playerPoster",item:a}));null===(e=this.videoPlayer)||void 0===e||e.poster(o),null===(t=this.videoPlayer)||void 0===t||null===(t=t.posterImage)||void 0===t||t.show(),document.querySelector(".playerContainer .playerComp .chromeCastBtnContainer").style.marginTop="10px"}},{key:"removePlayerControls",value:function(){var e=document.querySelector(".playerContainer .playerComp .vjs-skip-wrapper .vjs-play-control");e&&(e.style.display="none")}},{key:"disableTextTracks",value:function(){var e=document.querySelector(".vjs-text-track-display");e&&(e.style.display="none")}},{key:"enableTextTracks",value:function(){var e=document.querySelector(".vjs-text-track-display");e&&(e.style.display="block")}},{key:"createCastControls",value:function(){var e=this,t=this.videoPlayer&&this.videoPlayer.el(
2),i=document.createElement("div");i.className="cast-player-seek-pause",i.setAttribute("style","display:flex;");var n=document.createElement("button");n.setAttribute("style","margin:auto"),n.onclick=function(){e.remotePlayerController.playOrPause(),e.togglePlayPauseIcon()};var r=document.createElement("img");r.className="cast-play-pause",r.src="https://playerscript.zee5.com/zee5Videojs/2.3.42/resources/images/paused_white_24dp.png",r.alt="paused",r.setAttribute("style","line-height:30px; font-size:30px; color:#fff; cursor:pointer;"),n.appendChild(r),i&&i.appendChild(n),t&&t.appendChild(i)}},{key:"seekCastReceiver",value:function(e){this.castPlayer.currentTime=Math.floor(Math.abs(this.castPlayer.currentTime))+e,this.remotePlayerController.seek()}},{key:"addCastEventListeners",value:function(){var e=this,t=cast.framework.RemotePlayerEventType;this.remotePlayerController.addEventListener(t.ANY_CHANGE,(function(t){return e.castEventChange(t)}))}},{key:"castLoadMediaFailed",value:function(){var e,t;null!==(e=this.videoPlayer)&&void 0!==e&&e.paused&&(null===(t=this.videoPlayer)||void 0===t||t.play())}},{key:"castEventChange",value:function(e){var t,i,n;if(e)switch(n=(n="playerState"===e.field?e.value:e.field)&&n.replace(/\s/g,"").toLowerCase()){case"paused":case"playing":this.togglePlayPauseIcon();break;case"buffering":default:break;case"ismuted":this.videoPlayer.muted(this.castPlayer.isMuted);break;case"volumelevel":null===(t=this.videoPlayer)||void 0===t||t.volume(Number(e.value));break;case"currenttime":var r,s;null!==(i=this.videoPlayer)&&void 0!==i&&i.paused()||null===(r=this.videoPlayer)||void 0===r||r.pause(),e.value>0&&(document.querySelector(".vjs-has-started .vjs-poster").style.display="block",window.seekingSenderBar||null===(s=this.videoPlayer)||void 0===s||s.currentTime(e.value))}}},{key:"removeEventListeners",value:function(){var e,t=this,i=cast.framework.RemotePlayerEventType;null===(e=this.remotePlayerController)||void 0===e||e.removeEventListener(i.ANY_CHANGE,(function(e){return t.castEventChange(e)}))}},{key:"stopCasting",value:function(){var e;this.removeEventListeners(),document.querySelector(".vjs-has-started .vjs-poster").style.display="none",document.querySelector(".playerContainer .playerComp .chromeCastBtnContainer").style.marginTop="-5px";var t=document.querySelector(".cast-player-seek-pause");this.enableTextTracks();var i=this.videoPlayer&&this.videoPlayer.el();t&&(null==i||i.removeChild(t));var n=document.querySelector(".playerContainer .playerComp .vjs-skip-wrapper .vjs-play-control");n&&(n.style.display="block"),this.videoPlayer&&this.videoPlayer.player&&this.videoPlayer.player()&&this.videoPlayer.play(),this.videoPlayer&&this.videoPlayer.player&&this.videoPlayer.player()&&this.videoPlayer.poster(""),this.videoPlayer&&this.videoPlayer.player&&this.videoPlayer.player()&&(null===(e=this.videoPlayer)||void 0===e||null===(e=e.posterImage)||void 0===e||e.hide())}},{key:"togglePlayPauseIcon",value:function(){var e,t=document.querySelector(".cast-play-pause");t&&(null!==(e=this.castPlayer)&&void 0!==e&&e.isPaused?t.src="https://playerscript.zee5.com/zee5Videojs/2.3.42/resources/images/arrow_white_24dp.png":t.src="https://playerscript.zee5.com/zee5Videojs/2.3.42/resources/images/paused_white_24dp.png")}}])}(),ds=function(){return u((function e(t,i){o(this,e),this.videoPlayer=t,this.adsManager=i,this.analyticsManager=ut.getInstance(),window.isCastAvailable&&this.initializeCastApi()}),[{key:"initializeCastApi",value:function(){var e;cast&&cast.framework&&cast.framework.setLoggerLevel&&cast.framework.setLoggerLevel(cast.framework.LoggerLevel.DEBUG),this.context=cast&&cast.framework&&cast.framework.CastContext&&cast.framework.CastContext.getInstance&&cast.framework.CastContext.getInstance(),this.remotePlayer=cast&&cast.framework&&cast.framework.RemotePlayer&&new cast.framework.RemotePlayer,this.remotePlayer&&(this.remotePlayerController=(null===(e=cast)||void 0===e||null===(e=e.framework)||void 0===e?void 0:e.RemotePlayerController)&&new cast.framework.RemotePlayerController(this.remotePlayer),this.context.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.initializeCastSession.bind(this)),this.context.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,this.onSessionStateChange.bind(this)),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,this.onMediaLoadChangeListener.bind(this)),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onConnectedChangeListener.bind(this)))}},{key:"initializeCastSession",value:(e=a(p().mark((function e(t){var i,n,r,s,a,o,l,d,u,c,h=this;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.castState,n=void 0===i?"":i,this.castHelper=new ls(this.videoPlayer,this.remotePlayer,this.remotePlayerController),"CONNECTED"!==n){e.next=12;break}return null===(r=this.adsManager)||void 0===r||r.destroy(),s=document.querySelector("#video-tag_ima-ad-container"),a=this.videoPlayer&&this.videoPlayer.el(
2),s&&(null==a||a.removeChild(s)),e.next=9,this.castHelper.getChromecastCustomData(this.videoPlayer);case 9:o=e.sent,this.castSession=cast.framework.CastContext.getInstance().getCurrentSession(),chrome&&chrome.cast&&chrome.cast.media&&(u=new chrome.cast.media.MediaInfo,c=new chrome.cast.media.LoadRequest(u),u.customData=o,null===(l=this.videoPlayer)||void 0===l||l.pause(),c.currentTime=null===(d=this.videoPlayer)||void 0===d?void 0:d.currentTime(),this.castSession&&this.castSession.loadMedia(c).then((function(){var e;h.castHelper&&h.castHelper.enableCastMode(),null===(e=h.analyticsManager)||void 0===e||e.reportEvent(S,{})}),(function(e){var t;console.log("Cast Failed due to : ",e),h.castHelper&&h.castHelper.castLoadMediaFailed(),null===(t=h.analyticsManager)||void 0===t||t.reportEvent(T,e)})));case 12:case"end":return e.stop()}}),e,this)}))),function(t){return e.apply(this,arguments)})},{key:"onSessionStateChange",value:function(e){switch(e.sessionState){case cast.framework.SessionState.SESSION_STARTED:console.log("CastContext: CastSession started");break;case cast.framework.SessionState.SESSION_RESUMED:console.log("CastContext: CastSession resumed");break;case cast.framework.SessionState.SESSION_ENDED:console.log("CastContext: CastSession disconnected")}}},{key:"onMediaLoadChangeListener",value:function(){var e,t;cast.framework.CastContext.getInstance().getCurrentSession()&&this.remotePlayer&&(this.remotePlayer.currentTime=null===(e=this.videoPlayer)||void 0===e?void 0:e.currentTime(),null===(t=this.remotePlayerController)||void 0===t||t.seek())}},{key:"onConnectedChangeListener",value:function(){var e,t;this.remotePlayer&&this.remotePlayer.isConnected||(this.castSession&&this.castSession.endSession(!0),window.isCastConnected=!1,null===(e=this.castHelper)||void 0===e||e.stopCasting(),null===(t=this.analyticsManager)||void 0===t||t.reportEvent(b,{}),console.log("RemotePlayerController: Player disconnected"))}}]);var e}(),us=i(647);function cs(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function hs(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cs(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cs(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ps(e,t,i){return t=se(t),re(e,fs()?Reflect.construct(t,i||[],se(e).constructor):t.apply(e,i))}function fs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fs=function(){return!!e})()}var gs=function(e){function t(e){var i;o(this,t),c(i=ps(this,t),"absoluteCurrentTime",0),c(i,"absoluteDuration",0),c(i,"previousTime",0),c(i,"currentTime",0),c(i,"seekStart",0),c(i,"selectedQualityLevel",0),c(i,"autoPlayFailed",!1),c(i,"isPlayingEventSent",!1),c(i,"isRequestedByBot",!1),c(i,"metadataConfig",{}),c(i,"defaultOptions",{autoplay:!0,muted:!0,controls:!0,errorDisplay:!1,width:640,height:480,html5:{vhs:{overrideNative:!oe.default.browser.IS_SAFARI||!1,useNetworkInformationApi:!0,experimentalBufferBasedABR:!0},nativeTextTracks:!1,nativeAudioTracks:!1,nativeVideoTracks:!1},controlBar:{pictureInPictureToggle:!1},userActions:{hotkeys:function(e){e.preventDefault(),70===e.which&&(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()),32!==e.which&&75!==e.which||(this.paused()?this.play():this.pause()),this.liveTracker.isLive()||(39!==e.which&&76!==e.which||Qi(10,this),37!==e.which&&74!==e.which||Qi(-10,this)),38===e.which&&(this.muted()&&this.muted(!1),this.volume(this.volume()+.1)),40===e.which&&this.volume(this.volume()-.1),77===e.which&&(this.muted()?this.muted(!1):this.muted(!0))}}}),c(i,"showPoster",(function(){i.videoPlayer&&i.videoPlayer.posterImage&&(i.videoPlayer.posterImage.show(),i.videoPlayer.posterImage.el()&&(i.videoPlayer.posterImage.el().style.display="block"))})),c(i,"videoQualityChange",(function(){var e=i.videoPlayer.qualityLevels();e.on("change",(function(){if(e&&e.length>=e.selectedIndex&&i.selectedQualityLevel!==e.selectedIndex){var t=function(e){var t=e.selectedIndex,i=e[t];if(!i||"240"!=i.height&&"480"!=i.height&&"720"!=i.height&&"1080"!=i.height)return!1;var n="";return i.height?(0===t?(n="Auto","1080"==i.height&&(n="Full HD")):"240"==i.height?n="Data Saver":"480"==i.height?n="SD":"720"==i.height?n="HD":"1080"==i.height&&(n="Full HD"),n):void 0}(e);if(t){i.selectedQualityLevel=e.selectedIndex,i.emit(tt.QUALITY_CHANGE,t);var n={type:"QUALITY_LEVEL_CHANGE",payload:JSON.stringify(t)};i.sendConvivaReportEvent(n)}}}))})),i.videoElement=document.getElementById(e.toString());var n=w();return i.videoElement&&("Safari"===n&&i.videoElement&&i.videoElement.classList.add("isSafariBrowser"),i.playerContainer=i.videoElement.parentElement),i}return(0,ae.A)(t,e),u(t,[{key:"setup",value:function(e,t,i,n,r){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.playerConfig=e,this.mediaConfig=t,this.isRequestedByBot=s,this.selectedQualityLevel=0,j()&&(this.defaultOptions.html5=hs(hs({},this.defaultOptions.html5),{},{vhs:hs(hs({},this.defaultOptions.html5.vhs),{},{enableLowInitialPlaylist:!0,smoothQualityChange:!0,limitRenditionByPlayerDimensions:!1,externVhs:{GOAL_BUFFER_LENGTH:15}})}));var a=oe.default.mergeOptions(this.defaultOptions,e);if(oe.default.registerPlugin("eme",Ne),null!==this.videoElement){var o;this.videoPlayer=(0,oe.default)(this.videoElement,a,void 0),window.videojs=oe.default,this.videoPlayer.httpSourceSelector(),window.videoPlayer=this.videoPlayer,this.videoPlayer.landscapeFullscreen({fullscreen:{enterOnRotate:!1,exitOnRotate:!1,alwaysInLandscapeMode:!1,iOS:!1}}),Or.registerVideoAdapter(this.videoPlayer,i,n,r),this.adsManager=new os(this.videoPlayer,this.videoElement),this.castSender=new ds(this.videoPlayer,this.adsManager),function(e){var t=new(oe.default.getComponent("SubtitlesButton"))(e);e.controlBar.addChild(t)}(this.videoPlayer),Ji(this.videoPlayer,this.metadataConfig),this.registerEvents(),this.addBigPlayButton(),j()||this.addCastButton();var l=9===Number(null==i||null===(o=i.assetDetails)||void 0===o?void 0:o.asset_type);this.addSeekButtons(l)}else console.error("Element not found"),console.log(e,t),this.sendConvivaReportEvent({type:"VJS_ID_ERROR"})}},{key:"setSource",value:function(e){var t=this;this.mediaConfig=e,(0,us.detectAnyAdblocker)().then((function(i){var n;if(i||null==e.advertising)t.emit(Bn.AD_BLOCKER_DETECTED,t.videoPlayer);else if(t.adsManager.setConfig(e),t.registerAdEvents(t.adsManager),(null==e||null===(n=e.advertising)||void 0===n?void 0:n.client)==rs.DAI)return;t.videoPlayer.error(null),t.videoPlayer.eme&&(t.videoPlayer.eme.activeSrc=null);try{t.videoPlayer.eme()}catch(e){var r={type:"EME_ERROR",payload:e.message};t.sendConvivaReportEvent(r)}t.videoPlayer.src(e)})),this.sendConvivaReportEvent({type:"SET_SOURCE_FOR_PLAYER"})}},{key:"clearSource",value:function(){null!=this.videoPlayer&&(this.adsManager&&this.adsManager.destroy(),this.videoPlayer.reset())}},{key:"getVideoElement",value:function(){var e=document.createElement("video");return e.id="video-tag",e.className="playerComp content video-js vjs-big-play-centered",e.preload="auto",e.controls=!0,e.setAttribute("playsinline","true"),M()&&(e.setAttribute("webkit-playsinline","true"),e.setAttribute("muted","true"),e.muted=!0),this.sendConvivaReportEvent({type:"CREATE_VIDEO_ELEMENT"}),e}},{key:"reset",value:function(){this.videoPlayer.reset(),this.sendConvivaReportEvent({type:"VIDEO_PLAYER_RESET"})}},{key:"registerAdEvents",value:function(e){var t=this;e.on(Bn.AD_STARTED,(function(){return t.emit(Bn.AD_STARTED)})),e.on(Bn.AD_COMPLETE,(function(){return t.emit(Bn.AD_COMPLETE)}
2)),e.on(Bn.PRE_ROLL_COMPLETED,(function(){t.emit(Bn.PRE_ROLL_COMPLETED,t.videoPlayer)})),e.on(Bn.AD_ERROR,(function(e){return t.emit(Bn.AD_ERROR,e)})),e.on(Bn.STREAM_LOADED,this.googleDAIStreamLoaded.bind(this)),e.on(Bn.STREAM_LOAD_ERROR,this.googleDAIStreamLoadError.bind(this)),e.on(Bn.SKIPPED,(function(){return t.emit(Bn.SKIPPED)}))}},{key:"googleDAIStreamLoaded",value:function(e){this.mediaConfig.src=e,this.videoPlayer.eme(),this.videoPlayer.src(this.mediaConfig)}},{key:"googleDAIStreamLoadError",value:function(){var e;console.log("Error loading stream from DAI"),this.videoPlayer.src(null===(e=this.mediaConfig)||void 0===e?void 0:e.src)}},{key:"registerEvents",value:function(){this.videoPlayer.on("ready",this.onPlayerReady.bind(this)),this.videoPlayer.on("loadstart",this.onLoadStart.bind(this)),this.videoPlayer.on("ended",this.onPlayEndedEvent.bind(this)),this.videoPlayer.on("error",this.onPlayerError.bind(this)),this.videoPlayer.on("loadeddata",this.onPlayerEvents.bind(this)),this.videoPlayer.on("loadedmetadata",this.onMetaDataLoaded.bind(this)),this.videoPlayer.on("timeupdate",this.onTimeUpdate.bind(this)),this.videoPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.videoPlayer.on("suspend",this.onPlayerEvents.bind(this)),this.videoPlayer.on("emptied",this.onPlayerEvents.bind(this)),this.videoPlayer.on("stalled",this.onPlayerEvents.bind(this)),this.videoPlayer.on("resize",this.onPlayerEvents.bind(this)),this.videoPlayer.on("durationchange",this.onDurationChanged.bind(this)),this.videoPlayer.on("play",this.onPlayEvent.bind(this)),this.videoPlayer.on("fullscreenchange",this.onFullScreenEvent.bind(this)),this.videoPlayer.on("seeked",this.onSeekEvent.bind(this)),this.videoPlayer.on("seeking",this.onSeekingEvent.bind(this)),this.videoPlayer.on("pause",this.onPauseEvent.bind(this)),this.videoPlayer.on("subtitleChanged",this.onSubtitleChange.bind(this)),this.videoPlayer.on("progress",this.onPlayerProgressEvent.bind(this)),this.videoPlayer.on("dispose",this.onPlayerDisposeEvent.bind(this)),this.videoPlayer.on("mute",this.onPlayerMute.bind(this)),this.videoPlayer.on("click",this.onPlayerClick.bind(this)),this.videoPlayer.on("dblclick",this.onPlayerDblClick.bind(this)),this.videoPlayer.on("playing",this.onPlayingEvent.bind(this)),this.videoPlayer.on("useractive",this.userActive.bind(this)),this.videoPlayer.on("userinactive",this.userInactive.bind(this))}},{key:"onPlayerDblClick",value:function(e){e.preventDefault(),e&&e.target&&e.target.parentElement&&!j()&&this.videoPlayer&&!j()&&e.target.parentElement.classList.contains("playerContainer")&&(this.videoPlayer.isFullscreen()?this.videoPlayer.exitFullscreen():this.videoPlayer.requestFullscreen())}},{key:"onPlayerClick",value:function(e){if(e&&e.target&&e.target.parentElement)if(j()||this.videoPlayer&&e.target.parentElement.classList.contains("playerContainer")&&(this.videoPlayer.paused()?this.play():this.pause()),console.log(e.target.parentElement.classList.value),e.target.parentElement.classList.value.includes("vjs-http-source-selector"))this.emit(_.qualityBtnClicked,this.videoPlayer);else if(e.target.parentElement.classList.value.includes("vjs-audio-button"))this.emit(_.audioBtnClicked,this.videoPlayer);else if(e.target.parentElement.classList.value.includes("vjs-subtitles-button"))this.emit(_.subtitleBtnClicked,this.videoPlayer);else if(e.target.parentElement.classList.value.includes("vjs-mute-control")){var t=document.querySelector(".tap_to_unmute");t&&document.getElementsByClassName("video-js")[0].removeChild(t),this.emit(_.muteBtnClicked,this.videoPlayer)}}},{key:"userActive",value:function(){this.emit(tt.USER_ACTIVE)}},{key:"userInactive",value:function(){this.emit(tt.USER_INACTIVE,this.videoPlayer)}},{key:"onPlayingEvent",value:function(e){if(this.isRequestedByBot)return this.videoPlayer.pause(),void this.showPoster();if(!this.isPlayingEventSent){var t,i=/iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent);this.videoPlayer.muted()&&J()&&i&&((n=document.createElement("DIV")).className="tap_to_unmute",n.innerHTML="Tap to Unmute",document.getElementsByClassName("video-js")[0].appendChild(n),n.addEventListener("click",(function(){var e=document.querySelector(".vjs-mute-control");if(e){var t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}document.querySelector(".tap_to_unmute")&&document.getElementsByClassName("video-js")[0].removeChild(n)}
2))),this.emit(tt.PLAYING,this.videoPlayer),this.sendConvivaReportEvent({type:"FIRST_FRAME_RENDERED"}),this.isPlayingEventSent=!0,this.autoPlayFailed&&this.sendUserWaitEvent((null===(t=window.Conviva)||void 0===t?void 0:t.Constants.Events.USER_WAIT_ENDED)||""),window&&(window.isPlayingEventSent=!0,window.enableReloadPlayerOnTimeout&&window.clearPlayerReloadTimer())}var n}},{key:"onPlayerDisposeEvent",value:function(){this.emit(tt.DISPOSE),this.videoPlayer=null,this.videoElement=this.getVideoElement(),this.playerContainer.appendChild(this.videoElement),this.sendConvivaReportEvent({type:"PLAYER_DISPOSED"}),window.isPlayingEventSent=!1}},{key:"addSeekButtons",value:function(e){!function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e;i.removeChild("PlayToggle"),i.removeChild("PictureInPictureToggle"),i.removeChild("BigPlayButton");var n=i.getChild("ControlBar");n&&n.removeChild("PlayToggle");var r=oe.default.getComponent("Button"),s=function(t){return{clickHandler:function(){return function(e,t){clearTimeout(Gi),e>0?(0!==Xi&&(Yi(t,"backward"),Xi=0),zi(t,Wi+=e,"forward")):(0!==Wi&&(Yi(t,"forward"),Wi=0),zi(t,Xi+=e,"backward")),Gi=setTimeout((function(){var e=Wi+Xi;0!==e&&(Qi(e,t),t.paused()&&t.play()),Yi(t,"forward"),Yi(t,"backward"),Wi=0,Xi=0}),700)}(t,e)}}},a=new r(i,s(10)),o=new r(i,s(-10));a.addClass("vjs-skip-forward"),a.controlText("Forward 10s"),o.addClass("vjs-skip-backward"),o.controlText("Backward 10s");var l=new(oe.default.getComponent("Component"))(i);n?n.addChild(l).addClass("vjs-skip-wrapper"):i.addChild(l).addClass("vjs-skip-wrapper"),l.addChild("PlayToggle").addClass("vjs-playing"),!t&&l.addChild(o),!t&&l.addChild(a),l.addChild("VolumePanel");var d=i.el(),u=document.createElement("div");u.className="seek-time-display forward",u.style.display="none",d.appendChild(u);var c=document.createElement("div");c.className="seek-time-display backward",c.style.display="none",d.appendChild(c)}(this.videoPlayer,e)}},{key:"addBigPlayButton",value:function(){!function(e){var t=e,i=t.el(),n=document.createElement("button");n.className="vjs-big-play-button-custom",n.setAttribute("type","button"),n.setAttribute("aria-label","Play"),n.setAttribute("title","Play/Pause");var r=document.createElement("div");function s(){t.paused()?(r.innerHTML='<img src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/play-hollow.svg" alt="Play" />',n.classList.remove("playing"),n.classList.add("paused")):(r.innerHTML='<img src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/pause.svg" alt="Pause" />',n.classList.remove("paused"),n.classList.add("playing"))}r.className="big-play-button-icon",n.appendChild(r),i.appendChild(n),s(),n.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.paused()?(t.play(),t.removeClass("vjs-paused"),t.addClass("vjs-playing")):(t.pause(),t.addClass("vjs-paused"),t.removeClass("vjs-playing"))})),t.on("play",s),t.on("pause",s),t.on("playing",s),t.bigPlayButtonElement=n,t.updateBigPlayButtonIcon=s}(this.videoPlayer)}},{key:"addCastButton",value:function(){!function(e){var t,i=e,n=new(oe.default.getComponent("Button"))(i,{clickHandler:function(){var e=document.querySelector(".chromeCastBtnContainer google-cast-launcher");e&&e.click()}});if(n.addClass("vjs-cast-button"),n.controlText("Cast"),!document.querySelector(".chromeCastBtnContainer")){var r=document.createElement("div"),s=document.createElement("google-cast-launcher");s.setAttribute("class","chromeCastIcon"),r.setAttribute("title","Cast"),r.setAttribute("style","--disconnected-color: #4285f4;"),r.setAttribute("id","chromeCastBtnContainer"),r.className="chromeCastBtnContainer",r.appendChild(s);var a=i&&i.el();a&&(a.appendChild(r),(t=document.querySelector("google-cast-launcher"))&&t.shadowRoot&&t.shadowRoot.querySelectorAll("path")&&t.shadowRoot.querySelectorAll("path").forEach((function(e){return e.style.fill="#4285f4"})))}var o=i.getChild("ControlBar");o?o.addChild(n):i.addChild(n)}(this.videoPlayer)}},{key:"onLoadStart",value:function(){var e=this;if(this.emit(tt.LOAD_START),!this.isRequestedByBot){var t=this.videoPlayer.play();void 0!==t&&t.then((function(){e.sendConvivaReportEvent({type:"AUTO_PLAY_WORKED"}),console.log("Autoplay worked!")})).catch((function(t){var i;if(e.sendUserWaitEvent((null===(i=window.Conviva)||void 0===i?void 0:i.Constants.Events.USER_WAIT_STARTED)||""),e.autoPlayFailed=!0,e.videoPlayer&&e.videoPlayer.player&&e.videoPlayer.player()){e.videoPlayer.muted(!0),e.videoPlayer.volume(0);var n=e.videoPlayer.play();void 0!==n&&n.then((function(){e.sendConvivaReportEvent({type:"AUTO_PLAY_RETRY_WORKED"})})).catch((function(){e.sendConvivaReportEvent({type:"AUTO_PLAY_RETRY_NOT_WORKED"}),e.videoPlayer&&M()&&(e.videoPlayer.pause(),e.videoPlayer.addClass("vjs-paused"))}))}}))}}},{key:"onPlayerReady",value:function(){this.setSource(this.mediaConfig),this.emit
2(tt.READY,this.videoPlayer),this.sendConvivaReportEvent({type:"PLAYER_READY"}),this.playerConfig.logo&&this.renderWatermark(this.playerConfig.logo)}},{key:"sendConvivaReportEvent",value:function(e){window&&window.convivaAnalytic&&window.convivaAnalytic.reportEvent&&window.convivaAnalytic.reportEvent("customEvent",e)}},{key:"sendUserWaitEvent",value:function(e){window&&window.convivaAnalytic&&window.convivaAnalytic.reportEvent&&window.convivaAnalytic.reportEvent(e)}},{key:"onPlayerMute",value:function(e){console.log(e.type),this.emit(tt.MUTE,this.videoPlayer)}},{key:"onPlayerEvents",value:function(e){}},{key:"onPlayerError",value:function(e){var t=this.videoPlayer.error();t.code==MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED?(console.log("SRC NOT SUPPORTED ERROR"),console.error(t),this.emit(tt.ERROR,new yt(Tt.MEDIA_ERR_SRC_NOT_SUPPORTED,bt.MEDIA,_t.CRITICAL,t.message))):t.code==MediaError.MEDIA_ERR_NETWORK?(console.log("NETWORK RELATED ERROR"),console.log(t),this.emit(tt.ERROR,new yt(Tt.NETWORK,bt.NETWORK,_t.RECOVERABLE,t.message))):t.code==MediaError.MEDIA_ERR_DECODE?(console.log("DECODER ERROR"),console.log(t),this.emit(tt.ERROR,new yt(Tt.DECODER,bt.MANIFEST,_t.CRITICAL,t.message))):t.code==MediaError.MEDIA_ERR_ABORTED?(console.log("MEDIA ABORTED"),console.log(t),this.emit(tt.ERROR,new yt(Tt.ABORTED,bt.MEDIA,_t.CRITICAL,t.message))):(console.log("OTHER ERROR"),console.log(t),this.emit(tt.ERROR,new yt(Tt.CUSTOM,bt.STREAMING,_t.CRITICAL,t.message)))}},{key:"addTextTracks",value:function(e){var t=this;if(null!=this.videoPlayer){var i=this.videoPlayer.textTracks(),n=i.length;if(n)for(;n--;)"subtitles"===i[n].kind&&this.videoPlayer.removeRemoteTextTrack(i[n]);e.length&&e.forEach((function(e){t.videoPlayer.addRemoteTextTrack(e)}))}this.registerTrackChange()}},{key:"applySubtitleChangesOnAudioChange",value:function(e,t){var i=this;if(null!=this.videoPlayer){var n=this.videoPlayer.textTracks(),r=n.length;if(r)for(;r--;)"subtitles"===n[r].kind&&this.videoPlayer.removeRemoteTextTrack(n[r]);if(e.length){var s=null,a="",o=localStorage.getItem("subtitlePreference");if(null!==o)try{(s=JSON.parse(o))&&s[t]&&(a=s[t])}catch(e){console.error("Error parsing subtitlePreference:",e)}e.forEach((function(e){a&&e.srclang.toLowerCase()==a.toLowerCase()&&(e.mode="showing"),i.videoPlayer.addRemoteTextTrack(e)}))}}}},{key:"getActiveLanguageTrack",value:function(){for(var e=null,t=0;t<this.videoPlayer.audioTracks().tracks_.length;t++)if(this.videoPlayer.audioTracks().tracks_[t].enabled)return this.videoPlayer.audioTracks().tracks_[t].language||"";return e}},{key:"getCastSender",value:function(){return this.castSender}},{key:"modifyAudioTracksLabel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;if(null!=this.videoPlayer){var o=this.videoPlayer.audioTracks();i&&(null==t?void 0:t.length)>0&&(o.length||this.addDummyAudioTracks(i,!0),t.forEach((function(t){t!==i&&e.addDummyAudioTracks(t)})),this.changeDefaultAudioLabel(o,i,s));for(var l=0;l<(null==o?void 0:o.length);l++){var d,u=(null==o?void 0:o.length)&&o[l];u.label=s[null==u||null===(d=u.language)||void 0===d?void 0:d.toLowerCase()]||F(null==u?void 0:u.language),null==u||u.language}o.on("change",function(e){for(var t=this.videoPlayer.audioTracks(),i="NA",n=0;n<t.length;n++)if(t[n].enabled){t[n],i=t[n].language;break}(r||a)&&this.emit("audioChanged",this.videoPlayer,i,s)}.bind(this,n))}}},{key:"addDummyAudioTracks",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=new oe.default.AudioTrack({id:"".concat(e,"-audio-track"),kind:"translation",label:e,language:e,enabled:t});this.videoPlayer.audioTracks().addTrack(i)}},{key:"changeDefaultAudioLabel",value:function(e,t,i){for(var n=0;n<e.length;n++){var r=e[n];"default"===r.label&&(r.language=t,r.label=i[t.toLowerCase()]||F(t))}}},{key:"setVttThumbnailSrc",value:function(e){this.videoPlayer.vttThumbnails({src:e})}},{key:"registerTrackChange",value:function(){var e=this;this.videoPlayer.textTracks().on("change",(function(){e.videoPlayer.trigger("subtitleChanged")}))}},{key:"renderWatermark",value:function(e){var t=this.videoPlayer.el(
2),i=document.createElement("div"),n=document.createElement("img");i.classList.add("vjs-watermark-content"),n.src=e,i.appendChild(n),t.appendChild(i)}},{key:"onTimeUpdate",value:function(e){this.previousTime=this.currentTime,this.currentTime=this.videoPlayer.currentTime(),this.emit(tt.TIME_UPDATE,this.videoPlayer)}},{key:"onSeekEvent",value:function(e){var t={from:this.seekStart,to:this.currentTime};this.seekStart=null,this.emit(tt.SEEKED,this.videoPlayer,t),this.sendConvivaReportEvent({type:"ON_SEEK_EVENT"})}},{key:"onSeekingEvent",value:function(e){null===this.seekStart&&(this.seekStart=this.previousTime)}},{key:"onVolumeChange",value:function(e){this.emit(tt.VOLUME_CHANGE,this.videoPlayer)}},{key:"onMetaDataLoaded",value:function(e){this.videoQualityChange(),this.emit(tt.META_DATA_LOADED,this.videoPlayer),this.sendConvivaReportEvent({type:"META_DATA_LOADED"})}},{key:"onPlayEvent",value:function(e){this.emit(tt.PLAY,this.videoPlayer)}},{key:"onPauseEvent",value:function(e){this.emit(tt.PAUSE,this.videoPlayer)}},{key:"onPlayEndedEvent",value:function(e){this.emit(tt.ENDED,this.videoPlayer)}},{key:"onFullScreenEvent",value:function(e){this.emit(tt.FULL_SCREEN_CHANGE,this.videoPlayer)}},{key:"onSubtitleChange",value:function(e){this.emit(tt.SUBTITLECHANGE,this.videoPlayer)}},{key:"onPlayerProgressEvent",value:function(e){window&&!window.isLive&&this.emit(tt.PROGRESS,this.videoPlayer)}},{key:"onDurationChanged",value:function(e){var t,i,n=this.videoPlayer.controlBar,r=n.getChild("DurationDisplay"),s=n.getChild("CurrentTimeDisplay"),a=n.getChild("TimeDivider");if(document.getElementsByClassName("vjs-skip-backward").length&&document.getElementsByClassName("vjs-skip-forward").length&&(t=document.getElementsByClassName("vjs-skip-backward")[0],i=document.getElementsByClassName("vjs-skip-forward")[0]),this.videoPlayer.liveTracker.isLive()||!isFinite(this.videoPlayer.duration())?(r.show(),s.show(),a.show(),t&&i&&(t.remove(),i.remove())):(r.show(),s.show(),a.show()),window&&window.isLive){var o=document.querySelector(".vjs-remaining-time-display");o&&o.remove()}}},{key:"destroy",value:function(){null!=this.videoPlayer&&(this.adsManager&&this.adsManager.destroy(),function(e){var t=e,i=t.bigPlayButtonElement;i&&(t.off("play",t.updateBigPlayButtonIcon),t.off("pause",t.updateBigPlayButtonIcon),t.off("playing",t.updateBigPlayButtonIcon),i.remove())}(this.videoPlayer),this.castSender=null,this.deregisterEvents(),this.videoPlayer.dispose(),this.videoPlayer=null)}},{key:"deregisterEvents",value:function(){this.videoPlayer.off("ready",this.onPlayerReady.bind(this)),this.videoPlayer.off("loadstart",this.onLoadStart.bind(this)),this.videoPlayer.off("ended",this.onPlayEndedEvent.bind(this)),this.videoPlayer.off("error",this.onPlayerError.bind(this)),this.videoPlayer.off("loadeddata",this.onPlayerEvents.bind(this)),this.videoPlayer.off("loadedmetadata",this.onMetaDataLoaded.bind(this)),this.videoPlayer.off("timeupdate",this.onTimeUpdate.bind(this)),this.videoPlayer.off("volumechange",this.onVolumeChange.bind(this)),this.videoPlayer.off("suspend",this.onPlayerEvents.bind(this)),this.videoPlayer.off("emptied",this.onPlayerEvents.bind(this)),this.videoPlayer.off("stalled",this.onPlayerEvents.bind(this)),this.videoPlayer.off("resize",this.onPlayerEvents.bind(this)),this.videoPlayer.off("durationchange",this.onDurationChanged.bind(this)),this.videoPlayer.off("play",this.onPlayEvent.bind(this)),this.videoPlayer.off("fullscreenchange",this.onFullScreenEvent.bind(this)),this.videoPlayer.off("seeked",this.onSeekEvent.bind(this)),this.videoPlayer.off("seeking",this.onSeekingEvent.bind(this)),this.videoPlayer.off("pause",this.onPauseEvent.bind(this)),this.videoPlayer.off("subtitleChanged",this.onSubtitleChange.bind(this)),this.videoPlayer.off("progress",this.onPlayerProgressEvent.bind(this)),this.videoPlayer.off("dispose",this.onPlayerDisposeEvent.bind(this)),this.videoPlayer.off("mute",this.onPlayerMute.bind(this)),this.videoPlayer.off("dblclick",this.onPlayerDblClick.bind(this)),this.videoPlayer.off("useractive",this.userActive.bind(this)),this.videoPlayer.off("userinactive",this.userInactive.bind(this))}},{key:"end",value:function(){null!=this.videoPlayer&&(this.videoPlayer.pause(),this.videoPlayer.currentTime=0)}},{key:"enterFullScreen",value:function(){null==this.videoPlayer||this.videoPlayer.isFullscreen()||this.videoPlayer.requestFullscreen()}},{key:"exitFullScreen",value:function(){null!=this.videoPlayer&&this.videoPlayer.isFullscreen()&&this.videoPlayer.exitFullscreen()}},{key:"enterPictureInPicture",value:function(){document.pictureInPictureEnabled&&this.videoPlayer.requestPictureInPicture()}},{key:"exitPictureInPicture",value:function(){document.pictureInPictureElement&&document.exitPictureInPicture()}},{key:"goLive",value:function(){null!=this.videoPlayer&&this.videoPlayer.isLive()&&this.videoPlayer.seekToLiveEdge()}},{key:"mute",value:function(){null!=this.videoPlayer&&this.videoPlayer.muted(!0)}},{key:"unmute",value:function(){null!=this.videoPlayer&&this.videoPlayer.muted(!1)}},{key:"getMutedState",value:function(){if(null!=this.videoPlayer)return null!=this.videoPlayer.el&&this.videoPlayer.muted&&this.videoPlayer.muted()}},{key:"pause",value:function(){if(null!=this.videoPlayer){if(this.adsManager&&this.adsManager.isAdBreak())return void this.adsManager.pauseAd();this.videoPlayer.pause()}}},{key:"play",value:function(){if(null!=this.videoPlayer){if(this.adsManager&&this.adsManager.isAdBreak())return void this.adsManager.resumeAd();this.videoPlayer.play()}}},{key:"replay",value:function(){null!=this.videoPlayer&&(this.videoPlayer.currentTime=0,this.videoPlayer.play())}},{key:"seek",value:function(e){null!=this.videoPlayer&&(this.videoPlayer.currentTime=e)}},{key:"setMetadata",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.metadataConfig={title:e,metadata:t},this.videoPlayer&&function(e,t){var i=e&&e.el();if(i){var n=i.querySelector(".vjs-metadata-display");if(n){var r=n.querySelector(".vjs-metadata-title");r&&t.title&&(r.textContent=t.title);var s=n.querySelector(".vjs-metadata-info");s&&t.metadata&&(s.textContent=t.metadata.join(" • "))}else Ji(e,t)}}(this.videoPlayer,this.metadataConfig)}}])}(et()),ms=function(e){return e[e.VIDEO=0]="VIDEO",e[e.AUDIO=1]="AUDIO",e}({}),vs=function(){function e(){o(this,e),c(this,"arrayToString",(function(e){var t=new Uint16Array(e.buffer);return String.fromCharCode.apply(null,t)}))}return u(e,[{key:"getConfigs",value:function(t){switch(t.drm){case e.WIDEVINE:return this.generateWidevineConfigs(t);case e.PLAYREADY:return this.generatePlayReadyConfig(t);case e.FAIRPLAY:return this.isLicenseServerNagra(t)?this.generateFairPlayConfigsNagra(t):this.generateFairPlayConfigs(t)}}},{key:"isLicenseServerNagra",value:function(e){return e&&(null==e?void 0:e.licenseHeaders.get("customdata").includes("Nagra_"))}},{key:"generateWidevineConfigs",value:function(e){var t=new Map;return t.set(e.drm,{certificateUri:e.certificateUri,url:e.licenseUri,licenseHeaders:Object.fromEntries(e.licenseHeaders),certificateHeaders:Object.fromEntries(e.certificateHeaders)}),Object.fromEntries(t)}},{key:"generatePlayReadyConfig",value:function(e){var t=new Map;return t.set(e.drm,{certificateUri:e.certificateUri,certificateHeaders:Object.fromEntries(e.certificateHeaders),licenseUri:e.licenseUri,licenseHeaders:Object.fromEntries(e.licenseHeaders)}),Object.fromEntries(t)}},{key:"generateFairPlayConfigs",value:function(e){var t=this,i=new Map;return i.set(e.drm,{certificateUri:e.certificateUri,getContentId:function(e,i){var n=t.arrayToString(i);if(n.indexOf("skd://")>-1)return n.split("skd://")[1]},getLicense:function(i,n,r,s){var a="spc="+function(e){for(var t,i,n,r,s,a,o,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/=",d="",u=0;u<e.length;)r=(t=e[u++])>>2,s=(3&t)<<4|(i=u<e.length?e[u++]:Number.NaN)>>4,a=(15&i)<<2|(n=u<e.length?e[u++]:Number.NaN)>>6,o=63&n,isNaN(i)?a=o=64:isNaN(n)&&(o=64),d+=l.charAt(r)+l.charAt(s)+l.charAt(a)+l.charAt(o);return d}(r)+"&assetId="+n,o=Object.fromEntries(e.licenseHeaders);t.loadLicenseUrl(e.licenseUri,a,o,s)}}),Object.fromEntries(i)}},{key:"generateFairPlayConfigsNagra",value:function(e){var t=this,i=new Map;return i.set(e.drm,{certificateUri:e.certificateUri,getContentId:function(e,i){var n=t.arrayToString(i);if(n.indexOf("skd://")>-1)return n.split("skd://")[1]},getLicense:function(i,n,r,s){var a=r,o=Object.fromEntries(e.licenseHeaders);o["Content-type"]="application/octet-stream",t.loadLicenseUrlNagra(e.licenseUri,a,o,s)}}),Object.fromEntries(i)}},{key:"loadLicenseUrlNagra",value:function(e,t,i,n){fetch(e,{method:"POST",headers:i,body:t}).then((function(e){200===e.status&&e.blob().then((function(e){var t=new FileReader;t.readAsBinaryString(e),t.onloadend=function(){var e=t.result,i=window.btoa(e);n(null,C(i))}}))})).catch((function(e){console.error(e)}))}},{key:"loadLicenseUrl",value:function(e,t,i,n){fetch(e,{method:"POST",headers:i,body:t}).then((function(e){200===e.status&&e.text().then((function(e){n(null,C(e))}))})).catch((function(e){console.error(e)}))}}])}();function ys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function _s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function bs(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ts(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):bs(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ss(e){if(e&&e.adDetails){var t=e.adDetails,i=(void 0===t?[]:t).video_ads,n=void 0===i?[]:i;if(n.length>0){var r=n[0],s=r.ads_visibility,a=void 0!==s&&s,o=r.intervals,l=void 0===o?[]:o,d=r.adsUrl,u=void 0===d?"":d;if(a&&l&&l.length)return function(e){var t,i,n,r,s,a,o=[],l=[],d=[],u='<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">',c="</vmap:VMAP>";e.map((function(e,u){if(t=e.time,i=e.tag,n=e.tag_name,t=Number(t),isNaN(t))t=e.time;else{var c=Math.floor(t/3600),h=Math.floor(t%3600/60),p=Math.floor(t%3600%60),f=c>9?c:"0".concat(c),g=h>9?h:"0".concat(h),m=p>9?"".concat(p,".000"):"0".concat(p,".000");t=f+":"+g+":"+m}switch(t){case"pre":r='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">\n                    <vmap:AdSource id="'.concat(n,'" allowMultipleAds="false" followRedirects="true">\n                    <vmap:AdTagURI templateType="vast3">\n                    <![CDATA[').concat(i+L(),"]]>\n                    </vmap:AdTagURI>\n                    </vmap:AdSource>\n                    </vmap:AdBreak>"),l.push(r);break;case"post":s='<vmap:AdBreak timeOffset="end" breakType="linear" breakId="postroll">\n                    <vmap:AdSource id="'.concat(n,'" allowMultipleAds="false" followRedirects="true">\n                    <vmap:AdTagURI templateType="vast3">\n                    <![CDATA[').concat(i+L(),"]]>\n                    </vmap:AdTagURI>\n                    </vmap:AdSource>\n                    </vmap:AdBreak>"),d.push(s);break;default:a='<vmap:AdBreak timeOffset="'.concat(t,'" breakType="linear" breakId="midroll-').concat(u,'">\n                    <vmap:AdSource id="').concat(n,'" allowMultipleAds="false" followRedirects="true">\n                    <vmap:AdTagURI templateType="vast3">\n                    <![CDATA[').concat(i+L(),"]]>\n                    </vmap:AdTagURI>\n                    </vmap:AdSource>\n                    </vmap:AdBreak>"),o.push(a)}}));var h=l.join(""),p=o.join(""),f=d.join("");return l.length>0&&o.length>0&&d.length>0?u+h+p+f+c:l.length>0&&o.length>0?u+h+p+c:l.length>0&&d.length>0?u+h+f+c:o.length>0&&d.length>0?u+p+f+c:l.length>0?u+h+c:d.length>0?u+f+c:u+p+c}(l);if(a&&u)return u}}}c(vs,"CLEARKEY","org.w3.clearkey"),c(vs,"FAIRPLAY","com.apple.fps.1_0"),c(vs,"PLAYREADY","com.microsoft.playready"),c(vs,"WIDEVINE","com.widevine.alpha");var Es=function(e,t,i){var n,r={ppid:t.guestToken,vid:i.assetDetails.id,cust_params:{platform_name:"undefined"!=typeof window&&window.document&&window.document.createElement&&(null!==(n=navigator.userAgent)&&void 0!==n&&n.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|Windows Phone/i)||window.innerWidth<=480)&&!window.navigator.userAgent.toLowerCase().match(/tv/i)?"mobile_web":"desktop_web",app_version:e.appVersion,user_display_language:t.displayLanguage,user_content_language:V("content-language"),user_type:t.userType,z
2id:t.guestToken}};return"guest"!==t.userType&&(r=Ts(Ts({},r),{},{cust_params:Object.assign(r.cust_params,{age:t.userData.age},{gender:t.userData.gender},{uid:t.userData.id})})),t.isSportsLiveEvent({assetType:i.assetDetails.asset_type,assetSubType:i.assetDetails.asset_subtype})&&(r=Ts(Ts({},r),{},{cust_params:Object.assign(r.cust_params,{audio_language:i.keyOsDetails.stream_language})})),r},As=function(e){return e[e.subtitle=0]="subtitle",e[e.caption=1]="caption",e}({}),ws=u((function e(){o(this,e)}));c(ws,"APPLICATION_MP4","application/mp4"),c(ws,"APPLICATION_MPD","application/dash+xml"),c(ws,"APPLICATION_M3U8","application/x-mpegURL");var Ps=null;function Cs(e,t){var i=e,n=new(oe.default.getComponent("Button"))(i,{clickHandler:function(){t()}});n.addClass("go-live-button"),n.contentEl().innerHTML="Go Live";var r=i.controlBar,s=i.controlBar.getChild("AudioTrackButton").el();r.el().insertBefore(r.addChild(n).el(),s)}function Ls(e,t){if((null==t?void 0:t.getFeatureFlagConfig(Et.CONFIG_SPORTS)).payload.enable_concurrent_user_api){var i={showId:e.id,country:t.country};t.getConcurrentUsers(i).then((function(e){var t,i;document.querySelector(".liveUsers")&&e&&e.formatted?(t=e.formatted,(i=document.querySelector(".liveUsers"))&&(i.innerHTML="".concat(t," LIVE"))):Ds(e.formatted)}))}else Ds(null)}function Ds(e){var t=document.querySelector(".liveUsersContainer"),i=document.querySelector(".watermarkContainer");if(!t){var n=document.createElement("div");n.setAttribute("class","liveUsersContainer");var r=document.createElement("span");if(r.setAttribute("class","liveUsers"),e&&""!==e.trim()){var s=document.createElement("img");s.setAttribute("class","visibilityImg"),s.src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/VisibilityOn.svg",n.append(s),r.innerHTML="".concat(e," LIVE")}else r.innerHTML="LIVE";n.append(r),i&&i.appendChild(n)}}var ks,Is=function(e,t){var i=1e3*((null==t?void 0:t.user_watermark_min_interval)||180),n=1e3*((null==t?void 0:t.user_watermark_max_interval)||300),r=1e3*((null==t?void 0:t.user_watermark_visibility_duration)||3),s=function(){return Math.floor(Math.random()*(n-i+1))+i};window.setTimeout((function t(){(function(){var t,i,n=e&&(null===(t=e.el)||void 0===t?void 0:t.call(e));if(n){var s=k("ID")||"",a=document.createElement("div"),o=Math.floor(1e9*Math.random());a.className="watermark-".concat(o),a.innerText=function(e){return e?function(e){if(!e)return console.log("UUID input is required."),"";var t=null==e?void 0:e.trim().toUpperCase().replace(/-/g,"");if(!/^[0-9A-F]{32}$/.test(t))return console.log("Invalid UUID. Must contain exactly 32 hexadecimal characters."),"";for(var i=[],n=0;n<t.length;n+=2)i.push(parseInt(t.substring(n,n+2),16));for(var r="";i.length>0;){for(var s=0,a=[],o=0;o<i.length;o++){var l=256*s+i[o],d=Math.floor(l/62);s=l%62,(a.length>0||d>0)&&a.push(d)}r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[s]+r,i.length=0;for(var u=0;u<a.length;u++)i.push(a[u])}for(;r.length<22;)r="0"+r;return r}(e):""}(s),Object.assign(a.style,{position:"absolute",color:"rgba(255, 255, 255, 0.4)",fontSize:j()?"10px":"18px",fontWeight:800,pointerEvents:"none",zIndex:9999}),"static"===(null===(i=window)||void 0===i||null===(i=i.getComputedStyle(n))||void 0===i?void 0:i.position)&&(n.style.position="relative"),null==n||n.appendChild(a);var l=null==n?void 0:n.getBoundingClientRect(),d=(null==l?void 0:l.width)||0,u=(null==l?void 0:l.height)||0,c=(null==a?void 0:a.offsetWidth)||0,h=(null==a?void 0:a.offsetHeight)||0,p=Math.max(0,d-c),f=Math.max(0,u-h),g=d>0?p/d*100:0,m=u>0?f/u*100:0,v=Math.min(90,g),y=Math.min(90,m),_=Math.min(10,v),b=Math.min(10,y),T=_+Math.random()*(v-_),S=b+Math.random()*(y-b);a.style.left="".concat(T,"%"),a.style.top="".concat(S,"%"),window.setTimeout((function(){null==a||a.remove()}),r)}})(),window.setTimeout(t,s())}),s())};function Rs(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ns(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
2t%2?Rs(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Rs(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Os=function(){return u((function e(t){var i,n,r=this;o(this,e),c(this,"keySystem",new vs),c(this,"playableData",null),c(this,"playerDisposedFlag",!0),c(this,"isAdPlaying",!1),c(this,"isPlayingClearContent",!1),c(this,"metaDataLoaded",!1),c(this,"isVisible",!0),c(this,"firstPlay",!1),c(this,"prevCapping",null),c(this,"isPopUpVideo",!1),c(this,"isSportsLive",!1),c(this,"freeAvailableSeconds",900),c(this,"hasTobaccoAdvisoryVideo",!1),c(this,"preRollTobaccoAdvisoryVideoShown",!1),c(this,"showTobaccoAdvisoryWithoutPreRoll",!1),c(this,"videoPlayed",!1),c(this,"reloadCount",0),c(this,"isSOSEnabled",!1),c(this,"isPlayerLogoEnabled",!1),c(this,"npawAccountCode",""),c(this,"longWatchRemainingTime",0),c(this,"longWatchStartTime",0),c(this,"isLongWatchEventSent",!1),c(this,"hasAdError",!1),c(this,"abrHandler",(function(){var e;null!==(e=r.playerConfig)&&void 0!==e&&e.isFeatureEnabled&&(r.isSOSEnabled=r.playerConfig.isFeatureEnabled(Et.FEATURE_ABR_CAPPING)),r.isSOSEnabled&&r.sosInterval()})),c(this,"sosInterval",a(p().mark((function e(){var t,i,n,s,a,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=60,e.prev=1,!(n=(null===(i=r.playerConfig)||void 0===i?void 0:i.sos_abr_url)||"")){e.next=13;break}return e.next=6,fetch(n);case 6:return s=e.sent,e.next=9,s.json();case 9:a=e.sent,t=a.refreshInterval||60,o=Ns({},a.abrCapping),r.applySOSCapping(o);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),console.error(e.t0||{},{type:"GET"});case 18:return e.prev=18,setTimeout(r.sosInterval,1e3*t),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[1,15,18,21]])})))),this.playerConfig=t,this.videoPlayer,this.isPlayerEventRegistered=!1,this.setDataFromPlayerConfig(),this.contentWithNoTrailer=!1,this.isRecoPending=!0,this.similarFromReco=[],this.contentDescriptorHidden=!0,this.isNewsCatchup=!1,this.preRollForDaiConfig=!1,this.analyticsManager=ut.getInstance(),this.mandatoryVideoCountUpdated=!1,this.preRollDetectedorFailed=!1,this.isStaleApisCalled=!1,this.validContentTypesForStaleApi=["video","episode"],this.sosAssetType=null,this.sosAssetSubtype=null,this.sosCapping=null,this.showFreeMinutesTimer=!1,this.initGatingTimer=!1,this.longWatchRemainingTime=y,this.isLongWatchEventSent=!1,"video-tag-popup"===this.playerConfig.videoTagId?(this.isPopUpVideo=!0,ks=new mt,null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_STARTED)||"")):ks=new pt,document.addEventListener("visibilitychange",this.handleVisibilityChange.bind(this),!1),this.freeMinutesTimer=null}),[{key:"setDataFromPlayerConfig",value:function(){var e;this.playerConfig=Ns({},this.playerConfig),this.singlePlayDetails=this.playerConfig.singlePlayDetails,this.mixpanelData=this.playerConfig.mixpanelData||{},this.displayLanguage=this.playerConfig.displayLanguage,this.npawAccountCode=this.playerConfig.npawAccountCode,this.npawAccountCode&&Or.initialize(this.npawAccountCode),null===(e=this.analyticsManager)||void 0===e||e.setMixpanelPlayerConfig(this.playerConfig)}},{key:"getPlayableData",value:function(){var e,t,i,n=this.singlePlayDetails||{},r=n.entitlement,s=n.keyOsDetails,a=n.assetDetails,o=n.trailerDetails,l=n.error_code,d=n.error_msg,u=void 0===d?"":d,c=this.playerConfig||{},h=c.isIncognitoOn,p=void 0!==h&&h,f=c.toggleWatchTrailerButton,g=void 0===f?null:f,m=(r||{}).isPremiumPlayback,v=void 0!==m&&m,y=a||{},_=y.is_drm,b=(y.content_gating,y.content_gating_live,y.asset_subtype,k("isTelcoUser")),T=V("partner")||k("partnerName"),S=this.playerConfig.getFeatureFlagConfig(Et.CONFIG_PROFILES),E=this.playerConfig.getFeatureFlagConfig(Et.FEATURE_GATING),A=(E.enabled,E.payload.enable_popup_sports_vod,null!==(e=null==S?void 0:S.enabled)&&void 0!==e&&e),w=null==S||null===(t=S.payload)||void 0===t?void 0:t.toggle_kids_feature,P=null==S||null===(i=S.payload)||void 0===i?void 0:i.kids_player_error_msg;if(p&&v&&_&&!b&&!T)return null;if(r&&s){var C,L=r.isAVOD,D=r.isPremiumPlayback,R=r.isTrailer,N=r.isLive,O=r.is_dai,M=void 0===O?0:O;this.isDai=!!M;var x=0===(null===(C=I())||void 0===C?void 0:C.profileType);if(A&&w&&x&&(null==a||!a.kids_safe)){var B=P;return this.playerConfig.triggerPopUp({name:"singleMessagePopup",error_code:l,error_msg:B}),null}if((L&&!R||D)&&(a.is_drm&&s.sdrm||!a.is_drm&&s.hls_token))return"trailer"===a.asset_subtype&&g?g({disable:!0}):g&&g({disable:!1}),a;if(R&&s.sdrm&&g)return g({disable:!0}),o;if(N&&s.video_token)return a}else{if("3608"===l||"606"===l||"610"===l||"607"===l||"3804"===l||"3612"===l||"601"===l||"603"===l||"3609"===l||"3610"===l||"3814"===l||"3805"===l||"3603"==(l&&l.toString())||"3614"===l)return"3614"===l?(this.playerConfig.triggerPopUp({name:"singleMessagePopup",error_code:l,error_msg:u}),null):(this.playerConfig.callStaledApis&&this.validContentTypesForStaleApi.includes(this.playerConfig.contentType)&&this.playerConfig.callStaledApis(),"3814"===l||"3612"===l?(this.playerConfig.triggerPopUp({name:"svodOrTvod"}),this.playerConfig.triggerTeaserBanner(this.playerConfig),a):"3805"===l?(this.playerConfig.triggerPopUp({name:"singleMessagePopup",error_code:l,error_msg:u}),a):a);!this.contentWithNoTrailer&&"604"===l&&this.playerConfig.tvodState&&window&&window.translationsAndConfigs&&(this.contentWithNoTrailer=!0,this.playerConfig.triggerPopUp({name:"svodOrTvod"}),this.playerConfig.triggerTeaserBanner(this.playerConfig))}return null}},{key:"initPlaybackFlow",value:function(){var e,t,i=this.singlePlayDetails||{},n=i.error_code,r=void 0===n?"":n,s=i.error_msg,a=void 0===s?"":s,o=i.entitlement,l=i.parentalControlPin,d=void 0===l?"":l,u=o||{},c=u.isTrailer,h=u.isAdAuthenticated,p=(this.playerConfig.getFeatureFlagConfig(Et.CONFIG_TOBACCO)||{}).payload,f=!1;null!==(e=this.singlePlayDetails)&&void 0!==e&&null!==(e=e.tobaccoAdvisoryDetails)&&void 0!==e&&e.video_segments&&null!=p&&null!==(t=p.video_segment_config)&&void 0!==t&&t.enable&&(this.hasTobaccoAdvisoryVideo=!0),function(e,t){var i,n,r,s;return!!(null!=e&&null!==(i=e.tobaccoAdvisoryDetails)&&void 0!==i&&i.video_segments&&null!=t&&null!==(n=t.video_segment_config)&&void 0!==n&&n.enable||null!=e&&null!==(r=e.tobaccoAdvisoryDetails)&&void 0!==r&&r.aston_segments&&null!=t&&null!==(s=t.aston_band_config)&&void 0!==s&&s.enable)}(this.singlePlayDetails,p)&&(f=!0),ks.updateConvivaInfo({containsHealthspot:f});var g=this.playerConfig||{},m=g.tvodObj,v=void 0===m?null:m,y=(g.adultPopupComponent,g.userType),_=void 0===y?"guest":y;!r||"3804"!==r&&"3612"!==r&&"604"!==r?h&&!c||r&&("601"===r||"603"===r)?this.playerConfig.triggerPopUp({name:"adultPopup",isAdvertisementAuthenticated:!1}):"3603"==(r&&r.toString())||"610"===r||"607"===r||"3609"===r||"3610"===r||"3805"===r?this.playerConfig.triggerPopUp({name:"singleMessagePopup",error_code:r,error_msg:a}):"606"===r?(window.parentalPinPopUpEnabled=!0,ks.createConvivaSessionParental(this),"guest"===_?this.playerConfig.triggerPopUp({name:"adultPopup",isAdvertisementAuthenticated:!1}):d||0===d?this.playerConfig.triggerPopUp({name:"parentalPopup"}):this.playerConfig.handleParentalPin(),li(this,this.isPopUpVideo)):this.initializePlaybackType():(this.isPlayerEventRegistered||li(this,this.isPopUpVideo),"3804"!==r&&"3612"!==r||(this.playerConfig.triggerPopUp({name:"svodOrTvod"}),this.playerConfig.triggerTeaserBanner(this.playerConfig)),"604"===r&&v&&(this.similarFromReco=[],this.playerConfig.triggerPopUp({name:"svodOrTvod"})))}},{key:"initializePlaybackType",value:function(){this.setLicenseCertHeaders();var e=this.getProtectedMedia();e?(this.isPlayingClearContent=!1,this.initMediaPlayer(e)):this.initializeFallbackPlayback()}},{key:"getClearMedia",value:function(){var e={title:"",type:ws.APPLICATION_M3U8,medium:ms.VIDEO,poster:this.playerConfig.posterImage};return this.singlePlayDetails.keyOsDetails&&this.singlePlayDetails.keyOsDetails.hls_token?e.src=this.singlePlayDetails.keyOsDetails.hls_token:this.singlePlayDetails.keyOsDetails&&this.singlePlayDetails.keyOsDetails.video_token&&(this.playerConfig.startTime&&this.playerConfig.endTime&&window.location.href.includes("start")&&window.location.href.includes("end")?(this.isNewsCatchup=!0,e.src="".concat(this.singlePlayDetails.keyOsDetails.video_token,"&start=").concat(this.playerConfig.startTime,"&end=").concat(this.playerConfig.endTime)):(this.isNewsCatchup=!1,e.src=this.singlePlayDetails.keyOsDetails.video_token)),e.src?e:null}},{key:"getProtectedMedia",value:function(){if(this.singlePlayDetails&&this.singlePlayDetails.timeStamp){var e=this.singlePlayDetails.timeStamp;Math.floor((new Date-e)/1e3)/60>=2&&this.sendConvivaReportEvent({type:"SINGLE_PLAY_TIME_STAMP_EXPIRED"})}var t=this.singlePlayDetails||{},i=(t.entitlement,t.keyOsDetails),n="",r="";if(i&&i.nl&&i.sdrm){var s=w();if(this.playableData.video_url&&(this.playableData.video_url.mpd||this.playableData.video_url.m3u8))return n=this.playableData.video_url.mpd,r=this.playableData.video_url.m3u8,"Safari"===s?this.getFairplayConfig(r):this.getWidevineConfig(n);setTimeout((function(){window.location.reload()}),1e3)}return null}},{key:"getWidevineConfig",value:function(e){var t={drm:vs.WIDEVINE,licenseUri:this.playerConfig.licenseUrl+v,certificateUri:this.playerConfig.licenseUrl+v,licenseHeaders:this.licenseCertHeaders,certificateHeaders:this.licenseCertHeaders};return{title:"",src:e,type:ws.APPLICATION_MPD,medium:ms.VIDEO,poster:this.playerConfig.posterImage,keySystems:this.keySystem.getConfigs(t)}}},{key:"getMimeType",value:function(){var e,t,i=this.playerConfig.isFeatureEnabled(Et.FEATURE_MIMETYPE_CHECK_ENABLED);return e=navigator.userAgent.includes("iPad"),t=navigator.userAgent.includes("Chrome")||navigator.userAgent.includes("CriOS"),e&&t&&i?ws.APPLICATION_MP4:ws.APPLICATION_M3U8}},{key:"getFairplayConfig",value:function(e){var t={drm:vs.FAIRPLAY,certificateUri:"https://stcf-prod.zee5.com/prod/zee5Videojs/safari/b19d422d890644d5112d08469c2e5946.der",licenseUri:this.playerConfig.licenseUrl+"fairplay/getLicense",licenseHeaders:this.licenseCertHeaders};return{title:"",src:e,type:this.getMimeType(),medium:ms.VIDEO,poster:this.playerConfig.posterImage,keySystems:this.keySystem.getConfigs(t)}}},{key:"setLicenseCertHeaders",value:function(){this.licenseCertHeaders=new Map,this.licenseCertHeaders.set("nl",this.playerConfig.nl),this.licenseCertHeaders.set("customdata",this.playerConfig.customdata)}},{key:"initMediaPlayer",value:function(e){var t,i=this.playerConfig,n=i.getPosterUrl,r=i.isRequestedByBot,s=i.userData;e&&!this.isNewsCatchup&&this.singlePlayDetails&&(this.isDai||this.singlePlayDetails.adDetails)&&!r?e.advertising=this.getAdconfig():this.hasTobaccoAdvisoryVideo&&(this.showTobaccoAdvisoryWithoutPreRoll=!0);var a={type:"MEDIA_SOURCE_LATEST",payload:JSON.stringify(e)};this.entitledLanguages=(null===(t=this.singlePlayDetails)||void 0===t||null===(t=t.assetDetails)||void 0===t?void 0:t.entitled_languages)||[],this.sendConvivaReportEvent(a);var o={media:e,autoplay:!r,muted:this.videoPlayer&&this.videoPlayer.player&&this.videoPlayer.player()&&this.videoPlayer.getMutedState()||!1,loop:!1,controls:!r,errorDisplay:!1,poster:r?n({tagName:"playerPoster",item:this.singlePlayDetails.assetDetails}):"",logo:"",sportsLive:this.isSportsLive,liveui:!!this.isSportsLive},l=Ns({},o);if(this.playerConfig.getFeatureFlagConfig){if(j()){var d=this.playerConfig.getFeatureFlagConfig(Et.CONFIG_PLAYER_OPTIONS_MOBILE);d.enabled,d.payload}var u=this.playerConfig.getFeatureFlagConfig(Et.CONFIG_PLAYER_OPTIONS_DESKTOP),c=u.enabled,h=u.payload;l=K(o,c?h:{})}if(this.playerDisposedFlag){this.playerDisposedFlag=!1;try{this.videoPlayer=new gs(this.playerConfig.videoTagId)}catch(e){console.log("media player failed to load",e)}}this.videoPlayer.destroy(),this.isDai&&(e=Ns(Ns({},e),{},{cust_params:Es(this.mixpanelData,this.playerConfig,this.singlePlayDetails)}),o.media=e),this.isVisible?this.videoPlayer.setup(l,e,this.singlePlayDetails,s,this.mixpanelData,r):(this.mediaObject=e,this.defaultPlayerConfig=l,this.setPlayerHaltedFlag=!0),this.eventHandler(this.videoPlayer)}},{key:"initializeFallbackPlayback",value:function(){var e=this.getClearMedia();this.isPlayingClearContent=!0,this.initMediaPlayer(e)}},{key:"getAdconfig",value:function(){var e=(this.singlePlayDetails||{}).entitlement.isLive;return this.getVmaxAdConfigurations()||(e?Ss(this.singlePlayDetails)&&!this.preRollForDaiConfig?(this.preRollForDaiConfig=!0,this.getGoogleIMAConfigurations()):this.isDai&&this.singlePlayDetails.keyOsDetails?this.getGoogleDaiConfigurations():void 0:this.getGoogleIMAConfigurations())}},{key:"getVmaxAdConfigurations",value:function(){var e=(this.singlePlayDetails||{}).adDetails,t=void 0===e?{}:e,i=t.adPriority,n=void 0===i?{}:i,r=n.VMAX,s=void 0===r?0:r,a=n.DFP,o=void 0===a?0:a,l=t.VMAX,d=void 0===l?{}:l;return!(1!==s||2!==o||!d)&&{client:rs.VMAX,vmaxSettings:{ads:d}}}},{key:"getGoogleIMAConfigurations",value:function(){var e,t=Ss(this.singlePlayDetails),i=function(e){var t=(e&&e.adDetails).video_ads,i=void 0===t?"":t,n=(i&&(null==i?void 0:i.length)>0&&i[0]||{adsUrl:""}).adsUrl;return!(void 0===n||!n)}(this.singlePlayDetails),n=(null===(e=this.playerConfig)||void 0===e?void 0:e.getFeatureFlagConfig(Et.CONFIG_GOOGLE_IMA)).payload;return t&&!i?{client:rs.IMA,imaSettings:{adTagUrl:"",adResponse:t,imaSettingsFromS3:n||{}}}:t&&i?{client:rs.IMA,imaSettings:{adTagUrl:t,adResponse:"",imaSettingsFromS3:n||{}}}:void 0}},{key:"getGoogleDaiConfigurations",value:function(){var e=this.singlePlayDetails.keyOsDetails,t=this.singlePlayDetails.daiDetail
2s&&this.singlePlayDetails.daiDetails.auth_token?this.singlePlayDetails.daiDetails.auth_token:"",i="";return e.nl&&e.sdrm,e.asset_key?(i=e.asset_key,{client:rs.DAI,daiSettings:{contentSourceId:"",assetKey:i,isLiveStream:!0,videoId:"",authToken:t}}):null}},{key:"generateSubtitleTracks",value:function(e,t){var i=[],n=this.playerConfig.audioLanguageMapper,r="";if("Safari"!==w()){var s=null,a=localStorage.getItem("subtitlePreference");if(null!==a)try{(s=JSON.parse(a))&&s[t]&&(r=s[t])}catch(e){console.error("Error parsing subtitlePreference:",e)}}else r=sessionStorage.getItem("subtitleName")||"";return e.length>0&&e.forEach((function(e){var t={};t.kind=As.subtitle,t.src=e.url,r&&r===e.language&&(t.mode="showing"),t.label=n[e.language.toLowerCase()]||F(e.language)||e.language,t.srclang=e.language,i.push(t)})),i}},{key:"eventHandler",value:function(t){var i,n=this,s=!1,a=[];if(null!==(i=this.playerConfig)&&void 0!==i&&i.getFeatureFlagConfig){var o=this.playerConfig.getFeatureFlagConfig(Et.CONFIG_PLAYER_ENTITLED_LANGUAGES),l=o.enabled,d=o.payload;a=(null==d?void 0:d.supportForOlderContents)||[],s=l}if(li(this,this.isPopUpVideo),!this.isPlayerEventRegistered){this.isPlayerEventRegistered=!0;var u=this,h=!0;this.videoPlayer.on(tt.ENTITLED_LANG_ERROR,function(e){var t,i;console.log("Entitlement Language Error!!"),e&&e.pause();var r,s,a=null===(t=n.playerConfig)||void 0===t?void 0:t.getFeatureFlagConfig(Et.MULTI_AUDIO);if(null!==(i=null==a?void 0:a.enabled)&&void 0!==i&&i)null===(r=n.playerConfig)||void 0===r||r.showUpgradeSubscriptionPopup();else if(null!=n&&null!==(s=n.singlePlayDetails)&&void 0!==s&&null!==(s=s.assetDetails)&&void 0!==s&&s.dubbed_error){var o,l,d=null===(o=n.singlePlayDetails)||void 0===o||null===(o=o.assetDetails)||void 0===o||null===(o=o.dubbed_error)||void 0===o?void 0:o.error_code,u=null===(l=n.singlePlayDetails)||void 0===l||null===(l=l.assetDetails)||void 0===l||null===(l=l.dubbed_error)||void 0===l?void 0:l.error_message;return void n.playerConfig.triggerPopUp({name:"singleMessagePopup",error_code:d,error_msg:u})}}.bind(this)),this.videoPlayer.on(tt.USER_ACTIVE,(function(){j()&&U(!1)})),this.videoPlayer.on(tt.USER_INACTIVE,(function(e){j()&&!this.videoPlayer.paused()&&U(!0)})),this.videoPlayer.on(tt.TIME_UPDATE,(function(e){if(!u.isAdPlaying){var t=document.querySelector(".adContainer");t&&(t.style.display="none");var i=document.querySelector(".companionAdATF");i&&i.classList.remove("companionAdBanner")}var n;document.querySelector(".drowerPopupContent")&&u.playerConfig.hideSubscriptionNudge(),h&&(h=!1),Ni(e),document.querySelector(".vjs-menu-button")&&(null==u||null===(n=u.videoPlayer)||void 0===n||null===(n=n.videoPlayer)||void 0===n||null===(n=n.controlBar)||void 0===n||null===(n=n.getChild("SourceMenuButton"))||void 0===n||n.controlText("Quality selector")),u.playableData;var r,s,a=0;try{a=e.currentTime()}catch(e){console.log("player current time get error")}if(a>4&&u.contentDescriptorHidden&&!u.isAdPlaying&&(u.contentDescriptorHidden=!1,r=u.playerConfig,null===Ps&&((s=document.querySelector(".scoreMainContainer"))&&(s.style.visibility="hidden"),function(){var e=document.querySelector(".trailerInfoContainer");e&&(e.style.visibility="hidden")}(),function(e){var t=document.getElementById(e.videoTagId),i=function(){return document.querySelector(".info-container")};t&&i()&&t.removeChild(i());var n=window.location&&window.location.pathname;if(n&&n.split("/")&&n.split("/").length&&"news"===n.split("/")[1]||"livetv"===e.contentType)return null;var r=(e.singlePlayDetails||{}).assetDetails,s=void 0===r?{}:r,a=s.age_rating,o=void 0===a?"U":a,l=s.extended_wh,d=(void 0===l?{}:l).content_descriptors,u=void 0===d?[]:d,c="";u&&u.length>0&&(c=u.join(", ")),P({element:"div",text:"",className:"info-container",attributes:[{attribute:"class",value:"info-container"}],targetDiv:t}),P({element:"div",className:"info-container--rating",text:"Rated ".concat(o),attributes:[{attribute:"class",value:"rating"}],targetDiv:i()}),c&&c.length>0&&i()&&P({element:"p",className:"info-container--descriptor",text:c,attributes:[{attribute:"class",value:"description"}],targetDiv:i()})}(r),U(!1),B(!1),te(!1),Ps=setTimeout((function(){!function(e){var t=document.getElementById(e.videoTagId),i=document.querySelector(".info-container");if(t&&i){i.className="info-container info-container-inverse";var n=setTimeout((function(){i&&t.removeChild(i),clearTimeout(n)}),400)}setTimeout((function(){!function(){var e=document.querySelector(".trailerInfoContainer");e&&(e.style.visibility="visible")}()}),500),U(!0),B(!0),te(!0),setTimeout((function(){!function(){var e=document.querySelector(".scoreMainContainer");e&&(e.style.visibility="visible")}()}),1400)}(r),Ps&&(clearTimeout(Ps),Ps=null)}),5e3))),window.navigator&&!window.navigator.onLine)if(u.playerConfig.triggerPopUp({name:"networkRetry",playerErrorCode:ki(Tt.NETWORK)}),e.pause(),window.navigator&&window.navigator.connection)window.navigator.connection.onchange=function(){window.navigator&&window.navigator.onLine&&document.querySelector(".main-container")&&(document.querySelector(".main-container").remove(),e.play())};else var o=setInterval((function(){window.navigator&&window.navigator.onLine&&document.querySelector(".main-container")&&(document.querySelector(".main-container").remove(),e.play(),clearInterval(o))}),100);if(u.isSportsLive&&e.liveTracker.isLive())if(e.liveTracker.behindLiveEdge()&&0===document.getElementsByClassName("go-live-button").length)Cs(e,(function(){e.liveTracker.seekToLiveEdge()}));else if(e.liveTracker.behindLiveEdge()||0===document.getElementsByClassName("go-live-button").length){if(e.liveTracker.behindLiveEdge()&&0!==document.getElementsByClassName("go-live-button").length){var l=document.querySelector(".go-live-button");l&&(l.style.display="block")}}else{var d=document.querySelector(".go-live-button");d&&(d.style.display="none")}})),this.videoPlayer.on(tt.META_DATA_LOADED,(function(e){var t,i,n,o,l,d,h,p,f,g,m,v,y;if((u.singlePlayDetails||{}).entitlement.isLive){var _=document.querySelector(".vjs-live-control");_&&(_.style.display="flex")}else{var b=document.querySelector(".vjs-live-control");b&&(b.style.display="none")}var T=null===(t=u.playerConfig)||void 0===t?void 0:t.getFeatureFlagConfig(Et.MULTI_AUDIO);null===(i=Or.getPlugin())||void 0===i||i.setVideoOptions(c({},qn.SUBTITLES,function(){var e=Fn.NOT_APPLICABLE;try{var t=window.videoPlayer&&window.videoPlayer.textTracks().tracks_.filter((function(e){return"showing"===e.mode}));t&&t.length>0&&(e=t[0].label)}catch(t){return e}return e}())),null===(n=Or.getPlugin())||void 0===n||n.setVideoOptions(c({},qn.RENDITION,function(){try{var e,t=null===(e=Gn)||void 0===e?void 0:e.qualityLevels(),i=Array.from({length:t.length},(function(e,i){return t[i]})).find((function(e){return e.enabled}));return i?"".concat(i.width,"x").concat(i.height):Fn.UNKNOWN}catch(e){return Fn.UNKNOWN}}()));var S=null!==(o=null==T?void 0:T.enabled)&&void 0!==o&&o;if(S){var E=u.singlePlayDetails.assetDetails,A=E.ordered_audio_languages,P=void 0===A?[]:A,C=E.entitled_languages;!function(e,t){try{var i=e.audioTracks();if(!i||0===i.length)return void console.error("No audio tracks available");for(var n=0;n<i.length;n++){var r=(i[n].language||"").toLowerCase();if(r===t||r.startsWith(t))return i[n].enabled=!0,void console.log("Audio track set to: ".concat(t))}i[0].enabled=!0,console.log("Language '".concat(t,"' not found, defaulting to first track"))}catch(e){console.error("Error setting default audio track:",e)}}(e,function(e,t){var i,n=new Set(t.map((function(e){return e.toLowerCase()}))),r=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(e);try{for(r.s();!(i=r.n()).done;){var s=i.value;if(n.has(s.toLowerCase()))return s}}catch(e){r.e(e)}finally{r.f()}return e[0]}(P,void 0===C?[]:C))}!S||"Safari"===w()||u.isAdPlaying||u.isSportsLive||vi(e,T,u),function(e,t,i){var n=e.isFeatureEnabled(Et.
2ENABLE_AD_MARKERS),r=t,s=i,a=(s||{}).adDetails,o=void 0===a?[]:a,l=(s||{}).assetDetails,d=(_s({},void 0===l?[]:l)||{}).adMarkers,u=void 0===d?[]:d,c=(_s({},o)||{}).video_ads,h=(void 0===c?[]:c)[0]||{},p=h.ads_visibility,f=void 0!==p&&p,g=h.intervals,m=void 0===g?[]:g,v=h.adsUrl,y=void 0===v?"":v,_=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal")[0],b=r&&r.duration(),T=document.querySelector("div [playerAdTag=ad]"),S=m;if(f&&y&&!m.length&&u.length&&(S=u),n&&!T&&!isNaN(b)&&_&&f&&S.length){var E=document.createElement("div");E.setAttribute("playerAdTag","ad"),_.appendChild(E),u?u.map((function(e){var t=100*Number(e)/b,i=document.createElement("div");i.setAttribute("style","position:absolute;width:5px;height:100%;background-color:rgb(246, 184, 26);left:".concat(t,"%;")),E.appendChild(i)})):S.map((function(e){var t=e.time;if(!e.isAdPlayed){var i=100*Number(t)/b,n=document.createElement("div");n.setAttribute("style","position:absolute;width:5px;height:100%;background-color:rgb(246, 184, 26);left:".concat(i,"%;")),E.appendChild(n)}}))}else!T||n&&S&&(!S||S.length)||T.remove()}(u.playerConfig,e,u.singlePlayDetails);var L=null===(l=u.playerConfig)||void 0===l?void 0:l.getFeatureFlagConfig(Et.FEATURE_GATING),I=null===(d=u.playerConfig)||void 0===d?void 0:d.getFeatureFlagConfig(Et.CONFIG_PLAYER_LOGO),R=I.enabled,N=I.payload;this.languageLogoPayload=N,this.isPlayerLogoEnabled=R,u.initGatingTimer=null!==(h=null==L?void 0:L.enabled)&&void 0!==h&&h;var O=null!==(p=null==L||null===(f=L.payload)||void 0===f?void 0:f.free_episode_count)&&void 0!==p?p:1;u.initGatingTimer&&(u.initGatingTimer=!1,function(e,t){var i=(e||{}).playerConfig,n=void 0===i?{}:i,r=(e||{}).singlePlayDetails,s=((void 0===r?{}:r)||{}).assetDetails,a=void 0===s?{}:s,o=a.content_gating||a.content_gating_live_channel||a.content_gating_live||{};if("login"===(null==o?void 0:o.type)){var l=Number(localStorage.getItem("loginGatingCounter"))||0;l>=t&&n.showFreeMinutesGatingTimer({playerRef:e,allowedTime:60*o.x_mins_free,gatingType:o.type}),localStorage.setItem("loginGatingCounter",(l+1).toString())}else"subscription"===(null==o?void 0:o.type)&&n.showFreeMinutesGatingTimer({playerRef:e,allowedTime:60*o.x_mins_free,gatingType:o.type})}(u,O)),u.isSportsLive&&!k("prefferedAudioStream")&&function(e){var t=Ft||{},i=t.playerConfig,n=void 0===i?{}:i,r=t.singlePlayDetails,s=void 0===r?{}:r,a=(n||{}).getNativeStringByLangCode,o=void 0===a?null:a,l=s||{},d=l.assetDetails,u=void 0===d?{}:d,c=u.ordered_audio_languages,h=void 0===c?[]:c,p=u.audio_languages,f=void 0===p?[]:p,g=l.keyOsDetails,m=(void 0===g?{}:g).stream_language,v=void 0===m?"en":m,y=null!=h&&h.length?h:f,_=document.createElement("div");_.className="audio-selection-wrapper",_.style.pointerEvents="none";var b=document.createElement("div");b.className="audio-selection-title",b.innerHTML="Choose Your Language";var T=document.createElement("div");T.className="audio-selection-list",T.style.pointerEvents="auto",y.forEach((function(e,t){var i="function"==typeof o?o(e):null,n=document.createElement("span");n.style.pointerEvents="auto",n.className="audio-stream-item audio-".concat(e," ").concat(v===e?"activeAudioLang":v?"":0===t?"activeAudioLang":""),n.setAttribute("key","".concat(e)),n.innerHTML=(null==i?void 0:i.native)||F(e);var r=document.createElement("span");r.className="tick iconOther-ic_tick",n.classList.contains("activeAudioLang")&&n.appendChild(r),n.addEventListener("click",(function(){var i=document.getElementsByClassName("activeAudioLang");i[0].className=i[0].className.replace(" activeAudioLang",""),this.classList+=" activeAudioLang",D("prefferedAudioStream",e),wi(y[t],!0)})),T.appendChild(n)})),_.appendChild(b),_.appendChild(T);var S=e&&e.el();S&&S.appendChild(_),setTimeout((function(){yi(e)}),5e3)}(e),(null===(g=u.entitledLanguages)||void 0===g?void 0:g.length)>0&&(u.entitledLanguages=[].concat(r(u.entitledLanguages),r(a))),console.log("Entitled languages:",u.entitledLanguages);var M=u.playerConfig.audioLanguageMapper,x=u.isSportsLive?null!==(m=u.singlePlayDetails)&&void 0!==m&&null!==(m=m.assetDetails)&&void 0!==m&&null!==(m=m.ordered_audio_languages)&&void 0!==m&&m.length?u.singlePlayDetails.assetDetails.ordered_audio_languages:(null===(v=u.singlePlayDetails)||void 0===v||null===(v=v.assetDetails)||void 0===v?void 0:v.audio_languages)||[]:{},B=u.isSportsLive?null===(y=u.singlePlayDetails)||void 0===y||null===(y=y.keyOsDetails)||void 0===y?void 0:y.stream_language:{};u.videoPlayer.modifyAudioTracksLabel(x,B,u.entitledLanguages,s,S,M,u.isSportsLive),s&&S&&function(e,t){var i,n=t||{},r=n.playerConfig,s=void 0===r?{}:r,a=n.singlePlayDetails,o=void 0===a?{}:a,l=(s||{}).getNativeStringByLangCode,d=void 0===l?null:l,u=o||{},c=u.assetDetails,h=void 0===c?{}:c,p=h.entitled_languages,f=void 0===p?[]:p,g=h.ordered_audio_languages,m=void 0===g?[]:g,v=h.content_gating,y=(void 0===v?{}
2:v).type,_=void 0===y?"":y,b=u.entitlement,T=(void 0===b?{}:b).isTrailer,S=void 0===T?0:T,E=null==s?void 0:s.getFeatureFlagConfig(Et.FEATURE_GATING),A=null!==(i=null==E?void 0:E.enabled)&&void 0!==i&&i;A=A&&("subscription"===_||"login"===_);var w=!0===window.isSportsLive,P=e.controlBar.getChild("AudioTrackButton");if(P&&!S){var C=oe.default.getComponent("AudioTrackMenuItem");if(C){P.createItems=function(){var e=this.player(),t=e.audioTracks(),i=[];if(t.length<=1)return i;for(var n=0;n<t.length;n++){var r=t[n];i.push(new C(e,{track:r,selectable:!0}))}var s=[],a=new Map;return i.forEach((function(e){a.set(e.track.language.toLowerCase(),e)})),m.forEach((function(e){var t=a.get(e.toLowerCase());t&&(s.push(t),a.delete(e.toLowerCase()))})),a.forEach((function(e){return s.push(e)})),s},P.update();var L=P.menu;L&&L.children().forEach((function(t){var i,n=null===(i=t.options_)||void 0===i?void 0:i.track;if(n){var r="function"==typeof d?d(n.language):null,a=(null==r?void 0:r.native)||F(n.language);if(a){var o,l=null===(o=t.el())||void 0===o?void 0:o.querySelector(".vjs-menu-item-text");l&&(l.textContent=a)}if(!f.includes(n.language)&&!A&&!w){var u=t.el();if(!u.querySelector(".audio-lock")){var c=document.createElement("img");c.className="audio-lock",c.src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/lockIcon.svg",c.style.width="16px",c.style.height="16px",c.style.marginLeft="6px",c.style.marginBottom="3px",c.style.verticalAlign="middle",u.appendChild(c)}t.addClass("vjs-disabled"),u.setAttribute("aria-disabled","true"),u.setAttribute("tabindex","-1"),u.style.pointerEvents="auto";var h=function(t){return t.preventDefault(),t.stopPropagation(),e.pause(),"premium"===(null==s?void 0:s.userType)&&Fi()?null==s||s.showUpgradeSubscriptionPopup():null!=s&&s.redirectHandler&&"function"==typeof s.redirectHandler?s.redirectHandler("/myaccount/subscription"):window.location.href="/myaccount/subscription",!1};u.addEventListener("click",h),u.addEventListener("touchend",h),t.handleClick=h}}}))}else console.error("video.js AudioTrackMenuItem component not found.")}}(e,u),this.isPlayerLogoEnabled&&this.languageLogoPayload&&function(e,t,i){if(!0!==window.isSportsLive){var n,r=e.audioTracks().tracks_.filter((function(e){return!0===e.enabled})),s=((i||{}).assetDetails||{}).audio_languages,a=void 0===s?[]:s,o=r.length>0?r[0].language:a[0]||null,l="global"===(n=new URL(window.location.href).pathname.split("/"))[1]?n[2]:n[1]||"",d=(t||{}).consumptionPageConfig,u=((void 0===d?{}:d)[l]||{}).enabled;if(void 0!==u&&u){var c=function(e,t){var i=(e||{}).consumptionPageConfig,n=void 0===i?{}:i,r=n&&n[t]||{};return{lr:(null==r?void 0:r.positionX)||"left",tb:(null==r?void 0:r.positionY)||"top",enabled:(null==r?void 0:r.enabled)||!0}}(t,l),h=Z(t,o)||ee(o,t),p=document.createElement("div");p.setAttribute("class","languageLogoContainer ".concat(null==c?void 0:c.lr," ").concat(null==c?void 0:c.tb));var f=document.createElement("img");f.setAttribute("class","languageLogoIcon"),f.src=h,p.appendChild(f);var g=e&&e.el();g&&null!=c&&c.enabled?g.appendChild(p):console.warn("languageLogo: videoEL is null or undefined, logo not appended.")}}}(e,this.languageLogoPayload,u.singlePlayDetails);var U=u.singlePlayDetails;if(!u.metaDataLoaded&&U&&U.assetDetails&&U.assetDetails.subtitle_url&&U.assetDetails.subtitle_url.length>0){var V=u.videoPlayer.getActiveLanguageTrack(),q=u.generateSubtitleTracks(U.assetDetails.subtitle_url,V);q.length>0&&u.videoPlayer.addTextTracks(q)}var j=u.getContentCurrentTime();u.videoPlayer.videoPlayer.currentTime(j),u.metaDataLoaded=!0;var H=u.playerConfig.singlePlayDetails.assetDetails.vtt_thumbnail_url||"";u.videoPlayer.setVttThumbnailSrc(H);var G=u.createSpapiRequestTimeStampPayload(U);u.sendConvivaReportEvent(G);var W=u.createSpapiResponsetTimeStampPayload(U);u.sendConvivaReportEvent(W)})),this.videoPlayer.on(tt.SEEKED,(function(e,t){window.isCastConnected&&(window.seekingSenderBar=!0,function(e){var t=new cast.framework.RemotePlayer,i=new cast.framework.RemotePlayerController(t);t.currentTime=Math.abs(e.currentTime()),i.seek(),window.seekingSenderBar=!1}(e)),function(e){window&&window.autoSeek?(Rt.reportEvent(_.autoSeek,e),window.autoSeek=!1):window.isCastConnected||Rt.reportEvent(_.seek_scrub,e)}(t)})),this.videoPlayer.on(tt.VOLUME_CHANGE,(function(e){!function(e){var t=k("oldVolumeLevel"),i=e.volume()||"1";t&&"1"!==i.toString()&&t.toString()!==i.toString()?D("oldVolumeLevel",i.toString()):D("oldVolumeLevel",t=t||"1")}(e),window.isCastConnected&&function(e){var t=new cast.framework.RemotePlayer,i=new cast.framework.RemotePlayerController(t);t.volumeLevel=e.volume(),i.setVolumeLevel()}(e)})),this.videoPlayer.on(tt.PLAYING,(function(e){var t,i,s,a,o,l,d;l=u.singlePlayDetails.assetDetails.id,d=sessionStorage.getItem("AutoPlay")||"Default",document.querySelector(".freeMinutesEndedPopup")||Mt&&Mt===l||Rt.reportEvent(_.firstPlay,{autoPlay:d}),Mt=l;var c=(null===(t=n.singlePlayDetails)||void 0===t||null===(t=t.assetDetails)||void 0===t?void 0:t.tvshow_name)||(null===(i=n.singlePlayDetails)||void 0===i||null===(i=i.assetDetails)||void 0===i?void 0:i.title)||(null===(s=n.singlePlayDetails)||void 0===s||null===(s=s.assetDetails)||void 0===s?void 0:s.original_title),h=(null===(a=n.singlePlayDetails)||void 0===a||null===(a=a.assetDetails)||void 0===a?void 0:a.asset_subtype)||"",p=h.charAt(0).toUpperCase()+h.slice(1),f=(null===(o=n.singlePlayDetails)||void 0===o||null===(o=o.assetDetails)||void 0===o?void 0:o.genres)||[],g=null==f?void 0:f.map((function(e){return e.id})),m="live_event"===h||"sports_vod"===h?g:[p].concat(r(g));n.videoPlayer.setMetadata(c,m);var v=u.playerConfig.reportGA4Event;v&&v({eventName:"Content_View_AVOD",trackObject:{}})})),this.videoPlayer.on(tt.READY,(function(e){pi(u.playerConfig),function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=null===(e=document.getElementsByClassName("scoreMainContainer"))||void 0===e?void 0:e[0],n=null==i?void 0:i.classList;t?null==n||n.add("pinScorecardContainerOnChromecast"):null==n||n.remove("pinScorecardContainerOnChromecast")}(!!document.querySelector(".chromeCastBtnContainer"));var t=u.playerConfig.getFeatureFlagConfig("config_player_reload"),i=t.enabled,n=t.payload;u.isPopUpVideo?(li(u,u.isPopUpVideo),function(e){var t=Ft||{},i=t.singlePlayDetails,n=void 0===i?{}:i,r=t.playerConfig,s=void 0===r?{}:r,a=t.playableData,o=void 0===a?{}:a,l=t.mixpanelData,d=void 0===l?{}:l,u=s||{},c=u.userData,h=void 0===c?{}:c,p=u.userData,f=(void 0===p?{}:p).user,g=void 0===f?{}:f,m=u.userType,v=void 0===m?"guest":m,y=n||{},_=y.error_code,b=void 0===_?"":_,T=y.entitlement,S=void 0===T?{}:T,E=S.is_dai,A=void 0!==E&&E,w=S.isLive,P=void 0!==w&&w,C=S.isTVOD,L=void 0===C?0:C,D=S.isTrailer,k=void 0===D?0:D,I=y.assetDetails,R=(void 0===I?{}:I).business_type,N=void 0===R?"":R;window.is_dai=A,window.isLive=P;var M=O("mandatoryRegistrationVideoCount")||0;if(window.appVersion=d.appVersion||"NA",window&&window.drmSessionError)It.convivaDrmSessionWaitStarted(e),window.drmSessionError=!1;else if(!b&&(k||L||"premium"===v||"advertisement"===N||"free_downloadable"===N||3!==M&&M<=7)){try{var x;null===(x=window.convivaSDK)||void 0===x||x.setPlayer(e),console.log("OnReady, VideoPlayer Object integrated to ConvivaSDK")}catch(e){console.error("OnReady, Error while adding video Player to conviva SDK",e)}window.isConvivaSessionRequired=!1,function(e,t,i){var n=e||{},r=n.keyOsDetails,s=void 0===r?{}
2:r,a=n.showDetails,o=void 0===a?{}:a,l=e||{},d=l.entitlement,u=(void 0===d?{}:d).isTrailer,c=void 0===u?0:u,h=l.trailerDetails,p=c?void 0===h?{}:h:e.assetDetails;window&&window.keyMomentsconvivaAnalytic&&window.Conviva&&It.updateConvivaIntitialContent(Pt(Pt({},p),s),o,t,i)}(n,h,e),Rt.jsonInitilize(null,null),Rt.setMixpanelData({}),window.analyticsManager=Rt,d.convivaSessionId=Ti();var B={analyticData:o,singlePlayData:n,mixpanelDetail:d,user:g},U=Rt.jsonInitilize(B,e);Rt.setMixpanelData(U)}}(e)):(window.enableReloadPlayerOnTimeout=i&&n.ENABLEPLAYERRELOADTIMER||!1,window.enableReloadPlayerOnTimeout&&function(){window.playerSeconds=0,window.clearPlayerReloadTimer=u.clearPlayerReloadTimer;var e=n.PLAYERSECONDS||30,t=n.RELOADCOUNT||2;u.incrementPlayerCounter=function(){window.playerSeconds>e&&!1===window.isPlayingEventSent&&null===document.getElementById("video-tag-tobaccoAdvisory")&&u.reloadCount<t&&(u.reloadCount+=1,u.reloadPlayer()),u.reloadCount<t&&!1===u.isAdPlaying&&(window.playerSeconds=window.playerSeconds+1,window.playerReloadTimer=setTimeout(u.incrementPlayerCounter,1e3))},u.incrementPlayerCounter()}(),function(e){var t=Ft||{},i=t.singlePlayDetails,n=void 0===i?{}:i,r=t.playerConfig,s=void 0===r?{}:r,a=t.playableData,o=void 0===a?{}:a,l=t.mixpanelData,d=void 0===l?{}:l,u=s||{},c=u.userData,h=void 0===c?{}:c,p=u.userData,f=(void 0===p?{}:p).user,g=void 0===f?{}:f,m=u.userType,v=void 0===m?"guest":m,y=n||{},_=y.error_code,b=void 0===_?"":_,T=y.entitlement,S=void 0===T?{}:T,E=S.is_dai,A=void 0!==E&&E,w=S.isLive,P=void 0!==w&&w,C=S.isTVOD,L=void 0===C?0:C,D=S.isTrailer,k=void 0===D?0:D,I=y.assetDetails,R=(void 0===I?{}:I).business_type,N=void 0===R?"":R,M=(s||{}).toggleSubscriptionPopup,x=void 0===M?null:M;window.toggleSubscriptionPopup=x,window.is_dai=A,window.isLive=P;var B=O("mandatoryRegistrationVideoCount")||0;if(window.appVersion=d.appVersion||"NA",window&&window.drmSessionError)It.convivaDrmSessionWaitStarted(e),window.drmSessionError=!1;else if(!b&&(k||L||"premium"===v||"advertisement"===N||"free_downloadable"===N||"free"===N||"advertisement_downloadable"===N||3!==B&&B<=7)){try{var U;null===(U=window.convivaSDK)||void 0===U||U.setPlayer(e),console.log("OnReady, VideoPlayer Object integrated to ConvivaSDK")}catch(e){console.error("OnReady, Error while adding video Player to conviva SDK",e)}!function(e){var t,i;window&&window.convivaAnalytic&&window.Conviva&&!window.parentalPinPopUpEnabled?null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent((null===(i=window.Conviva)||void 0===i?void 0:i.Constants.PlayerState.STOPPED)||""):window.parentalPinPopUpEnabled&&It.convivaSessionWaitEnded(e)}(e),window.isConvivaSessionRequired=!1,function(e,t,i){var n=e||{},r=n.keyOsDetails,s=void 0===r?{}
2:r,a=n.showDetails,o=void 0===a?{}:a,l=n.tobaccoAdvisoryDetails,d=void 0===l?{}:l,u=e||{},c=u.entitlement,h=(void 0===c?{}:c).isTrailer,p=void 0===h?0:h,f=u.trailerDetails,g=p?void 0===f?{}:f:e.assetDetails;window&&window.convivaAnalytic&&window.Conviva&&!window.parentalPinPopUpEnabled&&It.updateConvivaIntitialContent(Pt(Pt(Pt({},g),s),d),o,t,i)}(n,h,e);var V=0;if(n&&n.watchHistoryDetails){var F=(n||{}).watchHistoryDetails,j=void 0===F?{}:F;V=j.played_duration?j.played_duration:0}if(0!==V){var H={videoCueStart:q(V)};It.updateConvivaInfo(H)}Rt.jsonInitilize(null,null),Rt.setMixpanelData({}),window.analyticsManager=Rt,d.convivaSessionId=Ti();var G={analyticData:o,singlePlayData:n,mixpanelDetail:d,user:g},W=Rt.jsonInitilize(G,e);Rt.setMixpanelData(W)}}(e)),u.playerConfig.callConsumptionPageApis&&!u.validContentTypesForStaleApi.includes(u.playerConfig.contentType)&&u.playerConfig.callConsumptionPageApis()})),this.videoPlayer.on(tt.PLAY,(function(e){var t,i,n,r=u.playerConfig.reportGA4Event;if(!u.isAdPlaying&&r&&!u.isLongWatchEventSent&&!u.triggerGA4timeout&&u.longWatchRemainingTime>0){var s={eventName:"Content_View_AVOD_Web_5mins",trackObject:{}};u.longWatchStartTime=Date.now(),u.triggerGA4timeout=setTimeout((function(){r(s),u.isLongWatchEventSent=!0,u.triggerGA4timeout=null}),u.longWatchRemainingTime)}u.showTobaccoAdvisoryWithoutPreRoll&&!u.preRollTobaccoAdvisoryVideoShown&&u.hasTobaccoAdvisoryVideo&&(u.showTobaccoAdvisoryWithoutPreRoll=!1,u.preRollTobaccoAdvisoryVideoShown=!0,Ii()),document.querySelector(".drowerPopupContent")&&u.playerConfig.hideSubscriptionNudge(),"true"===localStorage.getItem("resumeLiveStream")&&(li(u),localStorage.removeItem("resumeLiveStream"),null===(i=window.convivaAnalytic)||void 0===i||i.reportEvent((null===(n=window.Conviva)||void 0===n?void 0:n.Constants.Events.USER_WAIT_ENDED)||""));var a=((null===(t=u.playerConfig)||void 0===t?void 0:t.getFeatureFlagConfig(Et.CONFIG_SPORTS))||{}).payload,o=(null==a?void 0:a.config_user_detection_via_watermark)||{};if(null!=o&&o.enable_user_watermark&&$(u.singlePlayDetails)&&J()&&Is(e,o),u.isSportsLive){x(!0);var l=document.querySelector(".watermarkContainer");if(l&&(l.style.display="block"),"premium"!==u.playerConfig.userType){u.playerConfig&&u.playerConfig.xmins_free_config&&u.playerConfig.xmins_free_config.live_event&&u.playerConfig.xmins_free_config.live_event.free_period_in_mins?(u.freeAvailableSeconds=60*parseInt(u.playerConfig.xmins_free_config.live_event.free_period_in_mins),u.showFreeMinutesTimer=!0):u.showFreeMinutesTimer=!1;var d=ji(u.playerConfig.contentId);(d||0===d)&&(u.freeAvailableSeconds=ji(u.playerConfig.contentId)),u.checkFreeMinutesPopup();var c=document.querySelector(".freeMinutesInfoTimer");u.showFreeMinutesTimer&&!c&&u.freeAvailableSeconds>0&&u.playerConfig.showFreeMinutes({playerRef:u,timeRemaining:u.freeAvailableSeconds}),!u.freeMinutesTimer&&u.showFreeMinutesTimer&&(u.freeMinutesTimer=setInterval((function(){u.freeAvailableSeconds=u.freeAvailableSeconds-1,u.checkFreeMinutesPopup(),function(e,t){if(null===localStorage.getItem("freeAvailableSecs")){var i={};i[e]=t,localStorage.setItem("freeAvailableSecs",JSON.stringify(i))}else try{var n=JSON.parse(localStorage.getItem("freeAvailableSecs"));n[e]=t,localStorage.setItem("freeAvailableSecs",JSON.stringify(n))}catch(e){}}(u.playerConfig.contentId,u.freeAvailableSeconds),function(e){var t=window.translationsAndConfigs.messages,i=void 0===t?{}:t;e=new Date(1e3*e).toISOString().substring(14,19);var n=document.querySelector(".freeMinutesInfoTimer");n&&(n.innerText="".concat(i.FreeWatchEndsCounterHeading_Text," ").concat(e))}(u.freeAvailableSeconds)}),1e3))}if(!document.querySelector(".watermarkContainer")){var h,p,f=((null===(h=u.playerConfig)||void 0===h?void 0:h.getFeatureFlagConfig(Et.CONFIG_SPORTS))||{}).payload;p=null!=f&&f.concurrent_users_interval?f.concurrent_users_interval:30;var g=(null==f?void 0:f.config_user_detection_via_watermark)||{};null!=g&&g.enable_user_watermark&&Is(e,g),function(e){var t=document.createElement("div");t.setAttribute("class","watermarkContainer");var i=document.createElement("img");i.setAttribute("class","watermarkIcon"),i.src="https://stcf-prod.zee5.com/prod/zee5Videojs/resources/images/new_ZEE5_Watermark_Logo.svg",t.appendChild(i);var n=e&&e.el();n&&n.appendChild(t)}(e),u.concurrentUsersTimer||(Ls(u.playableData,u.playerConfig),u.concurrentUsersTimer=setTimeout((function e(){Ls(u.playableData,u.playerConfig),u.concurrentUsersTimer=setTimeout(e,1e3*p)}),1e3*p))}var m=document.querySelector(".vjs-seek-to-live-control");m&&(m.style.display="none")}if((u.singlePlayDetails||{}).entitlement.isLive){var v=document.querySelector(".vjs-time-divider");v&&(v.style.display="none");var y=document.querySelector(".vjs-duration");y&&(y.style.display="none");var _=document.querySelector(".vjs-current-time");_&&(_.style.marginRight="auto"),u.isSportsLive||_&&(_.style.display="none")}var b=u.playerConfig.isAdStacksDataAvailable()||!1;!function(e){mi.apply(this,arguments)}(e,u.isPopUpVideo,b),u.isNewsCatchup&&0===document.getElementsByClassName("go-live-button").length&&Cs(e,u.playerConfig.goLiveCallback);var T=document.querySelector(".main-container");T&&null!==T&&u.videoPlayer.pause(),window.location.href.includes("b2b-consumption")&&"function"==typeof u.playerConfig.clearSubscriptionNudgePopupTimer&&u.playerConfig.clearSubscriptionNudgePopupTimer(),u.playerConfig.clearSubscriptionNudgePopupTimer()})),this.videoPlayer.on(tt.PAUSE,(function(e){var t=this;if(Rt.reportEvent(_.pauseEvent,null),u.triggerGA4timeout&&(clearTimeout(u.triggerGA4timeout),u.triggerGA4timeout=null,u.longWatchStartTime>0&&!u.isLongWatchEventSent)){var i=Date.now()-u.longWatchStartTime;u.longWatchRemainingTime-=i}if(u.isSportsLive&&u.clearFreeSecondsTimer(),this.isStaleApisCalled||setTimeout((function(){u.playerConfig&&u.playerConfig.callStaledApis&&(u.playerConfig.callStaledApis(),t.isStaleApisCalled=!0)}),3e3),!window.location.href.includes("b2b-consumption")&&u.playerConfig.shouldSubscriptionNudgeDisplayed({nudgeType:"popup",playerRef:u})){var n=u.playerConfig.getAvodNudgeConfig(u.playerConfig.remoteConfig)||[],r=n.paused_wait_duration,s=void 0===r?10:r,a=n.frequency,o=void 0===a?3:a,l=k("AvodNudgeCount"),d=k("AvodNudgeExpDate"),c=W("AvodSessionCount"),h=new Date,p="".concat(h.getFullYear()).concat(h.getMonth()).concat(h.getDate());l||(D("AvodNudgeCount",l="0"),D("AvodNudgeExpDate","".concat(h.getFullYear()).concat(h.getMonth()).concat(h.getDate()))),c||(c="0",G("AvodSessionCount","0")),parseInt(l)>0&&parseInt(p)!=parseInt(d)&&(D("AvodNudgeCount",l="0"),D("AvodNudgeExpDate","".concat(h.getFullYear()).concat(h.getMonth()).concat(h.getDate()))),parseInt(l)<o&&parseInt(c)<1&&(window.avodNudgeHandler=setTimeout((function(){var t;document.querySelector("#main-container")||document.querySelector(".subscriptionPopupCompWrap")||document.querySelector(".drowerPopupContent")||u.isAdPlaying||null===(t=window)||void 0===t||null===(t=t.videoPlayer)||void 0===t||!t.paused()||(u.playerConfig.showSubscriptionNudge(e,u.playerConfig),D("AvodNudgeCount","".concat(parseInt(l)+1)),G("AvodSessionCount","".concat(parseInt(c)+1)))}),1e3*s))}})),this.videoPlayer.on(tt.ENDED,(function(e){u.isPopUpVideo&&u.playerConfig.closeKeyMomentsPopup?(u.dispose(),u.playerConfig.closeKeyMomentsPopup(),ks.reportPlaybackEndedConviva()):function(e){var t=Ft||{},i=t.singlePlayDetails,n=void 0===i?{}:i,r=t.playableData,s=void 0===r?{}:r,a=t.playerConfig,o=void 0===a?{}:a,l=o||{},d=l.tvodState,u=void 0===d?null:d,c=l.toggleWatchTrailerButton,h=void 0===c?null:c,p=(n||{}).entitlement,f=(void 0===p?{}:p).isTVOD,g=void 0===f?0:f,m=(s||{}).asset_subtype,v=void 0===m?"":m;Wt&&xi(),!u||u.isUserEntitledForTvod&&!g||"trailer"!==v&&"promo"!==v||!u.isTvodContent?(g||Pi(e),Vt=!1,Zt=!0,Ei(),It.reportPlaybackEndedConviva()):(o.triggerPopUp({name:"svodOrTvod"}),h({disable:!1}))}(e)})),this.videoPlayer.on(tt.FULL_SCREEN_CHANGE,(function(e){var t;return null===(t=Or.getPlugin())||void 0===t||null===(t=t.getAdapter())||void 0===t||t.fireEvent("fullScreen",{isFullScreen:u.videoPlayer.videoPlayer.isFullscreen()}),u.playerConfig.triggerForCommerceLandscape(),function(e){try{Ut=e&&"function"==typeof e.isFullscreen?e.isFullscreen():!Ut,Ai(),Rt.reportEvent(_.PLAYER_VIEW_CHANGED,null)}catch(e){console.log("error in full screen mode")}}(u.videoPlayer.videoPlayer),u.playerConfig.checkIsFullScreen()})),this.videoPlayer.on(tt.SKIPINTRO,(function(e){console.log("Skip Intro")})),this.videoPlayer.on("audioChanged",(function(e,t,i){var n;if(null===(n=Or.getPlugin())||void 0===n||n.setVideoOptions(c({},qn.LANGUAGE,i[t.toLowerCase()]||F(t)||Fn.NOT_APPLICABLE)),wi(t,u.isSportsLive,0,u.singlePlayDetails),this.isPlayerLogoEnabled&&this.languageLogoPayload&&function(e,t){var i=document.querySelector(".languageLogoIcon"),n=Z(t,e)||ee(e,t);i&&n&&(i.src=n)}(t,this.languageLogoPayload),"Safari"!==w()){var r=u.videoPlayer.getActiveLanguageTrack(),s=u.generateSubtitleTracks(u.singlePlayDetails.assetDetails.subtitle_url,r);s.length>0&&u.videoPlayer.applySubtitleChangesOnAudioChange(s,t)}})),this.videoPlayer.on(tt.QUALITY_CHANGE,(function(e){!function(e){var t=function(e){var t={Auto:"Auto","Auto - Recommended":"Auto - Recommended","Data Saver - 240p":"Data Saver - 240p","Data Saver":"Data Saver","SD - 480p":"SD - 480p",SD:"SD","HD - 720p":"HD - 720p",HD:"HD","Full HD - 1080p":"Full HD - 1080p","Full HD":"Full HD"};return Object.keys(t).find((function(t){return t.match(e)}))||e}(e),i={newVideoQuality:t||e};Rt.reportEvent(_.qualityChange,i)}(e)})),this.videoPlayer.on(tt.SUBTITLECHANGE,(function(e){var t;Object.keys(e.textTracks().tracks_.filter((function(e){return"showing"===e.mode}))).length,t=_.subTitleChange,Rt.reportEvent(t,null);var i=Ui(e),n=document.getElementById("video-tag_ima-ad-container");if(!n||"block"!==n.style.display){var r;if("Safari"!==w()){var s=u.videoPlayer.getActiveLanguageTrack(),a=localStorage.getItem("subtitlePreference")||{};s&&("string"==typeof a&&(a=JSON.parse(a)),a[s]=i,D("subtitlePreference",a))}else sessionStorage.setItem("subtitleName",i);null===(r=Or.getPlugin())||void 0===r||r.setVideoOptions(c({},qn.SUBTITLES,i||Fn.NOT_APPLICABLE)),window.isCastConnected&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(arguments.length>1?arguments[1]:void 0).videoPlayer.getCastSender(),i=t.castSession,n=t.remotePlayer&&t.remotePlayer.mediaInfo&&t.remotePlayer.mediaInfo.tracks,r=e?e.toLowerCase():"off",s=[];if("off"!==r){var a=n.find((function(e){var t=e.language,i=void 0===t?"":t,n=e.type,s=void 0===n?"":n,a=e.trackId;return i.toLowerCase().includes("".concat(r))&&s.toLowerCase().includes("text")&&a}));a&&a.trackId&&s.push(a.trackId)}var o=i.getMediaSession(),l=new chrome.cast.media.EditTracksInfoRequest(s);o.editTracksInfo(l,(function(){return console.log("Text track changed")}),(function(){return console.log("Failed to change text track")}))}(i,u)}})),this.videoPlayer.on(tt.PROGRESS,(function(e){e.currentTime()>0&&(u.firstPlay=!0),It.playerProgress(),u.isPopUpVideo||(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Ft||{},n=i.playableData,r=void 0===n?{}:n,s=i.playerConfig,a=void 0===s?{}:s,o=i.singlePlayDetails,l=a.guestToken,d=a.watchHistoryApi,u=a.guestConfigCWLS,c=a.guestConfigCW,h=a.continueWatchingItemForGuest,p=(a.getFeatureFlagConfig("config_sports")||{}).payload,f=(null==p?void 0:p.watchHistory_heartBeat_rate)||60;if((!$(o)||null!=p&&p.enable_watchHistory_live)&&($(o)||null!=p&&p.enable_watchHistory_vod)){var g=0;e&&"currentTime"in e&&(g=e.currentTime());if(g&&(function(e){return r.watchHistory?function(e,t){return Math.abs(e-t)>=f&&(r.watchHistory.lastSentTime=e,!0)}(e,r.watchHistory.lastSentTime):(r.watchHistory={lastSentTime:e||0},!0)}(g)||t)&&r){var m="PUT";0===g&&(m="POST");var v={id:r.id?r.id:"",asset_subtype:r.asset_subtype?r.asset_subtype:"",asset_type:r.asset_type||0===r.asset_type?r.asset_type:"",genre:[r.genres&&Object.keys(r.genres).length?r.genres[0].id:""],duration:Math.round(g)||0,show_id:r.id?r.id:"",title:r.title?r.title:"",total_duration:r.duration?r.duration:"",business_type:r.business_type?r.business_type:"",device_id:l||"WebBrowser"},y="WatchHistoryLS",_="guest"===k("userType").toLowerCase(),b="episode"===r.asset_subtype;if(r.asset_subtype,c&&u&&_&&(v.image=r.image,v.image_url=r.image_url,v.web_slug=r.web_slug,v.slug=r.web_slug,v.web_url=r.
2web_url,b&&(v.tvshow=o.showDetails,v.tvshow_details=o.showDetails,v.tvshow_image=o.showDetails.image)),c&&u&&_&&("episode"===r.asset_subtype||"movie"===r.asset_subtype))if(v.played_duration=Math.round(e&&"currentTime"in e&&e.currentTime())||0,v.duration=v.total_duration,v.time_left=z(v.total_duration-v.played_duration),k(y)){var T=k(y),S=JSON.parse(T),E={};S.forEach((function(t,i){b&&t.tvshow_details&&t.tvshow_details.id===o.showDetails.id&&t.id!==v.id&&S.splice(i,1),t.id.includes(v.id)&&(null!=v&&v.total_duration&&null!=v&&v.played_duration&&(t.time_left=z(v.total_duration-v.played_duration)),t.played_duration=Math.round(e&&"currentTime"in e&&e.currentTime())||0,E=t,S.splice(i,1))})),E&&Object.keys(E).length?S.push(E):S.push(v),S.length>h&&S.splice(0,1),D(y,JSON.stringify(S))}else{var A=[];A.push(v),D(y,JSON.stringify(A))}else d({watchMethod:m,bodyParams:v})}}}(e),function(e){var t=Ft||{},i=t.singlePlayDetails,n=void 0===i?{}:i,r=t.playableData,s=void 0===r?{}:r,a=t.playerConfig,o=void 0===a?{}:a;if(!Ot&&e&&o&&o.callStaledApis){var l,d=Math.floor((new Date-n.timeStamp)/1e3),u=0;e.currentTime&&(u=Math.abs(e.currentTime()-(null==s||null===(l=s.watchHistory)||void 0===l?void 0:l.lastSentTime))||0),(u>=(j()?3:1)||d>=15)&&(o.callStaledApis(),Ot=!0)}}(e))})),this.videoPlayer.on(tt.ERROR,(function(i){var n,r;n=u.playerConfig,(!(r=k("selfErrors"))||r&&(void 0===r||"string"!=typeof r||"object"===e(r)&&0===Object.keys(r).length))&&n.selfErrorComponent(),u.playerConfig&&u.playerConfig.callStaledApis&&u.playerConfig.callStaledApis();var s=i.code,a=void 0===s?"N/A":s,o=i.message,l=void 0===o?"N/A":o;a.toString()===Tt.MEDIA_ERR_SRC_NOT_SUPPORTED.toString()?l="MEDIA_ERR_SRC_NOT_SUPPORTED":a.toString()===Tt.TIMEOUT.toString()?l="TIMEOUT":a.toString()===Tt.UNSUPPORTED_SCHEME.toString()?l="UNSUPPORTED_SCHEME":a.toString()===Tt.BAD_HTTP_STATUS.toString()?l="BAD_HTTP_STATUS":a.toString()===Tt.HTTP_ERROR.toString()?l="HTTP_ERROR":a.toString()===Tt.NETWORK.toString()&&(l="NETWORK"),u.isPlayingClearContent?Di(i,t,u.playerConfig):(ks.updateConvivaInfo({infoMessage:JSON.stringify({errorCode:"".concat(a),errorMessage:"".concat(l)})}),ks.convivaSessionWaitStarted(),u.getClearMedia()?u.initializeFallbackPlayback():Di(i,t,u.playerConfig),window&&(window.drmSessionError=!0)),u.playerConfig.callConsumptionPageApis&&!u.validContentTypesForStaleApi.includes(u.playerConfig.contentType)&&u.playerConfig.callConsumptionPageApis()})),this.videoPlayer.on(tt.DISPOSE,(function(e){this.triggerGA4timeout&&(clearTimeout(this.triggerGA4timeout),this.triggerGA4timeout=null)}));var p=!1;this.videoPlayer.on(Bn.AD_STARTED,(function(){var e=document.querySelector(".scoreMainContainer");if(e&&("none"===e.style.display?p=!1:"flex"===e.style.display&&(e.style.display="none",p=!0)),"Safari"===w()){var t=document.querySelector("#zee-ad-container");t&&"none"===t.style.display&&(t.style.display="block")}if(u.triggerGA4timeout&&(clearTimeout(u.triggerGA4timeout),u.triggerGA4timeout=null,u.longWatchStartTime>0&&!u.isLongWatchEventSent)){var i=Date.now()-u.longWatchStartTime;u.longWatchRemainingTime-=i}if(u.isAdPlaying=!0,u.playerConfig.updateAdStatusCallback(!0),window&&window.chromePopupDisplayed&&u.videoPlayer.pause(),u.isSportsLive){x(!1);var n=document.querySelector(".watermarkContainer");n&&(n.style.display="none")}Bi(!1),qi(!1)})),this.videoPlayer.on(Bn.AD_COMPLETE,(function(e){var t,i=document.querySelector(".scoreMainContainer");if(i&&!0===p&&(i.style.display="flex",p=!1),u.isAdPlaying=!1,u.hasTobaccoAdvisoryVideo&&!u.preRollTobaccoAdvisoryVideoShown&&(u.preRollTobaccoAdvisoryVideoShown=!0,Ii()),u.playerConfig.updateAdStatusCallback(!1),u.isSportsLive){x(!0);var n=document.querySelector(".watermarkContainer");n&&(n.style.display="block")}(t=j()?document.querySelector(".adContainer"):document.querySelector(".companionAdATF"))&&(t.style.display="none"),Bi(!0),qi(!document.getElementById("continue-div"))})),this.videoPlayer.on(Bn.PRE_ROLL_COMPLETED,(function(e){var t,i;if(u.isAdPlaying=!1,u.hasAdError){if("Safari"===w()){var n=document.querySelector("#zee-ad-container");n&&(n.style.display="none")}u.hasAdError=!1}var r=null===(t=u.playerConfig)||void 0===t?void 0:t.getFeatureFlagConfig(Et.MULTI_AUDIO);!(null!==(i=null==r?void 0:r.enabled)&&void 0!==i&&i)||"Safari"===w()||u.isAdPlaying||u.isSportsLive||vi(e,r,u),u.mandatoryVideoCountUpdated||u.getMandatoryPopupStatus()?u.checkToTriggerSubscriptionNudge()?u.triggerSubscriptionNudge():u.hasTobaccoAdvisoryVideo&&!u.preRollTobaccoAdvisoryVideoShown&&(u.preRollTobaccoAdvisoryVideoShown=!0,Ii()):(u.videoPlayer.pause&&u.videoPlayer.pause(),u.playerConfig.triggerPopUp({name:"mandatoryRegistration"})),u.preRollForDaiConfig&&u.videoPlayer&&u.videoPlayer.destroy&&(window.drmSessionError=!0,u.initializePlaybackType()),u.preRollDetectedorFailed=!0})),this.videoPlayer.on(Bn.AD_BLOCKER_DETECTED,(function(e){u.isAdPlaying=!1,u.mandatoryVideoCountUpdated||u.getMandatoryPopupStatus()?u.checkToTriggerSubscriptionNudge()?u.triggerSubscriptionNudge():u.hasTobaccoAdvisoryVideo&&!u.preRollTobaccoAdvisoryVideoShown&&(u.preRollTobaccoAdvisoryVideoShown=!0,Ii()):(u.videoPlayer.pause&&u.videoPlayer.pause(),u.playerConfig.triggerPopUp({name:"mandatoryRegistration"})),u.preRollDetectedorFailed=!0})),this.videoPlayer.on(Bn.AD_ERROR,(function(e){var t;u.hasAdError=!0,u.isAdPlaying=!1,document.querySelector(".video-js")&&document.querySelector(".video-js").classList.contains("vjs-ad-loading")&&document.querySelector(".video-js").classList.remove("vjs-ad-loading"),u.mandatoryVideoCountUpdated||9e3!==e.code||(u.getMandatoryPopupStatus()?u.checkToTriggerSubscriptionNudge()?u.triggerSubscriptionNudge():u.hasTobaccoAdvisoryVideo&&!u.preRollTobaccoAdvisoryVideoShown&&(u.preRollTobaccoAdvisoryVideoShown=!0,Ii()):(u.videoPlayer.pause&&u.videoPlayer.pause(),u.playerConfig.triggerPopUp({name:"mandatoryRegistration"})),u.preRollDetectedorFailed=!0),(t=j()?document.querySelector(".adContainer"):document.querySelector(".companionAdATF"))&&(t.style.display="none"),window.isLive&&u.preRollForDaiConfig&&u.videoPlayer&&u.videoPlayer.destroy&&(u.videoPlayer.destroy(),u.initializePlaybackType())})),this.videoPlayer.on(Bn.SKIPPED,(function(){u.isAdPlaying=!1,u.hasTobaccoAdvisoryVideo&&!u.preRollTobaccoAdvisoryVideoShown&&(u.preRollTobaccoAdvisoryVideoShown=!0,Ii())})),this.videoPlayer.on(_.qualityBtnClicked,(function(){n.analyticsManager.reportEvent(_.playerCtas,{})})),this.videoPlayer.on(_.audioBtnClicked,(function(e){n.analyticsManager.reportEvent(_.playerCtas,{element:"Audio Change"})})),this.videoPlayer.on(_.muteBtnClicked,(function(e){!function(e){var t=e&&e.muted()||!1;D("oldMutedStatus",t.toString())}(e);var t={muteValue:e.muted()};n.analyticsManager.reportEvent(_.muteChanged,t)}
2)),this.videoPlayer.on(_.subtitleBtnClicked,(function(e){n.analyticsManager.reportEvent(_.playerCtas,{element:"Subtitle Change"})}))}}},{key:"setRecoDetails",value:function(e){var t,i,n;this.similarFromReco=e,(n=void 0===(i=((void 0===(t=(Ft||{}).playerConfig)?{}:t)||{}).createSkipContentButton)?null:i)&&n({playerRef:Ft})}},{key:"checkRecoData",value:(t=a(p().mark((function e(){var t,i,n,r,s,a,o,l,d,u,c,h,f;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Ns({},this.playerConfig),r=n.fetchNextVideos,s=void 0===r?null:r,a=n.fetchPreviousVideos,o=void 0===a?null:a,l=n.similarFromReco,d=void 0===l?[]:l,u=n.userType,c=void 0===u?"":u,h=this.playerConfig.isFeatureEnabled(Et.DISABLE_UPNEXT_RECO_API),!(d&&d.length>0)){e.next=7;break}this.isRecoPending=!1,this.setRecoDetails(d),e.next=20;break;case 7:if(!((s||o)&&this.isRecoPending&&this.playableData&&!h&&Object.keys(this.playableData).length&&this.singlePlayDetails&&Object.keys(this.singlePlayDetails).length)){e.next=20;break}if(this.isRecoPending=!1,!(this.playableData&&this.playableData.asset_subtype&&(this.playableData.asset_subtype.indexOf("episode")>=0||"sports_vod"===this.playableData.asset_subtype))){e.next=15;break}return e.next=12,o({playerRef:this});case 12:e.t0=e.sent,e.next=18;break;case 15:return e.next=17,s({contentId:this.playableData.id});case 17:e.t0=e.sent;case 18:(f=e.t0)&&f.items?this.setRecoDetails(f.items):f&&f.error_code&&(this.isRecoPending=!0);case 20:"free_downloadable"===(null===(t=this.playableData)||void 0===t?void 0:t.business_type)&&"premium_downloadable"===(null===(i=this.singlePlayDetails)||void 0===i||null===(i=i.showDetail
2s)||void 0===i?void 0:i.business_type)&&"guest"===c&&this.setRecoDetails([]);case 21:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"isDisplayLanguageChanged",value:function(e){var t,i=document.getElementById(e);if(!i)return!1;var n=i.getAttribute("src");return(n&&(null===(t=n.split("locale_"))||void 0===t||null===(t=t[1])||void 0===t||null===(t=t.split("."))||void 0===t?void 0:t[0])||"")!==this.displayLanguage}},{key:"invokePlayer",value:function(){var e=this;this.dispose(),this.metaDataLoaded=!1,this.isNewsCatchup=!1,this.mandatoryVideoCountUpdated=!1,this.preRollDetectedorFailed=!1,this.isLongWatchEventSent=!1,this.longWatchRemainingTime=y;var t,i,n="videojs-locale";if(window.translationsAndConfigs&&!this.isDisplayLanguageChanged(n))this.checkMediaStartPlayback();else{var r=document.getElementById(n),s=this.displayLanguage;r?(document.head.removeChild(r),(r=document.createElement("script")).id=n,document.head.appendChild(r)):((r=document.createElement("script")).id=n,document.head.appendChild(r)),r.addEventListener("load",function(){this.translationsAndConfigs="undefined"!=typeof window&&window?window.translationsAndConfigs:{},this.checkMediaStartPlayback()}.bind(this)),r.setAttribute("src","".concat(e.playerConfig.playerScriptUrl?null===(t=e.playerConfig)||void 0===t?void 0:t.playerScriptUrl.substring(0,null===(i=e.playerConfig)||void 0===i?void 0:i.playerScriptUrl.lastIndexOf("/")):"https://playerscript.zee5.com/zee5Videojs/".concat("4.0.3"),"/locale/locale_").concat(s||"en",".js"))}}},{key:"checkMediaStartPlayback",value:function(){var e,t,i,n;this.playableData=this.getPlayableData(),n=this.singlePlayDetails.assetDetails.id,xt&&xt===n||D("languageChangeTriggered","false"),xt=n,this.isSportsLive="function"==typeof(null===(e=this.playerConfig)||void 0===e?void 0:e.isSportsLiveEvent)&&this.playerConfig.isSportsLiveEvent({assetType:null===(t=this.playableData)||void 0===t?void 0:t.asset_type,assetSubType:null===(i=this.playableData)||void 0===i?void 0:i.asset_subtype}),window.isSportsLive=!!this.isSportsLive,this.playerConfig.contentId&&this.playableData&&(this.videoPlayer&&this.videoPlayer.destroy&&this.videoPlayer.destroy(),this.initPlaybackFlow(),this.contentDescriptorHidden=!0),this.watchHistoryHandler(),this.abrHandler()}},{key:"setPlayerConfig",value:function(e){this.playableData=null,this.playerConfig=Ns(Ns({},this.playerConfig),e),this.setDataFromPlayerConfig(),this.isRecoPending=!0,this.preRollForDaiConfig=!1}},{key:"updateWrapperConfig",value:function(e){this.playerConfig=Ns(Ns({},this.playerConfig),e),(this.playableData&&Object.keys(this.playableData).length&&this.isRecoPending&&(9!==this.playableData.asset_type||"premium"===this.playerConfig.userType)||this.playerConfig&&this.playerConfig.similarFromReco&&this.playerConfig.similarFromReco.length>0)&&this.checkRecoData()}},{key:"dispose",value:function(){"function"==typeof this.playerConfig.removeScorecardWidget&&this.playerConfig.removeScorecardWidget(),this.isAdPlaying&&(this.analyticsManager.reportEvent(_.userClosedAd,{}),this.analyticsManager.reportEvent(_.exitBeforeAdStart,{})),"object"===e(this.videoPlayer)&&null!==this.videoPlayer&&(this.videoPlayer.pause(),this.playerDisposedFlag=!0,document.removeEventListener("visibilitychange",this.handleVisibilityChange),this.deregisterEvents(),this.videoPlayer.destroy(),this.isPlayerEventRegistered=!1),"function"==typeof this.playerConfig.clearSubscriptionNudgePopupTimer&&this.playerConfig.clearSubscriptionNudgePopupTimer(),this.concurrentUsersTimer&&clearTimeout(this.concurrentUsersTimer),this.freeMinutesTimer&&this.clearFreeSecondsTimer()}},{key:"deregisterEvents",value:function(){this.videoPlayer.removeAllListeners(tt.TIME_UPDATE),this.videoPlayer.removeAllListeners(tt.META_DATA_LOADED),this.videoPlayer.removeAllListeners(tt.SEEKED),this.videoPlayer.removeAllListeners(tt.VOLUME_CHANGE),this.videoPlayer.removeAllListeners(tt.READY),this.videoPlayer.removeAllListeners(tt.PLAY),this.videoPlayer.removeAllListeners(tt.PAUSE),this.videoPlayer.removeAllListeners(tt.MUTE),this.videoPlayer.removeAllListeners(tt.ENDED),this.videoPlayer.removeAllListeners(tt.FULL_SCREEN_CHANGE),this.videoPlayer.removeAllListeners(tt.SKIPINTRO),this.videoPlayer.removeAllListeners("audioChanged"),this.videoPlayer.removeAllListeners(tt.ENTITLED_LANG_ERROR),this.videoPlayer.removeAllListeners(tt.QUALITY_CHANGE),this.videoPlayer.removeAllListeners(tt.SUBTITLECHANGE),this.videoPlayer.removeAllListeners(tt.PROGRESS),this.videoPlayer.removeAllListeners(tt.ERROR),this.videoPlayer.removeAllListeners(Bn.AD_STARTED),this.videoPlayer.removeAllListeners(Bn.AD_COMPLETE),this.videoPlayer.removeAllListeners(Bn.AD_ERROR),this.videoPlayer.removeAllListeners(Bn.PRE_ROLL_COMPLETED),this.videoPlayer.removeAllListeners(Bn.AD_BLOCKER_DETECTED),this.videoPlayer.removeAllListeners(_.qualityBtnClicked),this.videoPlayer.removeAllListeners(_.audioBtnClicked),this.videoPlayer.removeAllListeners(_.muteBtnClicked),this.videoPlayer.removeAllListeners(_.subtitleBtnClicked)}},{key:"getMandatoryPopupStatus",value:function(){var e=this.playerConfig||{},t=e.updateMandatoryRegistrationViewCount,i=void 0===t?null:t,n=e.userType,r=void 0===n?"guest":n,s=(this.singlePlayDetails||{}).assetDetails,a=void 0===s?{}:s,o=(a||{}).content_qualify_for_mandatory_reg,l=void 0!==o&&o,d="guest"===r;this.mandatoryVideoCountUpdated=!0,i({contentData:a});var u=this.playerConfig.getFeatureFlagConfig(Et.CONFIG_REGISTRATION_POPUP),c=u.enabled,h=u.payload,p=c?h:{},f=O("mandatoryRegistrationVideoCount"),g=f&&(null==p?void 0:p.popup_frequency)&&f%(null==p?void 0:p.popup_frequency)==0,m=O("skippableRegistrationPopupCount")||0,v="undefined"!=typeof window&&window&&window.location&&(window.location.pathname.includes("b2b-consumption")||window.location.pathname.includes("b2b-live-tv"));return!(!0===l&&g&&d&&!v&&null!=p&&p.max_popup_count&&m<(null==p?void 0:p.max_popup_count)&&(D("skippableRegistrationPopupCount",(m+1).toString()),1))}},{key:"watchHistoryHandler",value:function(){var e=this.playerConfig||{},t=e.contentType,i=void 0===t?"":t,n=(e.userType,(this.singlePlayDetails||{}).watchHistoryDetails);i&&"livetv"!==i&&this.playableData&&(n&&n.played_duration?this.setContentCurrentTime(n.played_duration):this.setContentCurrentTime(0))}},{key:"setContentCurrentTime",value:function(e){this.playableData&&Object.keys(this.playableData).length&&(this.playableData.watchTime=e)}},{key:"getContentCurrentTime",value:function(){var e=this.playerConfig||{},t=e.clipOffset,i=void 0===t?0:t,n=e.primaryMediaId,r=void 0===n?"":n,s=i?parseInt(i,10):i,a=0;return this.playableData&&Object.keys(this.playableData).length&&this.playableData.watchTime&&(a=Math.round(this.playableData.watchTime)),""===r&&s&&(a=s),a}},{key:"handleVisibilityChange",value:function(){if(document.hidden){var e;console.log("visibility hidden"),this.isVisible=!1,window&&window.Conviva&&window.Conviva.Analytics&&(window.Conviva.Analytics.reportAppBackgroun
2ded(),null===(e=window.convivaAnalytic)||void 0===e||e.reportEvent(window.Conviva.Constants.Events.USER_WAIT_STARTED))}else{var t,i=this.playerConfig,n=i.userData,r=i.isRequestedByBot;console.log("visibility"),this.isVisible=!0,window&&window.Conviva&&window.Conviva.Analytics&&(window.Conviva.Analytics.reportAppForegrounded(),null===(t=window.convivaAnalytic)||void 0===t||t.reportEvent(window.Conviva.Constants.Events.USER_WAIT_ENDED)),this.setPlayerHaltedFlag&&(this.setPlayerHaltedFlag=!1,this.videoPlayer&&this.isPlayingClearContent?(console.log("visibility ss"),this.videoPlayer.setup(this.defaultPlayerConfig,this.mediaObject,this.singlePlayDetails,n,this.mixpanelData,r)):setTimeout((function(){console.log("reloading for DRM content"),window.location.reload()}),1e3))}}},{key:"sendConvivaReportEvent",value:function(e){window&&window.convivaAnalytic&&window.convivaAnalytic.reportEvent&&window.convivaAnalytic.reportEvent("customEvent",e)}},{key:"checkToTriggerSubscriptionNudge",value:function(){var e=0;if(this.singlePlayDetails&&this.singlePlayDetails.watchHistoryDetails){var t=(this.singlePlayDetails||{}).watchHistoryDetails,i=void 0===t?{}:t;e=i.played_duration?i.played_duration:0}return!(!this.playerConfig.shouldSubscriptionNudgeDisplayed({nudgeType:"overlay",playerRef:this})||e)}},{key:"triggerSubscriptionNudge",value:function(){var e=this,t=(this.playerConfig.getAvodNudgeConfig(this.playerConfig.remoteConfig)||[]).duration,i=void 0===t?10:t;this.videoPlayer.pause&&this.videoPlayer.pause(),function(e,t){if(_i())t.triggerPopUp({name:"subscriptionNudge"});else var i=setInterval((function(){_i()&&(clearInterval(i),t.triggerPopUp({name:"subscriptionNudge"}))}),500)}(this.videoPlayer,this.playerConfig);var n=document.getElementById("continue-div");n&&(setTimeout((function(){qi(!1),n.style="transition:width ".concat(i,"s linear;width:100%;")}),100),setTimeout((function(){var t,i;e.videoPlayer,(i=void 0===(t=(e.playerConfig||{}).removeSubscriptionNudge)?null:t)&&i()}),1e3*i))}},{key:"clearPlayerReloadTimer",value:function(){clearTimeout(window.playerReloadTimer),window.playerSeconds=0}},{key:"reloadPlayer",value:function(){this.clearPlayerReloadTimer(),this.dispose(),this.initPlaybackFlow()}},{key:"clearFreeSecondsTimer",value:function(){clearInterval(this.freeMinutesTimer),this.freeMinutesTimer=null}},{key:"checkFreeMinutesPopup",value:function(){this.freeAvailableSeconds<=0&&(this.playerConfig.freeMinutesEndedPopup({playerRef:this,isFullScreenFlag:!1,playerConfig:this.playerConfig,videoPlayer:this.videoPlayer}),this.freeMinutesTimer&&this.clearFreeSecondsTimer())}},{key:"createSpapiRequestTimeStampPayload",value:function(e){var t={time:e.spapiRequestimeStamp};return{type:"SPAPI Request",payload:JSON.stringify(t)}}},{key:"createSpapiResponsetTimeStampPayload",value:function(e){var t={time:e.spapiResponseTimeStamp};return{type:"SPAPI Response",payload:JSON.stringify(t)}}},{key:"updateUpnextApiState",value:function(e,t){Hi({upNextApiState:e,isUpNextPending:t})}},{key:"applySOSCapping",value:function(e){if(e){var t=e.asset_type,i=e.asset_subtype,n=e.capping;!function(e,t,i,n){if(e&&e.qualityLevels){var r,s=e.qualityLevels(),a=e.qualityLevels().levels_[e.qualityLevels().selectedIndex_].height;if(function(e,t){var i=(Ft||{}).playableData,n=void 0===i?{}:i;return n.asset_type===e&&n.asset_subtype===t}(t,i)&&s&&s.length>0)if(function(e){return!!(e&&"number"==typeof e&&e>0)}(n)){if(n!==a){for(var o,l=0;l<s.length;l++)s[l].height<=n?(s[l].enabled=!0,s.selectedIndex_=l):s[l].enabled=!1;s.trigger({type:"change",selectedIndex:s.selectedIndex_}),null!==(o=document)&&void 0!==o&&null!==(o=o.getElementById("video-tag"))&&void 0!==o&&o.querySelectorAll(".vjs-control-bar > .vjs-http-source-selector")[0]&&(document.getElementById("video-tag").querySelectorAll(".vjs-control-bar > .vjs-http-source-selector")[0].style.display="none")}}else n!==a&&(s.selectedIndex_=-1,s.trigger({type:"change",selectedIndex:s.selectedIndex_}),null!==(r=document)&&void 0!==r&&null!==(r=r.getElementById("video-tag"))&&void 0!==r&&r.querySelectorAll(".vjs-control-bar > .vjs-http-source-selector")[0]&&(document.getElementById("video-tag").querySelectorAll(".vjs-control-bar > .vjs-http-source-selector")[0].style.display="block"))}}(window.videoPlayer,t,i,n)}}}]);var t}()})(),n})()));
3//# sourceMappingURL=webPlayer.bundle.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.