PageSourceSearch

https://myradioenvivo.ar/public/jsv260924184253/hls-site.mini.js

js myradioenvivo.ar collected 2026-09-28 06:59:35 UTC 627,309 bytes, 1,335 lines download raw bytes

1var JS_CONF = {"oneSAppID":"f12567e9-1e29-45c8-a7c2-ee984c77e69f","oneSSafariID":"web.onesignal.auto.1a1cd43f-104c-4ac2-b069-e07775f1eeb9","defaultLang":"es","locale":"es_AR","backupS":["https:\/\/rdstrm.com","https:\/\/stream1.rdstrm.com","https:\/\/stream2.rdstrm.com"],"defDomainFileName":"myradioenvivo_ar","socketio":"https:\/\/myradioenvivo.ar:8443","adsAllow":{"cookie_id":"ND8gbr__9RWE6","allowAdsense":true},"iosID":"1670013266","ssUrl":{"ar":null,"co":"https:\/\/myradioenvivo.co","es":"https:\/\/myradioonline.es","pe":"https:\/\/myradioenvivo.pe","cl":"https:\/\/myradioonline.cl","mx":"https:\/\/myradioenvivo.mx","pt":"https:\/\/myradioonline.pt","fr":"https:\/\/myradioenligne.fr","gb":"https:\/\/ukradiolive.com","tr":"https:\/\/myradyodinle.com","nl":"https:\/\/myonlineradio.nl","it":"https:\/\/myradioonline.it","de":"https:\/\/myonlineradio.de","ie":"https:\/\/irishradiolive.com","pl":"https:\/\/myradioonline.pl","ro":"https:\/\/myradioonline.ro","hu":"https:\/\/myonlineradio.hu","at":"https:\/\/myonlineradio.at","cz":"https:\/\/myonlineradio.cz","sk":"https:\/\/myonlineradio.sk","rs":"https:\/\/myradiostanice.rs"},"page_id":"100140112906714","sgdpr":true,"gdprV":2,"actPrivacy":"20240709","firebaseConfig":{"apiKey":"AIzaSyBQX_GSTAfzgnDHOd-mUu2tbX-01Y216VI","authDomain":"myradioenvivo-ar.firebaseapp.com","databaseURL":"https:\/\/myradioenvivo-ar.firebaseio.com","projectId":"myradioenvivo-ar","storageBucket":"myradioenvivo-ar.appspot.com","messagingSenderId":"860217749042","appId":"1:860217749042:web:55313b3171b99bb185d62b","measurementId":"G-6QHCC9DN4Q","vapidKey":"BE1Xr_lNAsKvoiyDSxGyw5QcpesOWT7ApOpkZnBpv1FdlIilfR8kswKic_9g57RRJHRjKYb48LttTnADP53Ncyw"},"subSurPrices":{"9.9":"9.9 USD","4.9":"4.9 USD","2.9":"2.9 USD","0.9":"0.9 USD"},"subModeLvL":0,"adsns":{"sites_google_ad_slot":{"auto":"7544103394","200_200":"2291776710","250_250":"4514028640","300_250":"9574783634"},"sites_google_ad_channel":{"radiopage_after_radiolist":"7686986891","rigth_col_brn":"5273163279","200_200_mobil":"7707754926","mobil_250_250":"9759203194","mobil_300_250":"4538079376","desktop_300_250":"7214281972","desktop_300_250_double_1":"2585869305","desktop_300_250_double_2":"3469945255","desktop_300_250_single":"8959705964","center_horizontal":"9407262674","radio_top_banner_adaptive":"1612533139","radio_top_banner_adaptive_2":"2734043112","radiopage_after_player":"7794798103"},"sites_admanager_slot":{"radio_top_banner_adaptive":{"id":"myradioenvivo_ar\/radio_top_banner_adaptive","sizes":"[[970, 280], [970, 250], [930, 180], [750, 300], [750, 200], [540, 250]]"},"radio_after_player_banner_adaptive":{"id":"myradioenvivo_ar\/radio_top_banner_adaptive","sizes":"[[750, 300], [750, 200], [540, 250]]"},"mobil_250_250":{"id":"myradioenvivo_ar\/mobil_250_250","sizes":"[[300, 250],[250, 250],[200, 200]]"},"mobil_300_250":{"id":"myradioenvivo_ar\/mobil_300_250","sizes":"[[300, 250],[250, 250],[200, 200]]"},"desktop_300_250":{"id":"myradioenvivo_ar\/desktop_300_250","sizes":"[[336, 280],[300, 250], [250, 360],[250, 250]]"},"desktop_300_250_single":{"id":"myradioenvivo_ar\/desktop_300_250_single","sizes":"[[336, 280],[300, 250]]"},"desktop_300_250_double":{"id":"myradioenvivo_ar\/desktop_300_250_double","sizes":"[[300, 250]]"}},"leadSticky":{"d":{"id":"CF_Q1UCMAQP","zone":"myo_ar_sticky_desktop"},"m":{"id":"CF_SJKRSLYJ","zone":"myo_ar_sticky_mobile"}}}};
2function ConsoleDebugger(){var self=this;this.allError=new Array();this.stack=new Array();this.UA=navigator.userAgent;this.addBlock=false;var extensions=[];this.msgConditions=['adsbygoogle.push','Szintaktikai hiba','Permission denied','Syntax error','Syntaxfehler','Blocked a frame with origin','IndexSizeError','Page-level tag','NS_ERROR_','HTMLOUT is not','undefined is not a function','non-configurable','vc_request_action','ntp is not defined','webkitExitFullScreen','dataset','ResizeObserver loop','Unexpected token','cookie\\.js','server_fp is not',"Cannot read property \\'postMessage",'Uncaught SecurityError','adguard','websredir','globalThis','n\\.data\\.split','URL: undefined','Unexpected end of input','find variable: gmo','find variable\\: gmo','pagead2.*\/rum','Access is denied','InvalidAccessError','loader_js_executable','Cannot redefine property: IMA','readonly property','\\[\\"@context\\"\\].toLowerCase','chrome-extension','facebook\\.net','\\[object Event\\]','moz-extension','crypto\\.','__firefox__','IntersectionObserver','\\.ethereum\\.','Script error(\\.|,)+'];this.msgRegExp=this.msgConditions.join('|');this.init=function(){this.bindErrorCatcher();this.registerPostMessageReceiver();}
3this.bindErrorCatcher=function(){var prevOnError=window.onerror;window.onerror=function(message,source,lineno,colno,error){try{if(message&&message.toString){message=message.toString();}else{message=String(message);}
4source=source||(error&&(error.fileName||error.sourceURL))||"n/a";lineno=lineno||(error&&(error.lineNumber||error.line))||"n/a";colno=colno||(error&&(error.columnNumber||error.column))||"n/a";if(source.indexOf('cloudflareinsights.com')>-1){return false;}
5if(message.indexOf("memory")>-1){try{var db=new DialogBox();db.openPopUp("",message);}catch(e){}}
6var stack=(error&&error.stack)?error.stack:"";var pageUrl=(window.location&&window.location.href)?window.location.href:"n/a";var msg="\r\nMessage: "+message+",\r\nPage: "+pageUrl+",\r\nScriptURL: "+source+",\r\nLine: "+lineno+",\r\nCol: "+colno+",\r\nStack: "+stack;if(self&&typeof self.pushMsg==="function"){self.pushMsg(msg);}}catch(e){}
7if(typeof prevOnError==="function"){try{return prevOnError.apply(this,arguments);}catch(e){}}
8return false;};}
9this.pushMsg=function(msg){if(!msg||self.allError.indexOf(msg)!=-1||document.location.href.indexOf('proxy')>-1||typeof(document.location.href)=="undefined"||self.UA.indexOf("bot")>-1||msg.match(this.msgRegExp)!=null){if(typeof(window.console)!=='undefined'){console.log("Skipp error: "+msg+' > Match: '+(msg.match(this.msgRegExp)!=null));}
10return;}
11if(msg.indexOf('BetterJsPop')>-1){this.addBlock=true;return;}
12self.stack.push(msg);self.allError.push(msg);}
13this.sendData=function(){if(!window.jQuery||!this.stack.length){setTimeout(function(){self.sendData();},2000);return;}
14var data={};for(i in this.stack){data[i]=this.stack.shift();}
15$.ajax({"url":BASE_URL+"/console-debugger","method":"post","data":{"errors":data,"userAgent":self.UA,"LOADMSCRIPT":LOADMSCRIPT,"windowSize":window.innerWidth+"x"+window.innerHeight,"addBlock":(typeof(AddAdsV2I)!="undefined"?AddAdsV2I.hasAdblock():"-"),"url":"Href: "+document.location.href+", Ref: "+document.referrer,"errorFindStack":LoadScriptIfNeedI.errorFindStack,"myMiniJs":$("#myMiniJs").attr("src")}}).done(function(){setTimeout(function(){self.sendData();},2000);});}
16this.startAudioSupport=function(){if(document.getElementById("Grid")&&!this.html5AudioSupport()){var lang=document.getElementsByTagName("html")[0].getAttribute("lang");var msg="Listening to radio on this browser is not supported!<br><a href='https://www.google.com/chrome/' target='_blank'>Click here for a recommended Chrome browser!</a>";if(lang=="hu"){msg="Rádió hallgatása ezen a böngészőn nem támogatott!<br><a href='https://www.google.com/chrome/' target='_blank'>Ajánlott Chrome böngészőrét kattints ide!</a>"}else if(lang=="ro"){msg="Ascultarea radioului pe acest browser nu este acceptată!<br><a href='https://www.google.com/chrome/' target='_blank'>Faceți clic aici pentru un browser Chrome recomandat!</a>";}
17var newItem=document.createElement("DIV");newItem.className="errorMessage center";newItem.style.display="block";newItem.innerHTML='<div class="clear_title10_2"></div>'+msg;var Grid=document.getElementById("Grid");Grid.insertBefore(newItem,Grid.childNodes[0]);}}
18this.html5AudioSupport=function(){var audioElement=document.createElement('audio');return!!(audioElement.canPlayType&&audioElement.canPlayType('audio/mpeg;').replace(/no/,''));}
19this.registerPostMessageReceiver=function(){window.addEventListener("message",receiveMessage,fal
19se);function receiveMessage(event){if(extensions.indexOf(event.data)<0&&String(event.data).indexOf("googMsgType")<0){extensions.push(event.data);}}}
20this.init();}
21if(typeof(ConsoleDebuggerI)==="undefined"){var ConsoleDebuggerI=new ConsoleDebugger();window.onload=function(){ConsoleDebuggerI.sendData();ConsoleDebuggerI.startAudioSupport();};}
vendor: 22,881 bytes, lines 21-22
21/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
22!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}
vendor: 1,967 bytes, line 22
22return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||
vendor: 9,546 bytes, line 22
22ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||
vendor: 8,814 bytes, line 22
22(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);
vendor: 14,182 bytes, line 22
22n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;
vendor: 4,590 bytes, line 22
22return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1)
vendor: 13,972 bytes, line 22
22);!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);
vendor: 9,033 bytes, line 22
22if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return 
22M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});
23
24function CookieManager(){this.set=function(c_name,value,exdays,path){var reqExp=new RegExp(c_name+"=([^;]*);","g");var matches=document.cookie.match(reqExp);if(matches&&matches.length>1){if((c_name+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path='+document.location.pathname).length<8000){document.cookie=c_name+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path='+document.location.pathname;}}
25var exdate=new Date();exdate.setDate(exdate.getDate()+parseInt(exdays));var c_value=escape(value)+(((exdays==null)?"":"; expires="+exdate.toUTCString())+((path)?"; path="+path:""));if((c_name+"="+c_value).length<8000){document.cookie=c_name+"="+c_value;}}
26this.get=function(c_name){var c_value=document.cookie;var c_start=c_value.indexOf(" "+c_name+"=");if(c_start==-1){c_start=c_value.indexOf(c_name+"=");}
27if(c_start==-1){c_value=null;}else{c_start=c_value.indexOf("=",c_start)+1;var c_end=c_value.indexOf(";",c_start);if(c_end==-1)
28{c_end=c_value.length;}
29c_value=unescape(c_value.substring(c_start,c_end));}
30return c_value;}
31this.getPageVisitNum=function(){return Math.max(this.get(cookieIndex),this.getLocalStorage(cookieIndex),0
31);}
32this.incrPageVisitNum=function(forceIncr){var today=new Date();var actDate=today.getFullYear()+"-"+(today.getMonth()+1)+"-"+today.getDate();var c=this.getPageVisitNum();if(this.get(cookieIndex+'_act')!=actDate||forceIncr){this.set(cookieIndex+'_act',actDate,365,'/');this.set(cookieIndex,parseInt(c)+1,365,'/');this.setLocalStorage(cookieIndex,parseInt(c)+1);if(parseInt(c)+1>20&&document.location.href.indexOf("gclid=")>-1){GaTrackI.ga("my_return_visitor");}}}
33this.getSessionStorage=function(name){try{return sessionStorage.getItem(name);}catch(e){return false;}}
34this.setSessionStorage=function(name,value){try{sessionStorage.setItem(name,value);}catch(e){}}
35this.getLocalStorage=function(name){try{return localStorage.getItem(name);}catch(e){return false;}}
36this.setLocalStorage=function(name,value){try{localStorage.setItem(name,value);}catch(e){}}
37this.setDelayedData=function(){if(typeof(UserViewRadiosI)!="undefined"){UserViewRadiosI.trackStap();}
38this.incrPageVisitNum();}}
39var CookieManagerI=new CookieManager();if(document.getElementsByTagName("body").length){var cookieIndex=document.getElementsByTagName("body")[0].getAttribute("data-cookiec")||"";}
40var NoSocial=CookieManagerI.getPageVisitNum()<2?true:false;function isMobile(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)){return true;}else{return false;}}
41var BASE_URL=document.location.protocol+'//'+document.location.host;function LoadScriptIfNeed(){var self=this;this.jsStack=new Array();this.cssStack=new Array();this.injected=new Array();this.scriptLoaded=new Array();this.loadIfVisibleElements=new Array();this.actJSVersion=1;this.loadIfVisibleTimer=null;this.loadedPExtras=false;this.appendJSRun=false;this.callback=[];this.errorFindStack={'done':new Array(),'fail':new Array()};var baseUrl=$('.js-radioplayerData').data('host')||$('.song-list-cont').data('host')||BASE_URL||$('base').attr('href');this.init=function(){if(document.getElementById("myMiniJs")){this.actJSVersion=document.getElementById("myMiniJs").getAttribute("src").match(/jsv(\d*)/)[1];}
42this.loadBottomCss();this.loadPrettyPhoto();this.loadCSVGenerator();this.loadHiddenCaptcha();this.loadSchedule();this.loadPartnerFormScript();this.loadEmbedScript();this.loadGMapsScript();this.loadWebcamPScript();this.loadStreamDebugScript();this.loadTooltip();this.loadStayHereMoti();this.loadRadioStat();this.loadLikeUp();this.loadLiveUserCounter();this.loadFirebaseAuth();this.loadLazyPageLoad();this.callback.push(this.loadMyPodcastPlayer());this.callback.push(this.loadClippy());this.appendCSS();this.appendJS();this.loadIfVisible();if($('.webcamCont[data-live="1"]').length){this.loadLiveVideoNotification(function(){});}
43if($('.schedule-form, .songlist-filter').length&&document.referrer.match(/(yahoo\.|google\.|bing\.|duckduckgo\.)/)!=null){this.loadStayHereMoti(true);GaTrackI.ga('catched-suser',document.referrer);}
44if(typeof(UtilsI)!="undefined"){UtilsI.initFocusListener(function(){if(!$('#smartbanner').length){self.appendJS(self.loadSmartBanner());self.appendCSS();}});}}
45this.loadBottomCss=function(){if($("link[href*='site-bottom.mini.css'][rel='preload']").length){$("link[href*='site-bottom.mini.css'][rel='preload']").attr("rel","stylesheet");}else if($("link[href*='site-bottom-'][rel='preload']").length){$("link[href*='site-bottom-'][rel='preload']").attr("rel","stylesheet");}}
46this.loadLazyPageLoad=function(){if($('.js-isAdmin').length){}}
47this.loadEQForm=function(audio){if(!$('#myeq-panel:visible').length){$('.fa-equalizer').css('color','#2f94e8');$('.server-conts').hide();if(typeof(MyEqBuilderI)!=="undefined"){$('#myeq-panel').show();}else{$('.fa-equalizer').css('color','#2f94e8');if(typeof(MyEqualizerI)=="undefined"){self.jsStack.push('jquery.my-equalizer.js');}
48self.cssStack.push('equalizer.css');self.jsStack.push('jquery.my-eq-builder.js');console.log('MyEqualizerI',typeof(MyEqualizerI));self.appendCSS();
48self.appendJS(function(){MyEqualizerI.init(audio);MyEqBuilderI.init(MyEqualizerI);$('#myeq-panel').show();});}}else{$('.fa-equalizer').css('color','white');$('#myeq-panel').hide();$('.server-conts').show();}}
49this.loadEQScript=function(audio){self.jsStack.push('jquery.my-equalizer.js');self.appendJS(function(){MyEqualizerI.init(audio);});}
50this.loadClippy=function(force){if(window.innerWidth<768){return function(){};}
51if(force||(!CookieManagerI.get('clippyoff')&&!NoSocial&&CookieManagerI.get(cookieIndex)%9==0&&$('.mRadioPlayer').length)){this.cssStack.push('clippy.css');this.jsStack.push('clippy.js');this.jsStack.push('jquery.my-clippy.js');if(force){this.appendCSS();this.appendJS(function(){if(typeof(MyClippy)!="undefined"){MyClippyI=new MyClippy();MyClippyI.runErrorProgram();}});}else{return function(){if(typeof(MyClippy)!="undefined"){MyClippyI=new MyClippy();MyClippyI.init();}}}}else{return function(){};}}
52this.loadEmbedScript=function(){if($('.embed-part').length){this.cssStack.push('embed-radio-page.css');this.jsStack.push('jquery.embed-page.js');}}
53this.loadOneSignal=function(callback){this.jsStack.push('https://cdn.onesignal.com/sdks/OneSignalSDK.js');this.appendJS(callback);}
54this.loadFirebaseMsg=function(callback){this.jsStack.push('jquery.subscribe-msg-firebase.js');this.appendJS(callback);}
55this.loadFirebaseAuth=function(){if(CookieManagerI.get('mor-token')){this.loadFirebaseSources(function(){setTimeout(function(){UserLoginI.loadModules();if(document.location.hash=="#open-subcription-layer"){SubscriptionI.openPackagesLayer();}},1500);});}else if($('.js-userLoginBtn').length){$('body').on('click','.js-userLoginBtn',function(e){e.preventDefault();if(document.location.href.indexOf('https://')===-1){document.location.href=$("base").attr('href')+"#open-login-layer";return;}
56self.loadFirebaseSources(function(){UserLoginI.openLoginLayer();});});if(document.location.hash=="#open-login-layer"){$('.js-userLoginBtn').click();}
57if(document.location.hash=="#open-subcription-layer"){self.loadFirebaseSources(function(){UserLoginI.openLoginLayer(true);});}}}
58this.loadFirebaseSources=function(callback){self.cssStack.push('user-login.css');self.jsStack.push('jquery.user-login.js');if(callback){self.appendJS(callback);self.appendCSS();}}
59this.loadSocketIO=function(callback){var sFile="socket.io.slim.js";if(MyConfigI.get('socketV')>2){sFile="socket.io."+MyConfigI.get('socketV')+".slim.js";}
60this.jsStack.push(sFile);this.appendJS(callback);}
61this.loadLiveUserCounter=function(){return;var url=($('.mRadioPlayer').length?$('.mRadioPlayer').data('url'):'');if(!CookieManagerI.get('luc')||(CookieManagerI.get('luc').indexOf(url)!==0&&CookieManagerI.get('luc')!="-")){return;}
62this.jsStack.push("jquery.live-user-counter.js");}
63this.loadFileSaver=function(callback){this.jsStack.push("file-saver.js");this.appendJS(function(){});}
64this.loadLiveVideoNotification=function(callback){this.jsStack.push('jquery.notification.js');this.appendJS(callback);}
65this.loadPrettyPhoto=function(){if($("a[data-rel='prettyPhoto']").length){this.cssStack.push('prettyPhoto.css');this.jsStack.push('jquery.prettyPhoto.mini.js');}}
66this.loadCSVGenerator=function(){if($(".export-to-csv").length){this.jsStack.push('jquery.csv-generator.js');}}
67this.loadPartnerFormScript=function(){if(!$('.js-formHelper').length){return;}
68this.jsStack.push('jquery.form-helper.js');}
69this.loadHiddenCaptcha=function(){if($('.g-recaptcha').length){this.jsStack.push('jquery.hidden-captcha.js');}}
70this.loadSchedule=function(){if($(".schedule-cont").length){this.jsStack.push('jquery.schedule.js');}}
71this.loadAlbumCoverSliderALyrics=function(callback){if(this.loadedPExtras||typeof(LoadActRadioDataCoreI)=="undefined"){return;}
72this.loadedPExtras=true;
72LoadActRadioDataCoreI.allowSetCover();if($(".js-isAdmin").length){this.jsStack.push('jquery.album-cover-slider.js');this.jsStack.push('jquery.love-hate.js');}else{this.jsStack.push('audioplayerextr-v2.min.js');}
73this.appendJS(function(){var mdelay=1;if(typeof(AudioplayerExtrasI)=="undefined"||typeof(AlbumCoverSliderI)=="undefined"){mdelay=1000;}
74setTimeout(function(){if(typeof(AudioplayerExtrasI)=="undefined"||typeof(AlbumCoverSliderI)=="undefined"){setTimeout(function(){AlbumCoverSliderI.init();callback();},5000);}else{AlbumCoverSliderI.init();callback();}},mdelay);});}
75this.loadStreamDebugScript=function(){if($(".debug-fullw").length){this.jsStack.push('jquery.stream-debug.js');}}
76this.loadGMapsScript=function(){if($(".gmaps").length){$('.gmaps, .freq-cell').click(function(elem){if(typeof(GMapsI)=="undefined"){$('.gmaps img').fadeOut();if($(event.currentTarget).hasClass('freq-cell')){$(event.currentTarget).addClass('fire-aload');GaTrackI.ga('gmapsload1');}else{GaTrackI.ga('gmapsload2');}
77self.jsStack.push('jquery.gmaps.js');self.jsStack.push('https://maps.googleapis.com/maps/api/js?v=3.53&key=AIzaSyBICasXsgGL2aQjgstuaMF_2sx-jtaeWGU');self.appendJS(function(){initMap();});}});}}
78this.loadWebcamPScript=function(){if($(".webcamp").length){this.jsStack.push('jquery.webcam-page.js');}}
79this.loadWebcamActSong=function(){this.jsStack.push('jquery.act-song.js');}
80this.loadRadioStat=function(){if($(".js-diagram").length){self.jsStack.push('jquery.radiostat.js');}}
81this.loadStayHereMoti=function(now){setTimeout(function(){self.jsStack.push('jquery.stay-here-moti.js');self.appendJS(function(){});},now==true?0:120000);}
82this.loadTooltip=function(){if(!isMobile()){this.jsStack.push('jquery.tooltip.js');}}
83this.loadCCastScript=function(callback){this.jsStack.push('//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1');self.appendJS(callback);}
84this.loadMyPodcastPlayer=function(noInit){if($('.js-myPodcastPlayer').length){self.cssStack.push("podcast-player.css");self.jsStack.push('podcast-player.js');if(noInit==true){self.appendCSS();self.appendJS(self.myPodcastPlayerCallback);}else{return self.myPodcastPlayerCallback;}}else{return function(){};}}
85this.myPodcastPlayerCallback=function(){var time=typeof($.fn.audioPlayer)=="undefined"?100:0;setTimeout(function(){$('.js-myPodcastPlayer audio').audioPlayer();},time);}
86this.loadLikeUp=function(callback){if(callback){self.jsStack.push('jquery.like-up.js');self.appendJS(callback);}else{var c=CookieManagerI.getPageVisitNum();if(c==10||(c>1&&c%30==0)){self.jsStack.push('jquery.like-up.js');}}}
87this.loadSmartBanner=function(){if((navigator.userAgent.match(/Android|iPhone|iPod|iPad/i)!==null)&&!$('.is-app').length&&!$('.embed').length&&!NoSocial&&!CookieManagerI.get('sb-closed')&&!CookieManagerI.get('sb-installed')){if(navigator.vendor&&navigator.vendor.indexOf('Apple')>-1&&navigator.userAgent&&navigator.userAgent.indexOf('CriOS')==-1&&navigator.userAgent.indexOf('FxiOS')==-1){return function(){};}
88this.cssStack.push("jquery.smartbanner.css");this.jsStack.push("jquery.smartbanner.js");return function(){if(navigator.userAgent.indexOf('Android')!=-1){$.smartbanner({title:$(".social a[href*='play.google']").attr('title'),author:document.location.host});}else{$.smartbanner({title:$(".social a[href*='apple']").attr('title'),author:document.location.host});}
89if(typeof($.smartbanner)!="function"){ConsoleDebuggerI.pushMsg("SBANNER NOT FUNC "+"#important");}else{setTimeout(function(){$('#smartbanner .sb-close').click();},900000);}
90GaTrackI.ga('smart-bnr-show',navigator.userAgent.indexOf('Android')!=-1?'Droid':'Ios');};}
91return function(){};}
92this.loadJqueryUI=function(callback){this.jsStack.push("jquery-ui.1.13.2.min.js");this.cssStack.push("jquery-ui.min.css");this.appendCSS();this.appendJS(callback);}
93this.loadJqueryUITimePicker=function(callback){this.jsStack.push("jquery-ui.1.13.2.min.js");this.cssStack.push("jquery-ui.min.css");this.cssStack.push("jquery-ui-timepicker-addon.css");this.appendCSS();this.appendJS(callback);}
94this.appendJS=function(callback,loadNext){if(typeof(callback)=="function"){this.callback.push(callback);}
95if(!loadNext&&this.appendJSRun){return;}
96this.appendJSRun=true;if(!this.jsStack.length){self.runCallback(this.callback);this.appendJSRun=false;return;}
97var fileName=this.jsStack.shift();if(fileName.indexOf('//')==-1){var path=baseUrl+'/public/js'+($('.js-isAdmin').length?'/':'v'+this.actJSVersion+'/')+fileName;}else{var path=fileName;}
98if(this.injected.indexOf(path)===-1){this.injected.push(path);self.getScript(path,function(){self.appendJS(false,true);});}else{self.appendJS(false,true);}}
99this.runCallback=function(callback){if(Array.isArray(callback)){while(callback.length){var func=callback.shift();if(typeof(func)!="undefined"){try{func();}catch(e){console.log(e);ConsoleDebuggerI.pushMsg(e.toString());}}}}else{try{callback();}catch(e){console.log(e);ConsoleDebuggerI.pushMsg(e.toString());}}}
100this.appendCSS=function(){var max=this.cssStack.length;for(var i=0;i<max;i++){var file=this.cssStack.shift();var path=baseUrl+'/public/css'+($('.js-isAdmin').length?'/':'v'+this.actJSVersion+'/')+file;if(file.indexOf('//')!=-1){var path=file;}
101if(this.injected.indexOf(path)===-1){this.injected.push(path);
101$('body').append('<link rel="stylesheet" href="'+path+'" type="text/css" media="screen">');}}}
102this.getScript=function(src,success){if(!document.querySelectorAll("script[src='"+src+"']").length){$.ajaxSetup({cache:true});$.getScript(src).done(function(){self.errorFindStack['done'].push(src+" - "+new Date().toISOString().slice(0,19).replace('T',' '));success();}).fail(function(jqxhr,settings,exception){if(self.injected[self.injected.length-1]==src){self.injected.pop();}
103var srcInfo=src.split("/");GaTrackI.ga("gtScrpt_"+(AddAdsV2I.hasAdblock()?"1":"0")+"-"+srcInfo[srcInfo.length-1],src.replace(BASE_URL+'/public/',''),"exception: "+exception);self.errorFindStack['fail'].push(src+" - "+jqxhr.status+" - "+new Date().toISOString().slice(0,19).replace('T',' '));});}}
104this.loadIfVisible=function(){$(window).scroll(function(){clearTimeout(self.loadIfVisibleTimer);self.loadIfVisibleTimer=setTimeout(function(){self.checkVisibility();},100);});self.checkVisibility();}
105this.checkVisibility=function(){if(jQuery.isEmptyObject(self.loadIfVisibleElements)){return;}
106var wT=$(window).scrollTop();var wH=$(window).innerHeight();var limitPadding=isMobile()?0:100;for(i in self.loadIfVisibleElements){$elem=$(i);if($elem.length&&($elem.offset().top<wT+wH+limitPadding)){self.loadIfVisibleElements[i]();delete(self.loadIfVisibleElements[i]);}}}
107this.init();}
108var LoadScriptIfNeedI;$(document).ready(function(){LoadScriptIfNeedI=new LoadScriptIfNeed();});
109function CCast(){var self=this;var mediaInfo;var castContext=null;var player;var playerController;var connected=false;this.init=function(){this.bindStartBtn();}
110this.bindStartBtn=function(){var isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)&&navigator.userAgent.indexOf('OPR/')==-1;if(!isChrome||document.location.protocol=="http:"){$('.social_cast').remove();return;}else if(!$('.social_cast').length){return;}
111$('.social_cast').click(function(e){GaTrackI.ga('ccast','click');if($(e.target).hasClass('js-castBtn')){return;}
112if(!CookieManagerI.get('cast_need')&&!$(".js-castBtn").length){var db=new DialogBox();db.bindConfirm(function(){self.loadCastScript();db.closePopUp();},function(){});db.openPopUp(LangI.getText('chromecast-pop-txt'),LangI.getText('chromecast-title'));}});if(CookieManagerI.get('cast_need')){self.loadCastScript();}}
113this.loadCastScript=function(){$('.social_cast').removeClass('fa-cast').html("<button class='js-castBtn' is='google-cast-button'>Google Cast Loading ...</button>");LoadScriptIfNeedI.loadCCastScript(function(){});self.initCast(!CookieManagerI.get('cast_need'));}
114self.initCast=function(autoOpen){window['__onGCastApiAvailable']=function(isAvailable){if(!isAvailable){return false;}
115castContext=cast.framework.CastContext.getInstance();castContext.setOptions({autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID});var stateChanged=cast.framework.CastContextEventType.CAST_STATE_CHANGED;castContext.addEventListener(stateChanged,function(event){if(event.castState=="NOT_CONNECTED"){$('.html5Player audio').prop('muted',false);}
116if(event.castState=="NOT_CONNECTED"&&!CookieManagerI.get('cast_need')){CookieManagerI.set('cast_need','1','1','/');return;}else if(event.castState!="CONNECTED"){return;}
117self.startCast();});player=new cast.framework.RemotePlayer();playerController=new cast.framework.RemotePlayerController(player);if(autoOpen){$(".js-castBtn").click();CookieManagerI.set('cast_need','1','1','/');}};}
118this.startCast=function(){if(castContext==null){return;}
119GaTrackI.ga('ccast','start');CookieManagerI.set('cast_need','1','1','/');if(castContext.R=="CONNECTED"){$('.html5Player audio').prop('muted',true);}
120var castSession=castContext.getCurrentSession();var sUrl=$('.html5Player audio').attr('data-stream-url');mediaInfo=new chrome.cast.media.MediaInfo(sUrl);if(sUrl&&(sUrl.indexOf('.m3u')>-1||sUrl.indexOf('.aac')>-1)){mediaInfo.contentType='audio/aac';}else{mediaInfo.contentType='audio/mpeg';}
121mediaInfo.metadata=new chrome.cast.media.MusicTrackMediaMetadata();mediaInfo.streamType=chrome.cast.media.StreamType.LIVE;
121mediaInfo.metadata.title=$('.html5Player').data('act-name');mediaInfo.metadata.artist=$('.js-now').text();var img=$('link[itemprop="image"]').attr('href');if($('link[itemprop="image"]').data('has-big')){img=img.replace("play_250_250",'play_512');}
122mediaInfo.metadata.images=[{'url':img}];var request=new chrome.cast.media.LoadRequest(mediaInfo);if(castSession){castSession.loadMedia(request).then(function(){}).catch(function(error){console.log('Error: '+error);});}}
123this.setVolume=function(v){if(player){player.volumeLevel=v;playerController.setVolumeLevel();}}
124this.setPlayPause=function(status){if(playerController){if(player.isPaused!=status){playerController.playOrPause();}}}
125this.setSeek=function(time){if(playerController){player.currentTime=time;playerController.seek();}}
126this.init();}
127var CCastI=null;$(document).ready(function(){CCastI=new CCast();});
128function AudioPlayerApp(){var self=this;this.$audio=null;this.audio=null;this.$container=null;this.$dataCont=null;this.seekTimer=null;this.volChTimer=null;this.pausedByUser=false;this.lastTime=0;this.lastVolume=0;this.isTouch='ontouchstart'in window;this.eStart=this.isTouch?'touchstart':'mousedown';this.eMove=this.isTouch?'touchmove':'mousemove';this.eEnd=this.isTouch?'touchend':'mouseup';this.eCancel=this.isTouch?'touchcancel':'mouseup';this.iOS=['iPad','iPhone','iPod'].indexOf(navigator.platform)>=0;this.init=function($audio){this.$audio=$audio;this.audio=this.$audio[0];this.buildPlayerBtns();self.timeCurrent=this.$container.find('.ctime');self.barPlayed=this.$container.find('.audioplayer-bar-loaded');this.bindEvents();this.$container.addClass('ready');$audio.hide();return this.audio;}
129this.buildPlayerBtns=function(){var goToPrevText=LangI.getText('audio-gotoprev');var backwardText=LangI.getText('audio-backward');var playText=LangI.getText('audio-play');var forwardText=LangI.getText('audio-forward');var goToNextText=LangI.getText('audio-gotonext');var timeText=LangI.getText('audio-time');var volumeText=LangI.getText('audio-volume');var dataTrafficText=LangI.getText('audio-data-traffic');var fowPrevButtons='';fowPrevButtons+="<a data-toggle='tooltip' role='button' aria-label='"+goToPrevText+"' title='"+goToPrevText+"' data-placement='top' class='fa fa-previous goToPrev'></a>";fowPrevButtons+="<a data-toggle='tooltip' role='button' aria-label='"+backwardText+"' title='"+backwardText+"' data-placement='top' class='fa fa-backward seekBack'></a>";fowPrevButtons+="<a data-toggle='tooltip' role='button' aria-label='"+playText+"' title='"+playText+"' data-placement='top' class='fa fa-play playPause pulse-anim'></a>";fowPrevButtons+="<a data-toggle='tooltip' role='button' aria-label='"+forwardText+"' title='"+forwardText+"' data-placement='top' class='fa fa-forward seekForw'></a>";fowPrevButtons+="<a data-toggle='tooltip' role='button' aria-label='"+goToNextText+"' title='"+goToNextText+"' data-placement='top' class='fa fa-next goToNext'></a>";var html='';html+='<input class="js-timePicker" type="hidden">';html+='<div class="audio-player-app'+(this.$audio.data('seeking')?' seeking-on':'')+'">';html+='<div class="clear"></div>';html+='<a class="ctime js-cTime" data-toggle="tooltip" title="'+timeText+' / '+backwardText+'" data-placement="top">00:00</a>';html+=fowPrevButtons;if(this.volumeModAllow()){html+='<div class="audioplayer-volume-v2" data-toggle="tooltip" data-placement="bottom" title="'+volumeText+': 80%"><a class="audioplayer-volume-button fa fa-volume-up"></a><div class="audioplayer-volume-adjust-v2"><div class="volume-slider-cont"><div class="volume-slider" style="height: 80%;"></div></div></div></div>';}else{html+='<a class="cdt audioplayer-time-duration" data-toggle="tooltip" data-placement="bottom" title="'+dataTrafficText+': 0 KB"></a>';}
130html+='<div class="clear_title_2 clear"></div>';html+='</div>';this.$audio.before(html);this.$container=this.$audio.prev('.audio-player-app');this.$dataCont=this.$container.closest('.mRadioPlayer');var $goToPrev=this.$container.find('.goToPrev');var $goToNext=this.$container.find('.goToNext');$goToPrev.attr('title',this.$dataCont.data('prev-title')+' 🡰 '+$goToPrev.attr('title'));$goToNext.attr('title',$goToNext.attr('title')+' 🡲 '+this.$dataCont.data('next-title'));}
131this.bindEvents=function(){var $playPause=this.$container.find('.playPause');var $seekButtons=this.$container.find('.seekBack, .seekForw');this.audio.addEventListener('timeupdate',function(){var sec=self.secondsToTime(self.audio.currentTime);if(self.lastTime==sec){return;}
132self.lastTime=sec;self.timeCurrent.text(sec);var playtime=self.audio.currentTime;if(playtime>self.barLength){playtime=self.barLength;}
133self.barPlayed.width((playtime/self.barLength)*100+'%');});$playPause.off('click.audioPlayerApp').on('click.audioPlayerApp',function(e){e.preventDefault();var deepLink=self.$audio.data('deep-link');if(deepLink){window.open(deepLink,'_blank');return;}
134if(self.audio.paused){self.audio.play();if(e.originalEvent!==undefined){$(this).removeClass('pausedByUser');}
135GaTrackI.ga('audio-player_small_play_click');}else{self.audio.pause();self.pausedByUser=true;if(e.originalEvent!==undefined){$(this).addClass('pausedByUser');}}
136changeButtonStatus($(this));});$('body').off('keydown.audioPlayerApp').on('keydown.audioPlayerApp',function(e){if(e.target.nodeName=='INPUT'||e.target.nodeName=='TEXTAREA'||e.target.isContentEditable){return;}
137var code=e.keyCode||e.which;if(code==32){e.preventDefault();$playPause.trigger('click');}else if(code==37){e.preventDefault();$seekButtons.filter('.seekBack').trigger('click');}else if(code==39){e.preventDefault();$seekButtons.filter('.seekForw').trigger('click');}});this.audio.addEventListener("play",function(){changeButtonStatus($playPause);});function changeButtonStatus(btn){var cStat=false;if(self.audio.paused){btn.removeClass("fa-pause");btn.attr('data-original-title',LangI.getText('audio-play'));btn.attr('aria-label',LangI.getText('audio-play'));GaTrackI.ga("audio-player","click-stop");cStat=true;}else{btn.addClass("fa-pause");btn.attr('data-original-title',LangI.getText('audio-pause'));btn.attr('aria-label',LangI.getText('audio-pause'));GaTrackI.ga("audio-player","click-play");}
138if(typeof(CCastI)!="undefined"&&CCastI!=null){CCastI.setPlayPause(cStat);}}
139$seekButtons.off('click.audioPlayerApp').on('click.audioPlayerApp',function(e){e.preventDefault();var seekBack=$(this).hasClass('seekBack');clearTimeout(self.seekTimer);self.seekTimer=setTimeout(function(){var currentTime=self.audio.currentTime;var minSeek=self.audio.duration>10?10:5;self.seekPlayer(seekBack?currentTime-minSeek:currentTime+minSeek
139);GaTrackI.ga(seekBack?'seek_prev_pressed':'seek_next_pressed');},100);});this.$container.find('.goToPrev, .goToNext').click(function(e){e.preventDefault();if($(this).hasClass('goToPrev')){document.location.href='/'+self.$dataCont.data('prev');}else{document.location.href='/'+self.$dataCont.data('next');}
140GaTrackI.ga(($(this).hasClass('goToPrev')?'prev_pressed_left_'+self.$dataCont.data('prev'):'prev_pressed_right_'+self.$dataCont.data('next')));});this.audio.seekPlayerA=function(newTime){self.seekPlayer(self.audio.currentTime-newTime);}
141this.$container.find('.volume-slider-cont').click(function(e){var newVolume=self.adjustVolume(e);GaTrackI.ga('audio-player','volume-slider-click',newVolume);});this.$container.find('.audioplayer-volume-button').click(function(e){if(self.audio.volume>0){self.lastVolume=CookieManagerI.get('volume');self.audio.volume=0;}else if(self.lastVolume==0||self.lastVolume===null){self.audio.volume=0.8;}else{self.audio.volume=self.lastVolume;}
142GaTrackI.ga('audio-player','volume-btn-click');});var volumeAdjuster=this.$container.find('.volume-slider-cont');volumeAdjuster.on(self.eStart,function(e){self.adjustVolume(e);volumeAdjuster.on(self.eMove,function(e){e.preventDefault();self.adjustVolume(e);});}).on(self.eCancel,function(){volumeAdjuster.unbind(self.eMove);});this.audio.addEventListener('volumechange',function(){self.refreshSoundIconStatus();});this.audio.addEventListener('waiting',function(){console.log("Stream is lagging!");});}
143this.adjustVolume=function(e){if(self.isTouch&&(!e.originalEvent||!e.originalEvent.touches||!e.originalEvent.touches.length)){return;}
144var theRealEvent=self.isTouch?e.originalEvent.touches[0]:e;var $volumeAdjuster=$(e.currentTarget);var volumeOffset=$volumeAdjuster.offset();var volumeHeight=$volumeAdjuster.height();if(!volumeOffset||!volumeHeight){return;}
145var v=Math.abs((theRealEvent.pageY-(volumeOffset.top+volumeHeight))/volumeHeight);if(v>1){v=1;}else if(v<0){v=0.1;}
146try{self.audio.volume=v;clearTimeout(self.volChTimer);self.volChTimer=setTimeout(function(){GaTrackI.ga('audio-player','volumechange',parseInt(v*100)+'%');},100);}catch(error){if(typeof ConsoleDebuggerI!='undefined'){ConsoleDebuggerI.pushMsg('adjustVolume err: '+error.toString()+' - '+v+' - '+parseInt(self.audio.volume*100)+'%');}}
147try{return parseInt(self.audio.volume*100);}catch(error){if(typeof ConsoleDebuggerI!='undefined'){ConsoleDebuggerI.pushMsg('adjustVolume parseInt err: '+error.toString()+' - '+v+' - '+parseInt(self.audio.volume*100)+'%');}
148return 0;}}
149this.refreshSoundIconStatus=function(){var volume=self.audio.volume;var volumePercent=volume*100;var sliderHeight=volumePercent+'%';var $volumeCont=self.$container.find('.audioplayer-volume-v2');if(!$volumeCont.length){return;}
150var volumeSliders=$volumeCont.find('.volume-slider');var $soundIcon=$volumeCont.find('.audioplayer-volume-button');for(var i=0;i<volumeSliders.length;i++){if(volumeSliders[i].style.height!=sliderHeight){volumeSliders[i].style.height=sliderHeight;}}
151var txt=LangI.getText('audio-volume')+': '+Math.round(volumePercent)+'%';$volumeCont.attr('data-original-title',txt).attr('title',txt);if(volume>0&&$soundIcon.hasClass('fa-volume-off')){$soundIcon.addClass('fa-volume-up');$soundIcon.removeClass('fa-volume-off');}
152if(volume<=0&&!$soundIcon.hasClass('fa-volume-off')){$soundIcon.addClass('fa-volume-off');$soundIcon.removeClass('fa-volume-up');}
153if(volume>0){$soundIcon.removeClass('pulse-anim');}else{$soundIcon.addClass('pulse-anim');}}
154this.seekPlayer=function(newTime){var maxDuration=self.audio.duration;if(maxDuration===Infinity&&self.audio.buffered.length){maxDuration=self.audio.buffered.end(Math.max(0,self.audio.buffered.length-1))+3;}
155if(newTime<0){newTime=0;}else if(maxDuration<newTime&&maxDuration!==Infinity){newTime=maxDuration;}else if(isNaN(newTime)){return;}
156try{self.audio.currentTime=Math.round(newTime);CCastI.setSeek(self.audio.currentTime);}catch(e){console.log(e.toString());}}
157this.secondsToTime=function(secs){var hours=Math.floor(secs/3600),minutes=Math.floor(secs%3600/60),seconds=Math.ceil(secs%3600%60);return(hours==0?'':hours>0&&hours.toString().length<2?'0'+hours+':':hours+':')+(minutes.toString().length<2?'0'+minutes:minutes)+':'+(seconds.toString().length<2?'0'+seconds:seconds);}
158this.html5AudioSupport=function(){var audioElement=document.createElement('audio');return!!(audioElement.canPlayType&&audioElement.canPlayType('audio/mpeg;').replace(/no/,''));}
159this.volumeModAllow=function(){try{var volumeTestDefault=this.audio.volume,volumeTestValue=this.audio.volume=0.111;
159if(Math.round(this.audio.volume*1000)/1000==volumeTestValue){this.audio.volume=volumeTestDefault;return true;}else{return false;}}catch(e){return false;}}}
160function AudioplayerServer(continer){var self=this;var $continer=$(continer);this.audio=null;this.playerApp=null;this.hideBigPlayOK=false;this.BW=$('.radiosList').data('dt');this.scrollEnabled=false;this.dataMoreThanKB=false;this.mediaSessionSupport='mediaSession'in navigator;this.firstSong={};this.mediaSessionStart=false;this.hls=null;this.checkedPorts=new Array();this.lastBW=null;this.tryNum=0;this.errorCircleCounter=1;this.tryDiffStreamNum=0;this.clippyHelpReady=false;this.timeoutTimer=null;this.actHash='';this.actSongLoadTimer=null;this.backupsV2=MyConfigI.get('backupS');this.backupsTmpV2=this.backupsV2.slice();this.startStopListen=false;this.catch401Err=false;this.volTimer=null;this.init=function(){if(!$continer.find("audio").length){return;}
161if(typeof $.fn.slimscrollFirstUse==='function'){$('.server-conts').slimscrollFirstUse(function(){self.serverScroll();});}
162this.checkHTTPSNeed();this.startAudioPlayer();this.bindServerSelect();this.bindChannelHashChange();this.checkEQ();this.loadCurrentStream();if(typeof(LiveRadioRecord)!="undefined"){new LiveRadioRecord();ShazamI=new Shazam();}
163this.bindVolumeSetter();}
164this.checkHTTPSNeed=function(){if($('.server-row').length&&navigator.userAgent&&navigator.userAgent.match(/FB_IAB|FBBV/g)!==null){var backUpRow=null;$('.server-row').each(function(i,elem){if($(elem).text().indexOf('Backup')>-1){backUpRow=elem;}});if(backUpRow!==null){$('.server-row').removeClass('active');$(backUpRow).addClass('active');$('.server-conts').prepend(backUpRow);}
165if(typeof(GaTrackI)!="undefined"){GaTrackI.ga("httpsneed",document.location.href);}}}
166this.loadCurrentStream=function(){this.loadStream(this.findCurrentServer());}
167this.findCurrentServer=function(){var aS=$continer.find('.server-row.active');var id=window.location.hash.match(/#server(\d*)/);if(!id&&typeof(getUserSettings)!="undefined"&&getUserSettings('squality-on')){var sstmp=getUserSettings('squality-data');if(sstmp&&sstmp[rInfo['rid']]){id=['-',sstmp[rInfo['rid']]];}else if(sstmp&&sstmp[rInfo['rid']+'-'+LangI.langLocale]){id=['-',sstmp[rInfo['rid']+'-'+LangI.langLocale]];}}
168if(id!=null){if(id[1]&&$continer.find('.server-row[data-rsu-id="'+id[1]+'"]').length){aS=$continer.find('.server-row[data-rsu-id="'+id[1]+'"]');$('.is-app .song-list-cont').data('hash',aS.data('hash'));var name=aS.text().split(' - ')[0];var cName=$('h1').text();if(cName.indexOf(name)!=0&&name.indexOf('Server')=="-1"&&name.indexOf('Backup')=="-1"){h1P=$('h1').text().split(' - ');$('h1, title').html(name+' - '+h1P[0]);GaTrackI.ga('direct-server','onload',$continer.data('url')+' - '+aS.text());}}}
169return aS;}
170this.bindChannelHashChange=function(){$(window).on('hashchange',function(){var mhs=document.location.hash;console.log('bindChannelHashChange',mhs);if(mhs.indexOf('#google_vignette')>-1||mhs==""||mhs.indexOf('#server')>-1){return;}
171self.loadStream(self.findCurrentServer());});}
172this.serverScroll=function(reInit){var $serverConts=$('.server-conts');if(!$serverConts.length){return;}
173if(typeof atob=='undefined'){$serverConts.hide();return;}
174var slimScrollAvailable=typeof $.fn.slimscroll!='undefined';if(!slimScrollAvailable){$serverConts.removeClass('need-init');return;}
175var scontH=$serverConts.css('max-height');var limitH=parseInt(scontH!='none'?scontH:175,10)+1;var slimScrollAvailable=typeof $.fn.slimscroll!='undefined';if(reInit){$serverConts.slimscroll({destroy:true,height:'60px'}).attr('style','');}
176$serverConts.removeClass('need-init');if($serverConts.height()<limitH){return;}
177this.scrollEnabled=true;var options={disableFadeOut:true,height:(limitH-1)+'px'};$serverConts.slimscroll(options);}
178this.bindServerSelect=function(){$('.server-row').click(function(e){e.preventDefault();GaTrackI.ga('direct-server','click',$continer.data('url')+' - '+$(this).text());self.resetSongList($(this).data('hash'));self.loadStream($(this));self.saveLastServer($(this));});}
179this.loadStream=function($serverRow){$continer.find('.server-row.active').removeClass('active');if($serverRow.length&&typeof(atob)!="undefined"){$serverRow.addClass('active');self.setStatus(LangI.getText('connecting'));if($serverRow.hasClass('no-convert')){var sUrl=$serverRow.data("source");}else{var sUrl=atob($serverRow.data("source"));}
180this.BW=$serverRow.data('dt');$continer.data('dt',this.BW);$continer.data('rsu-id',$serverRow.data("rsu-id"));if(this.scrollEnabled){try{$continer.find('.server-conts').slimscroll({'scrollBy':$serverRow.position().top});}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("server-row.active err: "+$('.server-row.active').length+' - '+$serverRow.length+' - '+e.toString());}}}}else{var sUrl=$(this.audio).data('stream-url');this.BW=$continer.data('dt');}
181if(sUrl.indexOf("time=")>-1){sUrl=sUrl.replace(/\?time=.*/,'?time='+$.now());}
182if(this.hls!=null){this.hls.destroy();this.hls=null;}
183if(this.audio.src!=''){if(typeof(this.audio.pause)!="undefined"){this.audio.pause();}
184this.audio.src="";}
185if(sUrl.indexOf('m3u8')!=-1){if(sUrl.indexOf('#conVm3u8')!=-1){sUrl=atob(sUrl.replace('#conVm3u8',''));}
186if(typeof(Hls)=="undefined"){this.loadHLSScript(function(){self.loadHLSStream(sUrl);});}else{self.loadHLSStream(sUrl);}}else{self.loadNativeAudio(sUrl);}
187clearTimeout(this.actSongLoadTimer);this.actSongLoadTimer=setTimeout(function(){self.resetSongList($serverRow.data('hash'));if(typeof(CCastI)!="undefined"&&CCastI!==null){CCastI.startCast();}},3000);}
188this.loadNativeAudio=function(sUrl){$(this.audio).attr("data-stream-url",sUrl);$(this.audio).attr("src",sUrl);$(this.audio).find("source").attr("src",sUrl);this.audio.src=sUrl;this.audio.load();this.tryPlayToAudio();}
189this.tryPlayToAudio=function(){console.log('tryPlayToAudio',$(this.audio).data('autoplay'));if(!$(this.audio).data('autoplay')){return;}
190var playPromise=this.audio.play();if(playPromise!==null&&typeof(playPromise)!="undefined"&&typeof(Promise)!="undefined"){playPromise.then(function(){console.log("Success!");if(self.hls!=null){self.hideBigPlay();}}).catch(function(){console.log("AP was prevented!");});}}
191this.startAudioPlayer=function(){if(typeof($.fn.audioPlayer)!="undefined"){this.audio=$continer.find('audio').audioPlayer($continer,self).audio;}else if(typeof(AudioPlayerApp)!="undefined"){this.playerApp=new AudioPlayerApp();this.audio=this.playerApp.init($continer.find('audio'));}else{return;}
192this.bindErrorListener();$continer.find('.play-cont-app').click(function(){if($(self.audio).data('deep-link')){window.open($(self.audio).data('deep-link'),'_blank');return;}
193$(self.audio).data("autoplay",true);$continer.find('.play-cont-app').unbind('click');self.audio.play();if($('.embed-radioplayer').length){self.loadStream(self.findCurrentServer());}
194GaTrackI.ga('audio-player_big_play_click');}).addClass('ready');var defV=CookieManagerI.get('volume');if($continer.data('volume')){defV=parseFloat($continer.data('volume'));if(defV<0.5){defV=0.5;}}else if(defV==null){defV=0.8;}
195this.audio.volume=defV;if(this.playerApp!=null){this.playerApp.refreshSoundIconStatus();}
196this.audio.addEventListener("timeupdate",function(){if(self.hls==null&&this.currentTime>0&&$('.play-cont-app').length){self.hideBigPlay();if(this.currentTime>5){self.tryNum=0;self.errorCircleCounter=1;}}
197if(self.startStopListen){$('.js-cTime').attr('data-lstup',$.now());}});this.audio.addEventListener('volumechange',function(){if(this.volume<0.05){CookieManagerI.set('volume',this.volume);}else{CookieManagerI.set('volume',this.volume,365);if(typeof(saveUserSettings)!="undefined"){var vcE=this;clearTimeout(self.volTimer);self.volTimer=setTimeout(function(){saveUserSettings({'volume':vcE.volume*100});},500);}}
198if(typeof(CCastI)!="undefined"){CCastI.setVolume(this.volume);}});this.bindClearStream();}
199this.bindErrorListener=function(){this.audio.onended=function(e){console.log('ended',e);GaTrackI.ga('onended',document.location.href,self.tryNum);self.startErrorProcess();};this.audio.onplaying=function(){if(self.hls!=null){self.tryNum=0;self.errorCircleCounter=1;}
200self.setStatus(LangI.getText('connected'),1);$continer.find('.audioplayer').removeClass('audioplayer-stopped').addClass('audioplayer-playing');var src=$(self.audio).attr("src");if(src&&src.indexOf("rdstrm.com")>-1){GaTrackI.ga('stream-error','https-ok',src);}
201if($('.play-cont-app').length){self.hideBigPlay();}
202self.initIOSListener();};this.audio.onerror=function(e){console.log('error',e);if(self.audio.hasAttribute('crossorigin')){self.audio.removeAttribute('crossorigin');self.audio.load();self.audio.play();}
203if(!$('.closedRadioIframe').length){self.startErrorProcess();}};this.audio.onabort=function(e){console.log('abort',e);};this.audio.onsuspend=function(){};}
204this.bindHLSErrorListener=function(hls){hls.on(Hls.Events.MANIFEST_PARSED,function(){self.tryPlayToAudio();});hls.on(Hls.Events.ERROR,function(e,b,c,d){console.log(e,b,c,d);if(b.fatal==true){hls.destroy();self.startErrorProcess();}});}
205this.startErrorProcess=function(){if($('.embed-radioplayer').length){return;}
206self.setStatus(LangI.getText('error'),2);self.tryNum++;var reConnTime=500*this.errorCircleCounter;if(self.tryNum>3){reConnTime*=Math.min(self.tryNum,10);self.startClippyHelp();}
207if(this.errorCircleCounter>1){self.startClippyHelp();}
208GaTrackI.ga('onerror',document.location.href,self.tryNum);setTimeout(function(){if(self.tryNum>2&&$('.server-conts .server-row').length){self.tryLoadNextStream();}else{self.tryConnect();}},reConnTime);}
209this.tryConnect=function(){this.loadStream($continer.find('.server-row.active'));}
210this.tryLoadNextStream=function(){var actServer=$continer.find('.server-row.active');if(typeof(atob)){if(actServer.hasClass('no-convert')){var sUrl=actServer.data("source");}else{var sUrl=atob(actServer.data("source"));}
211var bsUrl=this.getNextBackup(sUrl);if(bsUrl){if(actServer.hasClass('no-convert')){actServer.data("source",bsUrl);}else{actServer.data("source",btoa(bsUrl));}
212self.setStatus(LangI.getText('connecting'));this.loadNativeAudio(bsUrl);return;}}
213self.tryNum=0;self.tryDiffStreamNum++;var nextServer=actServer.next('.server-row');if(nextServer.length){this.loadStream(nextServer);}else{this.errorCircleCounter++;this.loadStream($continer.find('.server-row').eq(0));}}
214this.getNextBackup=function(sUrl){var link=document.createElement("a");link.href=sUrl;var origin=link.origin;var backupRadioStat=null;var isPrx=false;if(sUrl.indexOf('rdstrm.com')>-1&&link.host=="radiostat.info"){backupRadioStat=sUrl.match(/https\/.*rdstrm\.com/g);if(backupRadioStat){origin=backupRadioStat[0].replace('https/','https://');}}else if(sUrl.indexOf('com/prx-http')>-1){isPrx=true;}
215var originIndex=this.backupsV2.indexOf(origin);if(originIndex>-1&&this.backupsTmpV2.length){var newS=this.backupsTmpV2.pop();if(isPrx&&newS=="https://rdstrm.com"){newS="https://stream3.rdstrm.com";}
216var nLink=document.createElement("a");nLink.href=newS;var newOrigin=nLink.origin;if(backupRadioStat){newOrigin=newOrigin.replace('https://','https/');origin=backupRadioStat[0];}
217return sUrl.replace(origin,newOrigin);}else if(originIndex){this.backupsTmpV2=this.backupsV2.slice();return false;}else{return false;}}
218this.setAnonymusStream=function(){$(this.audio).attr('crossorigin','anonymous');var mssrc=$(this.audio).attr('src');$(this.audio).attr('src','');this.audio.pause();this.audio.currentTime=0;$(this.audio).attr('src',mssrc);this.audio.play();}
219this.bindClearStream=function(){$(window).on('beforeunload',function(){self.audio.pause();self.audio.pause(0);self.audio.src="";self.audio.load();$("audio").remove();});}
220this.setStatus=function(txt,status){if(status!=2){$continer.find('.server-row.active').removeClass('error');}
221$continer.find('.server-row .type-0,.server-row .type-1,.server-row .fa').remove();if(status==1){$continer.find('.server-row.active .fa').remove();var iHtml='<i class="fa fa-volume-up" aria-hidden="true"></i>';$continer.find('.server-row.active').prepend(iHtml);var actServer=$continer.find('.server-row.active');var pos=$continer.find('.server-row').index(actServer)==0?0:1;if($continer.find('audio').length&&$continer.find('audio').attr('src')&&$continer.find('audio').attr('src').indexOf('/prx-')>-1){pos=3;}
222GaTrackI.ga('ssrvr-'+pos,$(".rid").val(),$continer.find('.server-row.active .info').text());}else if(status==2){$continer.find('.server-row.active').addClass('error');}else{status=0;}
223$continer.find('.server-row.active .status').remove();var sHtml='<span class="status type-'+status+'">'+txt+'</span>';$continer.find('.server-row.active').append(sHtml);}
224this.hideBigPlay=function(noAdd){noAdd=typeof(noAdd)!="undefined";if(!noAdd&&(!$continer.find('.play-cont-app').length||this.hideBigPlayOK)
224){return;}
225$('.playPause').removeClass('pulse-anim');if(typeof(AddAdsV2I)!="undefined"&&!noAdd){this.hideBigPlayOK=true;setTimeout(function(){AddAdsV2I.addRadioPage_App();},isMobile()?3000:0);}else if(noAdd){$('.song-cover-cont img').hide();}
226$continer.find('.play-cont-app').remove();this.initMobileMediaSession();}
227this.bindVolumeSetter=function(){$(document).on('keypress',function(e){var newVolume=null;if(e.which==43){newVolume=0.1;}else if(e.which==45){newVolume=-0.1;}
228if(newVolume){var nV=self.audio.volume+newVolume;if(nV<=1&&nV>=0){self.audio.volume=nV;}}});}
229this.initMobileMediaSession=function(){if(!this.mediaSessionSupport){return;}
230navigator.mediaSession.setActionHandler('play',function(){self.audio.play();GaTrackI.ga('mediaSession','play');});navigator.mediaSession.setActionHandler('pause',function(){self.audio.pause();var e=new Event("play");self.audio.dispatchEvent(e);GaTrackI.ga('mediaSession','pause');});navigator.mediaSession.setActionHandler('seekbackward',function(){$continer.find('.seekBack').click();GaTrackI.ga('mediaSession','seekbackward');});navigator.mediaSession.setActionHandler('seekforward',function(){$continer.find('.seekForw').click();GaTrackI.ga('mediaSession','seekforward');});if($continer.data('prev')&&$continer.data('next')){navigator.mediaSession.setActionHandler('previoustrack',function(){GaTrackI.ga('mediaSession','previoustrack');document.location.href='/'+$continer.data('prev');});navigator.mediaSession.setActionHandler('nexttrack',function(){GaTrackI.ga('mediaSession','nexttrack');document.location.href='/'+$continer.data('next');});}
231this.mediaSessionStart=true;this.setMobileMediaSession(this.firstSong);}
232this.setMobileMediaSession=function(songData){if(!this.mediaSessionSupport){return;}
233if(this.mediaSessionStart===false){this.firstSong=songData;return;}
234var imgType='image/jpeg';var imgS=$('.song-cover-cont [itemprop="image"]').attr('content');if(!imgS){imgS=$('link[itemprop="image"]').attr('href');}
235if(!imgS){imgS=$('.song-cover-cont [itemprop="image"]').attr('src');}
236var imgB=imgS;if(typeof(rInfo)!="undefined"&&typeof(imgB)!="undefined"&&rInfo['picVs']&&rInfo['picVs'].indexOf('play_512')>-1){imgB=imgB.replace('play_250_250','play_512');}
237if(typeof(AlbumCoverSlider)!="undefined"&&AlbumCoverSliderI.albumCoverShowd){if(songData.itunes_pic){if(songData.itunes_pic.indexOf('https://')>-1&&songData.itunes_pic.indexOf('.mzstatic.com')>-1){imgB=LoadActRadioDataCoreI.buildCoverImgUrl(songData,'512x512bb');}else if(songData.itunes_pic.indexOf('.jpg')>-1||songData.itunes_pic.indexOf('.png')>-1){imgB='https://is1-ssl.mzstatic.com/image/thumb/'+songData.itunes_pic+'/512x512bb.jpg';}else{imgB='https://is1-ssl.mzstatic.com/image/thumb/'+songData.itunes_pic+'/source/512x512bb.jpg';}}}
238if(imgB.indexOf('png')>-1){imgType='image/png';}
239var obj={artwork:[{src:imgS,sizes:'96x96',type:imgType},{src:imgS,sizes:'128x128',type:imgType},{src:imgS,sizes:'192x192',type:imgType},{src:imgB,sizes:'384x384',type:imgType},{src:imgB,sizes:'512x512',type:imgType},]};if(songData){if($("#Grid").data('act-name')){obj['title']=$("#Grid").data('act-name')+' - '+$('.logo').attr('title');}else{obj['title']=$('.radioName').text();}
240if(songData.artist){obj['artist']=songData.artist+(songData.track?' - '+songData.track:'');}else if($('.song-list-cont').data('url')){var urlN=$('.song-list-cont').data('url');if(SongListI[urlN]&&SongListI[urlN].lastSongData['now_playing']){songData=SongListI[urlN].lastSongData['now_playing'];obj['artist']=obj['artist']=songData.artist+(songData.track?' - '+songData.track:'');}}
241var siteTitle=$(".social meta[itemprop='name']");obj['album']=document.location.hostname+(siteTitle.length?" - "+siteTitle.attr("content"):"");}
242try{navigator.mediaSession.metadata=new MediaMetadata(obj);}catch(e){console.log(e);if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("mediaSession err: "+e.toString()+" - |"+$('link[itemprop="image"]').length+"|"+$('.song-cover-cont')[0].outerHTML);}}}
243this.loadHLSStream=function(sUrl){if(Hls.isSupported()){var hls=new Hls();this.hls=hls;hls.loadSource(sUrl);$(this.audio).attr("data-stream-url",sUrl);$(this.audio).attr("src",sUrl);$(this.audio).find("source").attr("src",sUrl);hls.attachMedia(this.audio);self.bindHLSErrorListener(hls);}else{self.loadNativeAudio(sUrl);}};this.loadHLSScript=function(callback){if(typeof(Hls)=="undefined"){var $script=$('<script>');if(callback){$script.on('load',callback);}
244$('body').append($script);var baseUrl=$('.js-radioplayerData').data('host')||$('.song-list-cont').data('host')||BASE_URL||$('base').attr('href');
244$script.attr('src',baseUrl+'/public/js/mini/hls.light-1.1.5.min.js');}}
245this.saveLastServer=function($serverRow){if(!getUserSettings('squality-on')){return;}
246saveUserSettings({'squality-data':{'rid':rInfo.rid,'rsu_id':$serverRow.data('rsu-id')}})}
247this.resetSongList=function(hash){clearTimeout(this.actSongLoadTimer);if((typeof(hash)!="undefined"&&this.actHash==hash)||typeof(hash)=="undefined"){return;}
248this.actHash=hash;if(typeof(SongListI)!="undefined"&&SongListI[$continer.data('url')]){SongListI[$continer.data('url')].refreshServerSongs(this.actHash);}
249if(typeof(LoadActRadioDataI)!="undefined"&&LoadActRadioDataI[$continer.data('url')]){LoadActRadioDataI[$continer.data('url')].reInit(this.actHash);}}
250this.checkEQ=function(){if(this.equalizerEnabled()){$('.fa-equalizer').css('color','#2f94e8');LoadScriptIfNeedI.loadEQScript(self.audio);GaTrackI.ga("eq_on");}
251$('.fa-equalizer').click(function(){LoadScriptIfNeedI.loadEQForm(self.audio);});}
252this.equalizerEnabled=function(){if(typeof(rInfo)=="undefined"){return false;}
253var storageKey='myeq-settings';var radioId=rInfo['rid'];var raw;var data;var settings;try{raw=localStorage.getItem(storageKey);if(!raw){return false;}
254data=JSON.parse(raw);if(!data||data.version!==2){return false;}
255if(data.global&&data.global.active===true&&data.global.settings){settings=data.global.settings;}
256else if(data.radios&&data.radios[radioId]){settings=data.radios[radioId];}
257return!!(settings&&settings.enabled===true);}catch(e){return false;}}
258this.checkPortIMG=function(){var url=this.audio.src;var pathI=document.createElement('a');pathI.href=url;var PORT=pathI['port']==""?'80':pathI['port'];if(this.checkedPorts.indexOf(PORT)!=-1){return;}
259this.checkedPorts.push(PORT);if(PORT=="80"){return;}
260url=url.replace(pathI['search'],'');var img=$("<img src='"+'http://lrrecord.myonlineradio.hu:'+PORT+'/portscan.gif'+"'>").on('load',function(){GaTrackI.ga('stream-error','port-ok',url);}).on('error',function(){GaTrackI.ga('stream-error','port-error',url);});}
261this.getContainer=function(){return $continer;}
262this.startClippyHelp=function(){if(this.clippyHelpReady){return;}
263this.clippyHelpReady=true;if(typeof(MyClippyI)=="undefined"||MyClippyI==null){LoadScriptIfNeedI.loadClippy(true);LoadScriptIfNeedI.loadStayHereMoti(true);}else{MyClippyI.runErrorProgram();}}
264this.initIOSListener=function(){if(typeof(UtilsI)=="undefined"||typeof(AddAdsV2I)!="undefined"||!UtilsI.isIOS()||UtilsI.isSafari()||!LangI.getText('ios-recom-msg')){return;}
265UtilsI.initFocusListener(self.initFocusListener);}
266this.initFocusListener=function(hidden){if(document[hidden]){self.startStopListen=true;}else{if(self.startStopListen==true){if($('.iosli a').length&&self.audio.paused==false&&$.now()-$('.js-cTime').attr('data-lstup')>2000){var db=new DialogBox();db.openPopUp(LangI.getText('ios-recom-msg',false,{'{iosAppLink}':$('.iosli a').attr('href')}),LangI.getText('app-attention'));$('.backupIosLink').click(function(){GaTrackI.ga("iosAppLinkBackup",document.location.href);});}}
267self.startStopListen=false;}}
268this.init();}
269var AudioplayerServerI=new Array();$(document).ready(function(){$('.mRadioPlayer, .embed-radioplayer').each(function(i,container){AudioplayerServerI[$(container).data("url")]=new AudioplayerServer(container);});});
270(function($){$.fn.extend({slimScroll:function(options){var defaults={width:'auto',height:'250px',size:'7px',color:'#000',position:'right',distance:'1px',start:'top',opacity:.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:'#333',railOpacity:.2,railDraggable:true,railClass:'slimScrollRail',barClass:'slimScrollBar',wrapperClass:'slimScrollDiv',allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:'7px',railBorderRadius:'7px'};var o=$.extend(defaults,options);this.each(function(){var isOverPanel,isOverBar,isDragg,queueHide,touchDif,barHeight,percentScroll,lastScroll,divS='<div></div>',minBarHeight=30,releaseScroll=false;var me=$(this);if(me.parent().hasClass(o.wrapperClass))
271{var offset=me.scrollTop();bar=me.siblings('.'+o.barClass);rail=me.siblings('.'+o.railClass);getBarHeight();if($.isPlainObject(options))
272{if('height'in options&&options.height=='auto'){me.parent().css('height','auto');me.css('height','auto');var height=me.parent().parent().height();me.parent().css('height',height);me.css('height',height);}else if('height'in options){var h=options.height;me.parent().css('height',h);me.css('height',h);}
273if('scrollTo'in options)
274{offset=parseInt(o.scrollTo);}
275else if('scrollBy'in options)
276{offset+=parseInt(o.scrollBy);}
vendor: 1,357 bytes, lines 277-284
277else if('destroy'in options)
278{bar.remove();rail.remove();me.unwrap();return;}
279scrollContent(offset,false,true);}
280return;}
281else if($.isPlainObject(options))
282{if('destroy'in options)
283{return;}}
284o.height=(o.height=='auto')?me.parent().height():o.height;var wrapper=$(divS).addClass(o.wrapperClass).css({position:'relative',overflow:'hidden',width:o.width,height:o.height});me.css({overflow:'hidden',width:o.width,height:o.height});var rail=$(divS).addClass(o.railClass).css({width:o.size,height:'100%',position:'absolute',top:0,display:(o.alwaysVisible&&o.railVisible)?'block':'none','border-radius':o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90});var bar=$(divS).addClass(o.barClass).css({background:o.color,width:o.size,position:'absolute',top:0,opacity:o.opacity,display:o.alwaysVisible?'block':'none','border-radius':o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99});var posCss=(o.position=='right')?{right:o.distance}:{left:o.distance};rail.css(posCss);bar.css(posCss);me.wrap(wrapper);me.parent().append(bar);me.parent().append(rail);if(o.railDraggable){bar.bind("mousedown",function(e){var $doc=$(document);isDragg=true;t=parseFloat(bar.css('top'));pageY=e.pageY;$doc.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY;bar.css('top',currTop);
284scrollContent(0,bar.position().top,false);});$doc.bind("mouseup.slimscroll",function(e){isDragg=false;hideBar();$doc.unbind('.slimscroll');});return false;}).bind("selectstart.slimscroll",function(e){e.stopPropagation();e.preventDefault();return false;});}
285rail.hover(function(){showBar();},function(){hideBar();});bar.hover(function(){isOverBar=true;},function(){isOverBar=false;});me.hover(function(){isOverPanel=true;showBar();hideBar();},function(){isOverPanel=false;hideBar();});me.bind('touchstart',function(e,b){if(e.originalEvent.touches.length)
286{touchDif=e.originalEvent.touches[0].pageY;}});me.bind('touchmove',function(e){if(!releaseScroll)
287{e.originalEvent.preventDefault();}
288if(e.originalEvent.touches.length)
289{var diff=(touchDif-e.originalEvent.touches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.touches[0].pageY;}});getBarHeight();if(o.start==='bottom')
290{bar.css({top:me.outerHeight()-bar.outerHeight()});scrollContent(0,true);}
291else if(o.start!=='top')
292{scrollContent($(o.start).position().top,null,true);if(!o.alwaysVisible){bar.hide();}}
293attachWheel(this);function _onWheel(e)
294{if(!isOverPanel){return;}
295var e=e||window.event;var delta=0;if(e.wheelDelta){delta=-e.wheelDelta/120;}
296if(e.detail){delta=e.detail/3;}
297var target=e.target||e.srcTarget||e.srcElement;if($(target).closest('.'+o.wrapperClass).is(me.parent())){scrollContent(delta,true);}
298if(e.preventDefault&&!releaseScroll){e.preventDefault();}
299if(!releaseScroll){e.returnValue=false;}}
300function scrollContent(y,isWheel,isJump)
301{releaseScroll=false;var delta=y;var maxTop=me.outerHeight()-bar.outerHeight();if(isWheel)
302{delta=parseInt(bar.css('top'))+y*parseInt(o.wheelStep)/100*bar.outerHeight();delta=Math.min(Math.max(delta,0),maxTop);delta=(y>0)?Math.ceil(delta):Math.floor(delta);bar.css({top:delta+'px'});}
303percentScroll=parseInt(bar.css('top'))/(me.outerHeight()-bar.outerHeight());delta=percentScroll*(me[0].scrollHeight-me.outerHeight());if(isJump)
304{delta=y;var offsetTop=delta/me[0].scrollHeight*me.outerHeight();offsetTop=Math.min(Math.max(offsetTop,0),maxTop);bar.css({top:offsetTop+'px'});}
305me.scrollTop(delta);me.trigger('slimscrolling',~~delta);showBar();hideBar();}
306function attachWheel(target)
307{if(window.addEventListener)
308{target.addEventListener('DOMMouseScroll',_onWheel,false);target.addEventListener('mousewheel',_onWheel,false);target.addEventListener('wheel',_onWheel,false);}
309else
310{document.attachEvent("onmousewheel",_onWheel)}}
311function getBarHeight()
312{var meHeight=me.outerHeight();var display;barHeight=Math.max((meHeight/me[0].scrollHeight)*meHeight,minBarHeight);display=barHeight==meHeight?'none':'block';bar.css({height:barHeight+'px',display:display});}
313function showBar()
314{getBarHeight();clearTimeout(queueHide);if(percentScroll==~~percentScroll)
315{releaseScroll=o.allowPageScroll;if(lastScroll!=percentScroll)
316{var msg=(~~percentScroll==0)?'top':'bottom';me.trigger('slimscroll',msg);}}
317else
318{releaseScroll=false;}
319lastScroll=percentScroll;if(barHeight>=me.outerHeight()){releaseScroll=true;return;}
320bar.stop(true,true).fadeIn('fast');if(o.railVisible){rail.stop(true,true).fadeIn('fast');}}
321function hideBar()
322{if(!o.alwaysVisible)
323{queueHide=setTimeout(function(){if(!(o.disableFadeOut&&isOverPanel)&&!isOverBar&&!isDragg)
324{bar.fadeOut('slow');rail.fadeOut('slow');}},1000);}}});return this;}});$.fn.extend({slimscroll:$.fn.slimScroll});})(jQuery);(function($){$.fn.slimscrollFirstUse=function(callback){var $elements=this;if(!$elements.length||typeof callback!='function'||$elements.data('slimscroll-first-use')){return $elements;}
325$elements.data('slimscroll-first-use',1);var events='mouseenter.slimscrollFirstUse mousedown.slimscrollFirstUse touchstart.slimscrollFirstUse pointerdown.slimscrollFirstUse wheel.slimscrollFirstUse focusin.slimscrollFirstUse';$elements.one(events,function(){$elements.off('.slimscrollFirstUse');setTimeout(function(){callback($elements);},0);});return $elements;};})(jQuery);
326var LOADMSCRIPT=0;function AddAdsV2(){var self=this;var addBlockVar=false;var preventAdShow=false;var admInject=0;var isGSearch=document.referrer&&document.referrer.indexOf("google.")>-1&&document.location.href.indexOf("gclid=")>-1;this.addBlock=false;this.advCodeAutoSize='\
327 <!-- radio_auto -->\
328 <ins class="adsbygoogle"\
329   style="display:block"\
330   data-ad-client="ca-pub-2615368671841163"\
331   data-ad-slot="ADSLOT"\
332   data-ad-format="auto"\
333   data-full-width-responsive="true"></ins>\
334 <script class="adsscript">\
335 (adsbygoogle = window.adsbygoogle || []).push({});\
336 </script>';this.advCodeFixSize='\
337 <!-- WXX_HXX -->\
338 <ins class="adsbygoogle"\
339   style="display:inline-block"\
340   data-ad-client="ca-pub-2615368671841163"\
341   data-ad-slot="ADSLOT"></ins>\
342 <script>\
343 (adsbygoogle = window.adsbygoogle || []).push({});\
344 </script>';this.adManagerCounter=0;this.checkAddBlockFire=false;this.showedAppBnr=false;this.placeholder='ukradiolive_com';this.insBnrV=0;this.ulock=false;this.activeViewTimer=null;this.listenActiveView={".bnr-300-250":"addRadioPage_RightCol300",".isMainPage ._horizontBannerWide":'addRadioPage_HorizontalWide',"#fields ._horizontBannerWide":'addRadioPage_HorizontalWide',".playlist ._horizontBannerWide":'addRadioPage_HorizontalWide',".isSubPage ._horizontBannerWide.top":'addRadioPage_HorizontalWide',".isSubPage ._horizontBannerWide.btm":'addRadioPage_HorizontalWide',".isSubPage ._horizontBanner:eq(0)":'addRadioPage_HorizontalV2',".isSubPage ._horizontBanner:eq(1)":'addRadioPage_HorizontalV2',};this.sites_google_ad_channel={};this.sites_google_ad_slot={};this.sites_admanager_slot={};this.leadCodes={};this.leadSticky={};this.vidvertCodes={};this.actLang=null;this.cookieM=CookieManagerI;this.preInitOK=false;this.initOk=false;this.firstLoad=null;var showBackupAds=document.location.host.indexOf('android.myonline')>-1||document.location.host.indexOf('radioplayer.')>-1;var disableAds=document.body.className.indexOf('disableAds')>-1;this.disableAdm=document.location.href.indexOf('http://')>-1;this.loadConfigIfNeed=function(){if(MyConfigI.get('adsns')&&Object.keys(this.sites_google_ad_slot).length===0){var cI=MyConfigI.get('adsns');this.sites_google_ad_slot=cI.sites_google_ad_slot;this.sites_google_ad_channel=cI.sites_google_ad_channel;if(this.disableAdm){this.sites_admanager_slot={};}else{this.sites_admanager_slot=cI.sites_admanager_slot||{};}
345this.leadCodes=cI.leadCodes;var now=new Date();var start=new Date(2026,8,23);var end=new Date(2026,9,1);if(LangI.actLang=="es"){start.setHours(start.getHours()-5);end.setHours(end.getHours()-5);}
346var isLaunchPeriod=now>=start&&now<end;if(LangI.actLang!="ro"&&isLaunchPeriod){self.leadSticky=false;}else{this.leadSticky=cI.leadSticky;}
347this.vidvertCodes=cI.vidvert;}}
348this.pushMainScript=function(){this.loadConfigIfNeed();if(!self.sites_google_ad_slot){disableAds=true;}else if(userHasSubscription()){disableAds=true;}else if(MyConfigI.get("locale")=="en_GB"&&document.location.href.indexOf('/bbc-')>0){disableAds=true;}
349if(typeof(ENABLE_PAGE_LEVEL_ADS)!="undefined"||showBackupAds||disableAds){if(showBackupAds){$('.adsbygoogle').parent().remove();}else if(disableAds){$("body").addClass("disableAds");}
350CookieManagerI.setDelayedData();return;}
351try{var src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";loadMainScript(src,1);if(typeof(ENABLE_PAGE_LEVEL_ADS)=="undefined"||ENABLE_PAGE_LEVEL_ADS!=true){if(typeof(MyCmpI)!="undefined"&&CookieManagerI.get('mycmp')!=null){var st=1;
351if(CookieManagerI.get('mycmp')>1){st=0;}
352(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=st;}
353var enb=true;if(window.innerWidth>1000&&(document.location.href==BASE_URL+"/"||rand(1,3)>2)){enb=false;GaTrackI.ga("enable_page_level_ads_0");}
354if(!isGSearch&&document.location.href.indexOf('planetradio-ie')==-1){(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client:"ca-pub-2615368671841163",enable_page_level_ads:true});ENABLE_PAGE_LEVEL_ADS=true;}}}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("Add preInit err: "+e.toString()+" Loaded: "+adsbygoogle.loaded+" NewV: "+ENABLE_PAGE_LEVEL_ADS);}}}
355function loadMainScript(src,type){if(!document.querySelectorAll("script[src='"+src+"']").length){var script=document.createElement("script");script.src=src;script.defer=1;script.onerror=function(){console.log('ON ERRROR!');self.addBlock=true;addBlockVar=true;self.checkAddBlock();}
356script.onload=function(){LOADMSCRIPT+=type;self.checkAddBlock();if(src.indexOf("adsbygoogle.js")>-1){if(window.adsbygoogle){var str=(window.adsbygoogle.push).toString().replace(/\n| /g,"");if(str=="function(){}"){GaTrackI.ga('adblock_ublock');self.ulock=true;}}else{GaTrackI.ga('adblock_ublock_2');}
357setTimeout(function(){if(typeof(window.adsbygoogle)=="undefined"||typeof(window.adsbygoogle.requestNonPersonalizedAds)!=="undefined"){self.checkAddBlock(true);console.log('checkAddBlock1');}},1000);}
358self.checkTCF(src);}
359document.head.appendChild(script);}
360if(self.leadSticky){var pF=window.innerWidth<1000?"m":"d";if(LangI.actLang==="hu"){var leadTest={"d":[{"id":"CF_591KRO7R","zone":"myo_hu_sticky_desktop"},{"id":"CF_D68MCBB8","zone":"myo_hu_sticky_desktop_30s"}],"m":[{"id":"CF_6YD1BNDA","zone":"myo_hu_sticky_mobile"},{"id":"CF_XDPE2XGT","zone":"myo_hu_sticky_mobile_30s"}],};var lsCode=leadTest[pF][rand(0,1)];}else{var lsCode=self.leadSticky[pF];}
361self.leadSticky=false;$('body').append('<script id="'+lsCode['id']+'" type="text/javascript"></script>');!function(){var e=document.getElementById(lsCode['id']),t=document.createElement("script");t.async=!0,t.dataset.zone=lsCode['zone'],t.onerror=function(){addBlockVar=true;},t.src="//cfusion-internet.com/client-v2-1-0.js",e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e)}();}}
362this.initialize=function(){if(disableAds){return;}
363this.initOk=true;this.actLang=LangI.actLang;this.firstLoad=$.now();this.placeholder=MyConfigI.get("defDomainFileName");self.addRadioPage_Top1();self.addArchivePage_Horizontal();self.addRadioPage_HorizontalWide();self.addAfterBreadcrumb();self.addArchiveBnr();self.resizeListener();self.bindScrollListener();setTimeout(function(){self.checkAllItemLoaded();},10000);self.logTopBannerSize();}
364this.addRadioPage_App=function(){self.addRadioPage_App_RUN();}
365this.addRadioPage_App_RUN=function(){if(this.showedAppBnr||disableAds){this.closeAppBanner();return;}
366this.showedAppBnr=true;AddAdsV2I.preInit();if(!this.actLang&&typeof(LangI)!="undefined"){this.initialize();}
367var info=this.getCenterBnrCode();var noHelper=info['noHelper'];var myframe=info['myframe'];setTimeout(function(){$('.js-appAdv').show();$('.cover-slider-cont').hide();if(self.showBackupAds||self.disableAds){RecommendI2=new Recommend();var appUrl=$('.androidli a').attr('href');if(!appUrl){appUrl='https://play.google.com/store/apps/details?id='+LangI.actLang+'.myonlineradio.onlineradioapplication';}
368RecommendI2.pushMobilBnr({'300_250':'300_250'},"300_250",'android',appUrl+"&referrer=start_with="+$('.html5Player').data('act-url'),$(".js-appAdv"));$('[itemprop="logo"]').remove();}else{self.setCloseAppBnr(myframe,noHelper);}
369setAddBlockMsg(1);self.checkActiveView();setTimeout(function(){self.checkAllItemLoaded();},4000);},self.hasAdblock()?2000:0);}
370this.getCenterBnrCode=function(){var tClass='';var noHelper=false;var showEfiMoti=(LangI.actLang=="hu"&&rand(1,3)==3?false:false);if(showEfiMoti){if(typeof(RecommendI)=="undefined"){RecommendI=new Recommend();}}
371var myframe=this.getADCode('desktop_300_250','desktop_300_250','300_250');if(this.sites_admanager_slot['desktop_300_250']){if(showEfiMoti){myframe=RecommendI.getSubscriptPromo('300x250');}else{myframe=this.getADMCode('desktop_300_250',true);myframe="<div class='div-adsns-ad "+tClass+"'>"+myframe+"</div>";}}
372if(window.innerWidth<=480||$('.is-app').length){if(window.innerWidth<360){myframe=this.getADCode('200_200_mobil','200_200_mobil','200_200');}else if(!this.sites_admanager_slot['mobil_300_250']||!this.sites_admanager_slot['mobil_250_250']){if(window.innerWidth>=360){if(rand(0,1)&&window.innerWidth<390){myframe=this.getADCode('mobil_250_250','mobil_250_250','250_250');}else{myframe=this.getADCode('mobil_300_250','mobil_300_250','300_250');}
373$('.js-appAdv').addClass('autoH');}}else if(this.sites_admanager_slot['mobil_250_250']){if(false&&window.innerWidth<390){myframe=this.getADMCode('mobil_250_250',true);}else{myframe=this.getADMCode('mobil_300_250',true);}
374$('.js-appAdv').addClass('autoH');}
375if(myframe.indexOf('3myad.com')>-1){tClass+=' div-adsns-ad-cov-dis';}
376if(LangI.actLang=="hu"&&showEfiMoti){myframe=RecommendI.getSubscriptPromo('300x250');}
377myframe="<div class='div-adsns-ad "+tClass+"'>"+myframe+"</div>";}else if(window.innerWidth>1359){if(this.sites_admanager_slot['desktop_300_250_double']){if(LangI.actLang=="hu"&&showEfiMoti){myframe=RecommendI.getSubscriptPromo('300x250');}else{myframe=this.getADMCode('desktop_300_250_double');}
378myframe+=this.getADMCode('desktop_300_250_double');}else{if(LangI.actLang=="hu"&&showEfiMoti){myframe=RecommendI.getSubscriptPromo('300x250');}else{myframe=this.getADCode('desktop_300_250_double_1','desktop_300_250_double_1','300_250');}
379myframe=this.getADCode('desktop_300_250_double_1','desktop_300_250_double_1','300_250');myframe+=this.getADCode('desktop_300_250_double_2','desktop_300_250_double_2','300_250');}}else if(window.innerWidth>1199){if(LangI.actLang=="hu"&&showEfiMoti){myframe=RecommendI.getSubscriptPromo('300x250');}else if(this.sites_admanager_slot['desktop_300_250_single']){myframe=this.getADMCode('desktop_300_250_single');}else{myframe=this.getADCode('desktop_300_250_single','desktop_300_250_single','300_250');}}
380return{'myframe':myframe,'noHelper':noHelper};}
381this.addArchiveBnr=function(){if($(".archive-bnrcol").length&&$(".archive-bnrcol .bnr:visible").length){var bnrW=$(".archive-bnrcol").width();if(bnrW!=$(".archive-bnrcol").data('width')){$(".archive-bnrcol").data('width',bnrW);if($(".archive-bnrcol").next().height()>=1360){$(".archive-bnrcol .bnr").eq(1).show();}else{$(".archive-bnrcol .bnr").eq(1).remove();}
382if($(".archive-bnrcol").next().height()<900){$('.fb-page-cont').remove();}
383$(".archive-bnrcol .bnr").html(this.getADCode('radio_other_300_600','2114421482'));}}}
384this.addRadioPage_HorizontalV2=function(){if(!$('.isSubPage').length){return;}
385var $bannerPlaces=$("._horizontBanner[data-aview='1']");
385if(!$bannerPlaces.length){return;}
386$bannerPlaces.each(function(i,elem){var $bannerPlace=$(elem);if($bannerPlace.css('display')=='none'){return;}
387self.addRadioPage_HorizontalEntity($bannerPlace);});}
388this.addRadioPage_HorizontalEntity=function($bannerPlace){if(!$bannerPlace.length){return;}
389var bannerWidth=$bannerPlace.width();if(bannerWidth==0||$bannerPlace.data('width')==bannerWidth){return;}
390$bannerPlace.data('width',bannerWidth);var bName='radiopage_after_player';if($bannerPlace.hasClass('bottomHorizontalBanner')){bName='radiopage_after_radiolist';}
391var orient='horizontal';if(window.innerWidth<=480||$('.is-app').length){orient=false;}
392var myframe='';if($('.mRadioPlayer audio').length){var device=bannerWidth<720?'m':'d';if(bName=='radiopage_after_radiolist'||device!='m'){return;}
393bName+='_2';myframe=this.getADCode(bName,'radiopage_after_player',false,orient);if(LangI.actLang=='hu'){GaTrackI.ga('r_after_player_0_'+device);}}else{myframe=this.getADCode('otherpage_after_filter','3698802120','300_250');}
394$bannerPlace.html(myframe);}
395this.addArchivePage_Horizontal=function(){if(!$('.archive-filter').length||window.innerWidth>767){return;}
396if(!$('._horizontBanner').length){$('.archive-filter, .js-songListC, .archive-cont').after('<div class="clear"></div><div class="_horizontBanner archive"></div>');}
397if($('._horizontBanner').data('width')!=$('._horizontBanner').width()&&$('._horizontBanner[data-aview="1"]').length){$('._horizontBanner').data('width',$('._horizontBanner').width());$("._horizontBanner").eq(0).html(this.getADCode('archivep_after_filter','5981310684'));$("._horizontBanner").eq(1).html(this.getADCode('archivep_after_pager','2107969699'));}}
398this.addRadioPage_HorizontalWide=function(refresh){if(!$('._horizontBannerWide').length){return;}
399var bnrW=$("._horizontBannerWide").width();if($("._horizontBannerWide").data('width')!=bnrW||refresh){$("._horizontBannerWide").data('width',bnrW);if($('.isMainPage, .playlist, #fields').length){if($("._horizontBannerWide[data-aview='1']").length){$("._horizontBannerWide[data-aview='1']").html(this.getADCode('radio_mainpage_after_list','1372718287'));}}else if($('.schedule-cont').length){if($("._horizontBannerWide.top[data-aview='1']").length){$("._horizontBannerWide.top[data-aview='1']").html(this.getADCode('radio_mainpage_after_list','7645321115',false,'horizontal'));}
400if($("._horizontBannerWide.btm[data-aview='1']").length){$("._horizontBannerWide.btm[data-aview='1']").html(this.getADCode('radio_mainpage_after_list','7045435756',false,'horizontal'));}}}}
401this.addRadioPage_Top1=function(bckpADCode){var $banner=$('._bannerTop1').eq(0);if(!$banner.length){return;}
402if(window.innerWidth<768&&!bckpADCode){return;}
403var bannerWidth=$banner.width();if($banner.data('width')==bannerWidth&&!bckpADCode){return;}
404$banner.data('width',bannerWidth);if($('.isMainPage').length||$banner.height()<100){$banner.html(this.getADCode('radio_top_banner_adaptive_2','radio_top_banner_adaptive_2','auto','horizontal'));}else{if(!bckpADCode&&this.sites_admanager_slot['radio_top_banner_adaptive']&&window.innerWidth>=1360){var code=this.getADMCode('radio_top_banner_adaptive',true);$banner.html(code);}else{$banner.html(this.getADCode('radio_top_banner_adaptive','radio_top_banner_adaptive',false,false,false,false,bckpADCode));if(bckpADCode){GaTrackI.ga('admmanager_runbackup');}}}}
405this.addRadioPage_RightCol300=function(refresh){var $banner=$('.bnr-300-250');if(!$banner.length||$('.radiosListLink').length<40||!$banner.is(':visible')){return;}
406var bnrW=$banner.width();if(bnrW!=$banner.data('width')||refresh){$banner.data('width',bnrW);$banner.filter("[data-aview='1']").html(this.getADCode('rigth_col_brn','rigth_col_brn'));}}
407this.addAfterBreadcrumb=function(){if(NoSocial||$('.radiosList audio').length||$('.intro').hasClass('fixed')){$('.intro').addClass("fixed");return;}
408var wW=window.innerWidth;if(wW>767){return;}
409$('.intro').hide();if($('.mainpagelist-top-bnr').length&&$('.mainpagelist-top-bnr').width()==$('.mainpagelist-top-bnr').data('width')){return;}
410var bnrCode='';if($('.isMainPage').length){if(!$('.mainpagelist-top-bnr').length){$('#Grid').before('<div class="mainpagelist-top-bnr"></div>');}
411bnrCode=this.getADCode('radio_mainpage_beforelist','5802917881',false,'horizontal',true);}else{if($(".mainpagelist-top-bnr").length){bnrCode=this.getADCode('after_breadcrumb','2040397373',false,'horizontal',true);}}
412if(bnrCode){$(".mainpagelist-top-bnr").html(bnrCode);$('.mainpagelist-top-bnr').data('width',$('.mainpagelist-top-bnr').width());}}
413this.checkAllItemLoaded=function(){console.log('checkAllItemLoaded');if(preventAdShow){self.closeAppBanner();return;}
414var needHelp=false;$('.adsbygoogle').each(function(i,elem){var $elem=$(elem);if(!$elem.hasClass('adsbygoogle-noablate')){if(!$elem.attr('data-channel')){GaTrackI.ga('detectBckp_6');console.log('detectBckp','FAIL');}
415if(addBlockVar){self.initAffiRecommend();
415setAddBlockMsg();}else if(!$elem.html()&&!needHelp){needHelp=true;}else if($elem.parent().is(":visible")&&($elem.attr('data-ad-status')=="unfilled"||$elem.height()==0||!$elem.is(":visible"))){self.loadInsideBanner(elem);}else if($elem.height()>$elem.parent().height()){$elem.parent().css('height','auto');}
416if($elem.parent().hasClass('_bannerTop1')&&$elem.height()>90){$('.box0 > .menu_wrapper').css('top',120+($elem.height()-90));$('.box0 > .social_wrapper').css('top',490+($elem.height()-90));}}});if(needHelp){try{(adsbygoogle=window.adsbygoogle||[]).push({});GaTrackI.ga("adsbygoogle_extrapush_1");}catch(e){GaTrackI.ga("adsbygoogle_extrapush_-1");}}}
417this.bindScrollListener=function(){$(window).off('scroll.addAdsActiveView').on('scroll.addAdsActiveView',function(){clearTimeout(self.activeViewTimer);self.activeViewTimer=setTimeout(function(){self.checkActiveView();},100);});if(window.innerWidth>480){self.checkActiveView(true);}}
418this.checkActiveView=function(skipCheckAll){var wH=window.innerHeight;var checkNeed=false;var noNeedScroll=true;var mobile=isMobile();var limitPadding=mobile?0:100;if(mobile&&$('.schedule-cont, .playlist, .html5Player').length){limitPadding=-100;}
419var bLine=wH+limitPadding;for(var selector in this.listenActiveView){var $elem=$(selector+"[data-aview!='1']");if(!$elem.length){continue;}
420if($elem[0].getBoundingClientRect().top<bLine){$elem.attr('data-aview','1');self[this.listenActiveView[selector]](true);checkNeed=true;}else{noNeedScroll=false;}}
421if(checkNeed&&!skipCheckAll){setTimeout(function(){self.checkAllItemLoaded();},2000);}
422if(noNeedScroll){$(window).off('scroll.addAdsActiveView');}}
423this.resizeListener=function(){var timeSrc=null;var timeSrc4=null;$(window).resize(function(e){clearTimeout(timeSrc);timeSrc=setTimeout(function(){self.addRadioPage_Top1();self.addRadioPage_HorizontalWide();self.addAfterBreadcrumb();self.addRadioPage_HorizontalV2();self.addArchivePage_Horizontal();self.addRadioPage_RightCol300();self.addArchiveBnr();self.checkCloseAppBnr();clearTimeout(timeSrc4);timeSrc4=setTimeout(function(){self.checkAllItemLoaded();},2000);},1000);});}
424this.getADMCode=function(name,noBorder,detectBckp){this.loadConfigIfNeed();var repObj={'radio_top_banner_adaptive_2':'radio_top_banner_adaptive','200_200_mobil':'mobil_250_250','rigth_col_brn':'desktop_300_250','radiopage_after_player':'radio_after_player_banner_adaptive',};if(repObj[name]){name=repObj[name];}
425if(!this.sites_admanager_slot||!this.sites_admanager_slot[name]){console.log('NO ADM CODE! - '+name,detectBckp);var check=['200_200','mobil_300_250','desktop_300_250','desktop_300_250_single','radio_top_banner_adaptive','desktop_300_250_double'];if(check.indexOf(name)>-1){if(!this.disableAdm){ConsoleDebuggerI.pushMsg("NO ADM CODE! "+name+" Isbckp: "+detectBckp+" #important");}
426GaTrackI.ga('NO_ADM_CODE_ERR_'+name);}else{GaTrackI.ga('NO_ADM_CODE_'+name);}
427return'';}
428if(self.leadCodes&&addBlockVar){return this.getLeadCode(name);}
429var slots='';if(ADMSlots['div-gpt-ad-'+name]){var actId=name+'_'+$.now();self.sites_admanager_slot[actId]=self.sites_admanager_slot[name];name=actId;}else{ADMSlots['div-gpt-ad-'+name]=true;}
430if(typeof(MyCmpI)!="undefined"&&CookieManagerI.get('mycmp')!=null){var st=1;if(CookieManagerI.get('mycmp')>1){st=0;}
431slots+="googletag.pubads().setRequestNonPersonalizedAds("+st+");";}
432var data=self.sites_admanager_slot[name];slots+="ADMSlots['div-gpt-ad-"+name+"'] = googletag.defineSlot('/21775032471/"+data['id']+"', "+data['sizes']+", 'div-gpt-ad-"+name+"').addService(googletag.pubads());\ ";var headData='';var src="https://securepubads.g.doubleclick.net/tag/js/gpt.js";if(!document.querySelectorAll("script[src='"+src+"']").length){var headData="<script>window.googletag = window.googletag || {cmd: []};</script>";loadMainScript(src,2);}
433admInject++;headData+="\
434   <script>\
435   if(typeof(googletag) != 'undefined' && typeof(googletag.cmd) == 'undefined'){ window.googletag.cmd = []; }\
436   if(typeof(googletag.cmd) != 'undefined'){\
437    googletag.cmd.push(function () {\
438     "+slots+"\
439     googletag.pubads().enableSingleRequest();\
440     googletag.pubads().collapseEmptyDivs(true, true);\
441     googletag.pubads().addEventListener('slotRenderEnded', function(event) {\
442      AddAdsV2I.checkAdMEvent(event, event.slot.getSlotElementId()"+(detectBckp?', true':'')+");\
443     });\
444     googletag.enableServices();\
445    });\
446   }else{\
447    console.log('NO CMD HEAD!!!');GaTrackI.ga('NO_CMD_HEAD');\
448   }\
449   </script>\
450  ";$('head').append(headData);var adHTML="\
451  <div class='"+(noBorder?"div-gpt-ad-v2":"div-gpt-ad")+"' data-slot-id='"+name+"'><div id='div-gpt-ad-"+name+"'>\
452   <script>if(typeof(googletag.cmd) != 'undefined'){googletag.cmd.push(function () {googletag.display('div-gpt-ad-"+name+"');});}else{ console.log('NO CMD!!!');GaTrackI.ga('NO_CMD');}</script>\
453  </div></div>";return adHTML;}
454this.getADCode=function(name,google_ad_channel,google_ad_slot,adFormat,notFullWidthResponsive,pub_code,bckpADCode){if(self.leadCodes&&addBlockVar){return this.getLeadCode(name);}
455this.loadConfigIfNeed();if(!this.sites_google_ad_slot){return'';}
456if(!google_ad_slot){google_ad_slot='auto';}
457if(!this.sites_google_ad_slot||!this.sites_google_ad_slot[google_ad_slot]){console.log('NO ADSNS CODE! - '+google_ad_slot);ConsoleDebuggerI.pushMsg("NO ADSNS CODE! "+google_ad_slot+" #important");}
458this.pushMainScript();if(google_ad_slot=="auto"){var bnrHTML=this.advCodeAutoSize;bnrHTML=bnrHTML.replace('data-ad-slot="ADSLOT"','data-ad-slot="'+this.sites_google_ad_slot['auto']+'"').replace('adsbygoogle"','adsbygoogle '+(!bckpADCode?'" data-channel="'+name+'"':''));}else{var sizes=google_ad_slot.split("_");var bnrHTML=this.advCodeFixSize;var slot=this.sites_google_ad_slot[google_ad_slot];bnrHTML=bnrHTML.replace('data-ad-slot="ADSLOT"','data-ad-slot="'+slot+'"').replace(/WXX/g,sizes[0]).replace(/HXX/g,sizes[1]).replace('adsbygoogle"','adsbygoogle ads_'+sizes[0]+'_'+sizes[1]+(!bckpADCode?'" data-channel="'+name+'"':''));}
459if(google_ad_channel){if(this.sites_google_ad_channel[google_ad_channel]){google_ad_channel=this.sites_google_ad_channel[name];}
460bnrHTML=bnrHTML.replace('(adsbygoogle = window.adsbygoogle || []).push({});','(adsbygoogle = window.adsbygoogle || []).push({params: { google_ad_channel: "'+google_ad_channel+'"}});');}
461if(name){bnrHTML=bnrHTML.replace('<!-- radio_auto -->','<!-- '+name+' -->');}
462if(adFormat){bnrHTML=bnrHTML.replace('data-ad-format="auto"','data-ad-format="'+adFormat+'"');}
463if(notFullWidthResponsive){bnrHTML=bnrHTML.replace('data-full-width-responsive="true"','data-full-width-responsive="false"');}
464if(pub_code){bnrHTML=bnrHTML.replace('ca-pub-2615368671841163',pub_code);}
465return bnrHTML;}
466this.getLeadCode=function(name){var w=300;var h=250;if(name.indexOf('x')>-1){var l=self.leadCodes[name];w='100%';h=name.split('x')[1];}
466else{var l=self.leadCodes[1];if(rand(0,1)){l=self.leadCodes[2];if(LangI.actLang=="hu"&&rand(1,4)==4){if(typeof(RecommendI)=="undefined"&&typeof(Recommend)!="undefined"){RecommendI=new Recommend();}
467return RecommendI.getSubscriptPromo("300x250");}}}
468return'<iframe class="js-lgenFrame" src="'+l+'" width="'+w+'" height="'+h+'" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" scrolling="no" referrerpolicy="origin-when-cross-origin" style="margin-top: 0px;" onload="AddAdsV2I.logLeadgenLoad(\''+name+'\')"></iframe>';}
469this.getVidvertCode=function(type){this.loadConfigIfNeed();return self.vidvertCodes[type];}
470this.logLeadgenLoad=function(name){GaTrackI.ga("leadgen_"+name);$.ajax({'url':BASE_URL+'/view.gif/'+btoa(name+(self.ulock?'/ublock':''))});}
471this.checkAddBlock=function(noOnlyCheck){this.trackAdblockDisable();if(this.checkAddBlockFire&&!noOnlyCheck){return;}
472this.checkAddBlockFire=true;if(noOnlyCheck){if(addBlockVar){return;}
473this.addBlock=true;addBlockVar=true;}
474if(addBlockVar){console.log('PLEASE DISABLE ADBLOCK! THANK YOU!');setTimeout(function(){GaTrackI.ga('adblock_1');},30000);setAddBlockMsg();$('body').on('click','.pls-dis-blck',function(e){e.preventDefault();GaTrackI.ga('send','event','adblock_segitsegQ');var link=$(this);setTimeout(function(){document.location.href=link.attr('href');},500);});self.cookieM.set('adblock','1');if(disableAds||new Date().getDate()==6){self.cookieM.set('adblock','8');preventAdShow=true;self.addBlock=false;addBlockVar=false;}}else{setTimeout(function(){if(typeof(ConsoleDebuggerI)!="undefined"&&ConsoleDebuggerI.addBlock){GaTrackI.ga('adblock_2');}else{GaTrackI.ga('adblock_0');}},30000);UtilsI.initFocusListener(function(hidden){setTimeout(function(){self.initFocusListenerR(hidden);},1000);});}
475return addBlockVar;}
476setAddBlockMsg=function(backupbnr){if(addBlockVar==false){return;}
477$('.js-appAdv .ad-shild,.js-appAdv .div-adsns-ad').remove();var myFrame='<a '+(backupbnr?'style="width: 300px; margin: 0 auto; text-align: justify;"':'')+' target="_blank" href="/'+LangI.getText('adblock-bnr-msg-link')+'" class="pls-dis-blck">'+LangI.getText('adblock-bnr-msg')+'</a>';if(backupbnr){if(self.leadCodes){var info=self.getCenterBnrCode();myFrame=info['myframe'];}else if(rand(0,1)){self.initAffiRecommend();myFrame=RecommendI.getBackupAffiliate('300_250');}
478self.setCloseAppBnr(myFrame);}else{$('.adsbygoogle, .insBnrV').each(function(i,elem){pushBackupAdblockBnr(elem,myFrame);});$('.adsscript').each(function(i,elem){if(!$(elem).siblings('ins').length){pushBackupAdblockBnr(elem,myFrame);}});$('.div-gpt-ad, .div-gpt-ad-v2').each(function(i,elem){pushBackupAdblockBnr(elem,myFrame);});if($('.js-appAdv').html()=='<div class="helper"></div>'||$('.song-cover-cont .player-extras').length){setAddBlockMsg(true);}}}
479function pushBackupAdblockBnr(elem,myFrame){var $parent=$(elem).parent();if($parent.hasClass('topHorizontalBanner')&&$parent.css('display')=="none"&&addBlockVar){$parent.removeClass('topHorizontalBanner');}
480if($parent.length&&$parent[0].tagName!="BODY"&&$parent[0].tagName!="HTML"){if(typeof(RecommendI)=="undefined"&&typeof(Recommend)!="undefined"){RecommendI=new Recommend();}
481var sizeIndex='';if($parent.hasClass('js-appAdv')){$parent.find('.helper, .mobileAffiliateAdblock').remove();$('.js-appAdv').show();$('.cover-slider-cont, .player-extras').hide();if($parent.find('.js-closeAppBnr').length){myFrame=$parent.find('.js-closeAppBnr')[0].outerHTML+myFrame;}
482if(self.leadCodes){var info=self.getCenterBnrCode();myFrame+=info['myframe'];if(window.innerWidth>768){$parent.css("height","auto").html(myFrame);return;}}
483sizeIndex='300_250';}
484if(LangI.actLang=="hu"&&rand(0,4)){if($(elem).parent().hasClass('_bannerTop1')||$(elem).parent().hasClass('topHorizontalBanner')){if(false&&rand(0,2)){if($(elem).parent().hasClass('topHorizontalBanner')){myFrame=self.getLeadCode("880x150");}else{myFrame=self.getLeadCode("970x250");}}else{myFrame=RecommendI.getSubscriptPromo("600x300");}}else if($(elem).parent().hasClass('bnr-300-250')){myFrame=RecommendI.getSubscriptPromo("300x600");}else{myFrame=RecommendI.getSubscriptPromo("300x250");}
485$parent.css("height","auto").html(myFrame);}else if(rand(0,1)||!RecommendI.showBackupAffiliate($parent,sizeIndex)){$parent.css("height","auto").html(myFrame);}}}
486this.trackAdblockDisable=function(){$('body').on('click','.fc-button-whitelist',function(){GaTrackI.ga('adsn_whitelist_ok');});}
487this.loadInsideBanner=function(elem,extraClass){var channel=$(elem).attr('data-channel');if(channel&&this.sites_google_ad_channel[channel]){$(elem).replaceWith(this.getADMCode(channel,false,true));return;}
488var $parent=$(elem).parent();if(!$(elem).hasClass('div-gpt-ad')&&!$(elem).hasClass('div-gpt-ad-v2')&&!$(elem).parent().hasClass('js-appAdv')){$parent.attr('style','');}
489var aH=$parent.height();var aW=$parent.width();var w=300;var h=250;if(aH>=90){w=$parent.width();h=$parent.height();}else if(aW>700){w=aW;if($('.flags-cont.expand').length){h=250;}else{h=90;}}else{$parent.css('height','auto');}
490var urlP=BASE_URL+'/public/reklamok/adsense/'+this.placeholder+'/insideV2.html';self.insBnrV++;if(!extraClass){extraClass='';}
491extraClass+=' insBnrV insBnrV'+self.insBnrV;var myframe='<iframe class="'+extraClass+'" loading="lazy" framespacing="0" border="0" scrolling="no" src="'+urlP+'" allowfullscreen="" width="'+w+'" height="'+h+'" frameborder="0"></iframe>';if($(elem).parent().hasClass('js-appAdv')){if(rand(0,1)){self.initAffiRecommend();myframe=RecommendI.getBackupAffiliate('300_250');}
492$('.js-appAdv .insBnrV').remove();$(elem).parent().append(myframe);$(elem).remove();}else{$(elem).parent().html(myframe);}
493if($(elem).parent().height()<50){$(elem).parent().css("height",'auto');}
494GaTrackI.ga("LoadInsideBanner_"+w+"x"+h);}
495this.setCloseAppBnr=function(myframe,noHelper){try{$('.fa-sun-regular').addClass('disappear').removeClass('hidden');$('.cover-btn').removeClass('disappear');var cHtml='';var helperDiv=addBlockVar||noHelper?'':'<div class="helper"></div>';$('.js-closeAppBnr').remove();
495if(window.innerWidth<=767){cHtml+='<div class="js-closeAppBnr fa-close-after">'+(LangI.getText('show-album-cover-short'))+'</div>';$('.mbreadcrumb ol').after(cHtml);$('.mbreadcrumb').addClass('trimmed-bread');myframe=helperDiv+myframe;}else{$('.mbreadcrumb').removeClass('trimmed-bread');cHtml+='<div class="js-closeAppBnr fa-close-after">'+(LangI.getText('show-album-cover'))+'</div>';myframe=cHtml+myframe;}
496$('.js-appAdv').html(myframe);if(addBlockVar){$('.js-appAdv').show();$('.player-extras, .cover-slider-cont').hide();if($('.js-appAdv').css('display')=="none"&&$('.cover-slider-cont').css("display")=="block"){$('.cover-slider-cont').css({'max-width':'inherit','height':'300px'}).html(myframe);}}
497if(!$('.song-list-cont').length||$('.song-list-cont').data('dis-lyr')){$('.cover-txt-extra').remove();}
498$('.js-closeAppBnr').delay(1000).queue(function(next){$(this).addClass("anim");next();});setTimeout(function(){if($(".js-appAdv ins").css("display")=="block"){var insH=$(".js-appAdv ins").height();var bh=(250-insH)/2;if(bh<0){bh=0;}
499$('.js-appAdv').css({'height':'auto','margin-bottom':bh+'px','margin-top':bh+'px',});GaTrackI.ga('ads-repair_'+$('.js-appAdv ins').height());}},500);}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("this.cookieM err: "+this.cookieM+' - '+CookieManagerI+" - "+this.initOk+' - '+e.toString());}}
500$('body').on("click",".js-closeAppBnr",function(){if(addBlockVar){self.showAdblockMsg('adblock_try_sub_1_2');}else{self.closeAppBanner();var num=parseInt(CookieManagerI.get("CloseAppBnr_num")||0);CookieManagerI.set("CloseAppBnr_num",num+1,"30","/");GaTrackI.ga('CloseAppBnr_close');}});if(this.gAdsPromo()){setTimeout(function(){AddAdsV2I.closeAppBanner();},5000);}}
501this.gAdsPromo=function(){if(isGSearch&&!CookieManagerI.get("CloseAppBnr_num")&&CookieManagerI.get("gaadsh")<3&&!CookieManagerI.get("gaadsh_daily")){var num=parseInt(CookieManagerI.get("gaadsh")||0);CookieManagerI.set("gaadsh",num+1,"30","/");CookieManagerI.set("gaadsh_daily","1",null,"/");}
502if(CookieManagerI.get("gaadsh_daily")&&$('.song-list-cont').length){GaTrackI.ga('gadspromo_1');return true;}else{if(isGSearch){GaTrackI.ga('gadspromo_0');}
503return false;}}
504this.closeAppBanner=function(){$('.cover-btn').addClass('disappear');$('.fa-sun-regular').removeClass('hidden').removeClass('disappear');$('.js-closeAppBnr').addClass('disappear');if($('.song-list-cont').length){SongListI[$('.song-list-cont').data('url')].loadCoverImg();}
505$('.js-appAdv').hide().addClass('js-app-close').html('<div class="js-closeAppBnr"></div>');if($('.cover-slider-cont').length){$('.cover-slider-cont').show();LoadScriptIfNeedI.loadAlbumCoverSliderALyrics(function(){$('.js-appAdv').html('').hide().removeClass('js-app-close');if(typeof(LoveHateI)!=="undefined"){LoveHateI.buildButtons();}});}}
506this.checkCloseAppBnr=function(){if(window.innerWidth<=767){if($('.js-appAdv .js-closeAppBnr').length){$('.js-closeAppBnr').remove();this.showedAppBnr=false;this.addRadioPage_App_RUN();}}else{if($('.mbreadcrumb .js-closeAppBnr').length){$('.js-closeAppBnr').remove();this.showedAppBnr=false;this.addRadioPage_App_RUN();}}}
507this.checkAdMEvent=function(event,slotID,detectBckp){if(preventAdShow){return;}
508var $cont=$("#"+slotID);if(event.isEmpty){this.loadOtherIfEmpty(slotID,detectBckp);GaTrackI.ga('admngr_9',this.formatSlotId(slotID));if(detectBckp){console.log('detectBckp','FAIL '+slotID,event,detectBckp);GaTrackI.ga('detectBckp_9',this.formatSlotId(slotID));}}else{GaTrackI.ga('admngr','1',slotID);if(detectBckp){console.log('detectBckp','OK',slotID);GaTrackI.ga('detectBckp_1',this.formatSlotId(slotID));}
509$('.div-gpt-ad').css('margin','0');self.checkAdMSize();}
510$cont.parents('._bannerTop1, ._horizontBanner').addClass('adm-autoh');$cont.attr('lst-rfs',$.now()+rand(1000,5000));var sb=$('#'+slotID).siblings('#preloader');if(sb.length){sb.remove();}}
511this.loadOtherIfEmpty=function(slotID,isBckp){var newBnrC='';var name=slotID.replace('div-gpt-ad-','');var slot=this.parseSizeFromString(name);if(!isBckp&&slotID.indexOf('radio_top_banner_adaptive')>-1){this.addRadioPage_Top1(true);}else if(!isBckp&&name&&slot&&this.sites_google_ad_channel[name]){newBnrC=this.getADCode(name,name,slot,fal
511se,false,false,true);var pp=$('#'+slotID).parent();pp.after(newBnrC);pp.remove();}else{GaTrackI.ga('admngr_7',slotID);self.loadInsideBanner($("#"+slotID).parent(),'admngr');}}
512this.formatSlotId=function(slotID){return slotID.replace(/\_\d*$/,'');}
513this.checkAdMSize=function(){var aW=$(".js-appAdv .div-gpt-ad div").width();if($(".js-appAdv .div-gpt-ad iframe").height()>=250||$(".js-appAdv .div-gpt-ad iframe").width()>=250){$('.js-appAdv').css({'height':'auto',});if(aW>300){$('.js-appAdv .div-gpt-ad').css({'padding-left':'0','padding-right':'0',});}
514$('.js-appAdv .div-gpt-ad').addClass('n250_250');$('.js-appAdv .helper').remove();}}
515this.initFocusListenerR=function(hidden){if(!$("[id*='div-gpt-ad-']").length||document[hidden]){return;}
516var elems=[];$("[id*='div-gpt-ad-']").each(function(i,elem){elems.push([elem,parseInt($(elem).attr('lst-rfs'))]);});elems.sort(function(a,b){return a[1]-b[1];});var time=$.now();var refreshRun=false;for(i in elems){var elem=elems[i][0];var lstRfs=parseInt($(elem).attr('lst-rfs'));var iID=$(elem).attr("id");var minRefT=18000;if(time-minRefT>lstRfs&&self.checkIsVisible($(elem))){if(googletag&&!refreshRun){var p=$(elem).parent();p.append('<div id="preloader"><div id="loader"></div></div>');GaTrackI.ga("desktop_refresh_height_"+Math.round(p.height()));p.attr('style','height:'+p.height()+"px;");setTimeout(function(){p.attr('style','');},3000);googletag.pubads().refresh([ADMSlots[iID]]);$(elem).attr('lst-rfs',time+rand(10,20));GaTrackI.ga('admngr_2');refreshRun=true;}else{$(elem).attr('lst-rfs',time+rand(1,10));}}else{GaTrackI.ga('focuschange_'+(parseInt((time-lstRfs)/60000)),self.checkIsVisible($(elem))?'visible':'hidden');}};}
517this.checkIsVisible=function($elem){if(!$elem)
518return false;if(!$elem.length){return false;}
519var wT=$(window).scrollTop();var wB=wT+$(window).innerHeight();var eT=$elem.offset().top;var eB=eT+$elem.height();if(wT<eB&&wB>eT){return true;}
520return false;}
521this.logTopBannerSize=function(){setTimeout(function(){if($('._bannerTop1:visible').length&&!self.hasAdblock()){var cont=$('._bannerTop1 .adsbygoogle');var btype=1;if(!cont.length){cont=$('._bannerTop1.adm-autoh > div');btype=2;}
522if(cont.length){GaTrackI.ga('bnr_size_'+btype+'_'+Math.round(cont.width())+'x'+Math.round(cont.height())+"_"+Math.round(window.innerWidth)+'x');}}},20000);}
523this.initAffiRecommend=function($elem,index){if(RecommendI==null){UserViewRadiosI=new UserViewRadios();RecommendI=new Recommend();}}
524this.getSelfPromo=function(type){var noHelper=false;var tmpCode='';if(typeof(type)!="undefined"&&type=="nation"){tmpCode='<iframe src="/public/img/adblock/myonlineradio_hu/nation/index.html" width="320" height="250" allowfullscreen="" frameborder="0"></iframe>';noHelper=true;}else{RecommendI2=new Recommend();if(!RecommendI2.isIOS()){tmpCode=RecommendI2.pushMobilBnr({'300_250':'300_250'},"300_250",'android',"https://play.google.com/store/apps/details?id=hu.myonlineradio.onlineradioapplication&referrer=start_with="+$('.html5Player').data('act-url'));GaTrackI.ga('self_promo_app_android');}else{tmpCode=RecommendI2.pushMobilBnr({'300_250':'300_250'},"300_250",'ios',"https://play.google.com/store/apps/details?id=hu.myonlineradio.onlineradioapplication&referrer=start_with="+$('.html5Player').data('act-url'));GaTrackI.ga('self_promo_app_ios');}}
525return{'noHelper':noHelper,'tmpCode':tmpCode};}
526this.showAdblockMsg=function(sourceEvent){GaTrackI.ga(sourceEvent+'_show');var DB=new DialogBox();var extraMsg="";if(MyConfigI.get('subModeLvL')==4){extraMsg+='<br><br>'+LangI.getText('not-want-dis-adblock')+'<a class="more_radio_button sub-red js-trySubStepAdblock"><div class="i_left anim"></div><div class="i_center">'+LangI.getText("try-btn")+'</div><div class="i_right flip anim"></div></a>';}
527DB.openPopUp(LangI.getText("recorder-addblock-noti")+extraMsg,LangI.getText("shazam-attention"),true);$(".js-trySubStepAdblock").click(function(){SubscriptionI.openMotiLayer();GaTrackI.ga(sourceEvent+'_click');});}
528this.hasAdblock=function(){return addBlockVar;}
529function startIntegrityCheck(){var mscript=AddAdsV2I.hasAdblock.toString().replace(/\n|\r| |\t/g,"");if(mscript!='function(){returnaddBlockVar;}'){console.log("startIntegrityCheck FAIL");addBlockVar=true;
529setAddBlockMsg();}}
530this.parseSizeFromString=function(txt){var tmp=txt.match(/_\d*_\d*/);if(tmp==null){return false;}
531return tmp[0].substring(1);}
532this.preInit=function(){if(this.preInitOK){return;}
533this.preInitOK=true;if(isMobile()){setTimeout(function(){AddAdsV2I.pushMainScript();},$('.isMainPage').length?5000:6000);}else{AddAdsV2I.pushMainScript();setTimeout(function(){},$('.isMainPage').length?5000:6000);}
534AddAdsV2I.initialize();setTimeout(function(){startIntegrityCheck();},100);}
535this.checkTCF=function(src){if(src.indexOf("adsbygoogle")==-1||MyConfigI.get("gdprV")==1){return;}
536var hasStoreOnDeviceConsent=true;if(typeof window.__tcfapi==='function'){GaTrackI.ga('tcfapi_1');__tcfapi('addEventListener',2,function(tcData,success){GaTrackI.ga('tcfapi_2');if(tcData.eventStatus=='useractioncomplete'||tcData.eventStatus=='tcloaded'){GaTrackI.ga('tcfapi_3');hasStoreOnDeviceConsent=tcData.purpose.consents[1]||false;if(hasStoreOnDeviceConsent){CookieManagerI.setDelayedData();}
537var mycmp=0;var total=JSON.stringify(tcData.purpose.consents);if(total.indexOf('true')>-1&&total.indexOf('false')==-1){(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0;(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0;mycmp=2;}else if(total.indexOf('false')>-1&&total.indexOf('true')==-1){mycmp=0;}else if(hasStoreOnDeviceConsent){var hasGoogleAdvertisingProductsConsent=tcData.vendor.consents[755]||false;console.log('hasGoogleAdvertisingProductsConsent',hasGoogleAdvertisingProductsConsent);if(hasGoogleAdvertisingProductsConsent){var hasPersonalizedProfileConsent=tcData.purpose.consents[3]||false;var hasPersonalizedAdsConsent=tcData.purpose.consents[4]||false;if(hasPersonalizedAdsConsent&&hasPersonalizedProfileConsent){(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0;mycmp=2;}else{(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;mycmp=1;}
538(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0;}}
539if(CookieManagerI.get('mycmp')==null){AddAdsV2I.preInit();}
540var gaIndex='mycmp';if(!CookieManagerI.get(gaIndex)){gaIndex='mycmp_new';}
541GaTrackI.ga(gaIndex+"_"+mycmp);CookieManagerI.set('mycmp',mycmp,'365','/');self.setAnalyticsConsent(tcData);}else{var mycmp_start=parseInt(CookieManagerI.getSessionStorage('mycmp_start')|0)+1;CookieManagerI.setSessionStorage('mycmp_start',mycmp_start)
542GaTrackI.ga("mycmp_start",mycmp_start);console.log("mycmp_start",mycmp_start);}});}else{console.log('tcfapi ERR');GaTrackI.ga('tcfapi_0');}}
543this.setAnalyticsConsent=function(tcData){if(typeof(cachedConsent)==='undefined'){return;}
544if(tcData&&tcData.purpose&&tcData.purpose.consents){var updatedConsent={'ad_storage':tcData.purpose.consents['1']?'granted':'denied','analytics_storage':tcData.purpose.consents['1']?'granted':'denied','ad_user_data':tcData.purpose.consents['3']?'granted':'denied','ad_personalization':tcData.purpose.consents['4']?'granted':'denied',};gtag('consent','update',updatedConsent);CookieManagerI.setLocalStorage('user_consent',JSON.stringify(updatedConsent));}else{console.log('TCF API ERROR!');}}}
545var ADMSlots={};var AddAdsV2I=new AddAdsV2();$(document).ready(function(){setTimeout(function(){AddAdsV2I.preInit();},CookieManagerI.get('mycmp')!=null?1500:500);});
546function RadioFilterV2(elem){var self=this;this.$elem=$(elem);this.used=false;this.cache={};this.init=function(){if(!$('._radioFilter').length){return;}
547self.$elem.click(function(){if(self.$elem.data('init')!='1'){self.$elem.data('init','1');self.initAutoComplete();}});self.$elem.parents('.icon-search').click(function(){if(self.$elem.data('init')!='1'){self.$elem.data('init','1');self.initAutoComplete();}});self.$elem.parent('form').submit(function(e){if(e.originalEvent&&$('.radiosList .scrolledRadioContentDef .radiosListLink').length){e.preventDefault();}});}
548this.initAutoComplete=function(){LoadScriptIfNeedI.loadJqueryUI(function(){if(typeof(self.$elem.autocomplete)=="undefined"){return;}
549self.$elem.autocomplete({source:function(request,response){if(request.term.length<2){return;}
550if(self.cache[request.term]){self.processResp(self.cache[request.term],request.term,response);return;}
551$.ajax({'url':BASE_URL+'/get-radio-list','data':{'ord':1,'term':request.term,'type':self.$elem.data('type')},'method':'post','dataType':'json',}).done(function(resp){self.cache[request.term]=resp;self.processResp(resp,request.term,response);GaTrackI.ga('autocsearch',self.$elem.data('type')?self.$elem.data('type'):0,request.term);});},select:function(event,ui){if(typeof($(this).data('extra-url'))!=='undefined'){GaTrackI.ga('use_filter_select_'+$(this).data('extra-url'),ui.item.url);}else if(document.location.pathname=="/"+LangI.getText('most-szol')){GaTrackI.ga('use_filter_select_most_szol',ui.item.url);}else{GaTrackI.ga('use_filter_select',ui.item.url);}
552ui.item.value=$('<div>'+ui.item.value+'</div>').text();if(ui.item.url.indexOf("http")==-1){document.location.href=BASE_URL+'/'+ui.item.url;}else{document.location.href=ui.item.url;}},focus:function(event,ui){ui.item.value=$('<div>'+ui.item.value+'</div>').text();},open:function(){$("ul.ui-menu").width($(this).innerWidth());}}).data("ui-autocomplete")._renderItem=function(ul,item){return $("<li></li>").data("item.autocomplete",item).append("<a href='"+item.url+"'>"+item.label+"</a>").appendTo(ul);};});self.$elem.keyup(function(){if($(this).val().length==0){self.filterRadios("",{});}});}
553this.processResp=function(resp,term,response){var tmp=[];for(i in resp['radios']['list']){var radioD=resp['radios']['list'][i];var info={'r_name':radioD['r_name'],'link':radioD['r_urlname']};if(typeof(MyRadioListI)!="undefined"){info=MyRadioListI.getRInfo(radioD,resp['flags'],'i');}
554tmp.push({'label':info['r_name'],'url':info['link']});}
555if(!$('.isMainPage').length&&(self.$elem.parents('.search-menu').length||self.$elem.parents('.search-light').length||self.$elem.data('type')==2)){response(tmp);}else{self.filterRadios(term,resp);}}
556this.filterRadios=function(value,resp){if(value==''&&typeof(MyRadioListI)!="undefined"){MyRadioListI.resetExtraRFav(function(){$('.radiosListLink,.js-moreRadioBtn').show();});return;}
557if(!this.used){this.used=true;GaTrackI.ga('use_filter');}
558if(typeof(MyRadioListI)!="undefined"){MyRadioListI.refreshRadioList(resp,true);}}
559this.init();}
560function MyDatePicker(){var self=this;this.pickerInit=false;this.callback=null;this.dateFormats={'hu':'yy.mm.dd',};this.init=function(){$(".datepicker").click(function(){if(!self.pickerInit){self.pickerInit=true;LoadScriptIfNeedI.loadJqueryUI(function(){self.initDatePicker(this);});}});$('.audioplayer-time-current, .js-cTime, .fa-countdown').each(function(i,currentTI){$(currentTI).click(function(){var isSwitchOff=$(this).hasClass('fa-countdown');if(isSwitchOff&&$(this).hasClass('live')){return;}
561var boxTitle=LangI.getText(isSwitchOff?'app-timer-title':'audio-backward');var $container=$(this).parents('.embed-radioplayer, .mRadioPlayer');if(typeof(jQuery.fn.datetimepicker)=="undefined"||$container.data('init')!='1'){LoadScriptIfNeedI.loadJqueryUITimePicker(function(){self.initTimepickerLazy($container,boxTitle);});}else{self.initTimepickerLazy($container,boxTitle);}});});$('.rangedatepicker').click(function(){if($(this).data('init')!=1){$(this).data('init','1');LoadScriptIfNeedI.loadJqueryUI(function(){self.initRangePicker();});}});}
562this.initTimepickerLazy=function($container,title){if(typeof(jQuery.fn.datetimepicker)=="undefined"){return;}
563$picker=$($container).find(".js-timePicker, .js-cTime, .fa-countdown");$picker.val('');try{$picker.datetimepicker('destroy');}catch(e){}
564var isSwitchOff=title===LangI.getText('app-timer-title');$picker.datetimepicker({timeOnly:true,showSecond:true,showHour:isSwitchOff?true:false,minuteMax:isSwitchOff?'59':'10',alwaysSetTime:false,timeFormat:'HH:mm:ss',showButtonPanel:true,autoClose:true,keepOpen:false,timeOnlyTitle:title,onClose:function(date,obj,param,param2){var totalSec=param.second+param.minute*60+param.hour*60*60;var title=$(this).datetimepicker('option','timeOnlyTitle');if(title==LangI.getText('app-timer-title')){TimedSwitchOffI.startTimer(totalSec);GaTrackI.ga('audio-player','timed-switch-off-'+totalSec);}else{var urlP=$container.data('url');if(urlP){AudioplayerServerI[urlP].audio.seekPlayerA(totalSec);}
565GaTrackI.ga('audio-player','seekTimepicker');}}});$($container).find(".js-timePicker").datetimepicker("show");}
566this.initDatePicker=function(){$(".datepicker").datepicker({dateFormat:this.getDateFormat()});if(typeof($(".datepicker").data('maxday'))!=="undefined"){$(".datepicker").datepicker("option","maxDate",$(".datepicker").data('maxday'));}
567if(typeof($(".datepicker").data('minday'))!=="undefined"){$(".datepicker").datepicker("option","minDate",$(".datepicker").data('minday'));}
568this.setDatepickerRegional();
568if($('.schedule-form .datepicker').length){ScheduleI.bindPicker();}
569setTimeout(function(){$(".datepicker:focus").datepicker("show");},isMobile()?1000:10);}
570this.initRangePicker=function(elem){$.datepicker._defaults.onAfterUpdate=null;var datepicker__updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(inst){datepicker__updateDatepicker.call(this,inst);var onAfterUpdate=this._get(inst,'onAfterUpdate');if(onAfterUpdate)
571onAfterUpdate.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():''),inst]);}
572this.setDatepickerRegional();var cur=-1,prv=-1;$('.jrange div').datepicker({changeMonth:true,changeYear:true,showButtonPanel:true,beforeShowDay:function(date){return[true,((date.getTime()>=Math.min(prv,cur)&&date.getTime()<=Math.max(prv,cur))?'date-range-selected':'')];},onSelect:function(dateText,inst){var d1,d2;prv=cur;cur=(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)).getTime();if(prv==-1||prv==cur){prv=cur;$('.jrange input').val(dateText);}else{d1=$.datepicker.formatDate(self.getDateFormat(),new Date(Math.min(prv,cur)),{});d2=$.datepicker.formatDate(self.getDateFormat(),new Date(Math.max(prv,cur)),{});$('.jrange input').val(d1+' - '+d2);}},onAfterUpdate:function(inst){$('<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+(self.detectLang()=='hu'?'Alkalmaz':'OK')+'</button>').appendTo($('.jrange div .ui-datepicker-buttonpane')).on('click',function(){$('.jrange div').hide();});}}).position({my:'left top',at:'left bottom',of:$('.jrange input')});$('.jrange input').on('focus',function(e){var v=this.value,d;try{if(v.indexOf(' - ')>-1){d=v.split(' - ');prv=$.datepicker.parseDate(self.getDateFormat(),d[0]).getTime();cur=$.datepicker.parseDate(self.getDateFormat(),d[1]).getTime();}else if(v.length>0){prv=cur=$.datepicker.parseDate(self.getDateFormat(),v).getTime();}}catch(e){cur=prv=-1;}
573if(cur>-1)
574$('.jrange div').datepicker('setDate',new Date(cur));$('.jrange div').datepicker('refresh').show();});$('.jrange').blur(function(){$('.jrange div').datepicker('refresh').hide();});}
575this.setDatepickerRegional=function(){if(dPickerLoc){$.datepicker.setDefaults(dPickerLoc);}}
576this.detectLang=function(){var lang=$('html').attr('lang');if(!lang){lang=$('.song-list-cont').data('host').match(/\.([a-z]{2})/)[1];}else if(!lang){lang='en';}
577return lang;}
578this.getDateFormat=function(){return this.dateFormats[this.detectLang()]||'dd.mm.yy';}
579this.init();}
580function OrderRadioList(){this.init=function(){if($.isFunction($.fn.sortable)){$(".scrolledRadioContentDef").sortable("enable");}else{$('body').on('click','.js-orderbyFav',function(){LoadScriptIfNeedI.loadJqueryUI(function(){$(".scrolledRadioContentDef").sortable();});});}}
581this.init();}
582var MyDatePickerI;$(document).ready(function(){$('._radioFilter').each(function(i,elem){new RadioFilterV2(elem);});MyDatePickerI=new MyDatePicker();});
583(function($){$.fn.UItoTop=function(options){var defaults={text:'',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1000,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID;$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed);return false;}).prepend('<span class="fa-angle-double-up" id="'+settings.containerHoverID+'"></span>'+LangI.getText('btn-to-top'));$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});}
584if(sd>settings.min){$(containerIDhash).fadeIn(settings.inDelay);setTimeout(function(){if($('.siblings-sites.no-flag').length&&(window.innerHeight>$('.siblings-sites').offset().top||window.innerHeight+200>$("body").height()||window.innerHeight+$(window).scrollTop()>$('.siblings-sites').offset().top)){$('.siblings-sites').removeClass('no-flag');}},100);}else{$(containerIDhash).fadeOut(settings.Outdelay);}});};})(jQuery);$(window).on('load',function(){if(typeof $.fn.UItoTop==='function'){$().UItoTop({easingType:'easeOutQuart'});}});
585function WebcamPopUp(){var self=this;this.source=null;this.init=function(){this.bindWebCamOpen();}
586this.bindWebCamOpen=function(){$('body').on('click','.js-webcamContOpen',function(e){e.preventDefault();GaTrackI.ga('openWebcam',document.location.pathname);if($(this).hasClass('popWin')){var params="width=640,height=480";params+=',left='+(window.innerWidth/2-300)+",top=300";var myWindow=window.open($(this).data('target'),"",params);}else{LoadScriptIfNeedI.loadJqueryUI(function(){self.getPopContent();});}});if(document.location.hash=='#webcam'){$('.js-webcamContOpen').trigger('click');$("audio")[0].pause();}}
587this.getPopContent=function(type){var rid=$('.rid').eq(0).attr('value');
587if(this.source){self.openPop(this.source);}else{$.ajax({'method':'post','url':BASE_URL+'/get-webcam','data':{'rid':rid,'web':'1','type':type}}).done(function(resp){resp=jQuery.parseJSON(resp);self.openPop(resp.r_webcam,resp['ap_id']);});}}
588this.openPop=function(h,ap_id){var p=new DialogBox();p.openPopUp('<div class="clear5"></div>'+h,'',true);if(!isMobile()&&typeof(jQuery.fn.draggable)!="undefined"){$(".layer_cont").css('cursor','move').draggable();$('.overlay').hide();}
589if(typeof(SubscribeMsgI)!=="undefined"){SubscribeMsgI.signBellFormStore();}
590var time=8000;if($('.wtxt1').length){$('.wtxt1').show();}else{time=0;$('.wtxt2').show();}
591setTimeout(function(){$('.wtxt1').hide();$('.ch-lplayer').show();$('.ch-lplayer a').click(function(){if(!$(this).hasClass('selected')){self.getPopContent($(this).attr('data-type'));}});},time);this.pingEvent();}
592this.pingEvent=function(){if(!$(".popup_layer:visible").length){return;}
593GaTrackI.ga("webcam_watch",document.location.pathname);setTimeout(function(){self.pingEvent();},60000);}
594this.init();}
595$(document).ready(function(){new WebcamPopUp();});
596function LazyLoadImg(){var self=this;this.initialized=false;this.webpSupported=false;this.init=function(){if(this.initialized){return;}
597this.initialized=true;this.checkWebPBG(function(){self.bindScroll();});}
598this.bindScroll=function(){var scrollTimer=null;$(window).on('scroll.lazyLoadImg',function(){clearTimeout(scrollTimer);scrollTimer=setTimeout(function(){self.checkPicLoadingNeed();},10);});scrollTimer=setTimeout(function(){self.checkPicLoadingNeed();},10);}
599this.fireAnim=function(elem){var promoCont=elem.closest('.promo-link');if(!promoCont.length){return;}
600promoCont.addClass('onbounce');setTimeout(function(){if(!promoCont.hasClass('phear')){var sItem=promoCont.find('.radio-title');sItem.addClass('showStar');setTimeout(function(){sItem.addClass('flipanim');},400);setTimeout(function(){sItem.removeClass('flipanim');},2000);}},1000);}
601this.checkPicLoadingNeed=function(){var lConts=$('.js-lazyCont');if(!lConts.length){return;}
602var wH=window.innerHeight;var visibleConts=[];lConts.each(function(j,lCont){if(lCont.getBoundingClientRect().top<wH){visibleConts.push(lCont);}});$.each(visibleConts,function(j,lCont){lCont=$(lCont);lCont.removeClass('js-lazyCont');var imgs=lCont.find('.js-img-lload');imgs.each(function(i,elem){elem=$(elem);var img=elem[0].getAttribute('data-lazy-load');if(img&&img.indexOf('{')===0){var imageSizes=JSON.parse(img);var targetW=elem.width();var fitSize='';for(var width in imageSizes){if(targetW>=width){fitSize=imageSizes[width];}}
603img=fitSize;}
604if(self.webpSupported&&img&&img.indexOf('radio_img')>-1){img=img.replace(/\.(jpg|png)$/,'.webp');}
605if(img){elem.one('load',function(){$(this).removeAttr('data-lazy-load');});elem[0].src=img;self.fireAnim(elem);}});});}
606this.checkWebPBG=function(callback){this.check_webp_feature('lossy',function(result){self.webpSupported=result==true;if(self.webpSupported){$('body').addClass('webp-bg');}else{$('body').addClass('no-webp-bg');var logo=$('.logo_wrapper img');var logoSource=logo.attr('src');if(logoSource){logo.attr('src',logoSource.replace('.webp','.png'));}}
607if(typeof callback==='function'){callback();}});}
608this.check_webp_feature=function(feature,callback){var cachedResult=CookieManagerI.get('webp_support');if(cachedResult!==null){callback(cachedResult==true);return;}
609var kTestImages={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};var img=new Image();img.onload=function(){var result=(img.width>0)&&(img.height>0);CookieManagerI.set('webp_support',result?1:0,7,'/');callback(result);};img.onerror=function(){CookieManagerI.set('webp_support',0,7,'/');callback(false);};img.src="data:image/webp;base64,"+kTestImages[feature];}}
610var LazyLoadImgI=new LazyLoadImg();$(window).on('load',function(){setTimeout(function(){LazyLoadImgI.init();},10);});
611function HearBackVideo(){var self=this;this.layer=null;
611this.bindVideoOpener=function(){$('.songCont, ._video, .song-cover-cont img').unbind('click').click(function(){$('.mRadioPlayer .playPause').each(function(i,elem){if($(elem).hasClass('fa-pause')){$(elem).trigger('click');}});self.bindVideoClick($(this).attr('data-youtube'));});}
612this.bindVideoClick=function(key){if(!key){return;}
613GaTrackI.ga('playlist_video_click',document.location.pathname);if($('body.embed, .embed-songTitles, .embed-radioplayer').length){if(this.openedWindow){this.openedWindow.close();}
614var ratio=480/640;var width=Math.min(640,window.innerWidth);var height=width*ratio;var left=window.innerWidth/2-width/2;var top=window.innerHeight/2-height/2;this.openedWindow=window.open('//www.youtube.com/embed/'+key+'?rel=0&autoplay=1',"","status=no,width="+width+",height="+height+",left="+left+",top="+top);return;}
615var html='<div class="vidCont" data-actkey="'+key+'">'+LangI.getText('youtube-video-info')+'<div data-toggle="tooltip" title="'+LangI.getText('next-btn')+'" data-placement="top" class="_yPrev floatLeft _yppagers fa-angle-left"></div><div data-toggle="tooltip" title="'+LangI.getText('prev-btn')+'" data-placement="top" class="_yNext floatRight _yppagers fa-angle-right"></div><div class="clear"></div>'+this.getIframe(key);this.layer=new DialogBox();this.layer.openPopUp(html,false,true);$('._yPrev, ._yNext').unbind('click').click(function(){self.setNextVid($(this));});}
616this.setNextVid=function(pager){var actKey=$('.vidCont').data('actkey');var $cont=$('.js-songListC [data-youtube='+actKey+'], .song-list-cont [data-youtube='+actKey+']')
617var actCont=(pager.hasClass('_yNext'))?$cont.next().next():$cont.prev().prev();if(!actCont.data('youtube')&&pager.hasClass('_yNext')){$('._moreSong').trigger('click');var actCont=(pager.hasClass('_yNext'))?$('[data-youtube='+actKey+']').next().next():$('[data-youtube='+actKey+']').prev().prev();}
618if(!actCont.data('youtube')){return;}
619$('.popup_layer iframe').replaceWith(self.getIframe(actCont.data('youtube')));$('.vidCont').data('actkey',actCont.data('youtube'));this.layer.resizeFrame();}
620this.bindPager=function(){$('._pageLeft').click(function(){self.setPage(1);});$('._pageRight').click(function(){self.setPage(0);});}
621this.setPage=function(direction){if(self.animateOn){return;}
622self.animateOn=true;var boxW=$('._video').width();$('._videosList').css('width',boxW*$('._video').length+'px');if(direction==1&&parseInt($('._videosList').css('margin-left'))>=0){self.animateOn=false;return;}
623if(direction==0&&parseInt($('._videosList').css('margin-left'))<=-boxW*$('._video').length+boxW){self.animateOn=false;return;}
624$('._videosList').animate({'margin-left':((direction)?'+':'-')+'='+boxW},500,function(){self.animateOn=false;});}
625this.getIframe=function(key){return'<iframe width="560" height="315" src="//www.youtube.com/embed/'+key+'?rel=0&autoplay=0" frameborder="0" allowfullscreen></iframe>';}}
626var HearBackVideoI=new HearBackVideo();
627$(document).ready(function(){new Rating();new BodyBuilder();$('._actSongCont').on('click','a',function(e){e.preventDefault();var url=$(this).attr('href');GaTrackI.ga('playlist-link',url);setTimeout(function(){document.location.href=url;},500);});setTimeout(function(){NumberCounterAnimI.refreshNum('.right-box-cont .liveNum',$('.right-box-cont .liveNum').data('act'));},4500);$('.liveNumBox').click(function(){document.location.href=$('.sf-menu a[href*="radio-stat"]').attr('href');});});function Rating(){var self=this;this.oCount='.ratingOcont';this.iCount='.ratingInCont';this.star='.star';this.defStar=1;this.voteOn=true;this.cookieManager=new CookieManager();this.initialize=function(){if(!$(this.oCount).length||(LangI.actLang=="hu"&&$(".rid").val()==112)){return;}
628this.defStar=$(this.oCount+" .act").attr("value");this.bindMouseEnter();this.bindMouseLeave();this.bindStarClick();if(self.cookieManager.get("vote")==1){this.voteOn=false;}}
629this.bindMouseEnter=function(){$(this.star).mouseenter(function(){if(!self.voteOn){return;}
630var v=$(this).data("value");self.setStarBG(v);});}
631this.bindMouseLeave=function(){$(this.oCount).mouseleave(function(){self.setStarBG(self.defStar);});}
632this.bindStarClick=function(){$(this.star).click(function(){if(!self.voteOn){return;}
633self.defStar=$(this).data("value");self.voteOn=false;self.cookieManager.set("vote",'1',1,location.pathname);if(self.defStar<3){self.askUser(self.defStar);}else{self.sendData(self.defStar);}});}
634this.sendData=function(vote){$.ajax({url:BASE_URL+"/radio/vote",data:{'vote':vote,'rid':$(".rid").val()},method:'post',dataType:"json",success:function(resp){$(".ratingValue").html(resp.num);$(".ratingAvg").html(resp.avg);}});}
635this.setStarBG=function(v){$(this.iCount).css("width",v*20+"%");}
636this.askUser=function(vote){GaTrackI.ga('fivestar',$('h1').html(),vote);var html=LangI.getText('star-vote-dscr');html+='<div class="control-group ratingPopUp" class="ajax-contact-form">';html+='<div class="controls">';html+='<textarea id="js-ratingMessage" class="my-textarea" maxlength="5000" placeholder="'+LangI.getText('star-vote-placeholder')+'"></textarea>';html+='<button type="submit" class="button_blue button_red _close">
636'+LangI.getText('app-cancel')+'</button>&nbsp;';html+='<button type="submit" class="button_blue submit">'+LangI.getText('star-vote-btn')+'</button>';html+='</div>';html+='</div>';$('.layer_cont .button_blue').remove();var askD=new DialogBox();askD.setTitle('');askD.setContent(html);askD.openPopUp();self.initMessageSender(vote,askD);}
637this.initMessageSender=function(vote,askD){$('.layer_cont .button_blue.submit').click(function(){if($('#js-ratingMessage').val().length<2){$('#js-ratingMessage').addClass('errorForm');return;}
638$('#js-ratingMessage').removeClass('errorForm');$.ajax({'url':BASE_URL+'/send-rating-observation','method':'post','data':{'vote':vote,'name':$('h1').html(),'message':$('#js-ratingMessage').val()},'dataType':'json'}).done(function(resp){askD.setContent('<p>'+resp['msg']+'</p>');if(resp&&resp['status']){self.sendData(vote);setTimeout(function(){$("._close").trigger('click');},2000);}});});}
639this.initialize();}
640function BodyBuilder(){var self=this;this.timer=null;this.songList=null;this.buildNeedFire=false;this.buildTimer=null;this.init=function(){if(!$('.span3 .kv1').length&&!$('.span3 .song-list-cont').length&&!$('.open-close-dscr').length){return;}
641this.initResizeListener();this.bindDscrOpenClose();this.refreshOpenCloseDscr();$(window).off('scroll.bodyBuilder').on('scroll.bodyBuilder',function(){if(self.buildNeedFire){return;}
642clearTimeout(self.buildTimer);self.buildTimer=setTimeout(function(){self.checkBuildNeed();if(self.buildNeedFire){$(window).off('scroll.bodyBuilder');}},100);});}
643this.checkBuildNeed=function(){var $elem=$('.mobil_build_pos');if(!$elem.length){return;}
644var limitPadding=100;var bLine=window.innerHeight+limitPadding;if($elem[0].getBoundingClientRect().top<bLine){this.buildNeedFire=true;this.checkBuild();}}
645this.initResizeListener=function(){$(window).resize(function(){clearTimeout(self.timer);self.timer=setTimeout(function(){self.checkBuild();},500);});}
646this.checkBuild=function(){if(window.innerWidth<768){self.buildMobil();self.bindOpener();}else{self.buildDesktop();}}
647this.buildMobil=function(){if($('.span3 .kv1').length){$(".mobil_build_pos").after($('.span3 .kv1')).after('<div class="clear5_2"></div>');ProgramGuidePickerI=new ProgramGuidePicker();}
648if($('.span3 .song-list-cont').length){$(".mobil_build_pos").after($('.span3 .song-list-cont')).after('<div class="clear5_2"></div>');self.reInitSongList($('.mRadioPlayer .song-list-cont')[0]);}}
649this.buildDesktop=function(){if($('.mRadioPlayer .kv1').length){$(".span3 .desktop_build_pos").after($('.mRadioPlayer .kv1'));ProgramGuidePickerI=new ProgramGuidePicker();}
650if($('.mRadioPlayer .song-list-cont').length){$(".span3 .desktop_build_pos").after($('.mRadioPlayer .song-list-cont'));self.reInitSongList($('.span3 .song-list-cont')[0]);}}
651this.reInitSongList=function(elem){var url=$(elem).data('url');SongListI[url]=new SongList(elem);SongListI[url].init();SongListI[url].initCalendarLazy($('._calendarIconCont'),true);this.songList=SongListI[url];}
652this.bindOpener=function(){var $openers=$('.song-list-cont h3, .kv1 h3');$openers.off('click.bodyBuilder').on('click.bodyBuilder',function(e){e.preventDefault();var $this=$(this);$this.parent().addClass('open');if(self.songList){self.songList.initSongListContainer();}
653GaTrackI.ga('bbboxopen',$this.find('a').text());});}
654this.bindDscrOpenClose=function(){$('.open-close-dscr').click(function(e){e.preventDefault();var $cont=$(this).next();var $arrow=$(this).find('.fa');if($arrow.hasClass('fa-chevron-up')){$cont.hide();$arrow.removeClass('fa-chevron-up');$arrow.addClass('fa-chevron-down');}else{$cont.show();$arrow.removeClass('fa-chevron-down');$arrow.addClass('fa-chevron-up');}
655self.refreshState();GaTrackI.ga('open-close',$(this).hasClass('fa-chevron-up')?'open':'close');});}
656this.refreshState=function(){var status=CookieManagerI.get('open-close');if(!status){var status={};}else{status=JSON.parse(status);}
657$('.open-close-dscr .fa').each(function(i,elem){status[$(elem).data('num')]=($(elem).hasClass('fa-chevron-up')?"0":"1");});CookieManagerI.set('open-close',JSON.stringify(status),365);}
658this.refreshOpenCloseDscr=function(){var status=CookieManagerI.get('open-close');if(!status){return;}
659try{status=JSON.parse(status);}catch(e){return;}
660for(var i in status){if(status.hasOwnProperty(i)&&status[i]=='1'){var $arrow=$('.open-close-dscr .fa[data-num="'+i+'"]');if($arrow.hasClass('fa-chevron-up')){$arrow.closest('.open-close-dscr').next().hide();$arrow.removeClass('fa-chevron-up').addClass('fa-chevron-down');}}}}
661this.init();}
662var LAST_LIVE_STATUS=0;
662var LoadActRadioDataI=new Array();function LoadActRadioDataCore(){this.tryLoadIONum=0;this.windowsOnFocus=true;this.setCoverAllow=false;this.lastSongCover={};this.setSongCover=function(datas,$container){if(!$container||!$container.find('.song-cover-cont').length){return;}
663var src=this.buildCoverImgUrl(datas,'250x250bb');if(src){this.lastSongCover={'datas':datas,'$container':$container};if(!this.setCoverAllow){return;}
664$container.find('.cover-slider-cont img').eq(0).attr('src',src).attr('data-youtube',datas.rs_youtube_id).attr('data-toggle','tooltip').attr('title',LangI.getText('click-and-hear-back')).attr('data-original-title',LangI.getText('click-and-hear-back')).attr('aria-label',LangI.getText('click-and-hear-back')).attr('data-placement','top');$container.find('.cover-slider-cont .helper').attr('data-rsid',datas.rs_id);$('.flip-card-front .helper').remove();}}
665this.buildCoverImgUrl=function(datas,size){if($('.song-cover-cont.extra').length&&size=="250x250bb"){size="300x300bb";}
666var src='';if(!datas.rs_track&&!datas.track){src=$('[itemprop="image"]').attr('href');}else if(datas.itunes_pic){if(datas.itunes_pic.indexOf('radio_img')!==-1){if($('.song-cover-cont.extra').length&&rInfo['picVs'].indexOf('play_300')>-1){src=datas.itunes_pic.replace('list_45','play_300');}else{src=datas.itunes_pic.replace('list_45','play_250_250');}}else if(datas.itunes_pic.indexOf('http')===0){src=datas.itunes_pic.replace("50x50bb",size);}else if(datas.itunes_pic.indexOf('.jpg')>-1||datas.itunes_pic.indexOf('.png')>-1||datas.itunes_pic.indexOf('.tif')>-1){src='https://is1-ssl.mzstatic.com/image/thumb/'+datas.itunes_pic+'/'+size+'.jpg';}else{src='https://is1-ssl.mzstatic.com/image/thumb/'+datas.itunes_pic+'/source/'+size+'.jpg';}}else if(datas.rs_youtube_id){src='https://i1.ytimg.com/vi/'+datas.rs_youtube_id+'/mqdefault.jpg';}
667return src;}
668this.bindCoverImgErrorListener=function($container){$container.find('.cover-slider-cont img').on('load',function(){if(this.naturalHeight<130){var oSrc=$container.find('.cover-slider-cont img').eq(0).attr('src');var nSrc=$container.find("meta[itemprop='image']").attr('content');$container.find('.cover-slider-cont img').eq(0).attr('src',nSrc);var matches=oSrc.match(/vi\/(.*)\//);if(matches&&matches.length>1){$("[src*='"+matches[1]+"']").attr('src',nSrc);}}});}
669this.allowSetCover=function(){this.setCoverAllow=true;this.setSongCover(this.lastSongCover['datas'],this.lastSongCover['$container']);}
670this.putActSong=function(resp,$container){if(typeof(resp.now_playing)!="undefined"&&(resp.now_playing.artist||resp.now_playing.track)){if(resp.now_playing.live=='1'&&LAST_LIVE_STATUS==0){if(!$container.hasClass('embed-radioplayer')){LoadScriptIfNeedI.loadLiveVideoNotification(function(){if(typeof(NotificationI)!="undefined"){NotificationI.pushNotification("<span class='js-webcamContOpen' style='cursor:pointer;'>"+LangI.getText("live-stream-started")+"</span>");}});}
671LAST_LIVE_STATUS=1;}else if(resp.now_playing.live=='0'&&LAST_LIVE_STATUS==1){LAST_LIVE_STATUS=0;}
672if(!$('.cover-slider-cont').hasClass('no-reset')){var urlP=$container.data("url");if($container.data("host")){urlP=$container.data("host")+"/"+urlP;}else if(document.location.host.indexOf("radioplayer")>-1){urlP=document.location.origin.replace("radioplayer.",'')+"/"+urlP;}else{urlP="/"+urlP;}
673$('.actSong .js-bell-noti').remove();var bellH='';if(!resp.now_playing.rs_id&&!$('.webcamp').length){var artist=typeof resp.now_playing.artist==="string"?resp.now_playing.artist:"";var time=resp.now_playing.time;var bItems=artist?artist.split(" - "):["",""];if(time){bItems[0]=artist;bItems[1]=time;}
674var bellH=' <span class="fa-bell-o js-bell-noti bell-on" data-event-type="schedule" data-event-id="'+$('.rid').val()+'" data-event-time="'+$.trim(bItems[0])+'" data-event-name="'+$.trim(bItems[1])+'" data-placement="top" data-toggle="tooltip" data-placement="top" title="'+LangI.getText('push-msg-tooltip-schedule')+'"></span>';}
675var tt=resp.now_playing.artist+(resp.now_playing.track?" - "+resp.now_playing.track:"");if(resp.now_playing.rs_youtube_id){$container.find(".actSong").html('<a href="'+urlP+'/'+LangI.getText('most-szol')+'" data-toggle="tooltip" data-placement="top" title="'+LangI.getText('act-song-tooltip')+'" class="progCont anim">'+tt+'</a>'+bellH);}else{$container.find(".actSong").html('<a href="'+urlP+'/'+LangI.getText('url-part
675-schedule')+'" data-toggle="tooltip" data-placement="top" title="'+LangI.getText('act-prog-tooltip')+'" data-placement="top" class="progCont anim">'+tt+'</a>'+bellH);}}
676if(typeof(LoveHateI)!="undefined"&&typeof(LoveHateI.buildButtons)!="undefined"){LoveHateI.buildButtons();}
677if($('.js-actDate').attr('data-def')==$('.js-actDate').html()){var coverData={'rs_youtube_id':resp.now_playing.rs_youtube_id,'rs_artist':resp.now_playing.artist,'rs_track':resp.now_playing.track,'rs_id':resp.now_playing.rs_id,'itunes_pic':resp.now_playing.itunes_pic,'time':resp.now_playing.time,};if(typeof(SongListI)!="undefined"&&SongListI[$container.data("url")]){SongListI[$container.data("url")].putOneSong(coverData);}
678if(typeof(AlbumCoverSliderI)=="undefined"||(typeof(AlbumCoverSliderI)!="undefined"&&!AlbumCoverSliderI.pushNewCover())){LoadActRadioDataCoreI.setSongCover(coverData,$container);}}
679if(typeof(AudioplayerServerI)!="undefined"&&AudioplayerServerI[$container.data("url")]){AudioplayerServerI[$container.data("url")].setMobileMediaSession(resp.now_playing);}}
680this.showListenerNum(resp);}
681this.tryLoadIO=function(){this.tryLoadIONum++;if(typeof(io)=="undefined"&&this.tryLoadIONum<5){setTimeout(function(){LoadActRadio
681DataCoreI.tryLoadIO();},1000);return;}
682for(i in LoadActRadioDataI){try{if(!Object.prototype.hasOwnProperty.call(LoadActRadioDataI,i))continue;LoadActRadioDataI[i].actHash=this.getStreamHash();LoadActRadioDataI[i].initialize();}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("LoadActRadioDataI err: "+e.toString()+" KEY: "+i+" Type: "+typeof LoadActRadioDataI[i]+" Loaded: "+LoadActRadioDataI.toString());}}}}
683this.getStreamHash=function(){var hash='';if($('.server-row.active').length){hash=$('.server-row.active').data('hash');}
684return hash;}
685this.showListenerNum=function(resp){if(window.innerWidth<768||!resp['listeners']||!$('.sf-menu a[href*="radio-stat"]').length){return;}
686NumberCounterAnimI.refreshNum('.right-box-cont .liveNum',resp['listeners']['act']);}}
687var LoadActRadioDataCoreI=new LoadActRadioDataCore();function LoadActRadioData(container){var self=this;var $container=$(container);this.actR=null;this.actU=null;this.getCounter=0;this.timeSrc=null;this.focus=true;this.lastSync=Math.floor(Date.now()/1000);this.actHash='';this.version=1;this.initialize=function(){if(!$("._actSongCont").length||$("._actSongCont").hasClass('js-actProgCont')){return;}
688this.actR=$container.find("._actSongCont").data("act-radio");this.actU=$container.data("url");if($('._songList').length){this.delayNextRequest();}else{this.sendRequest();}
689if(typeof(AddAdsV2I)!="undefined"){UtilsI.initFocusListenerV2(self.initFocusListener);}}
690this.sendRequest=function(){if(!LoadActRadioDataCoreI.windowsOnFocus){return;}
691self.lastSync=Math.floor(Date.now()/1000);var bU=BASE_URL;if(!bU||BASE_URL.indexOf('about:')>-1){bU=$container.data('host');}
692var withCredentials=$container.data('host')?true:false;$.ajax({url:bU+"/radio/aktualis-statusz/"+self.actU+(this.actHash?'/'+this.actHash:''),data:{'rid':self.actR,'counter':self.getCounter},method:'post',dataType:"json",'xhrFields':{'withCredentials':withCredentials},success:function(resp){self.getCounter++;
692LoadActRadioDataCoreI.putActSong(resp,$container);self.delayNextRequest();}}).fail(function(jqXHR,textStatus){});}
693this.delayNextRequest=function(){var d=new Date();var h=d.getHours();var w=d.getUTCDay();var iTime=60000;clearTimeout(this.timeSrc);this.timeSrc=setTimeout(function(){self.sendRequest();},iTime);}
694this.initFocusListener=function(visible){clearTimeout(self.timeSrc);LoadActRadioDataCoreI.windowsOnFocus=visible;if(!visible){self.focus=false;}else{self.focus=true;var tStamp=Math.floor(Date.now()/1000);if(tStamp>self.lastSync+180&&$('.songTitles .js-actDate').html()==$('.songTitles .js-actDate').attr('data-def')){self.lastSync=tStamp;if(typeof(SongListI[this.actU])!="undefined"){SongListI[this.actU].getSongs(0,'',true);}
695self.delayNextRequest();}else{self.sendRequest();}}}
696this.getContainer=function(){return $container;}
697this.reInit=function(hash){if(this.actHash!=hash){this.actHash=hash;if($('._songList').length){this.delayNextRequest();}else{this.sendRequest();}}}}
698function LoadActRadioDataV2(container){var self=this;var $container=$(container);this.actR=null;this.actU=null;this.timeSrc=null;this.focus=true;this.lastSync=Math.floor(Date.now()/1000);this.lastUpdate=new Date().getTime();this.socket=null;this.connectOk=false;this.tryConnect=0;this.version=2;this.actHash='';this.initialize=function(){if(!$container.find("._actSongCont").length||$container.find("._actSongCont").hasClass('js-actProgCont')){return;}
699LoadActRadioDataCoreI.bindCoverImgErrorListener($container);
699if(typeof(io)=="undefined"){LoadActRadioDataI[$container.data('url')]=new LoadActRadioData($container);LoadActRadioDataI[$container.data('url')].actHash=this.actHash;LoadActRadioDataI[$container.data('url')].initialize();return;}
700this.actR=$container.find("._actSongCont").data("act-radio");this.actU=$container.data("url");if(!this.actR){new EmbedRadioScroller();}
701try{this.sendRequest();}catch(e){ConsoleDebuggerI.pushMsg(e.toString()+" sendRequest "+(Math.floor(Date.now()/1000)-TMPT)+" #important");}}
702this.sendRequest=function(){if(!LoadActRadioDataCoreI.windowsOnFocus){console.log("SKIPP sendRequest");return;}
703var getSong=typeof(SongListI)!="undefined"&&SongListI[this.actU]&&SongListI[this.actU].getContainer().find('._songList').length?false:true;sU=MyConfigI.get('socketio');if(false&&$('.js-isAdmin').length){sU='https://'+document.location.host+':8001';}
704var ID=this.actU+(this.actHash?'/'+this.actHash:'');var queryURL='radio='+ID+'&last-update='+(getSong?0:self.lastUpdate)+"&jsver="+LoadScriptIfNeedI.actJSVersion+(LAST_LIVE_STATUS==1?'&live=1':'');var socketConf={'reconnection':false,'path':'/socket.io','query':queryURL,'withCredentials':true,};if(MyConfigI.get('socketV')=="3"){socketConf['transports']=['websocket'];}
705this.socket=io(sU,socketConf);this.socket.on('connect',function(){console.log("connect");if(!self.connectOk){self.connectOk=true;if(typeof(AddAdsV2I)!="undefined"){UtilsI.initFocusListenerV2(self.initFocusListener);}}
706GaTrackI.ga('nodejs','connect_ok');self.tryConnect++;});this.socket.on('connect_error',function(){console.log("connect_error");
706if(!self.connectOk){LoadActRadioDataI[$container.data('url')]=new LoadActRadioData($container);LoadActRadioDataI[$container.data('url')].actHash=self.actHash;LoadActRadioDataI[$container.data('url')].initialize();}
707GaTrackI.ga('nodejs','connect_error');});this.socket.on('connect_timeout',function(timeout){console.log("timeout",timeout);});this.socket.on('error',function(error){console.log("error",error);});this.socket.on('disconnect',function(error){console.log("disconnect");});this.initSongListen();}
708this.initSongListen=function(){this.socket.on('new-song-'+this.actU+(this.actHash?'/'+this.actHash:''),function(resp){if(!resp){return;}
709self.lastUpdate=new Date().getTime();var resp=jQuery.parseJSON(resp);LoadActRadioDataCoreI.putActSong(resp,$container);});}
710this.initFocusListener=function(visible){if(isMobile()||$(".js-isAdmin").length){}
711clearTimeout(self.timeSrc);LoadActRadioDataCoreI.windowsOnFocus=visible;if(!visible&&!AudioplayerServerI.mediaSessionSupport){self.focus=false;if(self.socket){self.socket.disconnect();}}else{self.focus=true;var tStamp=Math.floor(Date.now()/1000);if(tStamp>self.lastSync+180&&$('.songTitles .js-actDate').html()==$('.songTitles .js-actDate').attr('data-def')){self.lastSync=tStamp;if(typeof(SongListI)!="undefined"&&typeof(SongListI[self.actU])!="undefined"){SongListI[self.actU].getSongs(0,'',true);}
712self.lastUpdate=new Date().getTime();self.sendRequest();}else{self.lastSync=Math.floor(Date.now()/1000);self.sendRequest();}}}
713this.getContainer=function(){return $container;}
714this.reInit=function(hash){if(typeof(io)=="undefined"){return;}
715if(self.socket){console.log("disconnect");self.socket.disconnect();}
716this.actHash=hash?hash:'';this.sendRequest();}}
717var TMPT=Math.floor(Date.now()/1000);$(document).ready(function(){$('.embed-radioplayer, .mRadioPlayer').each(function(i,elem){var url=$(elem).data('url');if(!url)return;
717LoadActRadioDataI[url]=new LoadActRadioDataV2(elem);});if(!$("._actSongCont").length||$("._actSongCont").hasClass('js-actProgCont')||$('.pre_info').length){return;}
718var sT=0;if($('.song-list-cont').length||$('.webcamp').length||$('.js-isAdmin').length){sT=15000;}
719setTimeout(function(){LoadScriptIfNeedI.loadSocketIO(function(){LoadActRadioDataCoreI.tryLoadIO();});},sT);});
720function Menu(){var self=this;this.notiCounter=0;this.sepNotiCounter={};this.lastWidth=0;this.init=function(){if(window.innerWidth>767){return;}
721this.bindOpenClose();this.countArchivesNoti();this.bindMenuItemClick();setTimeout(function(){self.showBubbles();},4000);}
722this.showBubbles=function(){if(self.notiCounter){$('.navbar .btn-navbar_').append('<div class="noti-bubble">'+self.notiCounter+'</div>');}
723for(i in self.sepNotiCounter){$('.navbar .'+i+' .txt1').append('<div class="sub-noti-bubble">'+self.sepNotiCounter[i]+'</div>');}}
724this.countArchivesNoti=function(){if(!$('.archive-items-cont').length){return;}
725var myTime=CookieManagerI.get('noti-time');$('.archive-item').each(function(i,elem){if($(elem).data('time')>myTime){self.notiCounter++;self.sepNotiCounter['marchive']=(self.sepNotiCounter['marchive']||0)+1;}});}
726this.bindOpenClose=function(){if($('.opt-mobil-view').length){self.lastWidth=window.innerWidth;$('.btn-navbar').click(function(e){if($('.nav-collapse_').height()==0){self.openMenu();}else{self.closeMenu();}});$(window).resize(function(){if(self.lastWidth!=window.innerWidth){$('.nav-collapse_').css('height','0');$('.box2').css('margin-top',0);$('.menu_wrapper, .social_wrapper').attr("style","");self.lastWidth=window.innerWidth;}});}}
727this.openMenu=function(){$('.nav-collapse_').css('height','auto');var cH=$('.menu_wrapper').height()+2;$('.box2').css('margin-top',cH+5);$('.menu_wrapper, .social_wrapper').attr("style","top: "+(cH*-1)+"px !important;");if($('.mRadioPlayer').length){CookieManagerI.set('noti-time',$.now(),null,'/'+$('.mRadioPlayer').data('url'));}
728GaTrackI.ga('menu-open','1');}
729this.closeMenu=function(){$('.nav-collapse_').css('height','0');$('.box2').css('margin-top',0);$('.menu_wrapper, .social_wrapper').attr("style","");$('.noti-bubble, .sub-noti-bubble').remove();}
730this.bindMenuItemClick=function(){$('.nav a').click(function(e){var url=$(this).attr('href');GaTrackI.ga('menu-click',url,document.location.href);e.preventDefault();setTimeout(function(){document.location.href=url;},100);});}
731this.init();}
732var MenuI=null;$(document).ready(function(){MenuI=new Menu();});
733var ISADMIN=false;$(document).ready(function(){if($('.scrolledRadioContent').length){$('.scrolledRadioContent').slimscroll({disableFadeOut:true,height:'295px'});}
734NumberCounterAnimI=new NumberCounterAnim();new EmailFixer();new FormErrorReset();$('.js-makeLink').click(function(e){e.preventDefault();document.location.href=BASE_URL+$(this).data('href');});$('.scrolledRadioContentDef').on('click','.five-pointed-star',function(e){e.preventDefault();var db=new DialogBox();db.openPopUp(LangI.getText('promo-radio-descr'),LangI.getText('promo-radio'));var ef=new EmailFixer();ef.fixText($('._popUpMessage'));GaTrackI.ga("five-promo",$(this).parents('a').attr('href'));});if(userHasSubscription()){GaTrackI.ga('user_sub');}
735if(userLoggedIn()){GaTrackI.ga('user_in');}
736$('.social a').click(function(e){GaTrackI.ga('social_icons',$(this).attr('title'));});$('.archive-items-cont a').click(function(){GaTrackI.ga('archive_promo_click',$('.archive-items-cont h3 a').attr('href'),$.trim($(this).find('.archive-item-title').text()));});$('.tracking').click(function(){GaTrackI.ga($(this).data('track-category'),$(this).data('track-action'));});$('.children-link-cont a').click(function(){GaTrackI.ga('children-link-cont',$(this).attr('title'));});$('.js-newTab').click(function(e){e.preventDefault();openInNewTab($(this).data('url'));});$('body').on('click','.grippy-host',function(){GaTrackI.ga('stcky-cls',document.location.pathname);});$('.mbreadcrumb a').click(function(e){var url=$(this).attr('href');GaTrackI.ga('breadcrumb-click',url,document.location.href);e.preventDefault();setTimeout(function(){document.location.href=url;},100);});$('.logo_wrapper a.logo').click(function(e){var url=$(this).attr('href');GaTrackI.ga('logo-click',document.location.href);e.preventDefault();setTimeout(function(){document.location.href=url;},100);});if(!isMobile()){var href=$("a[href*=viber]").attr('href');if(href){$("a[href*=viber]").attr('href',href.replace('add?number=','chat?number=+'))}}
737new SocialMenu();if(!navigator.userAgent.match(/Android/i)&&$('.androidli a').length){$('.androidli a').attr('href',$('.androidli a').data('def-url'));}
738if(UtilsI.isIOS()&&$('.iosli a').length){$('.iosli a').attr('href',$('.iosli a').attr('href').replace('https://','itms-apps://'));if(window.innerWidth<768){$('.iosli').removeClass('no-ios');}}
739new ListLinkClick();$('.icon-search, .search-light').each(function(i,elem){new IconSearch(elem);});if($('.closedRadioIframe').length&&BASE_URL.indexOf('https:')==-1){$('.closedRadioIframe').attr('src',$('.closedRadioIframe').attr('src').replace("https:","http:"));$('.cover-slider-cont').hide();}
740new DottedText();new TrimDescr();var ssp=LangI.getText('ssp-index');var promoIndex=ssp+'_promo_v2';if(ssp!="-"&&CookieManagerI.getPageVisitNum()>6&&!CookieManagerI.get(promoIndex)&&MyConfigI.get('subModeLvL')>-1){CookieManagerI.set(promoIndex,'1','60','/');var pTxt=LangI.getText('sibling-site-promo');if(true||pTxt.indexOf('utm_source='+LangI.langLocale)==-1){var db=new DialogBox();db.openPopUp(pTxt,LangI.getText('shazam-attention'),false,null,null,fal
740se);}}else if(CookieManagerI.getPageVisitNum()>13&&!CookieManagerI.get('web-app-promo-sub')&&LangI.actLang=="ro"&&LangI.getText('web-app-sub-promo-title')!=""&&!userHasSubscription()){var db=new DialogBox();var msg=LangI.getText('web-app-sub-promo-descr');msg=msg.replace('{androidUrl}',$('.androidli a').attr('href'));msg=msg.replace('{iosUrl}',$('.iosli a').attr('href'));db.openPopUp(msg,LangI.getText('web-app-sub-promo-title'));CookieManagerI.set('web-app-promo-sub','1',40);}else if(CookieManagerI.getPageVisitNum()>7&&typeof(rInfo)!="undefined"&&!CookieManagerI.get('plyr-func-promo-eq')){var db=new DialogBox();db.openPopUp(LangI.getText('new-func-promo-dscr'),LangI.getText('new-func-promo-title'),null,null,null,true);CookieManagerI.set('plyr-func-promo-eq','1','70','/');}
741new h1Link();new LostInternetDetect();setTimeout(function(){$('body').addClass('domready');if($('.listLiveNum').length&&window.innerWidth>979){NumberCounterAnimI.refreshNum('.listLiveNum .js-listViewNum',$('.listLiveNum .js-listViewNum').data('num'));}},100);if(window.innerWidth<768&&$('.song-cover-cont .errorMessage').length){setTimeout(function(){if(!$(".popup_layer:visible").length){var db=new DialogBox();db.openPopUp($('.song-cover-cont .errorMessage').html(),LangI.getText('system-message'));}},5000);}
742if(document.location.hash.indexOf('wpnoti')>-1){GaTrackI.ga(document.location.hash.substring(1));}
743if($('meta[name="referrer"]').length){CookieManagerI.set('nrf','1');}});function LostInternetDetect(){this.init=function(){window.addEventListener('online',function(){LoadScriptIfNeedI.loadLiveVideoNotification(function(){NotificationI.pushNotification(LangI.getText("app-network_ok"),true);});});window.addEventListener('offline',function(){LoadScriptIfNeedI.loadLiveVideoNotification(function(){NotificationI.pushNotification(LangI.getText("app-network_error"),true);});});}
744this.init();}
745function SocialMenu(){var self=this;this.timer=null;this.init=function(){this.setIconsVisibility();$(window).resize(function(){clearTimeout(self.timer);self.timer=setTimeout(function(){self.setIconsVisibility();},500);});}
746this.setIconsVisibility=function(){if(window.innerWidth<391&&$('.social li').length>7){this.hideShowIOSAndr();}else if(window.innerWidth<480&&$('.social li').length>8){this.hideShowIOSAndr();}}
747this.hideShowIOSAndr=function(){if(UtilsI.isIOS()){if($('.iosli').hasClass('over-8')){$('.androidli').addClass('over-8');$('.iosli').removeClass('over-8');}else if($('.iosli').hasClass('over-7')){$('.androidli').addClass('over-7');$('.iosli').removeClass('over-7');}}else{if($('.iosli').hasClass('over-8')){$('.iosli').addClass('over-8');$('.androidli').removeClass('over-8');}else if($('.iosli').hasClass('over-7')){$('.iosli').addClass('over-7');$('.androidli').removeClass('over-7');}}}
748this.init();}
749function TrimDescr(){var self=this;this.init=function(){if(!$('.trimmed-text, .trimmed-box-2').length){return;}
750var timeSrc=null;$(window).resize(function(){clearTimeout(timeSrc);timeSrc=setTimeout(function(){self.checkTrimmedBoxes();},500);});var timeSrc2=null;$(window).scroll(function(){clearTimeout(timeSrc2);timeSrc2=setTimeout(function(){self.checkTrimmedBoxesOnScreen();},300);});setTimeout(function(){self.checkTrimmedBoxes();self.checkTrimmedBoxesOnScreen();},10);}
751this.checkTrimmedBoxesOnScreen=function(){var windowHeight=window.innerHeight||document.documentElement.clientHeight;var coverItems=document.querySelectorAll('.coveritem');var visibleItems=[];var hiddenItems=[];for(var i=0;i<coverItems.length;i++){var elem=coverItems[i];var rect=elem.getBoundingClientRect();if(rect.top<windowHeight&&rect.bottom>0){visibleItems.push(elem);}else{hiddenItems.push(elem);}}
752for(var j=0;j<visibleItems.length;j++){visibleItems[j].classList.add('run-angle-anim');}
753for(var k=0;k<hiddenItems.length;k++){hiddenItems[k].classList.remove('run-angle-anim');}}
754this.checkTrimmedBoxes=function(){var $elements=$('.trimmed-text:not(.dis-trimm)');var trimmedElements=[];$elements.find('.coveritem').remove();$elements.each(function(i,elem){var $elem=$(elem);var realH=elem.scrollHeight;var heightLimit=elem.offsetHeight;if(!heightLimit){heightLimit=$elem.hasClass('v275')?275:350;}
755if(realH>heightLimit){var $whiteLink=$elem.find('.white-link').eq(0);var href=$whiteLink.attr('href');trimmedElements.push({elem:elem,heightLimit:heightLimit,href:href,text:$whiteLink.text()});}});$.each(trimmedElements,function(i,data){var $elem=$(data.elem);if(data.heightLimit==275&&data.href){$elem.append('<a aria-label="'+data.text.replace('"','')+'" href="'+data.href.replace('#map','')+'" class="coveritem"><span class="fa fa-angle-double-down"></span></a>');}
755else{$elem.append('<div class="coveritem"><span class="fa fa-angle-double-down"></span></div>');}});$('.trimmed-text').off('click.trimDescr').on('click.trimDescr',function(){var $elem=$(this);var $coverItem=$elem.find('.coveritem');if(!$coverItem.attr('href')){$elem.addClass('open dis-trimm');$coverItem.remove();}});}
756this.init();}
757function DottedText(){this.init=function(){$('.more-link').click(function(){$(this).parent().addClass('show-more-text');});}
758this.init();}
759function IconSearch(elem){var self=this;this.$elem=$(elem);this.onlyMobile=false;this.init=function(){if(this.$elem.parent('.search-menu').length){this.onlyMobile=true;}
760this.bindOpen();this.bindClose();}
761this.bindOpen=function(){this.$elem.find('i').click(function(){MenuI.closeMenu();if($('.isMainPage').length&&$(this).parents('.search-menu').length){$('.radiosList .fa-search').click();$("html").scrollTop($('#Grid').offset().top);return;}
762self.$elem.find('.fa-search').hide();if(!self.onlyMobile){$('.s-hide').hide();}else{$('.social_wrapper').addClass('open-search');}
763self.$elem.addClass('open');self.$elem.find('[itemprop="query-input"]').focus();GaTrackI.ga('radio_list_searchopen',$('._radioFilter').length+self.$elem.find('[itemprop="query-input"]').attr('id'));});}
764this.bindClose=function(){this.$elem.find('.fa-close').click(function(){self.$elem.find('.fa-search').show();if(!self.onlyMobile){$('.s-hide').show();}else{$('.social_wrapper').removeClass('open-search');}
765self.$elem.removeClass('open');});}
766this.init();}
767function ListLinkClick(){this.init=function(){$("body").on('click','.radiosListLink',function(){GaTrackI.ga('radiosListLinkTarget_'+$(".isSubPage").length,$(this).attr('href'));});}
768this.init();}
769function FormErrorReset(){this.init=function(){$('.errorForm').change(function(){$(this).removeClass('errorForm');});}
770this.init();}
771function EmailFixer(){var self=this;this.init=function(){$('.js-fix-email').each(function(i,elem){self.fixText(elem);$(elem).removeClass('js-fix-email');});}
772this.fixText=function(elem){var html=$(elem).html().replace(/\[kukac\]/g,'@');$(elem).html(html);var subject=$(elem).data('subject');if(subject){var href=$(elem).find("[href*=mailto]").attr('href');if(href.indexOf(subject)==-1){$(elem).find("[href*=mailto]").attr('href',href+'?subject='+subject);}}}
773this.init();}
774function h1Link(){this.initialize=function(){$('.h1Link').click(function(){var hrf=$(this).data('url');if(hrf){window.top.location.href=hrf;}});}
775this.initialize();}
776function rand(min,max){if(min==null&&max==null){return 0;}
777if(max==null){max=min;min=0;}
778return min+Math.floor(Math.random()*(max-min+1));}
779function openInNewTab(url){var win=window.open(url,'_blank');win.focus();}
780function ClosePageListener(){this.addItem=function(callback){window.addEventListener("beforeunload",function(){callback();},false);}}
781ClosePageListenerI=new ClosePageListener();var NumberCounterAnimI;function NumberCounterAnim(){this.refreshNum=function(selector,tNumber){$(selector).each(function(){var fromNum=parseInt($(selector).html());fromNum=isNaN(fromNum)?0:fromNum;var $this=$(this);jQuery({Counter:fromNum}).animate({Counter:tNumber},{duration:2000,easing:'swing',step:function(){$this.text(Math.ceil(this.Counter));},complete:function(){$(selector).html(tNumber);}});});}}
782function userLoginEnabled(){return $(".js-userLoginBtn").length?true:false;}
783function userLoggedIn(){return CookieManagerI.get('mor-token')?true:false;}
784function userHasSubscription(){if(CookieManagerI.get("stpdsck")&&CookieManagerI.get("stpdsck").length>1){return true;}
785if(!userLoggedIn()||MyConfigI.get('subModeLvL')<1){return false;}
786return $('.hasSub').length?true:false;}
787function saveUserSettings(data,showDialog){if(!userLoggedIn()){return;}
788$.ajax({'url':BASE_URL+'/user/method/save-settings','data':data,'method':'post',}).done(function(){if(showDialog){var db=new DialogBox();db.openPopUp(LangI.getText('user-save-ok'));UserProfileI.saveCurrentFormData();}});}
789function getUserSettings(index){if(!userLoggedIn()||typeof(UserSettings)=="undefined"){return false;}
790if(UserSettings[index]=="0"){return false;}
791return UserSettings[index];}
792function Utils(){var self=this;var lastFocusState=null;this.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent);}
793this.isSafari=function(){return/iP(ad|hone|od).+Version\/[\d\.]+.*Safari/i.test(navigator.userAgent);}
794this.checkLyricsAllow=function(){if(!$('.song-list-cont').length||$('.song-list-cont').data('dis-lyr')){return false;}
795return true;}
796this.initFocusListener=function(callback){var hidden,visibilityChange;if(typeof document.hidden!=="undefined"){hidden="hidden";visibilityChange="visibilitychange";}else if(typeof document.mozHidden!=="undefined"){hidden="mozHidden";visibilityChange="mozvisibilitychange";}else if(typeof document.msHidden!=="undefined"){hidden="msHidden";visibilityChange="msvisibilitychange";}else if(typeof document.webkitHidden!=="undefined"){hidden="webkitHidden";visibilityChange="webkitvisibilitychange";}
797setTimeout(function(){GaTrackI.ga('send','event','focus','e'+(document[hidden]?0:1));},5000);if(visibilityChange){document.addEventListener(visibilityChange,function(){callback(hidden);},false);}}
798this.initFocusListenerV2=function(callback){this.initFocusListener(function(hidden){self.runFocusChange(!document[hidden],callback);});window.addEventListener('pagehide',function(){self.runFocusChange(false,callback);});window.addEventListener('pageshow',function(){self.runFocusChange(true,callback);});}
799this.runFocusChange=function(state,callback){var current=state;if(lastFocusState===current)
800return;lastFocusState=current;callback(state);}
801this.getDateByServerOffset=function(){var serverOffsetSeconds=$('html').attr('data-time-zone');var now=new Date();var utcMs=now.getTime()+(now.getTimezoneOffset()*60000);var serverMs=utcMs+(parseInt(serverOffsetSeconds,10)*1000);var d=new Date(serverMs);function pad2(n){return n<10?'0'+n:''+n;}
802return d.getFullYear()+'-'+pad2(d.getMonth()+1)+'-'+pad2(d.getDate());}}
803var UtilsI=new Utils();
804function MyMarquee(){var self=this;
804this.init=function(){$('.sf-menu .over1').mouseenter(function(){self.runEnter($(this).siblings('.js-marquee')[0]);});$('.sf-menu .over1').mouseleave(function(){self.rundLeave($(this).siblings('.js-marquee')[0]);});$(".scrolledRadioContentDef, .marquee-cont, .item-box.mrecom").on('mouseenter','.js-marquee',function(){self.runEnter(this);});$(".scrolledRadioContentDef, .marquee-cont, .item-box.mrecom").on('mouseleave','.js-marquee',function(){self.rundLeave(this);});}
805this.runEnter=function(cont){$(cont).css('text-overflow','clip');var span=$(cont).find('span').eq(0);var fullW=$(cont).width();var fullWS=span.width();if(fullW>=fullWS){return;}
806var speed=(fullWS-fullW+2)*25;cont.myAnim=span.animate({'margin-left':(fullWS-fullW+2)*-1},speed,"linear");}
807this.rundLeave=function(cont){if(cont&&cont.myAnim){$(cont).find('span').css('margin-left','0');$(cont).css('text-overflow','ellipsis');cont.myAnim.stop();}}
808this.init();}
809$(document).ready(function(){if(!isMobile()){new MyMarquee();}});
810var FB;var FBSDK;function Fbsdk(){var self=this;this.appId='';this.userID=null;this.accessToken=null;this.timeSrc=null;this.commentIDs=new Array();this.needFB=false;this.apiV='v20.0';this.authStatus=0;this.callbackInitStack=null;this.callbackLoginStack=null;this.init=function(){if(this.appId!=''){return;}
811this.appId=parseInt($("body").attr('data-fb-api-id'));if(getUserSettings('fb-off')){$('.fb-shrbtn, .js-fbSend, [class^="fb-like"], [class^="fb-page"], .isMainPage .span3').remove();}
812if($('[class^="fb-"]').length&&!navigator.userAgent.match(/SMART-TV|SmartTV|Smart TV/i)){self.initScrollListener();}else{$('.js-fbSend, [class^="fb-"]').remove();}}
813this.startFB=function(){window.fbAsyncInit=function(){FB.init({appId:self.appId,status:true,cookie:false,version:self.apiV,xfbml:true});FB.Event.subscribe('message.send',function(response){$('.js-fbSend h3').html(LangI.getText('lyrics-help-thanks')+" :)");GaTrackI.ga('fb-functions','message.send');$.ajax({type:"POST",url:BASE_URL+"/send-button-notify",data:{'data':response}});});
813FB.Event.subscribe('comment.create',function(response){if(self.commentIDs.indexOf(response.commentID)!==-1){return;}
814self.commentIDs.push(response.commentID);$.ajax({type:"POST",url:BASE_URL+"/commentbox-notify",data:{'data':response}});GaTrackI.ga('fb-functions','comment.create');});FB.Event.subscribe('xfbml.render',function(response){if($('.fb-comments iframe').length){var src=$('.fb-comments iframe').attr('src');var width=$(".fb-comments").parent().width()-20;$('.fb-comments iframe').attr('src',src.replace(/width=\d*/g,'width='+width));}});self.bindClickListen();if(self.callbackInitStack!=null){self.callbackInitStack();}};var locale=$("html").data('locale');if(LangI.actLang=="de"){locale="de_DE";}
815(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id))
816return;js=d.createElement(s);js.id=id;js.async=true;js.defer=true;js.src="//connect.facebook.net/"+locale+"/sdk.js#xfbml=1&version="+self.apiV+"&appId=702858859794237";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));}
817this.initScrollListener=function(){$(window).scroll(function(){if(!$('.lazy-social').length){return;}
818self.checkInitNeed();});self.checkInitNeed(true);}
819this.checkInitNeed=function(noParse){var wH=window.innerHeight+$(window).scrollTop()+100;var reInitNeed=false;$('.lazy-social').each(function(i,elem){if(wH>$(elem).offset().top&&!$(elem).is(":hidden")){var t=$(elem).removeClass('lazy-social').attr('class').replace('-lazy-social','');$(elem).attr('class',t);reInitNeed=true;if(false&&$(elem).parents('.errorReportCont').length){$(elem).parents('.errorReportCont').addClass('js-bounceBox');}}});if(reInitNeed&&!FB){self.startFB();}else if(reInitNeed&&!noParse){FB.XFBML.parse();}}
820this.bindClickListen=function(){window.addEventListener('blur',function(){if(document.activeElement&&document.activeElement.nodeName=="IFRAME"){var mFrame=$(document.activeElement);var src=mFrame.attr('src');if(src&&(src.indexOf("cfusion")>-1||(mFrame.attr('class')&&mFrame.attr('class').indexOf('js-lgenFrame')>-1))){GaTrackI.ga("leadgen_click",'1');$.ajax({'url':BASE_URL+'/view.gif/'+btoa('/leadgen_click')});return;}
821if(mFrame.hasClass('fb-fanbox-layer')){GaTrackI.ga("radio-affi-hit",src);}else if(mFrame.hasClass('affi-frame')){GaTrackI.ga("radio-affi-hit",src);}
822if(src&&src.indexOf("youtube")==-1&&src.indexOf("facebook")==-1&&src.indexOf("soundcloud")==-1){if(src.indexOf('googlesyndication.')>-1||src.indexOf('doubleclick.net')>-1){GaTrackI.ga("frame-src",'gdsns');}else{GaTrackI.ga("frame-src",src);}
823if(isMobile()&&src.indexOf("googleads")>-1){if($('.js-appAdv').data('shild-closed')>$.now()-5000){GaTrackI.ga('ad-shild','2');}}}
824if(!src||src.indexOf('facebook')==-1||src.indexOf('googleads')>-1){return;}
825var href=src.match(/href=([^&]*)/);var action=src.match(/action=([^&]*)/);var type="like";if(action){type=action[1];}else if(src.match(/page\.php/)){type="page";}else if(src.match(/video\.php/)){type="videoplay";}
826var send=src.match(/send=([^&]*)/);type+=send&&send[1]=="true"?'_send':'';var share=src.match(/share=([^&]*)/);type+=share&&share[1]=="true"?'_share':'';if($(document.activeElement).data('extra')){type+='_'+$(document.activeElement).data('extra');}
827if(type=="like"){if($('body').hasClass('isMainPage')){type+="_main";}else{type+="_sub";}}
828var visitNum=Math.floor(CookieManagerI.getPageVisitNum()/10);try{if(href&&href.length){GaTrackI.ga('fb-event',type,href[1]+' - '+visitNum);}}catch(e){ConsoleDebuggerI.pushMsg("FB event error: "+e.toString()+' - '+src+" #important");}}});}
829this.startPureChat=function(){if((!MyConfigI.get('page_id'))||typeof(ConsoleDebuggerI)=="undefined"||CookieManagerI.get('consoleDebugger')!="1"){return;}
830try{var html='<div class="fb-customerchat"\
831      attribution="setup_tool"\
832      page_id="'+MyConfigI.get('page_id')+'"\
833      minimized="false"\
834      greeting_dialog_delay="0"\
835      logged_in_greeting="'+LangI.getText('stdebug-messenger-start')+'"\
836      logged_out_greeting="'+LangI.getText('stdebug-messenger-start')+'">\
837       </div>';$("body").append(html);window.fbAsyncInit=function(){FB.init({appId:self.appId,status:true,version:self.apiV,xfbml:true});FB.Event.subscribe('messaging_postbacks',function(response){console.log("response",response);});};(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id))
838return;js=d.createElement(s);js.id=id;js.src='https://connect.facebook.net/'+LangI.langLocale+'/sdk/xfbml.customerchat.js';fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));}catch(e){ConsoleDebuggerI.pushMsg("PurechatApi: "+e.toString());}}
839this.bindFbShare=function(){$('.fb-shrbtn').click(function(){window.open('https://www.facebook.com/sharer/sharer.php?u='+window.location.href,'facebook-share-dialog','width=800,height=600');GaTrackI.ga('fbshrbtn',window.location.pathname);});}}
840FBSDK=new Fbsdk();$(window).on('load',function(){var time=$(".push-news-noti-info").length?6000:10000;if($('.js-loginFacebook').length||document.location.hash.indexOf("#facebook-comment")>-1||getUserSettings('fb-off')){time=0;}
841setTimeout(function(){FBSDK.init();},time);setTimeout(function(){FBSDK.bindFbShare();},1000);});
842var SongListI=new Array();function SongList(container){var self=this;var $container=$(container);this.plusUrl=$container.data("url");this.baseUrl=$container.data("host");this.lastDay=null;this.songReqRun=false;this.defContHeight=0;this.openedWindow=null;this.timeFreq=60;this.songListScrollTop=null;this.actHash='';this.lastSongData={'now_playing':{}};this.init=function(){this.actHash=$container.data("hash")?$container.data("hash"):'';var tStamp=self.getNowTimestamp();var rList=$('.mRadioPlayer .scrolledRadioContentDef');
842if((rList.length&&tStamp>rList.data('last-refreh')+self.timeFreq)||!$('.mRadioPlayer .scrolledRadioContentDef').length){this.getSongs(0,'',true);}else{setTimeout(function(){$container.addClass('js-lazyCont');if(LazyLoadImgI){LazyLoadImgI.checkPicLoadingNeed();}
843self.scrollToSong('');},1500);}
844this.initCalendar();if($('body.is-app').length){this.bindScrollListener();}
845this.getFirstSong();}
846this.getFirstSong=function(){var $items=$container.find('.songCont');if(!$items.length){return;}
847var $item=$items.eq(0);var t=$item.find('.txt2').text();var n=$item.find('.txt1').text().replace(t,'').trim();var img=$item.find('img').attr('data-lazy-load');self.lastSongData={'now_playing':{'artist':n,'track':'f','rs_youtube_id':$item.data('youtube'),'rs_id':$item.data('rsid'),'time':t,'live':0,'itunes_pic':(img&&img.indexOf('mzstatic')>-1?img:""),}};}
848this.bindScrollListener=function(){$('.slimScrollDivSongList1').on('scroll',function(){if($(this).scrollTop()+$(this).innerHeight()>=$(this)[0].scrollHeight){$('._moreSong').click();}});}
849this.initCalendar=function(){$container.find("._calendarIconCont").unbind("click");$container.find("._calendarIconCont").click(function(){var $tmpCont=$(this);LoadScriptIfNeedI.loadJqueryUITimePicker(function(){self.initCalendarLazy($tmpCont);});});}
850this.initCalendarLazy=function($tmpCont,noOpen){if(typeof(jQuery.fn.datetimepicker)=="undefined"){return;}
851$container.find("._calendarIconCont").unbind("click");$tmpCont.find(".js-songDatepicker").datetimepicker({dateFormat:'yy-mm-dd',minDate:'-30D',maxDate:'+0D',alwaysSetTime:false,onClose:function(date,obj,param,param2){var lastD=(''+obj.selectedDay).length<2?'0'+obj.selectedDay:obj.selectedDay;if(self.lastDay==lastD){self.scrollToSong(param.formattedTime);return;}
852self.lastDay=lastD;$tmpCont.find('.js-actDate').html(lastD);self.getSongs(0,param.formattedTime);}});$tmpCont.click(function(){$tmpCont.find(".js-songDatepicker").datetimepicker("show");GaTrackI.ga('send','event','datepicker_song_list');});MyDatePickerI.setDatepickerRegional();if(!noOpen){setTimeout(function(){$tmpCont.find(".js-songDatepicker").datetimepicker("show");},isMobile()?1000:10);}}
853this.refreshServerSongs=function(hash){if(this.actHash!=hash){this.actHash=hash;this.getSongs(0,'',true);}}
854this.getSongs=function(rs_id,formattedTime,fromCache){if(this.songReqRun){return;}
855this.songReqRun=true;var plusU=fromCache?'/'+self.plusUrl+(this.actHash?'/'+this.actHash:''):'';var withCredentials=false;if(this.baseUrl){var sU=this.baseUrl;withCredentials=true;}else{var sU=BASE_URL;}
856var url=fromCache?sU+'/get-song'+plusU+'?t='+$.now():sU+'/get-song';var rid=$container.data('rid');var opts={'url':url,'data':{'rid':rid,'rs_id':rs_id,'date':$container.find('.js-songDatepicker').val(),'hash':this.actHash},'method':'post','dataType':'json','xhrFields':{'withCredentials':withCredentials},};if(fromCache){opts['method']='get';}
857$.ajax(opts).done(function(resp){if(typeof(resp)=="undefined"||!resp.length){self.songReqRun=false;return;}
858if(rs_id==0&&!formattedTime&&typeof(LoadActRadioDataI)!="undefined"){self.lastSongData={'now_playing':{'artist':resp[0]['rs_artist'],'track':resp[0]['rs_track'],'rs_youtube_id':resp[0]['rs_youtube_id'],'rs_id':resp[0]['rs_id'],'time':resp[0]['time'],'live':resp[0]['live'],'itunes_pic':resp[0]['itunes_pic'],}};if(resp[0]['listeners']){self.lastSongData['listeners']=resp[0]['listeners'];}}
859if(typeof(LoadActRadioDataCoreI)!="undefined"&&LoadActRadioDataI[self.plusUrl]){LoadActRadioDataCoreI.putActSong(self.lastSongData,LoadActRadioDataI[self.plusUrl].getContainer());}
860if(rs_id==0){$container.find('._songList').html('');}
861var noLazyLoad=rs_id||formattedTime?true:false;noLazyLoad=false;self.buildSongList(resp,noLazyLoad,formattedTime);self.scrollToSong(formattedTime);self.songReqRun=false;}).fail(function(){self.songReqRun=false;});}
862this.scrollToSong=function(formattedTime){var last=null;if(formattedTime){$container.find('._songList .txt2').each(function(i,elem){if($(elem).html()>=formattedTime){last=elem;}else{return;}});}
863this.initSongListContainer(last);}
864this.buildSongList=function(datas,noLazy,allSong){var html='';for(i in datas){html+=this.getSongHtml(datas[i],!noLazy,i);}
865if(datas.length){if(!$container.find('._moreSong').length){html+='<div class="kv1_pad kpad3 _moreSong">'+LangI.getText('get-older-songs')+'</div>';$container.find('._songList').append(html);}else{$container.find('._moreSong').before(html);}}else{$container.find('._moreSong').remove();}
866if(allSong){$container.find('._moreSong').remove();}
867if(!noLazy){$container.addClass('js-lazyCont');if(typeof LazyLoadImgI!=='undefined'&&LazyLoadImgI){setTimeout(function(){LazyLoadImgI.checkPicLoadingNeed();},10);}}}
868this.initSongListContainer=function(last){self.bindMoreButton();HearBackVideoI.bindVideoOpener();var $scrollContainer=$container.find('.slimScrollDivSongList');if(!$scrollContainer.length||typeof $.fn.slimscroll!=='function'||typeof $.fn.slimscrollFirstUse!=='function'){return;}
869if(last){this.songListScrollTop=null;
869$scrollContainer[0].scrollTop=0;var lastPosition=$(last).position();if(lastPosition){this.songListScrollTop=lastPosition.top;$scrollContainer[0].scrollTop=lastPosition.top;}}
870var initScroll=function($elements){var containerHeight=$container.height();if(containerHeight<40){return;}
871if(!self.defContHeight||parseInt(self.defContHeight,10)<0){self.defContHeight=containerHeight-40+'px';}
872var initialized=$elements.parent().hasClass('slimScrollDiv');var scrollTop=self.songListScrollTop!==null?self.songListScrollTop:$elements[0].scrollTop;var options={disableFadeOut:true,height:self.defContHeight,railVisible:true,alwaysVisible:true};if(initialized&&self.songListScrollTop!==null){options.scrollTo=self.songListScrollTop+'px';}
873$elements.slimscroll(options).off('slimscrolling.songList').on('slimscrolling.songList',function(e,pos){var maxHeight=$container.find('._songList').height();var contHeight=$(this).height();if(maxHeight-contHeight<=pos+30){$container.find('._moreSong').trigger('click');}});if(!initialized&&scrollTop){$elements.slimscroll({scrollTo:scrollTop+'px'});}
874self.songListScrollTop=null;var $scrollBar=$container.find('.slimScrollBar');if($scrollBar.length&&$scrollBar.height()+50>$elements.height()){setTimeout(function(){$elements.slimscroll({scrollTo:'0px'});},100);}}
875if($scrollContainer.parent().hasClass('slimScrollDiv')){initScroll($scrollContainer);}else{$scrollContainer.slimscrollFirstUse(initScroll);}}
876this.getSongHtml=function(datas,lazyLoad,index){if(!datas['rs_artist']&&!datas['rs_track']){return'';}
877var src='';var imgExt=$('.webp-bg').length?"webp":"jpg";if(!datas.rs_track&&$('[itemprop="image"]').length){src=$('[itemprop="image"]').attr('href').replace("play_250_250","list_45");}else if(datas.itunes_pic){if(datas.itunes_pic.indexOf('radio_img')!==-1){src=datas.itunes_pic.replace("play_250_250","list_45");}else if(datas.itunes_pic.indexOf('http')===0){src=datas.itunes_pic;}else{if(datas.itunes_pic.indexOf('.jpg')>-1||datas.itunes_pic.indexOf('.png')>-1||datas.itunes_pic.indexOf('.tif')>-1){src='https://is1-ssl.mzstatic.com/image/thumb/'+datas.itunes_pic+'/50x50bb.'+imgExt;}else{src='https://is1-ssl.mzstatic.com/image/thumb/'+datas.itunes_pic+'/source/50x50bb.'+imgExt;}}}else if(datas.rs_youtube_id){src='https://i1.ytimg.com/'+(imgExt?"vi_webp":"vi")+'/'+datas.rs_youtube_id+'/default.'+imgExt;}
878var imgSrc=lazyLoad?(this.baseUrl?this.baseUrl:'')+'/public/img/1x1.png':src;var lazySrc=lazyLoad?src:'';var html='';html+='<div itemprop="track" itemscope itemtype="https://schema.org/MusicRecording" title="'+LangI.getText('click-and-hear-back')+'" data-toggle="tooltip" data-placement="'+(index==0?'bottom':'top')+'" class="kv1_pad kpad3 thumbnail songCont _rsId'+datas['rs_id']+'" data-youtube="'+datas['rs_youtube_id']+'" data-rsid="'+datas['rs_id']+'">';html+='<meta itemprop="identifier" content="'+datas['rs_id']+'"><span class="cont anim">';html+='<img itemprop="image" class="'+(lazyLoad?'js-img-lload':'')+'" height="50" width="50" data-lazy-load="'+lazySrc+'" src="'+imgSrc+'" alt="'+datas['rs_artist']+((datas['rs_track'])?' - '+datas['rs_track']:'')+'" >';html+='</span>';html+='<div class="txt1 anim"><span itemprop="publication" itemscope itemtype="https://schema.org/BroadcastEvent"><span itemprop="startDate" content="'+datas['time_c']+'" class="txt2" title="'+(datas['f_time']?datas['f_time']:'')+'">'+datas['time']+'</span></span>';html+='<span itemprop="byArtist">'+datas['rs_artist']+((datas['rs_track'])?'</span> - <span itemprop="name">'+datas['rs_track']:'')+'</span></div></div>';html+='<div class="line1 clear"></div>';return html;}
879this.loadCoverImg=function(){var plusUrl=$('.mRadioPlayer').data('url');
879if(typeof(LoadActRadioDataCoreI)!="undefined"&&LoadActRadioDataI[plusUrl]){var songCont=$('.song-list-cont .songCont').eq(0);var iSrc=songCont.find('img').attr('src');if(iSrc=="/public/img/1x1.png"){iSrc=songCont.find('img').attr('data-lazy-load');}
880var itunePic='';if(iSrc&&iSrc.indexOf('Music')>-1){if(iSrc.indexOf('source')>-1){var m=iSrc.match(/thumb\/(.*)\/source/);if(m&&m[1]){itunePic=m[1];}}else if(iSrc.indexOf('.webp')>-1){var m=iSrc.match(/thumb\/(.*)\/50x50bb.webp/);if(m&&m[1]){itunePic=m[1];}}else if(iSrc.indexOf('.jpg')>-1){var m=iSrc.match(/thumb\/(.*)\/50x50bb.jpg/);if(m&&m[1]){itunePic=m[1];}}}else if(iSrc&&iSrc.indexOf('radio_img')>-1){itunePic=iSrc;}
881LoadActRadioDataCoreI.setSongCover({'rs_youtube_id':songCont.data('youtube'),'rs_track':'f','rs_id':songCont.data('rsid'),'itunes_pic':itunePic,},LoadActRadioDataI[plusUrl].getContainer());}}
882this.putOneSong=function(datas){if(!$container.find('.songCont').length||$container.find('._rsId'+datas['rs_id']).length||datas['rs_id']==undefined){return;}
883var html=this.getSongHtml(datas);$container.find('._songList').prepend(html);this.initSongListContainer();}
884this.bindMoreButton=function(){$container.find('._moreSong').unbind('click').click(function(){GaTrackI.ga('send','event','moreSong',document.location.pathname);self.getSongs($container.find('._songList .songCont').last().attr('data-rsid'));});}
885this.getContainer=function(){return $container;}
886this.getNowTimestamp=function(){return Math.floor(Date.now()/1000);}}
887$(document).ready(function(){$('.song-list-cont').each(function(i,elem){var url=$(elem).data('url');SongListI[url]=new SongList(elem);SongListI[url].init();});});
888function RadioListSongs(){var self=this;this.timeSrc=null;this.focus=true;this.lastSync=0;this.requestOn=false;this.onScreen=false;this.scrollTimer=null;this.timeFreq=60;this.init=function(){if(!$('.scrolledRadioContentDef').length){return;}
889this.lastSync=$('.scrolledRadioContentDef').data('last-refreh');this.onScreenListener();UtilsI.initFocusListener(self.initFocusListener);}
890this.sendRequest=function(){if(this.requestOn){return;}
891if(this.onScreen===false){return;}
892var tStamp=self.getNowTimestamp();if(tStamp<self.lastSync+self.timeFreq){self.delayNextRequest();return;}
893this.requestOn=true;self.lastSync=this.getNowTimestamp();$.ajax({'async':true,'url':BASE_URL+'/get-radio-list-songs','cache':false,'dataType':'json'}).done(function(resp){self.refreshSongList(resp);self.delayNextRequest();self.requestOn=false;});}
894this.refreshSongList=function(radios){if(!radios){return;}
895var radioElements=document.querySelectorAll('.mradio.radiosListLink[data-rid]');for(var i=0;i<radioElements.length;i++){var radioElement=radioElements[i];var rid=radioElement.getAttribute('data-rid');var radioData=radios[rid];if(!radioData||!radioData['title']){continue;}
896var icon=radioData['type']==2?'fa fa-volume-up':'fa fa-music';var title=''+radioData['title'];var titleElements=radioElement.querySelectorAll('.program-name span');for(var j=0;j<titleElements.length;j++){var titleElement=titleElements[j];if(titleElement.className!=icon){titleElement.className=icon;}
897if(titleElement.textContent!=title){titleElement.textContent=title;}}}}
898this.delayNextRequest=function(){clearTimeout(self.timeSrc);self.timeSrc=null;this.timeSrc=setTimeout(function(){self.sendRequest();},this.timeFreq*1000);}
899this.initFocusListener=function(hidden){clearTimeout(self.timeSrc);self.timeSrc=null;if(document[hidden]){self.focus=false;}else{self.focus=true;self.sendRequest();self.delayNextRequest();}}
900this.onScreenListener=function(){$(window).off('scroll.radioListSongs').on('scroll.radioListSongs',function(){clearTimeout(self.scrollTimer);self.scrollTimer=setTimeout(function(){self.checkOnScreen();},100);});self.scrollTimer=setTimeout(function(){self.checkOnScreen();},10);}
901this.checkOnScreen=function(){var elements=document.querySelectorAll('.scrolledRadioContentDef');var windowHeight=window.innerHeight||document.documentElement.clientHeight;var onScreen=false;for(var i=0;i<elements.length;i++){var rect=elements[i].getBoundingClientRect();if(rect.left==rect.right&&rect.top==rect.bottom){continue;}
902if(rect.top+40<windowHeight){onScreen=true;break;}}
903self.onScreen=onScreen;if(self.onScreen){if(!self.timeSrc){self.sendRequest();}}else{clearTimeout(self.timeSrc);self.timeSrc=null;}}
904this.getNowTimestamp=function(){return Math.floor(Date.now()/1000);}
905this.init();}
906$(document).ready(function(){new RadioListSongs();});
907var DialogStack=new Array();function DialogBox(noReset){var self=this;this.closeCallback=null;this.okCallback=null;this.initialize=function(noReset){if($(".overlay").length&&$(".popup_layer").data("auto-open")==true){this.openPopUp($('._popUpMessage').html(),$('._popUpTitle').html());$(".popup_layer").data("auto-open",'0');}
908if(!noReset){$(".popup_layer ._close").unbind('click');this.resetConfirm();}
909this.listenResize();}
910this.openPopUp=function(msg,title,disableButtons,maxHeight,maxWidth,onlyCloseBtn,forceOpen){if(!$(".overlay").length||(!msg&&!title)){return;}
911$('._popUpMessage').html(msg);if(title){$('._popUpTitle').show();$('._popUpTitle').html(title);}else{$('._popUpTitle').hide();}
912if(disableButtons){$('.layer_cont').addClass('disable-btns');}else{$('.layer_cont').removeClass('disable-btns');}
913$(".overlay").css('display','block');$(".popup_layer").css('display','block');if(maxWidth){$('.layer_cont').css('max-width',maxWidth);}else{$('.layer_cont').css('max-width','none');}
914this.bindClosePopUp(onlyCloseBtn);this.checkContentHeight(maxHeight);this.resizeFrame();this.setCenter();if(AddAdsV2I.hasAdblock()&&$(".overlay").css('display')=="none"){alert(msg.replace(/(<([^>]+)>)/gi,""));}}
915this.bindClosePopUp=function(onlyCloseBtn){$(onlyCloseBtn?"._close.fa-close, .button_blue._close":"._close").click(function(e){e.preventDefault();if($(this).hasClass('button_red')||self.closeCallback===self.okCallback){if(self.closeCallback!==null){self.closeCallback();self.closeCallback=null;}}
916if($(this).hasClass('button_blue')&&self.closeCallback==null){if(self.okCallback!==null){self.okCallback();self.okCallback=null;}}
917self.closePopUp();self.checkDialogStack();});}
918this.checkDialogStack=function(){if(DialogStack.length){setTimeout(function(){var data=DialogStack.pop();if(typeof(data)!="undefined"){var db=new DialogBox();db.openPopUp(data['msg'],data['title'],data['disableButtons'],data['maxHeight'],data['maxWidth'],data['onlyCloseBtn']);}else{self.checkDialogStack();}},1000);}}
919this.bindCloseCallback=function(callback){this.closeCallback=callback;}
920this.bindOkCallback=function(callback){this.okCallback=callback;}
921this.closePopUp=function(){if($(".overlay").length){$(".popup_layer").hide();$(".overlay").hide();$('._popUpMessage').html('');$('.layer_cont').css('text-align','');}}
922this.bindConfirm=function(callbackYes,callbackNo,align){if(align){$('.layer_cont').css('text-align',align);}else{$('.layer_cont').css('text-align','left');}
923this.resetConfirm();$(".layer_cont button._close").html(LangI.getText('shazam-succ-quest-no')).addClass('button_red');$(".layer_cont button._close").after('<button class="button_blue js-confirmOk" style="margin-left: 20px;" type="submit">'+LangI.getText('shazam-succ-quest-yes')+'</button>');if(callbackYes){$('.js-confirmOk').click(callbackYes);}
924if(callbackNo){$(".layer_cont button._close.button_red,.layer_cont ._close,.popup_layer .overlay._close").click(callbackNo);}}
925this.resetConfirm=function(){if($(".layer_cont button").length<2){return;}
926$('.js-confirmOk, .layer_cont button._close.button_red,.layer_cont ._close').unbind('click');$(".layer_cont button").eq(1).remove();$(".layer_cont button").removeClass('button_red');$(".layer_cont button").html($(".layer_cont button").data('original'));}
927this.setContent=function(text){$('.popup_layer ._popUpMessage').html(text);}
928this.setTitle=function(text){$(".popup_layer ._popUpTitle").html(text);}
929this.setCenter=function(){var STop=$(window).scrollTop();var wWidth=$(window).width()-15;var wHeight=window.innerHeight;var boxH=$('.layer_cont').outerHeight();var boxW=$('.layer_cont').outerWidth();var t=STop+wHeight/2-boxH/2;t=(t<15)?15:t;if(STop>t){t=STop;}
930var left=wWidth/2-boxW/2;if(left<=0){left=0;}
931$('.layer_cont').css({'top':t,'left':left});}
932this.setTitleAlign=function(align){$('._popUpTitle').css('text-align',align);}
933this.listenResize=function(){$(window).resize(function(){self.resizeFrame();self.setCenter();});}
934this.resizeFrame=function(){if($('.layer_cont').hasClass('disable-btns')&&!$('.affi-frame').hasClass('fix-height')&&$('.layer_cont').find('iframe').length){var $frame=$('.layer_cont').find('iframe');var w=$frame.attr('width');var rw=$frame.width();var h=$frame.attr('height');var ratio=h/w;var nH=rw*ratio;if(nH>window.innerHeight){nH=(window.innerHeight>500?500:window.innerHeight-50);$frame.css('width',nH/ratio+'px');}
935$frame.css('height',nH+'px');}}
936this.checkContentHeight=function(maxHeight){if(typeof(maxHeight)=="undefined"||maxHeight==null){if($('.layer_cont .slimScrollDiv').length){$(".popup_layer ._popUpMessage").slimScroll({destroy:true});$(".popup_layer ._popUpMessage").css('height','auto');}
937return;}
938var options={disableFadeOut:false,height:'300px',};if(typeof(slimscroll)!="undefined"){$('.popup_layer ._popUpMessage').slimscroll(options);}}
939this.detectUserInteraction=function(){}
940this.initialize(noReset);}
941$(document).ready(function(){new DialogBox(true);});
942function CookiePolicy(){var self=this;this.cookieM=new CookieManager();this.init=function(){if(MyConfigI.get("sgdpr")||$('.is-app').length||$('.embed').length||(typeof(MyCmpI)!="undefined"&&MyCmpI!=null&&MyCmpI.isLoaded==true)){return;}
943this.checkStatus();}
944this.bindClose=function(){$('.js-cookiePolicyOke').click(function(e){e.preventDefault();$(".cookie-policy").css('display','none');self.cookieM.set('CookiePolicyOke','1','365','/');GaTrackI.ga('cookie-policy-accept');})}
945this.checkStatus=function(){if(this.cookieM.get('CookiePolicyOke')!="1"){this.showLayer();GaTrackI.ga('send','event','cookie-a',0);}else{GaTrackI.ga('send','event','cookie-a',1);}}
946this.showLayer=function(){var posT=window.innerWidth<=480&&!$(".embed").length&&$('.html5Player').length?1:0;var plusC='bottom:0;';if(posT){plusC='top:0;';}
947var html='';html+='<div class="cookie-policy" style="'+plusC+'">';html+=LangI.getText('accept-cookie-txt',null,{"{cookie-url}":$(".ppurl").attr("href").replace("privacy-policy","cookie")});html+='<div class="cookie-policy-covcer"></div>';html+='</div>';$("body").append(html);this.bindClose();if(posT){$(".cookie-policy").css('display','block');}else{$(".cookie-policy").fadeIn();}}
948this.init();}
949$(document).ready(function(){new CookiePolicy();});
950function LiveRadioRecord(){var self=this;var allowedServers=null;this.recordON=false;this.playerURL=$(".mRadioPlayer").data("url");this.version=0;this.lastStream=null;this.lastContentType=null;this.chunks=[];this.audio=null;this.ms=null;this.controller=null;this.signal=null;this.stopTimer=null;this.startTime=null;this.maxRecTime=900000;this.timerBadge=null;this.init=function(){allowedServers=rInfo['allowRec'];this.bindRecordB();window.addEventListener('beforeunload',function(e){if(self.recordON){self.stopRecord(1);}});}
951this.bindRecordB=function(){$(document).on('click','.record-button-v2',function(e){e.preventDefault();if(AddAdsV2I.hasAdblock()){GaTrackI.ga('llrecord','-1');AddAdsV2I.showAdblockMsg('adblock_try_sub_1');}else{if(self.recordON){self.stopRecord(2);GaTrackI.ga('record_pressed_off_',document.location.pathname);}else{self.version=self.detectVersion();self.tryToRecord();GaTrackI.ga('record_pressed_on_',document.location.pathname);self.recordON=true;}}});}
952this.startRecord=function(){this.detectMime();var rsuID=$('.mRadioPlayer').data('rsu-id');if(self.version){LoadScriptIfNeedI.loadFileSaver();this.detectMime();this.pureDownload();}else{if(self.lastStream.indexOf('m3u8')>-1&&typeof(atob)!="undefined"){$('.server-row').each(function(i,elem){var sT=atob($(elem).data("source"));if(sT.indexOf('.m3u8')==-1){rsuID=$(elem).data('rsu-id');return false;}});}
953this.ajaxFrame($('.rid').val()+'/'+rsuID+'/start?record_id='+encodeURIComponent(this.getRecordID()),function(frame){});this.startTime=(new Date()).getTime();}
954this.timerBadge=new TimerBadge();this.timerBadge.icon="🔴";this.timerBadge.startTimer(null,function(){},function(){self.stopRecord(3);});clearTimeout(this.stopTimer);if(!userHasSubscription()||allowedServers.indexOf(rsuID)==-1){this.stopTimer=setTimeout(function(){self.stopRecord(4);self.timerBadge.resetTimer();},self.maxRecTime);}}
955this.stopRecord=function(source){self.recordON=false;clearTimeout(self.stopTimer);if(self.timerBadge!==null){self.timerBadge.resetTimer(true);}else{ConsoleDebuggerI.pushMsg("resetTimer NULL "+source);}
956if(self.version){var blob=new Blob(self.chunks);if(blob.size>0){var date=new Date();var dt=date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()+'_'+date.getHours()+'-'+date.getMinutes()+'-'+date.getSeconds();if(typeof(saveAs)=="undefined"){self.noSupport();}else{saveAs(blob,this.playerURL+'_'+dt+"."+self.getMimeExt());}}
957if(typeof(AbortController)!="undefined"&&self.controller!==null){self.controller.abort();}
958self.setRecordOff();}else{$.ajax({'url':'//lrrecord.myonlineradio.hu/record-live-radio-v4/'+$('.rid').val()+'/'+$('.mRadioPlayer').data('rsu-id')+'/stop?record_id='+encodeURIComponent(this.getRecordID()),dataType:'jsonp'}).always(function(){self.setRecordOff();});}
959GaTrackI.ga('llrecord','total-time',Math.round(((new Date()).getTime()-this.startTime)/1000));}
960this.tryToRecord=function(){var d=new DialogBox();d.bindConfirm(function(){$('.record-button-v2').addClass('live');d.closePopUp();self.startRecord();GaTrackI.ga('llrecord','start',document.location.href);},function(){self.setRecordOff(true);GaTrackI.ga('llrecord','skipp-start',document.location.href);},'left');var linkText='https://www.euipo.europa.eu/'+LangI.actLang+'/observatory/awareness/faqs-on-copyright/faqs-for-consumers';var link='<a target="_blank" href="'+linkText+'">'+linkText+'</a>';var copyrightPreInfo="";if(userHasSubscription()){var rsuID=String($('.mRadioPlayer').data('rsu-id'));if(allowedServers.indexOf(rsuID)==-1){copyrightPreInfo="rec-start-copyright-server-limit";}else{copyrightPreInfo="rec-start-copyright-nolimit";}}else{copyrightPreInfo="rec-start-copyright-limit";}
961d.openPopUp(LangI.getText(copyrightPreInfo)+"<br><br>"+LangI.getText('rec-start-copyright',null,{'{europeLink}':link}),LangI.getText('rec-start-lyr-title'));}
962this.setRecordOff=function(noShowPop){if(!noShowPop){var j=new DialogBox();j.openPopUp(LangI.getText('rec-radio-success'),LangI.getText('right-col-rec-radio'));}else{self.recordON=false;}
963$('.record-button-v2').removeClass('live');GaTrackI.ga('llrecord','stop',document.location.href);}
964this.ajaxFrame=function(urlParam,callback){var frame=$('<iframe class="record-live-radio-frame" style="display: none;" src="//lrrecord.myonlineradio.hu/record-live-radio-v4/'+urlParam+'"></iframe>');frame.on('load',function(){});$('body').append(frame);callback(this);}
965this.pureDownload=function(){if(typeof(AbortController)=="undefined"){self.noSupport();return;}
966this.chunks=[];this.audio=new Audio();this.ms=new MediaSource();this.controller=new AbortController();this.signal=this.controller.signal;this.audio.src=URL.createObjectURL(this.ms);this.ms.addEventListener('sourceopen',function(e){if(!self.ms||self.ms.readyState!=='open'){return;}
967var sourceBuffer=self.ms.addSourceBuffer('audio/mpeg');var stream;function pump(stream){return stream.read().then(function(data){if(data.done){if(self.recordON){self.version=0;self.startRecord();}
968return;}
969self.chunks.push(data.value);if(!sourceBuffer.updating){sourceBuffer.appendBuffer(data.value);}}).catch(function(){});}
970sourceBuffer.addEventListener('updateend',function(){pump(stream);},false);fetch(self.lastStream,{method:'GET',signal:self.signal,cache:'no-store',redirect:'follow',credentials:'omit',referrerPolicy:'no-referrer',headers:{'Accept':'audio/mpeg,audio/*,*/*','Range':'bytes=0-'}}
970).then(function(res){pump(stream=res.body.getReader())}).catch(function(error){self.version=0;self.startRecord();});},false);}
971this.detectVersion=function(){self.lastStream=$(AudioplayerServerI[this.playerURL].audio).find("source").attr('src');var status=(self.lastStream.indexOf('https')>-1?1:0)&&typeof(MediaSource)!="undefined"&&(self.lastStream.indexOf('m3u8')==-1?1:0)&&(self.lastStream.indexOf('radioplayer')==-1?1:0)&&(self.lastStream.indexOf('radio1Stream')==-1?1:0)&&MediaSource.isTypeSupported("audio/mpeg");return status;}
972this.detectMime=function(){try{var client=new XMLHttpRequest();client.open("GET",self.lastStream,true);client.send();client.onreadystatechange=function(){if(this.readyState==this.HEADERS_RECEIVED){var contentType=client.getResponseHeader("Content-Type");self.lastContentType=contentType;client.abort();}}}catch(e){}}
973this.getMimeExt=function(){var ext='mp3';if(self.lastContentType){var cType=self.lastContentType.toLowerCase();if(cType.indexOf("aac")>-1){ext='aac';}else if(cType.indexOf("ogg")>-1){ext='ogg';}else if(cType.indexOf("mp4")>-1){ext='m4a';}}
974return ext;}
975this.noSupport=function(){var db=new DialogBox();db.openPopUp("","Your browser not support this function!");}
976this.getRecordID=function(){var storageKey='rlid';var recordID=sessionStorage.getItem(storageKey);if(recordID){return recordID;}
977if(window.crypto&&window.crypto.getRandomValues){var arr=new Uint8Array(16);window.crypto.getRandomValues(arr);var hex=[];for(var i=0;i<arr.length;i++){hex.push(('0'+arr[i].toString(16)).slice(-2));}
978recordID=hex.join('');}else{recordID=Date.now()+'_'+Math.random().toString(36).substring(2);}
979sessionStorage.setItem(storageKey,recordID);return recordID;}
980this.init();}
981function Shazam(){var self=this;this.detectStart=false;this.timer=null;this.init=function(){this.bindShazamStart();}
982this.bindShazamStart=function(){$(document).on('click','.js-shazamStart',function(e){e.preventDefault();if(self.detectStart||!AudioplayerServerI[$('.mRadioPlayer').data("url")].hideBigPlayOK){return;}
983if(AddAdsV2I.hasAdblock()){AddAdsV2I.showAdblockMsg('adblock_try_sub_1_1');}else{if(rInfo['noshzm']){return;}
984GaTrackI.ga('shazam_pressed',document.location.href);var url=$(this).parents('.mRadioPlayer').data('url');if($('.song-list-cont').length){var d=new DialogBox();d.bindConfirm(function(){self.tryToShazam(url);d.closePopUp();},function(){GaTrackI.ga('shazam-skipp-start',document.location.href);},'center');d.openPopUp(LangI.getText('shazam-dialog-txt',null,{'{actSong}':$(".actSong").text()}),LangI.getText('shazam-dialog-title'));}else{self.tryToShazam(url);}}});}
985this.tryToShazam=function(url){$('.blured-img').remove();if(url){$('.js-appAdv').show();}
986$('.js-shazamStart').addClass('live');self.shazamStart();}
987this.shazamStart=function(){self.detectStart=true;this.startDetection();this.startAnimation();}
988this.startAnimation=function(){$('.song-cover-cont,.js-appAdv').css({"min-height":"250px"});$('.cover-slider-cont').hide();$('.js-appAdv:visible + .player-extras').hide();$('.js-appAdv').html('<div id="preloader"><div id="loader"></div></div>');}
989this.startDetection=function(){clearTimeout(this.timer);$.ajax({'url':BASE_URL+'/detect-song','method':'post','dataType':'json','data':{'rid':$('.rid').val(),'rsu_id':$('.mRadioPlayer').data('rsu-id')}}).done(function(resp){var msg='<div class="detect-song-result"><div class="dsr-text">'+LangI.getText('shazam-fail')+'</span></div></div>';if(resp['status']=='1'){GaTrackI.ga('shazam','succes-detect',document.location.href);var msg='<div class="detect-song-result">';var iimg=LoadActRadioDataCoreI.buildCoverImgUrl({'itunes_pic':resp['data']['itunes'],'rs_youtube_id':resp['data']['youtube'],});msg+='<img class="sng-dtct-img" data-youtube="'+resp['data']['youtube']+'" width="'+(resp['data']['itunes']?"250":"300")+'" src="'+iimg+'">';msg+='<div class="dsr-text">'+LangI.getText('shazam-song-title-label')+': <span>'+resp['data']['artist']+' - '+resp['data']['title']+'</span></div>';msg+='<div class="dsr-qst">\n\
990       '+LangI.getText('shazam-succ-quest')+'<br>\n\
991       <a href="javascript:GaTrackI.ga(\'shazam_pay\')">'+LangI.getText('shazam-succ-quest-yes')+'</a>\n\
992       <a href="javascript:GaTrackI.ga(\'shazam_no-pay\')">'+LangI.getText('shazam-succ-quest-no')+'</a>\n\
993      </div>';msg+='</div>';}else if(resp['status']=='3003'||resp['status']=='30033'){GaTrackI.ga('shazam_'+resp['status']=="3003"?"partner-limit":"own-limit");var msg='<div class="detect-song-result">';var yesBtn='GaTrackI.ga(\'shazam_44\')';
993if(userLoginEnabled()){yesBtn='SubscriptionI.showMotiLayer()';}
994msg+='<div class="dsr-text">'+LangI.getText('shazam-sorry-txt')+'</span></div>';msg+='<div class="dsr-qst">\n\
995       '+LangI.getText('shazam-pay')+'<br>\n\
996       <a href="javascript:'+yesBtn+'">'+LangI.getText('shazam-succ-quest-yes')+'</a>\n\
997       <a href="javascript:GaTrackI.ga(\'shazam_55\')">'+LangI.getText('shazam-succ-quest-no')+'</a>\n\
998      </div>';msg+='</div>';}else{GaTrackI.ga('shazam-detect-fail',document.location.href);}
999$('.js-appAdv').addClass('appAdvAutoH').html(msg);$('.detect-song-result').fadeIn();self.bindQuestion();self.detectStart=false;self.resetAdv();if(resp['data']&&resp['data']['youtube']){self.bindYTOpen(resp['data']['youtube']);}
1000$('.js-shazamStart').removeClass('live');});}
1001this.bindYTOpen=function(key){var HearBackVideoI=new HearBackVideo();$('.detect-song-result img').click(function(){HearBackVideoI.bindVideoClick(key);});}
1002this.resetAdv=function(){this.timer=setTimeout(function(){$('.song-cover-cont,.js-appAdv').css({"min-height":""});if($('.disableAds').length){$('.js-appAdv').hide();$('.player-extras').show();}
1003$('.js-appAdv').removeClass('appAdvAutoH');AddAdsV2I.showedAppBnr=false;AddAdsV2I.addRadioPage_App();},15000);}
1004this.bindQuestion=function(){$('.dsr-qst a').click(function(){$('.dsr-qst').html(LangI.getText('shazam-thanks')).delay(1000).fadeOut();});}
1005this.shzDtcEnd=function(){return this.detectStart===false&&!$('.detect-song-result').length;}
1006this.init();}
1007var ShazamI=null;
1008function MyRadioList(){var self=this;this.reqRun=false;this.maxPage=null;this.bigestPage=1;this.historyMod=false;this.originElem;this.cache={};this.init=function(){this.historyMod=$('.isMainPage').length;this.originElem=$('.radiosList .scrolledRadioContentDef .radiosListLink').eq(0).clone(false);this.originElem.removeClass('button2').removeClass('promo-link');$('.icon-select[for="orderSelect"]').change(function(){if($('.icon-select[for="orderSelect"] option:selected').attr('data-sort').indexOf('asc')!=-1){$('.icon-select[for="orderSelect"] i').attr('class','fa fa-sort-amount-asc');}else{$('.icon-select[for="orderSelect"] i').attr('class','fa fa-sort-amount-desc');}});$("#orderSelect, #categorySelect").change(function(){var isCatSelect=$(this).attr('id')=="categorySelect";if(isCatSelect&&DeskFawsI.favIsOn()){DeskFawsI.hideFavs();}
1009if(DeskFawsI.favIsOn()){MyRadioListI.loadExtraRFav(DeskFawsI.getFavData());}else{self.loadRadioList($("#orderSelect").val(),0);}
1010if(!isCatSelect){var cm=new CookieManager();var ord=$(this).val();cm.set("orderSelect",ord,null,"/");GaTrackI.ga('sortlist',ord);}
1011saveUserSettings({'order':ord});GaTrackI.ga($(this).attr('id')+$(this).val());});$('.js-moreRadioBtn').click(function(e){e.preventDefault();self.loadRadioList($("#orderSelect").val(),1);});if(this.historyMod){this.bindHistoryListener();}}
1012this.loadRadioList=function(ord,append,actP,rids,callback){if(this.reqRun){return;}
1013this.reqRun=true;if(actP==null){actP=self.getActPageNum()+1;}
1014if(append==0){actP=1;}
1015var cat=$('#categorySelect').val();if(cat=="0"||rids){$('.fa-books').removeClass('ico-blue');}else{$('.fa-books').addClass('ico-blue');GaTrackI.ga('cat_list_'+cat);}
1016var sData={'ord':ord,'actP':actP,'rids':rids,'type':$('._radioFilter').data('type'),'cat':cat};var hash=window.btoa(JSON.stringify(sData));if(self.cache[hash]){self.processResp(actP,append,self.cache[hash],callback);self.reqRun=false;return;}
1017$.ajax({'url':BASE_URL+'/get-radio-list','data':sData,'method':'post','dataType':'json',}).done(function(resp){self.cache[hash]=resp;self.processResp(actP,append,resp,callback);self.reqRun=false;});}
1018this.processResp=function(actP,append,resp,callback){self.setActPageNum(actP);if(append==2){self.refreshRadioList(resp);}else if(append==1){self.modifyHistory("Page","/"+$('.radiosList .scrolledRadioContentDef').data('url')+"/"+actP);self.appendRadios(resp['radios']['list']);}else{self.refreshRadioList(resp);self.modifyHistory("Page","/");}
1019$('.frf').removeClass('frf');$('.radiosList .scrolledRadioContentDef').append($('.coveritem.js-moreRadioBtn'));if(!resp.moreP){$('.js-moreRadioBtn').hide();
1019self.maxPage=self.getActPageNum();}else{$('.js-moreRadioBtn').removeClass('hide').show();}
1020self.bigestPage=self.getActPageNum();if(callback!=null){callback();}}
1021this.refreshRadioList=function(resp,clearOld){if(clearOld&&document.location.pathname!='/'){self.modifyHistory("Page","/");}
1022$('.radiosList .scrolledRadioContentDef .radiosListLink').hide();self.appendRadios(resp['radios']['list'],resp['flags']);$('.radiosList .scrolledRadioContentDef .radiosListLink:not(.frf)').remove();$('.radiosList .scrolledRadioContentDef .radiosListLink').show();if(clearOld){$('.frf').removeClass('frf');if(!resp.moreP){$('.js-moreRadioBtn').hide();}else{$('.js-moreRadioBtn').show();}}}
1023this.sortRadios=function(radios){if(!isMobile()){$('.radiosList .scrolledRadioContentDef').attr('style','opacity:0;');}
1024for(i in radios){var rC=$('.radiosList .scrolledRadioContentDef .radiosListLink').eq(i);self.refreshRadioInfo(rC,radios[i]);rC.addClass("rfr");}
1025$(".radiosListLink:not(.rfr)").remove();$(".rfr").removeClass("rfr");if(!isMobile()){$('.radiosList .scrolledRadioContentDef').fadeTo("slow",1);}}
1026this.appendRadios=function(radios,needFlag){for(i in radios){var celem=self.originElem.clone(false);self.refreshRadioInfo(celem,radios[i],needFlag);$(celem).addClass('frf').removeClass('favRadio').attr('data-pNum',self.getActPageNum());$('.radiosList .scrolledRadioContentDef').append(celem);}}
1027this.eraseUnusedRadios=function(){var ap=self.getActPageNum();for(var i=1;i<=self.bigestPage;i++){if(ap<i){$('.radiosListLink[data-pNum="'+i+'"]').remove();}}
1028if(self.maxPage!=null&&ap<self.maxPage){$('.js-moreRadioBtn').show();}}
1029this.refreshRadioInfo=function(rC,data,needFlag){var $radioTitle=rC.find('.radio-title');var r_name=data.r_name;var link=data.r_urlname;var externalLink=data.r_urlname.indexOf('http')>-1;if(externalLink){link+='?'+GaTrackI.createGaTrackURL(document.location.host,'web','search');}
1030if(externalLink||needFlag){r_name='<span class="flag-icon flag-icon-squared flag-icon-'+data.lng+'" role="img" aria-label="'+data.country+'" title="'+data.country+'"></span>'+r_name;}
1031if(data.rsu_id>0&&link.indexOf('#server')==-1){link+='#server'+data.rsu_id;}
1032if(typeof rInfo!='undefined'&&data.rid==rInfo['rid']){rC.addClass('button2');}else{rC.removeClass('button2');}
1033if(LangI.actLang=='hu'&&!needFlag&&!externalLink&&$('.webp-bg').length){data.settings.list_45=data.settings.list_45.replace(/\.(jpg|png)$/,'.webp');}
1034rC.attr('data-pNum',self.getActPageNum()).attr('data-name',data.r_name).attr('title',data.r_name).attr('data-rid',data.rid).attr('href',link).data('src',data.rsu_url);rC.find('.radio-title span').html(r_name);var $radioImg=rC.find('.js-img-lload').eq(0);var $lazyCont=$radioImg.closest('.js-lazyCont');var img=data.settings.list_45;if($('.webp-bg').length&&img&&img.indexOf('radio_img')>-1){img=img.replace(/\.(jpg|png)$/,'.webp');}
1035if($radioImg.length&&img){$lazyCont.removeClass('js-lazyCont');$radioImg.removeClass('js-img-lload').removeAttr('data-lazy-load').attr('src',img).attr('title',data.r_name).attr('alt',data.r_name);}
1036var c='fa fa-music';if(data.actProgram.type==2){c='fa fa-volume-up';}
1037if(!rC.find('.program-name').length){$radioTitle.after('<div class="program-name js-marquee"><span></span></div>');}
1038if(data.actProgram.title){rC.find('.program-name span').html(data.actProgram.title).attr('class',c);rC.find('.program-name').show();}else{rC.find('.program-name').hide();}
1039var fs=rC.find('.five-pointed-star');if(fs.length){fs.remove();}
1040if(data.settings.promo==1){rC.addClass('promo-link').addClass('onbounce');setTimeout(function(){rC.find('.radio-title span').after('<span class="five-pointed-star" data-toggle="tooltip" title="" data-original-title="'+LangI.getText('promo-radio')+'">★</span>');$radioTitle.addClass('showStar');setTimeout(function(){$radioTitle.addClass('flipanim');},1000);},1000);}}
1041this.getRInfo=function(data,needFlag,flagTag){if(!flagTag){flagTag='a';}
1042var r_name=data.r_name;var link=data.r_urlname;var externalLink=data.r_urlname.indexOf('http')>-1;if(externalLink){if(link.indexOf('#')>-1){link=link.replace('#','?'+GaTrackI.createGaTrackURL(document.location.host,'web','search')+'#');}else{link+='?'+GaTrackI.createGaTrackURL(document.location.host,'web','search');}}
1043r_name='<'+flagTag+' class="flag-icon flag-icon-squared flag-icon-'+data.lng+'" role="img" aria-label="'+data.country+'" title="'+data.country+'"></'+flagTag+'>'+r_name;if(data.rsu_id>0&&link.indexOf('#server')==-1){link+='#server'+data.rsu_id;}
1044return{'r_name':r_name,'link':link};}
1045this.loadExtraRFav=function(favRadios){self.historyMod=false;self.modifyHistory("Page","/");self.historyMod=true;
1045var rids=new Array();for(i in favRadios){if(favRadios[i]['rid']){rids.push(favRadios[i]['rid']);}
1046if(favRadios[i]['rids']){for(j in favRadios[i]['rids']){rids.push(favRadios[i]['rids'][j]);}}}
1047self.loadRadioList($("#orderSelect").val(),2,1,rids,null);}
1048this.resetExtraRFav=function(callback){self.loadRadioList($("#orderSelect").val(),2,1,null,callback);}
1049this.bindHistoryListener=function(){window.onpopstate=function(event){var oldNum=self.getActPageNum();var m=document.location.href.match(/\d*$/);var aP=1;if(m!=null&&m[0]!=""){aP=m[0];}
1050self.setActPageNum(aP);var diff=Math.abs(m[0]-oldNum);if(m[0]>oldNum&&diff==1){self.loadRadioList($("#orderSelect").val(),1,self.getActPageNum());}else if(m[0]<oldNum||diff>1){if(!$('.radiosListLink[data-pNum="'+self.getActPageNum()+'"]').length){self.loadRadioList($("#orderSelect").val(),2,self.getActPageNum());}else{self.eraseUnusedRadios();}}};}
1051this.getActPageNum=function(){return parseInt($('.radiosList .scrolledRadioContentDef').attr('data-act-p'));}
1052this.setActPageNum=function(num){$('.radiosList .scrolledRadioContentDef').attr('data-act-p',num);}
1053this.modifyHistory=function(title,url){if(self.historyMod){history.pushState({},title,url);GaTrackI.setPageView(title,url);if(url!='/'){$('.ui-autocomplete-input').val('');}}}
1054this.init();}
1055var MyRadioListI=new MyRadioList();
1056function DeskFaws(){var self=this;this.showMore=false;this.init=function(){if(!$('.isMainPage').length){this.bindAddFavs();}
1057this.bindShowFavs();}
1058this.bindShowFavs=function(){self.bindFavShow();}
1059this.bindFavShow=function(){$('.deskStarFilter').click(function(){if($('.deskStarFilter i').hasClass('fa-heart-o')){self.showFavs();GaTrackI.ga('station_filter_liked','1');}else{self.hideFavs();}});if(CookieManagerI.get('favOn')=="1"){if($('.deskStarFilter i').hasClass('fa-heart-o')){self.showFavs();}else{$('.js-moreRadioBtn').hide();this.buildSort();}}}
1060this.showFavs=function(){if(!jQuery.isEmptyObject(self.getFavData())){MyRadioListI.loadExtraRFav(this.getFavData());$('.js-moreRadioBtn').hide();$('.favRadio').show();$('.deskStarFilter i').removeClass('fa-heart-o').addClass('fa-heart');if(getUserSettings('fav-on')){CookieManagerI.set('favOn','1',365,'/');}else{CookieManagerI.set('favOn','1');}
1061this.buildSort();}else{var DB=new DialogBox();DB.openPopUp(LangI.getText('right-col-add-to-fav-first-put'),LangI.getText('system-message'));GaTrackI.ga('deskFav','used-but-empty');}}
1062this.hideFavs=function(){CookieManagerI.set('favOn','0');GaTrackI.ga('station_filter_liked','0');MyRadioListI.resetExtraRFav(function(){$('.deskStarFilter i').addClass('fa-heart-o').removeClass('fa-heart');});$('.js-orderbyFav').remove();}
1063this.buildSort=function(){$('.radiosList .icon-search').after('<i class="fa-list js-orderbyFav" data-toggle="tooltip" data-original-title="'+LangI.getText('fav-order-list')+'"></i>');$('.js-orderbyFav').click(function(){if(userLoginEnabled()&&!userHasSubscription()){GaTrackI.ga("fav_sort_moti_show");SubscriptionI.openMotiLayer();return;}
1064var db=new DialogBox();if($(this).hasClass('edit')){$(this).removeClass('edit');$(".scrolledRadioContentDef").sortable("disable");db.openPopUp('',LangI.getText('fav-order-save'));self.groupAddData();GaTrackI.ga("fav_sort_save");}else{$(this).addClass('edit');new OrderRadioList();db.openPopUp(LangI.getText('fav-order-guide'),LangI.getText('fav-order-list'));GaTrackI.ga("fav_sort_edit");}});}
1065this.bindAddFavs=function(){$('.js-deskMoveFav').click(function(e){e.preventDefault();if($('.js-deskMoveFav i').hasClass('fa-heart-o')){self.addData();if($(this).hasClass('title-love')){GaTrackI.ga('station_liked','put-top');}else{GaTrackI.ga('station_liked','put-right');}}else{self.removeData();}});var fav=this.getFavData();var urlname=$("#Grid").attr('data-act-url');var subRid=this.findRadioID2Fav();if(subRid){urlname+='#server'+subRid;}
1066if(fav[urlname]){if(window.innerWidth>767){$('.live-radio-record').before($('.desk-fav-cont'));}
1067$('.js-deskMoveFav i').addClass('fa-heart').removeClass('fa-heart-o');$('.js-deskMoveFav h3').html(LangI.getText('right-col-add-to-fav-end'));}else{$('.js-deskMoveFav i').addClass('fa-heart-o').removeClass('fa-heart');$('.js-deskMoveFav h3').html(LangI.getText('right-col-add-to-fav-end'));}}
1068this.groupAddData=function(){fav=this.getFavData();var favTmp={};$('.radiosList .radiosListLink').each(function(i,elem){var index=$(elem).attr('href').replace(/^\//,'');if(index.indexOf('http')===0){var parsedUrl=new URL(index);index=parsedUrl.pathname.replace(/^\/+/,'')+parsedUrl.hash;}
1069if(fav[index]){favTmp[index]=fav[index];}});CookieManagerI.set('rfavs',window.btoa(JSON.stringify(favTmp)),365,'/');self.sendFavsToServer();}
1070this.addData=function(){if(!CookieManagerI.get('deskfav')){GaTrackI.ga('deskFav','first-put');}
1071fav=this.getFavData();if(jQuery.isEmptyObject(fav)){var DB=new DialogBox();DB.setTitle(LangI.getText('right-col-add-to-fav-end'));DB.setContent(LangI.getText('right-col-add-to-fav-end-descr'));DB.openPopUp();}
1072if(typeof(rInfo)=="undefined"){throw new Error("FAV not isset rInfo!");return;}
1073var rid=$('.rid').val();var urlname=$("#Grid").attr('data-act-url');var subRid=this.findRadioID2Fav();var rName=encodeURIComponent(rInfo['name']);if(subRid){rid=rid+"_"+subRid;urlname+='#server'+subRid;rName=encodeURIComponent($('h1').html());}
1074var objData={'rid':rid};objData['r_name']=rName;fav[urlname]=objData;CookieManagerI.set('rfavs',window.btoa(JSON.stringify(fav)),365,'/');$('.js-deskMoveFav i').removeClass('fa-heart-o').addClass('fa-heart');$('.js-deskMoveFav h3').html(LangI.getText('right-col-add-to-fav-end'));$('.radiosListLink[href="/'+$("#Grid").attr('data-act-url')+'"]').addClass('favRadio');this.sendFavsToServer();GaTrackI.ga('deskFav','put',$("#Grid").attr('data-act-url'));}
1075this.removeData=function(){var fav=this.getFavData();var urlname=$("#Grid").attr('data-act-url');var subRid=this.findRadioID2Fav();if(subRid){urlname+='#server'+subRid;}
1076delete fav[urlname];CookieManagerI.set('rfavs',window.btoa(JSON.stringify(fav)),365,'/');$('.js-deskMoveFav i').addClass('fa-heart-o').removeClass('fa-heart');$('.js-deskMoveFav h3').html(LangI.getText('right-col-add-to-fav'));$('.radiosListLink[href="/'+$("#Grid").attr('data-act-url')+'"]').removeClass('favRadio');if(jQuery.isEmptyObject(fav)){CookieManagerI.set('favOn','0');}
1077this.sendFavsToServer();GaTrackI.ga('deskFav','remove',$("#Grid").attr('data-act-url'));}
1078this.getFavData=function(){var fav=CookieManagerI.get('rfavs');if(!fav||typeof(atob)=="undefined"){fav={};}else{fav=jQuery.parseJSON(window.atob(fav));}
1079return fav;}
1080this.sendFavsToServer=function(){if(!userLoggedIn()){return;}
1081$.ajax({'url':BASE_URL+'/user/method/fav','dataType':'json'}).done(function(){});}
1082this.findRadioID2Fav=function(){var hash=document.location.hash;var rid='';if(hash.indexOf('#server')>-1){var sID=hash.match(/\d*$/);if(sID[0]){if($('.server-row[data-rsu-id="'+sID[0]+'"]').length){rid=sID[0];}}}
1083return rid;}
1084this.favIsOn=function(){return $('.deskStarFilter i').hasClass('fa-heart-o')?0:1;}
1085this.init();}
1086var DeskFawsI;$(document).ready(function(){DeskFawsI=new DeskFaws();});var LANG_CONTANER = {"system-message":{"es":"Aviso del sistema"},"right-col-add-to-fav":{"es":"A\u00f1adir a las favoritas"},"right-col-rec-radio":{"es":"Grabar el programa de radio"},"click-and-hear-back":{"es":"\u00a1Hac\u00e9 clic y repet\u00ed los programas!"},"stdebug-err-contact":{"es":"\u00a1Si ten\u00e9s alguna pregunta m\u00e1s, escribinos a trav\u00e9s de <a href=\"\/contacto\">contacto<\/a>!"},"email-addrs":{"es":"Direcci\u00f3n de correo electr\u00f3nico"},"playlists-camel":{"es":"Lista de canciones"},"playlist":{"es":"lista de canciones - Playlist"},"page":{"es":"pagina"},"right-col-please-like":{"es":"\u00bfTe gusta ya nuestra p\u00e1gina de Facebook?"},"stdebug-started":{"es":"La comprobaci\u00f3n ha empezado"},"stdebug-end":{"es":"La comprobaci\u00f3n est\u00e1 lista"},"stdebug-sup-audio-tag":{"es":"\u00a1El audio TAG est\u00e1 soportado!"},"stdebug-sup-audio-tag-err":{"es":"\u00a1ERROR! El Audio TAG no est\u00e1 soportado. La raz\u00f3n puede ser que tu navegador est\u00e9 demasiado obsoleto. \u00a1Por favor, pru\u00e9balo en otro navegador!"},"stdebug-sup-stream":{"es":"La emisi\u00f3n de la radio funciona"},"stdebug-sup-ports":{"es":"Los puertos necesarios est\u00e1n permitidos"},"stdebug-sup-err-step-2":{"es":"\u00a1Te recomendamos que vuelvas al segundo paso y tambi\u00e9n prob\u00e9s los otros servidores! Si a\u00fan no funciona, \u00a1hac\u00e9 clic en la figura de reportar errores en la esquina inferior derecha!"},"stdebug-sup-ok":{"es":"No hemos encontrado ning\u00fan error. \u00a1Por favor, hac\u00e9 clic en el bot\u00f3n de reproducci\u00f3n en el reproductor que aparece! Si a\u00fan no funciona, \u00a1hac\u00e9 clic en la figura de reportar errores en la esquina inferior de la derecha!"},"stdebug-sup-like":{"es":"Si encontr\u00e1s \u00fatil nuestro servicio, \u00a1por favor dale like a nuestra p\u00e1gina de Facebook! <iframe src=\"https:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmyradioenvivo.ar&width=119&layout=button_count&action=like&size=small&show_faces=false&share=true&height=46&appId=702858859794237\"  width=\"170\" height=\"21\" style=\"border:none;overflow:hidden;position: relative; top: 6px;\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" allow=\"encrypted-media\"><\/iframe>"},"right-col-add-to-fav-end":{"es":"A\u00f1adida a favoritas"},"right-col-add-to-fav-end-descr":{"es":"\u00a1Pod\u00e9s filtrar las favoritas arriba de la lista de radios!"},"right-col-add-to-fav-first-put":{"es":"\u00a1Primero, a\u00f1ad\u00ed unas radios a tus favoritas! Para eso, pod\u00e9s usar el icono CORAZ\u00d3N en la parte superior de la p\u00e1gina."},"right-col-rec-run":{"es":"Grabaci\u00f3n en curso"},"right-col-rec-start":{"es":"Empezar grabaci\u00f3n"},"no-result-radio":{"es":"\u00a1No podemos encontrar en nuestra p\u00e1gina la radio que busc\u00e1s!"},"accept-cookie-txt":{"es":"\u00a1Nuestra p\u00e1gina de web mejora la experiencia de usuario con cookies! <a title=\"\u00a1M\u00e1s informaci\u00f3n!\" href=\"{cookie-url}\">\u00a1M\u00e1s informaci\u00f3n!<\/a> <a title=\"Est\u00e1 bien\" href=\"\" class=\"button1 js-cookiePolicyOke\">Est\u00e1 bien<\/a>"},"right-col-now-play-previous-days":{"es":"\u00a1Canciones de los d\u00edas anteriores!"},"stdebug-sup-stream-err":{"es":"\u00a1ERROR! \u00a1Puede ser que la emisi\u00f3n de la emisora no funcione o est\u00e9 sobrecargada!"},"stdebug-sup-ports-err":{"es":"\u00a1ERROR! \u00a1El puerto de {port} no est\u00e1 permitido en tu acceso a internet!"},"show-album-cover":{"es":"Muestra la im\u00e1gen de portada<span class=\"cover-txt-extra\"> y la letra <\/span>"},"add-home-do-you-want":{"es":"\u00bfQuer\u00e9s acceder a tu radio favorita con un clic?"}
1086,"add-home-failure":{"es":"\u00a1No pudiste a\u00f1adirla a la pantalla de inicio! \u00a1Por eso desafortunadamente no pod\u00e9s acceder a tu radio favorita con un clic!"},"add-home-success":{"es":"\u00a1A\u00f1adiste la p\u00e1gina a la pantalla de inicio! \u00a1As\u00ed pod\u00e9s acceder a tu radio favorita con un clic cuando quieras!"},"add-to-bookmark":{"es":"\u00bfQuer\u00e9s acceder a tu radio favorita con un clic? \u00a1Presion\u00e1 las teclas CTRL + D al mismo tiempo y pon\u00e9 tu Radio favorita en los marcadores!"},"audio-play":{"es":"Reproducir"},"audio-pause":{"es":"Pausa"},"audio-volume":{"es":"Volumen"},"audio-data-traffic":{"es":"Tr\u00e1fico de datos"},"audio-backward":{"es":"Atrasar"},"audio-forward":{"es":"Adelantar"},"audio-time":{"es":"Tiempo pasado"},"close":{"es":"Cerrar"},"connecting":{"es":"Conexi\u00f3n"},"connected":{"es":"Conectado"},"error":{"es":"ERROR"},"share-on-facebook":{"es":"\u00a1Compartir en Facebook!"},"get-older-songs":{"es":"Obtener las canciones anteriores"},"url-part-schedule":{"es":"programacion"},"live":{"es":"EN VIVO"},"no-result-radio-schedule":{"es":"\u00a1La radio buscada no tiene programaci\u00f3n en nuestra p\u00e1gina!"},"no-result-radio-song-list":{"es":"\u00a1La radio buscada no tiene lista de las canciones anteriores en nuestra p\u00e1gina!"},"try-this-not-disappoint":{"es":"\u00a1Probalo! \u00a1No vas a decepcionarte!"},"click-to-play":{"es":"\u00a1Hac\u00e9 clic para comenzar!"},"live-video-started":{"es":"\u00a1Emisi\u00f3n en vivo! \u00a1Hac\u00e9 clic en el icono de c\u00e1mara web para comenzarla!"},"app-back-btn":{"es":"Atr\u00e1s"},"app-thank-you-rating":{"es":"\u00a1Gracias por valorar nuestra aplicaci\u00f3n!"},"app-go-to-store-rating":{"es":"A valorar"},"app-start":{"es":"Reproducir"},"app-ok":{"es":"OK"},"live-stream-started":{"es":"\u00a1Emisi\u00f3n en vivo! \u00a1Hac\u00e9 clic en el icono de c\u00e1mara web para comenzarla!"},"app-server_error":{"es":"ERROR"},"app-server_connected":{"es":"Conectado"},"app-server_connecting":{"es":"Conexi\u00f3n"},"app-search_placeholder":{"es":"Nombre de tu radio favorita ..."},"app-rec_title":{"es":"Grabar el programa de radio"},"app-rec_message":{"es":"\u00a1Hac\u00e9 clic en OK si quer\u00e9s comenzarla!"},"app-rec_stop_title":{"es":"Grabar el programa de radio"},"app-repeat_title":{"es":"Repetici\u00f3n"},"app-alarm_set":{"es":"Ajustar la alarma"},"app-prev_songs":{"es":"Sonaron en d\u00edas anteriores"},"app-next_programs":{"es":"Los programas de los d\u00edas siguientes"},"app-order_default":{"es":"Predeterminado"},"app-order_pop_asc":{"es":"Audiencia A-Z"},"app-order_pop_desc":{"es":"Audiencia Z-A"},"app-order_letter_asc":{"es":"Nombre de la radio A-Z"},"app-order_letter_desc":{"es":"Nombre de la radio Z-A"},"app-order_message":{"es":null},"embed-playlist-seo-text":{"es":"Lista de canciones"},"app-alarm_delete":{"es":"Cancelar la alarma"},"app-alarm_HButton":{"es":"Lu"},"app-alarm_KButton":{"es":"Ma"},"app-alarm_SzeButton":{"es":"Mi"},"app-alarm_CsButton":{"es":"Ju"},"app-alarm_PButton":{"es":"Vi"},"app-alarm_SzoButton":{"es":"Sa"},"app-alarm_VButton":{"es":"Do"},"app-pause":{"es":"Pausa"},"app-delete":{"es":"Borrar"},"app-voice_search_message":{"es":"B\u00fasqueda por voz"},"app-voice_search_title":{"es":"Nombre de tu radio favorita ..."},"app-rec_stop_message":{"es":"\u00bfDe verdad quer\u00e9s finalizar la grabaci\u00f3n?"},"app-timer-title":{"es":"Apagado programado"},"app-alarm-title":{"es":"Alarma"},"app-next_alarm":{"es":"Tiempo hasta la alarma"},"app-server":{"es":"Servidor"},"app-servers_title":{"es":"Servidores"},"app-servers_message":{"es":"\u00a1Eleg\u00ed entre los servidores posibles!"},"app-offline_list":{"es":"\u00a1La aplicaci\u00f3n funciona en modo seguro!"},"app-network_error":{"es":"\u00a1No hay conexi\u00f3n a internet!"},"app-review_title":{"es":"\u00a1Valoranos!"},"app-review_subtitle":{"es":"\u00a1Ahora pod\u00e9s decir cu\u00e1nto te gusta la aplicaci\u00f3n!"},"app-review_send":{"es":"Enviar"},"app-review_feedback_title":{"es":"\u00a1Gracias por tu evaluaci\u00f3n!"},"app-review_feedback_subtitle":{"es":"\u00a1Lamentamos que no est\u
108600e9s contento con la aplicaci\u00f3n! \u00bfPodr\u00edas escribirnos qu\u00e9 cambiar\u00edas en la aplicaci\u00f3n para mejorarla? Si quer\u00e9s una respuesta o ayuda, \u00a1por favor escribinos tu direcci\u00f3n de correo electr\u00f3nico tambi\u00e9n!"},"app-review_feedback_placeholder":{"es":"Por favor escrib\u00ed aqu\u00ed tu opini\u00f3n..."},"app-review_store_subtitle":{"es":"\u00bfPodr\u00edas valorarnos en la tienda de aplicaciones? \u00a1Ser\u00eda un gran honor para nosotros!\""},"app-no_song_list":{"es":"\u00a1Esta radio no tiene una lista de reproducci\u00f3n!"},"app-no_program_list":{"es":"\u00a1Esta radio no tiene una Programaci\u00f3n!"},"app-no_webcam":{"es":"\u00a1Esta radio no tiene una C\u00e1mara de web!"},"app-pro_shazam_error":{"es":"\u00a1Muy pronto!"},"app-pro_rec_error":{"es":"\u00a1Muy pronto!"},"smartbnr-btn":{"es":"DESCARGAR"},"smartbnr-mobile-app":{"es":"Aplicaci\u00f3n de m\u00f3vil"},"smartbnr-free":{"es":"Gratis"},"clippy-greeting-title":{"es":"\u00a1Bienvenido a MyRadioEnVivo.ar!"},"clippy-greeting-dscr":{"es":"Soy Juan de la radio y voy a darte consejos en el futuro pr\u00f3ximo. \u00a1Soy un poco anciano pero espero que sea \u00fatil para vos! Si te molesto, \u00a1moveme! Si quer\u00e9s una informaci\u00f3n nueva, \u00a1hac\u00e9 clic en m\u00ed!"},"clippy-greeting-title_2":{"es":"\u00a1Bienvenido de nuevo aqu\u00ed!"},"clippy-greeting-dscr_2":{"es":"Si te molesto, \u00a1moveme! Si quer\u00e9s una informaci\u00f3n nueva, \u00a1hac\u00e9 clic en m\u00ed!"},"clippy-rewind-song-title":{"es":"Repetir la canci\u00f3n"},"clippy-rewind-song-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s repetir las canciones de la lista? \u00a1Solamente ten\u00e9s que hacer clic en la canci\u00f3n preferida!"},"clippy-rewind-song-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el t\u00edtulo de la canci\u00f3n!"},"clippy-thanks":{"es":"\u00a1Gracias! \u00a1Eso era \u00fatil!"},"clippy-listen-live-radio":{"es":"Escuchar la radio en vivo"},"clippy-listen-live-radio-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s escuchar la radio en vivo en nuestra p\u00e1gina?"},"clippy-listen-live-radio-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el texto rojo \"EN VIVO\"!"},"clippy-playlist-title":{"es":"Lista de reproducci\u00f3n - Est\u00e1 sonando ahora"},"clippy-playlist-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s ver qu\u00e9 estaba sonando en la radio hasta un mes anterior? As\u00ed pod\u00e9s buscar una canci\u00f3n que escuchaste pero no sab\u00e9s su t\u00edtulo."},"clippy-playlist-dscr-2":{"es":"\u00a1Encuentras las canciones anteriores en el men\u00fa Lista de canciones!"},"clippy-archive-title":{"es":"Podcast"},"clippy-archive-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s repetir los programas? As\u00ed pod\u00e9s escuchar el programa que perdiste."},"clippy-archive-dscr-2":{"es":"\u00a1Aqu\u00ed encuentras los programas anteriores en el men\u00fa Podcast!"},"clippy-webcam":{"es":"C\u00e1mara de web"},"clippy-webcam-dscr":{"es":"\u00bfSab\u00e9s que hay programas que pod\u00e9s ver con una c\u00e1mara de web tambi\u00e9n?"},"clippy-webcam-dscr-2":{"es":"\u00a1Aqu\u00ed encuentras el men\u00fa C\u00e1mara de web!"},"clippy-rewind-radio-title":{"es":"Atrasar el programa"},"clippy-rewind-radio-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s atrasar la radio que est\u00e1s escuchando si quer\u00e9s escuchar una parte otra vez?"},"clippy-rewind-radio-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el contador y ajust\u00e1 el tiempo que quer\u00e9s atrasar!"},"clippy-song-cover-title":{"es":"Mostrar la im\u00e1gen de portada"},"clippy-song-cover-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s ver la imagen de portada de la canci\u00f3n que est\u00e1s escuchando?"},"clippy-song-cover-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el texto \"Mostrar la im\u00e1gen de portada\"!"},"clippy-search-title":{"es":"Buscar radios"},"clippy-search-dscr":{"es":"\u00bfSab\u00e9s que si busc\u00e1s una radio espec\u00edfica, hay un buscador para eso?"},"clippy-search-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el icono de b\u00fasqueda y despu\u00e9s escrib\u00ed el nombre de la radio que busc\u00e1s!"},"clippy-player-error-title":{"es":"\u00bfLa radio no comienza?"},"clippy-player-error-dscr":{"es":"\u00bfEs verdad que la radio no comienza? \u00a1Eso puede tener varias causas! Te recomiendo visitar nuestra p\u00e1gina de <a href=\"\/depurador-de-transmisiones-de-radio{error-debug-page-url}\">localizador de errores<\/a> y descubrir que puede ser el problema. \u00a1O escribinos un correo electr\u00f3nico a trav\u00e9s de <a href=\"\/contacto{contact-page-url}\">contacto<\/a>!"},"clippy-not-annoy":{"es":"\u00a1No me molestes!"},"clippy-say-something":{"es":"\u00a1Di algo interesante!"},"new-message":{"es":"Mensaje nuevo"},"app-alarm_listen":{"es":"Abrir"},"app-alarm_close":{"es":"Silenciar"},"app-server_buffering":{"es":"Cargando"},"act-song":{"es":"Suena ahora"},"adblock-bnr-msg":{"es":"<strong>\u00a1Querido Oyente!<\/strong><br>\r\nSi quer\u00e9s que la p\u00e1gina funcione establemente a\u00fan en el futuro y quer\u00e9s apoyarnos, por favor, \u00a1desactiv\u00e1 el software que bloquea los anuncios en la p\u00e1gina! <span>Si necesit\u00e1s ayuda para eso, \u00a1hac\u00e9 clic aqu\u00ed!<\/span>"},"clippy-show-me":{"es":"\u00a1Mostrame d\u00f3nde est\u00e1!"},"app-saved-location":{"es":"Guardado: Archivos"},"app-saved":{"es":"Guardado"},"app-file_write_failed":{"es":"\u00a1Error! \u00a1No se permite escribir en el almacenamiento!"},"app-file_write":{"es":"\u00a1Escribir en el almacenamiento est\u00e1 permitido!"},"act-prog-tooltip":{"es":"\u00a1Hac\u00e9 clic y descubr\u00ed los programas!"},"act-song-tooltip":{"es":"\u00a1Hac\u00e9 clic y descubr\u00ed qu\u00e9 estaba sonando!"},"most-szol":{"es":"listas"},"love":{"es":"Me encanta"},"hate":{"es":"Lo odio"},"add-home-do-you-want-dscr":{"es":"Un bot\u00f3n \"A\u00f1adir\" ha aparecido en la parte inferior o arriba de la pantalla. \u00a1Al hacer clic en \u00e9l, puedes a\u00f1adir la radio a tu pantalla de inicio para comenzarla con un clic!"},"app-timer-hour":{"es":"hora"},"app-timer-min":{"es":"min."},"app-timer-sec":{"es":"seg."}
1086,"shazam-start-btn":{"es":"\u00bfQuisieras saber qu\u00e9 canci\u00f3n est\u00e1 sonando? \u00a1Hac\u00e9 clic y descubrilo!"},"shazam-attention":{"es":"\u00a1Atenci\u00f3n!"},"shazam-addblock-noti":{"es":"\u00a1Para usar la funci\u00f3n, primero desactiv\u00e1 EL BLOQUEADOR DE ANUNCIOS! Lo pedimos porque nosotros tambi\u00e9n pagamos por la funci\u00f3n que vas a usar.\r\nAqu\u00ed te ayudamos a desactivarlo:\r\n<a href=\"\/\/myradioenvivo.ar\/desactivar-elbloqueadordeanuncios\" target=\"_blank\">\/\/myradioenvivo.ar\/desactivar-elbloqueadordeanuncios<\/a>"},"shazam-thanks":{"es":"\u00a1Gracias por tu opini\u00f3n!"},"shazam-fail":{"es":"\u00a1Desafortunadamente no se pudo identificar! \u00a1Por favor intent\u00e1 de nuevo!"},"shazam-song-title-label":{"es":"Canci\u00f3n buscada"},"shazam-succ-quest":{"es":"\u00bfEncontr\u00e1s \u00fatil el resultado?"},"shazam-succ-quest-yes":{"es":"S\u00ed"},"shazam-succ-quest-no":{"es":"No"},"shazam-pay":{"es":"\u00bfPagar\u00edas por consulta ilimitada?"},"recorder-addblock-noti":{"es":"\u00a1Para usar la funci\u00f3n, primero desactiv\u00e1 EL BLOQUEADOR DE ANUNCIOS!<br>\r\nAqu\u00ed te ayudamos a desactivarlo:\r\n<a href=\"\/\/myradioenvivo.ar\/desactivar-elbloqueadordeanuncios\" target=\"_blank\">\/\/myradioenvivo.ar\/desactivar-elbloqueadordeanuncios<\/a>"},"rec-radio-success":{"es":"La grabaci\u00f3n ha terminado con \u00e9xito"},"rec-start-copyright":{"es":"\u00a1Grabar el programa de la radio est\u00e1 permitido para uso privado si no sirve para generar ingresos! \u00a1Compartirlo est\u00e1 prohibido! \u00a1La responsabilidad es del usuario!<br>\r\nM\u00e1s informaci\u00f3n: {europeLink}"},"rec-start-lyr-title":{"es":"\u00bfDe verdad comenz\u00e1s la grabaci\u00f3n?"},"shazam-dialog-title":{"es":"Identificaci\u00f3n de canciones"},"shazam-dialog-txt":{"es":"\u00a1En esta radio se puede ver la canci\u00f3n que est\u00e1 sonando!<br>\r\nAhora muestra que esta canci\u00f3n est\u00e1 sonando: <span class=\"error\">{actSong}<\/span>.<br>\r\n\u00bfEst\u00e1s seguro de que aun as\u00ed quer\u00e9s identificar la canci\u00f3n?"},"clippy-shazam-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s identificar manualmente la canci\u00f3n que est\u00e1 sonando si no funciona el men\u00fa Lista de canciones?"},"clippy-shazam-dscr-2":{"es":"\u00a1Hac\u00e9 clic en el icono de oreja para comenzar!"},"clippy-record-radio-dscr":{"es":"\u00bfSab\u00e9s que pod\u00e9s grabar el programa de radio? Si algo importante viene, pod\u00e9s grabar un m\u00e1ximo de 15 minutos."},"clippy-record-radio-dscr-2":{"es":"Para comenzar la grabaci\u00f3n, \u00a1hac\u00e9 clic en el icono de micr\u00f3fono! Si quer\u00e9s terminarla, \u00a1hac\u00e9 clic de nuevo!"},"frequency-map":{"es":"Mapa de frecuencias"},"download-for-free":{"es":"\u00a1Descargalo GRATIS!"},"adblock-bnr-msg-link":{"es":"desactivar-elbloqueadordeanuncios"},"youtube-video-info":{"es":"\u00a1No es seguro que el video contenga la canci\u00f3n buscada o el programa buscado!"},"prev-btn":{"es":"Previo"},"next-btn":{"es":"Siguiente"},"app-shazam-fail":{"es":"\u00a1Desafortunadamente no se pudo identificar! \u00a1Por favor intent\u00e1 de nuevo!"},"stdebug-backup":{"es":"\u00a1Te aconsejamos que tambi\u00e9n prob\u00e9s el servidor de Backup! Lo encontr\u00e1s debajo del reproductor <a href=\"{actUrl}\" target=\"_blank\">en la p\u00e1gina de la radio<\/a>."},"stdebug-play-error":{"es":"\u00a1No se puede comenzar la radio!"},"stdebug-ghostery-block":{"es":"\u00a1Parece que alg\u00fan complemento instalado en tu navegador bloquea la emisi\u00f3n de radio! Un complemento como ese puede ser por ejemplo Ghostery, un bloqueador de anuncios. \u00a1Te aconsejamos que lo desactiv\u00e9s en la p\u00e1gina de radio o lo prob\u00e9s en otro navegador!"},"stdebug-feedback":{"es":"\u00a1Por favor, decinos! \u00bfLa radio ha comenzado de verdad?<br>\r\n<a>S\u00ed<\/a><a>No<\/a>"},"audio-gotoprev":{"es":"A la radio previa"},"audio-gotonext":{"es":"A la radio siguiente"},"app-recorder-error":{"es":"\u00a1La grabaci\u00f3n ha fracasado por un error!"},"app-rate_star_error":{"es":"\u00a1Por favor indic\u00e1 las estrellas que dar\u00edas para la aplicaci\u00f3n!"},"app-review_please_write_reason":{"es":"\u00a1Por favor escribinos unos consejos!"},"app-review_store_title":{"es":"\u00a1Gracias por tu valoraci\u00f3n!"},"app-review_store_send":{"es":"Ir a valoraci\u00f3n"},"app-your-fav-radios":{"es":"Tus radios favoritas"},"stdebug-messenger-start":{"es":"\u00a1Hola! \u00bfPuedo ayudarte en algo?"},"app-playlists":{"es":"Lista de canciones"},"show-album-cover-short":{"es":"Imagen de portada"},"app-aauto-searched-radio":{"es":"Radio buscada"},"app-no-result":{"es":"\u00a1No hay resultados!"},"lyrics-open":{"es":"Mostrar la letra"},"lyrics-title":{"es":"Letra"},"lyrics-precision-title":{"es":"\u00bfEs la letra adecuada?"},"lyrics-help-thanks":{"es":"\u00a1Gracias por tu ayuda!"},"shazam-sorry-txt":{"es":"\u00a1El servicio es de pago y desafortunadamente hemos agotado el l\u00edmite diario!"},"push-msg-schedule-tooltip":{"es":"\u00a1Env\u00edame una notificaci\u00f3n cuando el programa empiece!"},"push-msg-schedule-pop-txt":{"es":"Si hac\u00e9s clic en el bot\u00f3n S\u00ed, una ventana aparecer\u00e1 en la parte superior izquierda del navegador. \u00a1Por favor, hac\u00e9 clic all\u00ed en \"Permitir\"!"},"push-msg-schedule-pop-title":{"es":"\u00bfEst\u00e1s seguro de que quer\u00e9s recibir notificaciones?"},"push-msg-schedule-pop-dis-txt":{"es":"Nuestro sistema indica que bloqueaste las notificaciones y por eso no podemos ajust\u00e1rtelas. \u00a1Si necesit\u00e1s ayuda para desbloquearlas, por favor escribinos a trav\u00e9s del correo electr\u00f3nico <a href=\"mailto:[email protected]\">[email protected]<\/a>!"},"push-msg-wellcome-title":{"es":"\u00a1Gracias por suscribirte!"},"push-msg-wellcome-msg":{"es":"\u00a1Las notificaciones aparecer\u00e1n aqu\u00ed en el futuro!"},"push-msg-tooltip-schedule":{"es":"\u00a1Pide notificaci\u00f3n cuando este programa empiece!"}
1086,"lived-livenum":{"es":"Oyentes de la p\u00e1gina ahora - WEB"},"lived-totalnum":{"es":"El n\u00famero actual de los oyentes seg\u00fan los datos de OnlineStream.Live"},"lived-lastday":{"es":"WEB oyente \u00fanico en el d\u00eda anterior"},"star-vote-dscr":{"es":"\u00a1Por favor decinos la raz\u00f3n por la que nos diste una valoraci\u00f3n peor que la media para que podamos mejorar la radio seg\u00fan tus observaciones!<br><br>\u00a1Borramos todas las valoraciones que son spam, provienen de direcciones IP similares y tienen los mismos motivos!"},"star-vote-placeholder":{"es":"Tu mensaje ..."},"star-vote-btn":{"es":"Enviar"},"lived-lastday-apps":{"es":"APPS oyente \u00fanico en el d\u00eda anterior"},"app-alarm-denied":{"es":"\u00a1Operaci\u00f3n fallida! \u00a1Por favor, permit\u00ed el ajuste recomendado!"},"app-subscription-btn":{"es":"Me suscribo"},"app-settings-contact":{"es":"Contacto"},"app-settings-subscription":{"es":"Suscripci\u00f3n"},"app-subscription-live":{"es":"\u00a1Tu suscripci\u00f3n est\u00e1 activa! Si ten\u00e9s alguna pregunta sobre la suscripci\u00f3n, escribinos.<br><br>Pod\u00e9s cancelar la suscripci\u00f3n aqu\u00ed: https:\/\/play.google.com\/store\/account\/subscriptions"},"app-subscription-one-month":{"es":"Suscripci\u00f3n de renovaci\u00f3n mensual"},"app-subscription-one-year":{"es":"Suscripci\u00f3n de renovaci\u00f3n anual"},"app-subscription-thank-you":{"es":"\u00a1Gracias por suscribirte y por apoyar nuestro trabajo!\r\n\r\nSi ten\u00e9s alguna pregunta, ponete en contacto con nosotros a trav\u00e9s de Messenger: https:\/\/m.me\/myradioenvivo.ar\r\n\r\nSi despu\u00e9s quer\u00e9s cancelar la suscripci\u00f3n, pod\u00e9s hacerlo aqu\u00ed: https:\/\/play.google.com\/store\/account\/subscriptions\r\n\r\nSaludos, el equipo de MyRadioEnVivo.ar"},"app-shazam-title":{"es":"Identificaci\u00f3n de canci\u00f3n"},"app-shazam-dialog-txt":{"es":"\u00a1Esta radio muestra la canci\u00f3n que est\u00e1 sonando! Ahora muestra que esta canci\u00f3n est\u00e1 sonando: {actSong}. \u00bfEst\u00e1s seguro de que quieres identificar la canci\u00f3n?"},"app-lyrics-title":{"es":"Letra de la canci\u00f3n"},"app-settings-datatraffic":{"es":"Tr\u00e1fico de datos"},"app-datatraffic-size":{"es":"Tr\u00e1fico de datos utilizado desde el comienzo de la aplicaci\u00f3n:"},"app-datatraffic-dscr":{"es":"Si es importante para vos que la aplicaci\u00f3n use menos datos, eleg\u00ed una fuente de menor Kbps debajo del bot\u00f3n \"Play\". Por ejemplo, una fuente de 128 Kbps puede usar doble de datos que una de 64 Kbps."},"app-datatraffic-nosupport":{"es":"\u00a1Desafortunadamente tu aparato no soporta esta funci\u00f3n!"},"app-settings-doze":{"es":"Activar la operaci\u00f3n en segundo plano"},"app-permission-success":{"es":"\u00a1Activaci\u00f3n exitosa!"},"app-permission-faild":{"es":"\u00a1Activaci\u00f3n fallida!"},"app-no_podcast":{"es":"\u00a1Esta radio no contiene una lista Podcast!"},"app-audio-rewind":{"es":"Rebobinar la transmisi\u00f3n"},"app-prev-podcast-title":{"es":"Programas de los d\u00edas anteriores"},"app-stdebug-primary-err":{"es":"\u00a1Parece que hay un problema con la emisi\u00f3n online de esta radio!"},"app-stdebug-primary-err-try-o":{"es":"\u00a1Te aconsejamos que prob\u00e9s otro servidor debajo del reproductor!"},"app-attention":{"es":"\u00a1Atenci\u00f3n!"},"chromecast-pop-txt":{"es":"\u00bfQuisieras conectar a Chromecast o a un aparato compatiblr con Chromecast que est\u00e9 conectado a tu televisor? \u00a1Si necesit\u00e1s ayuda, escribinos a trav\u00e9s de <a target=\"_blank\" href=\"https:\/\/m.me\/myradioenvivo.ar\">Facebook<\/a>!"},"info-show-cover-question":{"es":"\u00bfTe molestan los anuncios que aparecen aqu\u00ed?"},"info-show-cover-yes-solution":{"es":"Pod\u00e9s quitarlos con el texto \"Imagen de portada X\"<br>que est\u00e1 en la esquina superior derecha.<br><br>\u00a1PROBALO!"},"info-show-cover-no-solution":{"es":"Si te molestan, entonces pod\u00e9s quitarlos con el texto \"Imagen de portada X\"<br>que est\u00e1 en la esquina superior derecha.<br><br>\u00a1PROBALO!"},"audio-viz-title":{"es":"Visualizaci\u00f3n de m\u00fasica"},"audio-viz-exit":{"es":"Salir de pantalla completa"},"other-lang-promo":{"es":"\u00bfSab\u00e9s que ya lanzamos nuestra p\u00e1gina eslovaca donde coleccionamos las mejores radios eslovacas para vos? Si no, pod\u00e9s probarla aqu\u00ed: <a href=\"{siteURL}\" target=\"_blank\">{siteURL}<\/a>"},"app-record-cstart":{"es":"\u00a1Hemos empezado el almacenamiento del programa grabado! Eso puede tomar unos minutos. \u00a1Despu\u00e9s de terminarlo, te notificamos!"},"app-record-cend":{"es":"\u00a1La grabaci\u00f3n del programa ha terminado! Puedes ver el fichero guardado aqu\u00ed:"},"app-record-csave":{"es":"Guardar el fichero de audio:"},"app-rec-start-copyright":{"es":"\u00a1Grabar el programa de la radio est\u00e1 permitido para uso privado si no sirve para generar ingresos! \u00a1Compartirlo est\u00e1 prohibido!"},"app-rec-info-btn":{"es":"Informaci\u00f3n"},"btn-to-top":{"es":"Volver a la parte superior de la p\u00e1gina"},"app-month":{"es":"mes"},"app-year":{"es":"a\u00f1o"},"ios-recom-msg":{"es":"Si la emisi\u00f3n de radio se detiene despu\u00e9s de que se apague la pantalla, prob\u00e1 nuestra aplicaci\u00f3n de iOS. <a href=\"{iosAppLink}\" target=\"_blank\" class=\"strong backupIosLink\">\u00a1Hac\u00e9 clic aqu\u00ed para descargarla!<\/a>"},"app-alarm-time":{"es":"\u00a1Alarma dentro de {time}!"},"app-remove-ads":{"es":"Quitar los anuncios"},"app-button-disabled":{"es":"\u00a1Ahora no se puede usar este bot\u00f3n!"},"stay-here-title":{"es":"\u00bfYa est\u00e1s aburrido? \u00bfQuer\u00e9s algo nuevo? \u00a1Prob\u00e1 estas tambi\u00e9n!"},"donation":{"es":"donacion"},"radio-donation":{"es":"Apoyar la radio"},"app-view":{"es":"Quiero verlo"},"app-subscription-thank-you-ios":{"es":"\u00a1Gracias por suscribirte y por apoyar nuestro trabajo!\r\n\r\nSi ten\u00e9s alguna pregunta, \u00a1ponete en contacto con nosotros a trav\u00e9s de Messenger
1086: https:\/\/m.me\/myradioenvivo.ar !\r\n\r\nSi quer\u00e9s cancelar la suscripci\u00f3n, entonces pod\u00e9s hacerlo en Ajustes \/ Apple ID \/ Suscripciones.\r\n\r\nSaludos, el equipo de MyRadioEnVivo.ar"},"app-subscription-live-ios":{"es":"\u00a1Tu suscripci\u00f3n est\u00e1 activa ahora! Si ten\u00e9s una pregunta sobre la suscripci\u00f3n, \u00a1escribinos!\r\n\r\nSi quer\u00e9s cancelar la suscripci\u00f3n, entonces pod\u00e9s hacerlo en el men\u00fa de Ajustes \/ Apple ID \/ Suscripciones."},"app-payment-progress":{"es":"Pago en proceso ..."},"app-subscription-resume":{"es":"Activar de nuevo la suscripci\u00f3n"},"app-subscription-resume-progress":{"es":"Restauraci\u00f3n de suscripci\u00f3n est\u00e1 en proceso..."},"app-subscription-resume-progress-error":{"es":"\u00a1Restauraci\u00f3n de suscripci\u00f3n fallida!"},"app-battery-optimization":{"es":"\u00a1Para usar la aplicaci\u00f3n, te aconsejamos que permit\u00e1s la operaci\u00f3n en segundo plano!\r\n\u00a1Sin eso, el sistema de funcionamiento del celular puede limitar la aplicaci\u00f3n y causar que la emisi\u00f3n de radio se detenga!"},"app-subscription":{"es":"Suscripci\u00f3n renovable"},"app-subscription-year-dscr":{"es":"Suscripci\u00f3n anual a las funciones PRO"},"app-subscription-month-dscr":{"es":"Suscripci\u00f3n mensual a las funciones PRO"},"app-other-settings":{"es":"Otras opciones"},"app-startw-last-radio":{"es":"Restaurar la radio escuchada por \u00faltima vez al iniciar"},"app-volume-settings":{"es":"Ajustar el volumen"},"audio-viz-expand":{"es":"Pantalla completa"},"radio-stats-title-total_num":{"es":"Conexi\u00f3n online activa"},"radio-stats-title-day_time_r":{"es":"Tiempo promedio de escucha de la radio"},"radio-stats-title-device_r":{"es":"Aparatos"},"sibling-site-promo":{"es":"Nos alegra contarte que ya lanzamos tambi\u00e9n nuestra p\u00e1gina <a href=\"https:\/\/myradyodinle.com?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\" target=\"_blank\" class=\"upper\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-tr\"><\/use><\/svg>turca<\/a>.\n\nAs\u00ed que ahora ya pod\u00e9s escuchar tus radios favoritas desde la interfaz de siempre tambi\u00e9n en los siguientes pa\u00edses:\n<div class=\"pFlagsCont\"><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradyodinle.com?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-tr\"><\/use><\/svg>Turqu\u00eda<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioenligne.fr?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-fr\"><\/use><\/svg>Francia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.pt?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-pt\"><\/use><\/svg>Portugal<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradiostanice.rs?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-rs\"><\/use><\/svg>Serbia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.cz?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-cz\"><\/use><\/svg>Chequia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioenvivo.co?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-co\"><\/use><\/svg>Colombia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.es?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-es\"><\/use><\/svg>Espa\u00f1a<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.cl?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-cl\"><\/use><\/svg>Chile<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioenvivo.pe?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-pe\"><\/use><\/svg>Per\u00fa<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioenvivo.mx?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-mx\"><\/use><\/svg>M\u00e9xico<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/ukradiolive.com?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-uk\"><\/use><\/svg>El Reino Unido<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.nl?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-nl\"><\/use><\/svg>Pa\u00edses Bajos<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.it?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-it\"><\/use><\/svg>Italia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.de?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-de\"><\/use><\/svg>Alemania<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/irishradiolive.com?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-ie\"><\/use><\/svg>Irlanda<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.pl?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-pl\"><\/use><\/svg>Polonia<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myradioonline.ro?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-ro\"><\/use><\/svg>Rumania<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.hu?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-hu\"><\/use><\/svg>Hungr\u00eda<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.at?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-at\"><\/use><\/svg>Austria<\/a><\/div><div class=\"dotted-text\"><a target=\"_blank\" href=\"https:\/\/myonlineradio.sk?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\"><svg class=\"flag-icon\"><use href=\"\/public\/flags1783618689\/4x3\/flags.svg#flag-sk\"><\/use><\/svg>Eslovaquia<\/a><\/div><div class=\"clear\"><\/div>&nbsp;\n<\/div>\nSi te interesa, pod\u00e9s probar nuestra nueva p\u00e1gina ac\u00e1: <a target=\"_blank\" href=\"https:\/\/myradyodinle.com?utm_source=es_ARradio&utm_medium=popup&utm_campaign=ssitepromo_tr\">MyRadyoDinle.com<\/a> o simplemente escrib\u00ed el nombre de tu radio turca favorita en el buscador.\n<br>\nM\u00e1s adelante, si quer\u00e9s cambiar de pa\u00eds, vas a encontrar la secci\u00f3n con las banderas de los pa\u00edses en la parte superior del sitio, en el encabezado."},"country-hu":{"es":"Hungr\u00eda"},"country-ro":{"es":"Rumania"},"country-sk":{"es":"Eslovaquia"},"country-at":{"es":"Austria"},"country-gb":{"es":"El Reino Unido"},"country-ie":{"es":"Irlanda"},"country-pl":{"es":"Polonia"},"country-de":{"es":"Alemania"},"country-es":{"es":"Espa\u00f1a"},"countries":{"es":"Pa\u00edses"},"app-volume-store":{"es":"Recordar configuraci\u00f3n"},"app-act-song-tooltip":{"es":"\u00a1Hac\u00e9 clic y descubr\u00ed qu\u00e9 estaba sonando antes!"},"return-map":{"es":"Volver al mapa"},"app-order_title":{"es":"Ordenar las radios"},"country-it":{"es":"Italia"},"radio-stat-plscontact":{"es":"\u00a1No ten\u00e9s derecho a ver los datos extra! Si pens\u00e1s que est\u00e1s autorizado, entonces por favor \u00a1escribinos a trav\u00e9s de Contacto!"},"country-fr":{"es":"Francia"},"fb-like-layer-thx":{"es":"\u00a1Gracias! \u00a1Ya le di me gusta!"},"thanks":{"es":"\u00a1Gracias!"},"country-mx":{"es":"M\u00e9xico"},"user-login-title":{"es":"Inicio de sesi\u00f3n"},"user-login-fail":{"es":"\u00a1Error en el inicio de sesi\u00f3n! Si necesit\u00e1s ayuda, ponete en contacto con nosotros en Facebook: <a target=\"_blank\" href=\"https:\/\/m.me\/myradioenvivo.ar\">https:\/\/m.me\/myradioenvivo.ar<\/a>"},"user-login-ok":{"es":"\u00a1Inicio de sesi\u00f3n exitoso!"}
1086,"user-login-verify":{"es":"\u00a1Enviamos un correo de activaci\u00f3n a tu direcci\u00f3n de correo electr\u00f3nico! \u00a1Pod\u00e9s iniciar sesi\u00f3n despu\u00e9s de la activaci\u00f3n!"},"adblock-attention":{"es":"Hemos recibido varios comentarios de oyentes de la radio a los que les molestan los anuncios de potenciadores masculinos, verrugas, papilomas, etc. \u00a1Estos anuncios solo aparecen para aquellos que utilizan bloqueadores de anuncios! \u00a1Quienes se sientan molestos por estos anuncios ver\u00e1n publicidad normal si desactivan el bloqueador! Si no quer\u00e9s ver anuncios en absoluto, \u00a1te recomendamos la opci\u00f3n de <a href=\"#open-subcription-layer\">suscripci\u00f3n<\/a>!"},"adblock":{"es":"BLOQUEADOR DE ANUNCIOS"},"user-profil-title":{"es":"Perfil"},"user-save-ok":{"es":"\u00a1Guardado correctamente!"},"user-login-pass":{"es":"Contrase\u00f1a"},"user-login-pass-re":{"es":"Contrase\u00f1a de nuevo"},"user-reg":{"es":"Registro"},"user-lost-passs":{"es":"Contrase\u00f1a olvidada"},"user-pass-not-match":{"es":"\u00a1Las contrase\u00f1as no coinciden!"},"user-email-actv":{"es":"\u00a1Para activar tu cuenta, por favor revis\u00e1 tu correo electr\u00f3nico!"},"user-email-new-pass":{"es":"\u00a1Para establecer una nueva contrase\u00f1a, por favor revis\u00e1 tu correo electr\u00f3nico!"},"user-wrong-email":{"es":"\u00a1Direcci\u00f3n de correo electr\u00f3nico incorrecta!"},"user-need-email-pass":{"es":"\u00a1Por favor, us\u00e1 el acceso con Correo electr\u00f3nico \/ Contrase\u00f1a!"},"user-wrong-email-pass":{"es":"\u00a1Direcci\u00f3n de correo electr\u00f3nico o contrase\u00f1a incorrectos!"},"user-week-pass":{"es":"\u00a1La contrase\u00f1a debe tener al menos 6 caracteres!"},"user-email-already-in-use":{"es":"\u00a1Esta direcci\u00f3n de correo electr\u00f3nico ya est\u00e1 en uso!"},"user-login-w-fb":{"es":"Iniciar sesi\u00f3n con:"},"user-login-w-e":{"es":"\u00a1Inici\u00e1 sesi\u00f3n con tu correo electr\u00f3nico!"},"user-login-aszf":{"es":"Al continuar, acept\u00e1s\r\n<a href=\"{term-link}\" class=\"firebaseui-link\" target=\"_blank\">los T\u00e9rminos y Condiciones<\/a> y\r\n<a href=\"{privacy-link}\" class=\"firebaseui-link\" target=\"_blank\">la Pol\u00edtica de Privacidad.<\/a>"},"app-subscription-promo-web":{"es":"\u00a1Suscribite y utiliz\u00e1 todas las funciones del sitio web!<br>\r\n\u00bfQu\u00e9 m\u00e1s ofrecemos a nuestros suscriptores?<br>\r\n<br>\r\n\u2714\ufe0f Plataforma sin anuncios<br>\r\n\u2714\ufe0f Im\u00e1genes de portada m\u00e1s grandes<br>\r\n\u2714\ufe0f Reconocimiento ilimitado de canciones<br>\r\n\u2714\ufe0f Suscripci\u00f3n WEB, iOS, Android<br>\r\n\u2714\ufe0f Visualizaci\u00f3n ilimitada de letras<br>\r\n\u2714\ufe0f <a href=\"https:\/\/myradioenvivo.ar\/funciones-premium\" target=\"_blank\">Grabaci\u00f3n de programas ilimitada en algunas radios<\/a><br>\r\n\u2714\ufe0f Recordar el \u00faltimo servidor seleccionado<br>\r\n\u2714\ufe0f Carga de p\u00e1ginas m\u00e1s r\u00e1pida, interfaz m\u00e1s ergon\u00f3mica<br>\r\n\u2714\ufe0f Desactivaci\u00f3n de cajas promocionales y de Facebook<br>\r\n\u2714\ufe0f Ordenar las radios favoritas como quieras<br>\r\n<br>\r\n\u00a1Pod\u00e9s probarlo gratis durante 6 d\u00edas y cancelarlo sin costo alguno, despu\u00e9s se te cobrar\u00e1 la suscripci\u00f3n!<br>"},"try-btn":{"es":"\u00a1Lo pruebo!"},"subscription-survey":{"es":"Si hubiera una opci\u00f3n de suscripci\u00f3n, \u00bfte suscribir\u00edas? Lo que obten\u00e9s a cambio de tu suscripci\u00f3n:<br>\r\n<br>\r\n\u2714\ufe0f Plataforma sin anuncios<br>\r\n\u2714\ufe0f Im\u00e1genes de portada m\u00e1s grandes<br>\r\n\u2714\ufe0f Reconocimiento ilimitado de canciones<br>\r\n\u2714\ufe0f Suscripci\u00f3n de WEB, iOS, Android<br>\r\n\u2714\ufe0f Visualizaci\u00f3n ilimitada de letras<br>\r\n\u2714\ufe0f Memorizar el servidor \u00faltimamente seleccionado<br>\r\n\u2714\ufe0f Carga de p\u00e1ginas m\u00e1s r\u00e1pida, interfaz m\u00e1s ergon\u00f3mica<br>\r\n\u2714\ufe0f Desactivaci\u00f3n de cajas promocionales y de Facebook<br>\r\n\u2714\ufe0f Pod\u00e9s apoyar a tus emisoras de radio favoritas con tu suscripci\u00f3n<br>\r\n<br>"},"subscription-survey-price":{"es":"\u00bfCu\u00e1nto estar\u00edas dispuesto a pagar al mes?"},"subscription-unsub":{"es":"Cancelaci\u00f3n de la suscripci\u00f3n"},"subscription-off-desc":{"es":"\u00a1Despu\u00e9s de cancelar la suscripci\u00f3n, esta no se renovar\u00e1 al final del ciclo actual!"},"subscription-realy-end":{"es":"\u00bfEst\u00e1s seguro de que quer\u00e9s cancelar tu suscripci\u00f3n?"},"no-freq-listen-live":{"es":"\u00bfNo hay ninguna frecuencia disponible cerca? \u00a1Escuch\u00e1 online, a trav\u00e9s de Internet, desde 
1086cualquier parte del mundo de forma gratuita! <a href=\"{listenUrl}\">\u00a1Lo pruebo!<\/a>"},"random-title":{"es":"\u00a1Sorpresa!"},"app-login-dscr":{"es":"\u00a1Inici\u00e1 sesi\u00f3n con una de las opciones siguientes y compart\u00ed tu suscripci\u00f3n en varios dispositivos o plataformas, o simplemente sincroniz\u00e1 tu configuraci\u00f3n!"},"donation-privacy-accept":{"es":"\u00a1Acepto la <a href=\"{privacy-policy-docs-url}\" target=\"_blank\">Pol\u00edtica de Privacidad!<\/a>"},"error-something-wrong":{"es":"\u00a1Ocurri\u00f3 un error inesperado!"},"random-descr":{"es":"\u00a1Algo nuevo, te sorprendemos!"},"country-ar":{"es":"Argentina"},"country-cl":{"es":"Chile"},"accept-privacy-policy":{"es":"\u00a1Es obligatorio aceptar la Pol\u00edtica de Privacidad!"},"privacy-p-accept":{"es":"\u00bfAcept\u00e1s la Pol\u00edtica de Privacidad?"},"rec-start-copyright-limit":{"es":"Para terminar la grabaci\u00f3n, hay que hacer clic otra vez en el icono de grabar. \u00a1Si no lo hac\u00e9s, la grabaci\u00f3n termina despu\u00e9s de 15 minutos!"},"rec-start-copyright-server-limit":{"es":"Incluso con suscripci\u00f3n, la transmisi\u00f3n del servidor seleccionado solo se puede grabar durante 15 minutos. Pod\u00e9s encontrar m\u00e1s informaci\u00f3n sobre las radios y servidores sin restricciones aqu\u00ed: <a href=\"https:\/\/myradioenvivo.ar\/funciones-premium\" target=\"_blank\">https:\/\/myradioenvivo.ar\/funciones-premium<\/a>"},"rec-start-copyright-nolimit":{"es":"\u00a1Para terminar la grabaci\u00f3n, hay que hacer clic otra vez en el icono de grabar!"},"app-network_ok":{"es":"\u00a1Conexi\u00f3n a Internet restablecida!"},"user-login-need-first":{"es":"\u00a1Primero ten\u00e9s que iniciar sesi\u00f3n para la suscripci\u00f3n!"},"not-want-dis-adblock":{"es":"\u00a1Si no quer\u00e9s desactivar el bloqueador de anuncios, te recomendamos la opci\u00f3n de suscripci\u00f3n, que tambi\u00e9n ofrece beneficios adicionales al usar el sitio!"},"sub-trial-info":{"es":"\u00a1Despu\u00e9s de solicitar la suscripci\u00f3n, el importe pagado s\u00f3lo se bloquear\u00e1 en tu cuenta bancaria, y el bloqueo se liberar\u00e1 cuando cancel\u00e1s la suscripci\u00f3n! \u00a1No se cobrar\u00e1 ning\u00fan tipo de tasa!"},"other-country-radios":{"es":"Radios de otros pa\u00edses"},"fav-order-list":{"es":"Orden\u00e1 tus favoritas como quieras"},"fav-order-guide":{"es":"\u00a1Para ordenar las radios, agarr\u00e1 el logo de la radio elegida y movelo a la posici\u00f3n deseada! Si sent\u00eds que todas las radios est\u00e1n en la posici\u00f3n que quer\u00e9s, \u00a1entonces hac\u00e9 clic de nuevo en el \u00edcono de ordenar para que podamos guardar el orden!"},"fav-order-save":{"es":"\u00a1El orden de las radios se guard\u00f3 con \u00e9xito!"},"user-playlists-noti":{"es":"Las canciones que te gustan tambi\u00e9n se a\u00f1adir\u00e1n a tus canciones favoritas si iniciaste sesi\u00f3n, \u00a1as\u00ed m\u00e1s tarde pod\u00e9s volver a buscarlas en el men\u00fa de <a href=\"{playlistUrl}\">Canciones favoritas<\/a>!"},"country-nl":{"es":"Pa\u00edses Bajos"},"promo-radio":{"es":"Posici\u00f3n patrocinada"},"promo-radio-descr":{"es":"\u00bfQuer\u00e9s llegar a m\u00e1s oyentes?<br>\r\n<br>\r\n\u00a1Hacete notar m\u00e1s f\u00e1cilmente! \u00a1Consegu\u00ed una mejor posici\u00f3n en nuestra lista de radios, que utilizan cientos de miles de personas cada d\u00eda en la web y en nuestras aplicaciones!<br>\r\n<br>\r\n\u00a1Pod\u00e9s destacar tu radio en la primera, segunda o incluso en la vig\u00e9sima posici\u00f3n!<br>\r\n<br>\r\nSi nuestra oferta despert\u00f3 tu inter\u00e9s, \u00a1no dudes en contactarnos a trav\u00e9s de <a href=\"mailto:info[kukac]myradioenvivo.ar\">info[kukac]myradioenvivo.ar<\/a>!"},"country-cz":{"es":"Chequia"},"country-pe":{"es":"Per\u00fa"},"country-co":{"es":"Colombia"},"country-pt":{"es":"Portugal"},"push-msg-not-supp":{"es":"\u00a1Este navegador no admite las notificaciones!\r\n|\r\n\u00a1Descarg\u00e1 nuestra aplicaci\u00f3n y seguro que no te vas a perder las notificaciones!"},"noti-bell-promo-title":{"es":"\u00a1Enterate de primera mano!"},"noti-bell-promo-dscr":{"es":"Si quer\u00e9s enterarte cuando<br>\r\n<br>\r\n- se agregue una nueva radio a nuestra p\u00e1gina,<br>\r\n- empiece tu programa favorito,<br>\r\n- se suba un nuevo programa de tu radio favorita al podcast,<br>\r\n- se arregle la transmisi\u00f3n de una radio que te gusta,<br>\r\n<br>\r\n\u00a1entonces suscribite a las notificaciones con los \u00edconos de campana o los botones de Suscripci\u00f3n!<br>"},"noti-sub-btn":{"es":"Suscripci\u00f3n"},"web-app-sub-promo-descr":{"es":"1. \u00a1Convertite en suscriptor en nuestra aplicaci\u00f3n de <a href=\"{androidUrl}\" target=\"_blank\">Android<\/a> o <a href=\"{iosUrl}\" target=\"_blank\">iOS<\/a>!<br>\r\n2. Inici\u00e1 sesi\u00f3n en la aplicaci\u00f3n.<br>\r\n3. <a href=\"\/\" class=\"js-userLoginBtn\">Inici\u00e1 sesi\u00f3n tambi\u00e9n en nuestra p\u00e1gina web.<\/a><br>\r\n<br>\r\nDespu\u00e9s, disfrut\u00e1 de la interfaz de nuestra p\u00e1gina web sin anuncios.<br>\r\n<br>\r\nSi necesit\u00e1s ayuda, \u00a1escribinos a trav\u00e9s de la <a href=\"\/kapcsolat\">p\u00e1gina de contacto<\/a>!"},"web-app-sub-promo-title":{"es":"\u00bfQuer\u00e9s usar nuestra p\u00e1gina web sin anuncios?"},"country-rs":{"es":"Serbia"},"app-equalizer-on":{"es":"Activar ecualizador"},"app-equalizer-global":{"es":"Aplicar a todas las radios"},"app-equalizer-noti":{"es":"El ecualizador puede afectar la estabilidad de la reproducci\u00f3n. \u00a1Si experiment\u00e1s alg\u00fan problema, apagalo!"},"country-tr":{"es":"Turqu\u00eda"},"new-func-promo-title":{"es":"\u00a1Prueba nuestras nuevas funciones!"}
1086,"new-func-promo-dscr":{"es":"\u00bfQuieres m\u00e1s graves o un sonido m\u00e1s limpio? \u00a1Personaliza el sonido de tu radio favorita con el Ecualizador debajo del reproductor!<br>\r\n<br>\r\n\r\nM\u00e1s funciones:<br>\r\n<br>\r\n<i class=\"fa-image\"><\/i> Mostrar portada<br>\r\n<i class=\"fa-sun-regular\"><\/i> Visualizaci\u00f3n musical<br>\r\n<i class=\"fa fa-assistive-listening-systems\"><\/i> Reconocimiento de canciones<br>\r\n<i class=\"fa fa-microphone\"><\/i> Grabar la emisi\u00f3n de radio<br>\r\n<i class=\"fa-lyrics\"><\/i> Mostrar letra de la canci\u00f3n<br>\r\n<i class=\"fa-youtube-play\"><\/i> Volver a escuchar en YouTube<br>\r\n<i class=\"fa fa-countdown\"><\/i> Apagado programado<br>\r\n<i class=\"fa fa-equalizer\"><\/i> Ecualizador"},"ssp-index":{"es":"tr"}};
1087function Lang(){var self=this;this.actLang=$("html").attr('lang')||$("[data-my-radio-lang]").attr("data-my-radio-lang");this.langLocale=$('html').data('locale');this.getText=function(index,lang,replace,gReplace){if(lang){this.actLang=lang;}
1088if(!this.actLang){this.actLang='en';}
1089if(typeof(LANG_CONTANER)=="undefined"){console.log('NOTE - LANG_CONTANER');return;}
1090if(!LANG_CONTANER[index]){return;}
1091var langText=LANG_CONTANER[index][this.actLang];if(langText||!$('.js-isAdmin').length){for(i in replace){if(gReplace){var rx=new RegExp(i,'g');langText=langText.replace(rx,replace[i]);}else{langText=langText.replace(i,replace[i]);}}
1092return langText;}else{return'not-exist{'+index+'}';}}}
1093var LangI=new Lang();function MyConfig(){this.get=function(index){if(typeof(JS_CONF)=="undefined"){return;}
1094return JS_CONF[index];}}
1095var MyConfigI=new MyConfig();
1096function ServiceWorkerClient(){var self=this;this.init=function(){try{this.startSW();}catch(e){}}
1097this.startSW=function(){if('serviceWorker'in navigator&&typeof(Promise)!=="undefined"){try{var actSWVersion=0;if(document.getElementById("myMiniJs")){var actSWVersion=document.getElementById("myMiniJs").getAttribute("src").match(/jsv(\d*)/)[1];}}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("startSW 2 err: "+e.toString());}}
1098navigator.serviceWorker.register('service-worker'+(actSWVersion!=0?'.min':'')+'.js?info='+actSWVersion).then(function(registration){try{if($("[src*='/jsv']").length){var swVersion=CookieManagerI.get('sw-version')||0;if(swVersion&&actSWVersion&&swVersion<actSWVersion){setTimeout(function(){registration.unregister();},2000);}
1099CookieManagerI.set('sw-version',actSWVersion);}else{registration.update();}}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("startSW 2 err: "+e.toString());}}}).catch(function(error){self.swcLog('SW registration failed, error:',error);});}}
1100this.swcLog=function(param1,param2,param3){if(typeof(ga)!=="undefined"){GaTrackI.ga(param1,param2,param3);}}
1101this.init();}
1102$(document).ready(function(){if($('.radioListV2').length&&!CookieManagerI.getLocalStorage("push-msg-on")){new ServiceWorkerClient();}});
1103function AddHomescreen(){var self=this;var promptEvent;this.init=function(){this.bindSWEvents();}
1104this.bindSWEvents=function(){window.addEventListener("beforeinstallprompt",function(e){promptEvent=e;self.swcLog('step-0',promptEvent.platforms[0]);if(typeof(LangI)!=="undefined"&&LangI.getText("add-home-do-you-want")){e.preventDefault();self.openSWLayer(promptEvent.platforms[0]);}else{self.bindUserChoiceListener();}});window.addEventListener('appinstalled',function(evt){self.swcLog('a2hs','installed');});if(this.checkHomeScreenInstalled()){self.swcLog('display-mode-is-standalone');}}
1105this.openSWLayer=function(){if(CookieManagerI.get('AddHomescreenToday')||CookieManagerI.get(cookieIndex)<3||$(".popup_layer:visible").length){console.log('SKIP AddHomescreenToday');return;}
1106CookieManagerI.set('AddHomescreenToday','1','15','/');var db=new DialogBox();db.bindConfirm(function(){self.swcLog('step-2','YES');self.bindUserChoiceListener();$('.layer_cont').hide();$('.layer_cont .popUpTitle').hide();$('.layer_cont button').hide();},function(){self.swcLog('step-1','NO');});db.openPopUp('',LangI.getText('add-home-do-you-want'));}
1107this.bindUserChoiceListener=function(){promptEvent.prompt();promptEvent.userChoice.then(function(outcome){if(LangI.getText('add-home-do-you-want')){$('.layer_cont').show();if(outcome['outcome']=="accepted"){$('._popUpMessage').html(LangI.getText('add-home-success'));}else{$('._popUpMessage').html(LangI.getText('add-home-failure'));}}
1108self.swcLog(outcome['outcome']);});}
1109this.checkHomeScreenInstalled=function(){if(window.matchMedia('(display-mode: standalone)').matches){return true;}
1110if(window.navigator.standalone===true){return true;}
1111return false;}
1112this.swcLog=function(param1,param2){console.log(param1,param2);if(typeof(GaTrackI)!=="undefined"){GaTrackI.ga('prompt-platform_'+param1+'_'+param2);}}
1113this.init();}
1114var AddHomescreenI;$(document).ready(function(){if(isMobile()){AddHomescreenI=new AddHomescreen();}});
1115function ProgramGuidePicker(){var self=this;this.init=function(){if(!$('.js-pGuide').length){return;}
1116if(!$("#datepicker").length){this.initScroller();}else{this.initPicker();this.initScroller();this.setScrollPos(true);}
1117var cDay=new Date().getDate();cDay=cDay<10?'0'+cDay:''+cDay;var nDay=$('.js-actDateP').html();if($('.js-actDateP').length&&nDay&&nDay!=cDay){self.getProgramGuide(UtilsI.getDateByServerOffset(),cDay,"auto_"+nDay);}}
1118this.initScroller=function(maxHeight){var $scrolledContent=$('.scrolledContent');if(!$scrolledContent.length||typeof $.fn.slimscroll!=='function'){return;}
1119maxHeight=maxHeight||300;$scrolledContent.slimscrollFirstUse(function($elements){var scH=$elements.height();var height=((scH>maxHeight)?maxHeight:scH+5)+'px';$elements.slimscroll({disableFadeOut:true,height:height});self.scrollToActProgram();});}
1120this.scrollToActProgram=function(){var $now=$('.js-pGuide .js-now');var $scrolledContent=$('.scrolledContent');if(!$now.length||!$scrolledContent.length){return;}
1121$scrolledContent[0].scrollTop=0;var nowPosition=$now.position();if(!nowPosition){return;}
1122if(typeof $.fn.slimscroll==='function'&&$scrolledContent.parent().hasClass('slimScrollDiv')){$scrolledContent.slimscroll({scrollTo:nowPosition.top+'px'});}else{$scrolledContent[0].scrollTop=nowPosition.top;}}
1123this.setScrollPos=function(skipScroll){$('.js-pGuide .txt1').removeClass('js-now');var lastE=null;var nextTime=null;var actTime=self.getActTime();$('.js-pGuide .txt1').each(function(){if($(this).data('time')>actTime){nextTime=$(this).data('time');return false;}else{lastE=this;}});$(lastE).addClass('js-now');if(!skipScroll){this.scrollToActProgram();}
1124if(lastE&&!$('._songs').length){LoadActRadioDataCoreI.putActSong({'now_playing':{'artist':lastE.textContent,'track':'','time':$(lastE).data('time')}},$('.mRadioPlayer'));}
1125if(nextTime){setTimeout(function(){self.setScrollPos();},(nextTime-self.getActTime()+2)*1000);}}
1126this.initPicker=function(){$("#musorok ._calendarIconCont").click(function(){LoadScriptIfNeedI.loadJqueryUI(function(){if(typeof(jQuery.fn.datepicker)=="undefined"){return;}
1127$("#datepicker").datepicker({dateFormat:'yy-mm-dd',minDate:'+0D',maxDate:'+6D',onSelect:function(date,obj){self.getProgramGuide(date,(''+obj.selectedDay).length<2?'0'+obj.selectedDay:obj.selectedDay,"click");}});MyDatePickerI.setDatepickerRegional();$('#musorok ._calendarIcon').click(function(){GaTrackI.ga('datepicker_program_guide');$("#datepicker").datepicker("show");});$("#musorok ._calendarIconCont").unbind('click');setTimeout(function(){$("#datepicker").datepicker("show");},isMobile()?1000:10);});});}
1128this.getProgramGuide=function(date,selectedDay,from){var sT=$.now();$.ajax({url:BASE_URL+'/get-radio-program-guide',method:'post',data:{'date':date,'rid':$('.rid').val(),'type':$('#musorok ._calendarIcon').data('type')}}).done(function(resp){if(resp=='[]'){return;}
1129try{resp=jQuery.parseJSON(resp);}catch(e){return;}
1130$('.js-actDateP').html(selectedDay);self.refreshGuideHTML(resp);self.setScrollPos();});}
1131this.refreshGuideHTML=function(datas){var containerClass='.scrolledContent';if($('.is-app').length){containerClass='#Grid3 .js-pGuide';}
1132$(containerClass).html('');for(i in datas){if(datas[i]['program'][0]=='Nincs információ'){continue;}
1133var html='';html+='<div class="kv1_pad kpad3">';html+=' <div class="txt1" data-time="'+datas[i]['tstamp']+'"><span class="tt_time">'+datas[i]['time']+' - </span>'+datas[i]['program'][0]+'</div>';html+=' <div class="txt2">'+((datas[i]['program'][1])?datas[i]['program'][1]:'')+'</div>';html+='</div>';html+='<div class="line1"></div>';var inj=$(html);inj.find('img').on('load',function(){$(this).fadeIn();});$(containerClass).append(inj);}
1134$(containerClass+' .line1').last().remove();}
1135this.getActTime=function(){return parseInt($.now()/1000+1);};this.init();}
1136function ScheduleBoxes(){var self=this;this.actDate='';this.init=function(){this.actDate=new Date().toISOString().slice(0,10).replace('T',' ');$(".schedule-col[data-current-date='"+this.actDate+"']").each(function(i,elem){self.setActProgram($(elem));});}
1137this.setActProgram=function($container){var lastE=null;var nextTime=null;var actTime=self.getActTime();$container.find('.schedule-program-row').each(function(){if($(this).data('time')>actTime){nextTime=$(this).data('time');return false;}else{lastE=this;}});var replaceA=$('<a href="'+$container.data('url')+'" class="schedule-program-row"></a>').append($(lastE).html());replaceA.find('.schedule-program-title').append(' - '+LangI.getText('live')+' <i class="fa fa-play-circle-o"></i>');$(lastE).before(replaceA);$(lastE).remove();}
1138this.getActTime=function(){var d=new Date();return d.getTime()/1000+1;};this.init();}
1139var ProgramGuidePickerI;$(document).ready(function(){ProgramGuidePickerI=new ProgramGuidePicker();if($('.schedule-col').length){new ScheduleBoxes();}});
1140function UserViewRadios(){var allowedFields=["name","pic","rid","time","view_num"];var stapTracked=false;this.init=function(){if(typeof(rInfo)=="undefined"){return;}
1141if(document.cookie.length>6000||userHasSubscription()){GaTrackI.ga("too_big_cookie");CookieManagerI.set('radioSteps','',-7,'/');return;}}
1142this.trackStap=function(){if(typeof(rInfo)=="undefined"||stapTracked){return;}
1143stapTracked=true;var radioSteps=this.getData();var stepKeys=Object.keys(radioSteps);var stepSize=stepKeys.length;if(stepSize>10){var keysSorted=stepKeys.sort(function(a,b){return radioSteps[b]['time']-radioSteps[a]['time'];});for(var i=10;i<stepSize;i++){delete(radioSteps[keysSorted[i]]);}}
1144var urlKey=rInfo['url'];if(!urlKey){return;}
1145rInfo['time']=parseInt($.now()/1000);rInfo['view_num']=1;rInfo['name']=encodeURIComponent(rInfo['name']);if(radioSteps[urlKey]){rInfo['view_num']=radioSteps[urlKey]['view_num']+1;}
1146var rInfoTmp=rInfo;if(typeof(Object.assign)!="undefined"){rInfoTmp=Object.assign({},rInfo);}
1147for(i in rInfoTmp){if(allowedFields.indexOf(i)===-1){delete(rInfoTmp[i]);}}
1148radioSteps[urlKey]=rInfoTmp;
1148if(typeof(btoa)!="undefined"){CookieManagerI.set('radioSteps',window.btoa(JSON.stringify(radioSteps)),7,'/');}}
1149this.getData=function(){var radioSteps=CookieManagerI.get('radioSteps');if(!radioSteps||typeof(atob)=="undefined"){radioSteps={};}else{radioSteps=jQuery.parseJSON(window.atob(radioSteps));}
1150return radioSteps;}
1151this.init();}
1152function Recommend(){var self=this;this.recomRadios=new Array();this.recomRadiosUrl=new Array();this.actUrl;this.placeholder;this.init=function(){this.actUrl=$("#Grid").attr('data-act-url');this.placeholder=MyConfigI.get('defDomainFileName');if(window.innerWidth<=767||CookieManagerI.get(cookieIndex)<6){this.startScroll();return;}
1153this.pushViewRadios();this.pushFavoriteRadios();this.createHtmlList();}
1154this.pushViewRadios=function(){if(typeof(UserViewRadiosI)=="undefined"){return;}
1155var ViewRadio=UserViewRadiosI.getData();var keysSorted=Object.keys(ViewRadio).sort(function(a,b){return ViewRadio[b]['time']-ViewRadio[a]['time'];});var i=1;for(key in keysSorted){var url=keysSorted[key];if(i<=3&&this.actUrl!=url&&this.recomRadiosUrl.indexOf(url)==-1&&ViewRadio[url]){this.recomRadios.push({'type':'view_radio','name':decodeURIComponent(ViewRadio[url]['name']),'url':url,'rid':ViewRadio[url]['rid']});this.recomRadiosUrl.push(url);i++;}}}
1156this.pushSimilarRadios=function(){var SimilarRadios=$('.recommend-box').data('similar');var i=1;for(key in SimilarRadios){var url=SimilarRadios[key]['r_urlname'];if(i<=10&&this.actUrl!=url&&this.recomRadiosUrl.indexOf(url)==-1){this.recomRadios.push({'type':'similar_radio','name':decodeURIComponent(SimilarRadios[key]['r_name']),'url':url,'rid':SimilarRadios[key]['rid']});this.recomRadiosUrl.push(url);i++;}}}
1157this.pushFavoriteRadios=function(){try{var favs={};if(typeof(DeskFawsI)!="undefined"){favs=DeskFawsI.getFavData();}}catch(e){if(typeof(ConsoleDebuggerI)!="undefined"){ConsoleDebuggerI.pushMsg("DeskFawsI err: "+' - '+e.toString()+' -> '+typeof(DeskFaws));}
1158var favs={};}
1159var i=1;for(key in favs){var url=key;if(i<=3&&this.actUrl!=url&&favs[key]!=1&&this.recomRadiosUrl.indexOf(url)==-1){this.recomRadios.push({'type':'favorite_radio','name':this.safeDoubleDecodeURIComponent(favs[key]['r_name']),'url':url,'rid':favs[key]['rid']});this.recomRadiosUrl.push(url);i++;}}}
1160this.createHtmlList=function(){var itemHTML='';for(i in this.recomRadios){if(i<6){itemHTML+=this.getItemHTML(this.recomRadios[i]);}}
1161$('.recommend-box').prepend(itemHTML);this.startScroll();$('.recommend-box .button1').click(function(e){e.preventDefault();GaTrackI.ga('send','event','recommend-box',$(this).data('type'));var goTo=this.getAttribute("href");setTimeout(function(){window.location=goTo;},100);});$('.recommend-box-cont').addClass('js-lazyCont');if(LazyLoadImgI){LazyLoadImgI.checkPicLoadingNeed();}}
1162this.startScroll=function(){var $recommendBox=$('.recommend-box');if(!$recommendBox.length||typeof $.fn.slimscroll!=='function'){return;}
1163var initScroll=function($elements){if(!$elements.length||$elements[0].scrollHeight<=260){return;}
1164var options={disableFadeOut:true,height:'260px'};$elements.slimscroll(options).off('slimscrolling.recommend').on('slimscrolling.recommend',function(e,pos){$(window).scroll();});$('body').scroll();}
1165if($recommendBox.parent().hasClass('slimScrollDiv')){initScroll($recommendBox);}else if(typeof $.fn.slimscrollFirstUse==='function'){$recommendBox.slimscrollFirstUse(initScroll);}else{initScroll($recommendBox);}}
1166this.getItemHTML=function(radioData){radioData['url']=radioData['url'].replace(/#.*/,'');if(true||radioData['pic']){var imgUrl='/public/uploads/radio_img/'+radioData['url']+'/list_45.webp';}else{if(!$('.js-img-lload[src$="'+imgUrl+'"]').length&&!$('.js-img-lload[data-lazy-load$="'+imgUrl+'"]').length){imgUrl='/public/uploads/radio_img/'+radioData['url']+'/list_45.png';}}
1167var listLink=$("[data-rid='"+radioData['rid']+"']").find('.program-name');if(radioData['name']=="undefined"){radioData['name']=radioData['url'].replace('-',' ').toUpperCase();}
1168var item='\
1169   <a data-rid="'+radioData['rid']+'" data-type="'+radioData['type']+'" class="button1 hasImg extraListItem radiosListLink mix favRadio" data-def="1" data-listen="1" data-name="'+radioData['name']+'" href="/'+radioData['url']+'/?'+GaTrackI.createGaTrackURL(radioData['type'],radioData['url'],'recombox')+'" title="'+radioData['name']+'" style="display: inline-block;">\
1170    <div class="radio-info-cont">\
1171     <div class="radio-title js-marquee">\
1172      <span>'+radioData['name']+'</span>\
1173     </div>\
1174     <div class="program-name js-marquee">\
1175      '+(listLink.length?listLink.html():'<span style="margin-left: 0px;"></span>')+'\
1176     </div>\
1177    </div>\
1178    <div class="radio-logo js-lazyCont">\
1179     <img class="js-img-lload" src="/public/img/1x1.png" data-lazy-load="'+imgUrl+'" alt="'+radioData['name']+'" title="'+radioData['name']+'" height="45">\
1180    </div>\
1181    <span class="clear"></span>\
1182   </a>\
1183  ';return item;}
1184this.showBackupAffiliate=function($target,index){if(!index&&$target){index=$target.width()+'_'+$target.height();}
1185if(this.iosAffiliate(index,$target)){return true;}else if(this.androidAffiliate(index,$target)){return true;}
1186return false;}
1187this.getBackupAffiliate=function(index){var html=this.iosAffiliate(index);if(html){return html;}
1188var html=this.androidAffiliate(index);if(html){return html;}
1189return false;}
1190this.isIOS=function(){if(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)){return true;}}
1191this.androidAffiliate=function(index,$target){if(this.isIOS()){return false;}
1192var sizes={'250_250':'300_250','300_250':'300_250','360_300':'300_250','320_266':'300_250',};var ret=this.pushMobilBnr(sizes,index,'android',$('.androidli a').attr('href'),$target);return ret;}
1193this.iosAffiliate=function(index,$target){if(!this.isIOS()||!$('.iosli a').length){return false;}
1194var sizes={'250_250':'300_250','300_250':'300_250','360_300':'300_250','320_266':'300_250',};var ret=this.pushMobilBnr(sizes,index,'ios',$('.iosli a').attr('href'),$target);return ret;}
1195this.pushMobilBnr=function(sizes,index,type,href,$target){if(!href){return false;}
1196if(!sizes[index]){return false;}
1197var actSize=sizes[index];var imgSrc=BASE_URL+'/public/img/adblock/'+this.placeholder+'/'+type+'/'+actSize+'.jpg';var htmlB='<a class="mobileAffiliateAdblock '+type+'" style="width: 100%; height: 100%; display: inline-block; text-align: center;" href="'+href+'" target="_blank"><img alt="'+LangI.getText('download-for-free')+'" title="'+LangI.getText('download-for-free')+'" src="'+imgSrc+'"></a>';if(!$('.mobileAffiliateAdblock.'+type).length){$('body').on('click','.mobileAffiliateAdblock.'+type,function(){GaTrackI.ga('send','event',type+'AffiliateAdblock','click');});}
1198if($target){if($target.hasClass('js-appAdv')){$('.js-appAdv .adsbygoogle, .pls-dis-blck').remove();$target.append(htmlB);}else{$target.html(htmlB);}
1199return true;}else{return htmlB;}}
1200this.getSubscriptPromo=function(sizes){var tmpS={'300x250':['img_300_250.gif','img_300_250_1.png','img_300_250_2.png'],'300x600':['img_300_600.gif','img_300_600_1.png'],'600x300':['img_600_300.gif','img_600_300_1.png','img_600_300_2.png']};var bnr=tmpS[sizes][rand(0,tmpS[sizes].length-1)];var sT=sizes.split("x");var html='<a class="efi-promo-bnr js-subMoti" data-noti="1">\
1201   <img style="max-width: 100%;" src="'+BASE_URL+'/public/img/efi/'+LangI.actLang+'/'+bnr+'" width="'+sT[0]+'" height="'+sT[1]+'">\
1202  </a>';return html;}
1203this.safeDoubleDecodeURIComponent=function(value){if(!value||typeof value!=="string"){return value;}
1204try{value=decodeURIComponent(value);}catch(e){}
1205try{value=decodeURIComponent(value);}catch(e){}
1206return value;}
1207this.init();}
1208var UserViewRadiosI;var RecommendI;$(document).ready(function(){UserViewRadiosI=new UserViewRadios();if(!$('.recommend-box').length){return;}
1209setTimeout(function(){if(typeof(RecommendI)=="undefined"){RecommendI=new Recommend();}},5000);});
1210function SubscribeMsgLight(){this.init=function(){if(document.location.protocol=="http:"||!("serviceWorker"in navigator)||!userLoginEnabled()){$('.js-bell-noti').remove();return;}
1211this.openSubMoti();this.bindBellClick();if(CookieManagerI.getLocalStorage("push-msg-on")){LoadScriptIfNeedI.loadFirebaseMsg(function(){});}}
1212this.bindBellClick=function(){$('body').on('click','.js-bell-noti',function(e){e.preventDefault();var btn=this;LoadScriptIfNeedI.loadFirebaseMsg(function(){SubscribeMsgI.bellClickFunc(btn);});});}
1213this.openSubMoti=function(){if(CookieManagerI.getLocalStorage("push-msg-on")||CookieManagerI.get("noti_sub_o")||CookieManagerI.getPageVisitNum()<11||!LangI.getText('noti-bell-promo-dscr')||typeof(rInfo)=="undefined"||userLoggedIn()){return;}
1214if(LangI.getText('noti-bell-promo-dscr').length>1){GaTrackI.ga("sub_noti_show");var db=new DialogBox();var msg=LangI.getText('noti-bell-promo-dscr');msg+='<br><a class="more_radio_button js-bell-noti" data-event-type="radio" data-event-id="'+rInfo['rid']+'"><div class="i_left anim"></div><div class="i_center">
1214'+LangI.getText('noti-sub-btn')+'</div><div class="i_right flip anim"></div></a>';db.openPopUp(msg,LangI.getText('noti-bell-promo-title'),true,false,450);CookieManagerI.set("noti_sub_o",'1',30);}}
1215this.init();}
1216var SubscribeMsgLightI;$(document).ready(function(){SubscribeMsgLightI=new SubscribeMsgLight();setTimeout(function(){$('.head-bell').addClass('bell-anim');},5000);});
1217function Flags(){var self=this;this.autoSlideStarted=false;this.slideRunning=false;this.autoSlideSteps=0;this.autoSliderTimer=null;this.clicked=false;this.init=function(){$('.flags-cont').addClass('fslider fake-fa');this.initArrows();setTimeout(function(){if($('.siblings-sites.no-flag').length&&(window.innerHeight>$('.siblings-sites').offset().top||window.innerHeight+200>$("body").height()||window.innerHeight+$(window).scrollTop()>$('.siblings-sites').offset().top)){$('.siblings-sites').removeClass('no-flag');}},100);setTimeout(function(){if($("._bannerTop1").height()>120){$('.flags-cont').addClass('expand');}else if($('.flags-cont .expand').length){if($('.disableAds').length){return;}
1218UtilsI.initFocusListener(function(hidden){if(!document[hidden]&&!self.autoSlideStarted){self.autoSlideStarted=true;self.initAutoSlider(1000);}});}
1219if(window.innerWidth>=768){var w=768;if(window.innerWidth>=979){w=979;}else if(window.innerWidth>=1190){w=1190;}else if(window.innerWidth>=1360){w=1360;}
1220GaTrackI.ga4("topbnr_h",{'event_category':'w_'+w,'value':parseInt($('._bannerTop1').height())});}},8000);this.bindLayerOpener();this.trackingFlagClick();}
1221this.initAutoSlider=function(defTime){defTime=defTime?defTime:5000;self.autoSliderTimer=setTimeout(function(){self.slide(-1);self.autoSlideSteps++;if(self.autoSlideSteps<$('.flags-cont-inner a').length){self.initAutoSlider();}},defTime);}
1222this.initArrows=function(){$('.js-fs-right, .js-fs-left').click(function(){clearTimeout(self.autoSliderTimer);self.slide($(this).hasClass('js-fs-right')?-1:1);});}
1223this.slide=function(direction){if(this.slideRunning){return;}
1224self.clicked=true;this.slideRunning=true;var fWidth=$('.flags-cont-inner a').outerWidth(true);var tMargin=fWidth*direction;if(direction==1){var f=$('.flags-cont-inner a').last();$('.flags-cont-inner').removeClass('anim').prepend(f);$('.flags-cont-inner').css('margin-left',-1*fWidth*direction+'px');tMargin=0;}else{}
1225setTimeout(function(){$('.flags-cont-inner').addClass('anim').css('margin-left',tMargin+'px');},1);setTimeout(function(){if(direction==-1){$('.flags-cont-inner').removeClass('anim').css('margin-left','0px');$('.flags-cont-inner').append($('.flags-cont-inner a').eq(0));}
1226self.slideRunning=false;},301);}
1227this.bindLayerOpener=function(){$('.flags-layer-o').click(function(){GaTrackI.ga('flags-layer-open');var stack=new Array();var html=LangI.getText('sibling-site-promo');$('<div>').html(html).find('.pFlagsCont div').each(function(i,elem){stack.push({text:$(elem).text().trim(),html:$
1227(elem).prop('outerHTML').replace("ssitepromo_","flaglayer_")});});stack.sort(function(a,b){return a.text.localeCompare(b.text);});var sortedHtmlArray=stack.map(function(item){return item.html;});var html='<div class="pFlagsCont">'+sortedHtmlArray.join('')+'</div>';var db=new DialogBox();db.openPopUp(html,LangI.getText('other-country-radios'),true);});}
1228this.trackingFlagClick=function(){$('.flag-icon').on('click',function(e){clearTimeout(self.autoSliderTimer);var link=$(this).attr('href');if(link){var url=new URL($(this).attr('href'));GaTrackI.ga('flag-click'+"_"+url.host);}});}
1229this.init();}
1230$(document).ready(function(){new Flags();});
1231function Prehear(){var self=this;this.hls=null;this.timer=null;this.playTimer=null;this.stopTimer=null;this.bigPlayTime=null;this.audio=document.createElement('audio');this.init=function(){if(window.innerWidth<980){return;}
1232this.bindStartProcess();this.bindPlayHelp();}
1233this.bindStartProcess=function(){$('body').on('mouseenter','.extraListItem',function(){if($('.js-orderbyFav.edit').length){return;}
1234var item=this;self.observeRemoval(item,function(){clearTimeout(self.timer);clearTimeout(self.stopTimer);clearTimeout(self.playTimer);self.stopAudio(item);});var source=$(item).data('src');var uLink=document.createElement("a");uLink.href=item.href;var uBase=document.createElement("a");uBase.href=document.location.href;if(!source||(uLink.pathname==uBase.pathname&&uLink.host==uBase.host)){return;}
1235var src=atob(source);if(self.hls!=null){self.hls.destroy();self.hls=null;}
1236self.runAnim(item);if($(item).data('src')){clearTimeout(self.playTimer);self.playTimer=setTimeout(function(){if(src.indexOf('m3u8')>-1){if(typeof(Hls)=="undefined"){self.loadHLSScript(function(){self.loadHLSStream(src,item);});}else{self.loadHLSStream(src,item);}}else{self.playAudio(item);}},500);}});$('body').on('mouseleave','.extraListItem',function(){clearTimeout(self.timer);clearTimeout(self.stopTimer);clearTimeout(self.playTimer);self.stopAudio(this);});}
1237this.runAnim=function(item){$(item).addClass('phear');clearTimeout(self.timer);self.timer=setTimeout(function(){$(item).find('.radio-logo').addClass('fa-volume-up'+(self.isPlaying()?'':' anim'));GaTrackI.ga('prehear','start');},1000);}
1238this.loadHLSStream=function(sUrl,cont){if(Hls.isSupported()){var hls=new Hls();this.hls=hls;hls.loadSource(sUrl);self.audio.src=sUrl;hls.attachMedia(self.audio);self.bindHLSErrorListener(hls,cont);}};this.playAudio=function(cont){self.stopBigPlayer();var source=$(cont).data('src');var src=atob(source);if(src.indexOf('http://')>-1){src='https://stream3.rdstrm.com/prx-http/'+src.replace('http://','');}
1239if(src.indexOf('m3u8')==-1){self.audio.src=src;}
1240self.audio.volume=CookieManagerI.get('volume')?CookieManagerI.get('volume'):0.8;var playPromise=self.audio.play();if(playPromise!==null&&typeof(playPromise)!="undefined"&&typeof(Promise)!="undefined"){playPromise.then(function(){$(cont).find('.radio-logo').removeClass('anim');}).catch(function(){$(cont).find('.radio-logo').removeClass('anim');});}
1241this.stopTimer=setTimeout(function(){self.stopAudio(cont);GaTrackI.ga('prehear','stop');},30000);}
1242this.stopAudio=function(cont){$(cont).removeClass('phear').find('.radio-logo').removeClass('fa-volume-up anim');self.audio.pause();self.audio.src='';if(self.hls!=null){self.hls.destroy();self.hls=null;}
1243if(!$('.pausedByUser').length){self.playBigPlayer();}}
1244this.bindPlayHelp=function(){$('body').on('click','.radiosListLink',function(e){var box=this;if($(e.target).parent().hasClass('fa-volume-up')){if(!self.isPlaying()&&!$(box).data('phclick')){e.preventDefault();self.playAudio(box);GaTrackI.ga('prehear','extraplay');}}
1245$(box).data('phclick','1');});}
1246this.stopBigPlayer=function(){if(!$('.mRadioPlayer .playPause').length){return;}
1247clearTimeout(self.bigPlayTime);$('.mRadioPlayer .playPause').each(function(i,elem){if($(elem).hasClass('fa-pause')){$(elem).trigger('click');}});}
1248this.playBigPlayer=function(){if(!$('.mRadioPlayer .playPause').length){return;}
1249clearTimeout(self.bigPlayTime);self.bigPlayTime=setTimeout(function(){$('.mRadioPlayer .playPause').each(function(i,elem){if(!$(elem).hasClass('fa-pause')){$(elem).trigger('click');}});},2000);}
1250this.loadHLSScript=function(callback){if(typeof(Hls)=="undefined"){var $script=$('<script>');if(callback){$script.on('load',callback);}
1251$('body').append($script);var baseUrl=$('.js-radioplayerData').data('host')||$('.song-list-cont').data('host')||BASE_URL||$('base').attr('href');
1251$script.attr('src',baseUrl+'/public/js/mini/hls.light-1.1.5.min.js');}}
1252this.bindHLSErrorListener=function(hls,item){hls.on(Hls.Events.MANIFEST_PARSED,function(){self.playAudio(item);});hls.on(Hls.Events.ERROR,function(e,b,c,d){if(b.fatal==true){hls.destroy();}});}
1253this.isPlaying=function(){if(self.audio.error){return true;}
1254return self.audio&&(self.audio.currentTime>0||self.audio.ended||self.audio.readyState>2);}
1255this.observeRemoval=function(element,callback){var observer=new MutationObserver(function(mutations){for(var i=0;i<mutations.length;i++){var mutation=mutations[i];var removedNodes=mutation.removedNodes;for(var j=0;j<removedNodes.length;j++){if(removedNodes[j]===element){callback();observer.disconnect();return;}}}});observer.observe(element.parentNode,{childList:true});}
1256this.init();}
1257var PrehearI=null;$(document).ready(function(){PrehearI=new Prehear();});
1258function GaTrack(){var trackingID='';var lastPing=0;var trackStartFallback=new Date().getTime();this.ga=function(param1,param2,param3,param4,param5){lastPing=new Date().getTime();if(typeof(gtag)!="undefined"){if(param1!="send"){param1=param1.toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/^([^a-z])/,"e_$1");}
1259if(param1=="send"){gtag('event',param3,{'event_category':param4,'event_action':param5,});}else if(!param2&&!param3&&!param4){gtag('event',param1);}else if(!param3&&!param4){gtag('event',param1,{'event_category':param2});}else if(!param4){gtag('event',param1,{'event_category':param2,'event_action':param3,});}else{gtag('event',param1,{'event_category':param2,'event_action':param3,'event_label':param4,});}}else if(typeof(ga)!="undefined"){if(param1=="send"){ga(param1,param2,param3,param4,param5);}else{ga('send','event',param1,param2,param3);}}else{console.log("NO GA!",param1,param2,param3,param4,param5);}
1260if(param1.indexOf('ga_time_')===-1){this.trackTime();}}
1261this.ga4=function(eventName,params){if(typeof(gtag)!="undefined"){gtag('event',eventName,params);}else{console.log("NO GA!",eventName,params);}}
1262this.createGaTrackURL=function(source,utm_medium,utm_campaign,utm_term){var txt=[];if(source){txt.push('utm_source='+source);}
1263if(utm_medium){txt.push('utm_medium='+utm_medium);}
1264if(utm_campaign){txt.push('utm_campaign='+utm_campaign);}
1265if(utm_term){txt.push('utm_term='+utm_term);}
1266return txt.join("&");}
1267this.pingInterval=function(mustRun){var actT=new Date().getTime();if(actT-lastPing>240000||mustRun){var x=-1;if(typeof(CookieManagerI)!=="undefined"){if(CookieManagerI.getPageVisitNum()>=10){var x=parseInt(CookieManagerI.getPageVisitNum()/10)*10;}else{var x=Math.min(CookieManagerI.getPageVisitNum(),5);}}
1268this.ga('visit',x);}
1269setTimeout(function(){GaTrackI.pingInterval();},mustRun?240000:300000);}
1270this.setPageView=function(pageTitle,pageUrl){if(typeof(gtag)=="undefined"){console.log("NO GA!",pageTitle,pageUrl);return;}
1271if(!trackingID){var src=$("script[src*='?id=UA']").attr('src');if(src){trackingID=src.match(/\?id=(.*)/)[1];}}
1272if(trackingID){gtag('config',trackingID,{'page_title':pageTitle,'page_path':pageUrl});}else if(typeof(ga)!="undefined"){ga('send','pageview',pageUrl);}}
1273this.bindAutoTracking=function(){$('body').on('click','.js-gaTrack',function(){GaTrackI.ga($(this).data('cat'),$(this).data('act'),$(this).data('label'));});}
1274this.trackTime=function(){try{var elapsed=new Date().getTime()-this.getTrackStart();var lastTrack=parseInt(sessionStorage.getItem('ga_ttime_track')||0,10);var limit;if(elapsed<1200000){limit=300000;}else if(elapsed<3600000){limit=600000;}else if(elapsed<7200000){limit=1800000;}else{limit=3600000;}
1275for(var i=limit;i<elapsed;i+=limit){if(lastTrack<i){sessionStorage.setItem('ga_ttime_track',i);console.log('ga_time_'+parseInt(i/60000),i,elapsed,new Date().toLocaleTimeString());this.ga('ga_time_'+parseInt(i/60000));break;}}}catch(e){}}
1276this.getTrackStart=function(){try{return parseInt(sessionStorage.getItem('ga_ttime')||trackStartFallback,10);}catch(e){return trackStartFallback;}}
1277this.setTrackStart=function(time){try{var lastT=this.getTrackStart();if(lastT<1){sessionStorage.setItem('ga_ttime',String(time));}}catch(e){}}
1278this.setTrackStart(new Date().getTime());}
1279var GaTrackI=new GaTrack();setTimeout(function(){GaTrackI.pingInterval(true);},60000);$(document).ready(function(){GaTrackI.bindAutoTracking();});addEventListener("load",function(){setTimeout(function(){if(window.performance&&window.performance.getEntriesByType){var entries=window.performance.getEntriesByType("navigation");if(entries.length>0){var navTiming=entries[0];var pageLoadTime=navTiming.loadEventEnd-navTiming.startTime;GaTrackI.ga4("page_load_time",{'event_category':'performance','event_label':'page_load_time','page_load_time_ms':pageLo
1279adTime});var firstLoadTime=navTiming.responseEnd-navTiming.requestStart;GaTrackI.ga4("first_load_time",{'event_category':'performance','event_label':'first_load_time','first_load_time_ms':firstLoadTime});}}},1000);});
1280function AdsConversion(){this.init=function(){var isGSearch=document.referrer&&document.referrer.indexOf("google.")>-1;if(CookieManagerI.get('gref_s')){GaTrackI.ga('gref_s',CookieManagerI.get('gref_s'));}
1281if(!isGSearch){return;}
1282var path='/';var isAdsSearch=document.referrer&&document.referrer.indexOf("google.")>-1&&document.location.href.indexOf("gclid=")>-1;if(isAdsSearch){CookieManagerI.set('gref_a',parseInt(CookieManagerI.get('gref_a')||0)+1,'14',path);GaTrackI.ga('gref_a',CookieManagerI.get('gref_a'));CookieManagerI.set('gref_at',parseInt(CookieManagerI.get('gref_at')||0)+1,'30',path);GaTrackI.ga('gref_at',CookieManagerI.get('gref_at'));}else{CookieManagerI.set('gref_s',parseInt(CookieManagerI.get('gref_s')||0)+1,'14',path);GaTrackI.ga('gref_s',CookieManagerI.get('gref_s'));if(CookieManagerI.get('gref_at')){GaTrackI.ga('gref_as',1);CookieManagerI.set('gref_at',1,-1,path);GaTrackI.ga('gref_at_end',CookieManagerI.get('gref_at'));}}}
1283this.init();}
1284$(document).ready(function(){new AdsConversion();});
1285function AudioplayerExtras(){var self=this;var rsTimer=null;var audioVizInit=false;var audioPlayer=null;this.showExtras=function(){audioPlayer=AudioplayerServerI[$(".mRadioPlayer").data('url')];this.putCoverBtn();this.putEqulizerBtn();this.putLyricsYTBtn();this.bindExtraBtnsClick();if(!this.isDesktopView()){$('.mbreadcrumb').addClass('trimmed-bread');}
1286$('.player-extras').append('<div class="clear_title"></div>');}
1287this.putCoverBtn=function(){$('.cover-btn').click(function(){if(AddAdsV2I.hasAdblock()){AddAdsV2I.showAdblockMsg('adblock_try_sub_1_1');}else{if(ShazamI!==null&&ShazamI.shzDtcEnd()){self.showContent(this);}}});}
1288this.putLyricsYTBtn=function(){if(!UtilsI.checkLyricsAllow()){return;}
1289$('.extra-yt-btn').click(function(){if($('.song-cover-cont').attr('data-youtube')){$('.song-cover-cont img').click();}else if($('.songCont').length){$('.songCont').eq(0).click();}});}
1290this.putEqulizerBtn=function(){if(typeof(AudioContext)=="undefined"){return;}
1291$('.aviz-btn').click(function(){if(audioVizInit){return;}
1292audioVizInit=true;var targetBtn=this;self.showContent(targetBtn);if(!$('.viz-cont').length){$('.cover-slider-cont').before("<div class='viz-cont'></div>");}
1293LoadScriptIfNeedI.jsStack.push(($(".js-isAdmin").length?'mini/':'')+'audio-viz.min.js');LoadScriptIfNeedI.appendJS(function(){AudioVizI.init();audioVizInit=false;});});}
1294this.showContent=function(targetBtn){if($('.js-closeAppBnr:visible').length){AddAdsV2I.closeAppBanner();}else{$(".song-cover-cont > [class*='-cont']").hide();$(".song-cover-cont "+$(targetBtn).attr('data-target')).show();if(!$(targetBtn).hasClass('aviz-btn')&&$('.viz-cont').length){AudioVizI.destroyCanvas();$('.cover-btn').addClass('disappear');$('.fa-sun-regular').removeClass('disappear');}else{$('.cover-btn').removeClass('disappear');$('.fa-sun-regular').addClass('disappear');}}}
1295this.bindExtraBtnsClick=function(){$('.player-up-extras a').click(function(){var mbtn=$(this).attr('class').match(/(fa-[a-z-]*)/);GaTrackI.ga('pextra_'+(mbtn==null?'':mbtn[0]));});}
1296this.isDesktopView=function(){return window.innerWidth>480;}}
1297var AudioplayerExtrasI=new AudioplayerExtras();$(document).ready(function(){AudioplayerExtrasI.showExtras();});
1298function AudioViz(){var self=this;this.firstInit=true;this.isDestroyed=false;this.fullScreenVideo=null;this.init=function(){$('._actSongCont').append('<span class="fa-fullscreen js-fullscrn" data-toggle="tooltip" data-placement="top" title="'+LangI.getText('audio-viz-expand')+'"></span>');$('.song-cover-cont').addClass('start-audio-viz');$('.song-cover-cont ._actSongCont, .js-fullscrn').addClass('anim');this.isDestroyed=false;if(this.firstInit){$('.viz-cont, .errorMessage').remove();$('.cover-slider-cont').before("<div class='viz-cont'><canvas id='viz-canvas'></canvas><img id='viz-bg' src='"+$('[itemprop="logo"]').attr("src")+"'></div>");Callbacks.setUp();Util.setUp();var audioS=AudioplayerServerI[$('.mRadioPlayer').data('url')];
1298Nodes.setUp(audioS);Canvas.setUp();Emblem.setUp();Spectrum.setUp();Scene.setUp();Particles.setUp();Lighting.setUp();Renderer.setUp();this.bindResize();this.bindFullScreen(audioS.audio);this.firstInit=false;}}
1299this.resizeCallback=function(){if(this.isDestroyed){return;}
1300Canvas.setStyling();Particles.updateSizes();Renderer.updateSize();}
1301this.getCanvasSizes=function(){return{'w':$('.viz-cont').width(),'h':$('.viz-cont').height()};}
1302this.bindResize=function(){$(window).resize(function(){self.resizeCallback();});}
1303this.bindFullScreen=function(avAudio){document.addEventListener('fullscreenchange',function(){if(!self.isFullScreen()){$('.js-fullscrn').removeClass('fa-fullscreen-exit');$('.js-fullscrn').addClass('fa-fullscreen');self.resumeScreenSaver();}else{$('.js-fullscrn').removeClass('fa-fullscreen');$('.js-fullscrn').addClass('fa-fullscreen-exit');self.stopScreenSaver();}});$('.song-cover-cont').on('click','.js-fullscrn',function(){var targetFullScrn=$('.song-cover-cont')[0];if(!self.isFullScreen()){GaTrackI.ga('pextra','fa-sun-regular','open');if(targetFullScrn.requestFullscreen){targetFullScrn.requestFullscreen();}else if(targetFullScrn.msRequestFullscreen){targetFullScrn.msRequestFullscreen();}else if(targetFullScrn.mozRequestFullScreen){targetFullScrn.mozRequestFullScreen();}else if(targetFullScrn.webkitRequestFullscreen){targetFullScrn.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);}}else{GaTrackI.ga('pextra','fa-sun-regular','close');if(document.exitFullscreen){document.exitFullscreen();}else if(document.msExitFullscreen){document.msExitFullscreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitExitFullscreen){document.webkitExitFullscreen();}}
1304setTimeout(function(){$(window).resize();},100);});}
1305this.isFullScreen=function(){if(!document.fullscreenElement&&!document.mozFullScreenElement&&!document.webkitFullscreenElement&&!document.msFullscreenElement){return false;}else{return true;}}
1306this.destroyCanvas=function(){this.isDestroyed=true;$('.viz-cont').hide();$('.song-cover-cont').removeClass('start-audio-viz');$('.song-cover-cont ._actSongCont').removeClass('anim');$('.js-fullscrn').remove();}
1307this.stopScreenSaver=function(){console.log('stopScreenSaver');self.fullScreenVideo=document.createElement('video');self.fullScreenVideo.setAttribute('loop','');self.addSourceToVideo(self.fullScreenVideo,'webm',self.createBase64('video/webm','GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA='));self.addSourceToVideo(self.fullScreenVideo,'mp4',self.createBase64('video/mp4','AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw=='));self.fullScreenVideo.play();}
1308this.resumeScreenSaver=function(){$(self.fullScreenVideo).remove();}
1309this.addSourceToVideo=function(element,type,dataURI){var source=document.createElement('source');source.src=dataURI;source.type='video/'+type;element.appendChild(source);}
1310this.createBase64=function(mimeType,base64){return'data:'+mimeType+';base64,'+base64;}}
1311var AudioVizI=new AudioViz();
1312function Lyrics(){var self=this;var requestRunning=false;var lyricsAllow=false;var lstLID=0;this.init=function(){this.bindGetLyrics();}
1313this.bindGetLyrics=function(){$('.player-up-extras').on('click','.lyrics-btn',function(){if(AddAdsV2I.hasAdblock()){AddAdsV2I.showAdblockMsg('adblock_try_sub_1_1');}else{self.getLyrics();}
1314GaTrackI.ga("lyrics_pressed",document.location.pathname);});}
1315this.getLyrics=function(){if(requestRunning){return;}
1316requestRunning=true;$('.lyrics-btn').css('cursor','wait');
1316$.ajax({'method':'post','url':BASE_URL+'/detect-lyrics','data':{'rsid':$('.flip-card-front .helper').data("rsid"),'rid':$('.mRadioPlayer').data('rid')},'dataType':'json'}).done(function(resp){lstLID=resp['l_id'];var DB=new DialogBox();if(resp.status==1){DB.bindOkCallback(self.openPrecisionLayer);DB.bindCloseCallback(self.openPrecisionLayer);}else if(resp.status==0){DB.bindOkCallback(function(){var txt=$('.my-textarea').val();var rsid=$('.my-textarea').attr('data-rsid');if(txt){$.ajax({'url':BASE_URL+'/save-lyrics','method':'post','data':{'txt':txt,'rsid':rsid,'lstLID':lstLID}}).done(function(){var cDB=new DialogBox();cDB.openPopUp("",LangI.getText("lyrics-help-thanks"));});GaTrackI.ga('lyrics','send-lyrics');}});}
1317if(resp.status==3&&userLoginEnabled()){SubscriptionI.showMotiLayer(resp.txt);}else{DB.openPopUp(resp.txt,LangI.getText("lyrics-title"),false,resp.status==1?300:undefined);}
1318$('.lyrics-btn').css('cursor','pointer');requestRunning=false;GaTrackI.ga('lyrics',$('.mRadioPlayer').data('url'),$('.actSong').text()+' - '+resp.status);GaTrackI.ga('lyrics','1faild',$('.actSong').text());});}
1319this.openPrecisionLayer=function(){setTimeout(function(){var cDB=new DialogBox();cDB.bindConfirm(function(){cDB.closePopUp();GaTrackI.ga('lyrics','precision','1');},function(){if($(this).hasClass('button_red')){var rsid=$('.flip-card-front .helper').data("rsid");$.ajax({'url':BASE_URL+'/set-lyrics-err','method':'post','data':{'rsid':rsid,'lstLID':lstLID}});GaTrackI.ga('lyrics','precision','0');}});cDB.openPopUp("",LangI.getText('lyrics-precision-title'));});}
1320this.init();}
1321var LyricsI=new Lyrics();
1322function TimedSwitchOff(){var self=this;this.targetTime=null;this.tb=null;this.init=function(){$('.fa-countdown').click(function(){if(AddAdsV2I.hasAdblock()){AddAdsV2I.showAdblockMsg('adblock_try_sub_1_1');}else{self.processEvent();}});}
1323this.processEvent=function(){if($('.fa-countdown').hasClass('live')){if(this.tb!==null){this.tb.resetTimer();}}else{$('.fa-countdown').addClass('live');}}
1324this.startTimer=function(minutes){this.tb=new TimerBadge();this.tb.startTimer(minutes,function(){var audio=AudioplayerServerI[$('.mRadioPlayer').data("url")].audio;var e=new Event("play");audio.pause();audio.dispatchEvent(e);},function(){$('.fa-countdown').removeClass('live');});}
1325this.init();}
1326var TimedSwitchOffI=null;$(document).ready(function(){TimedSwitchOffI=new TimedSwitchOff();});
1327function TimerBadge(){var self=this;var badgeId='timer-'+$('.timer-badge').length;this.targetTime=null;this.resetCallback=null;this.icon='🌙';var stopTimeout=null;var timerInterval=null;var startTime=0;var incrDirection=false;this.startTimer=function(minutes,finishCallback,resetCallback){startTime=Date.now();this.resetCallback=resetCallback;incrDirection=minutes===null?true:false;if(!incrDirection){var ms=minutes*1000;this.targetTime=startTime+ms;clearTimeout(stopTimeout);stopTimeout=setTimeout(function(){finishCallback();self.resetTimer();},ms);}
1328clearInterval(timerInterval);timerInterval=setInterval(function(){self.updateText();},1000);this.showTimer();}
1329this.showTimer=function(){if(!$('.timer-container').length){$('body').append('<div class="timer-container"></div>');}
1330var html='<div id="'+badgeId+'" class="timer-badge sleep-timer-badge"><span class="timer-icon">'+this.icon+'</span><span class="time-left-display">00:00:00</span><button class="sleep-timer-close" aria-label="Stop">×</button></div>';if(!$('#'+badgeId).length){$('.timer-container').append(html);$('#'+badgeId+' .sleep-timer-close').click(function(){self.resetTimer();});}else{$('#'+badgeId+' .time-left-display').html('00:00:00');$('#'+badgeId+' .sleep-timer-badge').removeClass('hidden');}
1331this.updateText();}
1332this.resetTimer=function(noRunCalback){clearTimeout(stopTimeout);clearInterval(timerInterval);$('#'+badgeId+'.sleep-timer-badge').addClass('hidden');setTimeout(function(){$('#'+badgeId+'.sleep-timer-badge').remove();},1000);if(!noRunCalback){this.resetCallback();}}
1333this.updateText=function(){var now=Date.now();if(incrDirection){var timeLeft=Math.max(0,(now-startTime)/1000);}else{var timeLeft=Math.max(0,(this.targetTime-now)/1000);}
1334var h=Math.floor(timeLeft/3600).toString().padStart(2,'0');var m=Math.floor((timeLeft%3600)/60).toString().padStart(2,'0');var s=Math.floor(timeLeft%60).toString().padStart(2,'0');$('#'+badgeId+' .time-left-display').html(h+":"+m+":"+s);}}"undefined"!=typeof window&&function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exp
1334orts.Hls=e():t.Hls=e()}(this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(i,a,function(e){return t[e]}.bind(null,a));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/dist/",r(r.s=19)}([function(t,e,r){"use strict";var i;r.d(e,"a",(function(){return i}
vendor: 116,409 bytes, line 1334
1334)),function(t){t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached"}(i||(i={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return l}));var i=function(){},a={trace:i,debug:i,log:i,warn:i,info:i,error:i},n=a;function s(t){var e=self.console[t];return e?e.bind(self.console,"["+t+"] >"):i}function o(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];r.forEach((function(e){n[e]=t[e]?t[e].bind(t):s(e)}))}(t,"debug","log","info","warn","error");try{n.log()}catch(t){n=a}}else n=a}var l=a},function(t,e,r){"use strict";var i,a;r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(i||(i={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown"}(a||(a={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)};Number.MAX_SAFE_INTEGER},function(t,e,r){"use strict";var i,a;r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a})),function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(i||(i={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(a||(a={}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return v})),r.d(e,"c",(function(){return g}));var i,a=r(3),n=r(11),s=r(1),o=r(15),l=r(12);function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,d(t,e)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e,r){return e&&h(t.prototype,e),r&&h(t,r),t}!function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"}(i||(i={}));var c=function(){function t(t){var e;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((e={})[i.AUDIO]=null,e[i.VIDEO]=null,e[i.AUDIOVIDEO]=null,e),this.baseurl=t}return t.prototype.setByteRange=function(t,e){var r=t.split("@",2),i=[];1===r.length?i[0]=e?e.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},f(t,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(n.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(t){this._url=t}}]),t}(),v=function(t){function e(e,r){var i;return(i=t.call(this,r)||this)._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new l.a,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=e,i}u(e,t);var r=e.prototype;return r.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},r.setDecryptDataFromLevelKey=function(t,e){var r=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((r=o.a.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,i,a,n){void 0===n&&(n=!1);var s=this.elementaryStreams,o=s[t];o?(o.startPTS=Math.min(o.startPTS,e),o.endPTS=Math.max(o.endPTS,r),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,a)):s[t]={startPTS:e,endPTS:r,startDTS:i,endDTS:a,partial:n}},r.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[i.AUDIO]=null,t[i.VIDEO]=null,t[i.AUDIOVIDEO]=null},f(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&s.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(a.a)(this.programDateTime))return null;var t=Object(a.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(c),g=function(t){function e(e,r,i,a,n){var s;(s=t.call(this,i)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new l.a,s.duration=e.decimalFloatingPoint("DURATION"),s.gap=e.bool("GAP"),s.independent=e.bool("INDEPENDENT"),s.relurl=e.enumeratedString("URI"),s.fragment=r,s.index=a;var o=e.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,n),n&&(s.fragOffset=n.fragOffset+n.duration),s}return u(e,t),f(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(c)},function(t,e,r){"use strict";r.d(e,"b",(function(){return d})),r.d(e,"g",(function(){return h})),r.d(e,"f",(function(){return f})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return v})),r.d(e,"e",(function(){return p})),r.d(e,"h",(function(){return m})),r.d(e,"a",(function(){return y}));var i=r(8),a=r(5),n=Math.pow(2,32)-1,s=[].push;function o(t){return String.fromCharCode.apply(null,t)}function l(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r}function u(t,e,r){"data"in t&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function d(t,e){var r,i,a,n=[];if(!e.length)return n;"data"in t?(r=t.data,i=t.start,a=t.end):(i=0,a=(r=t).byteLength);for(var u=i;u<a;){var h=l(r,u),f=h>1?u+h:a;if(o(r.subarray(u+4,u+8))===e[0])if(1===e.length)n.push({data:r,start:u+8,end:f});else{var c=d({data:r,start:u+8,end:f},e.slice(1));c.length&&s.apply(n,c)}u=f}return n}function h(t){var e=d(t,["moov"])[0],r=e?e.end:null,i=d(t,["sidx"]);if(!i||!i[0])return null;var a=[],n=i[0],s=n.data[0],o=0===s?8:16,u=l(n,o);o+=4;o+=0===s?8:16,o+=2;var h=n.end+0,f=function(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r}(n,o);o+=2;for(var c=0;c<f;c++){var v=o,g=l(n,v);v+=4;var p=2147483647&g;if(1===(2147483648&g)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var m=l(n,v);v+=4,a.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/u,start:h,end:h+p-1}}),h+=p,o=v+=4}return{earliestPresentationTime:0,timescale:u,version:s,referencesCount:f,references:a,moovEndOffset:r}}function f(t){for(var e=[],r=d(t,["moov","trak"]),i=0;i<r.length;i++){var n=r[i],s=d(n,["tkhd"])[0];if(s){var u=s.data[s.start],h=0===u?12:20,f=l(s,h),c=d(n,["mdia","mdhd"])[0];if(c){var v=l(c,h=0===(u=c.data[c.start])?12:20),g=d(n,["mdia","hdlr"])[0];if(g){var p=o(g.data.subarray(g.start+8,g.start+12)),m={soun:a.a.AUDIO,vide:a.a.VIDEO}[p];if(m){var y=d(n,["mdia","minf","stbl","stsd"])[0],b=void 0;y&&(b=o(y.data.subarray(y.start+12,y.start+16))),e[f]={timescale:v,type:m},e[m]={timescale:v,id:f,codec:b}}}}}}return d(t,["moov","mvex","trex"]).forEach((function(t){var r=l(t,4),i=e[r];i&&(i.default={duration:l(t,12),flags:l(t,20)})})),e}function c(t,e){return d(e,["moof","traf"]).reduce((function(e,r){var i=d(r,["tfdt"])[0],a=i.data[i.start],n=d(r,["tfhd"]).reduce((function(e,r){var n=l(r,4),s=t[n];if(s){var o=l(i,4);1===a&&(o*=Math.pow(2,32),o+=l(i,8));var u=o/(s.timescale||9e4);if(isFinite(u)&&(null===e||u<e))return u}return e}),null);return null!==n&&isFinite(n)&&(null===e||n<e)?n:e}),null)||0}function v(t,e){for(var r=0,i=0,n=0,s=d(t,["moof","traf"]),o=0;o<s.length;o++){var u=s[o],f=d(u,["tfhd"])[0],c=e[l(f,4)];if(c){var v=c.default,p=l(f,0)|(null==v?void 0:v.flags),m=null==v?void 0:v.duration;8&p&&(m=l(f,2&p?12:8));for(var y=c.timescale||9e4,b=d(u,["trun"]),T=0;T<b.length;T++){if(!(r=g(b[T]))&&m)r=m*l(b[T],4);c.type===a.a.VIDEO?i+=r/y:c.type===a.a.AUDIO&&(n+=r/y)}}}if(0===i&&0===n){var E=h(t);if(null!=E&&E.references)return E.references.reduce((function(t,e){return t+e.info.duration||0}),0)}return i||n}function g(t){var e=l(t,0),r=8;1&e&&(r+=4),4&e&&(r+=4);for(var i=0,a=l(t,4),n=0;n<a;n++){if(256&e)i+=l(t,r),r+=4;512&e&&(r+=4),1024&e&&(r+=4),2048&e&&(r+=4)}return i}function p(t,e,r){d(e,["moof","traf"]).forEach((function(e){d(e,["tfhd"]).forEach((function(i){var a=l(i,4),s=t[a];if(s){var o=s.timescale||9e4;d(e,["tfdt"]).forEach((function(t){var e=t.data[t.start],i=l(t,4);if(0===e)u(t,4,i-r*o);else{i*=Math.pow(2,32),i+=l(t,8),i-=r*o,i=Math.max(i,0);var a=Math.floor(i/(n+1)),s=Math.floor(i%(n+1));u(t,4,a),u(t,8,s)}}))}}))}))}function m(t){var e={valid:null,remainder:null},r=d(t,["moof"]);if(!r)return e;if(r.length<2)return e.remainder=t,e;var a=r[r.length-1];return e.valid=Object(i.a)(t,0,a.start-8),e.remainder=Object(i.a)(t,a.start-8),e}function y(t,e){var r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"a",(function(){return l})),r.d(e,"d",(function(){return u})),r.d(e,"e",(function(){return d})),r.d(e,"c",(function(){return f})),r.d(e,"f",(function(){return y}));var i,a=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},n=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},s=function(t,e){for(var r=e,i=0;a(t,e);){i+=10,i+=o(t,e+6),n(t,e+10)&&(i+=10),e+=i}if(i>0)return t.subarray(r,r+i)},o=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},l=function(t,e){return a(t,e)&&o(t,e+6)+10<=t.length-e},u=function(t){for(var e=f(t),r=0;r<e.length;r++){var i=e[r];if(d(i))return m(i)}},d=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},h=function(t){var e=String.fromCharCode(t[0],t[1],t[2],t[3]),r=o(t,4);return{type:e,size:r,data:t.subarray(10,10+r)}},f=function(t){for(var e=0,r=[];a(t,e);){for(var i=o(t,e+6),s=(e+=10)+i;e+8<s;){var l=h(t.subarray(e)),u=c(l);u&&r.push(u),e+=l.size+10}n(t,e)&&(e+=10)}return r},c=function(t){return"PRIV"===t.type?v(t):"W"===t.type[0]?p(t):g(t)},v=function(t){if(!(t.size<2)){var e=y(t.data,!0),r=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:r.buffer}}},g=function(t){if(!(t.size<2)){if("TXXX"===t.type){var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var i=y(t.data.subarray(e));return{key:t.type,info:r,data:i}}var a=y(t.data.subarray(1));return{key:t.type,data:a}}},p=function(t){if("WXXX"===t.type){if(t.size<2)return;var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var i=y(t.data.subarray(e));return{key:t.type,info:r,data:i}}var a=y(t.data);return{key:t.type,data:a}},m=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},y=function(t,e){void 0===e&&(e=!1);var r=b();if(r){var i=r.decode(t);if(e){var a=i.indexOf("\0");return-1!==a?i.substring(0,a):i}return i.replace(/\0/g,"")}for(var n,s,o,l=t.length,u="",d=0;d<l;){if(0===(n=t[d++])&&e)return u;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(n);break;case 12:case 13:s=t[d++],u+=String.fromCharCode((31&n)<<6|63&s);break;case 14:s=t[d++],o=t[d++],u+=String.fromCharCode((15&n)<<12|(63&s)<<6|(63&o)<<0)}}return u};function b(){return i||void 0===self.TextDecoder||(i=new self.TextDecoder("utf-8")),i}},function(t,e,r){"use strict";function i(t,e,r){return Uint8Array.prototype.slice?t.slice(e,r):new Uint8Array(Array.prototype.slice.call(t,e,r))}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";r.d(e,"c",(function(){return St})),r.d(e,"d",(function(){return At})),r.d(e,"a",(function(){return Rt})),r.d(e,"b",(function(){return Dt}));var i=r(0),a=r(2),n=r(14),s=r(3),o=r(7);var l=r(6),u=r(8),d=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,r){},e.demux=function(t,e){this.cachedData&&(t=Object(l.a)(this.cachedData,t),this.cachedData=null);var r,i,a=o.b(t,0),n=a?a.length:0,s=this._audioTrack,d=this._id3Track,f=a?o.d(a):void 0,c=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=h(f,e)),a&&a.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:a}),i=this.initPTS;n<c;){if(this.canParse(t,n)){var v=this.appendFrame(s,t,n);v?(this.frameIndex++,i=v.sample.pts,r=n+=v.length):n=c}else o.a(t,n)?(a=o.b(t,n),d.samples.push({pts:i,dts:i,data:a}),r=n+=a.length):n++;if(n===c&&r!==c){var g=Object(u.a)(t,r);this.cachedData?this.cachedData=Object(l.a)(this.cachedData,g):this.cachedData=g}}return{audioTrack:s,avcTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},id3Track:d,textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},e.flush=function(t){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},id3Track:this._id3Track,textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.destroy=function(){},t}(),h=function(t,e){return Object(s.a)(t)?90*t:9e4*e},f=d,c=r(1);function v(t,e){return 255===t[e]&&240==(246&t[e+1])}function g(t,e){return 1&t[e+1]?7:9}function p(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function m(t,e){return e+1<t.length&&v(t,e)}function y(t,e){if(m(t,e)){var r=g(t,e);if(e+r>=t.length)return!1;var i=p(t,e);if(i<=r)return!1;var a=e+i;return a===t.length||m(t,a)}return!1}function b(t,e,r,n,s){if(!t.samplerate){var o=function(t,e,r,n){var s,o,l,u,d=navigator.userAgent.toLowerCase(),h=n,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&e[r+2])>>>6);var v=(60&e[r+2])>>>2;if(!(v>f.length-1))return l=(1&e[r+2])<<2,l|=(192&e[r+3])>>>6,c.b.log("manifest codec:"+n+", ADTS type:"+s+", samplingIndex:"+v),/firefox/i.test(d)?v>=6?(s=5,u=new Array(4),o=v-3):(s=2,u=new Array(2),o=v):-1!==d.indexOf("android")?(s=2,u=new Array(2),o=v):(s=5,u=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&v>=6?o=v-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(v>=6&&1===l||/vivaldi/i.test(d))||!n&&1===l)&&(s=2,u=new Array(2)),o=v)),u[0]=s<<3,u[0]|=(14&v)>>1,u[1]|=(1&v)<<7,u[1]|=l<<3,5===s&&(u[1]|=(14&o)>>1,u[2]=(1&o)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[v],channelCount:l,codec:"mp4a.40."+s,manifestCodec:h};t.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+v})}(e,r,n,s);if(!o)return;t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,c.b.log("parsed codec:"+t.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function T(t){return 9216e4/t}function E(t,e,r,i,a){var n=function(t,e,r,i,a){var n=g(t,e),s=p(t,e);if((s-=n)>0)return{headerLength:n,frameLength:s,stamp:r+i*a}}(e,r,i,a,T(t.samplerate));if(n){var s,o=n.frameLength,l=n.headerLength,u=n.stamp,d=l+o,h=Math.max(0,r+d-e.length);h?(s=new Uint8Array(d-l)).set(e.subarray(r+l,e.length),0):s=e.subarray(r+l,r+d);var f={unit:s,pts:u};return h||t.samples.push(f),{sample:f,length:d,missing:h}}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var L=function(t){var e,r;function i(e,r){var i;return(i=t.call(this)||this).observer=void 0,i.config=void 0,i.observer=e,i.config=r,i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,S(e,r);var a=i.prototype;return a.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(o.b(t,0)||[]).length,r=t.length;e<r;e++)if(y(t,e))return c.b.log("ADTS sync word found !"),!0;return!1},a.canParse=function(t,e){return function(t,e){return function(t,e){return e+5<t.length}(t,e)&&v(t,e)&&p(t,e)<=t.length-e}(t,e)},a.appendFrame=function(t,e,r){b(t,this.observer,e,r,t.manifestCodec);var i=E(t,e,r,this.initPTS,this.frameIndex);if(i&&0===i.missing)return i},i}(f);L.minProbeByteLength=9;var A=L,R=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(l.b)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,r={type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0};if(this.config.progressive){this.remainderData&&(e=Object(l.a)(this.remainderData,t));var i=Object(l.h)(e);this.remainderData=i.remainder,r.samples=i.valid||new Uint8Array}else r.samples=e;return{audioTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},avcTrack:r,id3Track:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.flush=function(){var t={type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0};return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},avcTrack:t,id3Track:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0},textTrack:{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();R.minProbeByteLength=1024;var D=R,_=null,k=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],x=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],w=[0,1,1,4];function O(t,e,r,i,a){if(!(r+24>e.length)){var n=I(e,r);if(n&&r+n.frameLength<=e.length){var s=i+a*(9e4*n.samplesPerFrame/n.sampleRate),o={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(o),{sample:o,length:n.frameLength,missing:0}}}}function I(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3;if(1!==r&&0!==a&&15!==a&&3!==n){var s=t[e+2]>>1&1,o=t[e+3]>>6,l=1e3*k[14*(3===r?3-i:3===i?3:4)+a-1],u=x[3*(3===r?0:2===r?1:2)+n],d=3===o?1:2,h=C[r][i],f=w[i],c=8*h*f,v=Math.floor(h*l/u+s)*f;if(null===_){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);_=g?parseInt(g[1]):0}return!!_&&_<=87&&2===i&&l>=224e3&&0===o&&(t[e+3]=128|t[e+3]),{sampleRate:u,channelCount:d,frameLength:v,samplesPerFrame:c}}}function P(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function F(t,e){return e+1<t.length&&P(t,e)}function M(t,e){if(e+1<t.length&&P(t,e)){var r=I(t,e),i=4;null!=r&&r.frameLength&&(i=r.frameLength);var a=e+i;return a===t.length||F(t,a)}return!1}var N=function(){function t(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,i=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");i.set(t.subarray(r,r+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&c.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<<e|this.readBits(e):r},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,r=8,i=0;i<t;i++)0!==r&&(r=(e+this.readEG()+256)%256),e=0===r?e:r},e.readSPS=function(){var t,e,r,i=0,a=0,n=0,s=0,o=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),d=this.readBoolean.bind(this),h=this.skipBits.bind(this),f=this.skipEG.bind(this),c=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);o();var g=o();if(l(5),h(3),o(),c(),100===g||110===g||122===g||244===g||44===g||83===g||86===g||118===g||128===g){var p=u();if(3===p&&h(1),c(),c(),h(1),d())for(e=3!==p?8:12,r=0;r<e;r++)d()&&v(r<6?16:64)}c();var m=u();if(0===m)u();else if(1===m)for(h(1),f(),f(),t=u(),r=0;r<t;r++)f();c(),h(1);var y=u(),b=u(),T=l(1);0===T&&h(1),h(1),d()&&(i=u(),a=u(),n=u(),s=u());var E=[1,1];if(d()&&d())switch(o()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[o()<<8|o(),o()<<8|o()]}return{width:Math.ceil(16*(y+1)-2*i-2*a),height:(2-T)*(b+1)*16-(T?2:4)*(n+s),pixelRatio:E}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),B=function(){function t(t,e,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new n.a(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,r,i){var a=t[e].unit,n=a.subarray(16,a.length-a.length%16),s=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),o=this;this.decryptBuffer(s,(function(n){var s=new Uint8Array(n);a.set(s,16),i||o.decryptAacSamples(t,e+1,r)}))},e.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},e.getAvcDecryptedUnit=function(t,e){for(var r=new Uint8Array(e),i=0,a=32;a<t.length-16;a+=160,i+=16)t.set(r.subarray(i,i+16),a);return t},e.decryptAvcSample=function(t,e,r,i,a,n){var s=X(a.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,(function(o){a.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(t,e,r+1,i)}))},e.decryptAvcSamples=function(t,e,r,i){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.data.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,s),!s)return}}}},t}(),U={video:1,audio:2,id3:3,text:4},G=function(){function t(t,e,r){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=t,this.config=e,this.typeSupported=r}t.probe=function(e){var r=t.syncOffset(e);return!(r<0)&&(r&&c.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},t.syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r<e;){if(71===t[r]&&71===t[r+188]&&71===t[r+376])return r;r++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:U[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===t?e:void 0}};var e=t.prototype;return e.resetInitSegment=function(e,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",i),this._audioTrack=t.createTrack("audio",i),this._id3Track=t.createTrack("id3",i),this._txtTrack=t.createTrack("text",i),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=r,this._duration=i},e.resetTimeStamp=function(){},e.resetContiguity=function(){var t=this._audioTrack,e=this._avcTrack,r=this._id3Track;t&&(t.pesData=null),e&&(e.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},e.demux=function(e,r,n,s){var o;void 0===n&&(n=!1),void 0===s&&(s=!1),n||(this.sampleAes=null);var u=this._avcTrack,d=this._audioTrack,h=this._id3Track,f=u.pid,v=u.pesData,g=d.pid,p=h.pid,m=d.pesData,y=h.pesData,b=!1,T=this.pmtParsed,E=this._pmtId,S=e.length;if(this.remainderData&&(S=(e=Object(l.a)(this.remainderData,e)).length,this.remainderData=null),S<188&&!s)return this.remainderData=e,{audioTrack:d,avcTrack:u,id3Track:h,textTrack:this._txtTrack};var L=Math.max(0,t.syncOffset(e));(S-=(S+L)%188)<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,S,e.buffer.byteLength-S));for(var A=0,R=L;R<S;R+=188)if(71===e[R]){var D=!!(64&e[R+1]),_=((31&e[R+1])<<8)+e[R+2],k=void 0;if((48&e[R+3])>>4>1){if((k=R+5+e[R+4])===R+188)continue}else k=R+4;switch(_){case f:D&&(v&&(o=V(v))&&this.parseAVCPES(o,!1),v={data:[],size:0}),v&&(v.data.push(e.subarray(k,R+188)),v.size+=R+188-k);break;case g:D&&(m&&(o=V(m))&&(d.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),m={data:[],size:0}),m&&(m.data.push(e.subarray(k,R+188)),m.size+=R+188-k);break;case p:D&&(y&&(o=V(y))&&this.parseID3PES(o),y={data:[],size:0}),y&&(y.data.push(e.subarray(k,R+188)),y.size+=R+188-k);break;case 0:D&&(k+=e[k]+1),E=this._pmtId=H(e,k);break;case E:D&&(k+=e[k]+1);var x=K(e,k,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,n);(f=x.avc)>0&&(u.pid=f),(g=x.audio)>0&&(d.pid=g,d.isAAC=x.isAAC),(p=x.id3)>0&&(h.pid=p),b&&!T&&(c.b.log("reparse from beginning"),b=!1,R=L-188),T=this.pmtParsed=!0;break;case 17:case 8191:break;default:b=!0}}else A++;A>0&&this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+A+" TS packet/s that do not start with 0x47"}),u.pesData=v,d.pesData=m,h.pesData=y;var C={audioTrack:d,avcTrack:u,id3Track:h,textTrack:this._txtTrack};return s&&this.extractRemainingSamples(C),C},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,r=t.audioTrack,i=t.avcTrack,a=t.id3Track,n=i.pesData,s=r.pesData,o=a.pesData;n&&(e=V(n))?(this.parseAVCPES(e,!0),i.pesData=null):i.pesData=n,s&&(e=V(s))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=s&&s.size&&c.b.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=s),o&&(e=V(o))?(this.parseID3PES(e),a.pesData=null):a.pesData=o},e.demuxSampleAes=function(t,e,r){var i=this.demux(t,r,!0,!this.config.progressive),a=this.sampleAes=new B(this.observer,this.config,e);return this.decrypt(i,a)},e.decrypt=function(t,e){return new Promise((function(r){var i=t.audioTrack,a=t.avcTrack;i.samples&&i.isAAC?e.decryptAacSamples(i.samples,0,(function(){a.samples?e.decryptAvcSamples(a.samples,0,0,(function(){r(t)})):r(t)})):a.samples&&e.decryptAvcSamples(a.samples,0,0,(function(){r(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var r,i=this,a=this._avcTrack,n=this.parseAVCNALu(t.data),s=this.avcSample,l=!1;t.data=null,s&&n.length&&!a.audFound&&(W(s,a),s=this.avcSample=j(!1,t.pts,t.dts,"")),n.forEach((function(e){switch(e.type){case 1:r=!0,s||(s=i.avcSample=j(!0,t.pts,t.dts,"")),s.frame=!0;var n=e.data;if(l&&n.length>4){var u=new N(n).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:r=!0,s||(s=i.avcSample=j(!0,t.pts,t.dts,"")),s.key=!0,s.frame=!0;break;case 6:r=!0;var d=new N(X(e.data));d.readUByte();for(var h=0,f=0,c=!1,v=0;!c&&d.bytesAvailable>1;){h=0;do{h+=v=d.readUByte()}while(255===v);f=0;do{f+=v=d.readUByte()}while(255===v);if(4===h&&0!==d.bytesAvailable){if(c=!0,181===d.readUByte())if(49===d.readUShort())if(1195456820===d.readUInt())if(3===d.readUByte()){for(var g=d.readUByte(),p=31&g,m=[g,d.readUByte()],y=0;y<p;y++)m.push(d.readUByte()),m.push(d.readUByte()),m.push(d.readUByte());Y(i._txtTrack.samples,{type:3,pts:t.pts,bytes:m})}}else if(5===h&&0!==d.bytesAvailable){if(c=!0,f>16){for(var b=[],T=0;T<16;T++)b.push(d.readUByte().toString(16)),3!==T&&5!==T&&7!==T&&9!==T||b.push("-");for(var E=f-16,S=new Uint8Array(E),L=0;L<E;L++)S[L]=d.readUByte();Y(i._txtTrack.samples,{pts:t.pts,payloadType:h,uuid:b.join(""),userData:Object(o.f)(S),userDataBytes:S})}}else if(f<d.bytesAvailable)for(var A=0;A<f;A++)d.readUByte()}break;case 7:if(r=!0,l=!0,!a.sps){var R=new N(e.data).readSPS();a.width=R.width,a.height=R.height,a.pixelRatio=R.pixelRatio,a.sps=[e.data],a.duration=i._duration;for(var D=e.data.subarray(1,4),_="avc1.",k=0;k<3;k++){var x=D[k].toString(16);x.length<2&&(x="0"+x),_+=x}a.codec=_}break;case 8:r=!0,a.pps||(a.pps=[e.data]);break;case 9:r=!1,a.audFound=!0,s&&W(s,a),s=i.avcSample=j(!1,t.pts,t.dts,"");break;case 12:r=!1;break;default:r=!1,s&&(s.debug+="unknown NAL "+e.type+" ")}s&&r&&s.units.push(e)})),e&&s&&(W(s,a),this.avcSample=null)},e.getLastNalUnit=function(){var t,e,r=this.avcSample;if(!r||0===r.units.length){var i=this._avcTrack.samples;r=i[i.length-1]}if(null!==(t=r)&&void 0!==t&&t.units){var a=r.units;e=a[a.length-1]}return e},e.parseAVCNALu=function(t){var e,r,i=t.byteLength,a=this._avcTrack,n=a.naluState||0,s=n,o=[],l=0,u=-1,d=0;for(-1===n&&(u=0,d=31&t[0],n=0,l=1);l<i;)if(e=t[l++],n)if(1!==n)if(e)if(1===e){if(u>=0){var h={data:t.subarray(u,l-n-1),type:d};o.push(h)}else{var f=this.getLastNalUnit();if(f&&(s&&l<=4-s&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-s)),(r=l-n-1)>0)){var c=new Uint8Array(f.data.byteLength+r);c.set(f.data,0),c.set(t.subarray(0,r),f.data.byteLength),f.data=c,f.state=0}}l<i?(u=l,d=31&t[l],n=0):n=-1}else n=0;else n=3;else n=e?0:2;else n=e?0:1;if(u>=0&&n>=0){var v={data:t.subarray(u,i),type:d,state:n};o.push(v)}if(0===o.length){var g=this.getLastNalUnit();if(g){var p=new Uint8Array(g.data.byteLength+t.byteLength);p.set(g.data,0),p.set(t,g.data.byteLength),g.data=p}}return a.naluState=n,o},e.parseAACPES=function(t){var e,r,n,s,o,l=0,u=this._audioTrack,d=this.aacOverFlow,h=t.data;if(d){this.aacOverFlow=null;var f=d.sample.unit.byteLength,v=Math.min(d.missing,f),g=f-v;d.sample.unit.set(h.subarray(0,v),g),u.samples.push(d.sample),l=d.missing}for(e=l,r=h.length;e<r-1&&!m(h,e);e++);if(e!==l&&(e<r-1?(n="AAC PES did not start with ADTS header,offset:"+e,s=!1):(n="no ADTS header found in AAC PES",s=!0),c.b.warn("parsing error:"+n),this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:s,reason:n}),s))return;if(b(u,this.observer,h,e,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!d)return void c.b.warn("[tsdemuxer]: AAC PES unknown PTS");var p=T(u.samplerate);o=d.sample.pts+p}for(var y=0;e<r;){if(m(h,e)){if(e+5<r){var S=E(u,h,e,o,y);if(S){if(!S.missing){e+=S.length,y++;continue}this.aacOverFlow=S}}break}e++}},e.parseMPEGPES=function(t){var e=t.data,r=e.length,i=0,a=0,n=t.pts;if(void 0!==n)for(;a<r;)if(F(e,a)){var s=O(this._audioTrack,e,a,n,i);if(!s)break;a+=s.length,i++}else a++;else c.b.warn("[tsdemuxer]: MPEG PES unknown PTS")},e.parseID3PES=function(t){void 0!==t.pts?this._id3Track.samples.push(t):c.b.warn("[tsdemuxer]: ID3 PES unknown PTS")},t}();function j(t,e,r,i){return{key:t,frame:!1,pts:e,dts:r,units:[],debug:i,length:0}}function H(t,e){return(31&t[e+10])<<8|t[e+11]}function K(t,e,r,i){var a={audio:-1,avc:-1,id3:-1,isAAC:!0},n=e+3+((15&t[e+1])<<8|t[e+2])-4;for(e+=12+((15&t[e+10])<<8|t[e+11]);e<n;){var s=(31&t[e+1])<<8|t[e+2];switch(t[e]){case 207:if(!i){c.b.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===a.audio&&(a.audio=s);break;case 21:-1===a.id3&&(a.id3=s);break;case 219:if(!i){c.b.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===a.avc&&(a.avc=s);break;case 3:case 4:r?-1===a.audio&&(a.audio=s,a.isAAC=!1):c.b.log("MPEG audio found, not supported in this browser");break;case 36:c.b.warn("Unsupported HEVC stream type found")}e+=5+((15&t[e+3])<<8|t[e+4])}return a}function V(t){var e,r,i,a,n,s=0,o=t.data;if(!t||0===t.size)return null;for(;o[0].length<19&&o.length>1;){var l=new Uint8Array(o[0].length+o[1].length);l.set(o[0]),l.set(o[1],o[0].length),o[0]=l,o.splice(1,1)}if(1===((e=o[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;var u=e[7];192&u&&(a=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&u?a-(n=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(c.b.warn(Math.round((a-n)/9e4)+"s delta between PTS and DTS, align them"),a=n):n=a);var d=(i=e[8])+9;if(t.size<=d)return null;t.size-=d;for(var h=new Uint8Array(t.size),f=0,v=o.length;f<v;f++){var g=(e=o[f]).byteLength;if(d){if(d>g){d-=g;continue}e=e.subarray(d),g-=d,d=0}h.set(e,s),s+=g}return r&&(r-=i+3),{data:h,pts:a,dts:n,len:r}}return null}function W(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var r=e.samples,i=r.length;if(!i)return void e.dropped++;var a=r[i-1];t.pts=a.pts,t.dts=a.dts}e.samples.push(t)}t.debug.length&&c.b.log(t.pts+"/"+t.dts+":"+t.debug)}function Y(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts<t[i].pts){t.splice(i,0,e);break}}else t.push(e)}function X(t){for(var e=t.byteLength,r=[],i=1;i<e-2;)0===t[i]&&0===t[i+1]&&3===t[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return t;var a=e-r.length,n=new Uint8Array(a),s=0;for(i=0;i<a;s++,i++)s===r[0]&&(s++,r.shift()),n[i]=t[s];return n}G.minProbeByteLength=188;var q=G;function z(t,e){return(z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Q=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,z(e,r);var a=i.prototype;return a.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(o.b(t,0)||[]).length,r=t.length;e<r;e++)if(M(t,e))return c.b.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(t,e){return function(t,e){return P(t,e)&&4<=t.length-e}(t,e)},a.appendFrame=function(t,e,r){if(null!==this.initPTS)return O(t,e,r,this.initPTS,this.frameIndex)},i}(f);Q.minProbeByteLength=4;var $=Q,Z=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},t}(),J=Math.pow(2,32)-1,tt=function(){function t(){}return t.init=function(){var e;for(e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=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]),i=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]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,s,l,s,o),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e=8,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];for(var n=i.length,s=n;n--;)e+=i[n].byteLength;var o=new Uint8Array(e);for(o[0]=e>>24&255,o[1]=e>>16&255,o[2]=e>>8&255,o[3]=255&e,o.set(t,4),n=0,e=8;n<s;n++)o.set(i[n],e),e+=i[n].byteLength;return o},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(J+1)),a=Math.floor(r%(J+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(J+1)),a=Math.floor(r%(J+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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.box(t.types.mvhd,n)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(r=0;r<a.length;r++)i=a[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t.box(t.types.sdtp,n)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r,i,a,n=[],s=[];for(r=0;r<e.sps.length;r++)a=(i=e.sps[r]).byteLength,n.push(a>>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)a=(i=e.pps[r]).byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(s))),l=e.width,u=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.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,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,n=e.height,s=Math.floor(i/(J+1)),o=Math.floor(i%(J+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,n=Math.floor(r/(J+1)),s=Math.floor(r%(J+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,s,o,l,u=e.samples||[],d=u.length,h=12+16*d,f=new Uint8Array(h);for(r+=8+h,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<d;i++)n=(a=u[i]).duration,s=a.size,o=a.flags,l=a.cts,f.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,f)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=new Uint8Array(t.FTYP.byteLength+r.byteLength);return i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();tt.types=void 0,tt.HDLR_TYPES=void 0,tt.STTS=void 0,tt.STSC=void 0,tt.STCO=void 0,tt.STSZ=void 0,tt.VMHD=void 0,tt.SMHD=void 0,tt.STSD=void 0,tt.FTYP=void 0,tt.DINF=void 0;var et=tt,rt=r(4);function it(t,e,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var a=t*e*r;return i?Math.round(a):a}function at(t,e){return void 0===e&&(e=!1),it(t,1e3,1/9e4,e)}function nt(){return(nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}var st=null,ot=null,lt=!1,ut=function(){function t(t,e,r,i){if(void 0===i&&(i=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=t,this.config=e,this.typeSupported=r,this.ISGenerated=!1,null===st){var a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);st=a?parseInt(a[1]):0}if(null===ot){var n=navigator.userAgent.match(/Safari\/(\d+)/i);ot=n?parseInt(n[1]):0}lt=!!st&&st<75||!!ot&&ot<600}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){c.b.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t},e.resetNextTimestamp=function(){c.b.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},e.resetInitSegment=function(){c.b.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,r=t.reduce((function(t,r){var i=r.pts-t;return i<-4294967296?(e=!0,dt(t,r.pts)):i>0?t:r.pts}),t[0].pts);return e&&c.b.debug("PTS rollover detected"),r},e.remux=function(t,e,r,i,a,n,s,o){var l,u,d,h,f,v,g=a,p=a,m=t.pid>-1,y=e.pid>-1,b=e.samples.length,T=t.samples.length>0,E=b>1;if((!m||T)&&(!y||E)||this.ISGenerated||s){this.ISGenerated||(d=this.generateIS(t,e,a));var S=this.isVideoContiguous,L=-1;if(E&&(L=function(t){for(var e=0;e<t.length;e++)if(t[e].key)return e;return-1}(e.samples),!S&&this.config.forceKeyFrameOnDiscontinuity))if(v=!0,L>0){c.b.warn("[mp4-remuxer]: Dropped "+L+" out of "+b+" video samples due to a missing keyframe");var A=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(L),e.dropped+=L,p+=(e.samples[0].pts-A)/(e.timescale||9e4)}else-1===L&&(c.b.warn("[mp4-remuxer]: No keyframe found out of "+b+" video samples"),v=!1);if(this.ISGenerated){if(T&&E){var R=this.getVideoStartPts(e.samples),D=(dt(t.samples[0].pts,R)-R)/e.inputTimeScale;g+=Math.max(0,D),p+=Math.max(0,-D)}if(T){if(t.samplerate||(c.b.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,a)),u=this.remuxAudio(t,g,this.isAudioContiguous,n,y||E||o===rt.b.AUDIO?p:void 0),E){var _=u?u.endPTS-u.startPTS:0;e.inputTimeScale||(c.b.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,a)),l=this.remuxVideo(e,p,S,_)}}else E&&(l=this.remuxVideo(e,p,S,0));l&&(l.firstKeyFrame=L,l.independent=-1!==L)}}return this.ISGenerated&&(r.samples.length&&(f=this.remuxID3(r,a)),i.samples.length&&(h=this.remuxText(i,a))),{audio:u,video:l,initSegment:d,independent:v,text:h,id3:f}},e.generateIS=function(t,e,r){var i,a,n,o=t.samples,l=e.samples,u=this.typeSupported,d={},h=!Object(s.a)(this._initPTS),f="audio/mp4";if(h&&(i=a=1/0),t.config&&o.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),d.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):et.initSegment([t]),metadata:{channelCount:t.channelCount}},h&&(n=t.inputTimeScale,i=a=o[0].pts-Math.round(n*r))),e.sps&&e.pps&&l.length&&(e.timescale=e.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:et.initSegment([e]),metadata:{width:e.width,height:e.height}},h)){n=e.inputTimeScale;var c=this.getVideoStartPts(l),v=Math.round(n*r);a=Math.min(a,dt(l[0].dts,c)-v),i=Math.min(i,c-v)}if(Object.keys(d).length)return this.ISGenerated=!0,h&&(this._initPTS=i,this._initDTS=a),{tracks:d,initPTS:i,timescale:n}},e.remuxVideo=function(t,e,r,n){var s,o,l,u=t.inputTimeScale,d=t.samples,h=[],f=d.length,v=this._initPTS,g=this.nextAvcDts,p=8,m=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,b=0,T=!1;r&&null!==g||(g=e*u-(d[0].pts-dt(d[0].dts,d[0].pts)));for(var E=0;E<f;E++){var S=d[E];if(S.pts=dt(S.pts-v,g),S.dts=dt(S.dts-v,g),S.dts>S.pts){b=Math.max(Math.min(b,S.pts-S.dts),-18e3)}S.dts<d[E>0?E-1:E].dts&&(T=!0)}T&&d.sort((function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r||i})),o=d[0].dts,l=d[d.length-1].dts;var L=Math.round((l-o)/(f-1));if(b<0){if(b<-2*L){c.b.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+at(-L,!0)+" ms");for(var A=b,R=0;R<f;R++)d[R].dts=A=Math.max(A,d[R].pts-L),d[R].pts=Math.max(A,d[R].pts)}else{c.b.warn("PTS < DTS detected in video samples, shifting DTS by "+at(b,!0)+" ms to overcome this issue");for(var D=0;D<f;D++)d[D].dts=d[D].dts+b}o=d[0].dts}if(r){var _=o-g,k=_>L;if(k||_<-1){k?c.b.warn("AVC: "+at(_,!0)+" ms ("+_+"dts) hole between fragments detected, filling it"):c.b.warn("AVC: "+at(-_,!0)+" ms ("+_+"dts) overlapping between fragments detected"),o=g;var x=d[0].pts-_;d[0].dts=o,d[0].pts=x,c.b.log("Video: First PTS/DTS adjusted: "+at(x,!0)+"/"+at(o,!0)+", delta: "+at(_,!0)+" ms")}}lt&&(o=Math.max(0,o));for(var C=0,w=0,O=0;O<f;O++){for(var I=d[O],P=I.units,F=P.length,M=0,N=0;N<F;N++)M+=P[N].data.length;w+=M,C+=F,I.length=M,I.dts=Math.max(I.dts,o),I.pts=Math.max(I.pts,I.dts,0),m=Math.min(I.pts,m),y=Math.max(I.pts,y)}l=d[f-1].dts;var B,U=w+4*C+8;try{B=new Uint8Array(U)}catch(t){return void this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating video mdat "+U})}var G=new DataView(B.buffer);G.setUint32(0,U),B.set(et.types.mdat,4);for(var j=0;j<f;j++){for(var H=d[j],K=H.units,V=0,W=0,Y=K.length;W<Y;W++){var X=K[W],q=X.data,z=X.data.byteLength;G.setUint32(p,z),p+=4,B.set(q,p),p+=z,V+=4+z}if(j<f-1)s=d[j+1].dts-H.dts;else{var Q=this.config,$=H.dts-d[j>0?j-1:j].dts;if(Q.stretchShortVideoTrack&&null!==this.nextAudioPts){var Z=Math.floor(Q.maxBufferHole*u),J=(n?m+n*u:this.nextAudioPts)-H.pts;J>Z?((s=J-$)<0&&(s=$),c.b.log("[mp4-remuxer]: It is approximately "+J/90+" ms to the next segment; using duration "+s/90+" ms for the last video frame.")):s=$}else s=$}var tt=Math.round(H.pts-H.dts);h.push(new ht(H.key,s,V,tt))}if(h.length&&st&&st<70){var rt=h[0].flags;rt.dependsOn=2,rt.isNonSync=0}this.nextAvcDts=g=l+s,this.isVideoContiguous=!0;var it={data1:et.moof(t.sequenceNumber++,o,nt({},t,{samples:h})),data2:B,startPTS:m/u,endPTS:(y+s)/u,startDTS:o/u,endDTS:g/u,type:"video",hasAudio:!1,hasVideo:!0,nb:h.length,dropped:t.dropped};return t.samples=[],t.dropped=0,it},e.remuxAudio=function(t,e,r,n,s){var o=t.inputTimeScale,l=o/(t.samplerate?t.samplerate:o),u=t.isAAC?1024:1152,d=u*l,h=this._initPTS,f=!t.isAAC&&this.typeSupported.mpeg,v=[],g=t.samples,p=f?0:8,m=this.nextAudioPts||-1,y=e*o;if(this.isAudioContiguous=r=r||g.length&&m>0&&(n&&Math.abs(y-m)<9e3||Math.abs(dt(g[0].pts-h,y)-m)<20*d),g.forEach((function(t){t.pts=dt(t.pts-h,y)})),!r||m<0){if(!(g=g.filter((function(t){return t.pts>=0}))).length)return;m=0===s?0:n?Math.max(0,y):g[0].pts}if(t.isAAC)for(var b=void 0!==s,T=this.config.maxAudioFramesDrift,E=0,S=m;E<g.length;E++){var L=g[E],A=L.pts,R=A-S,D=Math.abs(1e3*R/o);if(R<=-T*d&&b)0===E&&(c.b.warn("Audio frame @ "+(A/o).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*R/o)+" ms."),this.nextAudioPts=m=S=A);else if(R>=T*d&&D<1e4&&b){var _=Math.round(R/d);(S=A-_*d)<0&&(_--,S+=d),0===E&&(this.nextAudioPts=m=S),c.b.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(S/o).toFixed(3)+"s due to "+Math.round(1e3*R/o)+" ms gap.");for(var k=0;k<_;k++){var x=Math.max(S,0),C=Z.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);C||(c.b.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),C=L.unit.subarray()),g.splice(E,0,{unit:C,pts:x}),S+=d,E++}}L.pts=S,S+=d}for(var w,O=null,I=null,P=0,F=g.length;F--;)P+=g[F].unit.byteLength;for(var M=0,N=g.length;M<N;M++){var B=g[M],U=B.unit,G=B.pts;if(null!==I){v[M-1].duration=Math.round((G-I)/l)}else{if(r&&t.isAAC&&(G=m),O=G,!(P>0))return;P+=p;try{w=new Uint8Array(P)}catch(t){return void this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:P,reason:"fail allocating audio mdat "+P})}f||(new DataView(w.buffer).setUint32(0,P),w.set(et.types.mdat,4))}w.set(U,p);var j=U.byteLength;p+=j,v.push(new ht(!0,u,j,0)),I=G}var H=v.length;if(H){var K=v[v.length-1];this.nextAudioPts=m=I+l*K.duration;var V=f?new Uint8Array(0):et.moof(t.sequenceNumber++,O/l,nt({},t,{samples:v}));t.samples=[];var W=O/o,Y=m/o,X={data1:V,data2:w,startPTS:W,endPTS:Y,startDTS:W,endDTS:Y,type:"audio",hasAudio:!0,hasVideo:!1,nb:H};return this.isAudioContiguous=!0,X}},e.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,n=a/(t.samplerate?t.samplerate:a),s=this.nextAudioPts,o=(null!==s?s:i.startDTS*a)+this._initDTS,l=i.endDTS*a+this._initDTS,u=1024*n,d=Math.ceil((l-o)/u),h=Z.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(c.b.warn("[mp4-remuxer]: remux empty Audio"),h){for(var f=[],v=0;v<d;v++){var g=o+v*u;f.push({unit:h,pts:g,dts:g})}return t.samples=f,this.remuxAudio(t,e,r,!1)}c.b.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e.remuxID3=function(t,e){var r=t.samples.length;if(r){for(var i=t.inputTimeScale,a=this._initPTS,n=this._initDTS,s=0;s<r;s++){var o=t.samples[s];o.pts=dt(o.pts-a,e*i)/i,o.dts=dt(o.dts-n,e*i)/i}var l=t.samples;return t.samples=[],{samples:l}}},e.remuxText=function(t,e){var r=t.samples.length;if(r){for(var i=t.inputTimeScale,a=this._initPTS,n=0;n<r;n++){var s=t.samples[n];s.pts=dt(s.pts-a,e*i)/i}t.samples.sort((function(t,e){return t.pts-e.pts}));var o=t.samples;return t.samples=[],{samples:o}}},t}();function dt(t,e){var r;if(null===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t}var ht=function(t,e,r,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=r,this.cts=i,this.flags=new ft(t)},ft=function(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1},ct=r(5),vt=function(){function t(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,r=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var i=this.initData=Object(l.f)(t);e||(e=pt(i.audio,ct.a.AUDIO)),r||(r=pt(i.video,ct.a.VIDEO));var a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?a.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:c.b.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,r,i,a){var n=this.initPTS,o=this.lastEndDTS,u={audio:void 0,video:void 0,text:i,id3:r,initSegment:void 0};Object(s.a)(o)||(o=this.lastEndDTS=a||0);var d=e.samples;if(!d||!d.length)return u;var h={initPTS:void 0,timescale:1},f=this.initData;if(f&&f.length||(this.generateInitSegment(d),f=this.initData),!f||!f.length)return c.b.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(s.a)(n)||(this.initPTS=h.initPTS=n=gt(f,d,o));var v=Object(l.c)(d,f),g=o,p=v+g;Object(l.e)(f,d,n),v>0?this.lastEndDTS=p:(c.b.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var m=!!f.audio,y=!!f.video,b="";m&&(b+="audio"),y&&(b+="video");var T={data1:d,startPTS:g,startDTS:g,endPTS:p,endDTS:p,type:b,hasAudio:m,hasVideo:y,nb:1,dropped:0};return u.audio="audio"===T.type?T:void 0,u.video="audio"!==T.type?T:void 0,u.text=i,u.id3=r,u.initSegment=h,u},t}(),gt=function(t,e,r){return Object(l.d)(t,e)-r};function pt(t,e){var r=null==t?void 0:t.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||e===ct.a.VIDEO?"avc1.42e01e":"mp4a.40.5"}var mt,yt=vt,bt=r(16);try{mt=self.performance.now.bind(self.performance)}catch(t){c.b.debug("Unable to use Performance API on this environment"),mt=self.Date.now}var Tt=[{demux:q,remux:ut},{demux:D,remux:yt},{demux:A,remux:ut},{demux:$,remux:ut}],Et=1024;Tt.forEach((function(t){var e=t.demux;Et=Math.max(Et,e.minProbeByteLength)}));var St=function(){function t(t,e,r,i,a){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new bt.a,this.observer=t,this.typeSupported=e,this.config=r,this.vendor=i,this.id=a}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,r,i){var a=this,n=r.transmuxing;n.executeStart=mt();var s=new Uint8Array(t),o=this.cache,u=this.config,d=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var f=function(t,e){var r=null;t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(r=e);return r}(s,e);if(f&&"AES-128"===f.method){var c=this.getDecrypter();if(!u.enableSoftwareAES)return this.decryptionPromise=c.webCryptoDecrypt(s,f.key.buffer,f.iv.buffer).then((function(t){var e=a.push(t,null,r);return a.decryptionPromise=null,e})),this.decryptionPromise;var v=c.softwareDecrypt(s,f.key.buffer,f.iv.buffer);if(!v)return n.executeEnd=mt(),Lt(r);s=new Uint8Array(v)}var g=i||d,p=g.contiguous,m=g.discontinuity,y=g.trackSwitch,b=g.accurateTimeOffset,T=g.timeOffset,E=g.initSegmentChange,S=h.audioCodec,L=h.videoCodec,A=h.defaultInitPts,R=h.duration,D=h.initSegmentData;if((m||y||E)&&this.resetInitSegment(D,S,L,R),(m||E)&&this.resetInitialTimestamp(A),p||this.resetContiguity(),this.needsProbing(s,m,y)){if(o.dataLength){var _=o.flush();s=Object(l.a)(_,s)}this.configureTransmuxer(s,h)}var k=this.transmux(s,f,T,b,r),x=this.currentTransmuxState;return x.contiguous=!0,x.discontinuity=!1,x.trackSwitch=!1,n.executeEnd=mt(),k},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=mt();var n=this.decrypter,s=this.cache,o=this.currentTransmuxState,l=this.decryptionPromise;if(l)return l.then((function(){return e.flush(t)}));var u=[],d=o.timeOffset;if(n){var h=n.flush();h&&u.push(this.push(h,null,t))}var f=s.dataLength;s.reset();var c=this.demuxer,v=this.remuxer;if(!c||!v)return f>=Et&&this.observer.emit(i.a.ERROR,i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=mt(),[Lt(t)];var g=c.flush(d);return At(g)?g.then((function(r){return e.flushRemux(u,r,t),u})):(this.flushRemux(u,g,t),u)},e.flushRemux=function(t,e,r){var i=e.audioTrack,a=e.avcTrack,n=e.id3Track,s=e.textTrack,o=this.currentTransmuxState,l=o.accurateTimeOffset,u=o.timeOffset;c.b.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var d=this.remuxer.remux(i,a,n,s,u,l,!0,this.id);t.push({remuxResult:d,chunkMeta:r}),r.transmuxing.executeEnd=mt()},e.resetInitialTimestamp=function(t){var e=this.demuxer,r=this.remuxer;e&&r&&(e.resetTimeStamp(t),r.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,r,i){var a=this.demuxer,n=this.remuxer;a&&n&&(a.resetInitSegment(e,r,i),n.resetInitSegment(t,e,r))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,r,i,a){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,r,i,a):this.transmuxUnencrypted(t,r,i,a)},e.transmuxUnencrypted=function(t,e,r,i){var a=this.demuxer.demux(t,e,!1,!this.config.progressive),n=a.audioTrack,s=a.avcTrack,o=a.id3Track,l=a.textTrack;return{remuxResult:this.remuxer.remux(n,s,o,l,e,r,!1,this.id),chunkMeta:i}},e.transmuxSampleAes=function(t,e,r,i,a){var n=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:n.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,i,!1,n.id),chunkMeta:a}}))},e.configureTransmuxer=function(t,e){for(var r,i=this.config,a=this.observer,n=this.typeSupported,s=this.vendor,o=e.audioCodec,l=e.defaultInitPts,u=e.duration,d=e.initSegmentData,h=e.videoCodec,f=0,v=Tt.length;f<v;f++)if(Tt[f].demux.probe(t)){r=Tt[f];break}r||(c.b.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),r={demux:D,remux:yt});var g=this.demuxer,p=this.remuxer,m=r.remux,y=r.demux;p&&p instanceof m||(this.remuxer=new m(a,i,n,s)),g&&g instanceof y||(this.demuxer=new y(a,i,n),this.probe=y.probe),this.resetInitSegment(d,o,h,u),this.resetInitialTimestamp(l)},e.needsProbing=function(t,e,r){return!this.demuxer||!this.remuxer||e||r},e.getDecrypter=function(){var t=this.decrypter;return t||(t=this.decrypter=new n.a(this.observer,this.config)),t},t}();var Lt=function(t){return{remuxResult:{},chunkMeta:t}};function At(t){return"then"in t&&t.then instanceof Function}var Rt=function(t,e,r,i,a){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=r,this.duration=i,this.defaultInitPts=a},Dt=function(t,e,r,i,a,n){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=r,this.trackSwitch=i,this.timeOffset=a,this.initSegmentChange=n}},function(t,e){t.exports=void 0},function(t,e,r){var i,a,n,s,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,a=/^([^\/?#]*)([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=o.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):e;var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=a.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var d=s.path,h=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=o.normalizePath(h)}else u.path=s.path,n.params||(u.params=s.params,n.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(s,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},function(t,e,r){"use strict";var i=Object.prototype.hasOwnProperty,a="~";function n(){}function s(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,r,i,n){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||t,n),l=a?a+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)i.call(t,e)&&r.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=a?a+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,s=new Array(n);i<n;i++)s[i]=r[i].fn;return s},u.prototype.listenerCount=function(t){var e=a?a+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,i,n,s){var o=a?a+t:t;if(!this._events[o])return!1;var l,u,d=this._events[o],h=arguments.length;if(d.fn){switch(d.once&&this.removeListener(t,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,e),!0;case 3:return d.fn.call(d.context,e,r),!0;case 4:return d.fn.call(d.context,e,r,i),!0;case 5:return d.fn.call(d.context,e,r,i,n),!0;case 6:return d.fn.call(d.context,e,r,i,n,s),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var f,c=d.length;for(u=0;u<c;u++)switch(d[u].once&&this.removeListener(t,d[u].fn,void 0,!0),h){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,e);break;case 3:d[u].fn.call(d[u].context,e,r);break;case 4:d[u].fn.call(d[u].context,e,r,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];d[u].fn.apply(d[u].context,l)}}return!0},u.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,i){var n=a?a+t:t;if(!this._events[n])return this;if(!e)return l(this,n),this;var s=this._events[n];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||l(this,n);else{for(var o=0,u=[],d=s.length;o<d;o++)(s[o].fn!==e||i&&!s[o].once||r&&s[o].context!==r)&&u.push(s[o]);u.length?this._events[n]=1===u.length?u[0]:u:l(this,n)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=a?a+t:t,this._events[e]&&l(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=a,u.EventEmitter=u,t.exports=u},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var i=function(){function t(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),a=function(){function t(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),n=r(8);var s=function(){function t(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var e=t.prototype;return e.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},e.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],u=o[1],d=o[2],h=o[3],f=new Uint32Array(256),c=0,v=0,g=0;for(g=0;g<256;g++)f[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var p=v^v<<1^v<<2^v<<3^v<<4;p=p>>>8^255&p^99,t[c]=p,e[p]=c;var m=f[c],y=f[m],b=f[y],T=257*f[p]^16843008*p;i[c]=T<<24|T>>>8,a[c]=T<<16|T>>>16,n[c]=T<<8|T>>>24,s[c]=T,T=16843009*b^65537*y^257*m^16843008*c,l[p]=T<<24|T>>>8,u[p]=T<<16|T>>>16,d[p]=T<<8|T>>>24,h[p]=T,c?(c=m^f[f[f[b^m]]],v^=f[f[v]]):c=v=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i<e.length&&r;)r=e[i]===this.key[i],i++;if(!r){this.key=e;var a=this.keySize=e.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n,s,o,l,u=this.ksRows=4*(a+6+1),d=this.keySchedule=new Uint32Array(u),h=this.invKeySchedule=new Uint32Array(u),f=this.sBox,c=this.rcon,v=this.invSubMix,g=v[0],p=v[1],m=v[2],y=v[3];for(n=0;n<u;n++)n<a?o=d[n]=e[n]:(l=o,n%a==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=c[n/a|0]<<24):a>6&&n%a==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),d[n]=o=(d[n-a]^l)>>>0);for(s=0;s<u;s++)n=u-s,l=3&s?d[n]:d[n-4],h[s]=s<4||n<=4?l:g[f[l>>>24]]^p[f[l>>>16&255]]^m[f[l>>>8&255]]^y[f[255&l]],h[s]=h[s]>>>0}},e.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},e.decrypt=function(t,e,r){for(var i,a,n,s,o,l,u,d,h,f,c,v,g,p,m=this.keySize+6,y=this.invKeySchedule,b=this.invSBox,T=this.invSubMix,E=T[0],S=T[1],L=T[2],A=T[3],R=this.uint8ArrayToUint32Array_(r),D=R[0],_=R[1],k=R[2],x=R[3],C=new Int32Array(t),w=new Int32Array(C.length),O=this.networkToHostOrderSwap;e<C.length;){for(h=O(C[e]),f=O(C[e+1]),c=O(C[e+2]),v=O(C[e+3]),o=h^y[0],l=v^y[1],u=c^y[2],d=f^y[3],g=4,p=1;p<m;p++)i=E[o>>>24]^S[l>>16&255]^L[u>>8&255]^A[255&d]^y[g],a=E[l>>>24]^S[u>>16&255]^L[d>>8&255]^A[255&o]^y[g+1],n=E[u>>>24]^S[d>>16&255]^L[o>>8&255]^A[255&l]^y[g+2],s=E[d>>>24]^S[o>>16&255]^L[l>>8&255]^A[255&u]^y[g+3],o=i,l=a,u=n,d=s,g+=4;i=b[o>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&d]^y[g],a=b[l>>>24]<<24^b[u>>16&255]<<16^b[d>>8&255]<<8^b[255&o]^y[g+1],n=b[u>>>24]<<24^b[d>>16&255]<<16^b[o>>8&255]<<8^b[255&l]^y[g+2],s=b[d>>>24]<<24^b[o>>16&255]<<16^b[l>>8&255]<<8^b[255&u]^y[g+3],w[e]=O(i^D),w[e+1]=O(s^_),w[e+2]=O(n^k),w[e+3]=O(a^x),D=h,_=f,k=c,x=v,e+=4}return w.buffer},t}(),o=r(1),l=r(6),u=function(){function t(t,e,r){var i=(void 0===r?{}:r).removePKCS7Padding,a=void 0===i||i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=t,this.config=e,this.removePKCS7Padding=a,a)try{var n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(t){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var e=t.prototype;return e.destroy=function(){this.observer=null},e.isSync=function(){return this.config.enableSoftwareAES},e.flush=function(){var t=this.currentResult;if(t){var e,r,i,a=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?(r=(e=a).byteLength,(i=r&&new DataView(e.buffer).getUint8(r-1))?Object(n.a)(e,0,r-i):e):a}this.reset()},e.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},e.decrypt=function(t,e,r,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(t),e,r);var a=this.flush();a&&i(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(t),e,r).then(i)},e.softwareDecrypt=function(t,e,r){var i=this.currentIV,a=this.currentResult,o=this.remainderData;this.logOnce("JS AES decrypt"),o&&(t=Object(l.a)(o,t),this.remainderData=null);var u=this.getValidChunk(t);if(!u.length)return null;i&&(r=i);var d=this.softwareDecrypter;d||(d=this.softwareDecrypter=new s),d.expandKey(e);var h=a;return this.currentResult=d.decrypt(u.buffer,0,r),this.currentIV=Object(n.a)(u,-16).buffer,h||null},e.webCryptoDecrypt=function(t,e,r){var n=this,s=this.subtle;return this.key===e&&this.fastAesKey||(this.key=e,this.fastAesKey=new a(s,e)),this.fastAesKey.expandKey().then((function(e){return s?new i(s,r).decrypt(t.buffer,e):Promise.reject(new Error("web crypto not initialized"))})).catch((function(i){return n.onWebCryptoError(i,t,e,r)}))},e.onWebCryptoError=function(t,e,r,i){return o.b.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",t),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(e,r,i)},e.getValidChunk=function(t){var e=t,r=t.length-t.length%16;return r!==t.length&&(e=Object(n.a)(t,0,r),this.remainderData=Object(n.a)(t,r)),e},e.logOnce=function(t){this.logEnabled&&(o.b.log("[decrypter.ts]: "+t),this.logEnabled=!1)},t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(11);function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var n=function(){function t(t,e){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=e?Object(i.buildAbsoluteURL)(t,e,{alwaysNormalize:!0}):t}var e,r,n;return t.fromURL=function(e,r){return new t(e,r)},t.fromURI=function(e){return new t(e)},e=t,(r=[{key:"uri",get:function(){return this._uri}}])&&a(e.prototype,r),n&&a(e,n),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var i=function(){function t(){this.chunks=[],this.dataLength=0}var e=t.prototype;return e.push=function(t){this.chunks.push(t),this.dataLength+=t.length},e.flush=function(){var t,e=this.chunks,r=this.dataLength;return e.length?(t=1===e.length?e[0]:function(t,e){for(var r=new Uint8Array(e),i=0,a=0;a<t.length;a++){var n=t[a];r.set(n,i),i+=n.length}return r}(e,r),this.reset(),t):new Uint8Array(0)},e.reset=function(){this.chunks.length=0,this.dataLength=0},t}()},function(t,e,r){function i(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r.oe=function(t){throw console.error(t),t};var i=r(r.s=ENTRY_MODULE);return i.default||i}function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(t,e,i){var n={};n[i]=[];var s=e.toString(),o=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return n;for(var l,u=o[1],d=new RegExp("(\\\\n|\\W)"+a(u)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=d.exec(s);)"dll-reference"!==l[3]&&n[i].push(l[3]);for(d=new RegExp("\\("+a(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=d.exec(s);)t[l[2]]||(n[i].push(l[1]),t[l[2]]=r(l[1]).m),n[l[2]]=n[l[2]]||[],n[l[2]].push(l[4]);for(var h,f=Object.keys(n),c=0;c<f.length;c++)for(var v=0;v<n[f[c]].length;v++)h=n[f[c]][v],isNaN(1*h)||(n[f[c]][v]=1*n[f[c]][v]);return n}function s(t){return Object.keys(t).reduce((function(e,r){return e||t[r].length>0}),!1)}t.exports=function(t,e){e=e||{};var a={main:r.m},o=e.all?{main:Object.keys(a.main)}:function(t,e){for(var r={main:[e]},i={main:[]},a={main:{}};s(r);)for(var o=Object.keys(r),l=0;l<o.length;l++){var u=o[l],d=r[u].pop();if(a[u]=a[u]||{},!a[u][d]&&t[u][d]){a[u][d]=!0,i[u]=i[u]||[],i[u].push(d);for(var h=n(t,t[u][d],u),f=Object.keys(h),c=0;c<f.length;c++)r[f[c]]=r[f[c]]||[],r[f[c]]=r[f[c]].concat(h[f[c]])}}return i}(a,t),l="";Object.keys(o).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;o[t][e];)e++;o[t].push(e),a[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+t+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o[t].map((function(e){return JSON.stringify(e)+": "+a[t][e].toString()})).join(",")+"});\n"})),l=l+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.main.map((function(t){return JSON.stringify(t)+": "+a.main[t].toString()})).join(",")+"}))(self);";var u=new window.Blob([l],{type:"text/javascript"});if(e.bare)return u;var d=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),h=new window.Worker(d);return h.objectURL=d,h}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var i=r(9),a=r(0),n=r(1),s=r(13);function o(t){var e=new s.EventEmitter,r=function(e,r){t.postMessage({event:e,data:r})};e.on(a.a.FRAG_DECRYPTED,r),e.on(a.a.ERROR,r),t.addEventListener("message",(function(a){var s=a.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);t.transmuxer=new i.c(e,s.typeSupported,o,s.vendor,s.id),Object(n.a)(o.debug),r("init",null);break;case"configure":t.transmuxer.configure(s.config);break;case"demux":var u=t.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(i.d)(u)?u.then((function(e){l(t,e)})):l(t,u);break;case"flush":var h=s.chunkMeta,f=t.transmuxer.flush(h);Object(i.d)(f)?f.then((function(e){d(t,e,h)})):d(t,f,h)}}))}function l(t,e){if((r=e.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,i=[],a=e.remuxResult,n=a.audio,s=a.video;n&&u(i,n),s&&u(i,s),t.postMessage({event:"transmuxComplete",data:e},i)}}function u(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function d(t,e,r){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:r})}},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return we}));var i=r(11),a=r(3),n=r(0),s=r(2),o=r(1),l=r(6),u=r(5);function d(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var h=function(){function t(t){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=t}var e,r,i;return t.prototype.reloaded=function(t){if(!t)return this.advanced=!0,void(this.updated=!0);var e=this.lastPartSn-t.lastPartSn,r=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!r||!!e,this.advanced=this.endSN>t.endSN||e>0||0===e&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(a.a)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&d(e.prototype,r),i&&d(e,i),t}(),f=r(15),c=/^(\d+)x(\d+)$/,v=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,g=function(){function t(e){for(var r in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(r)&&(this[r]=e[r])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;i<e.length/2;i++)r[i]=parseInt(e.slice(2*i,2*i+2),16);return r}return null},e.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var r=this[t];return r?parseFloat(r):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=c.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(v.lastIndex=0;null!==(e=v.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),p={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function m(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var y=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,b=/#EXT-X-MEDIA:(.*)/g,T=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),E=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),S=/\.(mp4|m4s|m4v|m4a)$/i;var L=function(){function t(){}return t.findGroup=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(i.id===e)return i}},t.convertAVC1ToAVCOTI=function(t){var e=t.split(".");if(e.length>2){var r=e.shift()+".";return r+=parseInt(e.shift()).toString(16),r+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return i.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i,a=[],n={},s=!1;for(y.lastIndex=0;null!=(i=y.exec(e));)if(i[1]){var o=new g(i[1]),l={attrs:o,bitrate:o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),name:o.NAME,url:t.resolve(i[2],r)},u=o.decimalResolution("RESOLUTION");u&&(l.width=u.width,l.height=u.height),A((o.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=t.convertAVC1ToAVCOTI(l.videoCodec)),a.push(l)}else if(i[3]){var d=new g(i[3]);d["DATA-ID"]&&(s=!0,n[d["DATA-ID"]]=d)}return{levels:a,sessionData:s?n:null}},t.parseMasterPlaylistMedia=function(e,r,i,a){var n;void 0===a&&(a=[]);var s=[],o=0;for(b.lastIndex=0;null!==(n=b.exec(e));){var l=new g(n[1]);if(l.TYPE===i){var u={attrs:l,bitrate:0,id:o++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE||"",type:i,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:l.LANGUAGE,url:l.URI?t.resolve(l.URI,r):""};if(a.length){var d=t.findGroup(a,u.groupId)||a[0];R(u,d,"audioCodec"),R(u,d,"textCodec")}s.push(u)}}return s},t.parseLevelPlaylist=function(t,e,r,n,s){var l,d,c,v=new h(e),p=v.fragments,m=null,y=0,b=0,L=0,A=0,R=null,_=new u.b(n,e),k=-1,x=!1;for(T.lastIndex=0,v.m3u8=t;null!==(l=T.exec(t));){x&&(x=!1,(_=new u.b(n,e)).start=L,_.sn=y,_.cc=A,_.level=r,m&&(_.initSegment=m,_.rawProgramDateTime=m.rawProgramDateTime));var C=l[1];if(C){_.duration=parseFloat(C);var w=(" "+l[2]).slice(1);_.title=w||null,_.tagList.push(w?["INF",C,w]:["INF",C])}else if(l[3])Object(a.a)(_.duration)&&(_.start=L,c&&(_.levelkey=c),_.sn=y,_.level=r,_.cc=A,_.urlId=s,p.push(_),_.relurl=(" "+l[3]).slice(1),D(_,R),R=_,L+=_.duration,y++,b=0,x=!0);else if(l[4]){var O=(" "+l[4]).slice(1);R?_.setByteRange(O,R):_.setByteRange(O)}else if(l[5])_.rawProgramDateTime=(" "+l[5]).slice(1),_.tagList.push(["PROGRAM-DATE-TIME",_.rawProgramDateTime]),-1===k&&(k=p.length);else{if(!(l=l[0].match(E))){o.b.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d<l.length&&void 0===l[d];d++);var I=(" "+l[d]).slice(1),P=(" "+l[d+1]).slice(1),F=l[d+2]?(" "+l[d+2]).slice(1):"";switch(I){case"PLAYLIST-TYPE":v.type=P.toUpperCase();break;case"MEDIA-SEQUENCE":y=v.startSN=parseInt(P);break;case"SKIP":var M=new g(P),N=M.decimalInteger("SKIPPED-SEGMENTS");if(Object(a.a)(N)){v.skippedSegments=N;for(var B=N;B--;)p.unshift(null);y+=N}var U=M.enumeratedString("RECENTLY-REMOVED-DATERANGES");U&&(v.recentlyRemovedDateranges=U.split("\t"));break;case"TARGETDURATION":v.targetduration=parseFloat(P);break;case"VERSION":v.version=parseInt(P);break;case"EXTM3U":break;case"ENDLIST":v.live=!1;break;case"#":(P||F)&&_.tagList.push(F?[P,F]:[P]);break;case"DIS":A++;case"GAP":_.tagList.push([I]);break;case"BITRATE":_.tagList.push([I,P]);break;case"DISCONTINUITY-SEQ":A=parseInt(P);break;case"KEY":var G,j=new g(P),H=j.enumeratedString("METHOD"),K=j.URI,V=j.hexadecimalInteger("IV"),W=j.enumeratedString("KEYFORMATVERSIONS"),Y=j.enumeratedString("KEYID"),X=null!=(G=j.enumeratedString("KEYFORMAT"))?G:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(X)>-1){o.b.warn("Keyformat "+X+" is not supported from the manifest");continue}if("identity"!==X)continue;H&&(c=f.a.fromURL(e,K),K&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(H)>=0&&(c.method=H,c.keyFormat=X,Y&&(c.keyID=Y),W&&(c.keyFormatVersions=W),c.iv=V));break;case"START":var q=new g(P).decimalFloatingPoint("TIME-OFFSET");Object(a.a)(q)&&(v.startTimeOffset=q);break;case"MAP":var z=new g(P);_.relurl=z.URI,z.BYTERANGE&&_.setByteRange(z.BYTERANGE),_.level=r,_.sn="initSegment",c&&(_.levelkey=c),_.initSegment=null,m=_,x=!0;break;case"SERVER-CONTROL":var Q=new g(P);v.canBlockReload=Q.bool("CAN-BLOCK-RELOAD"),v.canSkipUntil=Q.optionalFloat("CAN-SKIP-UNTIL",0),v.canSkipDateRanges=v.canSkipUntil>0&&Q.bool("CAN-SKIP-DATERANGES"),v.partHoldBack=Q.optionalFloat("PART-HOLD-BACK",0),v.holdBack=Q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var $=new g(P);v.partTarget=$.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=v.partList;Z||(Z=v.partList=[]);var J=b>0?Z[Z.length-1]:void 0,tt=b++,et=new u.c(new g(P),_,e,tt,J);Z.push(et),_.duration+=et.duration;break;case"PRELOAD-HINT":var rt=new g(P);v.preloadHint=rt;break;case"RENDITION-REPORT":var it=new g(P);v.renditionReports=v.renditionReports||[],v.renditionReports.push(it);break;default:o.b.warn("line parsed but not handled: "+l)}}}R&&!R.relurl?(p.pop(),L-=R.duration,v.partList&&(v.fragmentHint=R)):v.partList&&(D(_,R),_.cc=A,v.fragmentHint=_);var at=p.length,nt=p[0],st=p[at-1];if((L+=v.skippedSegments*v.targetduration)>0&&at&&st){v.averagetargetduration=L/at;var ot=st.sn;v.endSN="initSegment"!==ot?ot:0,nt&&(v.startCC=nt.cc,nt.initSegment||v.fragments.every((function(t){return t.relurl&&(e=t.relurl,S.test(null!=(r=null===(a=i.parseURL(e))||void 0===a?void 0:a.path)?r:""));var e,r,a}))&&(o.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(_=new u.b(n,e)).relurl=st.relurl,_.level=r,_.sn="initSegment",nt.initSegment=_,v.needSidxRanges=!0))}else v.endSN=0,v.startCC=0;return v.fragmentHint&&(L+=v.fragmentHint.duration),v.totalduration=L,v.endCC=A,k>0&&function(t,e){for(var r=t[e],i=e;i--;){var a=t[i];if(!a)return;a.programDateTime=r.programDateTime-1e3*a.duration,r=a}}(p,k),v},t}();function A(t,e){["video","audio","text"].forEach((function(r){var i=t.filter((function(t){return function(t,e){var r=p[e];return!!r&&!0===r[t.slice(0,4)]}(t,r)}));if(i.length){var a=i.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[r+"Codec"]=a.length>0?a[0]:i[0],t=t.filter((function(t){return-1===i.indexOf(t)}))}})),e.unknownCodecs=t}function R(t,e,r){var i=e[r];i&&(t[r]=i)}function D(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(a.a)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}var _=r(4);function k(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r}var x=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.a.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.a.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.a.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,i=e.loader,a=new(r||i)(e);return t.loader=a,this.loaders[t.type]=a,a},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var r=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:_.a.MANIFEST,url:r,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var r=e.id,i=e.level,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:null,level:i,responseType:"text",type:_.a.LEVEL,url:a,deliveryDirectives:n})},e.onAudioTrackLoading=function(t,e){var r=e.id,i=e.groupId,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:_.a.AUDIO_TRACK,url:a,deliveryDirectives:n})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,i=e.groupId,a=e.url,n=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:_.a.SUBTITLE_TRACK,url:a,deliveryDirectives:n})},e.load=function(t){var e,r,i,a,n,s,l=this.hls.config,u=this.getInternalLoader(t);if(u){var d=u.context;if(d&&d.url===t.url)return void o.b.trace("[playlist-loader]: playlist request ongoing");o.b.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case _.a.MANIFEST:r=l.manifestLoadingMaxRetry,i=l.manifestLoadingTimeOut,a=l.manifestLoadingRetryDelay,n=l.manifestLoadingMaxRetryTimeout;break;case _.a.LEVEL:case _.a.AUDIO_TRACK:case _.a.SUBTITLE_TRACK:r=0,i=l.levelLoadingTimeOut;break;default:r=l.levelLoadingMaxRetry,i=l.levelLoadingTimeOut,a=l.levelLoadingRetryDelay,n=l.levelLoadingMaxRetryTimeout}if((u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part)&&(t.type===_.a.LEVEL&&null!==t.level?s=this.hls.levels[t.level].details:t.type===_.a.AUDIO_TRACK&&null!==t.id?s=this.hls.audioTracks[t.id].details:t.type===_.a.SUBTITLE_TRACK&&null!==t.id&&(s=this.hls.subtitleTracks[t.id].details),s)){var h=s.partTarget,f=s.targetduration;h&&f&&(i=Math.min(1e3*Math.max(3*h,.8*f),i))}var c={timeout:i,maxRetry:r,retryDelay:a,maxRetryDelay:n,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,c,v)},e.loadsuccess=function(t,e,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this.handleSidxRequest(t,r),void this.handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var a=t.data;0===a.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,r,i):this.handleMasterPlaylist(t,e,r,i)):this.handleManifestParsingError(t,r,"no EXTM3U delimiter",i)},e.loaderror=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!1,t)},e.loadtimeout=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!0)},e.handleMasterPlaylist=function(t,e,r,i){var a=this.hls,s=t.data,l=k(t,r),u=L.parseMasterPlaylist(s,l),d=u.levels,h=u.sessionData;if(d.length){var f=d.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),c=d.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=L.parseMasterPlaylistMedia(s,l,"AUDIO",f),p=L.parseMasterPlaylistMedia(s,l,"SUBTITLES",c),m=L.parseMasterPlaylistMedia(s,l,"CLOSED-CAPTIONS");if(v.length)v.some((function(t){return!t.url}))||!d[0].audioCodec||d[0].attrs.AUDIO||(o.b.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g({}),bitrate:0,url:""}));a.trigger(n.a.MANIFEST_LOADED,{levels:d,audioTracks:v,subtitles:p,captions:m,url:l,stats:e,networkDetails:i,sessionData:h})}else this.handleManifestParsingError(t,r,"no level found in manifest",i)},e.handleTrackOrLevelPlaylist=function(t,e,r,i){var o=this.hls,l=r.id,u=r.level,d=r.type,h=k(t,r),f=Object(a.a)(l)?l:0,c=Object(a.a)(u)?u:f,v=function(t){switch(t.type){case _.a.AUDIO_TRACK:return _.b.AUDIO;case _.a.SUBTITLE_TRACK:return _.b.SUBTITLE;default:return _.b.MAIN}}(r),p=L.parseLevelPlaylist(t.data,h,c,v,f);if(p.fragments.length){if(d===_.a.MANIFEST){var m={attrs:new g({}),bitrate:0,details:p,name:"",url:h};o.trigger(n.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:h,stats:e,networkDetails:i,sessionData:null})}if(e.parsing.end=performance.now(),p.needSidxRanges){var y,b=null===(y=p.fragments[0].initSegment)||void 0===y?void 0:y.url;this.load({url:b,isSidxRequest:!0,type:d,level:u,levelDetails:p,id:l,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=p,this.handlePlaylistLoaded(t,e,r,i)}else o.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},e.handleSidxRequest=function(t,e){var r=Object(l.g)(new Uint8Array(t.data));if(r){var i=r.references,a=e.levelDetails;i.forEach((function(t,e){var i=t.info,n=a.fragments[e];0===n.byteRange.length&&n.setByteRange(String(1+i.end-i.start)+"@"+String(i.start)),n.initSegment&&n.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,i){this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:e.type===_.a.MANIFEST,url:t.url,reason:r,response:t,context:e,networkDetails:i})},e.handleNetworkError=function(t,e,r,i){void 0===r&&(r=!1),o.b.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.a.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case _.a.MANIFEST:a=r?s.a.MANIFEST_LOAD_TIMEOUT:s.a.MANIFEST_LOAD_ERROR,l=!0;break;case _.a.LEVEL:a=r?s.a.LEVEL_LOAD_TIMEOUT:s.a.LEVEL_LOAD_ERROR,l=!1;break;case _.a.AUDIO_TRACK:a=r?s.a.AUDIO_TRACK_LOAD_TIMEOUT:s.a.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case _.a.SUBTITLE_TRACK:a=r?s.a.SUBTITLE_TRACK_LOAD_TIMEOUT:s.a.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var d={type:s.b.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};i&&(d.response=i),this.hls.trigger(n.a.ERROR,d)},e.handlePlaylistLoaded=function(t,e,r,i){var a=r.type,s=r.level,o=r.id,l=r.groupId,u=r.loader,d=r.levelDetails,h=r.deliveryDirectives;if(null!=d&&d.targetduration){if(u)switch(d.live&&(u.getCacheAge&&(d.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(d.ageHeader)||(d.ageHeader=0)),a){case _.a.MANIFEST:case _.a.LEVEL:this.hls.trigger(n.a.LEVEL_LOADED,{details:d,level:s||0,id:o||0,stats:e,networkDetails:i,deliveryDirectives:h});break;case _.a.AUDIO_TRACK:this.hls.trigger(n.a.AUDIO_TRACK_LOADED,{details:d,id:o||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:h});break;case _.a.SUBTITLE_TRACK:this.hls.trigger(n.a.SUBTITLE_TRACK_LOADED,{details:d,id:o||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:h})}}else this.handleManifestParsingError(t,r,"invalid target duration",i)},t}(),C=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(n.a.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(n.a.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var r=e.frag,i=r.type,a=this.loaders[i];if(r.decryptdata){var s=r.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(a&&(o.b.warn("abort previous key loader for type:"+i),a.abort()),!s)return void o.b.warn("key uri is falsy");var u=l.loader,d=r.loader=this.loaders[i]=new u(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:r,responseType:"arraybuffer"},f={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};d.load(h,f,c)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(n.a.KEY_LOADED,{frag:r}))}else o.b.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(n.a.KEY_LOADED,{frag:i})):o.b.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(n.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}();function w(t,e){var r;try{r=new Event("addtrack")}catch(t){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function O(t,e,r){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var a=function(t,e,r){var i=[],a=function(t,e){if(e<t[0].startTime)return 0;var r=t.length-1;if(e>t[r].endTime)return-1;var i=0,a=r;for(;i<=a;){var n=Math.floor((a+i)/2);if(e<t[n].startTime)a=n-1;else{if(!(e>t[n].startTime&&i<r))return n;i=n+1}}return t[i].startTime-e<e-t[a].startTime?i:a}(t,e);if(a>-1)for(var n=a,s=t.length;n<s;n++){var o=t[n];if(o.startTime>=e&&o.endTime<=r)i.push(o);else if(o.startTime>r)return i}return i}(t.cues,e,r),n=0;n<a.length;n++)t.removeCue(a[n]);"disabled"===i&&(t.mode=i)}var I=r(7),P=function(){function t(t){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e.destroy=function(){this._unregisterListeners()},e._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this)},e.onMediaAttached=function(t,e){this.media=e.media},e.onMediaDetaching=function(){this.id3Track&&(!function(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);"disabled"===e&&(t.mode=e)}(this.id3Track),this.id3Track=null,this.media=null)},e.getID3Track=function(t){if(this.media){for(var e=0;e<t.length;e++){var r=t[e];if("metadata"===r.kind&&"id3"===r.label)return w(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},e.onFragParsingMetadata=function(t,e){if(this.media){var r=e.frag,i=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var a=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,n=0;n<i.length;n++){var s=I.c(i[n].data);if(s){var o=i[n].pts,l=n<i.length-1?i[n+1].pts:r.end;l-o<=0&&(l=o+.25);for(var u=0;u<s.length;u++){var d=s[u];if(!I.e(d)){var h=new a(o,l,"");h.value=d,this.id3Track.addCue(h)}}}}}},e.onBufferFlushing=function(t,e){var r=e.startOffset,i=e.endOffset,a=e.type;if(!a||"audio"===a){var n=this.id3Track;n&&O(n,r,i)}},t}();function F(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var M,N=function(){function t(t){var e=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return e.timeupdate()},this.hls=t,this.config=t.config,this.registerListeners()}var e,r,i,a=t.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(n.a.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(n.a.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(n.a.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(n.a.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(n.a.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(n.a.ERROR,this.onError)},a.onMediaAttached=function(t,e){this.media=e.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(t,e){var r=e.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(t,e){e.details===s.a.BUFFER_STALLED_ERROR&&(this.stallCount++,o.b.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},a.timeupdate=function(){var t=this.media,e=this.levelDetails;if(t&&e){this.currentTime=t.currentTime;var r=this.computeLatency();if(null!==r){this._latency=r;var i=this.config,a=i.lowLatencyMode,n=i.maxLiveSyncPlaybackRate;if(a&&1!==n){var s=this.targetLatency;if(null!==s){var o=r-s,l=o<Math.min(this.maxLatency,s+e.targetduration);if(e.live&&l&&o>.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,n)),d=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;t.playbackRate=Math.min(u,Math.max(1,d))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},a.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},a.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(r=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,r=t.partHoldBack,i=t.targetduration,a=this.config,n=a.liveSyncDuration,s=a.liveSyncDurationCount,o=a.lowLatencyMode,l=this.hls.userConfig,u=o&&r||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==n?n:s*i);var d=i;return u+Math.min(1*this.stallCount,d)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,r=this.levelDetails;if(null===t||null===e||null===r)return null;var i=r.edge,a=t-e-this.edgeStalled,n=i-r.totalduration,s=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(n,a),s)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var r=t.buffered.length;return r?t.buffered.end(r-1):e.edge-this.currentTime}}])&&F(e.prototype,r),i&&F(e,i),t}();function B(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}!function(t){t.No="",t.Yes="YES",t.v2="v2"}(M||(M={}));var U=function(){function t(t,e,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=e,this.skip=r}return t.prototype.addDirectives=function(t){var e=new self.URL(t);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.toString()},t}(),G=function(){function t(t){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[t.url],this.attrs=t.attrs,this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter((function(t){return t})).join(",").replace(/\.[^.,]+/g,"")}var e,r,i;return e=t,(r=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(t){var e=t%this.url.length;this._urlId!==e&&(this.details=void 0,this._urlId=e)}}])&&B(e.prototype,r),i&&B(e,i),t}();function j(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function H(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function K(t,e){var r=e.startPTS;if(Object(a.a)(r)){var i,n=0;e.sn>t.sn?(n=r-t.start,i=t):(n=t.start-r,i=e),i.duration!==n&&(i.duration=n)}else if(e.sn>t.sn){t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration}else e.start=Math.max(t.start-e.duration,0)}function V(t,e,r,i,n,s){i-r<=0&&(o.b.warn("Fragment should have a positive duration",e),i=r+e.duration,s=n+e.duration);var l=r,u=i,d=e.startPTS,h=e.endPTS;if(Object(a.a)(d)){var f=Math.abs(d-r);Object(a.a)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,l=Math.max(r,d),r=Math.min(r,d),n=Math.min(n,e.startDTS),u=Math.min(i,h),i=Math.max(i,h),s=Math.max(s,e.endDTS)}e.duration=i-r;var c=r-e.start;e.appendedPTS=i,e.start=e.startPTS=r,e.maxStartPTS=l,e.startDTS=n,e.endPTS=i,e.minEndPTS=u,e.endDTS=s;var v,g=e.sn;if(!t||g<t.startSN||g>t.endSN)return 0;var p=g-t.startSN,m=t.fragments;for(m[p]=e,v=p;v>0;v--)K(m[v],m[v-1]);for(v=p;v<m.length-1;v++)K(m[v],m[v+1]);return t.fragmentHint&&K(m[m.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,c}function W(t,e){for(var r=null,i=t.fragments,n=i.length-1;n>=0;n--){var s=i[n].initSegment;if(s){r=s;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;(function(t,e,r){for(var i=e.skippedSegments,a=Math.max(t.startSN,e.startSN)-e.startSN,n=(t.fragmentHint?1:0)+(i?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,s=e.startSN-t.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,u=a;u<=n;u++){var d=l[s+u],h=o[u];i&&!h&&u<i&&(h=e.fragments[u]=d),d&&h&&r(d,h)}}(t,e,(function(t,i){t.relurl&&(u=t.cc-i.cc),Object(a.a)(t.startPTS)&&Object(a.a)(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.appendedPTS=t.appendedPTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(l=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,i.urlId=t.urlId,t.initSegment&&(i.initSegment=t.initSegment,r=t.initSegment)})),r)&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=r)||void 0===e?void 0:e.relurl)||(t.initSegment=r)}));if(e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){o.b.warn("[level-helper] Previous playlist missing segments ski
1334pped in delta playlist");for(var d=e.skippedSegments;d--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var h=e.fragments;if(u){o.b.warn("discontinuity sliding from playlist, take drift into account");for(var f=0;f<h.length;f++)h[f].cc+=u}e.skippedSegments&&(e.startCC=e.fragments[0].cc),function(t,e,r){if(t&&e)for(var i=0,a=0,n=t.length;a<=n;a++){var s=t[a],o=e[a+i];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?r(s,o):i--}}(t.partList,e.partList,(function(t,e){e.elementaryStreams=t.elementaryStreams,e.stats=t.stats})),l?V(e,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):Y(t,e),h.length&&(e.totalduration=e.edge-h[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;var c=e.advancedDateTime;if(e.advanced&&c){var v=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=v),e.driftEndTime=c,e.driftEnd=v}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function Y(t,e){var r=e.startSN+e.skippedSegments-t.startSN,i=t.fragments;r<0||r>=i.length||function(t,e){if(e){for(var r=t.fragments,i=t.skippedSegments;i<r.length;i++)r[i].start+=e;t.fragmentHint&&(t.fragmentHint.start+=e)}}(e,i[r].start)}var X=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.b.log.bind(o.b,e+":"),this.warn=o.b.warn.bind(o.b,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===s.b.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var r=null==e?void 0:e.renditionReports;if(r)for(var i=0;i<r.length;i++){var n=r[i],s=""+n.URI;if(s===t.substr(-s.length)){var o=parseInt(n["LAST-MSN"]),l=parseInt(n["LAST-PART"]);if(e&&this.hls.config.lowLatencyMode){var u=Math.min(e.age-e.partTarget,e.targetduration);void 0!==l&&u>e.partTarget&&(l+=1)}if(Object(a.a)(o))return new U(o,Object(a.a)(l)?l:void 0,M.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,r){var i=this,a=e.details,n=e.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(a.advancedDateTime=Date.now()-s,a.live||null!=r&&r.live){if(a.reloaded(r),r&&this.log("live playlist "+t+" "+(a.advanced?"REFRESHED "+a.lastPartSn+"-"+a.lastPartIndex:"MISSED")),r&&a.fragments.length>0&&W(r,a),!this.canLoad||!a.live)return;var o,l=void 0,u=void 0;if(a.canBlockReload&&a.endSN&&a.advanced){var d=this.hls.config.lowLatencyMode,h=a.lastPartSn,f=a.endSN,c=a.lastPartIndex,v=h===f;-1!==c?(l=v?f+1:h,u=v?d?0:c:c+1):l=f+1;var g=a.age,p=g+a.ageHeader,m=Math.min(p-a.partTarget,1.5*a.targetduration);if(m>0){if(r&&m>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+m+" with playlist age: "+a.age),m=0;else{var y=Math.floor(m/a.targetduration);if(l+=y,void 0!==u)u+=Math.round(m%a.targetduration/a.partTarget);this.log("CDN Tune-in age: "+a.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+m+" skip sn "+y+" to part "+u)}a.tuneInGoal=m}if(o=this.getDeliveryDirectives(a,e.deliveryDirectives,l,u),d||!v)return void this.loadPlaylist(o)}else o=this.getDeliveryDirectives(a,e.deliveryDirectives,l,u);var b=function(t,e){var r,i=1e3*t.levelTargetDuration,a=i/2,n=t.age,s=n>0&&n<3*i,o=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(s){var u=333*t.misses;r=Math.max(Math.min(a,2*o),u),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=a;else s?(l=Math.min(l||i/2,n),t.availabilityDelay=l,r=l+i-n):r=i-o;return Math.round(r)}(a,n);void 0!==l&&a.canBlockReload&&(b-=a.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(b)+" ms"),this.timer=self.setTimeout((function(){return i.loadPlaylist(o)}),b)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,r,i){var a=function(t,e){var r=t.canSkipUntil,i=t.canSkipDateRanges,a=t.endSN;return r&&(void 0!==e?e-a:0)<r?i?M.v2:M.Yes:M.No}(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,i=e.part,a=M.No),new U(r,i,a)},e.retryLoadingOrFail=function(t){var e,r=this,i=this.hls.config,a=this.retryCount<i.levelLoadingMaxRetry;if(a)if(this.retryCount++,t.details.indexOf("LoadTimeOut")>
vendor: 37,710 bytes, line 1334
1334-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return a},t}();function q(){return(q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function z(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Q(t,e){return(Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var $,Z=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),J=function(t){var e,r;function i(e){var r;return(r=t.call(this,e,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.onParsedComplete=void 0,r._registerListeners(),r}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,Q(e,r);var a,o,l,u=i.prototype;return u._registerListeners=function(){var t=this.hls;t.on(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this),t.on(n.a.ERROR,this.onError,this)},u._unregisterListeners=function(){var t=this.hls;t.off(n.a.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this),t.off(n.a.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},u.startLoad=function(){this._levels.forEach((function(t){t.loadError=0})),t.prototype.startLoad.call(this)},u.onManifestLoaded=function(t,e){var r,i,a=[],o=[],l=[],u={},d=!1,h=!1,f=!1;if(e.levels.forEach((function(t){var e=t.attrs;d=d||!(!t.width||!t.height),h=h||!!t.videoCodec,f=f||!!t.audioCodec,Z&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0);var r=t.bitrate+"-"+t.attrs.RESOLUTION+"-"+t.attrs.CODECS;(i=u[r])?i.url.push(t.url):(i=new G(t),u[r]=i,a.push(i)),e&&(e.AUDIO&&j(i,"audio",e.AUDIO),e.SUBTITLES&&j(i,"text",e.SUBTITLES))})),(d||h)&&f&&(a=a.filter((function(t){var e=t.videoCodec,r=t.width,i=t.height;return!!e||!(!r||!i)}))),a=a.filter((function(t){var e=t.audioCodec,r=t.videoCodec;return(!e||m(e,"audio"))&&(!r||m(r,"video"))})),e.audioTracks&&H(o=e.audioTracks.filter((function(t){return!t.audioCodec||m(t.audioCodec,"audio")}))),e.subtitles&&H(l=e.subtitles),a.length>0){r=a[0].bitrate,a.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=a;for(var c=0;c<a.length;c++)if(a[c].bitrate===r){this._firstLevel=c,this.log("manifest loaded, "+a.length+" level(s) found, first bitrate: "+r);break}var v=f&&!h,g={levels:a,audioTracks:o,subtitleTracks:l,firstLevel:this._firstLevel,stats:e.stats,audio:f,video:h,altAudio:!v&&o.some((function(t){return!!t.url}))};this.hls.trigger(n.a.MANIFEST_PARSED,g),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(e,r){if(t.prototype.onError.call(this,e,r),!r.fatal){var i=r.context,a=this._levels[this.currentLevelIndex];if(i&&(i.type===_.a.AUDIO_TRACK&&a.audioGroupIds&&i.groupId===a.audioGroupIds[a.urlId]||i.type===_.a.SUBTITLE_TRACK&&a.textGroupIds&&i.groupId===a.textGroupIds[a.urlId]))this.redundantFailover(this.currentLevelIndex);else{var n,o=!1,l=!0;switch(r.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:if(r.frag){var u=this._levels[r.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(n=r.frag.level)):n=r.frag.level}break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:i&&(i.deliveryDirectives&&(l=!1),n=i.level),o=!0;break;case s.a.REMUX_ALLOC_ERROR:n=r.level,o=!0}void 0!==n&&this.recoverLevel(r,n,o,l)}}},u.recoverLevel=function(t,e,r,i){var a=t.details,n=this._levels[e];if(n.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(i){var s=n.url.length;if(s>1&&n.loadError<s)t.levelRetry=!0,this.redundantFailover(e);else if(-1===this.manualLevelIndex){var o=0===e?this._levels.length-1:e-1;this.currentLevelIndex!==o&&0===this._levels[o].loadError&&(this.warn(a+": switch to "+o),t.levelRetry=!0,this.hls.nextAutoLevel=o)}}},u.redundantFailover=function(t){var e=this._levels[t],r=e.url.length;if(r>1){var i=(e.urlId+1)%r;this.warn("Switching to redundant URL-id "+i),this._levels.forEach((function(t){t.urlId=i})),this.level=t}},u.onFragLoaded=function(t,e){var r=e.frag;if(void 0!==r&&r.type===_.b.MAIN){var i=this._levels[r.level];void 0!==i&&(i.fragmentError=0,i.loadError=0)}},u.onLevelLoaded=function(t,e){var r,i,a=e.level,n=e.details,s=this._levels[a];if(!s)return this.warn("Invalid level index "+a),void(null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(n.deltaUpdateFailed=!0));a===this.currentLevelIndex?(0===s.fragmentError&&(s.loadError=0,this.retryCount=0),this.playlistLoaded(a,e,s.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(n.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(t,e){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,a=this.hls.audioTracks[e.id].groupId,n=0;n<r.audioGroupIds.length;n++)if(r.audioGroupIds[n]===a){i=n;break}i!==r.urlId&&(r.urlId=i,this.startLoad())}},u.loadPlaylist=function(t){var e=this.currentLevelIndex,r=this._levels[e];if(this.canLoad&&r&&r.url.length>0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+a),this.clearTimer(),this.hls.trigger(n.a.LEVEL_LOADING,{url:a,level:e,id:i,deliveryDirectives:t||null})}},u.removeLevel=function(t,e){var r=function(t,r){return r!==e},i=this._levels.filter((function(i,a){return a!==t||i.url.length>1&&void 0!==e&&(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0)})).map((function(t,e){var r=t.details;return null!=r&&r.fragments&&r.fragments.forEach((function(t){t.level=e})),t}));this._levels=i,this.hls.trigger(n.a.LEVELS_UPDATED,{levels:i})},a=i,(o=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==t||null===(e=r[t])||void 0===e||!e.details)){if(t<0||t>=r.length){var i=t<0;if(this.hls.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.LEVEL_SWITCH_ERROR,level:t,fatal:i,reason:"invalid level idx"}),i)return;t=Math.min(t,r.length-1)}this.clearTimer();var a=this.currentLevelIndex,o=r[a],l=r[t];this.log("switching to level "+t+" from "+a),this.currentLevelIndex=t;var u=q({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(n.a.LEVEL_SWITCHING,u);var d=l.details;if(!d||d.live){var h=this.switchParams(l.uri,null==o?void 0:o.details);this.loadPlaylist(h)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&z(a.prototype,o),l&&z(a,l),i}(X);!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}($||($={}));var tt=function(){function t(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.a.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.a.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===_.b.MAIN){var r=this.activeFragment,i=this.activeParts;if(!r)return null;if(i)for(var a=i.length;a--;){var n=i[a],s=n?n.end:r.appendedPTS;if(n.start<=t&&void 0!==s&&t<=s)return a>9&&(this.activeParts=i.slice(a-9)),n}else if(r.start<=t&&void 0!==r.appendedPTS&&t<=r.appendedPTS)return r}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var r=this.fragments,i=Object.keys(r),a=i.length;a--;){var n=r[i[a]];if((null==n?void 0:n.body.type)===e&&n.buffered){var s=n.body;if(s.start<=t&&t<=s.end)return s}}return null},e.detectEvictedFragments=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(a){var n=i.fragments[a];if(n)if(n.buffered){var s=n.range[t];s&&s.time.some((function(t){var r=!i.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&i.removeFragment(n.body),r}))}else n.body.type===r&&i.removeFragment(n.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,i=t.frag,a=t.part;if(r&&"initSegment"!==i.sn){var n=rt(i),s=this.fragments[n];s&&(Object.keys(r).forEach((function(t){var n=i.elementaryStreams[t];if(n){var o=r[t],l=null!==a||!0===n.partial;s.range[t]=e.getBufferedTimes(i,a,l,o)}})),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body))}},e.fragBuffered=function(t){var e=rt(t),r=this.fragments[e];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},e.getBufferedTimes=function(t,e,r,i){for(var a={time:[],partial:r},n=e?e.start:t.start,s=e?e.end:t.end,o=t.minEndPTS||s,l=t.maxStartPTS||n,u=0;u<i.length;u++){var d=i.start(u)-this.bufferPadding,h=i.end(u)+this.bufferPadding;if(l>=d&&o<=h){a.time.push({startPTS:Math.max(n,i.start(u)),endPTS:Math.min(s,i.end(u))});break}if(n<h&&s>d)a.partial=!0,a.time.push({startPTS:Math.max(n,i.start(u)),endPTS:Math.min(s,i.end(u))});else if(s<=d)break}return a},e.getPartialFragment=function(t){var e,r,i,a=null,n=0,s=this.bufferPadding,o=this.fragments;return Object.keys(o).forEach((function(l){var u=o[l];u&&et(u)&&(r=u.body.start-s,i=u.body.end+s,t>=r&&t<=i&&(e=Math.min(t-r,i-t),n<=e&&(a=u.body,n=e)))})),a},e.getState=function(t){var e=rt(t),r=this.fragments[e];return r?r.buffered?et(r)?$.PARTIAL:$.OK:r.backtrack?$.BACKTRACKED:$.APPENDING:$.NOT_LOADED},e.backtrack=function(t,e){var r=rt(t),i=this.fragments[r];if(!i||i.backtrack)return null;var a=i.backtrack=e||i.loaded;return i.loaded=null,a},e.getBacktrackData=function(t){var e=rt(t),r=this.fragments[e];if(r){var i,a=r.backtrack;if(null!=a&&null!==(i=a.payload)&&void 0!==i&&i.byteLength)return a;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,r){for(var i,a,n=0;n<r.length;n++){if(i=r.start(n)-this.bufferPadding,a=r.end(n)+this.bufferPadding,t>=i&&e<=a)return!0;if(e<=i)return!1}return!1},e.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!i){var a=rt(r);this.fragments[a]={body:r,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var r=this,i=e.frag,a=e.part,n=e.timeRanges;if(i.type===_.b.MAIN)if(this.activeFragment=i,a){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(a)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach((function(t){var e=n[t];if(r.detectEvictedFragments(t,e),!a)for(var s=0;s<e.length;s++)i.appendedPTS=Math.max(e.end(s),i.appendedPTS||0)}))},e.onFragBuffered=function(t,e){this.detectPartialFragments(e)},e.hasFragment=function(t){var e=rt(t);return!!this.fragments[e]},e.removeFragmentsInRange=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(a){var n=i.fragments[a];if(n&&n.buffered){var s=n.body;s.type===r&&s.start<e&&s.end>t&&i.removeFragment(s)}}))},e.removeFragment=function(t){var e=rt(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function et(t){var e,r;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(r=t.range.audio)||void 0===r?void 0:r.partial))}function rt(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}var it=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}(),at={length:0,start:function(){return 0},end:function(){return 0}},nt=function(){function t(){}return t.isBuffered=function(e,r){try{if(e)for(var i=t.getBuffered(e),a=0;a<i.length;a++)if(r>=i.start(a)&&r<=i.end(a))return!0}catch(t){}return!1},t.bufferInfo=function(e,r,i){try{if(e){var a,n=t.getBuffered(e),s=[];for(a=0;a<n.length;a++)s.push({start:n.start(a),end:n.end(a)});return this.bufferedInfo(s,r,i)}}catch(t){}return{len:0,start:r,end:r,nextStart:void 0}},t.bufferedInfo=function(t,e,r){e=Math.max(0,e),t.sort((function(t,e){var r=t.start-e.start;return r||e.end-t.end}));var i=[];if(r)for(var a=0;a<t.length;a++){var n=i.length;if(n){var s=i[n-1].end;t[a].start-s<r?t[a].end>s&&(i[n-1].end=t[a].end):i.push(t[a])}else i.push(t[a])}else i=t;for(var o,l=0,u=e,d=e,h=0;h<i.length;h++){var f=i[h].start,c=i[h].end;if(e+r>=f&&e<c)u=f,l=(d=c)-e;else if(e+r<f){o=f;break}}return{len:l,start:u||0,end:d||0,nextStart:o}},t.getBuffered=function(t){try{return t.buffered}catch(t){return o.b.log("failed to get media.buffered",t),at}},t}(),st=function(t,e,r,i,a,n){void 0===i&&(i=0),void 0===a&&(a=-1),void 0===n&&(n=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=t,this.sn=e,this.id=r,this.size=i,this.part=a,this.partial=n};function ot(t,e){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function lt(t,e){for(var r=e.fragments,i=0,a=r.length;i<a;i++)ot(r[i],t);e.fragmentHint&&ot(e.fragmentHint,t),e.alignedSliding=!0}function ut(t,e,r){e&&(!function(t,e,r){if(function(t,e,r){return!(!e.details||!(r.endCC>r.startCC||t&&t.cc<r.startCC))}(t,r,e)){var i=function(t,e){var r=t.fragments,i=e.fragments;if(i.length&&r.length){var a=function(t,e){for(var r=null,i=0,a=t.length;i<a;i++){var n=t[i];if(n&&n.cc===e){r=n;break}}return r}(r,i[0].cc);if(a&&(!a||a.startPTS))return a;o.b.log("No frag in previous level to align on")}else o.b.log("No fragments to align")}(r.details,e);i&&Object(a.a)(i.start)&&(o.b.log("Adjusting PTS using last level due to CC increase within current level "+e.url),lt(i.start,e))}}(t,r,e),!r.alignedSliding&&e.details&&function(t,e){if(!e.fragments.length||!t.hasProgramDateTime||!e.hasProgramDateTime)return;var r=e.fragments[0].programDateTime,i=t.fragments[0].programDateTime,n=(i-r)/1e3+e.fragments[0].start;n&&Object(a.a)(n)&&(o.b.log("Adjusting PTS using programDateTime delta "+(i-r)+"ms, sliding:"+n.toFixed(3)+" "+t.url+" "),lt(n,t))}(r,e.details),r.alignedSliding||!e.details||r.skippedSegments||Y(e.details,r))}var dt={search:function(t,e){for(var r=0,i=t.length-1,a=null,n=null;r<=i;){var s=e(n=t[a=(r+i)/2|0]);if(s>0)r=a+1;else{if(!(s<0))return n;i=a-1}}return null}};function ht(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0);var i=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}function ft(t,e,r){var i=1e3*Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>t}function ct(t){var e="function"==typeof Map?new Map:void 0;return(ct=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return vt(t,arguments,mt(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),pt(i,t)})(t)}function vt(t,e,r){return(vt=gt()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return r&&pt(a,r.prototype),a}).apply(null,arguments)}function gt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function pt(t,e){return(pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mt(t){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yt=Math.pow(2,17),bt=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var r=this,i=t.url;if(!i)return Promise.reject(new Et({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var a=this.config,n=a.fLoader,o=a.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var u=r.loader=t.loader=n?new n(a):new o(a),d=Tt(t),h={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:yt};t.stats=u.stats,u.load(d,h,{onSuccess:function(e,a,n,s){r.resetLoader(t,u),i({frag:t,part:null,payload:e.data,networkDetails:s})},onError:function(e,i,a){r.resetLoader(t,u),l(new Et({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:a}))},onAbort:function(e,i,a){r.resetLoader(t,u),l(new Et({type:s.b.NETWORK_ERROR,details:s.a.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:a}))},onTimeout:function(e,i,a){r.resetLoader(t,u),l(new Et({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:a}))},onProgress:function(r,i,a,n){e&&e({frag:t,part:null,payload:a,networkDetails:n})}})}))},e.loadPart=function(t,e,r){var i=this;this.abort();var a=this.config,n=a.fLoader,o=a.loader;return new Promise((function(l,u){i.loader&&i.loader.destroy();var d=i.loader=t.loader=n?new n(a):new o(a),h=Tt(t,e),f={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:yt};e.stats=d.stats,d.load(h,f,{onSuccess:function(a,n,s,o){i.resetLoader(t,d),i.updateStatsFromPart(t,e);var u={frag:t,part:e,payload:a.data,networkDetails:o};r(u),l(u)},onError:function(r,a,n){i.resetLoader(t,d),u(new Et({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:r,networkDetails:n}))},onAbort:function(r,a,n){t.stats.aborted=e.stats.aborted,i.resetLoader(t,d),u(new Et({type:s.b.NETWORK_ERROR,details:s.a.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:n}))},onTimeout:function(r,a,n){i.resetLoader(t,d),u(new Et({type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:n}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,i=e.stats,a=i.total;if(r.loaded+=i.loaded,a){var n=Math.round(t.duration/e.duration),s=Math.min(Math.round(r.loaded/a),n),o=(n-s)*Math.round(r.loaded/s);r.total=r.loaded+o}else r.total=Math.max(r.loaded,r.total);var l=r.loading,u=i.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function Tt(t,e){void 0===e&&(e=null);var r=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},n=r.byteRangeStartOffset,s=r.byteRangeEndOffset;return Object(a.a)(n)&&Object(a.a)(s)&&(i.rangeStart=n,i.rangeEnd=s),i}var Et=function(t){var e,r;function i(e){for(var r,i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return(r=t.call.apply(t,[this].concat(a))||this).data=void 0,r.data=e,r}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,pt(e,r),i}(ct(Error)),St=r(14),Lt={toString:function(t){for(var e="",r=t.length,i=0;i<r;i++)e+="["+t.start(i).toFixed(3)+","+t.end(i).toFixed(3)+"]";return e}};function At(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Rt(t,e){return(Rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Dt="STOPPED",_t="IDLE",kt="KEY_LOADING",xt="FRAG_LOADING",Ct="FRAG_LOADING_WAITING_RETRY",wt="PARSING",Ot="PARSED",It="BACKTRACKING",Pt="ENDED",Ft="ERROR",Mt="WAITING_LEVEL",Nt=function(t){var e,r;function i(e,r,i){var a;return(a=t.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=Dt,a.media=void 0,a.mediaBuffer=void 0,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.loadedmetadata=!1,a.fragLoadError=0,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.logPrefix=i,a.log=o.b.log.bind(o.b,i+":"),a.warn=o.b.warn.bind(o.b,i+":"),a.hls=e,a.fragmentLoader=new bt(e.config),a.fragmentTracker=r,a.config=e.config,a.decrypter=new St.a(e,e.config),e.on(n.a.KEY_LOADED,a.onKeyLoaded,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a)),a}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,Rt(e,r);var u,d,h,f=i.prototype;return f.doTick=function(){this.onTickEnd()},f.onTickEnd=function(){},f.startLoad=function(t){},f.stopLoad=function(){this.fragmentLoader.abort();var t=this.fragCurrent;t&&this.fragmentTracker.removeFragment(t),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Dt},f._streamEnded=function(t,e){var r=this.fragCurrent,i=this.fragmentTracker;if(!e.live&&r&&r.sn>=e.endSN&&!t.nextStart){var a=e.partList;if(null!=a&&a.length){var n=a[a.length-1];return nt.isBuffered(this.media,n.start+n.duration/2)}var s=i.getState(r);return s===$.PARTIAL||s===$.OK}return!1},f.onMediaAttached=function(t,e){var r=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);var i=this.config;this.levels&&i.autoStartLoad&&this.state===Dt&&this.startLoad(i.startPosition)},f.onMediaDetaching=function(){var t=this.media;null!=t&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onMediaSeeking=function(){var t=this.config,e=this.fragCurrent,r=this.media,i=this.mediaBuffer,n=this.state,s=r?r.currentTime:0,o=nt.bufferInfo(i||r,s,t.maxBufferHole);if(this.log("media seeking to "+(Object(a.a)(s)?s.toFixed(3):s)+", state: "+n),n===Pt)this.resetLoadingState();else if(e&&!o.len){var l=t.maxFragLookUpTolerance,u=e.start-l,d=s>e.start+e.duration+l;(s<u||d)&&(d&&e.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),e.loader.abort()),this.resetLoadingState())}r&&(this.lastCurrentTime=s),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onKeyLoaded=function(t,e){if(this.state===kt&&e.frag===this.fragCurrent&&this.levels){this.state=_t;var r=this.levels[e.frag.level].details;r&&this.loadFragment(e.frag,r,e.frag.start)}},f.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=Dt,this.hls.off(n.a.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},f.loadKey=function(t,e){this.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level),this.state=kt,this.fragCurrent=t,this.hls.trigger(n.a.KEY_LOADING,{frag:t})},f.loadFragment=function(t,e,r){this._loadFragForPlayback(t,e,r)},f._loadFragForPlayback=function(t,e,r){var i=this;this._doFragLoad(t,e,r,(function(e){if(i.fragContextChanged(t))return i.warn("Fragment "+t.sn+(e.part?" p: "+e.part.index:"")+" of level "+t.level+" was dropped during download."),void i.fragmentTracker.removeFragment(t);t.stats.chunkCount++,i._handleFragmentLoadProgress(e)})).then((function(e){if(e){i.fragLoadError=0;var r=i.state;if(!i.fragContextChanged(t))return"payload"in e&&(i.log("Loaded fragment "+t.sn+" of level "+t.level),i.hls.trigger(n.a.FRAG_LOADED,e),i.state===It)?(i.fragmentTracker.backtrack(t,e),void i.resetFragmentLoading(t)):void i._handleFragmentLoadComplete(e);(r===xt||r===It||!i.fragCurrent&&r===wt)&&(i.fragmentTracker.removeFragment(t),i.state=_t)}})).catch((function(e){i.warn(e),i.resetFragmentLoading(t)}))},f.flushMainBuffer=function(t,e,r){if(void 0===r&&(r=null),t-e){var i={startOffset:t,endOffset:e,type:r};this.fragLoadError=0,this.hls.trigger(n.a.BUFFER_FLUSHING,i)}},f._loadInitSegment=function(t){var e=this;this._doFragLoad(t).then((function(r){if(!r||e.fragContextChanged(t)||!e.levels)throw new Error("init load aborted");return r})).then((function(r){var i=e.hls,a=r.payload,s=t.decryptdata;if(a&&a.byteLength>0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(a),s.key.buffer,s.iv.buffer).then((function(e){var a=self.performance.now();return i.trigger(n.a.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:a}}),r.payload=e,r}))}return r})).then((function(r){var i=e.fragCurrent,a=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");s[t.level].details;var o=t.stats;e.state=_t,e.fragLoadError=0,t.data=new Uint8Array(r.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),r.frag===i&&a.trigger(n.a.FRAG_BUFFERED,{stats:o,frag:i,part:null,id:t.type}),e.tick()})).catch((function(r){e.warn(r),e.resetFragmentLoading(t)}))},f.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},f.fragBufferedComplete=function(t,e){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+Lt.toString(nt.getBuffered(r))),this.state=_t,this.tick()},f._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var r=t.frag,i=t.part,a=t.partsLoaded,n=!a||0===a.length||a.some((function(t){return!t})),s=new st(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!n);e.flush(s)}},f._handleFragmentLoadProgress=function(t){},f._doFragLoad=function(t,e,r,i){var s=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(t.start,r||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&i){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var l=this.getNextPart(o,t,r);if(l>-1){var u=o[l];return this.log("Loading part sn: "+t.sn+" p: "+u.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+l+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=u.start+u.duration,this.state=xt,this.hls.trigger(n.a.FRAG_LOADING,{frag:t,part:o[l],targetBufferTime:r}),this.doFragPartsLoad(t,o,l,i).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,r))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),Object(a.a)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=xt,this.hls.trigger(n.a.FRAG_LOADING,{frag:t,targetBufferTime:r}),this.fragmentLoader.load(t,i).catch((function(t){return s.handleFragLoadError(t)}))},f.doFragPartsLoad=function(t,e,r,i){var a=this;return new Promise((function(s,o){var l=[];!function r(u){var d=e[u];a.fragmentLoader.loadPart(t,d,i).then((function(i){l[d.index]=i;var o=i.part;a.hls.trigger(n.a.FRAG_LOADED,i);var h=e[u+1];if(!h||h.fragment!==t)return s({frag:t,part:o,partsLoaded:l});r(u+1)})).catch(o)}(r)}))},f.handleFragLoadError=function(t){var e=t.data;return e&&e.details===s.a.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(n.a.ERROR,e),null},f._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===wt){var r=e.frag,i=e.part,a=e.level,n=self.performance.now();r.stats.parsing.end=n,i&&(i.stats.parsing.end=n),this.updateLevelTiming(r,i,a,t.partial)}else this.fragCurrent||(this.state=_t)},f.getCurrentContext=function(t){var e=this.levels,r=t.level,i=t.sn,a=t.part;if(!e||!e[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var n=e[r],s=a>-1?function(t,e,r){if(!t||!t.details)return null;var i=t.details.partList;if(i)for(var a=i.length;a--;){var n=i[a];if(n.index===r&&n.fragment.sn===e)return n}return null}(n,i,a):null,o=s?s.fragment:function(t,e,r){if(!t||!t.details)return null;var i=t.details,a=i.fragments[e-i.startSN];return a||((a=i.fragmentHint)&&a.sn===e?a:e<i.startSN&&r&&r.sn===e?r:null)}(n,i,this.fragCurrent);return o?{frag:o,part:s,level:n}:null},f.bufferFragmentData=function(t,e,r,i){if(t&&this.state===wt){var a=t.data1,s=t.data2,o=a;if(a&&s&&(o=Object(l.a)(a,s)),o&&o.length){var u={type:t.type,frag:e,part:r,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(n.a.BUFFER_APPENDING,u),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},f.flushBufferGap=function(t){var e=this.media;if(e)if(nt.isBuffered(e,e.currentTime)){var r=e.currentTime,i=nt.bufferInfo(e,r,0),a=t.duration,n=Math.min(2*this.config.maxFragLookUpTolerance,.25*a),s=Math.max(Math.min(t.start-n,i.end-n),r+n);t.start-s>n&&this.flushMainBuffer(s,t.start)}else this.flushMainBuffer(0,t.start)},f.getFwdBufferInfo=function(t,e){var r=this.config,i=this.getLoadPosition();if(!Object(a.a)(i))return null;var n=nt.bufferInfo(t,i,r.maxBufferHole);if(0===n.len&&void 0!==n.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,e);if(s&&n.nextStart<s.end)return nt.bufferInfo(t,i,Math.max(n.nextStart,r.maxBufferHole))}return n},f.getMaxBufferLength=function(t){var e,r=this.config;return e=t?Math.max(8*r.maxBufferSize/t,r.maxBufferLength):r.maxBufferLength,Math.min(e,r.maxMaxBufferLength)},f.reduceMaxBufferLength=function(t){var e=this.config,r=t||e.maxBufferLength;return e.maxMaxBufferLength>=r&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},f.getNextFragment=function(t,e){var r,i,a=e.fragments,n=a.length;if(!n)return null;var s,o=this.config,l=a[0].start;if(e.live){var u=o.initialLiveManifestSize;if(n<u)return this.warn("Not enough fragments to start playback (have: "+n+", need: "+u+")"),null;e.PTSKnown||this.startFragRequested||-1!==this.startPosition||(s=this.getInitialLiveFragment(e,a),this.startPosition=s?this.hls.liveSyncPosition||s.start:t)}else t<=l&&(s=a[0]);if(!s){var d=o.lowLatencyMode?e.partEnd:e.fragmentEnd;s=this.getFragmentAtPosition(t,d,e)}return null===(r=s)||void 0===r||!r.initSegment||null!==(i=s)&&void 0!==i&&i.initSegment.data||this.bitrateTest||(s=s.initSegment),s},f.getNextPart=function(t,e,r){for(var i=-1,a=!1,n=!0,s=0,o=t.length;s<o;s++){var l=t[s];if(n=n&&!l.independent,i>-1&&r<l.start)break;var u=l.loaded;!u&&(a||l.independent||n)&&l.fragment===e&&(i=s),a=u}return i},f.loadedEndOfParts=function(t,e){var r=t[t.length-1];return r&&e>r.start&&r.loaded},f.getInitialLiveFragment=function(t,e){var r=this.fragPrevious,i=null;if(r){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),i=function(t,e,r){if(null===e||!Array.isArray(t)||!t.length||!Object(a.a)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<t.length;++i){var n=t[i];if(ft(e,r,n))return n}return null}(e,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){var n=r.sn+1;if(n>=t.startSN&&n<=t.endSN){var s=e[n-t.startSN];r.cc===s.cc&&(i=s,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=function(t,e){return dt.search(t,(function(t){return t.cc<e?1:t.cc>e?-1:0}))}(e,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(i=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i},f.getFragmentAtPosition=function(t,e,r){var i,a=this.config,n=this.fragPrevious,s=r.fragments,o=r.endSN,l=r.fragmentHint,u=a.maxFragLookUpTolerance,d=!!(a.lowLatencyMode&&r.partList&&l);(d&&l&&!this.bitrateTest&&(s=s.concat(l),o=l.sn),t<e)?i=function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var a=null;if(t?a=e[t.sn-e[0].sn+1]||null:0===r&&0===e[0].start&&(a=e[0]),a&&0===ht(r,i,a))return a;var n=dt.search(e,ht.bind(null,r,i));return n||a}(n,s,t,t>e-u?0:u):i=s[s.length-1];if(i){var h=i.sn-r.startSN,f=n&&i.level===n.level,c=s[h+1];if(this.fragmentTracker.getState(i)===$.BACKTRACKED){i=null;for(var v=h;s[v]&&this.fragmentTracker.getState(s[v])===$.BACKTRACKED;)i=n?s[v--]:s[--v];i||(i=c)}else n&&i.sn===n.sn&&!d&&f&&(i.sn<o&&this.fragmentTracker.getState(c)!==$.OK?(this.log("SN "+i.sn+" just loaded, load next one: "+c.sn),i=c):i=null)}return i},f.synchronizeToLiveEdge=function(t){var e=this.config,r=this.media;if(r){var i=this.hls.liveSyncPosition,a=r.currentTime,n=t.fragments[0].start,s=t.edge,o=a>=n-e.maxFragLookUpTolerance&&a<=s;if(null!==i&&r.duration>i&&(a<i||!o)){var l=void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:e.liveMaxLatencyDurationCount*t.targetduration;(!o&&r.readyState<4||a<s-l)&&(this.loadedmetadata||(this.nextLoadPosition=i),r.readyState&&(this.warn("Playback: "+a.toFixed(3)+" is located too far from the end of live sliding playlist: "+s+", reset currentTime to : "+i.toFixed(3)),r.currentTime=i))}}},f.alignPlaylists=function(t,e){var r=this.levels,i=this.levelLastLoaded,n=this.fragPrevious,s=null!==i?r[i]:null,o=t.fragments.length;if(!o)return this.warn("No fragments in live playlist"),0;var l=t.fragments[0].start,u=!e,d=t.alignedSliding&&Object(a.a)(l);if(u||!d&&!l){ut(n,s,t);var h=t.fragments[0].start;return this.log("Live playlist sliding: "+h.toFixed(2)+" start-sn: "+(e?e.startSN:"na")+"->
1334"+t.startSN+" prev-sn: "+(n?n.sn:"na")+" fragments: "+o),h}return l},f.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},f.setStartPosition=function(t,e){var r=this.startPosition;if(r<e&&(r=-1),-1===r||-1===this.lastCurrentTime){var i=t.startTimeOffset;Object(a.a)(i)?(r=e+i,i<0&&(r+=t.totalduration),r=Math.min(Math.max(e,r),e+t.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+r),this.startPosition=r):t.live?r=this.hls.liveSyncPosition||e:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r},f.getLoadPosition=function(){var t=this.media,e=0;return this.loadedmetadata&&t?e=t.currentTime:this.nextLoadPosition&&(e=this.nextLoadPosition),e},f.handleFragLoadAborted=function(t,e){this.transmuxer&&"initSegment"!==t.sn&&t.stats.aborted&&(this.warn("Fragment "+t.sn+(e?" part"+e.index:"")+" of level "+t.level+" was aborted"),this.resetFragmentLoading(t))},f.resetFragmentLoading=function(t){this.fragCurrent&&this.fragContextChanged(t)||(this.state=_t)},f.onFragmentOrKeyLoadError=function(t,e){if(!e.fatal){var r=e.frag;if(r&&r.type===t){this.fragCurrent;var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(r.level))return;var a=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+r.sn+" of "+t+" "+r.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=Ct}else e.levelRetry?(t===_.b.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=_t):(o.b.error(e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.stopLoad(),this.state=Ft)}}},f.afterBufferFlushed=function(t,e,r){if(t){var i=nt.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,i,r),this.state===Pt&&this.resetLoadingState()}},f.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=_t},f.resetLiveStartWhenNotLoaded=function(t){if(!this.loadedmetadata){this.startFragRequested=!1;var e=this.levels?this.levels[t].details:null;if(null!=e&&e.live)return this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},f.updateLevelTiming=function(t,e,r,i){var a=this,s=r.details;Object.keys(t.elementaryStreams).reduce((function(e,o){var l=t.elementaryStreams[o];if(l){var u=l.endPTS-l.startPTS;if(u<=0)return a.warn("Could not parse fragment "+t.sn+" "+o+" duration reliably ("+u+") resetting transmuxer to fallback to playlist timing"),a.resetTransmuxer(),e||!1;var d=i?0:V(s,t,l.startPTS,l.endPTS,l.startDTS,l.endDTS);return a.hls.trigger(n.a.LEVEL_PTS_UPDATED,{details:s,level:r,drift:d,type:o,frag:t,start:l.startPTS,end:l.endPTS}),!0}return e}),!1)?(this.state=Ot,this.hls.trigger(n.a.FRAG_PARSED,{frag:t,part:e})):this.resetLoadingState()},f.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u=i,(d=[{key:"state",get:function(){return this._state},set:function(t){var e=this._state;e!==t&&(this._state=t,this.log(e+"->"+t))}}])&&At(u.prototype,d),h&&At(u,h),i}(it);function Bt(){return self.MediaSource||self.WebKitMediaSource}function Ut(){return self.SourceBuffer||self.WebKitSourceBuffer}var Gt=r(17),jt=r(9),Ht=r(13),Kt=Bt()||{isTypeSupported:function(){return!1}},Vt=function(){function t(t,e,r,i){var a=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=t,this.id=e,this.onTransmuxComplete=r,this.onFlush=i;var l=t.config,u=function(e,r){(r=r||{}).frag=a.frag,r.id=a.id,t.trigger(e,r)};this.observer=new Ht.EventEmitter,this.observer.on(n.a.FRAG_DECRYPTED,u),this.observer.on(n.a.ERROR,u);var d={mp4:Kt.isTypeSupported("video/mp4"),mpeg:Kt.isTypeSupported("audio/mpeg"),mp3:Kt.isTypeSupported('audio/mp4; codecs="mp3"')},h=navigator.vendor;if(l.enableWorker&&"undefined"!=typeof Worker){var f;o.b.log("demuxing in webworker");try{f=this.worker=Gt(18),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(e){t.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+"  ("+e.filename+":"+e.lineno+")")})}
vendor: 72,658 bytes, line 1334
1334,f.postMessage({cmd:"init",typeSupported:d,vendor:h,id:e,config:JSON.stringify(l)})}catch(t){o.b.warn("Error in worker:",t),o.b.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new jt.c(this.observer,d,l,h,e),this.worker=null}}else this.transmuxer=new jt.c(this.observer,d,l,h,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},e.push=function(t,e,r,i,a,n,s,l,u,d){var h,f,c=this;u.transmuxing.start=self.performance.now();var v=this.transmuxer,g=this.worker,p=n?n.start:a.start,m=a.decryptdata,y=this.frag,b=!(y&&a.cc===y.cc),T=!(y&&u.level===y.level),E=y?u.sn-y.sn:-1,S=this.part?u.part-this.part.index:1,L=!T&&(1===E||0===E&&1===S),A=self.performance.now();(T||E||0===a.stats.parsing.start)&&(a.stats.parsing.start=A),!n||!S&&L||(n.stats.parsing.start=A);var R=!(y&&(null===(h=a.initSegment)||void 0===h?void 0:h.url)===(null===(f=y.initSegment)||void 0===f?void 0:f.url)),D=new jt.b(b,L,l,T,p,R);if(!L||b||R){o.b.log("[transmuxer-interface, "+a.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n        discontinuity: "+b+"\n        trackSwitch: "+T+"\n        contiguous: "+L+"\n        accurateTimeOffset: "+l+"\n        timeOffset: "+p+"\n        initSegmentChange: "+R);var _=new jt.a(r,i,e,s,d);this.configureTransmuxer(_)}if(this.frag=a,this.part=n,g)g.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:D},t instanceof ArrayBuffer?[t]:[]);else if(v){var k=v.push(t,m,u,D);Object(jt.d)(k)?k.then((function(t){c.handleTransmuxComplete(t)})):this.handleTransmuxComplete(k)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var r=this.transmuxer,i=this.worker;if(i)i.postMessage({cmd:"flush",chunkMeta:t});else if(r){var a=r.flush(t);Object(jt.d)(a)?a.then((function(r){e.handleFlushResult(r,t)})):this.handleFlushResult(a,t)}},e.handleFlushResult=function(t,e){var r=this;t.forEach((function(t){r.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,r=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):r&&r.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}(),Wt=function(){function t(t,e,r,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=r,this.hls=i}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,r=this.media,i=this.stalled,a=r.currentTime,n=r.seeking,s=this.seeking&&!n,l=!this.seeking&&n;if(this.seeking=n,a===t){if((l||s)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&nt.getBuffered(r).length){var u=nt.bufferInfo(r,a,0),d=u.len>0,h=u.nextStart||0;if(d||h){if(n){var f=u.len>2,c=!h||h-a>2&&!this.fragmentTracker.getPartialFragment(a);if(f||c)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,g=Math.max(h,u.start||0)-a,p=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,m=(null==p||null===(v=p.details)||void 0===v?void 0:v.live)?2*p.details.targetduration:2;if(g>0&&g<=m)return void this._trySkipBufferHole(null)}var y=self.performance.now();if(null!==i){var b=y-i;!n&&b>=250&&this._reportStall(u.len);var T=nt.bufferInfo(r,a,e.maxBufferHole);this._tryFixBufferStall(T,b)}else this.stalled=y}}}else if(this.moved=!0,null!==i){if(this.stallReported){var E=self.performance.now()-i;o.b.warn("playback not stuck anymore @"+a+", after "+Math.round(E)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var r=this.config,i=this.fragmentTracker,a=this.media.currentTime,n=i.getPartialFragment(a);if(n&&this._trySkipBufferHole(n))return;t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(o.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,o.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,r=this.hls,i=this.media,a=i.currentTime,l=0,u=nt.getBuffered(i),d=0;d<u.length;d++){var h=u.start(d);if(a+e.maxBufferHole>=l&&a<h){var f=Math.max(h+.05,i.currentTime+.1);return o.b.warn("skipping hole, adjusting currentTime from "+a+" to "+f),this.moved=!0,this.stalled=null,i.currentTime=f,t&&r.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+f,frag:t}),f}l=u.end(d)}return 0},e._tryNudgeBuffer=function(){var t=this.config,e=this.hls,r=this.media,i=r.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<t.nudgeMaxRetry){var l=i+a*t.nudgeOffset;o.b.warn("Nudging 'currentTime' from "+i+" to "+l),r.currentTime=l,e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else o.b.error("Playhead still not moving while enough data buffered @"+i+" after "+t.nudgeMaxRetry+" nudges"),e.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!0})},t}();function Yt(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var qt=function(t){var e,r;function i(e,r){var i;return(i=t.call(this,e,r,"[stream-controller]")||this).audioCodecSwap=!1,i.gapController=null,i.level=-1,i._forceStartLoad=!1,i.altAudio=!1,i.audioOnly=!1,i.fragPlaying=null,i.onvplaying=null,i.onvseeked=null,i.fragLastKbps=0,i.stalled=!1,i.couldBacktrack=!1,i.audioCodecSwitch=!1,i.videoBuffer=null,i._registerListeners(),i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,Xt(e,r);var l,d,h,f=i.prototype;return f._registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(n.a.ERROR,this.onError,this),t.on(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.on(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(n.a.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},f._unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(n.a.ERROR,this.onError,this),t.off(n.a.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(n.a.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(n.a.BUFFER_CREATED,this.onBufferCreated,this),t.off(n.a.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(n.a.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this)},f.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},f.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;-1===i&&(r.config.testBandwidth?(i=0,this.bitrateTest=!0):i=r.nextAutoLevel),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}e>0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=_t,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=Dt},f.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case _t:this.doTickIdle();break;case Mt:var t,e=this.levels,r=this.level,i=null==e||null===(t=e[r])||void 0===t?void 0:t.details;if(i&&(!i.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(i))break;this.state=_t;break}break;case Ct:var a,n=self.performance.now(),s=this.retryDate;(!s||n>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=_t)}this.onTickEnd()},f.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},f.doTickIdle=function(){var t,e,r=this.hls,i=this.levelLastLoaded,a=this.levels,s=this.media,o=r.config,l=r.nextLoadLevel;if(null!==i&&(s||!this.startFragRequested&&o.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[l]){var d=a[l];this.level=r.nextLoadLevel=l;var h=d.details;if(!h||this.state===Mt||h.live&&this.levelLastLoaded!==l)this.state=Mt;else{var f=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,_.b.MAIN);if(null!==f)if(!(f.len>=this.getMaxBufferLength(d.maxBitrate))){if(this._streamEnded(f,h)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(n.a.BUFFER_EOS,c),void(this.state=Pt)}var v=f.end,g=this.getNextFragment(v,h);if(this.couldBacktrack&&!this.fragPrevious&&g&&"initSegment"!==g.sn){var p=g.sn-h.startSN;p>1&&(g=h.fragments[p-1],this.fragmentTracker.removeFragment(g))}if(g&&this.fragmentTracker.getState(g)===$.OK&&this.nextLoadPosition>v){var m=this.audioOnly&&!this.altAudio?u.a.AUDIO:u.a.VIDEO;this.afterBufferFlushed(s,m,_.b.MAIN),g=this.getNextFragment(this.nextLoadPosition,h)}g&&(!g.initSegment||g.initSegment.data||this.bitrateTest||(g=g.initSegment),"identity"!==(null===(t=g.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=g.decryptdata)&&void 0!==e&&e.key?this.loadFragment(g,h,v):this.loadKey(g,h))}}}},f.loadFragment=function(e,r,i){var a,n=this.fragmentTracker.getState(e);if(this.fragCurrent=e,n===$.BACKTRACKED){var s=this.fragmentTracker.getBacktrackData(e);if(s)return this._handleFragmentLoadProgress(s),void this._handleFragmentLoadComplete(s);n=$.NOT_LOADED}n===$.NOT_LOADED||n===$.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,i)):n===$.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(a=this.media)||void 0===a?void 0:a.buffered.length)&&this.fragmentTracker.removeAllFragments()},f.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,_.b.MAIN);return e&&"fragment"in e?e.fragment:e},f.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,_.b.MAIN)},f.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},f.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var r,i=this.getAppendedFrag(e.currentTime);if(i&&i.start>1&&this.flushMainBuffer(0,i.start-1),!e.paused&&t){var a=t[this.hls.nextLoadLevel],n=this.fragLastKbps;r=n&&this.fragCurrent?this.fragCurrent.duration*a.maxBitrate/(1e3*n)+1:0}else r=0;var s=this.getBufferedFrag(e.currentTime+r);if(s){var o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();var l=o.maxStartPTS?o.maxStartPTS:o.start,u=o.duration,d=Math.max(s.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,.5*u),.75*u));this.flushMainBuffer(d,Number.POSITIVE_INFINITY)}}}},f.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===kt&&(this.state=_t),this.nextLoadPosition=this.getLoadPosition()},f.flushMainBuffer=function(e,r){t.prototype.flushMainBuffer.call(this,e,r,this.altAudio?"video":null)},f.onMediaAttached=function(e,r){t.prototype.onMediaAttached.call(this,e,r);var i=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new Wt(this.config,i,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},f.onMediaPlaying=function(){this.tick()},f.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(a.a)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},f.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(n.a.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},f.onManifestParsed=function(t,e){var r,i,a,n=!1,s=!1;e.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(n=!0),-1!==r.indexOf("mp4a.40.5")&&(s=!0))})),this.audioCodecSwitch=n&&s&&!("function"==typeof(null==(a=Ut())||null===(i=a.prototype)||void 0===i?void 0:i.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},f.onLevelLoading=function(t,e){var r=this.levels;if(r&&this.state===_t){var i=r[e.level];(!i.details||i.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(i.details))&&(this.state=Mt)}},f.onLevelLoaded=function(t,e){var r,i=this.levels,a=e.level,s=e.details,o=s.totalduration;if(i){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+o);var l=this.fragCurrent;!l||this.state!==xt&&this.state!==Ct||l.level!==e.level&&l.loader&&(this.state=_t,l.loader.abort());var u=i[a],d=0;if(s.live||null!==(r=u.details)&&void 0!==r&&r.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(n.a.LEVEL_UPDATED,{details:s,level:a}),this.state===Mt){if(this.waitForCdnTuneIn(s))return;this.state=_t}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,d),this.tick()}else this.warn("Levels were reset while loading level "+a)},f._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,a=t.payload,n=this.levels;if(n){var s=n[r.level],o=s.details;if(o){var l=s.videoCodec,u=o.PTSKnown||!o.live,d=null===(e=r.initSegment)||void 0===e?void 0:e.data,h=this._getAudioCodec(s),f=this.transmuxer=this.transmuxer||new Vt(this.hls,_.b.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),c=i?i.index:-1,v=-1!==c,g=new st(r.level,r.sn,r.stats.chunkCount,a.byteLength,c,v),p=this.initPTS[r.cc];f.push(a,d,h,l,r,i,o.totalduration,u,g,p)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},f.onAudioTrackSwitching=function(t,e){var r=this.altAudio,i=!!e.url,a=e.id;if(!i){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var o=this.hls;r&&o.trigger(n.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),o.trigger(n.a.AUDIO_TRACK_SWITCHED,{id:a})}},f.onAudioTrackSwitched=function(t,e){var r=e.id,i=!!this.hls.audioTracks[r].url;if(i){var a=this.videoBuffer;a&&this.mediaBuffer!==a&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=a)}this.altAudio=i,this.tick()},f.onBufferCreated=function(t,e){var r,i,a=e.tracks,n=!1;for(var s in a){var o=a[s];if("main"===o.id){if(i=s,r=o,"video"===s){var l=a[s];l&&(this.videoBuffer=l.buffer)}}else n=!0}n&&r?(this.log("Alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},f.onFragBuffered=function(t,e){var r=e.frag,i=e.part;if(!r||r.type===_.b.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Ot&&(this.state=_t));var a=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}},f.onError=function(t,e){switch(e.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(_.b.MAIN,e);break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:this.state!==Ft&&(e.fatal?(this.warn(""+e.details),this.state=Ft):e.levelRetry||this.state!==Mt||(this.state=_t));break;case s.a.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===wt||this.state===Ot)){var r=!0,i=this.getFwdBufferInfo(this.media,_.b.MAIN);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},f.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var r=nt.getBuffered(t);!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},f.onFragLoadEmergencyAborted=function(){this.state=_t,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},f.onBufferFlushed=function(t,e){var r=e.type;if(r!==u.a.AUDIO||this.audioOnly&&!this.altAudio){var i=(r===u.a.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,r,_.b.MAIN)}},f.onLevelsUpdated=function(t,e){this.levels=e.levels},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f.seekToStartPos=function(){var t=this.media,e=t.currentTime,r=this.startPosition;if(r>=0&&e<r){if(t.seeking)return void o.b.log("could not seek to "+r+", already seeking at "+e);var i=nt.getBuffered(t),a=(i.length?i.start(0):0)-r;a>0&&(a<this.config.maxBufferHole||a<this.config.maxFragLookUpTolerance)&&(o.b.log("adjusting start position by "+a+" to match buffer start"),r+=a,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+e),t.currentTime=r}},f._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),e},f._loadBitrateTestFrag=function(t){var e=this;this._doFragLoad(t).then((function(r){var i=e.hls;if(r&&!i.nextLoadLevel&&!e.fragContextChanged(t)){e.fragLoadError=0,e.state=_t,e.startFragRequested=!1,e.bitrateTest=!1;var a=t.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(n.a.FRAG_LOADED,r)}}))},f._handleTransmuxComplete=function(t){var e,r="main",i=this.hls,s=t.remuxResult,o=t.chunkMeta,l=this.getCurrentContext(o);if(!l)return this.warn("The loading context changed while buffering fragment "+o.sn+" of level "+o.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(o.level);var d=l.frag,h=l.part,f=l.level,c=s.video,v=s.text,g=s.id3,p=s.initSegment,m=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(d)){if(this.state=wt,p){p.tracks&&(this._bufferInitSegment(f,p.tracks,d,o),i.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{frag:d,id:r,tracks:p.tracks}));var y=p.initPTS,b=p.timescale;Object(a.a)(y)&&(this.initPTS[d.cc]=y,i.trigger(n.a.INIT_PTS_FOUND,{frag:d,id:r,initPTS:y,timescale:b}))}if(c&&!1!==s.independent){if(f.details){var T=c.startPTS,E=c.endPTS,S=c.startDTS,L=c.endDTS;if(h)h.elementaryStreams[c.type]={startPTS:T,endPTS:E,startDTS:S,endDTS:L};else if(c.firstKeyFrame&&c.independent&&(this.couldBacktrack=!0),c.dropped&&c.independent){if(this.getLoadPosition()+this.config.maxBufferHole<T)return void this.backtrack(d);d.setElementaryStreamInfo(c.type,d.start,E,d.start,L,!0)}d.setElementaryStreamInfo(c.type,T,E,S,L),this.bufferFragmentData(c,d,h,o)}}else if(!1===s.independent)return void this.backtrack(d);if(m){var A=m.startPTS,R=m.endPTS,D=m.startDTS,_=m.endDTS;h&&(h.elementaryStreams[u.a.AUDIO]={startPTS:A,endPTS:R,startDTS:D,endDTS:_}),d.setElementaryStreamInfo(u.a.AUDIO,A,R,D,_),this.bufferFragmentData(m,d,h,o)}if(null!=g&&null!==(e=g.samples)&&void 0!==e&&e.length){var k={frag:d,id:r,samples:g.samples};i.trigger(n.a.FRAG_PARSING_METADATA,k)}if(v){var x={frag:d,id:r,samples:v.samples};i.trigger(n.a.FRAG_PARSING_USERDATA,x)}}},f._bufferInitSegment=function(t,e,r,i){var a=this;if(this.state===wt){this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;var s=e.audio,o=e.video,l=e.audiovideo;if(s){var u=t.audioCodec,d=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===d.indexOf("firefox")&&(u="mp4a.40.5")),-1!==d.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),t.audioCodec&&t.audioCodec!==u&&this.log('Swapping manifest audio codec "'+t.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(t.audioCodec||"")+"/"+s.codec+"]")}o&&(o.levelCodec=t.videoCodec,o.id="main",this.log("Init video buffer, container:"+o.container+", codecs[level/parsed]=["+(t.videoCodec||"")+"/"+o.codec+"]")),l&&this.log("Init audiovideo buffer, container:"+l.container+", codecs[level/parsed]=["+(t.attrs.CODECS||"")+"/"+l.codec+"]"),this.hls.trigger(n.a.BUFFER_CODECS,e),Object.keys(e).forEach((function(t){var s=e[t].initSegment;null!=s&&s.byteLength&&a.hls.trigger(n.a.BUFFER_APPENDING,{type:t,data:s,frag:r,part:null,chunkMeta:i,parent:r.type})})),this.tick()}},f.backtrack=function(t){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(t);var e=this.fragmentTracker.backtrack(t);this.fragPrevious=null,this.nextLoadPosition=t.start,e?this.resetFragmentLoading(t):this.state=It},f.checkFragmentChanged=function(){var t=this.media,e=null;if(t&&t.readyState>1&&!1===t.seeking){var r=t.currentTime;if(nt.isBuffered(t,r)?e=this.getAppendedFrag(r):nt.isBuffered(t,r+.1)&&(e=this.getAppendedFrag(r+.1)),e){var i=this.fragPlaying,a=e.level;i&&e.sn===i.sn&&i.level===a&&e.urlId===i.urlId||(this.hls.trigger(n.a.FRAG_CHANGED,{frag:e}),i&&i.level===a||this.hls.trigger(n.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=e)}}},l=i,(d=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&Yt(l.prototype,d),h&&Yt(l,h),i}(Nt),zt=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=r}var e=t.prototype;return e.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}(),Qt=function(){function t(t,e,r){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new zt(t),this.fast_=new zt(e)}var e=t.prototype;return e.update=function(t,e){var r=this.slow_,i=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new zt(t,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new zt(e,i.getEstimate(),i.getTotalWeight()))},e.sample=function(t,e){var r=(t=Math.max(t,this.minDelayMs_))/1e3,i=8*e/r;this.fast_.sample(r,i),this.slow_.sample(r,i)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();function $t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Zt=function(){function t(t){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=t;var e=t.config;this.bwEstimator=new Qt(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}var e,r,i,l=t.prototype;return l.registerListeners=function(){var t=this.hls;t.on(n.a.FRAG_LOADING,this.onFragLoading,this),t.on(n.a.FRAG_LOADED,this.onFragLoaded,this),t.on(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.on(n.a.ERROR,this.onError,this)},l.unregisterListeners=function(){var t=this.hls;t.off(n.a.FRAG_LOADING,this.onFragLoading,this),t.off(n.a.FRAG_LOADED,this.onFragLoaded,this),t.off(n.a.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.a.LEVEL_LOADED,this.onLevelLoaded,this),t.off(n.a.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},l.onFragLoading=function(t,e){var r,i=e.frag;i.type===_.b.MAIN&&(this.timer||(this.fragCurrent=i,this.partCurrent=null!=(r=e.part)?r:null,this.timer=self.setInterval(this.onCheck,100)))},l.onLevelLoaded=function(t,e){var r=this.hls.config;e.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},l._abandonRulesCheck=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.autoLevelEnabled,s=r.config,l=r.media;if(t&&l){var u=e?e.stats:t.stats,d=e?e.duration:t.duration;if(u.aborted)return o.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var h=performance.now()-u.loading.start,f=Math.abs(l.playbackRate);if(!(h<=500*d/f)){var c=r.levels,v=r.minAutoLevel,g=c[t.level],p=u.total||Math.max(u.loaded,Math.round(d*g.maxBitrate/8)),m=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/h),y=(p-u.loaded)/m,b=l.currentTime,T=(nt.bufferInfo(l,b,s.maxBufferHole).end-b)/f;if(!(T>=2*d/f||y<=T)){var E,S=Number.POSITIVE_INFINITY;for(E=t.level-1;E>v;E--){if((S=d*c[E].maxBitrate/(6.4*m))<T)break}if(!(S>=y)){var L=this.bwEstimator.getEstimate();o.b.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+E+"\n      Current BW estimate: "+(Object(a.a)(L)?(L/1024).toFixed(3):"Unknown")+" Kb/s\n      Estimated load time for current fragment: "+y.toFixed(3)+" s\n      Estimated load time for the next fragment: "+S.toFixed(3)+" s\n      Time to underbuffer: "+T.toFixed(3)+" s"),r.nextLoadLevel=E,this.bwEstimator.sample(h,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),r.trigger(n.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},l.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if(r.type===_.b.MAIN&&Object(a.a)(r.sn)){var s=i?i.stats:r.stats,o=i?i.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[r.level],u=(l.loaded?l.loaded.bytes:0)+s.loaded,d=(l.loaded?l.loaded.duration:0)+o;l.loaded={bytes:u,duration:d},l.realBitrate=Math.round(8*u/d)}if(r.bitrateTest){var h={stats:s,frag:r,part:i,id:r.type};this.onFragBuffered(n.a.FRAG_BUFFERED,h),r.bitrateTest=!1}}},l.onFragBuffered=function(t,e){var r=e.frag,i=e.part,a=i?i.stats:r.stats;if(!a.aborted&&r.type===_.b.MAIN&&"initSegment"!==r.sn){var n=a.parsing.end-a.loading.start;this.bwEstimator.sample(n,a.loaded),a.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}},l.onError=function(t,e){switch(e.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},l.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},l.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.maxAutoLevel,a=r.config,n=r.minAutoLevel,s=r.media,l=e?e.duration:t?t.duration:0,u=s?s.currentTime:0,d=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():a.abrEwmaDefaultEstimate,f=(nt.bufferInfo(s,u,a.maxBufferHole).end-u)/d,c=this.findBestLevel(h,n,i,f,a.abrBandWidthFactor,a.abrBandWidthUpFactor);if(c>=0)return c;o.b.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var v=l?Math.min(l,a.maxStarvationDelay):a.maxStarvationDelay,g=a.abrBandWidthFactor,p=a.abrBandWidthUpFactor;if(!f){var m=this.bitrateTestDelay;if(m)v=(l?Math.min(l,a.maxLoadingDelay):a.maxLoadingDelay)-m,o.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),g=p=1}return c=this.findBestLevel(h,n,i,f+v,g,p),Math.max(c,0)},l.findBestLevel=function(t,e,r,i,a,n){for(var s,l=this.fragCurrent,u=this.partCurrent,d=this.lastLoadedFragLevel,h=this.hls.levels,f=h[d],c=!(null==f||null===(s=f.details)||void 0===s||!s.live),v=null==f?void 0:f.codecSet,g=u?u.duration:l?l.duration:0,p=r;p>=e;p--){var m=h[p];if(m&&(!v||m.codecSet===v)){var y=m.details,b=(u?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,T=void 0;T=p<=d?a*t:n*t;var E=h[p].maxBitrate,S=E*b/T;if(o.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+p+"/"+Math.round(T)+"/"+E+"/"+b+"/"+i+"/"+S),T>E&&(!S||c&&!this.bitrateTestDelay||S<i))return p}}return-1},e=t,(r=[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var r=this.getNextABRAutoLevel();return-1!==t&&(r=Math.min(t,r)),r},set:function(t){this._nextAutoLevel=t}}])&&$t(e.prototype,r),i&&$t(e,i),t}(),Jt=r(10),te=r.n(Jt),ee=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var r=this.queues[e];r.push(t),1===r.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,r=new Promise((function(t){e=t})),i={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(i,t),r},e.executeNext=function(t){var e=this.buffers,r=this.queues,i=e[t],a=r[t];if(a.length){var n=a[0];try{n.execute()}catch(e){o.b.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(e),i&&i.updating||(a.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}(),re=Bt(),ie=/([ha]vc.)(?:\.[^.,]+)+/,ae=function(){function t(t){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,r=e.media,i=e.mediaSource;o.b.log("[buffer-controller]: Media source opened"),r&&(e.updateMediaElementDuration(),t.trigger(n.a.MEDIA_ATTACHED,{media:r})),i&&i.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){o.b.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.b.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.BUFFER_RESET,this.onBufferReset,this),t.on(n.a.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.a.BUFFER_EOS,this.onBufferEos,this),t.on(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.a.FRAG_PARSED,this.onFragParsed,this),t.on(n.a.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.BUFFER_RESET,this.onBufferReset,this),t.off(n.a.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.a.BUFFER_EOS,this.onBufferEos,this),t.off(n.a.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.a.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.a.FRAG_PARSED,this.onFragParsed,this),t.off(n.a.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new ee(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var r=2;(e.audio&&!e.video||!e.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,o.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var r=this.media=e.media;if(r&&re){var i=this.mediaSource=new re;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(i),this._objectUrl=r.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,r=this._objectUrl;if(e){if(o.b.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){o.b.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(r&&self.URL.revokeObjectURL(r),t.src===r?(t.removeAttribute("src"),t.load()):o.b.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(n.a.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var r=t.sourceBuffer[e];try{r&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(r),t.sourceBuffer[e]=void 0)}catch(t){o.b.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var r=this,i=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(i){var a=r.tracks[t];if(a&&"function"==typeof a.buffer.changeType){var n=e[t],s=n.codec,o=n.levelCodec,l=n.container;if((a.levelCodec||a.codec).replace(ie,"$1")!==(o||s).replace(ie,"$1")){var u=l+";codecs="+(o||s);r.appendChangeType(t,u)}}}else r.pendingTracks[t]=e[t]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var r=this,i=this.operationQueue,a={execute:function(){var a=r.sourceBuffer[t];a&&(o.b.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),a.changeType(e)),i.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){o.b.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};i.append(a,t)},e.onBufferAppending=function(t,e){var r=this,i=this.hls,a=this.operationQueue,l=this.tracks,u=e.data,d=e.type,h=e.frag,f=e.part,c=e.chunkMeta,v=c.buffering[d],g=self.performance.now();v.start=g;var p=h.stats.buffering,m=f?f.stats.buffering:null;0===p.start&&(p.start=g),m&&0===m.start&&(m.start=g);var y=l.audio,b="audio"===d&&1===c.id&&"audio/mpeg"===(null==y?void 0:y.container),T={execute:function(){if(v.executeStart=self.performance.now(),b){var t=r.sourceBuffer[d];if(t){var e=h.start-t.timestampOffset;Math.abs(e)>=.1&&(o.b.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+e+") sn: "+h.sn+")"),t.timestampOffset=h.start)}}r.appendExecutor(u,d)},onStart:function(){},onComplete:function(){var t=self.performance.now();v.executeEnd=v.end=t,0===p.first&&(p.first=t),m&&0===m.first&&(m.first=t);var e=r.sourceBuffer,i={};for(var a in e)i[a]=nt.getBuffered(e[a]);r.appendError=0,r.hls.trigger(n.a.BUFFER_APPENDED,{type:d,frag:h,part:f,chunkMeta:c,parent:h.type,timeRanges:i})},onError:function(t){o.b.error("[buffer-controller]: Error encountered while trying to append to the "+d+" SourceBuffer",t);var e={type:s.b.MEDIA_ERROR,parent:h.type,details:s.a.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=s.a.BUFFER_FULL_ERROR:(r.appendError++,e.details=s.a.BUFFER_APPEND_ERROR,r.appendError>i.config.appendErrorMaxRetry&&(o.b.error("[buffer-controller]: Failed "+i.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),i.trigger(n.a.ERROR,e)}};a.append(T,d)},e.onBufferFlushing=function(t,e){var r=this,i=this.operationQueue,a=function(t){return{execute:r.removeExecutor.bind(r,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(n.a.BUFFER_FLUSHED,{type:t})},onError:function(e){o.b.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?i.append(a(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){i.append(a(t),t)}))},e.onFragParsed=function(t,e){var r=this,i=e.frag,a=e.part,s=[],l=a?a.elementaryStreams:i.elementaryStreams;l[u.a.AUDIOVIDEO]?s.push("audiovideo"):(l[u.a.AUDIO]&&s.push("audio"),l[u.a.VIDEO]&&s.push("video"));0===s.length&&o.b.warn("Fragments must have at least one ElementaryStreamType set. type: "+i.type+" level: "+i.level+" sn: "+i.sn),this.blockBuffers((function(){var t=self.performance.now();i.stats.buffering.end=t,a&&(a.stats.buffering.end=t);var e=a?a.stats:i.stats;r.hls.trigger(n.a.FRAG_BUFFERED,{frag:i,part:a,stats:e,id:i.type})}),s)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var r=this;this.getSourceBufferTypes().reduce((function(t,i){var a=r.sourceBuffer[i];return e.type&&e.type!==i||a&&!a.ended&&(a.ended=!0,o.b.log("[buffer-controller]: "+i+" sourceBuffer now EOS")),t&&!(a&&!a.ended)}),!0)&&this.blockBuffers((function(){var t=r.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var r=e.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,r=this.media,i=this.sourceBuffer;if(r&&null!==e){var s=this.getSourceBufferTypes();if(s.length){var o=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(a.a)(o)&&!(o<0)){var l=r.currentTime,u=e.levelTargetDuration,d=Math.max(o,u),h=Math.floor(l/u)*u-d;s.forEach((function(r){var a=i[r];if(a){var s=nt.getBuffered(a);s.length>0&&h>s.start(0)&&(t.trigger(n.a.BACK_BUFFER_REACHED,{bufferEnd:h}),e.live&&t.trigger(n.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),t.trigger(n.a.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:r}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,r=this.media,i=this.mediaSource,n=t.fragments[0].start+t.totalduration,s=r.duration,l=Object(a.a)(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(o.b.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(t)):(n>l&&n>s||!Object(a.a)(s))&&(o.b.log("[buffer-controller]: Updating Media Source duration to "+n.toFixed(3)),i.duration=n)}},e.updateSeekableRange=function(t){var e=this.mediaSource,r=t.fragments;if(r.length&&t.live&&null!=e&&e.setLiveSeekableRange){var i=Math.max(0,r[0].start),a=Math.max(i,i+t.totalduration);e.setLiveSeekableRange(i,a)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,r=this.pendingTracks,i=Object.keys(r).length;if(i&&!t||2===i){this.createSourceBuffers(r),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var i=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var u=l.levelCodec||l.codec,d=l.container+";codecs="+u;o.b.log("[buffer-controller]: creating sourceBuffer("+d+")");try{var h=e[a]=r.addSourceBuffer(d),f=a;this.addBufferListener(f,"updatestart",this._onSBUpdateStart),this.addBufferListener(f,"updateend",this._onSBUpdateEnd),this.addBufferListener(f,"error",this._onSBUpdateError),this.tracks[a]={buffer:h,codec:u,container:l.container,levelCodec:l.levelCodec,id:l.id},i++}catch(t){o.b.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:d})}}i&&this.hls.trigger(n.a.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){o.b.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(t);r&&r.onError(e)},e.removeExecutor=function(t,e,r){var i=this.media,n=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[t];if(!i||!n||!l)return o.b.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(t);var u=Object(a.a)(i.duration)?i.duration:1/0,d=Object(a.a)(n.duration)?n.duration:1/0,h=Math.max(0,e),f=Math.min(r,u,d);f>h?(o.b.log("[buffer-controller]: Removing ["+h+","+f+"] from the "+t+" SourceBuffer"),l.remove(h,f)):s.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,i=this.sourceBuffer[e];if(!i)return o.b.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(e);i.ended=!1,i.appendBuffer(t)},e.blockBuffers=function(t,e){var r=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return o.b.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var i=this.operationQueue,a=e.map((function(t){return i.appendBlocker(t)}));Promise.all(a).then((function(){t(),e.forEach((function(t){var e=r.sourceBuffer[t];e&&e.updating||i.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,r){var i=this.sourceBuffer[t];if(i){var a=r.bind(this,t);this.listeners[t].push({event:e,listener:a}),i.addEventListener(e,a)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}();function ne(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var se=function(){function t(t){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e,r,i,a=t.prototype;return a.setStreamController=function(t){this.streamController=t},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var t=this.hls;t.on(n.a.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.a.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var t=this.hls;t.off(n.a.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.a.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.a.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.a.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(e,r){t.isLevelAllowed(r.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(r.droppedLevel)},a.onMediaAttaching=function(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null},a.onManifestParsed=function(t,e){var r=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,r.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onBufferCodecs=function(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},a.getMaxLevel=function(e){var r=this,i=this.hls.levels;if(!i.length)return-1;var a=i.filter((function(i,a){return t.isLevelAllowed(a,r.restrictedLevels)&&a<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var r=t.getBoundingClientRect();e.width=r.width,e.height=r.height,e.width||e.height||(e.width=r.right-r.left||t.width||0,e.height=r.bottom-r.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,r){if(!t||!t.length)return-1;for(var i,a,n=t.length-1,s=0;s<t.length;s+=1){var o=t[s];if((o.width>=e||o.height>=r)&&(i=o,!(a=t[s+1])||i.width!==a.width||i.height!==a.height)){n=s;break}}return n},e=t,i=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&ne(e.prototype,r),i&&ne(e,i),t}(),oe=function(){function t(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(n.a.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(n.a.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var i=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=i,i&&"function"==typeof i.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,r){var i=performance.now();if(e){if(this.lastTime){var a=i-this.lastTime,s=r-this.lastDroppedFrames,l=e-this.lastDecodedFrames,u=1e3*s/a,d=this.hls;if(d.trigger(n.a.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:r}),u>0&&s>d.config.fpsDroppedMonitoringThreshold*l){var h=d.currentLevel;o.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===d.autoLevelCapping||d.autoLevelCapping>=h)&&(h-=1,d.trigger(n.a.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:d.currentLevel}),d.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}(),le=r(12),ue=/^age:\s*[\d.]+\s*$/m,de=function(){function t(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t?t.xhrSetup:null,this.stats=new le.a,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var a=this.xhrSetup;try{if(a)try{a(r,e.url)}catch(t){r.open("GET",e.url,!0),a(r,e.url)}r.readyState||r.open("GET",e.url,!0);var n=this.context.headers;if(n)for(var s in n)r.setRequestHeader(s,n[s])}catch(t){return void this.callbacks.onError({code:r.status,text:t.message},e,r)}e.rangeEnd&&r.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,r=this.stats;if(t&&e){var i=e.readyState,a=this.config;if(!r.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===i){e.onreadystatechange=null,e.onprogress=null;var n=e.status;if(n>=200&&n<300){var s,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===t.responseType?(s=e.response).byteLength:(s=e.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(r,t,s,e),!this.callbacks)return;var d={url:e.responseURL,data:s};this.callbacks.onSuccess(d,r,t,e)}else r.retry>=a.maxRetry||n>=400&&n<499?(o.b.error(n+" while loading "+t.url),this.callbacks.onError({code:n,text:e.statusText},t,e)):(o.b.warn(n+" while loading "+t.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},e.loadtimeout=function(){o.b.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&ue.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}(),he=r(16);function fe(t){var e="function"==typeof Map?new Map:void 0;return(fe=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return ce(t,arguments,pe(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ge(i,t)})(t)}function ce(t,e,r){return(ce=ve()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return r&&ge(a,r.prototype),a}).apply(null,arguments)}function ve(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ge(t,e){return(ge=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pe(t){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function me(){return(me=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}var ye=function(){function t(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||be,this.controller=new self.AbortController,this.stats=new le.a}var e=t.prototype;return e.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},e.abortInternal=function(){var t=this.response;t&&t.ok||(this.stats.aborted=!0,this.controller.abort())},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},e.load=function(t,e,r){var i=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var s=function(t,e){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(me({},t.headers))};t.rangeEnd&&r.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1));return r}(t,this.controller.signal),o=r.onProgress,l="arraybuffer"===t.responseType,u=l?"byteLength":"length";this.context=t,this.config=e,this.callbacks=r,this.request=this.fetchSetup(t,s),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),r.onTimeout(n,t,i.response)}),e.timeout),self.fetch(this.request).then((function(r){if(i.response=i.loader=r,!r.ok){var s=r.status,u=r.statusText;throw new Ee(u||"fetch, bad network response",s,r)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(r.headers.get("Content-Length")||"0"),o&&Object(a.a)(e.highWaterMark)?i.loadProgressively(r,n,t,e.highWaterMark,o):l?r.arrayBuffer():r.text()})).then((function(s){var l=i.response;self.clearTimeout(i.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=s[u];var d={url:l.url,data:s};o&&!Object(a.a)(e.highWaterMark)&&o(n,t,s,l),r.onSuccess(d,n,t,l)})).catch((function(e){if(self.clearTimeout(i.requestTimeout),!n.aborted){var a=e.code||0;r.onError({code:a,text:e.message},t,e.details)}}))},e.getCacheAge=function(){var t=null;if(this.response){var e=this.response.headers.get("age");t=e?parseFloat(e):null}return t},e.loadProgressively=function(t,e,r,i,a){void 0===i&&(i=0);var n=new he.a,s=t.body.getReader();return function o(){return s.read().then((function(s){if(s.done)return n.dataLength&&a(e,r,n.flush(),t),Promise.resolve(new ArrayBuffer(0));var l=s.value,u=l.length;return e.loaded+=u,u<i||n.dataLength?(n.push(l),n.dataLength>=i&&a(e,r,n.flush(),t)):a(e,r,l,t),o()})).catch((function(){return Promise.reject()}))}()},t}();function be(t,e){return new self.Request(t.url,e)}var Te,Ee=function(t){var e,r;function i(e,r,i){var a;return(a=t.call(this,e)||this).code=void 0,a.details=void 0,a.code=r,a.details=i,a}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,ge(e,r),i}(fe(Error)),Se=ye;!function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(Te||(Te={}));var Le="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Ae(){return(Ae=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function Re(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(r),!0).forEach((function(e){_e(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ke=De(De({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:de,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Zt,bufferController:ae,capLevelController:se,fpsController:oe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:Le,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},{cueHandler:te.a,enableCEA708Captions:!1,enableWebVTT:!1,enableIMSC1:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:void 0,subtitleTrackController:void 0,timelineController:void 0,audioStreamController:void 0,audioTrackController:void 0,emeController:void 0,cmcdController:void 0});function xe(t){var e=t.loader;e!==Se&&e!==de?(o.b.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}()&&(t.loader=Se,t.progressive=!0,t.enableSoftwareAES=!0,o.b.log("[config]: Progressive streaming enabled, using FetchLoader"))}function Ce(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var we=function(){function t(e){void 0===e&&(e={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Ht.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var r=this.config=function(t,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return Ae({},t,e)}(t.DefaultConfig,e);this.userConfig=e,Object(o.a)(r.debug),this._autoLevelCapping=-1,r.progressive&&xe(r);var i=r.abrController,a=r.bufferController,n=r.capLevelController,s=r.fpsController,l=this.abrController=new i(this),u=this.bufferController=new a(this),d=this.capLevelController=new n(this),h=new s(this),f=new x(this),c=new C(this),v=new P(this),g=this.levelController=new J(this),p=new tt(this),m=this.streamController=new qt(this,p);d.setStreamController(m),h.setStreamController(m);var y=[g,m];this.networkControllers=y;var b=[f,c,l,u,d,h,v,p];this.audioTrackController=this.createController(r.audioTrackController,null,y),this.createController(r.audioStreamController,p,y),this.subtitleTrackController=this.createController(r.subtitleTrackController,null,y),this.createController(r.subtitleStreamController,p,y),this.createController(r.timelineController,null,b),this.emeController=this.createController(r.emeController,null,b),this.cmcdController=this.createController(r.cmcdController,null,b),this.latencyController=this.createController(N,null,b),this.coreComponents=b}t.isSupported=function(){return function(){var t=Bt();if(!t)return!1;var e=Ut(),r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!i}()};var e,r,a,l=t.prototype;return l.createController=function(t,e,r){if(t){var i=e?new t(this,e):new t(this);return r&&r.push(i),i}return null},l.on=function(t,e,r){void 0===r&&(r=this),this._emitter.on(t,e,r)},l.once=function(t,e,r){void 0===r&&(r=this),this._emitter.once(t,e,r)},l.removeAllListeners=function(t){this._emitter.removeAllListeners(t)},l.off=function(t,e,r,i){void 0===r&&(r=this),this._emitter.off(t,e,r,i)},l.listeners=function(t){return this._emitter.listeners(t)},l.emit=function(t,e,r){return this._emitter.emit(t,e,r)},l.trigger=function(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(e){o.b.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.trigger(n.a.ERROR,{type:s.b.OTHER_ERROR,details:s.a.INTERNAL_EXCEPTION,fatal:!1,event:t,error:e})}return!1},l.listenerCount=function(t){return this._emitter.listenerCount(t)},l.destroy=function(){o.b.log("destroy"),this.trigger(n.a.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(t){return t.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(t){return t.destroy()})),this.coreComponents.length=0},l.attachMedia=function(t){o.b.log("attachMedia"),this._media=t,this.trigger(n.a.MEDIA_ATTACHING,{media:t})},l.detachMedia=function(){o.b.log("detachMedia"),this.trigger(n.a.MEDIA_DETACHING,void 0),this._media=null},l.loadSource=function(t){this.stopLoad();var e=this.media,r=this.url,a=this.url=i.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});o.b.log("loadSource:"+a),e&&r&&r!==a&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(n.a.MANIFEST_LOADING,{url:t})},l.startLoad=function(t){void 0===t&&(t=-1),o.b.log("startLoad("+t+")"),this.networkControllers.forEach((function(e){e.startLoad(t)}))},l.stopLoad=function(){o.b.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},l.swapAudioCodec=function(){o.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},l.recoverMediaError=function(){o.b.log("recoverMediaError");var t=this._media;this.detachMedia(),t&&this.attachMedia(t)},l.removeLevel=function(t,e){void 0===e&&(e=0),this.levelController.removeLevel(t,e)},e=t,a=[{key:"version",get:function(){return"1.1.5"}},{key:"Events",get:function(){return n.a}},{key:"ErrorTypes",get:function(){return s.b}},{key:"ErrorDetails",get:function(){return s.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:ke},set:function(e){t.defaultConfig=e}}],(r=[{key:"levels",get:function(){var t=this.levelController.levels;return t||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){o.b.log("set currentLevel:"+t),this.loadLevel=t,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){o.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){o.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){o.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){o.b.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(t){var e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){this._autoLevelCapping!==t&&(o.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t)}},{key:"bandwidthEstimate",get:function(){var t=this.abrController.bwEstimator;return t?t.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var t=this.levels,e=this.config.minAutoBitrate;if(!t)return 0;for(var r=t.length,i=0;i<r;i++)if(t[i].maxBitrate>e)return i;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay}
1334,set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&Ce(e.prototype,r),a&&Ce(e,a),t}();we.defaultConfig=void 0}]).default}));
1335//# sourceMappingURL=hls.light.min.js.map //https://cdnjs.com/libraries/hls.js/1.1.5

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.