(function(N){function Ta(p){var A=document.documentElement;A.exitFullscreen?A.exitFullscreen():A.mozCancelFullScreen?A.mozCancelFullScreen():A.webkitCancelFullScreen?A.webkitCancelFullScreen():document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.oRequestFullscreen?document.oCancelFullScreen():document.webkitExitFullscreen?
document.webkitExitFullscreen():(A=document.body,document.documentElement.style.cssText="",A.style.cssText="",p.style.cssText="",document.IsFullScreen=!1)}function Ia(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}function gb(p,A,t){var u=new Date;u.setTime(u.getTime()+t*24*60*60*1E3);t="expires="+u.toGMTString();document.cookie=p+"="+A+"; "+t}function Da(p,A,t){if(p){var u=parseInt(p.style.opacity)||1;u*=100;
A=parseInt(A/50);A===0&&(A=1);var H=u/A;H<5&&(H=5);var K=setInterval(function(){u>0?(u-=H,u<0&&(u=0),p.style.opacity=u/100):(clearInterval(K),typeof t=="function"&&t(p))},50);return K}return null}function Ua(p,A,t){if(p){var u=p.style.opacity;u*=100;A=parseInt(A/50);A===0&&(A=1);var H=(100-u)/A;H<5&&(H=5);var K=null;return K=setInterval(function(){u<100?(u+=H,u>100&&(u=100),p.style.opacity=u/100):(clearInterval(K),typeof t=="function"&&t(p))},50)}return null}function Va(p,A){if(!p)return!1;if(p==
A)return!0;var t=p.indexOf(A);if(t<0)return!1;if(t>0){if(p.charAt(t-1)==" "&&(p.length-t==A.length||p.charAt(t+A.length)==" "))return!0}else if(p.charAt(A.length)==" ")return!0;return!1}function Wa(p,A,t){var u=new XMLHttpRequest;u.onreadystatechange=function(){u.readyState===4&&(u.status>=200&&u.status<300||u.status===304?A(u.response):typeof t==="function"&&t(u))};u.open("GET",p,!0);u.send(null)}function hb(p){const A=function(K,z,M){for(var R=M.length,U=0;U<R;U++)K.setUint8(z+U,M.charCodeAt(U))};
var t=function(){var K=new ArrayBuffer(364);let z=new DataView(K);A(z,0,"RIFF");z.setUint32(4,204,!0);A(z,8,"WAVE");A(z,12,"fmt ");z.setUint32(16,16,!0);z.setUint16(20,1,!0);z.setUint16(22,1,!0);z.setUint32(24,16E3,!0);z.setUint32(28,32E3,!0);z.setUint16(32,4,!0);z.setUint16(34,16,!0);A(z,36,"data");z.setUint32(40,320,!0);let M=44;for(let R=0;R<160;R++)z.setInt16(M,15,!0),M+=2;K=new Uint8Array(K);return"data:audio/x-wav;base64,"+btoa(String.fromCharCode.apply(null,K))}(),u=new Audio(t),H=N.setTimeout(function(){H=
0;typeof p==="function"&&p(!1)},500);u.play().then(function(){H&&N.clearTimeout(H);u.pause();p(!0)}).catch(function(K){H&&N.clearTimeout(H);typeof p==="function"&&p(!1)})}async function ib(p){navigator.clipboard&&navigator.clipboard.write([new ClipboardItem({[p.type]:p})]).then(()=>{console.info("[setClipboard] clipboard suc")}).catch(A=>{console.error("[setClipboard] clipboard err",A)})}function jb(){var p=new Date,A=p.getMonth()+1;A<10&&(A="0"+A);var t=p.getDate();t<10&&(t="0"+t);var u=p.getHours();
u<10&&(u="0"+u);var H=p.getMinutes();H<10&&(H="0"+H);var K=p.getSeconds();K<10&&(K="0"+K);var z=p.getMilliseconds();z<10?z="00"+z:z<100&&(z="0"+z);return""+p.getFullYear()+A+t+u+H+K+z}function Xa(p){var A={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},t=function(z){z=z.split(":");if(z.length!==3)return 0;var M=parseInt(z[0],10)*3600,R=parseInt(z[1],10)*60,U=parseInt(z[2],10),S=z[2].indexOf(","),Y=0;S>0&&(Y=parseInt(z[2].substr(S+1))/1E3);return M+
R+U+Y};p=p.replace(/\r/g,"");p=p.split("\n");for(var u=0;u<p.length-2;){var H={},K=p[u].trim();if(K){H.id=parseInt(K);K=p[u+1].split(" --\x3e ");if(K.length!==2)break;H.from=t(K[0].trim());H.to=t(K[1].trim());H.location=2;H.content=p[u+2].trim();A.body.push(H);u+=3}else u++}return A}function Ka(p){var A={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},t=function(z){z=z.split(":");var M=0,R=0;if(z.length===3){M=parseInt(z[0],10)*3600;R=parseInt(z[1],
10)*60;var U=parseInt(z[2],10)}else if(z.length===2)R=parseInt(z[0],10)*60,U=parseInt(z[1],10);else if(z.length===1)U=parseInt(z[0],10);else return 0;var S=z.length-1,Y=z[S].indexOf("."),ba=0;Y>0&&(ba=parseInt(z[S].substr(Y+1))/1E3);return M+R+U+ba};p=p.replace(/\r/g,"");p=p.split("\n");if(p.length<2||p[0].substr(0,6)!=="WEBVTT"||p[1].trim().length!==0)return null;for(var u=2;u<=p.length-2;){var H={};if(!p[u].startsWith("NOTE")&&p[u].trim()!==""){var K=p[u].split(" --\x3e ");if(K.length!==2&&(K=p[u].trim(),
H.id=parseInt(K),u++,K=p[u].split(" --\x3e "),K.length!==2)){u++;continue}H.from=t(K[0].trim());H.to=t(K[1].trim());H.location=2;u++;H.content=p[u].trim();for(u++;u<p.length;){K=p[u].trim();if(!K)break;H.content+="<br/>"+K;u++}A.body.push(H)}u++}return A}function Ya(p){return!(!p.width()&&!p.height())&&p.css("display")!=="none"}function kb(p,A){var t="smilesFaces-view",u=Ha.path+"widgets/smiles/p",H=$$(p);if(!H.hasClass("disabled")){t=H.attr("data-viewid");if(!H.attr("data-viewinit")&&$$("#"+t).length<=
0){var K=H.closest(".zwp-barrage_form");p='<div id="'+t+'" style="position:absolute;display:none;z-index:1138;" class="zwp-smileview"><table border="0" cellspacing="0" cellpadding="0"><tr>';for(var z=1;z<=40;z++){var M="[sm-"+z+"]";p+='<td><img src="'+u+z+'.png" onclick="insertSmile(this,\''+M+"');\" /></td>";z%8==0&&(p+="</tr><tr>")}K.append(p+"</tr></table></div>");H.attr("data-viewinit","1");$$(document).click(function(){$$("#"+t).hide()});$$(N).on("resize",function(){var S=$$("#"+t);Ya(S)&&(H.offset(),
S.outerHeight(!1),H.outerWidth(!1),S.outerWidth(!1))})}var R=$$("#"+t);if(Ya(R))R.hide();else{H.offset();R[0].style.opacity=0;R[0].style.display="block";R.outerHeight(!1);H.outerWidth(!1);R.outerWidth(!1);u=H.parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");R.get(0).inputbox=u.get(0);R.css({bottom:"36px",right:"26px"}).show();var U=function(){var S=parseFloat(R[0].style.opacity);S<=1&&(S+=.1,S>1&&(S=1),R[0].style.opacity=S,setTimeout(U,50))};setTimeout(U,50)}if(A=A||N.event)A.preventDefault?
(A.preventDefault(),A.stopPropagation()):(N.event.cancelBubble=!0,N.event.returnValue=!1)}}function lb(p){var A=$$;p.find("a.barrage-tab-link").each(function(t){var u=A(this);t===0?u.html(P("danmuSendSettings","Send Settings")+'<i class="bottom-line"></i>'):t===1?u.html(P("danmuViewSettings","View Settings")+'<i class="bottom-line"></i>'):t===2&&u.html(P("danmuBlockSettings","Block Settings")+'<i class="bottom-line"></i>')});p.find(".set-label").each(function(){var t=A(this),u=t.text();u==="\u6587\u5b57\u989c\u8272"?
t.text(P("danmuTextColor","Text Color")):u==="\u6587\u5b57\u8fb9\u6846"?t.text(P("danmuTextBorder","Border")):u==="\u4e0d\u900f\u660e\u5ea6"?t.text(P("danmuOpacity","Opacity")):u==="\u6587\u5b57\u5927\u5c0f"?t.text(P("danmuFontSize","Font Size")):u==="\u6eda\u52a8\u901f\u5ea6"?t.text(P("danmuScrollSpeed","Scroll Speed")):u==="\u6392\u5217\u5bc6\u5ea6"&&t.text(P("danmuDensity","Density"))});p.find(".set-rol-left").each(function(){var t=A(this),u=t.text();u==="\u4e0d\u900f\u660e\u5ea6"?t.text(P("danmuOpacity",
"Opacity")):u==="\u6587\u5b57\u5927\u5c0f"?t.text(P("danmuFontSize","Font Size")):u==="\u6eda\u52a8\u901f\u5ea6"?t.text(P("danmuScrollSpeed","Scroll Speed")):u==="\u6392\u5217\u5bc6\u5ea6"&&t.text(P("danmuDensity","Density"))});p.find(".pb-title").each(function(){var t=A(this),u=t.text();u==="\u5e95\u90e8\u533a\u57df"?t.text(P("danmuBottomArea","Bottom Area")):u==="\u5f69\u8272\u6587\u5b57"?t.text(P("colorfulText","Color")):u==="\u56fe\u7247\u8868\u60c5"&&t.text(P("imageEmoji","Emoji"))});p.find("a.barrage-set-rest").each(function(){var t=
A(this);t.text()==="\u91cd\u7f6e"&&t.text(P("reset","Reset"))})}function mb(p,A){if(p.dragableWinInited)typeof p.zwpDragable==="object"&&("oldX"in p.zwpDragable&&(p.style.left=p.zwpDragable.oldX+"px"),"oldY"in p.zwpDragable&&(p.style.top=p.zwpDragable.oldY+"px"),"oldWidth"in p.zwpDragable&&(p.style.width=p.zwpDragable.oldWidth+"px"),"oldHeight"in p.zwpDragable&&(p.style.height=p.zwpDragable.oldHeight+"px"));else{var t='<div class="zwp-captionbar"><button class="closeBtn" title="'+(P("closeSmallWindow",
"Close small window")+'"><i class="xicon xicon-close"></i></button></div><div class="zwp-gripper-right"></div><div class="zwp-gripper-bottom"></div><div class="zwp-gripper-bottom-right"></div>');p.insertAdjacentHTML("beforeend",t);var u=function(U){U.stopPropagation();U.preventDefault();var S=parseInt(p.offsetLeft),Y=parseInt(p.offsetTop),ba=U.pageX,aa=U.pageY,fa=N.innerWidth-p.offsetWidth-20,oa=N.innerHeight-p.offsetHeight-20,ea=function(ha){var ta=S+ha.pageX-ba;ha=Y+ha.pageY-aa;ta<0&&(ta=0);ha<
0&&(ha=0);ta>fa&&(ta=fa);ha>oa&&(ha=oa);p.style.left=ta+"px";p.style.top=ha+"px";typeof p.zwpDragable==="object"&&(p.zwpDragable.oldX=ta,p.zwpDragable.oldY=ha)},da=function(ha){document.removeEventListener("mousemove",ea);document.removeEventListener("mouseup",da)};document.addEventListener("mousemove",ea);document.addEventListener("mouseup",da)};t=function(U){U.stopPropagation();U.preventDefault();var S=p.offsetWidth,Y=U.pageX,ba=function(fa){fa=S+fa.pageX-Y;fa<200&&(fa=200);p.style.width=fa+"px";
typeof p.zwpDragable==="object"&&(p.zwpDragable.oldWidth=fa)},aa=function(fa){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",aa)};var H=function(U){U.stopPropagation();U.preventDefault();var S=p.offsetHeight,Y=U.pageY,ba=function(fa){fa=S+fa.pageY-Y;fa<180&&(fa=180);p.style.height=fa+"px";typeof p.zwpDragable==="object"&&(p.zwpDragable.oldHeight=fa)},aa=function(fa){document.removeEventListener("mousemove",
ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",aa)},K=function(U){U.stopPropagation();U.preventDefault();var S=p.offsetWidth,Y=p.offsetHeight,ba=U.pageX,aa=U.pageY,fa=function(ea){var da=S+ea.pageX-ba;da<200&&(da=200);ea=Y+ea.pageY-aa;ea<180&&(ea=180);p.style.width=da+"px";p.style.height=ea+"px";typeof p.zwpDragable==="object"&&(p.zwpDragable.oldWidth=da,p.zwpDragable.oldHeight=ea)},oa=function(ea){document.removeEventListener("mousemove",
fa);document.removeEventListener("mouseup",oa)};document.addEventListener("mousemove",fa);document.addEventListener("mouseup",oa)};p.zwpDragable={};var z=p.querySelector(".zwp-captionbar");if(z){var M=z.querySelector(".closeBtn");if(M){var R=A||function(){};M.addEventListener("click",function(U){U.preventDefault();U.stopPropagation();R(p)})}z.addEventListener("mousedown",u);p.zwpDragable.doc_mousedown=u}A=p.querySelector(".zwp-gripper-right");u=p.querySelector(".zwp-gripper-bottom");z=p.querySelector(".zwp-gripper-bottom-right");
A&&(A.addEventListener("mousedown",t),p.zwpDragable.gripperR_mousedown=t);u&&(u.addEventListener("mousedown",H),p.zwpDragable.gripperB_mousedown=H);z&&(z.addEventListener("mousedown",K),p.zwpDragable.gripperBR_mousedown=K);p.dragableWinInited=!0}}(function(p){var A=!1,t=!1,u=0,H=2E3,K=0,z=document,M=p(N),R=[],U=N.requestAnimationFrame||N.webkitRequestAnimationFrame||N.mozRequestAnimationFrame||!1,S=N.cancelAnimationFrame||N.webkitCancelAnimationFrame||N.mozCancelAnimationFrame||!1;if(U)N.cancelAnimationFrame||
(S=function(V){});else{var Y=0;U=function(V,I){var w=(new Date).getTime(),e=Math.max(0,16-(w-Y));I=N.setTimeout(function(){V(w+e)},e);Y=w+e;return I};S=function(V){N.clearTimeout(V)}}var ba=N.MutationObserver||N.WebKitMutationObserver||!1,aa=Date.now||function(){return(new Date).getTime()},fa={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,
hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,rightdock:0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,
cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var V;(V=z.currentScript)||(V=z.getElementsByTagName("script"),V=V.length?V[V.length-1]:!1);V=V?V.src.split("?")[0]:"";return V.split("/").length>0?V.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,
scrollbarid:!1,scrollCLass:!1},oa=!1,ea=function(){if(oa)return oa;var V=z.createElement("DIV"),I=V.style,w=navigator.userAgent,e=navigator.platform,m={};m.haspointerlock="pointerLockElement"in z||"webkitPointerLockElement"in z||"mozPointerLockElement"in z;m.isopera="opera"in N;m.isopera12=m.isopera&&"getUserMedia"in navigator;m.isoperamini=Object.prototype.toString.call(N.operamini)==="[object OperaMini]";m.isie="all"in z&&"attachEvent"in V&&!m.isopera;m.isieold=m.isie&&!("msInterpolationMode"in
I);m.isie7=m.isie&&!m.isieold&&(!("documentMode"in z)||z.documentMode===7);m.isie8=m.isie&&"documentMode"in z&&z.documentMode===8;m.isie9=m.isie&&"performance"in N&&z.documentMode===9;m.isie10=m.isie&&"performance"in N&&z.documentMode===10;m.isie11="msRequestFullscreen"in V&&z.documentMode>=11;m.ismsedge="msCredentials"in N;m.ismozilla="MozAppearance"in I;m.iswebkit=!m.ismsedge&&"WebkitAppearance"in I;m.ischrome=m.iswebkit&&"chrome"in N;m.ischrome38=m.ischrome&&"touchAction"in I;m.ischrome22=!m.ischrome38&&
m.ischrome&&m.haspointerlock;m.ischrome26=!m.ischrome38&&m.ischrome&&"transition"in I;m.cantouch="ontouchstart"in z.documentElement||"ontouchstart"in N;m.hasw3ctouch=(N.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);m.hasmstouch=!m.hasw3ctouch&&(N.MSPointerEvent||!1);m.ismac=/^mac$/i.test(e);m.isios=m.cantouch&&/iphone|ipad|ipod/i.test(e);m.isios4=m.isios&&!("seal"in Object);m.isios7=m.isios&&"webkitHidden"in z;m.isios8=m.isios&&"hidden"in z;m.isios10=m.isios&&N.Proxy;
m.isandroid=/android/i.test(w);m.haseventlistener="addEventListener"in V;m.trstyle=!1;m.hastransform=!1;m.hastranslate3d=!1;m.transitionstyle=!1;m.hastransition=!1;m.transitionend=!1;m.trstyle="transform";m.hastransform="transform"in I||function(){for(var B=["msTransform","webkitTransform","MozTransform","OTransform"],q=0,F=B.length;q<F;q++)if(I[B[q]]!==void 0){m.trstyle=B[q];break}m.hastransform=!!m.trstyle}();m.hastransform&&(I[m.trstyle]="translate3d(1px,2px,3px)",m.hastranslate3d=/translate3d/.test(I[m.trstyle]));
m.transitionstyle="transition";m.prefixstyle="";m.transitionend="transitionend";m.hastransition="transition"in I||function(){m.transitionend=!1;for(var B="webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),q="-webkit- -ms- -moz- -o- -o -khtml-".split(" "),F="webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),b=0,E=B.length;b<E;b++)if(B[b]in I){m.transitionstyle=B[b];m.prefixstyle=q[b];m.transitionend=
F[b];break}m.ischrome26&&(m.prefixstyle=q[1]);m.hastransition=m.transitionstyle}();m.cursorgrabvalue=function(){var B=["grab","-webkit-grab","-moz-grab"];if(m.ischrome&&!m.ischrome38||m.isie)B=[];for(var q=0,F=B.length;q<F;q++){var b=B[q];I.cursor=b;if(I.cursor==b)return b}return"url("+(fa.scriptpath+"css/openhand.cur),n-resize")}();m.hasmousecapture="setCapture"in V;m.hasMutationObserver=ba!==!1;V=null;return oa=m},da=function(V,I){function w(){var n=b.doc.css(D.trstyle);return n&&n.substr(0,6)==
"matrix"?n.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function e(){var n=b.win;if("zIndex"in n)return n.zIndex();for(;n.length>0&&n[0].nodeType!=9;){var y=n.css("zIndex");if(!isNaN(y)&&y!==0)return parseInt(y);n=n.parent()}return!1}function m(n,y,x){y=n.css(y);n=parseFloat(y);return isNaN(n)?(n=ma[y]||0,x=n==3?x?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&n&&(n+=1),x?n:0):n}function B(n,y,x,h){b._bind(n,y,function(c){c=c||N.event;var d=
{original:c,target:c.target||c.srcElement,type:"wheel",deltaMode:c.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){c.preventDefault?c.preventDefault():c.returnValue=!1;return!1},stopImmediatePropagation:function(){c.stopImmediatePropagation?c.stopImmediatePropagation():c.cancelBubble=!0}};y=="mousewheel"?(c.wheelDeltaX&&(d.deltaX=-.025*c.wheelDeltaX),c.wheelDeltaY&&(d.deltaY=-.025*c.wheelDeltaY),d.deltaY||d.deltaX||(d.deltaY=-.025*c.wheelDelta)):d.deltaY=c.detail;return x.call(n,
d)},h)}function q(n,y,x,h){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),pa=aa());var c=aa()-pa;pa=aa();Aa=c>350?1:Aa+(2-Aa)/10;n=n*Aa|0;y=y*Aa|0;if(n){if(h)if(n<0){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(b.getScrollLeft()<=0)return!0;h=n>0?1:-1;ia!==h&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),ia=h);b.lastdeltax-=n}if(y){if(function(){var d=b.getScrollTop();if(y<0){if(d>=b.page.maxh)return!0}else if(d<=0)return!0}()){if(v.nativeparentscrolling&&
x&&!b.ispage&&!b.zoomactive)return!0;x=b.view.h>>1;b.newscrolly<-x?(b.newscrolly=-x,y=-1):b.newscrolly>b.page.maxh+x?(b.newscrolly=b.page.maxh+x,y=1):y=0}x=y>0?1:-1;ka!==x&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),ka=x);b.lastdeltay-=y}(y||n)&&b.synched("relativexy",function(){var d=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var f=b.lastdeltax+b.newscrollx;b.lastdeltax=0;b.rail.drag||b.doScrollPos(f,d)})}function F(n,y,x){if(!x&&ya)return!0;if(n.deltaMode===0){var h=-(v.mousescrollstep/
54*n.deltaX)|0;var c=-(v.mousescrollstep/54*n.deltaY)|0}else n.deltaMode===1&&(h=-(n.deltaX*v.mousescrollstep*50/80)|0,c=-(n.deltaY*v.mousescrollstep*50/80)|0);y&&v.oneaxismousemode&&h===0&&c&&(h=c,c=0,x&&(h<0?b.getScrollLeft()>=b.page.maxw:b.getScrollLeft()<=0)&&(c=h,h=0));b.isrtlmode&&(h=-h);if(q(h,c,x,!0))x&&(ya=!0);else return ya=!1,n.stopImmediatePropagation(),n.preventDefault()}var b=this;this.version="3.7.6";this.name="nicescroll";this.me=I;var E=p("body"),v=this.opt={doc:E,win:!1};p.extend(v,
fa);v.snapbackspeed=80;if(V)for(var Z in v)V[Z]!==void 0&&(v[Z]=V[Z]);v.disablemutationobserver&&(ba=!1);this.iddoc=(this.doc=v.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(v.win?v.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=v.win!==!1;this.win=v.win||(this.ispage?M:this.doc);this.docscroll=this.ispage&&!this.haswrapper?M:this.win;this.body=E;this.iframe=this.isfixed=this.viewport=!1;this.isiframe=this.doc[0].nodeName=="IFRAME"&&this.win[0].nodeName=="IFRAME";this.istextarea=
this.win[0].nodeName=="TEXTAREA";this.forcescreen=!1;this.canshowonmouseevent=v.autohidemode!="scroll";this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;v.rtlmode=="auto"?(V=this.win[0]==N?this.body:this.win,I=V.css("writing-mode")||V.css("-webkit-writing-mode")||
V.css("-ms-writing-mode")||V.css("-moz-writing-mode"),I=="horizontal-tb"||I=="lr-tb"||I===""?(this.isrtlmode=V.css("direction")=="rtl",this.isvertical=!1):(this.isrtlmode=I=="vertical-rl"||I=="tb"||I=="tb-rl"||I=="rl-tb",this.isvertical=I=="vertical-rl"||I=="tb"||I=="tb-rl")):(this.isrtlmode=v.rtlmode===!0,this.isvertical=!1);this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;if(v.scrollbarid!==!1)this.id=v.scrollbarid;else{do this.id="ascrail"+H++;while(z.getElementById(this.id))
}this.hidden=this.locked=this.railslocked=this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=v.overflowx;this.overflowy=v.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=ea();var D=p.extend({},this.detected);this.ishwscroll=(this.canhwscroll=D.hastransform&&
v.hwacceleration)&&b.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?!(D.iswebkit||D.isie||D.isie11):!(D.iswebkit||D.isie&&!D.isie10&&!D.isie11):!1;this.istouchcapable=!1;D.cantouch||!D.hasw3ctouch&&!D.hasmstouch?!D.cantouch||D.isios||D.isandroid||!D.iswebkit&&!D.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;v.enablemouselockapi||(D.hasmousecapture=!1,D.haspointerlock=!1);this.debounced=function(n,y,x){b&&(b.delaylist[n]||(b.delaylist[n]={h:U(function(){b.delaylist[n].fn.call(b);
b.delaylist[n]=!1},x)},y.call(b)),b.delaylist[n].fn=y)};this.synched=function(n,y){b.synclist[n]?b.synclist[n]=y:(b.synclist[n]=y,U(function(){b&&(b.synclist[n]&&b.synclist[n].call(b),b.synclist[n]=null)}))};this.unsynched=function(n){b.synclist[n]&&(b.synclist[n]=!1)};this.css=function(n,y){for(var x in y)b.saved.css.push([n,x,n.css(x)]),n.css(x,y[x])};this.scrollTop=function(n){return n===void 0?b.getScrollTop():b.setScrollTop(n)};this.scrollLeft=function(n){return n===void 0?b.getScrollLeft():
b.setScrollLeft(n)};var X=function(n,y,x,h,c,d,f){this.st=n;this.ed=y;this.spd=x;this.p1=h||0;this.p2=c||1;this.p3=d||0;this.p4=f||1;this.ts=aa();this.df=y-n};X.prototype={B2:function(n){return 3*(1-n)*(1-n)*n},B3:function(n){return 3*(1-n)*n*n},B4:function(n){return n*n*n},getPos:function(){return(aa()-this.ts)/this.spd},getNow:function(){var n=(aa()-this.ts)/this.spd,y=this.B2(n)+this.B3(n)+this.B4(n);return n>=1?this.ed:this.st+this.df*y|0},update:function(n,y){this.st=this.getNow();this.ed=n;
this.spd=y;this.ts=aa();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};D.hastranslate3d&&D.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(n){if(!n){if(n=w())return n.length==16?-n[13]:-n[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(n){if(!n){if(n=w())return n.length==16?-n[12]:-n[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};
this.notifyScrollEvent=function(n){var y=z.createEvent("UIEvents");y.initUIEvent("scroll",!1,!1,N,1);y.niceevent=!0;n.dispatchEvent(y)};var ja=this.isrtlmode?1:-1;D.hastranslate3d&&v.enabletranslate3d?(this.setScrollTop=function(n,y){b.doc.translate.y=n;b.doc.translate.ty=n*-1+"px";b.doc.css(D.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");y||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(n,y){b.doc.translate.x=n;b.doc.translate.tx=n*ja+"px";b.doc.css(D.trstyle,
"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");y||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(n,y){b.doc.translate.y=n;b.doc.translate.ty=n*-1+"px";b.doc.css(D.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");y||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(n,y){b.doc.translate.x=n;b.doc.translate.tx=n*ja+"px";b.doc.css(D.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");y||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=
function(){return b.docscroll.scrollTop()},this.setScrollTop=function(n){b.docscroll.scrollTop(n)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(n){return setTimeout(function(){if(b)return b.hasreversehr&&(n=b.detected.ismozilla?-(b.page.maxw-n):b.page.maxw-n),b.docscroll.scrollLeft(n)},1)};this.getTarget=function(n){return n?n.target?
n.target:n.srcElement?n.srcElement:!1:!1};this.hasParent=function(n,y){if(!n)return!1;for(n=n.target||n.srcElement||n||!1;n&&n.id!=y;)n=n.parentNode||!1;return n!==!1};var ma={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:N.pageYOffset||z.documentElement.scrollTop,left:N.pageXOffset||z.documentElement.scrollLeft}};this.getOffset=function(){if(b.isfixed){var n=b.win.offset(),y=b.getDocumentScrollOffset();n.top-=y.top;n.left-=y.left;return n}n=b.win.offset();if(!b.viewport)return n;
y=b.viewport.offset();return{top:n.top-y.top,left:n.left-y.left}};this.updateScrollBar=function(n){var y;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(v.railpadding.top+v.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(v.railpadding.left+v.railpadding.right)});else{var x=b.getOffset();var h=x.top;var c=x.left-(v.railpadding.left+v.railpadding.right);h+=m(b.win,"border-top-width",!0);c+=b.rail.align?b.win.outerWidth()-m(b.win,"border-right-width")-b.rail.width:m(b.win,
"border-left-width");if(y=v.railoffset)y.top&&(h+=y.top),y.left&&(c+=y.left);n=(n?n.h:b.win.innerHeight())-(v.railpadding.top+v.railpadding.bottom);y="left";var d=c;typeof v.rightdock==="number"&&(y="right",d=v.rightdock);b.railslocked||b.rail.css({top:h,[y]:d,height:n});b.zoom&&b.zoom.css({top:h+1,left:b.rail.align==1?c-20:c+b.rail.width+4});if(b.railh&&!b.railslocked){h=x.top;c=x.left;if(y=v.railhoffset)y.top&&(h+=y.top),y.left&&(c+=y.left);h=b.railh.align?h+m(b.win,"border-top-width",!0)+b.win.innerHeight()-
b.railh.height:h+m(b.win,"border-top-width",!0);c+=m(b.win,"border-left-width");b.railh.css({top:h-(v.railpadding.top+v.railpadding.bottom),left:c,width:b.railh.width})}}};this.doRailClick=function(n,y,x){if(!b.railslocked)if(b.cancelEvent(n),"pageY"in n||(n.pageX=n.clientX+z.documentElement.scrollLeft,n.pageY=n.clientY+z.documentElement.scrollTop),y){y=x?b.doScrollLeft:b.doScrollTop;var h=x?(n.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(n.pageY-b.rail.offset().top-b.cursorheight/
2)*b.scrollratio.y;b.unsynched("relativexy");y(h|0)}else y=x?b.doScrollLeftBy:b.doScrollBy,h=x?b.scroll.x:b.scroll.y,n=x?n.pageX-b.railh.offset().left:n.pageY-b.rail.offset().top,x=x?b.view.w:b.view.h,y(h>=n?x:-x)};b.newscrolly=b.newscrollx=0;b.hasanimationframe="requestAnimationFrame"in N;b.hascancelanimationframe="cancelAnimationFrame"in N;b.hasborderbox=!1;this.init=function(){b.saved.css=[];if(D.isoperamini||D.isandroid&&!("hidden"in z))return!0;v.emulatetouch=v.emulatetouch||v.touchbehavior;
b.hasborderbox=N.getComputedStyle&&N.getComputedStyle(z.body)["box-sizing"]==="border-box";var n={"overflow-y":"hidden"};if(D.isie11||D.isie10)n["-ms-overflow-style"]="none";b.ishwscroll&&(this.doc.css(D.transitionstyle,D.prefixstyle+"transform 0ms ease-out"),D.transitionend&&b.bind(b.doc,D.transitionend,b.onScrollTransitionEnd,!1));b.zindex="auto";b.zindex=b.ispage||v.zindex!="auto"?v.zindex:e()||"auto";!b.ispage&&b.zindex!="auto"&&b.zindex>K&&(K=b.zindex);b.isie&&b.zindex===0&&v.zindex=="auto"&&
(b.zindex="auto");if(!b.ispage||!D.isieold){var y=b.docscroll;b.ispage&&(y=b.haswrapper?b.win:b.doc);b.css(y,n);b.ispage&&(D.isie11||D.isie)&&b.css(p("html"),n);!D.isios||b.ispage||b.haswrapper||b.css(E,{"-webkit-overflow-scrolling":"touch"});var x=p(z.createElement("div"));x.css({position:"relative",top:0,"float":"right",width:v.cursorwidth,height:0,"background-color":v.cursorcolor,border:v.cursorborder,"background-clip":"padding-box","-webkit-border-radius":v.cursorborderradius,"-moz-border-radius":v.cursorborderradius,
"border-radius":v.cursorborderradius});x.addClass("nicescroll-cursors");b.cursor=x;var h=p(z.createElement("div"));h.attr("id",b.id);h.addClass("nicescroll-rails nicescroll-rails-vr");v.scrollCLass&&h.addClass(v.scrollCLass);var c,d=["left","right","top","bottom"],f;for(f in d){var l=d[f];(c=v.railpadding[l]||0)&&h.css("padding-"+l,c+"px")}h.append(x);h.width=Math.max(parseFloat(v.cursorwidth),x.outerWidth());h.css({width:h.width+"px",zIndex:b.zindex,background:v.background,cursor:"default"});h.visibility=
!0;h.scrollable=!0;h.align=v.railalign=="left"?0:1;b.rail=h;x=b.rail.drag=!1;!v.boxzoom||b.ispage||D.isieold||(x=z.createElement("div"),b.bind(x,"click",b.doZoom),b.bind(x,"mouseenter",function(){b.zoom.css("opacity",v.cursoropacitymax)}),b.bind(x,"mouseleave",function(){b.zoom.css("opacity",v.cursoropacitymin)}),b.zoom=p(x),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+v.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),v.dblclickzoom&&b.bind(b.win,"dblclick",
b.doZoom),D.cantouch&&v.gesturezoom&&(b.ongesturezoom=function(C){C.scale>1.5&&b.doZoomIn(C);C.scale<.8&&b.doZoomOut(C);return b.cancelEvent(C)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(v.horizrailenabled){b.css(y,{overflowX:"hidden"});x=p(z.createElement("div"));x.css({position:"absolute",top:0,height:v.cursorwidth,width:0,backgroundColor:v.cursorcolor,border:v.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":v.cursorborderradius,"-moz-border-radius":v.cursorborderradius,
"border-radius":v.cursorborderradius});D.isieold&&x.css("overflow","hidden");x.addClass("nicescroll-cursors");b.cursorh=x;var r=p(z.createElement("div"));r.attr("id",b.id+"-hr");r.addClass("nicescroll-rails nicescroll-rails-hr");v.scrollCLass&&r.addClass(v.scrollCLass);r.height=Math.max(parseFloat(v.cursorwidth),x.outerHeight());r.css({height:r.height+"px",zIndex:b.zindex,background:v.background});r.append(x);r.visibility=!0;r.scrollable=!0;r.align=v.railvalign=="top"?0:1;b.railh=r;b.railh.drag=!1}b.ispage?
(h.css({position:"fixed",top:0,height:"100%"}),h.css(h.align?{right:0}:{left:0}),b.body.append(h),b.railh&&(r.css({position:"fixed",left:0,width:"100%"}),r.css(r.align?{bottom:0}:{top:0}),b.body.append(r))):(b.ishwscroll?(b.win.css("position")=="static"&&b.css(b.win,{position:"relative"}),y=b.win[0].nodeName=="HTML"?b.body:b.win,p(y).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":h.width+4}),y.append(b.zoom)),h.css({position:"absolute",top:0}),h.css(h.align?
{right:0}:{left:0}),y.append(h),r&&(r.css({position:"absolute",left:0,bottom:0}),r.css(r.align?{bottom:0}:{top:0}),y.append(r))):(b.isfixed=b.win.css("position")=="fixed",y=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),h.css({position:y}),b.zoom&&b.zoom.css({position:y}),b.updateScrollBar(),b.body.append(h),b.zoom&&b.body.append(b.zoom),b.railh&&
(r.css({position:y}),b.body.append(r))),D.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),v.disableoutline&&(D.isie&&b.win.attr("hideFocus","true"),D.iswebkit&&b.win.css("outline","none")));v.autohidemode===!1?(b.autohidedom=!1,b.rail.css({opacity:v.cursoropacitymax}),b.railh&&b.railh.css({opacity:v.cursoropacitymax})):v.autohidemode===!0||v.autohidemode==="leave"?(b.autohidedom=p().add(b.rail),D.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),
b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&D.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):v.autohidemode=="scroll"?(b.autohidedom=p().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):v.autohidemode=="cursor"?(b.autohidedom=p().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):v.autohidemode=="hidden"&&(b.autohidedom=!1,b.hide(),b.railslocked=!1);if(D.cantouch||b.istouchcapable||v.emulatetouch||D.hasmstouch){b.scrollmom=new ha(b);b.ontouchstart=
function(C){if(b.locked||C.pointerType&&(C.pointerType==="mouse"||C.pointerType===C.MSPOINTER_TYPE_MOUSE))return!1;b.hasmoving=!1;b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop());if(!b.railslocked){var W=b.getTarget(C);if(W&&/INPUT/i.test(W.nodeName)&&/range/i.test(W.type))return b.stopPropagation(C);var ra=C.type==="mousedown";!("clientX"in C)&&"changedTouches"in C&&(C.clientX=C.changedTouches[0].clientX,C.clientY=C.changedTouches[0].clientY);if(b.forcescreen){var na=C;C={original:C.original?
C.original:C};C.clientX=na.screenX;C.clientY=na.screenY}b.rail.drag={x:C.clientX,y:C.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:W};if(b.ispage||!v.directionlockdeadzone)b.rail.drag.dl="f";else{na=M.width();var wa=M.height(),Ba=b.getContentSize();wa=Ba.h-wa;na=Ba.w-na;b.rail.drag.ck=b.rail.scrollable&&!b.railh.scrollable?wa>0?"v":!1:!b.rail.scrollable&&b.railh.scrollable?na>0?"h":!1:!1}v.emulatetouch&&b.isiframe&&D.isie&&(na=b.win.position(),b.rail.drag.x+=
na.left,b.rail.drag.y+=na.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(C.clientX,C.clientY);if(W&&ra){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(W.nodeName))return D.hasmousecapture&&W.setCapture(),v.emulatetouch?(W.onclick&&!W._onclick&&(W._onclick=W.onclick,W.onclick=function(xa){if(b.hasmoving)return!1;W._onclick.call(this,xa)}),b.cancelEvent(C)):b.stopPropagation(C);/SUBMIT|CANCEL|BUTTON/i.test(p(W).attr("type"))&&(b.preventclick={tg:W,click:!1})}}};b.ontouchend=function(C){if(!b||!b.rail.drag)return!0;
if(b.rail.drag.pt==2){if(C.pointerType&&(C.pointerType==="mouse"||C.pointerType===C.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var W=C.type==="mouseup";if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),D.hasmousecapture&&z.releaseCapture(),W))return b.cancelEvent(C)}else if(b.rail.drag.pt==1)return b.onmouseup(C)};var G=v.emulatetouch&&b.isiframe&&!D.hasmousecapture,J=v.directionlockdeadzone*.3|0;b.ontouchmove=function(C,W){if(!b||!b.rail.drag||C.targetTouches&&v.preventmultitouchscrolling&&
C.targetTouches.length>1||C.pointerType&&(C.pointerType==="mouse"||C.pointerType===C.MSPOINTER_TYPE_MOUSE))return!0;if(b.rail.drag.pt==2){"changedTouches"in C&&(C.clientX=C.changedTouches[0].clientX,C.clientY=C.changedTouches[0].clientY);var ra;var na=ra=0;G&&!W&&(W=b.win.position(),na=-W.left,ra=-W.top);var wa=C.clientY+ra;W=wa-b.rail.drag.y;var Ba=C.clientX+na;ra=Ba-b.rail.drag.x;var xa=b.rail.drag.st-W;if(b.ishwscroll&&v.bouncescroll)xa<0?xa=Math.round(xa/2):xa>b.page.maxh&&(xa=b.page.maxh+Math.round((xa-
b.page.maxh)/2));else if(xa<0?wa=xa=0:xa>b.page.maxh&&(xa=b.page.maxh,wa=0),wa===0&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var sa=b.getScrollLeft();b.railh&&b.railh.scrollable&&(sa=b.isrtlmode?ra-b.rail.drag.sl:b.rail.drag.sl-ra,b.ishwscroll&&v.bouncescroll?sa<0?sa=Math.round(sa/2):sa>b.page.maxw&&(sa=b.page.maxw+Math.round((sa-b.page.maxw)/2)):(sa<0&&(Ba=sa=0),sa>b.page.maxw&&(sa=b.page.maxw,Ba=0)));if(!b.hasmoving){if(b.rail.drag.y===C.clientY&&b.rail.drag.x===C.clientX)return b.cancelEvent(C);
na=Math.abs(W);W=Math.abs(ra);ra=v.directionlockdeadzone;b.rail.drag.ck?b.rail.drag.ck=="v"?W>ra&&na<=J?b.rail.drag=!1:na>ra&&(b.rail.drag.dl="v"):b.rail.drag.ck=="h"&&(na>ra&&W<=J?b.rail.drag=!1:W>ra&&(b.rail.drag.dl="h")):na>ra&&W>ra?b.rail.drag.dl="f":na>ra?b.rail.drag.dl=W>J?"f":"v":W>ra&&(b.rail.drag.dl=na>J?"f":"h");if(!b.rail.drag.dl)return b.cancelEvent(C);b.triggerScrollStart(C.clientX,C.clientY,0,0,0);b.hasmoving=!0}b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||
!1,b.preventclick.tg.onclick=b.onpreventclick);b.rail.drag.dl&&(b.rail.drag.dl=="v"?sa=b.rail.drag.sl:b.rail.drag.dl=="h"&&(xa=b.rail.drag.st));b.synched("touchmove",function(){b.rail.drag&&b.rail.drag.pt==2&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(xa),b.scrollmom.update(Ba,wa),b.railh&&b.railh.scrollable?(b.setScrollLeft(sa),b.showCursor(xa,sa)):b.showCursor(xa),D.isie10&&z.selection.clear())});return b.cancelEvent(C)}if(b.rail.drag.pt==1)return b.onmousemove(C)};
b.ontouchstartCursor=function(C,W){if(!b.rail.drag||b.rail.drag.pt==3){if(b.locked)return b.cancelEvent(C);b.cancelScroll();b.rail.drag={x:C.touches[0].clientX,y:C.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!W};W=b.getTarget(C);!b.ispage&&D.hasmousecapture&&W.setCapture();b.isiframe&&!D.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(C)}};b.ontouchendCursor=function(C){if(b.rail.drag&&(D.hasmousecapture&&
z.releaseCapture(),b.isiframe&&!D.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag.pt==3))return b.rail.drag=!1,b.cancelEvent(C)};b.ontouchmoveCursor=function(C){if(b.rail.drag&&b.rail.drag.pt==3){b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(C.touches[0].clientX-b.rail.drag.x);b.scroll.x<0&&(b.scroll.x=0);var W=b.scrollvaluemaxw;b.scroll.x>W&&(b.scroll.x=W)}else b.scroll.y=b.rail.drag.sy+(C.touches[0].clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=
0),W=b.scrollvaluemax,b.scroll.y>W&&(b.scroll.y=W);b.synched("touchmove",function(){b.rail.drag&&b.rail.drag.pt==3&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),v.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),v.cursordragspeed))});return b.cancelEvent(C)}}}b.onmousedown=function(C,W){if(!b.rail.drag||b.rail.drag.pt==1){if(b.railslocked)return b.cancelEvent(C);b.cancelScroll();b.rail.drag={x:C.clientX,y:C.clientY,sx:b.scroll.x,sy:b.scroll.y,
pt:1,hr:W||!1};W=b.getTarget(C);D.hasmousecapture&&W.setCapture();b.isiframe&&!D.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));b.hasmoving=!1;return b.cancelEvent(C)}};b.onmouseup=function(C){if(b.rail.drag){if(b.rail.drag.pt!=1)return!0;D.hasmousecapture&&z.releaseCapture();b.isiframe&&!D.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents);b.rail.drag=!1;b.cursorfreezed=!1;b.hasmoving&&b.triggerScrollEnd();return b.cancelEvent(C)}};
b.onmousemove=function(C){if(b.rail.drag){if(b.rail.drag.pt===1){if(D.ischrome&&C.which===0)return b.onmouseup(C);b.cursorfreezed=!0;b.hasmoving||b.triggerScrollStart(C.clientX,C.clientY,0,0,0);b.hasmoving=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(C.clientX-b.rail.drag.x);b.scroll.x<0&&(b.scroll.x=0);var W=b.scrollvaluemaxw;b.scroll.x>W&&(b.scroll.x=W)}else b.scroll.y=b.rail.drag.sy+(C.clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0),W=b.scrollvaluemax,b.scroll.y>W&&(b.scroll.y=W);b.synched("mousemove",
function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});return b.cancelEvent(C)}}else b.checkarea=0};if(D.cantouch||v.emulatetouch)b.onpreventclick=function(C){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(C)},b.onclick=D.isios?!1:function(C){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(C)):!0},v.grabcursorenabled&&D.cursorgrabvalue&&
(b.css(b.ispage?b.doc:b.win,{cursor:D.cursorgrabvalue}),b.css(b.rail,{cursor:D.cursorgrabvalue}));else{var Q=function(C){if(b.selectiondrag){if(C){var W=b.win.outerHeight();C=C.pageY-b.selectiondrag.top;C>0&&C<W&&(C=0);C>=W&&(C-=W);b.selectiondrag.df=C}b.selectiondrag.df!==0&&(b.doScrollBy(-(b.selectiondrag.df*2/6)|0),b.debounced("doselectionscroll",function(){Q()},50))}};b.hasTextSelected="getSelection"in z?function(){return z.getSelection().rangeCount>0}:"selection"in z?function(){return z.selection.type!=
"None"}:function(){return!1};b.onselectionstart=function(C){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(C){b.selectiondrag=!1};b.onselectiondrag=function(C){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){Q(C)},250)}}D.hasw3ctouch?(b.css(b.ispage?p("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(z,"pointerup",b.ontouchend),
b.delegate(z,"pointermove",b.ontouchmove)):D.hasmstouch?(b.css(b.ispage?p("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(z,"MSPointerUp",b.ontouchend),b.delegate(z,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(C){C.preventDefault()}),b.bind(b.cursor,"contextmenu",function(C){C.preventDefault()})):D.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,
!1,!0),b.bind(z,"touchend",b.ontouchend,!1,!0),b.bind(z,"touchcancel",b.ontouchend,!1,!0),b.delegate(z,"touchmove",b.ontouchmove,!1,!0));v.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(z,"mouseup",b.ontouchend,!1,!0),b.bind(z,"mousemove",b.ontouchmove,!1,!0));if(v.cursordragontouch||!D.cantouch&&!v.emulatetouch)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&
b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),v.sensitiverail&&(b.bind(b.rail,"click",function(C){b.doRailClick(C,!1,!1)}),b.bind(b.rail,"dblclick",function(C){b.doRailClick(C,!0,!1)}),b.bind(b.cursor,"click",function(C){b.cancelEvent(C)}),b.bind(b.cursor,"dblclick",function(C){b.cancelEvent(C)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();
b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),v.sensitiverail&&(b.bind(b.railh,"click",function(C){b.doRailClick(C,!1,!0)}),b.bind(b.railh,"dblclick",function(C){b.doRailClick(C,!0,!0)}),b.bind(b.cursorh,"click",function(C){b.cancelEvent(C)}),b.bind(b.cursorh,"dblclick",function(C){b.cancelEvent(C)})));v.cursordragontouch&&(this.istouchcapable||D.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",
b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(C){b.ontouchstartCursor(C,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor));v.emulatetouch||D.isandroid||D.isios?(b.bind(D.hasmousecapture?b.win:z,"mouseup",b.ontouchend),b.onclick&&b.bind(z,"click",b.onclick),v.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),
b.cursorh&&b.bind(b.cursorh,"mousedown",function(C){b.onmousedown(C,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(C){C.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(C){C.preventDefault()}))):(b.bind(D.hasmousecapture?b.win:z,"mouseup",b.onmouseup),b.bind(z,"mousemove",b.onmousemove),b.onclick&&b.bind(z,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",
function(C){b.onmousedown(C,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&v.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(z,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(z,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;
b.rail.drag||b.hideCursor()})));v.enablemousewheel&&(b.isiframe||b.mousewheel(D.isie&&b.ispage?z:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr));b.ispage||D.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++u}),b.bind(b.win,"focus",function(C){A=b.getTarget(C).id||b.getTarget(C)||!1;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(C){A=!1;b.hasfocus=!1}),b.bind(b.win,
"mouseenter",function(C){t=b.getTarget(C).id||b.getTarget(C)||!1;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(C){t=!1;b.hasmousefocus=!1;b.rail.drag||b.hideCursor()}));b.onkeypress=function(C){if(b.railslocked&&b.page.maxh===0)return!0;C=C||N.event;var W=b.getTarget(C);if(W&&/INPUT|TEXTAREA|SELECT|OPTION/.test(W.nodeName)&&(!W.getAttribute("type")&&!W.type||!/submit|button|cancel/i.tp)||p(W).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&
!A||b.ispage&&!A&&!t){W=C.keyCode;if(b.railslocked&&W!=27)return b.cancelEvent(C);var ra=C.ctrlKey||!1,na=C.shiftKey||!1,wa=!1;switch(W){case 38:case 63233:b.doScrollBy(72);wa=!0;break;case 40:case 63235:b.doScrollBy(-72);wa=!0;break;case 37:case 63232:b.railh&&(ra?b.doScrollLeft(0):b.doScrollLeftBy(72),wa=!0);break;case 39:case 63234:b.railh&&(ra?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),wa=!0);break;case 33:case 63276:b.doScrollBy(b.view.h);wa=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);
wa=!0;break;case 36:case 63273:b.railh&&ra?b.doScrollPos(0,0):b.doScrollTo(0);wa=!0;break;case 35:case 63275:b.railh&&ra?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);wa=!0;break;case 32:v.spacebarenabled&&(na?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),wa=!0);break;case 27:b.zoomactive&&(b.doZoom(),wa=!0)}if(wa)return b.cancelEvent(C)}};v.enablekeyboard&&b.bind(z,D.isopera&&!D.isopera12?"keypress":"keydown",b.onkeypress);b.bind(z,"keydown",function(C){C.ctrlKey&&(b.wheelprevented=
!0)});b.bind(z,"keyup",function(C){C.ctrlKey||(b.wheelprevented=!1)});b.bind(N,"blur",function(C){b.wheelprevented=!1});b.bind(N,"resize",b.onscreenresize);b.bind(N,"orientationchange",b.onscreenresize);b.bind(N,"load",b.lazyResize);if(D.ischrome&&!b.ispage&&!b.haswrapper){var L=b.win.attr("style");h=parseFloat(b.win.css("width"))+1;b.win.css("width",h);b.synched("chromefix",function(){b.win.attr("style",L)})}b.onAttributeChange=function(C){b.lazyResize(b.isieold?250:30)};if(v.enableobserver&&(b.isie11||
ba===!1||(b.observerbody=new ba(function(C){C.forEach(function(W){if(W.type=="attributes")return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!p.contains(p(".modal-dialog")[0],b.doc[0])?b.hide():b.show()});if(b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(z.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var O=b.win[0];ba!==!1?(b.observer=new ba(function(C){C.forEach(b.onAttributeChange)}),
b.observer.observe(O,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new ba(function(C){C.forEach(function(W){if(W.removedNodes.length>0)for(var ra in W.removedNodes)if(b&&W.removedNodes[ra]===O)return b.remove()})}),b.observerremover.observe(O.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(O,D.isie&&!D.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),D.isie9&&O.attachEvent("onpropertychange",b.onAttributeChange),b.bind(O,"DOMNodeRemoved",
function(C){C.target===O&&b.remove()}))}!b.ispage&&v.boxzoom&&b.bind(N,"resize",b.resizeZoom);b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize));b.lazyResize(30)}if(this.doc[0].nodeName=="IFRAME"){var T=function(){b.iframexd=!1;try{var C="contentDocument"in this?this.contentDocument:this.contentWindow._doc}catch(ra){b.iframexd=!0,C=!1}if(b.iframexd)return"console"in N&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&(b.iframe=
{doc:p(C),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=p(b.iframe.body));if(!D.isios&&v.iframeautoresize&&!b.isiframe){b.win.scrollTop(0);b.doc.height("");var W=Math.max(C.getElementsByTagName("html")[0].scrollHeight,C.body.scrollHeight);b.doc.height(W)}b.lazyResize(30);b.css(p(b.iframe.body),
n);D.isios&&b.haswrapper&&b.css(p(C.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(C,"scroll",b.onscroll);v.enablemousewheel&&b.mousewheel(C,b.onmousewheel);v.enablekeyboard&&b.bind(C,D.isopera?"keypress":"keydown",b.onkeypress);D.cantouch?(b.bind(C,"touchstart",b.ontouchstart),b.bind(C,"touchmove",b.ontouchmove)):v.emulatetouch&&(b.bind(C,"mousedown",b.ontouchstart),b.bind(C,"mousemove",function(ra){return b.ontouchmove(ra,
!0)}),v.grabcursorenabled&&D.cursorgrabvalue&&b.css(p(C.body),{cursor:D.cursorgrabvalue}));b.bind(C,"mouseup",b.ontouchend);b.zoom&&(v.dblclickzoom&&b.bind(C,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(C,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&this.doc[0].readyState==="complete"&&setTimeout(function(){T.call(b.doc[0],!1)},500);b.bind(this.doc,"load",T)}};this.showCursor=function(n,y){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);b.rail&&(b.autohidedom&&(b.autohidedom.stop().css({opacity:v.cursoropacitymax}),
b.cursoractive=!0),b.rail.drag&&b.rail.drag.pt==1||(n!==void 0&&n!==!1&&(b.scroll.y=n/b.scrollratio.y|0),y!==void 0&&(b.scroll.x=y/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh&&(n=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x,b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?n+b.rail.width:n}),b.cursoractive=!0),b.zoom&&b.zoom.stop().css({opacity:v.cursoropacitymax}))};this.hideCursor=function(n){b.cursortimeout||!b.rail||!b.autohidedom||
b.hasmousefocus&&v.autohidemode==="leave"||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:v.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:v.cursoropacitymin}),b.cursoractive=!1);b.cursortimeout=0},n||v.hidecursordelay))};this.noticeCursor=function(n,y,x){b.showCursor(y,x);b.rail.active||b.hideCursor(n)};this.getContentSize=b.ispage?function(){return{w:Math.max(z.body.scrollWidth,z.documentElement.scrollWidth),h:Math.max(z.body.scrollHeight,
z.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(n,y){if(!b||!b.win)return!1;n=b.page.maxh;var x=b.page.maxw,h=b.view.h,c=b.view.w;b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight};b.page=y?y:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-
b.view.w);if(b.page.maxh==n&&b.page.maxw==x&&b.view.w==c&&b.view.h==h){if(b.ispage)return b;y=b.win.offset();if(b.lastposition&&(n=b.lastposition,n.top==y.top&&n.left==y.left))return b;b.lastposition=y}b.page.maxh===0?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=v.railpadding.top+v.railpadding.bottom,b.rail.scrollable=!0);b.page.maxw===0?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=
0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=v.railpadding.left+v.railpadding.right,b.railh&&(b.railh.scrollable=v.horizrailenabled));b.railslocked=b.locked||b.page.maxh===0&&b.page.maxw===0;if(b.railslocked)return b.ispage||b.updateScrollBar(b.view),!1;b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr());b.istextarea&&b.win.css("resize")&&b.win.css("resize")!="none"&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h/
b.page.h*b.view.h));b.cursorheight=v.cursorfixedheight?v.cursorfixedheight:Math.max(v.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w/b.page.w*b.view.w));b.cursorwidth=v.cursorfixedheight?v.cursorfixedheight:Math.max(v.cursorminheight,b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-(v.railpadding.top+v.railpadding.bottom);b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight);b.railh&&(b.railh.width=b.page.maxh>0?b.view.w-
b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(v.railpadding.left+v.railpadding.right));b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor());b.scroll.y&&b.getScrollTop()===0&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0);return b};this.resize=
b.onResize;var ua=0;this.onscreenresize=function(n){clearTimeout(ua);var y=!b.ispage&&!b.haswrapper;y&&b.hideRails();ua=setTimeout(function(){b&&(y&&b.showRails(),b.resize());ua=0},120)};this.lazyResize=function(n){clearTimeout(ua);n=isNaN(n)?240:n;ua=setTimeout(function(){b&&b.resize();ua=0},n);return b};this.jqbind=function(n,y,x){b.events.push({e:n,n:y,f:x,q:!0});p(n).on(y,x)};this.mousewheel=function(n,y,x){n="jquery"in n?n[0]:n;if("onwheel"in z.createElement("div"))b._bind(n,"wheel",y,x||!1);
else{var h=z.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";B(n,h,y,x||!1);h=="DOMMouseScroll"&&B(n,"MozMousePixelScroll",y,x||!1)}};var g=!1;if(D.haseventlistener){try{var za=Object.defineProperty({},"passive",{get:function(){g=!0}});N.addEventListener("test",null,za)}catch(n){}this.stopPropagation=function(n){if(!n)return!1;n=n.original?n.original:n;n.stopPropagation();return!1};this.cancelEvent=function(n){n.cancelable&&n.preventDefault();n.stopImmediatePropagation();n.preventManipulation&&
n.preventManipulation();return!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},N.constructor.prototype.addEventListener=z.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(n,y,x){this.attachEvent("on"+n,y)},N.constructor.prototype.removeEventListener=z.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(n,y,x){this.detachEvent("on"+n,y)},this.cancelEvent=
function(n){if(n=n||N.event)n.cancelBubble=!0,n.cancel=!0,n.returnValue=!1;return!1},this.stopPropagation=function(n){if(n=n||N.event)n.cancelBubble=!0;return!1};this.delegate=function(n,y,x,h,c){var d=R[y]||!1;d?b.events.push({e:n,n:y,f:x,b:h,q:!1}):(d={a:[],l:[],f:function(f){for(var l=d.l,r=!1,G=l.length-1;G>=0;G--)if(r=l[G].call(f.target,f),r===!1)return!1;return r}},b.bind(n,y,d.f,h,c),R[y]=d);b.ispage?(d.a=[b.id].concat(d.a),d.l=[x].concat(d.l)):(d.a.push(b.id),d.l.push(x))};this.undelegate=
function(n,y,x,h,c){if((x=R[y]||!1)&&x.l)for(h=0,c=x.l.length;h<c;h++)x.a[h]===b.id&&(x.a.splice(h),x.l.splice(h),x.a.length===0&&(b._unbind(n,y,x.l.f),R[y]=null))};this.bind=function(n,y,x,h,c){b._bind("jquery"in n?n[0]:n,y,x,h||!1,c||!1)};this._bind=function(n,y,x,h,c){b.events.push({e:n,n:y,f:x,b:h,q:!1});g&&(c||n==N.document||n==N.document.body||n==N)?n.addEventListener(y,x,{passive:!1,capture:h}):n.addEventListener(y,x,h||!1)};this._unbind=function(n,y,x,h){R[y]?b.undelegate(n,y,x,h):n.removeEventListener(y,
x,h)};this.unbindAll=function(){for(var n=0;n<b.events.length;n++){var y=b.events[n];y.q?y.e.unbind(y.n,y.f):b._unbind(y.e,y.n,y.f,y.b)}};this.showRails=function(){return b.showRail().showRailHr()};this.showRail=function(){b.page.maxh===0||!b.ispage&&b.win.css("display")=="none"||(b.rail.visibility=!0,b.rail.css("display","block"));return b};this.showRailHr=function(){b.railh&&b.page.maxw!==0&&(b.ispage||b.win.css("display")!="none")&&(b.railh.visibility=!0,b.railh.css("display","block"));return b};
this.hideRails=function(){return b.hideRail().hideRailHr()};this.hideRail=function(){b.rail.visibility=!1;b.rail.css("display","none");return b};this.hideRailHr=function(){b.railh&&(b.railh.visibility=!1,b.railh.css("display","none"));return b};this.show=function(){b.hidden=!1;b.railslocked=!1;return b.showRails()};this.hide=function(){b.hidden=!0;b.railslocked=!0;return b.hideRails()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);
for(var n in b.delaylist)b.delaylist[n]&&S(b.delaylist[n].h);b.doZoomOut();D.hasw3ctouch?b.undelegate(z,"pointermove",b.ontouchmove):D.hasmstouch?b.undelegate(z,"MSPointerMove",b.ontouchmove):D.cantouch&&b.undelegate(z,"touchmove",b.ontouchmove,!1,!0);b.unbindAll();D.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange);b.observer!==!1&&b.observer.disconnect();b.observerremover!==!1&&b.observerremover.disconnect();b.observerbody!==!1&&b.observerbody.disconnect();b.events=null;b.cursor&&
b.cursor.remove();b.cursorh&&b.cursorh.remove();b.rail&&b.rail.remove();b.railh&&b.railh.remove();b.zoom&&b.zoom.remove();for(n=0;n<b.saved.css.length;n++){var y=b.saved.css[n];y[0].css(y[1],y[2]===void 0?"":y[2])}b.saved=!1;b.me.data("__nicescroll","");var x=p.nicescroll;x.each(function(c){if(this&&this.id===b.id){delete x[c];for(var d=++c;d<x.length;d++,c++)x[c]=x[d];x.length--;x.length&&delete x[x.length]}});for(var h in b)b[h]=null,delete b[h];b=null};this.scrollstart=function(n){this.onscrollstart=
n;return b};this.scrollend=function(n){this.onscrollend=n;return b};this.scrollcancel=function(n){this.onscrollcancel=n;return b};this.zoomin=function(n){this.onzoomin=n;return b};this.zoomout=function(n){this.onzoomout=n;return b};this.isScrollable=function(n){n=n.target?n.target:n;if(n.nodeName=="OPTION")return!0;for(;n&&n.nodeType==1&&n!==this.me[0]&&!/^BODY|HTML/.test(n.nodeName);){var y=p(n);y=y.css("overflowY")||y.css("overflowX")||y.css("overflow")||"";if(/scroll|auto/.test(y))return n.clientHeight!=
n.scrollHeight;n=n.parentNode?n.parentNode:!1}return!1};this.getViewport=function(n){for(n=n&&n.parentNode?n.parentNode:!1;n&&n.nodeType==1&&!/^BODY|HTML/.test(n.nodeName);){var y=p(n);if(/fixed|absolute/.test(y.css("position")))return y;var x=y.css("overflowY")||y.css("overflowX")||y.css("overflow")||"";if(/scroll|auto/.test(x)&&n.clientHeight!=n.scrollHeight||y.getNiceScroll().length>0)return y;n=n.parentNode?n.parentNode:!1}return!1};this.triggerScrollStart=function(n,y,x,h,c){b.onscrollstart&&
b.onscrollstart.call(b,{type:"scrollstart",current:{x:n,y},request:{x,y:h},end:{x:b.newscrollx,y:b.newscrolly},speed:c})};this.triggerScrollEnd=function(){if(b.onscrollend){var n=b.getScrollLeft(),y=b.getScrollTop();b.onscrollend.call(b,{type:"scrollend",current:{x:n,y},end:{x:n,y}})}};var ka=0,ia=0,pa=0,Aa=1,ya=!1;this.onmousewheel=function(n){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(n);v.oneaxismousemode===
"auto"&&n.deltaX!==0&&(v.oneaxismousemode=!1);if(v.oneaxismousemode&&n.deltaX===0&&!b.rail.scrollable)return b.railh&&b.railh.scrollable?b.onmousewheelhr(n):!0;var y=aa(),x=!1;v.preservenativescrolling&&b.checkarea+600<y&&(b.nativescrollingarea=b.isScrollable(n),x=!0);b.checkarea=y;if(b.nativescrollingarea)return!0;if(n=F(n,!1,x))b.checkarea=0;return n};this.onmousewheelhr=function(n){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(n);var y=
aa(),x=!1;v.preservenativescrolling&&b.checkarea+600<y&&(b.nativescrollingarea=b.isScrollable(n),x=!0);b.checkarea=y;return b.nativescrollingarea?!0:b.railslocked?b.cancelEvent(n):F(n,!0,x)}};this.stop=function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(n){return 80+n/72*v.scrollspeed|0};if(v.smoothscroll)if(b.ishwscroll&&D.hastransition&&v.usetransition&&
v.smoothscroll){var va="";this.resetTransition=function(){va="";b.doc.css(D.prefixstyle+"transition-duration","0ms")};this.prepareTransition=function(n,y){n=y?n:b.getTransitionSpeed(n);y=n+"ms";va!==y&&(va=y,b.doc.css(D.prefixstyle+"transition-duration",y));return n};this.doScrollLeft=function(n,y){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(n,x,y)};this.doScrollTop=function(n,y){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,n,y)};this.cursorupdate={running:!1,
start:function(){var n=this;if(!n.running){n.running=!0;var y=function(){n.running&&U(y);b.showCursor(b.getScrollTop(),b.getScrollLeft());b.notifyScrollEvent(b.win[0])};U(y)}},stop:function(){this.running=!1}};this.doScrollPos=function(n,y,x){x=b.getScrollTop();var h=b.getScrollLeft();((b.newscrolly-x)*(y-x)<0||(b.newscrollx-h)*(n-h)<0)&&b.cancelScroll();v.bouncescroll?(y<0?y=y/2|0:y>b.page.maxh&&(y=b.page.maxh+(y-b.page.maxh)/2|0),n<0?n=n/2|0:n>b.page.maxw&&(n=b.page.maxw+(n-b.page.maxw)/2|0)):(y<
0?y=0:y>b.page.maxh&&(y=b.page.maxh),n<0?n=0:n>b.page.maxw&&(n=b.page.maxw));if(b.scrollrunning&&n==b.newscrollx&&y==b.newscrolly)return!1;b.newscrolly=y;b.newscrollx=n;x=b.getScrollTop();h=b.getScrollLeft();var c=n-h;var d=y-x;c=b.prepareTransition(Math.sqrt(c*c+d*d)|0);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(h,x,n,y,c),b.cursorupdate.start());b.scrollendtrapped=!0;D.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,
c));b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx)};this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var n=b.getScrollTop(),y=b.getScrollLeft();b.scrollrunning=!1;D.transitionend||clearTimeout(D.transitionend);b.scrollendtrapped=!1;b.resetTransition();b.setScrollTop(n);b.railh&&b.setScrollLeft(y);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;b.cursorfreezed=!1;b.cursorupdate.stop();b.showCursor(n,y);return b};this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var n=
b.getScrollTop(),y=b.getScrollLeft();n<0?n=0:n>b.page.maxh&&(n=b.page.maxh);y<0?y=0:y>b.page.maxw&&(y=b.page.maxw);if(n!=b.newscrolly||y!=b.newscrollx)return b.doScrollPos(y,n,v.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd();b.scrollrunning=!1;b.scrollendtrapped=!1;b.resetTransition();b.timerscroll=!1;b.setScrollTop(n);b.railh&&b.setScrollLeft(y);b.cursorupdate.stop();b.noticeCursor(!1,n,y);b.cursorfreezed=!1}}}else this.doScrollLeft=function(n,y){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();
b.doScrollPos(n,x,y)},this.doScrollTop=function(n,y){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,n,y)},this.doScrollPos=function(n,y,x){x=b.getScrollTop();var h=b.getScrollLeft();((b.newscrolly-x)*(y-x)<0||(b.newscrollx-h)*(n-h)<0)&&b.cancelScroll();var c=!1;b.bouncescroll&&b.rail.visibility||(y<0?(y=0,c=!0):y>b.page.maxh&&(y=b.page.maxh,c=!0));b.bouncescroll&&b.railh.visibility||(n<0?(n=0,c=!0):n>b.page.maxw&&(n=b.page.maxw,c=!0));if(b.scrollrunning&&b.newscrolly===y&&b.newscrollx===
n)return!0;b.newscrolly=y;b.newscrollx=n;b.dst={};b.dst.x=n-h;b.dst.y=y-x;b.dst.px=h;b.dst.py=x;var d=b.getTransitionSpeed(Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y)|0);b.bzscroll={};c=c?1:.58;b.bzscroll.x=new X(h,b.newscrollx,d,0,0,c,1);b.bzscroll.y=new X(x,b.newscrolly,d,0,0,c,1);aa();var f=function(){if(b.scrollrunning){var l=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow());b.setScrollTop(b.bzscroll.y.getNow());l<=1?b.timer=U(f):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};
b.scrollrunning||(b.triggerScrollStart(h,x,n,y,d),b.scrollrunning=!0,b.timer=U(f))},this.cancelScroll=function(){b.timer&&S(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b};else this.doScrollLeft=function(n,y){var x=b.getScrollTop();b.doScrollPos(n,x,y)},this.doScrollTop=function(n,y){var x=b.getScrollLeft();b.doScrollPos(x,n,y)},this.doScrollPos=function(n,y,x){var h=n>b.page.maxw?b.page.maxw:n;h<0&&(h=0);var c=y>b.page.maxh?b.page.maxh:y;c<0&&(c=0);b.synched("scroll",function(){b.setScrollTop(c);
b.setScrollLeft(h)})},this.cancelScroll=function(){};this.doScrollBy=function(n,y){q(0,n)};this.doScrollLeftBy=function(n,y){q(n,0)};this.doScrollTo=function(n,y){b.cursorfreezed=!1;b.doScrollTop(n)};this.checkContentSize=function(){var n=b.getContentSize();n.h==b.page.h&&n.w==b.page.w||b.resize(!1,n)};b.onscroll=function(n){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y);b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x));
b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(n){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var y="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),x=b.win[0].style,h;for(h in y){var c=y[h];b.zoomrestore.style[c]=x[c]!==void 0?x[c]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-
b.win.height()};D.isios4&&(b.zoomrestore.scrollTop=M.scrollTop(),M.scrollTop(0));b.win.css({position:D.isios4?"absolute":"fixed",top:0,left:0,zIndex:K+100,margin:0});y=b.win.css("backgroundColor");(""===y||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(y))&&b.win.css("backgroundColor","#fff");b.rail.css({zIndex:K+101});b.zoom.css({zIndex:K+102});b.zoom.css("backgroundPosition","0 -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(n)}};this.doZoomOut=function(n){if(b.zoomactive)return b.zoomactive=
!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),D.isios4&&M.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(n)};this.doZoom=function(n){return b.zoomactive?b.doZoomOut(n):b.doZoomIn(n)};this.resizeZoom=function(){if(b.zoomactive){var n=b.getScrollTop();b.win.css({width:M.width()-b.zoomrestore.padding.w+"px",height:M.height()-
b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,n))}};this.init();p.nicescroll.push(this)},ha=function(V){var I=this;this.nc=V;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.reset=function(w,e){I.stop();I.steptime=0;I.lasttime=aa();I.speedx=0;I.speedy=0;I.lastx=w;I.lasty=e;I.lastscrollx=-1;I.lastscrolly=-1};this.update=
function(w,e){var m=aa();I.steptime=m-I.lasttime;I.lasttime=m;m=e-I.lasty;var B=w-I.lastx,q=I.nc.getScrollTop(),F=I.nc.getScrollLeft();q+=m;F+=B;I.snapx=F<0||F>I.nc.page.maxw;I.snapy=q<0||q>I.nc.page.maxh;I.speedx=B;I.speedy=m;I.lastx=w;I.lasty=e};this.stop=function(){I.nc.unsynched("domomentum2d");I.timer&&clearTimeout(I.timer);I.timer=0;I.lastscrollx=-1;I.lastscrolly=-1};this.doSnapy=function(w,e){var m=!1;e<0?(e=0,m=!0):e>I.nc.page.maxh&&(e=I.nc.page.maxh,m=!0);w<0?(w=0,m=!0):w>I.nc.page.maxw&&
(w=I.nc.page.maxw,m=!0);m?I.nc.doScrollPos(w,e,I.nc.opt.snapbackspeed):I.nc.triggerScrollEnd()};this.doMomentum=function(w){var e=aa(),m=w?e+w:I.lasttime;w=I.nc.getScrollLeft();var B=I.nc.getScrollTop(),q=I.nc.page.maxh,F=I.nc.page.maxw;I.speedx=F>0?Math.min(60,I.speedx):0;I.speedy=q>0?Math.min(60,I.speedy):0;m=m&&e-m<=60;if(B<0||B>q||w<0||w>F)m=!1;w=I.speedx&&m?I.speedx:!1;if(I.speedy&&m&&I.speedy||w){var b=Math.max(16,I.steptime);b>50&&(w=b/50,I.speedx*=w,I.speedy*=w,b=50);I.demulxy=0;I.lastscrollx=
I.nc.getScrollLeft();I.chkx=I.lastscrollx;I.lastscrolly=I.nc.getScrollTop();I.chky=I.lastscrolly;var E=I.lastscrollx,v=I.lastscrolly,Z=function(){var D=aa()-e>600?.04:.02;I.speedx&&(E=Math.floor(I.lastscrollx-I.speedx*(1-I.demulxy)),I.lastscrollx=E,E<0||E>F)&&(D=.1);I.speedy&&(v=Math.floor(I.lastscrolly-I.speedy*(1-I.demulxy)),I.lastscrolly=v,v<0||v>q)&&(D=.1);I.demulxy=Math.min(1,I.demulxy+D);I.nc.synched("domomentum2d",function(){I.speedx&&(I.nc.getScrollLeft(),I.chkx=E,I.nc.setScrollLeft(E));I.speedy&&
(I.nc.getScrollTop(),I.chky=v,I.nc.setScrollTop(v));I.timer||(I.nc.hideCursor(),I.doSnapy(E,v))});I.demulxy<1?I.timer=setTimeout(Z,b):(I.stop(),I.nc.hideCursor(),I.doSnapy(E,v))};Z()}else I.doSnapy(I.nc.getScrollLeft(),I.nc.getScrollTop())}},ta=p.fn.scrollTop;typeof p.cssHooks==="object"&&(p.cssHooks.pageYOffset={get:function(V,I,w){return(I=p.data(V,"__nicescroll")||!1)&&I.ishwscroll?I.getScrollTop():ta.call(V)},set:function(V,I){var w=p.data(V,"__nicescroll")||!1;w&&w.ishwscroll?w.setScrollTop(parseInt(I)):
ta.call(V,I);return this}});p.fn.scrollTop=function(V){if(V===void 0){var I=this[0]?p.data(this[0],"__nicescroll")||!1:!1;return I&&I.ishwscroll?I.getScrollTop():ta.call(this)}return this.each(function(){var w=p.data(this,"__nicescroll")||!1;w&&w.ishwscroll?w.setScrollTop(parseInt(V)):ta.call(p(this),V)})};var la=p.fn.scrollLeft;typeof p.cssHooks==="object"&&(p.cssHooks.pageXOffset={get:function(V,I,w){return(I=p.data(V,"__nicescroll")||!1)&&I.ishwscroll?I.getScrollLeft():la.call(V)},set:function(V,
I){var w=p.data(V,"__nicescroll")||!1;w&&w.ishwscroll?w.setScrollLeft(parseInt(I)):la.call(V,I);return this}});p.fn.scrollLeft=function(V){if(V===void 0){var I=this[0]?p.data(this[0],"__nicescroll")||!1:!1;return I&&I.ishwscroll?I.getScrollLeft():la.call(this)}return this.each(function(){var w=p.data(this,"__nicescroll")||!1;w&&w.ishwscroll?w.setScrollLeft(parseInt(V)):la.call(p(this),V)})};var ca=function(V){var I=this;this.length=0;this.name="nicescrollarray";this.each=function(m){p.each(I,m);return I};
this.push=function(m){I[I.length]=m;I.length++};this.eq=function(m){return I[m]};if(V)for(var w=0;w<V.length;w++){var e=p.data(V[w],"__nicescroll")||!1;e&&(this[this.length]=e,this.length++)}return this};(function(V,I,w){for(var e=0,m=I.length;e<m;e++)w(V,I[e])})(ca.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(V,I){V[I]=function(){var w=arguments;return this.each(function(){this[I].apply(this,w)})}});p.fn.getNiceScroll=function(V){return V===void 0?new ca(this):
this[V]&&p.data(this[V],"__nicescroll")||!1};if(typeof p.expr==="object"){var qa=p.expr.pseudos||p.expr[":"];qa&&(qa.nicescroll=function(V){return p.data(V,"__nicescroll")!==void 0})}p.fn.niceScroll=function(V,I){I!==void 0||typeof V!="object"||"jquery"in V||(I=V,V=!1);var w=new ca;this.each(function(){var e=p(this),m=p.extend({},I);if(V){var B=p(V);m.doc=B.length>1?p(V,e):B;m.win=e}"doc"in m&&!("win"in m)&&(m.win=e);B=e.data("__nicescroll")||!1;B||(m.doc=m.doc||e,B=new da(m,e),e.data("__nicescroll",
B));w.push(B)});return w.length===1?w[0]:w};N.NiceScroll={getjQuery:function(){return p}};p.nicescroll||(p.nicescroll=new ca,p.nicescroll.options=fa)})(function(p){var A=function(){function t(h){return h==null?String(h):ka[ia.call(h)]||"object"}function u(h){return t(h)=="function"}function H(h){return h!=null&&h==h.window}function K(h){return t(h)=="object"}function z(h){return K(h)&&!H(h)&&Object.getPrototypeOf(h)==Object.prototype}function M(h){var c=!!h&&"length"in h&&h.length,d=x.type(h);return"function"!=
d&&!H(h)&&("array"==d||c===0||typeof c=="number"&&c>0&&c-1 in h)}function R(h){return w.call(h,function(c){return c!=null})}function U(h){return h.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function S(h){return h in q?q[h]:q[h]=new RegExp("(^|\\s)"+h+"(\\s|$)")}function Y(h,c){return typeof c!="number"||F[U(h)]?c:c+"px"}function ba(h){return"children"in h?e.call(h.children):x.map(h.childNodes,function(c){if(c.nodeType==
1)return c})}function aa(h,c){var d,f=h?h.length:0;for(d=0;d<f;d++)this[d]=h[d];this.length=f;this.selector=c||""}function fa(h,c,d){for(ca in c)d&&(z(c[ca])||va(c[ca]))?(z(c[ca])&&!z(h[ca])&&(h[ca]={}),va(c[ca])&&!va(h[ca])&&(h[ca]=[]),fa(h[ca],c[ca],d)):c[ca]!==la&&(h[ca]=c[ca])}function oa(h,c){return c==null?x(h):x(h).filter(c)}function ea(h,c,d,f){return u(c)?c.call(h,d,f):c}function da(h,c){var d=h.className||"",f=d&&d.baseVal!==la;if(c===la)return f?d.baseVal:d;f?d.baseVal=c:h.className=c}
function ha(h){try{return h?h=="true"||(h=="false"?!1:h=="null"?null:+h+""==h?+h:/^[\[\{]/.test(h)?x.parseJSON(h):h):h}catch(c){return h}}function ta(h,c){c(h);for(var d=0,f=h.childNodes.length;d<f;d++)ta(h.childNodes[d],c)}var la,ca,qa,V=[],I=V.concat,w=V.filter,e=V.slice,m=p.document,B={},q={},F={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},b=/^\s*<(\w+|!)[^>]*>/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
Z=/^(?:body|html)$/i,D=/([A-Z])/g,X="val css html text data width height offset".split(" "),ja=m.createElement("table"),ma=m.createElement("tr"),ua={tr:m.createElement("tbody"),tbody:ja,thead:ja,tfoot:ja,td:ma,th:ma,"*":m.createElement("div")},g=/complete|loaded|interactive/,za=/^[\w-]*$/,ka={},ia=ka.toString,pa={},Aa=m.createElement("div"),ya={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",
colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},va=Array.isArray||function(h){return h instanceof Array};pa.matches=function(h,c){if(!c||!h||h.nodeType!==1)return!1;var d=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.matchesSelector;if(d)return d.call(h,c);var f=h.parentNode;(d=!f)&&(f=Aa).appendChild(h);c=~pa.qsa(f,c).indexOf(h);d&&Aa.removeChild(h);return c};var n=function(h){return h.replace(/-+(.)?/g,function(c,d){return d?
d.toUpperCase():""})};var y=function(h){return w.call(h,function(c,d){return h.indexOf(c)==d})};pa.fragment=function(h,c,d){var f;E.test(h)&&(f=x(m.createElement(RegExp.$1)));if(!f){h.replace&&(h=h.replace(v,"<$1></$2>"));c===la&&(c=b.test(h)&&RegExp.$1);c in ua||(c="*");var l=ua[c];l.innerHTML=""+h;f=x.each(e.call(l.childNodes),function(){l.removeChild(this)})}if(z(d)){var r=x(f);x.each(d,function(G,J){if(X.indexOf(G)>-1)r[G](J);else r.attr(G,J)})}return f};pa.Z=function(h,c){return new aa(h,c)};
pa.isZ=function(h){return h instanceof pa.Z};pa.init=function(h,c){if(h)if(typeof h=="string")if(h=h.trim(),h[0]=="<"&&b.test(h))c=pa.fragment(h,RegExp.$1,c),h=null;else{if(c!==la)return x(c).find(h);c=pa.qsa(m,h)}else{if(u(h))return x(m).ready(h);if(pa.isZ(h))return h;if(va(h))c=R(h);else if(K(h))c=[h],h=null;else if(b.test(h))c=pa.fragment(h.trim(),RegExp.$1,c),h=null;else{if(c!==la)return x(c).find(h);c=pa.qsa(m,h)}}else return pa.Z();return pa.Z(c,h)};var x=function(h,c){return pa.init(h,c)};
x.extend=function(h){var c=e.call(arguments,1);if(typeof h=="boolean"){var d=h;h=c.shift()}c.forEach(function(f){fa(h,f,d)});return h};pa.qsa=function(h,c){var d,f=c[0]=="#",l=!f&&c[0]==".",r=f||l?c.slice(1):c,G=za.test(r);return h.getElementById&&G&&f?(d=h.getElementById(r))?[d]:[]:h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11?[]:e.call(G&&!f&&h.getElementsByClassName?l?h.getElementsByClassName(r):h.getElementsByTagName(c):h.querySelectorAll(c))};x.contains=m.documentElement.contains?function(h,
c){return h!==c&&h.contains(c)}:function(h,c){for(;c&&=c.parentNode;)if(c===h)return!0;return!1};x.type=t;x.isFunction=u;x.isWindow=H;x.isArray=va;x.isPlainObject=z;x.isEmptyObject=function(h){for(var c in h)return!1;return!0};x.isNumeric=function(h){var c=Number(h),d=typeof h;return h!=null&&d!="boolean"&&(d!="string"||h.length)&&!isNaN(c)&&isFinite(c)||!1};x.inArray=function(h,c,d){return V.indexOf.call(c,h,d)};x.camelCase=n;x.trim=function(h){return h==null?"":String.prototype.trim.call(h)};x.uuid=
0;x.support={};x.expr={};x.noop=function(){};x.map=function(h,c){var d=[],f;if(M(h))for(f=0;f<h.length;f++){var l=c(h[f],f);l!=null&&d.push(l)}else for(f in h)l=c(h[f],f),l!=null&&d.push(l);return d.length>0?x.fn.concat.apply([],d):d};x.each=function(h,c){var d;if(M(h))for(d=0;d<h.length&&c.call(h[d],d,h[d])!==!1;d++);else for(d in h)if(c.call(h[d],d,h[d])===!1)break;return h};x.grep=function(h,c){return w.call(h,c)};p.JSON&&(x.parseJSON=JSON.parse);x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
function(h,c){ka["[object "+c+"]"]=c.toLowerCase()});x.data=function(h,c,d){if(d===la)return typeof h[c]!=="undefined"?h[c]:la;d===null?delete h[c]:h[c]=d};x.fn={jquery:"1.2.0",constructor:pa.Z,length:0,forEach:V.forEach,reduce:V.reduce,push:V.push,sort:V.sort,splice:V.splice,indexOf:V.indexOf,concat:function(){var h,c=[];for(h=0;h<arguments.length;h++){var d=arguments[h];c[h]=pa.isZ(d)?d.toArray():d}return I.apply(pa.isZ(this)?this.toArray():this,c)},map:function(h){return x(x.map(this,function(c,
d){return h.call(c,d,c)}))},slice:function(){return x(e.apply(this,arguments))},ready:function(h){g.test(m.readyState)&&m.body?h(x):m.addEventListener("DOMContentLoaded",function(){h(x)},!1);return this},get:function(h){return h===la?e.call(this):this[h>=0?h:h+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(h){V.every.call(this,function(c,
d){return h.call(c,d,c)!==!1});return this},filter:function(h){return u(h)?this.not(this.not(h)):x(w.call(this,function(c){return pa.matches(c,h)}))},add:function(h,c){return x(y(this.concat(x(h,c))))},is:function(h){return h===":visible"?this.length>0?this.css("display")!=="none":!1:K(h)?this[0]===h?!0:!1:this.length>0&&pa.matches(this[0],h)},not:function(h){var c=[];if(u(h)&&h.call!==la)this.each(function(f){h.call(this,f)||c.push(this)});else{var d=typeof h=="string"?this.filter(h):M(h)&&u(h.item)?
e.call(h):x(h);this.forEach(function(f){d.indexOf(f)<0&&c.push(f)})}return x(c)},has:function(h){return this.filter(function(){return K(h)?x.contains(this,h):x(this).find(h).size()})},eq:function(h){return h===-1?this.slice(h):this.slice(h,+h+1)},first:function(){var h=this[0];return h&&!K(h)?h:x(h)},last:function(){var h=this[this.length-1];return h&&!K(h)?h:x(h)},find:function(h){var c=this;return h?typeof h=="object"?x(h).filter(function(){var d=this;return V.some.call(c,function(f){return x.contains(f,
d)})}):this.length==1?x(pa.qsa(this[0],h)):this.map(function(){return pa.qsa(this,h)}):x()},closest:function(h,c){var d=[],f=typeof h=="object"&&x(h);this.each(function(l,r){for(;r&&!(f?f.indexOf(r)>=0:pa.matches(r,h));)r=r!==c&&!(r!=null&&r.nodeType==r.DOCUMENT_NODE)&&r.parentNode;r&&d.indexOf(r)<0&&d.push(r)});return x(d)},parents:function(h){for(var c=[],d=this;d.length>0;)d=x.map(d,function(f){if((f=f.parentNode)&&(f==null||f.nodeType!=f.DOCUMENT_NODE)&&c.indexOf(f)<0)return c.push(f),f});return oa(c,
h)},parent:function(h){return oa(y(this.pluck("parentNode")),h)},children:function(h){return oa(this.map(function(){return ba(this)}),h)},contents:function(){return this.map(function(){return this.contentDocument||e.call(this.childNodes)})},siblings:function(h){return oa(this.map(function(c,d){return w.call(ba(d.parentNode),function(f){return f!==d})}),h)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(h){return x.map(this,function(c){return c[h]})},show:function(){return this.each(function(){this.style.display==
"none"&&(this.style.display="");if(getComputedStyle(this,"").getPropertyValue("display")=="none"){var h=this.style,c=this.nodeName;if(!B[c]){var d=m.createElement(c);m.body.appendChild(d);var f=getComputedStyle(d,"").getPropertyValue("display");d.parentNode.removeChild(d);f=="none"&&(f="block");B[c]=f}h.display=B[c]}})},replaceWith:function(h){return this.before(h).remove()},wrap:function(h){var c=u(h);if(this[0]&&!c)var d=x(h).get(0),f=d.parentNode||this.length>1;return this.each(function(l){x(this).wrapAll(c?
h.call(this,l):f?d.cloneNode(!0):d)})},wrapAll:function(h){if(this[0]){x(this[0]).before(h=x(h));for(var c;(c=h.children()).length;)h=c.first();x(h).append(this)}return this},wrapInner:function(h){var c=u(h);return this.each(function(d){var f=x(this),l=f.contents();d=c?h.call(this,d):h;l.length?l.wrapAll(d):f.append(d)})},unwrap:function(){this.parent().each(function(){x(this).replaceWith(x(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display",
"none")},toggle:function(h){return this.each(function(){var c=x(this);(h===la?c.css("display")=="none":h)?c.show():c.hide()})},prev:function(h){return x(this.pluck("previousElementSibling")).filter(h||"*")},next:function(h){return x(this.pluck("nextElementSibling")).filter(h||"*")},html:function(h){return 0 in arguments?this.each(function(c){var d=this.innerHTML;x(this).empty().append(ea(this,h,c,d))}):0 in this?this[0].innerHTML:null},text:function(h){return 0 in arguments?this.each(function(c){c=
ea(this,h,c,this.textContent);this.textContent=c==null?"":""+c}):0 in this?this.pluck("textContent").join(""):null},attr:function(h,c){var d;return typeof h!="string"||1 in arguments?this.each(function(f){if(this.nodeType===1)if(K(h))for(ca in h){var l=ca;f=h[ca];f==null?this.removeAttribute(l):this.setAttribute(l,f)}else l=h,f=ea(this,c,f,this.getAttribute(h)),f==null?this.removeAttribute(l):this.setAttribute(l,f)}):0 in this&&this[0].nodeType==1&&(d=this[0].getAttribute(h))!=null?d:la},removeAttr:function(h){return this.each(function(){this.nodeType===
1&&h.split(" ").forEach(function(c){this.removeAttribute(c)},this)})},prop:function(h,c){h=ya[h]||h;return 1 in arguments?this.each(function(d){this[h]=ea(this,c,d,this[h])}):this[0]&&this[0][h]},removeProp:function(h){h=ya[h]||h;return this.each(function(){delete this[h]})},data:function(h,c){if(typeof c==="object")this.length&&(this[0][h]=c);else{if(typeof c==="undefined"){if(this.length&&typeof this[0][h]!=="undefined")return this[0][h]}else this.length&&(typeof this[0][h]!=="undefined"&&delete this[0][h],
c&&(this[0][h]=c));var d="data-"+h.replace(D,"-$1").toLowerCase();d=1 in arguments?this.attr(d,c):this.attr(d);return d!==null?ha(d):la}},val:function(h){return 0 in arguments?(h==null&&(h=""),this.each(function(c){this.value=ea(this,h,c,this.value)})):this[0]&&(this[0].multiple?x(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(h){if(h)return this.each(function(d){var f=x(this);d=ea(this,h,d,f.offset());var l=f.offsetParent().offset();
d={top:d.top-l.top,left:d.left-l.left};f.css("position")=="static"&&(d.position="relative");f.css(d)});if(!this.length)return null;if(m.documentElement!==this[0]&&!x.contains(m.documentElement,this[0]))return{top:0,left:0};var c=this[0].getBoundingClientRect();return{left:c.left+p.pageXOffset,top:c.top+p.pageYOffset,width:Math.round(c.width),height:Math.round(c.height)}},css:function(h,c){if(arguments.length<2){var d=this[0];if(typeof h=="string")return d?d.style[n(h)]||getComputedStyle(d,"").getPropertyValue(h):
void 0;if(va(h)){if(!d)return;var f={},l=getComputedStyle(d,"");x.each(h,function(G,J){f[J]=d.style[n(J)]||l.getPropertyValue(J)});return f}}var r="";if(t(h)=="string")c||c===0?r=U(h)+":"+Y(h,c):this.each(function(){this.style.removeProperty(U(h))});else for(ca in h)h[ca]||h[ca]===0?r+=U(ca)+":"+Y(ca,h[ca])+";":this.each(function(){this.style.removeProperty(U(ca))});return this.each(function(){this.style.cssText+=";"+r})},index:function(h){return h?this.indexOf(x(h)[0]):this.parent().children().indexOf(this[0])},
hasClass:function(h){return h?V.some.call(this,function(c){return this.test(da(c))},S(h)):!1},addClass:function(h){return h?this.each(function(c){if("className"in this){qa=[];var d=da(this);ea(this,h,c,d).split(/\s+/g).forEach(function(f){x(this).hasClass(f)||qa.push(f)},this);qa.length&&da(this,d+(d?" ":"")+qa.join(" "))}}):this},removeClass:function(h){return this.each(function(c){if("className"in this){if(h===la)return da(this,"");qa=da(this);ea(this,h,c,qa).split(/\s+/g).forEach(function(d){qa=
qa.replace(S(d)," ")});da(this,qa.trim())}})},toggleClass:function(h,c){return h?this.each(function(d){var f=x(this);ea(this,h,d,da(this)).split(/\s+/g).forEach(function(l){(c===la?!f.hasClass(l):c)?f.addClass(l):f.removeClass(l)})}):this},scrollTop:function(h){if(this.length){var c="scrollTop"in this[0];return h===la?c?this[0].scrollTop:this[0].pageYOffset:this.each(c?function(){this.scrollTop=h}:function(){this.scrollTo(this.scrollX,h)})}},scrollLeft:function(h){if(this.length){var c="scrollLeft"in
this[0];return h===la?c?this[0].scrollLeft:this[0].pageXOffset:this.each(c?function(){this.scrollLeft=h}:function(){this.scrollTo(h,this.scrollY)})}},position:function(){if(this.length){var h=this[0],c=this.offsetParent(),d=this.offset(),f=Z.test(c[0].nodeName)?{top:0,left:0}:c.offset();d.top-=parseFloat(x(h).css("margin-top"))||0;d.left-=parseFloat(x(h).css("margin-left"))||0;f.top+=parseFloat(x(c[0]).css("border-top-width"))||0;f.left+=parseFloat(x(c[0]).css("border-left-width"))||0;return{top:d.top-
f.top,left:d.left-f.left}}},offsetParent:function(){return this.map(function(){for(var h=this.offsetParent||m.body;h&&!Z.test(h.nodeName)&&x(h).css("position")=="static";)h=h.offsetParent;return h})}};x.fn.detach=x.fn.remove;["width","height"].forEach(function(h){var c=h.replace(/./,function(d){return d[0].toUpperCase()});x.fn[h]=function(d){var f,l=this[0];return d===la?H(l)?l["inner"+c]:l!=null&&l.nodeType==l.DOCUMENT_NODE?l.documentElement["scroll"+c]:(f=this.offset())&&f[h]:this.each(function(r){l=
x(this);l.css(h,ea(this,d,r,l[h]()))})}});x.fn.innerWidth=function(){return this.width()};x.fn.innerHeight=function(){return this.height()};["after","prepend","before","append"].forEach(function(h,c){var d=c%2;x.fn[h]=function(){var f,l=x.map(arguments,function(J){var Q=[];f=t(J);return f=="array"?(J.forEach(function(L){if(L.nodeType!==la)return Q.push(L);if(x.zepto.isZ(L))return Q=Q.concat(L.get());Q=Q.concat(pa.fragment(L))}),Q):f=="object"||J==null?J:pa.fragment(J)}),r,G=this.length>1;return l.length<
1?this:this.each(function(J,Q){r=d?Q:Q.parentNode;Q=c==0?Q.nextSibling:c==1?Q.firstChild:c==2?Q:null;var L=x.contains(m.documentElement,r);l.forEach(function(O){if(G)O=O.cloneNode(!0);else if(!r)return x(O).remove();r.insertBefore(O,Q);L&&ta(O,function(T){if(!(T.nodeName==null||T.nodeName.toUpperCase()!=="SCRIPT"||T.type&&T.type!=="text/javascript"||T.src)){var C=T.ownerDocument?T.ownerDocument.defaultView:p;C.eval.call(C,T.innerHTML)}})})})};x.fn[d?h+"To":"insert"+(c?"Before":"After")]=function(f){x(f)[h](this);
return this}});pa.Z.prototype=aa.prototype=x.fn;pa.uniq=y;pa.deserializeValue=ha;x.zepto=pa;return x}();p.mQuery=A;p.$$===void 0&&(p.$$=A);(function(t){function u(w){return w._zid||(w._zid=Y++)}function H(w,e,m,B){e=K(e);if(e.ns)var q=new RegExp("(?:^| )"+e.ns.replace(" "," .* ?")+"(?: |$)");return(ea[u(w)]||[]).filter(function(F){return F&&(!e.e||F.e==e.e)&&(!e.ns||q.test(F.ns))&&(!m||u(F.fn)===u(m))&&(!B||F.sel==B)})}function K(w){w=(""+w).split(".");return{e:w[0],ns:w.slice(1).sort().join(" ")}}
function z(w){return la[w]||ha&&ta[w]||w}function M(w,e,m,B,q,F,b){var E=u(w),v=ea[E]||(ea[E]=[]);e.split(/\s/).forEach(function(Z){if(Z=="ready")return t(document).ready(m);var D=K(Z);D.fn=m;D.sel=q;D.e in la&&(m=function(ja){var ma=ja.relatedTarget;if(!ma||ma!==this&&!t.contains(this,ma))return D.fn.apply(this,arguments)});var X=(D.del=F)||m;D.proxy=function(ja){ja=U(ja);if(!ja.isImmediatePropagationStopped()){ja.data=B;var ma=X.apply(w,ja._args==ba?[ja]:[ja].concat(ja._args));ma===!1&&(ja.preventDefault(),
ja.stopPropagation());return ma}};D.i=v.length;v.push(D);"addEventListener"in w&&w.addEventListener(z(D.e),D.proxy,D.del&&!ha&&D.e in ta||!!b)})}function R(w,e,m,B,q){var F=u(w);(e||"").split(/\s/).forEach(function(b){H(w,b,m,B).forEach(function(E){delete ea[F][E.i];"removeEventListener"in w&&w.removeEventListener(z(E.e),E.proxy,E.del&&!ha&&E.e in ta||!!q)})})}function U(w,e){if(e||!w.isDefaultPrevented)if(e||=w,t.each(I,function(m,B){var q=e[m];w[m]=function(){this[B]=ca;return q&&q.apply(e,arguments)};
w[B]=qa}),w.timeStamp||(w.timeStamp=Date.now()),e.defaultPrevented!==ba?e.defaultPrevented:"returnValue"in e?e.returnValue===!1:e.getPreventDefault&&e.getPreventDefault())w.isDefaultPrevented=ca;return w}function S(w){var e,m={originalEvent:w};for(e in w)V.test(e)||w[e]===ba||(m[e]=w[e]);return U(m,w)}var Y=1,ba,aa=Array.prototype.slice,fa=t.isFunction,oa=function(w){return typeof w=="string"},ea={},da={},ha="onfocusin"in p,ta={focus:"focusin",blur:"focusout"},la={mouseenter:"mouseover",mouseleave:"mouseout"};
da.click=da.mousedown=da.mouseup=da.mousemove="MouseEvents";t.event={add:M,remove:R};t.proxy=function(w,e){var m=2 in arguments&&aa.call(arguments,2);if(fa(w)){var B=function(){return w.apply(e,m?m.concat(aa.call(arguments)):arguments)};B._zid=u(w);return B}if(oa(e))return m?(m.unshift(w[e],w),t.proxy.apply(null,m)):t.proxy(w[e],w);throw new TypeError("expected function");};t.fn.bind=function(w,e,m){return this.on(w,e,m)};t.fn.unbind=function(w,e){return this.off(w,e)};t.fn.one=function(w,e,m,B){return this.on(w,
e,m,B,1)};var ca=function(){return!0},qa=function(){return!1},V=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,I={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(w,e,m){return this.on(e,w,m)};t.fn.undelegate=function(w,e,m){return this.off(e,w,m)};t.fn.live=function(w,e){t(document.body).delegate(this.selector,w,e);return this};t.fn.die=function(w,e){t(document.body).undelegate(this.selector,
w,e);return this};t.fn.on=function(w,e,m,B,q){var F,b,E=this;if(w&&!oa(w))return t.each(w,function(v,Z){E.on(v,e,m,Z,q)}),E;oa(e)||fa(B)||B===!1||(B=m,m=e,e=ba);if(B===ba||m===!1)B=m,m=ba;B===!1&&(B=qa);return E.each(function(v,Z){q&&(F=function(D){R(Z,D.type,B);return B.apply(this,arguments)});e&&(b=function(D){var X=t(D.target).closest(e,Z).get(0);if(X&&X!==Z){var ja=t.extend(S(D),{currentTarget:X,liveFired:Z});return(F||B).apply(X,[ja].concat(aa.call(arguments,1)))}});M(Z,w,B,m,e,b||F)})};t.fn.off=
function(w,e,m){var B=this;if(w&&!oa(w))return t.each(w,function(q,F){B.off(q,e,F)}),B;oa(e)||fa(m)||m===!1||(m=e,e=ba);m===!1&&(m=qa);return B.each(function(){R(this,w,m,e)})};t.fn.trigger=function(w,e){w=oa(w)||t.isPlainObject(w)?t.Event(w):U(w);w._args=e;return this.each(function(){if(w.type in ta&&typeof this[w.type]=="function")this[w.type]();else"dispatchEvent"in this?this.dispatchEvent(w):t(this).triggerHandler(w,e)})};t.fn.triggerHandler=function(w,e){var m,B;this.each(function(q,F){m=S(oa(w)?
t.Event(w):w);m._args=e;m.target=F;t.each(H(F,w.type||w),function(b,E){B=E.proxy(m);if(m.isImmediatePropagationStopped())return!1})});return B};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(w){t.fn[w]=function(e){return 0 in arguments?this.bind(w,e):this.trigger(w)}});t.Event=function(w,e){oa(w)||(e=w,w=e.type);var m=document.createEvent(da[w]||
"Events"),B=!0;if(e)for(var q in e)q=="bubbles"?B=!!e[q]:m[q]=e[q];m.initEvent(w,B,!0);return U(m)}})(A);(function(t){["width","height"].forEach(function(u){var H=u.replace(/./,function(K){return K[0].toUpperCase()});t.fn["outer"+H]=function(K){var z=this;if(z){var M=z[u]();({width:["left","right"],height:["top","bottom"]})[u].forEach(function(R){K&&(M+=parseInt(z.css("margin-"+R),10))});return M}return null}})})(A);(function(t){function u(w,e,m,B){if(w.global)return w=e||ea,m=t.Event(m),t(w).trigger(m,
B),!m.isDefaultPrevented()}function H(w){w.global&&t.active++===0&&u(w,null,"ajaxStart")}function K(w,e){var m=e.context;if(e.beforeSend.call(m,w,e)===!1||u(e,m,"ajaxBeforeSend",[w,e])===!1)return!1;u(e,m,"ajaxSend",[w,e])}function z(w,e,m,B){var q=m.context;m.success.call(q,w,"success",e);B&&B.resolveWith(q,[w,"success",e]);u(m,q,"ajaxSuccess",[e,m,w]);R("success",e,m)}function M(w,e,m,B,q){var F=B.context;B.error.call(F,m,e,w);q&&q.rejectWith(F,[m,e,w]);u(B,F,"ajaxError",[m,B,w||e]);R(e,m,B)}function R(w,
e,m){var B=m.context;m.complete.call(B,e,w);u(m,B,"ajaxComplete",[e,m]);m.global&&!--t.active&&u(m,null,"ajaxStop")}function U(){}function S(w){w&&=w.split(";",2)[0];return w&&(w=="text/html"?"html":w=="application/json"?"json":la.test(w)?"script":ca.test(w)&&"xml")||"text"}function Y(w,e){return e==""?w:(w+"&"+e).replace(/[&?]{1,2}/,"?")}function ba(w){w.processData&&w.data&&t.type(w.data)!="string"&&(w.data=t.param(w.data,w.traditional));!w.data||w.type&&w.type.toUpperCase()!="GET"&&"jsonp"!=w.dataType||
(w.url=Y(w.url,w.data),w.data=void 0)}function aa(w,e,m,B){t.isFunction(e)&&(B=m,m=e,e=void 0);t.isFunction(m)||(B=m,m=void 0);return{url:w,data:e,success:m,dataType:B}}function fa(w,e,m,B){var q,F=t.isArray(e),b=t.isPlainObject(e);t.each(e,function(E,v){q=t.type(v);B&&(E=m?B:B+"["+(b||q=="object"||q=="array"?E:"")+"]");!B&&F?w.add(v.name,v.value):q=="array"||!m&&q=="object"?fa(w,v,m,E):w.add(E,v)})}var oa=+new Date,ea=p.document,da,ha,ta=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,la=/^(?:text|application)\/javascript/i,
ca=/^(?:text|application)\/xml/i,qa=/^\s*$/,V=ea.createElement("a");V.href=p.location.href;t.active=0;t.ajaxJSONP=function(w,e){if(!("type"in w))return t.ajax(w);var m=w.jsonpCallback,B=(t.isFunction(m)?m():m)||"Zepto"+oa++,q=ea.createElement("script"),F=p[B],b,E=function(D){t(q).triggerHandler("error",D||"abort")},v={abort:E},Z;e&&e.promise(v);t(q).on("load error",function(D,X){clearTimeout(Z);t(q).off().remove();D.type!="error"&&b?z(b[0],v,w,e):M(null,X||"error",v,w,e);p[B]=F;b&&t.isFunction(F)&&
F(b[0]);F=b=void 0});if(K(v,w)===!1)return E("abort"),v;p[B]=function(){b=arguments};q.src=w.url.replace(/\?(.+)=\?/,"?$1="+B);ea.head.appendChild(q);w.timeout>0&&(Z=setTimeout(function(){E("timeout")},w.timeout));return v};t.ajaxSettings={type:"GET",beforeSend:U,success:U,error:U,complete:U,context:null,global:!0,xhr:function(){return new p.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",
text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:U};t.ajax=function(w){var e=t.extend({},w||{}),m=t.Deferred&&t.Deferred();for(da in t.ajaxSettings)e[da]===void 0&&(e[da]=t.ajaxSettings[da]);H(e);if(!e.crossDomain){var B=ea.createElement("a");B.href=e.url;B.href=B.href;e.crossDomain=V.protocol+"//"+V.host!==B.protocol+"//"+B.host}e.url||(e.url=p.location.toString());(B=e.url.indexOf("#"))>-1&&(e.url=e.url.slice(0,B));ba(e);var q=e.dataType;(B=/\?.+=\?/.test(e.url))&&
(q="jsonp");e.cache!==!1&&(w&&w.cache===!0||"script"!=q&&"jsonp"!=q)||(e.url=Y(e.url,"_="+Date.now()));if("jsonp"==q)return B||(e.url=Y(e.url,e.jsonp?e.jsonp+"=?":e.jsonp===!1?"":"callback=?")),t.ajaxJSONP(e,m);w=e.accepts[q];var F={};B=function(D,X){F[D.toLowerCase()]=[D,X]};var b=/^([\w-]+:)\/\//.test(e.url)?RegExp.$1:p.location.protocol,E=e.xhr(),v=E.setRequestHeader,Z;m&&m.promise(E);e.crossDomain||B("X-Requested-With","XMLHttpRequest");B("Accept",w||"*/*");if(w=e.mimeType||w)w.indexOf(",")>-1&&
(w=w.split(",",2)[0]),E.overrideMimeType&&E.overrideMimeType(w);(e.contentType||e.contentType!==!1&&e.data&&e.type.toUpperCase()!="GET")&&B("Content-Type",e.contentType||"application/x-www-form-urlencoded");if(e.headers)for(ha in e.headers)B(ha,e.headers[ha]);E.setRequestHeader=B;E.onreadystatechange=function(){if(E.readyState==4){E.onreadystatechange=U;clearTimeout(Z);var D=!1;if(E.status>=200&&E.status<300||E.status==304||E.status==0&&b=="file:"){q=q||S(e.mimeType||E.getResponseHeader("content-type"));
if(E.responseType=="arraybuffer"||E.responseType=="blob")var X=E.response;else{X=E.responseText;try{X=e.dataFilter==U?X:e.dataFilter.call(e.context,X,q),q=="script"?(0,eval)(X):q=="xml"?X=E.responseXML:q=="json"&&(X=qa.test(X)?null:t.parseJSON(X))}catch(ja){D=ja}if(D)return M(D,"parsererror",E,e,m)}z(X,E,e,m)}else M(E.statusText||null,E.status?"error":"abort",E,e,m)}};if(K(E,e)===!1)return E.abort(),M(null,"abort",E,e,m),E;E.open(e.type,e.url,"async"in e?e.async:!0,e.username,e.password);if(e.xhrFields)for(ha in e.xhrFields)E[ha]=
e.xhrFields[ha];for(ha in F)v.apply(E,F[ha]);e.timeout>0&&(Z=setTimeout(function(){E.onreadystatechange=U;E.abort();M(null,"timeout",E,e,m)},e.timeout));E.send(e.data?e.data:null);return E};t.get=function(){return t.ajax(aa.apply(null,arguments))};t.post=function(){var w=aa.apply(null,arguments);w.type="POST";return t.ajax(w)};t.getJSON=function(){var w=aa.apply(null,arguments);w.dataType="json";return t.ajax(w)};t.fn.load=function(w,e,m){if(!this.length)return this;var B=this,q=w.split(/\s/);w=aa(w,
e,m);var F=w.success;if(q.length>1){w.url=q[0];var b=q[1]}w.success=function(E){B.html(b?t("<div>").html(E.replace(ta,"")).find(b):E);F&&F.apply(B,arguments)};t.ajax(w);return this};var I=encodeURIComponent;t.param=function(w,e){var m=[];m.add=function(B,q){t.isFunction(q)&&(q=q());q==null&&(q="");this.push(I(B)+"="+I(q))};fa(m,w,e);return m.join("&").replace(/%20/g,"+")}})(A);(function(t){t.fn.serializeArray=function(){var u,H,K=[],z=function(M){if(M.forEach)return M.forEach(z);K.push({name:u,value:M})};
this[0]&&t.each(this[0].elements,function(M,R){H=R.type;(u=R.name)&&R.nodeName.toLowerCase()!="fieldset"&&!R.disabled&&H!="submit"&&H!="reset"&&H!="button"&&H!="file"&&(H!="radio"&&H!="checkbox"||R.checked)&&z(t(R).val())});return K};t.fn.serialize=function(){var u=[];this.serializeArray().forEach(function(H){u.push(encodeURIComponent(H.name)+"="+encodeURIComponent(H.value))});return u.join("&")};t.fn.submit=function(u){if(0 in arguments)this.bind("submit",u);else if(this.length){var H=t.Event("submit");
this.eq(0).trigger(H);H.isDefaultPrevented()||this.get(0).submit()}return this}})(A);(function(t,u){function H(la){return z?z+la:la.toLowerCase()}var K="",z,M={Webkit:"webkit",Moz:"",O:"o"},R=document.createElement("div"),U=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,S,Y,ba,aa,fa,oa,ea,da,ha={};R.style.transform===u&&t.each(M,function(la,ca){if(R.style[la+"TransitionProperty"]!==u)return K="-"+la.toLowerCase()+"-",z=ca,!1});var ta=K+"transform";ha[S=K+"transition-property"]=
ha[Y=K+"transition-duration"]=ha[aa=K+"transition-delay"]=ha[ba=K+"transition-timing-function"]=ha[fa=K+"animation-name"]=ha[oa=K+"animation-duration"]=ha[da=K+"animation-delay"]=ha[ea=K+"animation-timing-function"]="";t.fx={off:z===u&&R.style.transitionProperty===u,speeds:{_default:400,fast:200,slow:600},cssPrefix:K,transitionEnd:H("TransitionEnd"),animationEnd:H("AnimationEnd")};t.fn.animate=function(la,ca,qa,V,I){t.isFunction(ca)&&(V=ca,ca=qa=u);t.isFunction(qa)&&(V=qa,qa=u);t.isPlainObject(ca)&&
(qa=ca.easing,V=ca.complete,I=ca.delay,ca=ca.duration);ca&&=(typeof ca=="number"?ca:t.fx.speeds[ca]||t.fx.speeds._default)/1E3;I&&=parseFloat(I)/1E3;return this.anim(la,ca,qa,V,I)};t.fn.anim=function(la,ca,qa,V,I){var w,e={},m="",B=this,q=t.fx.transitionEnd,F=!1;ca===u&&(ca=t.fx.speeds._default/1E3);I===u&&(I=0);t.fx.off&&(ca=0);if(typeof la=="string")e[fa]=la,e[oa]=ca+"s",e[da]=I+"s",e[ea]=qa||"linear",q=t.fx.animationEnd;else{var b=[];for(w in la)U.test(w)?m+=w+"("+la[w]+") ":(e[w]=la[w],b.push(w.replace(/([A-Z])/g,
"-$1").toLowerCase()));m&&(e[ta]=m,b.push(ta));ca>0&&typeof la==="object"&&(e[S]=b.join(", "),e[Y]=ca+"s",e[aa]=I+"s",e[ba]=qa||"linear")}var E=function(v){if(typeof v!=="undefined"){if(v.target!==v.currentTarget)return;t(v.target).unbind(q,E)}else t(this).unbind(q,E);F=!0;t(this).css(ha);V&&V.call(this)};ca>0&&(this.bind(q,E),setTimeout(function(){F||E.call(B)},(ca+I)*1E3+25));this.size()&&this.get(0).clientLeft;this.css(e);ca<=0&&setTimeout(function(){B.each(function(){E.call(this)})},0);return this};
t.fn.stop=function(la,ca){return this};R=null})(A);(function(){try{getComputedStyle(void 0)}catch(u){var t=getComputedStyle;p.getComputedStyle=function(H,K){try{return t(H,K)}catch(z){return null}}}})();return A}(N));var Ha=function(){if(document.currentScript)var p=document.currentScript.src;else{p=document.scripts;for(var A=p.length-1,t,u=A;u>0;u--)if(p[u].readyState==="interactive"){t=p[u].src;break}p=t||p[A].src}A=p.indexOf("v=");A=A>0?p.substr(A+2):2023;p=p.substring(0,p.lastIndexOf("/")+1);
p.endsWith("zwplayer/")||(p+="js/");return{path:p,v:A}}(),La=Ha.path+"plugins/",Ma=function(p,A,t){var u=document.getElementsByTagName("head");if(u.length==0){u=document.createElement("head");var H=document.getElementsByTagName("body");if(H.length>0)H=H[0],document.insertBefore(u,H);else return alert("Invalid html document: no HEAD tag"),!1}else{u=u[0];H=u.childNodes;for(var K=0;K<H.length;K++){var z=H[K];if(z.nodeName.toUpperCase()==="SCRIPT"&&z.id&&z.id==p){if(z.getAttribute("loadstate")!="true"){var M=
function(){z.getAttribute("loadstate")!="true"?setTimeout(M,50):typeof t=="function"&&t(p)};setTimeout(M,50);return!1}typeof t=="function"&&t(p);return!0}}}var R=document.createElement("script");R.type="text/javascript";R.readyState?R.onreadystatechange=function(){if(R.readyState=="loaded"||R.readyState=="complete")R.onreadystatechange=null,R.setAttribute("loadstate","true"),typeof t=="function"&&t(p)}:R.onload=function(){R.setAttribute("loadstate","true");typeof t=="function"&&t(p)};R.id=p;R.src=
A;u.appendChild(R);return!1};(function(p,A,t){var u=document.getElementsByTagName("head");if(u.length==0){u=document.createElement("head");var H=document.getElementsByTagName("body");if(H.length>0)H=H[0],document.insertBefore(u,H);else return alert("Invalid html document: no HEAD tag found"),!1}else{u=u[0];H=u.childNodes;for(var K=0;K<H.length;K++){var z=H[K];if(z.nodeName.toUpperCase()==="link"&&z.id&&z.id==p){if(z.getAttribute("loadstate")!=="true"){var M=function(){z.getAttribute("loadstate")!==
"true"?setTimeout(M,50):typeof t==="function"&&t(p)};setTimeout(M,50);return!1}typeof t==="function"&&t(p);return!0}}}var R=document.createElement("link");R.type="text/css";R.setAttribute("rel","stylesheet");R.readyState?R.onreadystatechange=function(){if(R.readyState=="loaded"||R.readyState=="complete")R.onreadystatechange=null,R.setAttribute("loadstate","true"),typeof t=="function"&&t(p)}:R.onload=function(){R.setAttribute("loadstate","true");typeof t=="function"&&t(p)};R.id=p;R.href=A;u.appendChild(R);
return!1})("zwplayer-css",Ha.path+"css/zwplayer.css?v="+Ha.v,function(p){console.log("zwplayer.css["+p+"] is loaded")});var Za=function(p){return typeof HTMLElement==="object"?p instanceof HTMLElement:!(!p||typeof p!=="object"||p.nodeType!==1&&p.nodeType!==9||typeof p.nodeName!=="string")};Array.isArray||(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"});var Ra=/iPhone|iPad|iPod/.test(navigator.userAgent);(function(p){p+="=";for(var A=document.cookie.split(";"),
t=0;t<A.length;t++){var u=A[t].trim();if(u.indexOf(p)==0)return u.substring(p.length,u.length)}return""})("ZWPlayer")||gb("ZWPlayer","V1.0",365);var nb=function(p){for(var A=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],t=0;t<p.length;t++)for(var u=0;u<A.length;u++)if(p[t].lang&&A[u]&&A[u].indexOf(p[t].lang)>-1)return p[t].text;return p.length===1?p[0].text:null};HUAYI={};HUAYI.Danmu=function(){var p={playerObj:null,opacity:70,onInit:null,onClose:null,onResize:null};
return{create:function(A){var t={};for(k in p)t[k]=p[k];for(k in A)t[k]=A[k];typeof t.playerId=="undefined"&&(t.playerId="video-body");return new function(u){u=u.playerId;this.rows=[];this.timerId=this.rowCount=0;this.frameDuration=40;this.Danmulayer=null;this.danmuMargin=50;this.speedX=100;this.hasTransition=!0;this.rowHeight=28;this.topMargin=10;this.layerHeight=this.layerWidth=0;this.fontSize="25px";if(typeof u=="string")this.vPlayer=document.getElementById(u);else if(typeof u=="object")this.vPlayer=
u;else return;this.vPlayer||(this.vPlayer=document.getElementById("video-body"));if(this.vPlayer&&(u=this.vPlayer.childNodes,u.length>0))for(var H=0;H<u.length;H++){var K=u[H];if(K.nodeName=="DIV"&&Va(K.className,"danmuplayer")){this.wrapObj=K;break}}if(this.wrapObj){if(u=this.wrapObj.childNodes,u.length>0)for(H=0;H<u.length;H++)if(K=u[H],K.nodeName=="DIV"&&Va(K.className,"danmu-layer")){this.Danmulayer=K;break}}else this.wrapObj=document.createElement("div"),this.wrapObj.className="danmuplayer",
this.vPlayer.appendChild(this.wrapObj),this.Danmulayer=document.createElement("div"),this.Danmulayer.className="danmu-layer",this.wrapObj.appendChild(this.Danmulayer),Na.ie&&Na.ver<9&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");if(this.Danmulayer){this.hasTransition=typeof this.Danmulayer.style.transition!="undefined";this.rowCount=Math.floor(Math.floor((this.Danmulayer.offsetHeight-this.topMargin)*2/3)/this.rowHeight);if(this.rowCount>0)for(H=0;H<this.rowCount;H++)this.rows.push({top:this.topMargin+
this.rowHeight*H,count:0,last:null,idx:H});this.layerWidth=this.Danmulayer.offsetWidth;this.layerHeight=this.Danmulayer.offsetHeight;Ea.addElement(this.Danmulayer);this.Danmulayer.addEventListener("resize",function(z){this.reCalcLayout()}.bind(this))}this.start=function(z){this.timerId&&(clearInterval(this.timerId),this.timerId=0);if(!this.hasTransition){var M=this;this.timerId=setInterval(function(){var R=M.Danmulayer,U=R.childNodes;if(U.length>0){for(var S=[],Y=0;Y<U.length;Y++){var ba=U[Y];if(ba.tagName==
"DIV"){var aa=parseFloat(ba.style.left);aa+ba.offsetWidth<0?S.push(ba):ba.style.left=aa-4.5+"px"}}if(S.length>0){for(Y=0;Y<S.length;Y++)U=S[Y],U.rowIdx&&(M.rows[U.rowIdx].last==this&&(M.rows[U.rowIdx].last=null),M.rows[U.rowIdx].count--),R.removeChild(S[Y]);S.splice(0,S.length)}}},this.frameDuration)}};this.stop=function(){this.timerId&&(clearInterval(this.timerId),this.timerId=0);var z=this.Danmulayer.childNodes;if(z.length>0)for(var M=0;M<z.length;M++)z[M].style.display="none";this.Danmulayer.style.display=
"none"};this.destroy=function(){this.Danmulayer&&(Ea.removeElement(this.Danmulayer),delete this.Danmulayer);this.timerId&&(clearInterval(this.timerId),this.timerId=0);this.wrapObj&&this.vPlayer&&this.vPlayer.removeChild(this.wrapObj)};this.addDanmu=function(z,M){M||={};var R=document.createElement("div");R.className="danmu";typeof z.color=="undefined"||M.isFilterColorFont||(R.style.color=z.color);typeof z.border!="undefined"&&(R.style.border="1px solid #666");R.style.fontSize=M.forcedFontSizeValue?
parseInt(25*M.forcedFontSizeValue/100)+"px":"25px";this.fontSize!=R.style.fontSize&&(this.rowHeight=parseInt(R.style.fontSize)+3,this.layerHeight=0,this.reCalcLayout(),this.fontSize=R.style.fontSize);z.outlineColor&&(R.style.outlineStyle="solid",R.style.outlineWidth="2px",R.style.outlineColor=z.outlineColor);R.style.opacity=M.opacityValue?M.opacityValue/100:"0.9";R.innerHTML=typeof N.replaceSmileDanmu=="function"?N.replaceSmileDanmu(z.text,this.rowHeight,M):z.text;var U=z=0,S=999999;this.rowCount>
this.rows.length&&(this.rowCount=this.rows.length);for(;z<this.rowCount;z++)if(this.rows[z].count==0){U=z;S=this.layerWidth;break}else if(this.rows[z].last){var Y=this.rows[z].last;Y=Y.getBoundingClientRect().left+Y.offsetWidth+this.danmuMargin;if(Y<S&&(U=z,S=Y,S<this.layerWidth))break}S<this.layerWidth&&(S=this.layerWidth);R.style.fontFamily='SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif';R.style.textShadow="rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px";
R.style.cursor="pointer";R.style.left=S+"px";R.style.top=this.rows[U].top+"px";R.rowIdx=U;this.rows[U].last=R;this.rows[U].count++;this.Danmulayer.appendChild(R);var ba=this;R.onmouseover=function(aa){this.pause||(this.pause=!0)};R.onmouseout=function(aa){this.pause&&(this.pause=!1)};this.hasTransition&&(R.addEventListener("transitionend",function(){typeof this.rowIdx=="number"&&(ba.rows[this.rowIdx].last==this&&(ba.rows[this.rowIdx].last=null),ba.rows[this.rowIdx].count--);ba.Danmulayer.removeChild(this)}),
z=S+R.offsetWidth,M.speedValue?(M=parseInt(this.speedX*parseFloat(M.speedValue)),M==0&&(M=1),M=z/M+4*Math.random()):M=z/this.speedX+4*Math.random(),R.style.transition="transform "+M+"s linear",R.style.transform="translateX(-"+z+"px)")};this.reCalcLayout=function(){if(this.Danmulayer){Na.ie&&Na.ver<9&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");var z=this.Danmulayer.offsetHeight;if(z!=this.layerHeight){this.rowCount=Math.floor(Math.floor((z-this.topMargin)*2/3)/this.rowHeight);if(this.rowCount>
0)if(this.rowCount>this.rows.length)for(var M=this.rows.length;M<this.rowCount;M++)this.rows.push({top:this.topMargin+this.rowHeight*M,count:0,last:null,idx:M});else for(M=0;M<this.rowCount;M++)this.rows[M].top=this.topMargin+this.rowHeight*M;this.layerHeight=z}if(this.Danmulayer.offsetWidth!=this.layerWidth){z=this.Danmulayer.childNodes;if(z.length>0)for(M=0;M<z.length;M++);this.layerWidth=this.Danmulayer.offsetWidth}}};this.hasTransition||this.start()}(t)}}}();var Ea={_onResize:function(p){var A=
p.target||p.srcElement;if(A=A.__resizeTrigger__?A.__resizeTrigger__:A){var t=A.__z_resizeListeners;if(t)for(var u=t.length,H=0;H<u;H++){var K=t[H],z=K.handler;(K=K.context)||(K=A);if(z)z.apply(K,[p]);else if(p.type==="resize"||Object.prototype.toString.call(p)==="[object ResizeObserverEntry]")z=document.createEvent("Event"),z.initEvent("resize",!1,!1),A.dispatchEvent(z)}}},addElement:function(p,A,t){var u=p.__z_resizeListeners;if(!u)if(u=[],p.__z_resizeListeners=u,typeof N.ResizeObserver==="function")this.resizeObserver||
(this.resizeObserver=new ResizeObserver(function(K){for(var z=0;z<K.length;z++)this._onResize(K[z])}.bind(this))),this.resizeObserver.observe(p);else{getComputedStyle(p,null).position==="static"&&(p.style.position="relative");var H=document.createElement("object");H.resizer=this;H.__resizeElement__=p;H.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; z-index: -9999;");H.type="text/html";H.data="about:blank";H.onload=
function(K){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",this.resizer._onResize)};p.appendChild(H);p.__resizeDetector__=H}u.push({handler:A,context:t})},removeElement:function(p,A,t){var u=p.__z_resizeListeners;if(u){for(var H=u.length,K=0;K<H;K++){var z=u[K];if(z.handler===A&&z.context===t){u.splice(K,1);break}}if(u.length===0){if(A=p.__resizeDetector__)A.contentDocument.defaultView.removeEventListener("resize",
this._onResize),p.removeChild(A),delete p.__resizeDetector__;delete p.__z_resizeListeners;this.resizeObserver&&this.resizeObserver.unobserve(p)}}}},Na=function(){var p,A,t,u,H,K,z=navigator.userAgent.toLowerCase(),M;(M=z.match(/chrome\/([\d.]+)/),M)?p=M[1]:(M=z.match(/firefox\/([\d.]+)/),M)?A=M[1]:(M=z.match(/edge\/([\d.]+)/),M)?t=M[1]:(M=z.match(/rv:([\d.]+)\) like gecko/),M)?u=M[1]:(M=z.match(/msie ([\d.]+)/),M)?u=M[1]:(M=z.match(/opera.([\d.]+)/),M)?H=M[1]:(M=z.match(/version\/([\d.]+).*safari/),
M)?K=M[1]:K=!1;return p?{broswer:"Chrome",version:p,chrome:!0,ver:parseInt(p)}:A?{broswer:"Firefox",version:A,firefox:!0,ver:parseInt(A)}:K?{broswer:"Safari",version:K,ver:parseInt(K)}:t?{broswer:"Edge",version:t,edge:!0,ver:parseInt(t)}:u?{broswer:"IE",version:u,ie:!0,ver:parseInt(u)}:H?{broswer:"Opera",version:H,opera:!0,ver:parseInt(H)}:{broswer:"",version:"0",ver:0}}(),$a={about:"\u5173\u4e8e",current:"\u5f53\u524d","qs-auto":"\u81ea\u52a8\u5207\u6362",enterFullScreen:"\u8fdb\u5165\u5168\u5c4f",
exitFullScreen:"\u9000\u51fa\u5168\u5c4f",subtitleOff:"\u5b57\u5e55\u5173\u95ed",FULL_HD1:"\u539f\u753b",allSubtitle:"\u5b57\u5e55\u603b\u5f00\u5173",closeSmallWindow:"\u5173\u95ed\u5c0f\u7a97\u53e3\u6a21\u5f0f",mainSubtitle:"\u9ed8\u8ba4\u5b57\u5e55",secondSubtitle:"\u7b2c\u4e8c\u5b57\u5e55",speed:"\u500d\u901f",muted:"\u9759\u97f3",unmuted:"\u5173\u95ed\u9759\u97f3",danmuEnabled:"\u5f00\u542f\u5f39\u5e55",danmuDisabled:"\u5173\u95ed\u5f39\u5e55",playbackSpeed1x:"1.0x\u64ad\u653e",playbackSpeed2x:"2.0x\u64ad\u653e",
level:"\u7ea7\u522b","media-prop":"\u5a92\u4f53\u6d41\u5c5e\u6027","player-help":"\u4f7f\u7528\u8bf4\u660e","version-update":"\u7248\u672c\u66f4\u65b0",HD1:"\u8d85\u6e05",SD1:"\u9ad8\u6e05",SD2:"\u6807\u6e05",HD:"\u9ad8\u6e05",FHD:"\u5168\u9ad8\u6e05",BD:"\u84dd\u5149","BD 4M":"\u84dd\u51494M","BD 8M":"\u84dd\u51498M",waitStreamToReady:"\u6b63\u5728\u7b49\u5f85\u8282\u76ee...",externalSubtitle:"\u5916\u6302\u5b57\u5e55",qualitySelection:"\u6e05\u6670\u5ea6\u9009\u62e9",danmuSettings:"\u5f39\u5e55\u8bbe\u7f6e",
selectEmotion:"\u9009\u62e9\u8868\u60c5",loginToSendDanmu:"\u767b\u5f55\u540e\u624d\u53ef\u4ee5\u53d1\u9001\u5f39\u5e55\u54e6",send:"\u53d1\u9001",settings:"\u8bbe\u7f6e",recordVideo:"\u5b8c\u6574\u5f55\u5236",recordAudio:"\u4ec5\u5f55\u97f3\u9891",shortcutRecord:"\u5f00\u59cb / \u505c\u6b62\u5f55\u5236",webFullscreen:"\u7f51\u9875\u5168\u5c4f",snapshot:"\u6293\u53d6\u56fe\u50cf",selectLocalVideo:"\u9009\u62e9\u672c\u5730\u89c6\u97f3\u9891\u6587\u4ef6",pictureInPicture:"\u753b\u4e2d\u753b\u6a21\u5f0f",
chapters:"\u7ae0\u8282",chapterList:"\u7ae0\u8282\u5217\u8868",danmu:"\u5f39\u5e55",login:"\u767b\u5f55",loginToParticipate:"\u767b\u5f55\u540e\u53ef\u4ee5\u53c2\u4e0e\u5f39\u5e55",brightness:"\u4eae\u5ea6",contrast:"\u5bf9\u6bd4\u5ea6",saturation:"\u9971\u548c\u5ea6",hue:"\u8272\u8c03",reset:"\u91cd\u7f6e",colorfulText:"\u5f69\u8272\u6587\u5b57",imageEmoji:"\u56fe\u7247\u8868\u60c5",mirrorHorizontal:"\u5de6\u53f3\u7ffb\u8f6c",mirrorVertical:"\u4e0a\u4e0b\u7ffb\u8f6c",rotate90Clockwise:"\u987a90\u5ea6\u7ffb\u8f6c",
rotate90Counterclockwise:"\u900690\u5ea6\u7ffb\u8f6c",loopPlayback:"\u5faa\u73af\u64ad\u653e",recordingSettings:"\u5f55\u5236\u8bbe\u7f6e...",recordingSettingsTitle:"\u5f55\u5236\u8bbe\u7f6e",recordingOptionAsk:"\u6bcf\u6b21\u8be2\u95ee",recordingOptionVideo:"\u5b8c\u6574\u5f55\u5236",recordingOptionAudio:"\u4ec5\u63d0\u53d6\u97f3\u9891",recordingNote:"\u6ce8\u610f\uff1a\u5982\u679c\u6ca1\u6709\u97f3\u9891\uff0c\u5219\u76f4\u63a5\u5f55\u5236\u89c6\u9891",audioVolumeBoost:"\u97f3\u6548\u8c03\u8282...",
videoColorTuning:"\u89c6\u9891\u8272\u5ea6\u8c03\u8282...",videoColorAdjustment:"\u89c6\u9891\u8272\u5ea6\u8c03\u8282",audioEffectAdjustment:"\u97f3\u6548\u8c03\u8282",volumeBoost:"\u97f3\u91cf\u589e\u5f3a",selectOrDropVideo:"\u9009\u62e9\u6216\u62d6\u62fd\u89c6\u97f3\u9891\u6587\u4ef6",supportedFormats:"\u652f\u6301 MP4, WebM, MOV, MKV, M4V, OGG, FLAC, WAV, M4A, MP3, OPUS \u7b49\u683c\u5f0f",dragDropToPlay:"\u62d6\u62fd\u89c6\u97f3\u9891\u6587\u4ef6\u5230\u6b64\u5904\u64ad\u653e",pipModePlaying:"\u6b63\u5728\u300c\u753b\u4e2d\u753b\u300d\u6a21\u5f0f\u4e0b\u64ad\u653e",
exitPictureInPicture:"\u9000\u51fa\u753b\u4e2d\u753b",close:"\u5173\u95ed\u63d0\u793a",unsupportedChapterFormat:"\u4e0d\u652f\u6301\u7684\u7ae0\u8282\u683c\u5f0f",invalidChapterFormat:"\u7ae0\u8282\u6587\u4ef6\u683c\u5f0f\u65e0\u6548",failedToReadChapter:"\u8bfb\u53d6\u7ae0\u8282\u6587\u4ef6\u5931\u8d25",chapterValidationFailed:"\u7ae0\u8282\u6587\u4ef6\u9a8c\u8bc1\u5931\u8d25",unsupportedSubtitleFormat:"\u4e0d\u652f\u6301\u7684\u5b57\u5e55\u683c\u5f0f",invalidSubtitleFormat:"\u5b57\u5e55\u6587\u4ef6\u683c\u5f0f\u65e0\u6548",
failedToReadSubtitle:"\u8bfb\u53d6\u5b57\u5e55\u6587\u4ef6\u5931\u8d25",subtitleValidationFailed:"\u5b57\u5e55\u6587\u4ef6\u9a8c\u8bc1\u5931\u8d25",localFileDisabled:"\u672c\u5730\u6587\u4ef6\u64ad\u653e\u529f\u80fd\u5df2\u7981\u7528",unsupportedFileFormat:"\u4e0d\u652f\u6301\u7684\u6587\u4ef6\u683c\u5f0f",playbackFailedUnsupportedFormat:"\u64ad\u653e\u5931\u8d25\uff0c\u4e0d\u652f\u6301\u7684\u5a92\u4f53\u683c\u5f0f",fileValidationFailed:"\u6587\u4ef6\u683c\u5f0f\u9a8c\u8bc1\u5931\u8d25",playingFile:"\u6b63\u5728\u64ad\u653e",
switchedToQuality:"\u5df2\u7ecf\u4e3a\u60a8\u5207\u6362\u5230",quality:"\u753b\u8d28",mutedAutoplayMessagePre:"\u56e0",mutedAutoplayMessagePost:"\uff0c\u5df2\u9759\u97f3\u64ad\u653e\uff0c\u8bf7\u70b9\u51fb",browserLimits:"\u6d4f\u89c8\u5668\u9650\u5236",openAudio:"\u6253\u5f00\u58f0\u97f3",browserRestrictionsInfo:"\u5f53\u60a8\u8bbf\u95ee\u672c\u7f51\u7ad9\u7684\u6b21\u6570\u8f83\u5c11\uff0c\u6216\u7ecf\u5e38\u9759\u97f3\u64ad\u653e\u65f6\uff0c\u6d4f\u89c8\u5668\u53ef\u80fd\u4f1a\u9650\u5236\u7f51\u7ad9\u97f3\u91cf\uff0c\u5bfc\u81f4\u7f51\u7ad9\u65e0\u6cd5\u8fdb\u884c\u6709\u58f0\u81ea\u52a8\u64ad\u653e\u3002",
iUnderstand:"\u6211\u77e5\u9053\u4e86",danmuItems:"items",danmuDensityDefault:"30 items",danmuSendSettings:"\u53d1\u9001\u8bbe\u7f6e",danmuViewSettings:"\u89c2\u770b\u8bbe\u7f6e",danmuBlockSettings:"\u5c4f\u853d\u8bbe\u7f6e",danmuTextColor:"\u6587\u5b57\u989c\u8272",danmuTextBorder:"\u6587\u5b57\u8fb9\u6846",danmuOpacity:"\u4e0d\u900f\u660e\u5ea6",danmuFontSize:"\u6587\u5b57\u5927\u5c0f",danmuScrollSpeed:"\u6eda\u52a8\u901f\u5ea6",danmuDensity:"\u6392\u5217\u5bc6\u5ea6",danmuTopArea:"\u9876\u90e8\u533a\u57df",
danmuBottomArea:"\u5e95\u90e8\u533a\u57df",danmuColorFilter:"\u989c\u8272\u8fc7\u6ee4",keyboardShortcuts:"\u5feb\u6377\u952e\u8bf4\u660e",shortcutPlayPause:"\u64ad\u653e/\u6682\u505c",shortcutSeekRight:"\u5355\u6b21\u5feb\u8fdb5s\uff0c\u957f\u6309\u500d\u901f\u64ad\u653e",shortcutSeekLeft:"\u5feb\u90005s\uff0c\u957f\u6309\u8fde\u7eed\u64cd\u4f5c",shortcutVolume:"\u97f3\u91cf\u589e\u52a0/\u964d\u4f4e 5%",shortcutMute:"\u9759\u97f3 / \u5173\u95ed\u9759\u97f3",shortcutDanmu:"\u5f00\u542f / \u5173\u95ed\u5f39\u5e55",
shortcutSendDanmu:"\u53d1\u9001\u5f39\u5e55",shortcutSpeed1x:"\u4e00\u500d\u901f (\u6b63\u5e38\u500d\u6570)",shortcutSpeed2x:"\u4e8c\u500d\u901f",shortcutExit:"\u5173\u95ed\u83dc\u5355 / \u9000\u51fa\u5168\u5c4f",shortcutFullscreen:"\u5168\u5c4f / \u9000\u51fa\u5168\u5c4f",autoplayBlocked:"\u6d4f\u89c8\u5668\u963b\u6b62\u4e86\u81ea\u52a8\u64ad\u653e",playbackFailed:"\u64ad\u653e\u5931\u8d25",restartPlayback:"\u91cd\u64ad",shortcutRestart:"\u91cd\u64ad",lightOn:"\u706f\u5149\u5f00\u542f",lightOff:"\u706f\u5149\u5173\u95ed",
shortcutLight:"\u5f00/\u5173\u706f\u5149",segmentSelect:"\u9009\u62e9\u7247\u6bb5",record:"\u5f55\u5236"},ab={},bb={FULL_HD1:"RAW",HD1:"FHD",SD1:"HD",SD2:"SD",about:"About",current:"Current","qs-auto":"Auto",enterFullScreen:"Enter Fullscreen",exitFullScreen:"Exit Fullscreen",subtitleOff:"Subtitles Off",allSubtitle:"All Subtitles",closeSmallWindow:"Close Small Window",mainSubtitle:"Main Subtitle",secondSubtitle:"Second Subtitle",speed:"Rate",muted:"Muted",unmuted:"Unmuted",danmuEnabled:"Danmu Enabled",
danmuDisabled:"Danmu Disabled",playbackSpeed1x:"Speed: 1x",playbackSpeed2x:"Speed: 2x",level:"Level","media-prop":"Media Properties","player-help":"User Guide","version-update":"Version Update",HD:"HD",FHD:"FHD",BD:"BD","BD 4M":"BD 4M","BD 8M":"BD 8M",waitStreamToReady:"Waiting for stream to be ready...",externalSubtitle:"External Subtitles",qualitySelection:"Quality Selection",danmuSettings:"Danmu Settings",selectEmotion:"Select Emotion",loginToSendDanmu:"Login required to send danmu",send:"Send",
settings:"settings",recordVideo:"Full Recording",recordAudio:"Audio Only",shortcutRecord:"Start / Stop Recording",webFullscreen:"Web Fullscreen",snapshot:"Snapshot",selectLocalVideo:"Select Local Video File",pictureInPicture:"Picture-in-Picture",chapters:"Chapters",chapterList:"Chapter List",danmu:"Danmu",login:"Login",loginToParticipate:"Login to participate in danmu",videoColorAdjustment:"Video Color Adjustment",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",hue:"Hue",reset:"Reset",
colorfulText:"Color",imageEmoji:"Emoji",mirrorHorizontal:"H-Mirror",mirrorVertical:"V-Mirror",rotate90Clockwise:"90 CW",rotate90Counterclockwise:"90 CCW",loopPlayback:"Loop",recordingSettings:"Recording Settings...",recordingSettingsTitle:"Recording Settings",recordingOptionAsk:"Ask Every Time",recordingOptionVideo:"Full Recording",recordingOptionAudio:"Audio Only",recordingNote:"Note: If no audio is present, video will be recorded directly",audioVolumeBoost:"Audio Effects...",videoColorTuning:"Color Tuning...",
audioEffectAdjustment:"Audio Effects",volumeBoost:"Gain",selectOrDropVideo:"Select or drag video/audio files",supportedFormats:"Supports MP4, WebM, MOV, MKV, M4V, OGG, FLAC, WAV, M4A, MP3, OPUS and other formats",dragDropToPlay:"Drag and drop video/audio files here to play",pipModePlaying:"Playing in Picture-in-Picture mode",exitPictureInPicture:"Exit Picture-in-Picture",close:"Close",unsupportedChapterFormat:"Unsupported chapter format",invalidChapterFormat:"Invalid chapter file format",failedToReadChapter:"Failed to read chapter file",
chapterValidationFailed:"Chapter file validation failed",unsupportedSubtitleFormat:"Unsupported subtitle format",invalidSubtitleFormat:"Invalid subtitle file format",failedToReadSubtitle:"Failed to read subtitle file",subtitleValidationFailed:"Subtitle file validation failed",localFileDisabled:"Local file playback is disabled",unsupportedFileFormat:"Unsupported file format",playbackFailedUnsupportedFormat:"Playback failed, unsupported media format",fileValidationFailed:"File validation failed",playingFile:"playing",
switchedToQuality:"Switched to",quality:"quality",mutedAutoplayMessagePre:"Muted due to ",mutedAutoplayLimit:"browser restrictions",mutedAutoplayMessagePost:". Click to ",openAudio:"Enable",browserRestrictionsInfo:"Browsers may limit audio volume when you visit this site infrequently or often play muted content, preventing automatic audio playback.",iUnderstand:"OK",browserLimits:"Browser Restrictions",danmuItems:"items",danmuDensityDefault:"30 items",danmuSendSettings:"Send",danmuViewSettings:"View",
danmuBlockSettings:"Block",danmuTextColor:"Text Color",danmuTextBorder:"Border",danmuOpacity:"Opacity",danmuFontSize:"Font Size",danmuScrollSpeed:"Speed",danmuDensity:"Density",danmuTopArea:"Top Area",danmuBottomArea:"Bottom Area",danmuColorFilter:"Color Filter",keyboardShortcuts:"Keyboard Shortcuts",shortcutPlayPause:"Play / Pause",shortcutSeekRight:"Single press: forward 5s, hold: speed playback",shortcutSeekLeft:"Rewind 5s (hold for continuous operation)",shortcutVolume:"Increase / decrease volume by 5%",
shortcutMute:"Mute / Unmute",shortcutDanmu:"Enable / Disable Danmu",shortcutSendDanmu:"Send Danmu",shortcutSpeed1x:"1x Speed (Normal)",shortcutSpeed2x:"2x Speed",shortcutExit:"Close menu / Exit fullscreen",shortcutFullscreen:"Fullscreen / Exit fullscreen",autoplayBlocked:"Autoplay blocked by browser",playbackFailed:"Playback failed",restartPlayback:"Restart",shortcutRestart:"Restart",lightOn:"Light On",lightOff:"Light Off",shortcutLight:"Light Toggle",segmentSelect:"Select Segment",record:"Record"},
Fa="en",Ca={"zh-CN":$a,zh:$a,"zh-HK":ab,"zh-TW":ab,"en-US":bb,en:bb};let Oa="en";N.navigator&&(navigator.languages&&navigator.languages.length&&navigator.languages[0].toLowerCase().startsWith("zh")||navigator.language&&navigator.language.toLowerCase().startsWith("zh")||navigator.browserLanguage&&navigator.browserLanguage.toLowerCase().startsWith("zh")||navigator.systemLanguage&&navigator.systemLanguage.toLowerCase().startsWith("zh")||navigator.userLanguage&&navigator.userLanguage.toLowerCase().startsWith("zh"))?
(Oa="zh",console.log("\u4e2d\u6587\u6d4f\u89c8\u5668\uff0c\u8bbe\u7f6e\u64ad\u653e\u5668\u4e3a\u4e2d\u6587\u3002")):(Oa="en",console.log("\u975e\u4e2d\u6587\u6d4f\u89c8\u5668\uff0c\u8bbe\u7f6e\u64ad\u653e\u5668\u4e3a\u82f1\u6587\u3002"));Fa=Oa;var P=function(p,A,t){t=t||Fa;var u=Ca[t];if(u){if(u[p])return u[p];if(t!=="en"&&Ca.en&&Ca.en[p])return Ca.en[p];if(t!=="zh-CN"&&Ca["zh-CN"]&&Ca["zh-CN"][p])return Ca["zh-CN"][p]}return A||p},ob=function(){for(var p='<div class="zwp-button zwp-speedButton"><button class="zwpbtn zwp-speedBtn" data-action="showSpeedMenu" data-name="speedbtn">'+
P("speed","Rate")+'</button><ul class="zwp-speedMenu">',A="2.0x 1.5x 1.25x 1.0x 0.75x 0.5x 0.25x".split(" "),t="",u=0;u<A.length;u++)t=u===3?t+('<li class="zwp-speed-item active">'+A[u]+"</li>"):t+('<li class="zwp-speed-item">'+A[u]+"</li>");return p+t+"</ul></div>"},cb=function(){var p='<div class="zwp-option-item main"><label class="zwp-option-item-label">'+P("allSubtitle","All subtitle")+'</label><div class="zwp-option-item-value">'+Ga("","subtitleOn")+"</div></div>";p+='<div class="zwp-option-item sub1" style="display: none;"><label class="zwp-option-item-label">'+
P("mainSubtitle","Main subtitle")+'</label><div class="zwp-option-item-value">'+Ga("","subtitleDefault")+"</div></div>";return p+='<div class="zwp-option-item sub2" style="display: none;"><label class="zwp-option-item-label">'+P("secondSubtitle","Second subtitle")+'</label><div class="zwp-option-item-value">'+Ga("","subtitleSecond")+"</div></div>"},pb=function(p){var A='<li class="zwp-subtitles-item" data-id="-1">'+P("subtitleOff","Captions off")+"</li>";for(var t=0;t<p.length;t++)A=t===0?A+('<li class="zwp-subtitles-item active" data-id="'+
p[t].id+'">'+p[t].name+"</li>"):A+('<li class="zwp-subtitles-item" data-id="'+p[t].id+'">'+p[t].name+"</li>");return'<ul class="zwp-subtitlesMenu">'+A+"</ul>"},qb=function(){var p="",A=(new Date).getTime();p=p+'<div class="zwp-toolbox-ground-right zwp-dmform zwp_danmu-controlbar"> <div class="zwp_switch_group">   <div class="zwp_switch_text">'+(P("danmu","Danmu")+"</div>");p=p+('   <div class="zwp_switch" id="danmuSwitch-'+A+'"><i class="switch_inner"></i></div> </div> <div class="zwp_dmconfig zwp_dmicon" id="danmu-config-btn-')+
(A+'" title="'+P("danmuSettings","Danmu Settings")+'"><i class="xicon xicon-subtitles"></i></div>');p=p+(' <div class="zwp-barrage_form" id="barrage_form-'+A+'">   <div class="zwp-barrage_inp logined">    <input id="barrage_inp_text-')+(A+'" type="text" class="barrage_inp_text" maxlength="40" disabled="disabled" readonly="readonly">    <div class="barrage_login" href="#login"><span class="barrage_text">')+(P("login","Login")+"</span>"+P("loginToParticipate"," to participate in danmu")+"</div>");p+=
"   </div>";p+='   <a class="btn_bubble disabled" href="javascript:void(0);" title="'+P("selectEmotion","Select Emotion")+'" data-viewid="smilesFaces-view-'+A+'"><i class="xicon xicon-smile"></i></a>';p+='   <button type="submit" class="btn_submit vtb_disabled" title="'+P("loginToSendDanmu","Login required to send danmu")+'" disabled="disabled">'+P("send","Send")+"</button>";p+=" </div>";p+=' <div class="zwp-barrage-set hidden" data-barrage-panel="panel" data-render="0"></div>';return p+="</div>"},
Pa=function(p){if(typeof p==="number")return p;p=p.split(":");return p.length===2?parseInt(p[0])*60+parseInt(p[1]):p.length===3?parseInt(p[0])*3600+parseInt(p[1])*60+parseInt(p[2]):p.length===1?parseFloat(p[0]):p.length>3?9.999999999999999E8:0},rb=function u(A,t){var H=(u.canvas||(u.canvas=document.createElement("canvas"))).getContext("2d");H.font=t;return H.measureText(A).width},sb=function(A,t){var u="";if(!t||!Array.isArray(t))return"";for(var H=0;H<t.length;H++){var K=t[H],z=Pa(K.time);if(!(z>=
A)){var M=z*100/A+"%",R=K.title||K.text||K.time+"";if(typeof K.duration!=="undefined"){var U="red";K.style&&typeof K.style.background!=="undefined"&&(U=K.style.background);var S=Pa(K.duration);z+S>A&&(S=A-z);u+='<span class="zwp__chapter_dot zwp_bar" style="left: '+M+"; width: "+(S*100/A+"%; border-radius: 3px; background-color: ")+U+';" title="'+R+'" data-time="'+K.time+'" data-desc="'+K.desc+'">&nbsp;</span>'}else u+='<span class="zwp__chapter_dot" style="left: '+M+'" title="'+R+'" data-time="'+
K.time+'" data-desc="'+K.desc+'">&nbsp;</span>'}}return u},db=function(A){return A.replace(/[<>&"]/g,function(t){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[t]})},tb=function(A){if(!A||!Array.isArray(A)||A.length===0)return null;var t='<div class="zwp-button zwp-chapterButton"><button class="zwpbtn zwp-chapterBtn" data-action="showChapterListview" data-name="chapterbtn"><i class="xicon xicon-chapter"></i> '+P("chapters","Chapters")+'</button><div class="zwp-chapterPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
P("chapterList","Chapter List")+'</div><div class="zwp-list-inner"><ul class="zwp-chapterlist">';for(var u=0,H=0;H<A.length;H++){var K=A[H],z=K.title||K.text||K.time+"";z=db(z);a:{var M=K.time;if(typeof M==="string"){if(M.indexOf(":")>=0){var R=M;break a}M=parseInt(M)}R=parseInt(M/3600);var U=parseInt(M%3600/60);M=parseInt(M%60);var S="";R>0&&(S+=R+":");U>=0?(U>10||R>0&&(S+="0"),S+=U+":"):S+="0:";R=S=M>=10?S+M:S+("0"+M)}U='<li class="chapter-item" data-time="'+K.time+'">';U+='<div class="item-title"><span class="item-time">'+
R+"</span>";U+='<span class="title" title="'+z+'">'+z+"</span></div>";K.desc&&(U+='<div class="item-content"><span class="desc">'+db(K.desc)+"</span></div>");U+="</li>";t+=U;K=rb(z,'bold 16px "Microsoft YaHei", "Segoe UI","PingFang SC","Hiragino Sans GB","Helvetica Neue",Helvetica,Arial,sans-serif,-apple-system,BlinkMacSystemFont');K>u&&(u=K)}return{html:t+"</ul></div></div></div>",titleWidth:u}};N.insertSmile=function(A,t){A=$$(A).closest("div.zwp-smileview");if(A.length>0&&(A=A.get(0).inputbox))if(A.createTextRange&&
(A.caretPos=document.selection.createRange().duplicate()),document.all)A.createTextRange&&A.caretPos?(A=A.caretPos,A.text=A.text.charAt(A.text.length-1)==" "?t+" ":t):A.value=t;else if(A.setSelectionRange){var u=A.selectionEnd,H=A.value.substring(0,A.selectionStart);u=A.value.substring(u);A.value=H+t+u}else alert("This version of Mozilla based browser does not support setSelectionRange")};N.replaceSmileDanmu=function(A,t,u){if(typeof A!="string")return"";A.indexOf("<")>=0&&(A=A.replace(/</g,"&lt;").replace(/>/g,
"&gt;"));var H=A.indexOf("[sm-");if(H<0)return A;var K=Ha.path+"widgets/smiles/p",z="",M=A.substring(0,H);for(M!=""&&(z+=M);H>=0;){M=A.indexOf("]",H+4);if(M<0){M=A.substring(H);M!=""&&(z+=M);break}H=A.substring(H+4,M);H!=""&&(u.isFilterImage||(z+='<img style="opacity: 1;" src="'+K+H+'.png" height="'+t+'">'));H=A.indexOf("[sm-",M+1);H<0?(M=A.substring(M+1),M!=""&&(z+=M)):H>M+1&&(z+=A.substring(M+1,H))}return z};var Sa=function(A){hasClass(A,"switch_on")?removeClass(A,"switch_on"):addClass(A,"switch_on")},
ub=function(A,t){var u=$$;A=u(t).closest("div.zwp-dmform").children(".zwp-barrage-set");if(A.length!=0){if(A.attr("data-render")!="1"){var H=t.zwplayer,K=A.get(0);u.get(Ha.path+"widgets/danmu_setting.html?v="+Ha.v,{},function(R){var U=u(K);U.html(R);lb(U);U.find("a.barrage-tab-link").click(function(S){S.preventDefault();S=u(this).parent();S.hasClass("selected")||(S.addClass("selected").siblings().removeClass("selected"),S=u(S.attr("data-tab")),S.hasClass("hidden")&&(S.removeClass("hidden"),S.siblings().addClass("hidden")))});
R=u("#fsBox_tab");R.find("div.color-box").children("a").click(function(S){S.preventDefault();S=u(this);S.hasClass("selected")||(S.siblings().removeClass("selected"),S.addClass("selected"),H&&(H.danmuSetting.color=S.attr("data-color")))});R.find("div.other-box").children("a.checkbox-wrap").click(function(S){S.preventDefault();var Y=u(this);Y.toggleClass("selected");S=Y.attr("data-content");Y=Y.hasClass("selected");H&&(H.danmuSetting[S]=Y)});u("#bfBox_tab").find("a.zwp-barrage-icons").mousedown(function(S){if(S.button==
0){this.isMousePressed=!0;var Y=u(this).position().left,ba=S.clientX-Y,aa=this,fa=function(ea){var da=ea.clientX-ba;da<0?da=0:da>134&&(da=134);u(aa).css({left:da+"px"});ea=u(aa).siblings("div.bar-t");ea.length>0&&ea.width(da+3);aa.valuePanel||(aa.valuePanel=u(aa).parent().siblings("div.set-rol-right").get(0));if(typeof aa.valuePanel=="object"){ea=u(aa.valuePanel);var ha=ea.attr("data-barrage-content");ha=="opacityValue"?(da=parseInt(da*100/138),H&&(H.danmuSetting.opacityValue=da),ea.html(da+"%")):
ha=="forcedFontSizeValue"?(da=50+parseInt(da*150/138),H&&(H.danmuSetting.forcedFontSizeValue=da),ea.html(da+"%")):ha=="speedValue"?(da=(.5+parseFloat(da/69)).toFixed(1),H&&(H.danmuSetting.speedValue=da),ea.html(da+"x")):ha=="densityValue"&&(da=parseInt(da*100/46),H&&(H.danmuSetting.densityValue=da),da=da+" "+P("danmuItems","items"),ea.html(da))}return!1},oa=function(ea){u(document).unbind("mousemove",fa).unbind("mouseup",oa)};u(document).bind("mousemove",fa).bind("mouseup",oa)}return!1});u("#pbBox_tab").find("a.pb-link").click(function(S){S.preventDefault();
var Y=u(this).parent();Y.toggleClass("selected");S=u(this).attr("data-content");Y=Y.hasClass("selected");H&&(H.danmuSetting[S]=Y)});u("#barrage-set-bot").children("a").click(function(S){S.preventDefault();if(u(this).attr("data-content")=="reset"){if(H)for(a in H.danmuSetting)delete H.danmuSetting[a];u("#fsBox_tab").find(".color-box a").removeClass("selected").eq(0).addClass("selected");u("#fsBox_tab").find(".other-box a").removeClass("selected");var Y={opacityTrigger:[128,124,"90%"],forcedFontSizeTrigger:[50,
46,"100%"],speedTrigger:[39,35,"1.0x"],densityTrigger:[18,14,P("danmuDensityDefault","30 items")]};u("#bfBox_tab").find("a.zwp-barrage-icons").each(function(ba,aa){ba=u(aa).attr("data-barrage-content");if(Y[ba]){var fa=Y[ba];ba=fa[1];var oa=fa[0];fa=fa[2];aa=u(aa);aa.css({left:ba+"px"});aa.siblings(".bar-t").width(oa+"px");aa.parent().siblings(".set-rol-right").text(fa)}});u("#pbBox_tab").find("li.selected").removeClass("selected")}})},"html");A.attr("data-render","1")}if(A.hasClass("hidden")){K=
A.get(0);var z=this,M=function(R){var U=u(K);if(R.target==z)z=null;else if(hasClass(R.target,"xicon-close")||!U.is(R.target)&&U.has(R.target).length===0)U.addClass("hidden"),u(document).off("click",M),delete t.zwplayer};A.removeClass("hidden");u(document).on("click",M)}}},eb=function(A){N.ctrlInitId||(N.ctrlInitId=(new Date).getTime());var t=N.ctrlInitId++;return A+t},Ga=function(A,t){return'<div class="zwp_switch action-item" id="'+(A||eb("switch-"))+'" data-action="'+(t||"none")+'"><i class="switch_inner"></i></div>'},
Qa=function(A){var t=A.parentNode;if(t&&(t=t.querySelector(".zwp-slider-value"))){var u=A.getAttribute("data-action");A=A.value;u==="volumeBoost"?(A=parseFloat(A),A=(A>=0?"+":"")+A.toFixed(1)+"dB",t.innerHTML=A):t.innerHTML=A}},Ja=function(A,t,u,H,K,z){A=A||eb("zwp_slider-");u=u!==void 0?u:-100;H=H!==void 0?H:100;var M=u<0&&H>0?0:u,R="";z&&(R+='<span class="zwp-slider-min-label">'+u+"dB</span>");R+='<input type="range" id="'+A+'" name="slider'+A+'" data-action="'+t+'" class="zwp-slider" value="'+
M+'" min="'+u+'" max="'+H+'" step="'+(K!==void 0?K:1)+'"/><span class="zwp-slider-value">'+(t==="volumeBoost"?"+0.0dB":M)+"</span>";z&&(R+='<span class="zwp-slider-max-label">'+H+"dB</span>");return R},fb=function(A){var t="";A.infoButton&&(t='<div class="zwp-button zwp-infoButton"><button class="zwpbtn zwp-infoBtn" data-action="showMediainfo" data-name="infobtn"><i class="xicon xicon-info"></i></button></div>');var u="",H="",K="",z="",M="",R="",U="",S="",Y="",ba="",aa=A.defVolume||61.25;A.speedButton&&
!A.isLive&&(u="");A.optionButton&&(K='<div class="zwp-optionPanel"><div class="zwp-option-item"><label class="zwp-option-item-label">'+P("mirrorHorizontal","Mirror Horizontal")+'</label><div class="zwp-option-item-value">'+Ga("","mirror")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">'+P("mirrorVertical","Mirror Vertical")+'</label><div class="zwp-option-item-value">'+Ga("","flip")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">'+P("rotate90Clockwise",
"Rotate 90\u00b0 CW")+'</label><div class="zwp-option-item-value">'+Ga("","rotated90")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">'+P("rotate90Counterclockwise","Rotate 90\u00b0 CCW")+'</label><div class="zwp-option-item-value">'+Ga("","rotated270")+'</div></div><div class="zwp-option-h-separator"><hr/></div><div class="zwp-option-item"><label class="zwp-option-item-label">'+P("loopPlayback","Loop Playback")+'</label><div class="zwp-option-item-value">'+Ga("","loop")+
"</div></div>",A.recordButton&&(K+='<div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-record"></i></span> <button class="zwp-option-button action-item" data-action="showRecordingConfig">'+P("recordingSettings","Recording Settings...")+"</button></div>"),K+='<div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-audio-effect"></i></span> <button class="zwp-option-button action-item" data-action="showVolumeBoostConfig">'+P("audioVolumeBoost",
"Volume Boost...")+'</button></div><div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-hue"></i></span> <button class="zwp-option-button action-item" data-action="showColorConfig">'+P("videoColorTuning","Video Color Tuning...")+"</button></div></div>",K='<div class="zwp-button zwp-optionButton"><button class="zwpbtn zwp-optionBtn" data-action="showConfigPanel" data-name="optionbtn" title="'+P("settings","Settings")+'"><i class="xicon xicon-config"></i></button>'+
K+"</div>");A.disableVolumeControl||(U='<div class="zwp-button zwp-volume-docker"><button class="zwpbtn zwp-muteBtn" data-action="mute"  data-name="mutebtn"><i class="xicon xicon-speaker"></i></button><div class="zwp-volume-slider"><div class="zwp-volume-total"><div class="zwp-volume-current" style="bottom: 0px; height: '+aa+'%;"></div><div class="zwp-volume-handle" style="bottom: '+aa+'%; margin-bottom: -7px;"></div></div></div></div>');A.disableFullscreenWin||(z='<div class="zwp-button zwp-fullscrWinButton"><button class="zwpbtn zwp-fullscrWinBtn" data-action="enterfullscreenWin" data-name="fullscrWinbtn" title="'+
P("webFullscreen","Web Fullscreen")+'"><i class="xicon xicon-fullScreen-win"></i></button></div>');A.snapshotButton&&(M='<div class="zwp-button zwp-snapshotButton"><button class="zwpbtn zwp-snapshotBtn" data-action="snapshot" data-name="snapshotbtn" title="'+P("snapshot","Snapshot")+'"><i class="xicon xicon-camera"></i></button></div>');A.localPlayback&&(S='<div class="zwp-button zwp-localPlaybackButton"><button class="zwpbtn zwp-localPlaybackBtn" data-action="selectLocalFile" data-name="localPlaybackbtn" title="'+
P("selectLocalVideo","Select Local Video File")+'"><i class="xicon xicon-open-file"></i></button></div>');A.isLive||A.segmentButton!==!0||(Y='<div class="zwp-button zwp-segmentButton"><button class="zwpbtn zwp-segmentBtn" data-action="toggleSegment" data-name="segmentbtn" title="'+P("segmentSelect","Segment Select")+'"><i class="xicon xicon-zone"></i></button></div>');A.recordButton&&(ba='<div class="zwp-button zwp-recordButton"><button class="zwpbtn zwp-recordBtn" data-action="record" data-name="recordbtn" title="'+
P("record","Record")+'"><i class="xicon xicon-record"></i></button></div>');A.disablePicInPic||document.pictureInPictureEnabled&&(R='<div class="zwp-button zwp-picInPicButton"><button class="zwpbtn zwp-picInPicBtn" data-action="pictureInPicture" data-name="picInPicbtn" title="'+P("pictureInPicture","Picture-in-Picture")+'"><i class="xicon xicon-pic-in-pic"></i></button></div>');A.isLive||(H='<div class="zwp__time-rail"></div>');A='<div class="zwp-button zwp-subtitleButton" style="display: none;"><button class="zwpbtn zwp-subtitleBtn" data-action="showSubtitleMenu" data-name="subtitlebtn" title="'+
P("externalSubtitle","External Subtitles")+'"><i class="xicon xicon-cc"></i></button><div class="zwp-subtitleMenu">'+cb()+"</div></div>";aa='<div class="zwp-button zwp-qualityButton" style="display: none;"><button class="zwpbtn zwp-qualityBtn" data-action="showQualityMenu" data-name="qualitybtn" title="'+P("qualitySelection","Quality Selection")+'"><i class="xicon xicon-hd"></i></button><ul class="zwp-qualityMenu">';for(var fa=["1920","1280","720","480"],oa="",ea=0;ea<fa.length;ea++)oa=ea===3?oa+
('<li class="zwp-quality-item active">'+fa[ea]+"</li>"):oa+('<li class="zwp-quality-item">'+fa[ea]+"</li>");return'<div class="zwp-button zwp_playbtn"><button class="zwpbtn zwp-playbtn" data-action="play" data-name="playbtn"><i class="xicon xicon-play"></i></button></div><div class="zwp__time zwp__currenttime-container" role="timer" aria-live="on"><span class="zwp__currenttime">00:00</span></div><div class="zwp__time zwp__duration-container" style="display: none;"><span class="zwp__time_divider">/</span> <span class="zwp__duration">0:00:00</span></div><div class="zwp__time-info "></div>'+
t+S+M+Y+ba+A+(aa+oa+"</ul></div>")+u+K+U+R+z+'<div class="zwp-button"><button class="zwpbtn zwp-fullscrBtn" data-action="enterfullscreen" data-name="fullscrbtn" title="'+P("enterFullScreen","Enter Fullscreen")+'"><i class="xicon xicon-fullScreen"></i></button></div>'+H},vb='<div class="zwp__overlay zwp__layer zwp__overlay-play" style="width: 100%; height: 100%; display: none;"><div class="zwp-local-playback-hint" style="display: none;" role="button" tabindex="0" aria-label="'+P("selectLocalVideo",
"Select Local Video File")+'" data-action="selectLocalFile"><div class="zwp-local-playback-text">'+P("selectOrDropVideo","Select or drag video/audio files")+'</div><div class="zwp-local-playback-subtitle">'+P("supportedFormats","Supports MP4, WebM, MOV, MKV, M4V, OGG, FLAC, WAV, M4A, MP3, OPUS and other formats")+'</div></div><div class="zwp__overlay-button" role="button" tabindex="0" aria-label="play" aria-pressed="false" data-action="play"><svg class="icon" width="96px" height="96px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c2c2c2" d="M512.61025 48.820024a463.790226 463.790226 0 1 0 463.790227 463.790226A463.790226 463.790226 0 0 0 512.61025 48.820024z m0 854.350417a390.560191 390.560191 0 1 1 390.560191-390.560191 390.560191 390.560191 0 0 1-390.560191 390.560191z m166.720382-414.970203l-120.341359-70.300834-127.908463-74.694636a22.945411 22.945411 0 0 0-32.465315 24.410011v288.526341a22.945411 22.945411 0 0 0 32.465315 24.410012l127.908463-74.694636 120.341359-70.056734a28.559714 28.559714 0 0 0 0-47.599524z" /></svg></div></div>',
wb='<div class="zwp-pipPlaceHolder">\t<div class="zwp-pipControl">\t\t<div class="zwp-pipTiptext">'+P("pipModePlaying","Playing in Picture-in-Picture mode")+'</div>\t\t<div class="zwp-pipExitButton">'+P("exitPictureInPicture","Exit Picture-in-Picture")+"</div>\t</div></div>";(function(A,t){typeof N.define==="function"&&N.define.amd?N.define([],t):typeof exports==="object"?module.exports=t():A.ZWPlayer=t()})(N,function(){function A(e){e=e.getBoundingClientRect();return{top:e.top+(N.pageYOffset||document.documentElement.scrollTop),
left:e.left+(N.pageXOffset||document.documentElement.scrollLeft)}}function t(e){var m=e.offsetTop;for(e=e.offsetParent;e!==null;)m+=e.offsetTop,e=e.offsetParent;return m}function u(e,m){if(document.createEvent){const B=document.createEvent("HTMLEvents");B.initEvent(m,!0,!1);e.dispatchEvent(B)}else document.createEventObject&&e.fireEvent(m)}var H=function(){return(new Date).getTime()};typeof performance!="undefined"&&performance.now&&(H=function(){return performance.now()});var K=H(),z=function(e){var m=
"",B=!1,q="";e.startsWith("webrtc://")?m="/rtc/v1/play/":e.startsWith("brtc://")&&(m="/brtc/v3/pullstream",B=!0,q=e.replace("brtc://","webrtc://"));var F=e.indexOf("://");if(F==-1)return!1;var b="";if(e.indexOf("?")>=0){var E=e.indexOf("?");b=e.substr(E+1);e=e.substr(0,E)}var v=e.indexOf("/",F+3);E=e.substr(0,F);F=e.substring(F+3,v);var Z=e.substring(v),D=Z.lastIndexOf("/"),X="";v=F.indexOf(":");v>0&&(X=F.substring(v+1),F=F.substring(0,v));v=Z.substring(1,D);Z=Z.substring(D+1);D=Z.lastIndexOf(".");
D>0&&(Z=Z.substring(0,D));D="";b.indexOf("vhost=")>0&&(D=b.substr(b.indexOf("vhost=")+6),D.indexOf("&")>0&&(D=D.substr(0,D.indexOf("&"))));F===D&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(F)&&(D="_default_vhost_");e={url:e,schema:E,server:F,port:X,vhost:D,app:v,stream:Z};e.user_query={};if(b.length!==0){b.indexOf("?")>=0&&(b=b.split("?")[1]);b=b.split("&");for(X=0;X<b.length;X++)D=b[X].split("="),e[D[0]]=D[1],e.user_query[D[0]]=D[1];e.domain&&(e.vhost=e.domain)}E==="webrtc"||E==="rtc"?(E="",e.port||(e.user_query.schema===
"https"?(e.port=443,E=e.user_query.schema||"https"):N.location.href.indexOf("https://")===0?(e.port=443,E=e.user_query.schema||"https"):e.port=1985)):B&&(N.location.href.indexOf("https://")===0?(E="https",e.port=e.por||443):(E="http",e.port=e.por||80));q||="rtmp://"+F+"/"+v+"/"+Z;E=E?E+":":N.location.protocol;(X=e.port)||(X=E==="https:"?X||443:X||1985);m=m||"/live/webrtc/play/";F=E+"//"+e.server+":"+X+m;for(var ja in e.user_query)ja!=="api"&&ja!=="play"&&(F+="&"+ja+"="+e.user_query[ja]);F=F.replace(m+
"&",m+"?");B={apiUrl:F,streamUrl:q,schema:E,urlObject:e,port:X,is_brtc:B};B.tid=Number(parseInt((new Date).getTime()*Math.random()*100)).toString(16).slice(0,7);return B},M=function(e,m,B,q){let F=null;F=N.XMLHttpRequest?new N.XMLHttpRequest:new N.ActiveXObject("Microsoft.XMLHTTP");F.addEventListener("error",function(b){q&&q("REQUEST:"+b.type)});F.onreadystatechange=function(){if(F.readyState===4)if(F.status===200){var b=JSON.parse(F.responseText);B&&B(b)}else q&&q("STATUS:"+F.status+":"+F.statusText)};
F.open("POST",e,!0);F.setRequestHeader("Content-Type","application/json");F.send(m);return F},R=function(e){var m=e.lastIndexOf("/"),B=e.indexOf("?");m=e.indexOf(".",m+1);var q="";m>0&&(B>0?m>B||(q=e.substring(m,B).toLowerCase()):q=e.substring(m).toLowerCase(),m=q.lastIndexOf("."),m>0&&(q=q.substring(m)));return q},U=void 0,S=void 0,Y=void 0;"classList"in document.documentElement?(U=function(e,m){return e.classList!==void 0&&e.classList.contains(m)},S=function(e,m){return e.classList.add(m)},Y=function(e,
m){return e.classList.remove(m)}):(U=function(e,m){return(new RegExp("\\b"+m+"\\b")).test(e.className)},S=function(e,m){U(e,m)||(e.className+=" "+m)},Y=function(e,m){e.className=e.className.replace(new RegExp("\\b"+m+"\\b","g"),"")});N.hasClass=U;N.addClass=S;N.removeClass=Y;/MSIE 8\.0/.test(navigator.userAgent);var ba=function(e){e=parseInt(e);var m=parseInt(e/3600),B=parseInt(e%3600/60);e=parseInt(e%60);var q="";m>0&&(q+=m+":");q=B>=10?q+(B+":"):B>0?q+("0"+B+":"):q+"00:";return e>=10?q+e:q+("0"+
e)},aa=function(e){if(typeof e!=="number"||isNaN(e))return"00:00.000";var m=Math.floor(e/3600),B=Math.floor(e%3600/60),q=Math.floor(e%60);e=Math.round(e%1*1E3);var F="";m>0&&(F+=m+":");F=B>=10?F+(B+":"):F+("0"+B+":");F=q>=10?F+(q+"."):F+("0"+q+".");return e>=100?F+e:e>=10?F+("0"+e):F+("00"+e)},fa=function(e){function m(c,d,f){var l=c.recording,r=c._config&&c._config.isLive,G=f==="audio"?"\u97f3\u9891":"\u89c6\u9891";l.isLive=r;console.log("\ud83c\udfac \u5f00\u59cb\u901a\u7528\u5f55\u5236 - \u7c7b\u578b:",
f,"\u6a21\u5f0f:",r?"\u76f4\u64ad":"\u70b9\u64ad","\u5f53\u524d\u72b6\u6001:",{isRecording:l.isRecording,existingRecordType:l.recordType,chunkCount:l.recordedChunks.length});if(l.isRecording)console.warn("\ud83d\udeab \u5f55\u5236\u5df2\u5728\u8fdb\u884c\u4e2d\uff0c\u5ffd\u7565\u91cd\u590d\u8bf7\u6c42\u3002\u5f53\u524d\u5f55\u5236\u7c7b\u578b:",l.recordType);else{l.isRecording=!0;l.startTime=Date.now();l.recordedChunks=[];l.duration=0;l.recordType=f;l.finalized=!1;console.log("\u2705 \u901a\u7528\u5f55\u5236\u72b6\u6001\u5df2\u521d\u59cb\u5316:",
{recordType:l.recordType,isRecording:l.isRecording,mode:r?"\u76f4\u64ad":"\u70b9\u64ad"});if(!l.indicator){var J=document.createElement("div");J.className="zwp-live-recording-indicator";J.title="\u6b63\u5728\u5f55\u5236";if(d){var Q=d.closest(".zwp-recordButton");Q?(Q.style.position=Q.style.position||"relative",Q.appendChild(J),console.log("\u5c0f\u7ea2\u70b9\u5df2\u6dfb\u52a0\u5230\u5f55\u5236\u6309\u94ae\u5bb9\u5668")):(d.style.position=d.style.position||"relative",d.appendChild(J),console.log("\u5c0f\u7ea2\u70b9\u5df2\u6dfb\u52a0\u5230\u5f55\u5236\u6309\u94ae"))}else console.error("\u65e0\u6cd5\u627e\u5230\u5f55\u5236\u6309\u94ae\u6dfb\u52a0\u5c0f\u7ea2\u70b9");
l.indicator=J}l.indicator&&(l.indicator.className="zwp-live-recording-indicator recording "+(f==="audio"?"audio-recording":""));d&&(d.title="\u505c\u6b62"+G+"\u5f55\u5236");console.log("\u5f00\u59cb"+(r?"\u76f4\u64ad":"\u70b9\u64ad")+G+"\u5f55\u5236...");r?(l=0,J=Infinity):c.segment&&c.segment.isActive?(console.log("\u7247\u6bb5\u9009\u62e9\u6fc0\u6d3b\uff0c\u8df3\u8f6c\u5230\u7247\u6bb5\u5f00\u59cb\u4f4d\u7f6e:",c.segment.startTime),l=c.videoEl.currentTime=c.segment.startTime,J=c.segment.endTime,
console.log("\u70b9\u64ad\u7247\u6bb5"+G+"\u5f55\u5236\u5df2\u5f00\u59cb\uff0c\u7247\u6bb5:",l+"s - "+J+"s")):(l=c.videoEl.currentTime,J=c.videoEl.duration||Infinity,console.log("\u7247\u6bb5\u9009\u62e9\u672a\u6fc0\u6d3b\uff0c\u4ece\u5f53\u524d\u4f4d\u7f6e\u5f00\u59cb\u5f55\u5236:",l+"s"),console.log("\u70b9\u64ad\u5b8c\u6574"+G+"\u5f55\u5236\u5df2\u5f00\u59cb"));B(c,d,f,l,J,r)}}function B(c,d,f,l,r,G){var J=c.recording,Q=f==="audio"?"\u97f3\u9891":"\u89c6\u9891",L=G?"\u76f4\u64ad":"\u70b9\u64ad";
J.isLive=G;console.log("\ud83c\udfa5 \u5f00\u59cb"+L+Q+"\u5f55\u5236:",l+"s - "+(r===Infinity?"\u65e0\u9650\u5236":r+"s"));try{var O=D(c);if(f==="audio"){var T=O.getAudioTracks();if(T.length===0)throw Error("\u6ca1\u6709\u627e\u5230\u97f3\u9891\u8f68\u9053\uff0c\u65e0\u6cd5\u8fdb\u884c\u97f3\u9891\u5f55\u5236");T.forEach(function(na){na.enabled=!0;console.log("\ud83c\udfb5 \u542f\u7528\u97f3\u9891\u8f68\u9053:",na.label||"Unknown Track")});var C=new MediaStream(T);console.log("\ud83c\udfb5 \u97f3\u9891\u5f55\u5236\u6a21\u5f0f\uff1a\u97f3\u9891\u8f68\u9053\u4fe1\u606f:",
{trackCount:T.length,trackEnabled:T[0].enabled,trackState:T[0].readyState,trackId:T[0].id,streamActive:C.active});O=C;console.log("\ud83c\udfb5 \u97f3\u9891\u5f55\u5236\u6a21\u5f0f\uff1a\u5df2\u63d0\u53d6\u97f3\u9891\u8f68\u9053\uff0c\u79fb\u9664\u89c6\u9891\u8f68\u9053")}J.format=E(f);console.log("\u68c0\u6d4b\u5230"+L+Q+"\u5f55\u5236\u683c\u5f0f:",J.format);var W={mimeType:J.format.mimeType};f==="video"?(W.videoBitsPerSecond=25E5,O.getAudioTracks().length>0&&(W.audioBitsPerSecond=192E3)):W.audioBitsPerSecond=
128E3;J.mediaRecorder=new MediaRecorder(O,W);J.mediaRecorder.ondataavailable=function(na){na.data.size>0&&(J.recordedChunks.push(na.data),console.log("\u6536\u5230"+Q+"\u5f55\u5236\u6570\u636e\u5757\uff0c\u5927\u5c0f:",na.data.size,"\u603b\u5757\u6570:",J.recordedChunks.length))};J.mediaRecorder.onstop=function(){console.log("\ud83d\uded1 "+L+Q+"MediaRecorder\u505c\u6b62");var na=c.recording,wa=na.isLive?"\u76f4\u64ad":"\u70b9\u64ad";G!==na.isLive&&(na.isLive=G);if(na.recordedChunks.length===0)console.error(wa+
"\u5f55\u5236\u5931\u8d25\uff0c\u6ca1\u6709\u6570\u636e");else{var Ba=new Blob(na.recordedChunks,{type:na.format.mimeType}),xa=G?"live_recording":"vod_recording",sa=new Date;sa=sa.getFullYear()+String(sa.getMonth()+1).padStart(2,"0")+String(sa.getDate()).padStart(2,"0")+"_"+String(sa.getHours()).padStart(2,"0")+String(sa.getMinutes()).padStart(2,"0")+String(sa.getSeconds()).padStart(2,"0");xa=xa+"_"+sa+na.format.fileExtension;Ba=URL.createObjectURL(Ba);sa=document.createElement("a");sa.href=Ba;sa.download=
xa;sa.style.display="none";document.body.appendChild(sa);sa.click();document.body.removeChild(sa);URL.revokeObjectURL(Ba);console.log(wa+"\u5f55\u5236\u6587\u4ef6\u5df2\u4e0b\u8f7d:",xa);na.recordedChunks=[];na.isRecording=!1;na.finalized=!0;na.duration=0;na.startTime=0;na.recordType=null;console.log("\u2705 "+wa+"\u5f55\u5236\u72b6\u6001\u5df2\u91cd\u7f6e")}};J.mediaRecorder.onstart=function(){console.log("\u2705 "+L+Q+"MediaRecorder\u5df2\u542f\u52a8")};J.mediaRecorder.onerror=function(na){console.error("\u274c "+
L+Q+"MediaRecorder\u9519\u8bef:",na);J.isRecording=!1;J.indicator&&(J.indicator.className="zwp-live-recording-indicator");d&&(d.title="\u5f55\u5236")};f=f==="audio"?100:200;J.mediaRecorder.start(f);console.log(L+Q+"MediaRecorder.start() \u5df2\u8c03\u7528\uff0ctimeslice:",f+"ms");ja(c,d);if(!G&&r!==Infinity)setTimeout(function(){J.isRecording&&(console.log(Q+"\u7247\u6bb5\u5f55\u5236\u65f6\u95f4\u5df2\u5230\uff0c\u81ea\u52a8\u505c\u6b62\u5f55\u5236"),F(c,d))},(r-l)*1E3),console.log(Q+"\u7247\u6bb5\u5f55\u5236\u5df2\u5f00\u59cb\uff0c\u5c06\u5728",
r-l,"\u79d2\u540e\u81ea\u52a8\u505c\u6b62");else if(!G&&r===Infinity){console.log(Q+"\u5b8c\u6574\u5f55\u5236\u5df2\u5f00\u59cb\uff0c\u5c06\u5728\u64ad\u653e\u7ed3\u675f\u65f6\u81ea\u52a8\u505c\u6b62");var ra=function(){J.isRecording&&(console.log("\u89c6\u9891\u64ad\u653e\u7ed3\u675f\uff0c\u81ea\u52a8\u505c\u6b62\u5f55\u5236"),F(c,d));c.videoEl.removeEventListener("ended",ra)};c.videoEl.addEventListener("ended",ra)}console.log("\u2705 "+L+Q+"\u5f55\u5236\u5df2\u6210\u529f\u542f\u52a8")}catch(na){console.error("\u542f\u52a8"+
L+Q+"\u5f55\u5236\u5931\u8d25:",na),J.isRecording=!1,J.indicator&&(J.indicator.className="zwp-live-recording-indicator"),d&&(d.title="\u5f55\u5236"),console.error(L+Q+"\u5f55\u5236\u542f\u52a8\u5931\u8d25: "+na.message)}}function q(c,d){var f=document.querySelector(".zwp-recording-options-menu");f&&f.remove();console.log("\ud83c\udfaf \u521b\u5efa\u5f55\u5236\u9009\u9879\u83dc\u5355\uff08\u97f3\u89c6\u9891\u90fd\u6709\uff09");var l=document.createElement("div");l.className="zwp-recording-options-menu";
l.style.cssText="position: fixed; background: rgba(0,0,0,0.9); border: 1px solid #444; border-radius: 4px; padding: 6px 0; width: 110px; z-index: 10000; box-shadow: 0 2px 8px rgba(0,0,0,0.3); overflow: hidden;";f=document.createElement("div");f.className="zwp-recording-option";f.innerHTML=P("recordVideo","Full Recording");f.style.cssText="padding: 10px 12px; cursor: pointer; color: #fff; font-size: 13px; border: none; background: transparent; width: 100%; text-align: center; box-sizing: border-box;";
f.onmouseover=function(){this.style.background="rgba(255,255,255,0.1)"};f.onmouseout=function(){this.style.background="transparent"};f.onclick=function(){console.log("\ud83c\udfac \u5b8c\u6574\u5f55\u5236\u9009\u9879\u88ab\u70b9\u51fb");l.remove();m(c,d,"video")};var r=document.createElement("div");r.className="zwp-recording-option";r.innerHTML=P("recordAudio","Audio Only");r.style.cssText="padding: 10px 12px; cursor: pointer; color: #fff; font-size: 13px; border: none; background: transparent; width: 100%; text-align: center; box-sizing: border-box;";
r.onmouseover=function(){this.style.background="rgba(255,255,255,0.1)"};r.onmouseout=function(){this.style.background="transparent"};r.onclick=function(){console.log("\ud83c\udfb5 \u4ec5\u5f55\u97f3\u9891\u9009\u9879\u88ab\u70b9\u51fb");l.remove();m(c,d,"audio")};l.appendChild(f);l.appendChild(r);f=d.getBoundingClientRect();console.log("\ud83c\udfaf \u5f55\u5236\u6309\u94ae\u4f4d\u7f6e\u4fe1\u606f:",{btnRect:f,scrollX:N.scrollX,scrollY:N.scrollY});if(f.width===0||f.height===0||f.left===0&&f.top===
0&&f.bottom===0){var G=c.playerElm.getBoundingClientRect();r=G.left+G.width/2-55;G=G.top+G.height/2-40;console.log("\ud83c\udfaf \u6309\u94ae\u4e0d\u53ef\u89c1\uff0c\u83dc\u5355\u5b9a\u4f4d\u5230\u64ad\u653e\u7a97\u53e3\u4e2d\u592e")}else r=f.left+f.width/2-55,G=f.bottom+2;l.style.left=r+"px";l.style.top=G+"px";console.log("\ud83c\udfaf \u83dc\u5355\u5b9a\u4f4d\u8bbe\u7f6e:",{left:r,top:G,width:110,btnVisible:f.width>0&&f.height>0});document.body.appendChild(l);var J=function(Q){l.contains(Q.target)||
Q.target===d||(l.remove(),document.removeEventListener("click",J))};setTimeout(function(){document.addEventListener("click",J)},100)}function F(c,d){var f=c.recording;c=c._config&&c._config.isLive?"\u76f4\u64ad":"\u70b9\u64ad";if(f.isRecording||f.mediaRecorder){f.timer&&(clearInterval(f.timer),f.timer=null);f.streamCheckInterval&&(clearInterval(f.streamCheckInterval),f.streamCheckInterval=null);if(f.mediaRecorder&&f.mediaRecorder.state!=="inactive")try{f.mediaRecorder.stop(),console.log("MediaRecorder\u5df2\u505c\u6b62")}catch(l){console.warn("\u505c\u6b62MediaRecorder\u65f6\u51fa\u9519:",
l)}f.indicator&&(f.indicator.className="zwp-live-recording-indicator");d&&(d.title="\u5f55\u5236");f.isRecording=!1;console.log("\u2705 "+c+"\u5f55\u5236\u5df2\u505c\u6b62\uff0c\u7b49\u5f85MediaRecorder\u7684onstop\u4e8b\u4ef6\u5b8c\u6210\u6587\u4ef6\u5904\u7406...")}else console.log("\u5f55\u5236\u5df2\u7ecf\u505c\u6b62\uff0c\u8df3\u8fc7\u91cd\u590d\u8c03\u7528")}function b(c,d){try{if(c.videoEl)if(c.streamContentCache)console.log("\ud83d\udce6 \u4f7f\u7528\u7f13\u5b58\u7684\u6d41\u5185\u5bb9\u4fe1\u606f:",
c.streamContentCache),d({hasVideo:c.streamContentCache.hasVideo,hasAudio:c.streamContentCache.hasAudio});else{console.log("\ud83d\udd0d \u5f00\u59cb\u5206\u6790\u5a92\u4f53\u6d41\u5185\u5bb9...");var f=c.videoEl,l={hasVideo:!1,hasAudio:!1};if(f.captureStream||f.mozCaptureStream)try{var r=(f.captureStream||f.mozCaptureStream).call(f),G=r.getVideoTracks();l.hasVideo=G.length>0;var J=r.getAudioTracks();l.hasAudio=J.length>0;console.log("\u2705 \u539f\u751f\u6d41\u5206\u6790\u5b8c\u6210:",l);c.streamContentCache=
{hasVideo:l.hasVideo,hasAudio:l.hasAudio};d(l);return}catch(Q){console.warn("\u26a0\ufe0f \u539f\u751f\u6d41\u6355\u83b7\u5931\u8d25\uff0c\u5c1d\u8bd5\u5176\u4ed6\u65b9\u6cd5:",Q)}f.videoWidth>0&&f.videoHeight>0&&(l.hasVideo=!0);if(f.webkitAudioDecodedByteCount>0||f.getAudioTracks&&f.getAudioTracks().length>0)l.hasAudio=!0;l.hasVideo||l.hasAudio||(l.hasVideo=!0,l.hasAudio=!0);console.log("\u2705 \u6d41\u5185\u5bb9\u5206\u6790\u5b8c\u6210:",l);c.streamContentCache={hasVideo:l.hasVideo,hasAudio:l.hasAudio};
d(l)}else d({hasVideo:!1,hasAudio:!1})}catch(Q){console.error("\u6d41\u5185\u5bb9\u5206\u6790\u5931\u8d25:",Q),f={hasVideo:!0,hasAudio:!0},c.streamContentCache=f,d(f)}}function E(c){if((c||"video")==="audio"){c="audio/mp4;codecs=mp4a.40.2 audio/mp4 audio/webm;codecs=opus audio/webm;codecs=vorbis audio/webm audio/ogg;codecs=opus audio/ogg;codecs=vorbis".split(" ");for(var d=0;d<c.length;d++)if(MediaRecorder.isTypeSupported(c[d])){var f=c[d].includes("mp4");return{mimeType:c[d],isMP4:f,fileExtension:f?
".m4a":".webm"}}return{mimeType:"audio/webm",isMP4:!1,fileExtension:".webm"}}c="video/mp4;codecs=avc1.42E01E,mp4a.40.2 video/mp4;codecs=avc1.42E01E video/mp4;codecs=h264 video/webm;codecs=vp9 video/webm;codecs=vp8 video/webm".split(" ");for(d=0;d<c.length;d++)if(MediaRecorder.isTypeSupported(c[d]))return{mimeType:c[d],isMP4:c[d].includes("mp4"),fileExtension:c[d].includes("mp4")?".mp4":".webm"};return{mimeType:"video/webm",isMP4:!1,fileExtension:".webm"}}function v(c){var d=c.videoEl;console.log("\u5f00\u59cb\u6355\u83b7\u540c\u6b65\u97f3\u9891\u6d41...");
if(d.captureStream||d.mozCaptureStream)try{var f=(d.captureStream||d.mozCaptureStream).call(d).getAudioTracks();if(f.length>0){var l=new MediaStream(f);console.log("\u2705 \u4ece\u540c\u6b65\u6355\u83b7\u6d41\u83b7\u53d6\u5230\u97f3\u9891\u8f68\u9053:",f.length);return l}console.log("\u26a0\ufe0f \u540c\u6b65\u6355\u83b7\u6d41\u6ca1\u6709\u97f3\u9891\u8f68\u9053")}catch(r){console.warn("\u540c\u6b65\u97f3\u9891\u6355\u83b7\u5931\u8d25:",r)}return Z(c)}function Z(c){c=c.videoEl;console.log("\u5f00\u59cb\u6355\u83b7\u97f3\u9891\u6d41...");
if(c.captureStream)try{var d=c.captureStream(),f=d.getAudioTracks();if(f.length>0){var l=new MediaStream(f);console.log("\u4ecevideo.captureStream()\u6355\u83b7\u5230\u97f3\u9891\u6d41\uff0c\u8f68\u9053\u6570:",f.length);return l}console.log("video.captureStream()\u8fd4\u56de\u7684\u6d41\u6ca1\u6709\u97f3\u9891\u8f68\u9053")}catch(L){console.warn("\u4ecevideo.captureStream()\u6355\u83b7\u97f3\u9891\u5931\u8d25:",L)}if(c.mozCaptureStream)try{d=c.mozCaptureStream();f=d.getAudioTracks();if(f.length>
0)return l=new MediaStream(f),console.log("\u4ecevideo.mozCaptureStream()\u6355\u83b7\u5230\u97f3\u9891\u6d41\uff0c\u8f68\u9053\u6570:",f.length),l;console.log("video.mozCaptureStream()\u8fd4\u56de\u7684\u6d41\u6ca1\u6709\u97f3\u9891\u8f68\u9053")}catch(L){console.warn("\u4ecevideo.mozCaptureStream()\u6355\u83b7\u97f3\u9891\u5931\u8d25:",L)}try{console.log("\u5c1d\u8bd5\u4f7f\u7528Web Audio API\u521b\u5efa\u72ec\u7acb\u97f3\u9891\u6d41");var r=new (N.AudioContext||N.webkitAudioContext),G=document.createElement("audio");
G.src=c.src;G.crossOrigin=c.crossOrigin||"anonymous";G.muted=!1;G.volume=1;var J=r.createMediaStreamDestination(),Q=r.createMediaElementSource(G);Q.connect(J);Q.connect(r.destination);d=J.stream;G.muted=!0;G.play().catch(function(L){console.warn("\u9690\u85cf\u97f3\u9891\u5143\u7d20\u64ad\u653e\u5931\u8d25:",L)});console.log("\u2705 \u4f7f\u7528Web Audio API\u521b\u5efa\u72ec\u7acb\u97f3\u9891\u6d41\uff0c\u8f68\u9053\u6570:",d.getAudioTracks().length);return d}catch(L){console.warn("\u4f7f\u7528Web Audio API\u6355\u83b7\u97f3\u9891\u5931\u8d25:",
L)}console.warn("\u6240\u6709\u97f3\u9891\u6355\u83b7\u65b9\u6cd5\u90fd\u5931\u8d25\uff0c\u521b\u5efa\u7a7a\u97f3\u9891\u6d41");return new MediaStream}function D(c){var d=c.videoEl;console.log("\u5f00\u59cb\u6355\u83b7\u5b8c\u6574\u89c6\u9891\u6d41\uff08\u5305\u542b\u97f3\u9891\uff09...");if(d.captureStream||d.mozCaptureStream)try{var f=(d.captureStream||d.mozCaptureStream).call(d),l=f.getVideoTracks(),r=f.getAudioTracks();console.log("\u76f4\u63a5\u6355\u83b7\u6d41\u7ed3\u679c:",{videoTracks:l.length,
audioTracks:r.length,streamActive:f.active});if(l.length>0){if(r.length>0)return console.log("\u2705 \u6210\u529f\u6355\u83b7\u540c\u6b65\u7684\u89c6\u9891\u548c\u97f3\u9891\u6d41"),f;console.log("\u89c6\u9891\u6d41\u5b58\u5728\u4f46\u7f3a\u5c11\u97f3\u9891\u8f68\u9053\uff0c\u5c1d\u8bd5\u540c\u6b65\u6dfb\u52a0\u97f3\u9891");var G=v(c).getAudioTracks();G.length>0?(G.forEach(function(J){f.addTrack(J)}),console.log("\u2705 \u6210\u529f\u6dfb\u52a0\u540c\u6b65\u97f3\u9891\u8f68\u9053\u5230\u89c6\u9891\u6d41")):
console.warn("\u65e0\u6cd5\u83b7\u53d6\u97f3\u9891\u8f68\u9053\uff0c\u5c06\u8fd4\u56de\u4ec5\u89c6\u9891\u6d41");return f}}catch(J){console.warn("\u76f4\u63a5\u6355\u83b7\u89c6\u9891\u6d41\u5931\u8d25:",J)}console.warn("\u26a0\ufe0f \u4f7f\u7528Canvas\u65b9\u6cd5\uff08\u53ef\u80fd\u5b58\u5728\u97f3\u89c6\u9891\u540c\u6b65\u95ee\u9898\uff09");return X(c)}function X(c){function d(){if(c.recording&&c.recording.isRecording){try{if(f&&f.videoWidth>0&&f.videoHeight>0){var T=f.currentTime;Math.abs(T-L)>
.016&&(r.drawImage(f,0,0,l.width,l.height),L=T,O++,O%100===0&&console.log("Canvas\u7ed8\u5236\u5e27\u6570:",O,"\u5f53\u524d\u89c6\u9891\u65f6\u95f4:",T.toFixed(2)))}else r.fillStyle="black",r.fillRect(0,0,l.width,l.height)}catch(C){console.warn("\u89c6\u9891\u7ed8\u5236\u5931\u8d25:",C)}requestAnimationFrame(d)}else console.log("\u5f55\u5236\u5df2\u505c\u6b62\uff0c\u505c\u6b62Canvas\u7ed8\u5236")}var f=c.videoEl,l=document.createElement("canvas"),r=l.getContext("2d");console.log("\u8bbe\u7f6eCanvas\u5c3a\u5bf8:",
{videoWidth:f?f.videoWidth:"undefined",videoHeight:f?f.videoHeight:"undefined",currentTime:f?f.currentTime:"undefined"});l.width=f?f.videoWidth||1280:1280;l.height=f?f.videoHeight||720:720;console.log("Canvas\u5c3a\u5bf8:",l.width,"x",l.height);var G=l.captureStream(60);console.log("Canvas\u89c6\u9891\u6d41\u521b\u5efa\u6210\u529f:",G);var J=Z(c);console.log("\u97f3\u9891\u6d41\u6355\u83b7\u6210\u529f:",J);var Q=new MediaStream;G.getVideoTracks().forEach(function(T){Q.addTrack(T)});J.getAudioTracks().forEach(function(T){Q.addTrack(T)});
console.log("\u5408\u5e76\u540e\u7684\u6d41\u5305\u542b:",{videoTracks:Q.getVideoTracks().length,audioTracks:Q.getAudioTracks().length});var L=0,O=0;d();console.warn("\u26a0\ufe0f Canvas\u65b9\u6cd5\u53ef\u80fd\u5bfc\u81f4\u97f3\u89c6\u9891\u4e0d\u540c\u6b65\uff0c\u5efa\u8bae\u4f7f\u7528\u539f\u751fcaptureStream");return Q}function ja(c,d){var f=c.recording,l=f.isLive?"\u76f4\u64ad":"\u70b9\u64ad";f.timer=setInterval(function(){f.duration=Math.floor((Date.now()-f.startTime)/1E3);if(f.duration>=f.maxDuration)console.log("\u5df2\u8fbe\u5230\u6700\u5927\u5f55\u5236\u65f6\u957f("+
f.maxDuration/3600+"\u5c0f\u65f6)\uff0c\u81ea\u52a8\u505c\u6b62\u5f55\u5236..."),F(c,d);else{var r=f.duration;var G=Math.floor(r/3600);var J=Math.floor(r%3600/60);r%=60;G=G>0?G+":"+String(J).padStart(2,"0")+":"+String(r).padStart(2,"0"):J+":"+String(r).padStart(2,"0");console.log("\u6b63\u5728\u5f55\u5236"+l+"\u6d41... "+G);d&&(d.title="\u505c\u6b62\u5f55\u5236 ("+G+")")}},1E3)}var ma=!1,ua=!1,g=this;g instanceof fa||(g=Object.create(fa.prototype));g._config=e||{};Fa=g._config.lang?g._config.lang:
g._config.lang=Oa;g.peer_conn=null;g.danmuSetting={};g.segment={isActive:!1,startTime:0,endTime:0,isDragging:!1,dragTarget:null};g.resetPlaybackState=function(){this.segment.isActive=!1;this.segment.startTime=0;this.segment.endTime=0;this.segment.isDragging=!1;this.segment.dragTarget=null;var c=this.controlbar?this.controlbar.querySelector("#segmentLayer"):null,d=this.controlbar?this.controlbar.querySelector(".zwp-segmentBtn"):null;c&&(c.classList.remove("active"),(c=c.closest(".zwp__time-rail"))&&
c.classList.remove("segment-active"));d&&d.closest(".zwp-segmentButton").classList.remove("active");this.streamContentCache=null;console.log("\u64ad\u653e\u72b6\u6001\u5df2\u91cd\u7f6e\uff08\u7247\u6bb5\u9009\u62e9\u548c\u6d41\u5185\u5bb9\u7f13\u5b58\uff09")};typeof g._config.controlbar==="undefined"&&(g._config.controlbar=!0);g._config.hideControlbarTimeout||(g._config.hideControlbarTimeout=1E4);typeof g._config.defVolume==="undefined"&&(g._config.defVolume=61.25);g.setRtcstream=function(c){this.videoEl&&
(this.videoEl.srcObject=c,this.videoEl.play(),this.setplaystate(!0),this.startHideControlbar(this))};g.onfullscrchange=function(c){var d=this;if(Ia())d.isFullscr=!0,d.setupFullscrBtn&&d.setupFullscrBtn.setAttribute("title",P("exitFullScreen","Exit full screen")),(f=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)||(f=d.videoEl||d.playerElm||d.playerContainer),f&&(d.fullscreenContextMenuHandler&&f.removeEventListener("contextmenu",
d.fullscreenContextMenuHandler),d.fullscreenContextMenuHandler=function(l){l.preventDefault();l.stopPropagation();Ra||d.showContextMenu(l)},f.addEventListener("contextmenu",d.fullscreenContextMenuHandler));else if(d.setupFullscrBtn&&(Y(d.playerElm,"zwp-fullscreen"),d.setupFullscrBtn.setAttribute("data-action","enterfullscreen"),d.setupFullscrBtn.setAttribute("title",P("enterFullScreen","Enter full screen"))),d.isFullscr=!1,d.fullscreenContextMenuHandler){var f=document.fullscreenElement||document.webkitFullscreenElement||
document.mozFullScreenElement||document.msFullscreenElement;f&&d.fullscreenContextMenuHandler&&f.removeEventListener("contextmenu",d.fullscreenContextMenuHandler);delete d.fullscreenContextMenuHandler}d.isFullscrWin||d.reposDanmuToolbar(d.isFullscr);console.log("fullscrchange:"+c.type)}.bind(g);g.on_btnclick=function(c){if(c.currentTarget&&this.btnBindZwp){c=c.currentTarget;var d=c.getAttribute("data-action");d==="play"?this._config.disablePlayBtn||(this.isPlaying?this.videoEl&&(this.videoEl.paused||
this.videoEl.ended)&&(this.initAudioContext(),this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)):d==="pause"?this._config.disablePlayBtn||!this.videoEl||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1)):d==="mute"?this.videoEl&&(this.videoEl.muted||this.setMuted(!0)):d==="unmute"?this.videoEl&&this.videoEl.muted&&this.setMuted(!1):d==="enterfullscreen"?this.setFullscreen(!0,c):d==="exitfullscreen"?this.setFullscreen(!1,c):
d==="enterfullscreenWin"?this.setFullscreenWin(!0,c):d==="exitfullscreenWin"?this.setFullscreenWin(!1,c):d==="showMediainfo"?this.showMediainfo():d==="snapshot"?this.doSnapshot():d==="pictureInPicture"?this.togglePictureInPicture():d==="selectLocalFile"?this.selectLocalFile():d==="toggleSegment"?this.toggleSegment():d==="record"&&this.recordVideo()}}.bind(g);g.setFullscreen=function(c,d){if(c){if(!Ia()&&this.playerElm){this._config.fluid&&(Y(this.playerElm,"zwp-fluid"),this.playerElm.style.height=
null,this.playerElm.style.paddingTop=null);c=this.playerElm;var f=this.videoEl;c.requestFullscreen?c.requestFullscreen():c.webkitRequestFullscreen?c.webkitRequestFullScreen():c.mozRequestFullScreen?c.mozRequestFullScreen():c.msRequestFullscreen?c.msRequestFullscreen():c.oRequestFullscreen?c.oRequestFullscreen():f.webkitEnterFullScreen?f.webkitEnterFullScreen():(f=document.documentElement,f.requestFullscreen?f.requestFullscreen():f.mozRequestFullScreen?f.mozRequestFullScreen():f.webkitRequestFullScreen?
f.webkitRequestFullScreen():(f=document.body,document.documentElement.style.cssText="width:100%;height:100%;overflow:hidden;",f.style.cssText="width:100%;height:100%;overflow:hidden;",c.style.cssText="width:100%;height:100%;overflow:hidden;;margin:0px;padding:0px;",document.IsFullScreen=!0));S(this.playerElm,"zwp-fullscreen");d.setAttribute("data-action","exitfullscreen");if(!this.setupFullscrBtn){c=this.onfullscrchange;f=this.videoEl;var l=document.webkitExitFullscreen||document.webkitCancelFullScreen?
"webkitfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":document.msExitFullscreen?"MSFullscreenChange":"webkitfullscreenchange";document.addEventListener("fullscreenchange",c,!1);l&&document.addEventListener(l,c,!1);f&&Ra&&(f.addEventListener("webkitbeginfullscreen",c),f.addEventListener("webkitendfullscreen",c));this.setupFullscrBtn=d}}}else Ia()&&this.playerElm&&(this._config.fluid&&(S(this.playerElm,"zwp-fluid"),this.playerElm.style.height="0",c=this.videoEl,this.playerElm.style.paddingTop=
c.videoHeight&&c.videoWidth?c.videoHeight*100/c.videoWidth+"%":"64px"),Ta(this.playerElm),Y(this.playerElm,"zwp-fullscreen"),d.setAttribute("data-action","enterfullscreen"),d.setAttribute("title",P("enterFullScreen","Enter full screen")))}.bind(g);g.setFullscreenWin=function(c,d){this.playerElm&&(c?this.isFullscrWin||(S(this.playerElm,"zwp-fullscreen-win"),d.setAttribute("data-action","exitfullscreenWin"),this.isFullscrWin=!0,this.reposDanmuToolbar(!0),(c=this.playerElm.parentNode)&&c.tagName!=="BODY"&&
(this.oldWrapZIndex=c.style.zIndex,c.style.zIndex=99999999)):this.isFullscrWin&&(typeof this.oldWrapZIndex!=="undefined"&&(c=this.playerElm.parentNode,c.style.zIndex=this.oldWrapZIndex,delete this.oldWrapZIndex),Y(this.playerElm,"zwp-fullscreen-win"),d.setAttribute("data-action","enterfullscreenWin"),delete this.isFullscrWin,this.reposDanmuToolbar(!1)))}.bind(g);g.setMuted=function(c){this.videoEl&&(this.videoEl.muted=c)&&(this.oldVolume=this.videoEl.volume);c?(S(this.playerElm,"zwp-muted"),this.muteBtn&&
this.muteBtn.setAttribute("data-action","unmute")):(this.oldVolume&&(this.videoEl.volume=this.oldVolume,delete this.oldVolume),Y(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","mute"));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),this.popup_layers.style.display=null,delete this.mutedTipBox)}.bind(g);g.setVolume=function(c){this.videoEl&&(this.lastVolume=c,this.videoEl.volume=c,this.audioVolumeNode&&(this.audioVolumeNode.gain.value=c))}.bind(g);
g.initAudioContext=function(){if(this.videoEl&&!this.audioContext)try{this.audioContext=new (N.AudioContext||N.webkitAudioContext),this.audioSource=this.audioContext.createMediaElementSource(this.videoEl),this.audioGainNode=this.audioContext.createGain(),this.audioGainNode.gain.value=1,this.audioVolumeNode=this.audioContext.createGain(),this.audioVolumeNode.gain.value=this.lastVolume||this.videoEl.volume,this.audioSource.connect(this.audioVolumeNode),this.audioVolumeNode.connect(this.audioGainNode),
this.audioGainNode.connect(this.audioContext.destination),console.log("Web Audio API \u97f3\u9891\u5904\u7406\u94fe\u5df2\u521d\u59cb\u5316")}catch(c){console.warn("Web Audio API \u521d\u59cb\u5316\u5931\u8d25:",c)}};g.toggleSegment=function(){if(this.videoEl&&this.videoEl.duration){this.segment.isActive=!this.segment.isActive;var c=this.controlbar?this.controlbar.querySelector("#segmentLayer"):null,d=this.controlbar?this.controlbar.querySelector(".zwp-segmentBtn"):null;if(this.segment.isActive){if(c&&
(c.classList.add("active"),(c=c.closest(".zwp__time-rail"))&&c.classList.add("segment-active")),d&&d.closest(".zwp-segmentButton").classList.add("active"),this.segment.endTime===0&&(d=this.videoEl.duration||100,c=this.videoEl.currentTime||0,this.segment.startTime=c,this.segment.endTime=Math.min(c+d*.1,d)),this.updateSegmentUI(),this.setupSegmentHandlers(),this.videoEl.currentTime<this.segment.startTime||this.videoEl.currentTime>this.segment.endTime)this.videoEl.currentTime=this.segment.startTime}else c&&
(c.classList.remove("active"),(c=c.closest(".zwp__time-rail"))&&c.classList.remove("segment-active")),d&&d.closest(".zwp-segmentButton").classList.remove("active"),this.removeSegmentHandlers()}};g.updateSegmentUI=function(){if(this.videoEl&&this.videoEl.duration){var c=this.controlbar?this.controlbar.querySelector("#segmentLayer"):null;if(c){var d=c.querySelector("#segmentHandleStart"),f=c.querySelector("#segmentHandleEnd");c=c.querySelector("#segmentSelection");if(d&&f&&c){var l=this.segment.startTime/
this.videoEl.duration*100,r=this.segment.endTime/this.videoEl.duration*100;d.style.left=l+"%";f.style.left=r+"%";c.style.left=l+"%";c.style.width=r-l+"%"}}}};g.setupSegmentHandlers=function(){var c=this;if(!c.segmentHandlersSetup){var d=c.controlbar?c.controlbar.querySelector("#segmentLayer"):null;if(d){var f=d.querySelector("#segmentHandleStart"),l=d.querySelector("#segmentHandleEnd"),r=c.controlbar?c.controlbar.querySelector(".zwp__time-rail"):null;if(f&&l&&r){var G=function(L){return function(O){O.preventDefault();
c.segment.isDragging=!0;c.segment.dragTarget=L;if(O=d.querySelector("#segmentTooltip")){O.classList.remove("start-handle","end-handle");if(L==="start"){O.classList.add("start-handle");var T=d.querySelector("#segmentHandleStart");if(T){T=T.getBoundingClientRect();var C=r.getBoundingClientRect();T=T.left+T.width/2-C.left;O.style.left=T+"px";O.textContent=aa(c.segment.startTime)}}else if(O.classList.add("end-handle"),T=d.querySelector("#segmentHandleEnd"))T=T.getBoundingClientRect(),C=r.getBoundingClientRect(),
T=T.left+T.width/2-C.left,O.style.left=T+"px",O.textContent=aa(c.segment.endTime);O.style.transform="translateX(-50%) translateY(-100%)";O.style.display="block"}document.addEventListener("mousemove",J);document.addEventListener("mouseup",Q);document.addEventListener("touchmove",J,{passive:!1});document.addEventListener("touchend",Q)}},J=function(L){if(c.segment.isDragging&&c.videoEl&&c.videoEl.duration){var O=r.getBoundingClientRect();L=(L.clientX||(L.touches?L.touches[0].clientX:0))-O.left;L<0&&
(L=0);L>O.width&&(L=O.width);O=L/O.width*c.videoEl.duration;var T=d.querySelector("#segmentTooltip");c.segment.dragTarget==="start"?(O>c.segment.endTime-1&&(O=c.segment.endTime-1),c.segment.startTime=O):(O<c.segment.startTime+1&&(O=c.segment.startTime+1),c.segment.endTime=O);c.videoEl.currentTime=O;T&&(T.textContent=aa(O),T.style.left=L+"px",T.style.transform="translateX(-50%) translateY(-100%)");c.updateSegmentUI()}},Q=function(){c.segment.isDragging=!1;c.segment.dragTarget=null;var L=d.querySelector("#segmentTooltip");
L&&(L.style.display="none",L.classList.remove("start-handle","end-handle"));c.videoEl.currentTime=c.segment.startTime;document.removeEventListener("mousemove",J);document.removeEventListener("mouseup",Q);document.removeEventListener("touchmove",J);document.removeEventListener("touchend",Q)};f.addEventListener("mousedown",G("start"));f.addEventListener("touchstart",G("start"),{passive:!1});l.addEventListener("mousedown",G("end"));l.addEventListener("touchstart",G("end"),{passive:!1});c.segmentHandlersSetup=
!0}}}};g.removeSegmentHandlers=function(){this.segmentHandlersSetup=!1};g.recordingSettings={mode:"ask"};g.recording={isRecording:!1,startTime:null,mediaRecorder:null,recordedChunks:[],timer:null,duration:0,maxDuration:14400,format:null,indicator:null,isLive:!1};g.streamContentCache=null;g.recordVideo=function(){var c=this;if(c.videoEl&&c.videoEl.src){var d=c.recording,f=c._config&&c._config.isLive?"\u76f4\u64ad":"\u70b9\u64ad",l=null;l=c.container?c.container.querySelector(".zwp-recordBtn"):c.element?
c.element.querySelector(".zwp-recordBtn"):c.playerElm?c.playerElm.querySelector(".zwp-recordBtn"):document.querySelector(".zwp-recordBtn");d.isRecording?(console.log("\ud83d\uded1 "+f+"\u5f55\u5236\u8fdb\u884c\u4e2d\uff0c\u505c\u6b62\u5f55\u5236"),F(c,l)):(console.log("\ud83c\udfaf \u4f7f\u7528\u7edf\u4e00\u7684"+f+"\u5f55\u5236\u51b3\u7b56\u903b\u8f91..."),c.makeRecordingDecision(l,function(r,G){console.log(f+"\u5f55\u5236\u51b3\u7b56\u7ed3\u679c:",r,G);switch(r){case "show_options":console.log("\ud83d\udccb \u663e\u793a"+
f+"\u5f55\u5236\u9009\u9879\u83dc\u5355");q(c,l);break;case "record_video":console.log("\ud83c\udfac \u76f4\u63a5\u5f00\u59cb"+f+"\u89c6\u9891\u5f55\u5236");m(c,l,"video");break;case "record_audio":console.log("\ud83c\udfb5 \u76f4\u63a5\u5f00\u59cb"+f+"\u97f3\u9891\u5f55\u5236");m(c,l,"audio");break;default:console.log("\ud83d\udccb \u9ed8\u8ba4\u663e\u793a"+f+"\u5f55\u5236\u9009\u9879\u83dc\u5355"),q(c,l)}}))}else console.warn("\u6ca1\u6709\u53ef\u4e0b\u8f7d\u7684\u89c6\u9891\u6e90")};g.makeRecordingDecision=
function(c,d){var f=this.recordingSettings?this.recordingSettings.mode:"ask";console.log("\ud83c\udfaf \u5f55\u5236\u51b3\u7b56 - \u8bbe\u7f6e\u6a21\u5f0f:",f);b(this,function(l){console.log("\ud83c\udfaf \u6d41\u5206\u6790\u7ed3\u679c:",l);f==="ask"?l.hasVideo&&l.hasAudio?d("show_options",l):l.hasAudio?d("record_audio",l):d("record_video",l):f==="audio"&&l.hasAudio?d("record_audio",l):f==="video"&&l.hasAudio&&!l.hasVideo?d("record_audio",l):d("record_video",l)})};g.startHideControlbar=function(c){c.controlbar&&
!c._config.fixedControlbar&&(c.hideControlbarTime=(new Date).getTime()+c._config.hideControlbarTimeout,c.hideControlbarTimer||(c.hideControlbarTimer=N.setInterval(function(){(new Date).getTime()>=c.hideControlbarTime&&(N.clearInterval(c.hideControlbarTimer),delete c.hideControlbarTimer,Da(c.controlbar,1E3,function(d){d.style.display="none";S(c.playerElm,"hide-cursor");c.isControlbarhidden=!0;typeof c._config.onhideControlbar=="function"&&c._config.onhideControlbar.call(c)}))},1E3)))}.bind(g);g.buildProgressBar=
function(){var c={};if(this.controlbar){var d=this.controlbar;c.rail=d.querySelector(".zwp__time-rail");c.timeInfo=d.querySelector(".zwp__time-info");if(this._config.isLive)c.rail&&(Y(c.rail,"has-duration"),S(c.rail,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype||(c.timeInfo&&(c.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">Live</div>',c.streamtype=d.querySelector(".zwp-streamtype")),this.progressBar=c);else if(c.timeInfo&&(this.progressBar&&this.progressBar.streamtype?this.progressBar.streamtype.innerHTML=
"VOD":(c.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">VOD</div>',c.streamtype=d.querySelector(".zwp-streamtype"))),c.rail||(d.insertAdjacentHTML("beforeend",'<div class="zwp__time-rail"></div>'),c.rail=d.querySelector(".zwp__time-rail")),Y(c.rail,"zwp-hidden"),S(c.rail,"has-duration"),this._config.disableSeek&&S(c.rail,"zwp_disabled"),this.progressBar&&this.progressBar.total)this.progressBar.rail&&this._config.useProgressTooltip&&(d=this.progressBar.rail.querySelector(".zwp__time-float"))&&
(f=d.querySelector(".zwp__time-thumbnail"),f||(d.insertAdjacentHTML("afterbegin",'<div class="zwp__time-thumbnail"></div>'),f=d.querySelector(".zwp__time-thumbnail"),this.progressBar.thumbnails=f),this._config.thumbnails?(J=this._config.thumbnails,f&&(J.rowsize=typeof J.row=="number"?J.row:Math.ceil(Math.sqrt(J.total)),f.style.width=J.width+"px",f.style.height=J.height+"px",f.style.backgroundImage="url("+J.url+")"),d.style.width=4+J.width+"px",d.style.height=4+J.height+"px",S(d,"zwp__thumbnail")):
(d.style.width=null,d.style.height=null,f&&(f.style.width="0px",f.style.height="0px",f.style.backgroundImage=null),Y(d,"zwp__thumbnail")));else{var f='<span class="zwp__time-total zwp__time-slider"><span class="zwp__bar zwp__time-buffering"></span><span class="zwp__bar zwp__time-loaded"></span><span class="zwp__bar zwp__time-current"></span><span class="zwp__time-chapter"></span><span class="zwp__time-hovered no-hover"></span><span class="zwp__time-thumb"><span class="zwp__time-thumb-content"></span></span>';
if(this._config.useProgressTooltip){var l="",r="",G="";if(typeof this._config.thumbnails==="object"&&this._config.thumbnails!=null){var J=this._config.thumbnails;typeof J.width=="number"&&typeof J.height=="number"&&typeof J.total=="number"&&(J.rowsize=typeof J.row=="number"?J.row:Math.ceil(Math.sqrt(J.total)),G=' style="width: '+(4+J.width)+"px; height: "+(4+J.height)+'px;"',r=" zwp__thumbnail",l='<div class="zwp__time-thumbnail" style="width: '+J.width+"px;height: "+J.height+"px; background-image: url("+
J.url+');"></div>')}f+='<div class="zwp__time-float'+r+'"'+G+">"+l+'<span class="zwp__time-float-current">0:00</span><span class="zwp__time-float-corner corner_external"></span><span class="zwp__time-float-corner corner_internal"></span></div>'}c.rail.innerHTML=f+'</span><div class="zwp-segment-layer" id="segmentLayer"><div class="zwp-segment-selection" id="segmentSelection"></div><div class="zwp-segment-handle zwp-segment-handle-start" id="segmentHandleStart"></div><div class="zwp-segment-handle zwp-segment-handle-end" id="segmentHandleEnd"></div><div class="zwp-segment-tooltip" id="segmentTooltip" style="display: none;"></div></div>';
c.buffering=d.querySelector(".zwp__time-buffering");c.total=d.querySelector(".zwp__time-total");c.loaded=d.querySelector(".zwp__time-loaded");c.current=d.querySelector(".zwp__time-current");c.thumb=d.querySelector(".zwp__time-thumb");c.timefloat=d.querySelector(".zwp__time-float");c.timefloatcurrent=d.querySelector(".zwp__time-float-current");c.thumbnails=d.querySelector(".zwp__time-thumbnail");c.slider=d.querySelector(".zwp__time-slider");c.hovered=d.querySelector(".zwp__time-hovered");c.chapters=
d.querySelector(".zwp__time-chapter");c.newTime=0;c.forcedHandlePause=!1;c.buffering.style.display="none";c.slider.addEventListener("dragstart",function(){return!1});this.progressBar=c;this.showTimefloat=function(L){if(this._config.useProgressTooltip){var O=L.originalEvent&&L.originalEvent.changedTouches?L.originalEvent.changedTouches[0].pageX:L.changedTouches?L.changedTouches[0].pageX:L.pageX;L=this.progressBar;var T=this.videoEl.duration;var C=A(L.total);var W=L.total.offsetWidth;O<C.left?O=C.left:
O>W+C.left&&(O=W+C.left);O-=C.left;C=O/W;L=this.progressBar;L.timefloatcurrent.innerHTML=ba(T*C);L.thumbnails&&this._config.thumbnails?(T=this._config.thumbnails,C=Math.floor(C*T.total),C>=T.total&&(C=T.total-1),T.rowsize!=0&&(L.thumbnails.style.backgroundPosition="-"+C%T.rowsize*T.width+"px -"+T.height*Math.floor(C/T.rowsize)+"px")):(T=7*L.timefloatcurrent.innerHTML.length+10,T<40&&(T=40),L.timefloat.style.width=T+"px");T=L.timefloat.offsetWidth/2;L.timefloat.style.left=(O<T?T:O>W-T?W-T:O)+"px";
L.timefloat.style.display="block"}}.bind(this);c.slider.addEventListener("mouseenter",function(L){var O=this;if(O.videoEl){var T=O.videoEl.duration;isNaN(T)||T===Infinity||L.target!==c.slider||(c.bindMouseMoveEvent||(c.slider.addEventListener("mousemove",function(C){var W=C.target;(W===c.slider||W.closest(".zwp__time-slider"))&&O.showTimefloat(C)}),c.bindMouseMoveEvent=!0),c.timefloat&&(c.timefloat.style.display="block"))}}.bind(this));c.slider.addEventListener("mouseleave",function(){if(this.videoEl){var L=
this.videoEl.duration;isNaN(L)||L===Infinity||ma||!c.timefloat||(c.timefloat.style.display="none")}}.bind(this));var Q=function(L,O){var T=this,C=c.slider.offsetWidth,W=A(c.slider);W=L.pageX-W.left;W<0?W=0:W>C&&(W=C);C=(W*100/C).toFixed(4);c.thumb.style.left=C+"%";O?(T.seekTimeProgress(C),T.lastSeekProgress=C):typeof T.lastSeekProgress!="undefined"&&Math.abs(C-T.lastSeekProgress)>1&&(T.lastSeekProgress=C,T.seekTimer||(T.seekTimer=setTimeout(function(){T.seekTimeProgress(T.lastSeekProgress);delete T.seekTimer},
1E3)));L.preventDefault();L.stopPropagation()}.bind(this);this.on_progressbar_mousemove=function(L){var O=L.target,T;if(T=ma)a:if(T=c.slider,O===T)T=!0;else{for(;O.parentNode;){if(O.parentNode===T){T=!0;break a}O=O.parentNode}T=!1}T&&Q(L)}.bind(this);this.on_progressbar_mouseup=function(L){if(ma){document.removeEventListener("mousemove",this.on_progressbar_mousemove);document.removeEventListener("mouseup",this.on_progressbar_mouseup);ma=!1;delete this.isTrackingProgress;this.seekTimer&&(clearTimeout(this.seekTimer),
delete this.seekTimer);if(L.target&&(L.target.parentNode==c.thumb||L.target==c.thumb)){var O=c.slider.offsetWidth,T=A(c.slider);L=L.pageX-T.left;L<0?L=0:L>O&&(L=O);O=(L*100/O).toFixed(4);typeof this.lastSeekProgress!="undefined"?Math.abs(O-this.lastSeekProgress)>1&&this.seekTimeProgress(O):this.seekTimeProgress(O)}delete this.lastSeekProgress}}.bind(this);this.on_progressbar_mousedown=function(L){ma||this._config.disableSeek||(g.isTrackingProgress=!0,Q(L,!0),document.addEventListener("mousemove",
this.on_progressbar_mousemove),document.addEventListener("mouseup",this.on_progressbar_mouseup),ma=!0,L.preventDefault(),L.stopPropagation())}.bind(this);c.slider.addEventListener("mousedown",this.on_progressbar_mousedown)}}}.bind(g);g.updateProgressBarType=function(){if(this.controlbar){var c=this.controlbar.querySelector(".zwp__time-rail");this._config.isLive?(c&&(Y(c,"has-duration"),S(c,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="Live",
this.progressBar.streamtype.style.display="block")):(c&&(Y(c,"zwp-hidden"),S(c,"has-duration"),this._config.disableSeek&&S(c,"zwp_disabled")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="VOD",this.progressBar.streamtype.style.display="block"))}}.bind(g);g.updateDuration=function(c){if(c.controlbar){var d=c.controlbar.querySelector(".zwp__duration-container"),f=c.videoEl.duration;if(isNaN(f)||f===Infinity)d.style.display="none",c._config.isLive=!0;else{d.style.display=
"block";d=d.querySelector(".zwp__duration");var l=parseInt(f/3600),r=parseInt(f%3600/60);f=parseInt(f%60);var G="";l>0&&(G+=l+":");G=r>=10?G+(r+":"):r>0?G+("0"+r+":"):G+"00:";d.innerHTML=f>=10?G+f:G+("0"+f);c.chapters&&setTimeout(function(){this.loadChapters()}.bind(c),1E3)}c.updateProgressBarType();c.syncUI()}}.bind(g);g.setProgressRail=function(c){var d=c!==void 0?c.target||c.detail.target:this.videoEl,f=null;d&&d.buffered&&d.buffered.length>0&&d.buffered.end&&this.videoEl.duration?f=d.buffered.end(d.buffered.length-
1)/this.videoEl.duration:d&&d.bytesTotal!==void 0&&d.bytesTotal>0&&d.bufferedBytes!==void 0?f=d.bufferedBytes/d.bytesTotal:c&&c.lengthComputable&&c.total!==0&&(f=c.loaded/c.total);f!==null&&(f=Math.min(1,Math.max(0,f)),this.progressBar&&this.progressBar.loaded&&(this.progressBar.loaded.style.width=f*100+"%"))}.bind(g);g.updateProgress=function(c){if(!this.isTrackingProgress&&this.progressBar&&this.progressBar.thumb){var d=this.videoEl.duration;!isNaN(d)&&d!==Infinity&&d>0&&(c+.3>=d&&(c=d),c=c/d*100,
this.progressBar.thumb.style.left=c+"%",this.progressBar.current&&(this.progressBar.current.style.width=c/100*100+"%"))}}.bind(g);g.seekTimeProgress=function(c){if(this.videoEl){var d=this.videoEl.duration;isNaN(d)||d===Infinity||(this.videoEl.currentTime=d*c/100,this.progressBar.current&&(this.progressBar.current.style.width=c+"%"))}}.bind(g);g.seekTimeProgressByTime=function(c){if(this.videoEl){var d=this.videoEl.duration;isNaN(d)||d===Infinity||(this.videoEl.currentTime=c,this.progressBar.current&&
(this.progressBar.current.style.width=c/d*100+"%"))}}.bind(g);g.on_speedItemclick=function(c){c.stopPropagation();c=c.currentTarget;if(!U(c,"active")){var d=parseFloat(c.innerText),f=c.parentNode.querySelector(".active");f&&Y(f,"active");S(c,"active");this.videoEl&&(this.videoEl.playbackRate=d);if(f=this.controlbar.querySelector(".zwp-speedBtn"))f.innerHTML=d==1?P("speed","Rate"):c.innerText}var l=c.parentNode;l.style.display="none";setTimeout(function(){l.style.display=null},1E3)}.bind(g);g.resetSpeedMenu=
function(){if(this.controlbar){var c=this.controlbar.querySelector(".zwp-speed-item.active");if(c&&c.innerText!=="1.0x"){var d=this.controlbar.querySelector(".zwp-speedBtn");d&&(d.innerHTML=P("speed","Rate"));Y(c,"active");c=c.parentNode.querySelectorAll("li.zwp-speed-item");if(c.length>0)for(d=0;d<c.length;d++)if(c[d].innerText==="1.0x"){S(c[d],"active");break}}}}.bind(g);g.syncUI=function(){if(this._config.isLive){var c=this.controlbar.querySelector(".zwp-speedButton");c&&this.controlbar.removeChild(c);
Y(this.controlbar,"zwp-vodplayer")}else{if(this._config.speedButton&&(c=this.controlbar.querySelector(".zwp-speedButton"),!c)){var d=this.controlbar.querySelector(".zwp-infoButton")||this.controlbar.querySelector(".zwp-optionButton")||this.controlbar.querySelector(".zwp-volume-docker");if(d){var f=ob();c=document.createElement("div");this.controlbar.insertBefore(c,d);c.outerHTML=f;c=this.controlbar.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");c.length>0&&c.forEach(function(l){l.addEventListener("click",
g.on_speedItemclick)})}}S(this.controlbar,"zwp-vodplayer")}}.bind(g);g.keyState={leftPressed:!1,rightPressed:!1,leftTimer:null,rightTimer:null,leftPressTime:0,rightPressTime:0,originalPlaybackRate:1,isFastForward:!1,leftRewindInterval:null,wasPlayingBeforeRewind:!1,frozenFrameTime:0,rewindStartTime:0,isRewinding:!1,rewindCompleted:!1};g.onKeydown=function(c){if(c){var d=this,f=document.activeElement;if(!f||!f.classList.contains("barrage_inp_text")&&f.tagName!=="INPUT"&&f.tagName!=="TEXTAREA"&&f.contentEditable!==
"true"||c.keyCode===27)if(c.keyCode===27)if(d.contextMenu)d.hideContextMenu(),c.stopPropagation(),c.preventDefault();else if(d.isFullscrWin&&d.controlbar){var l=d.controlbar.querySelector(".zwp-fullscrWinBtn");l&&(d.setFullscreenWin(!1,l),c.stopPropagation(),c.preventDefault())}else Ia()&&(c.stopPropagation(),c.preventDefault(),d.playerElm&&Ta(d.playerElm));else if(c.keyCode===13)d.danmuToolbar&&(l=d.danmuToolbar.querySelector(".zwp_switch"))&&U(l,"switch_on")&&(l=d.danmuToolbar.querySelector(".barrage_inp_text"))&&
(f=document.activeElement,f===l?(c=l.value.trim())&&d.sendDanmu(c)&&(l.value=""):(c.preventDefault(),l.focus()));else if(c.keyCode===38)c.preventDefault(),d.videoEl&&(c=d.videoEl.volume,c+=.05,c>1&&(c=1),d.setVolume(c),d.setMuted(!1),l=parseInt(c*100)+"%",l={icon:"speaker",text:l},d.toast(l,1200,!1),d.positionVolumeThumb&&d.positionVolumeThumb(c));else if(c.keyCode===40)c.preventDefault(),d.videoEl&&(c=d.videoEl.volume,c-=.05,c<0&&(c=0),d.setVolume(c),d.setMuted(c===0),l=parseInt(c*100)+"%",c===0&&
(l=P("muted","Muted")),l={icon:"speaker",text:l},d.toast(l,1200,!1),d.positionVolumeThumb&&d.positionVolumeThumb(c));else if(c.keyCode===32||c.keyCode===179)c.preventDefault(),d._config.isLive||d._config.disablePlayBtn||(d.playbtn?d.playbtn.click():d.controlbar&&(d.playbtn=d.controlbar.querySelector(".zwp-playbtn"),d.playbtn&&d.playbtn.click()));else if(c.keyCode===77||c.keyCode===109)d.videoEl&&(d.videoEl.muted?(d.toast(P("unmuted","Unmuted"),1E3,!1,!0),d.setMuted(!1)):(d.toast(P("muted","Muted"),
1E3,!1,!0),d.setMuted(!0)));else if(c.keyCode===68||c.keyCode===100){if(c.preventDefault(),d.danmuToolbar&&(l=d.danmuToolbar.querySelector(".zwp_switch")))l.click(),U(l,"switch_on")?d.toast(P("danmuEnabled","Danmu Enabled"),1E3,!1,!0):d.toast(P("danmuDisabled","Danmu Disabled"),1E3,!1,!0)}else if(c.shiftKey&&c.keyCode===49)c.preventDefault(),d.videoEl&&(d.videoEl.playbackRate=1,d.toast(P("playbackSpeed1x","Playback Speed: 1x"),1E3,!1,!0));else if(c.shiftKey&&c.keyCode===50)c.preventDefault(),d.videoEl&&
(d.videoEl.playbackRate=2,d.toast(P("playbackSpeed2x","Playback Speed: 2x"),1E3,!1,!0));else if(c.keyCode===76||c.keyCode===108)c.preventDefault(),d.playerElm&&(U(d.playerElm,"zwp-state-light-off")?d.lightOn():d.lightOff());else if(c.keyCode===48)c.preventDefault(),d._config.isLive||d._config.disablePlayBtn||!d.videoEl||(d.videoEl.readyState<2?console.log("\u89c6\u9891\u8fd8\u672a\u51c6\u5907\u597d\u91cd\u64ad\uff0creadyState:",d.videoEl.readyState):(d.segment&&d.segment.isActive&&d.segment.startTime!==
void 0?(d.videoEl.currentTime=d.segment.startTime,console.log("\u5feb\u6377\u952e 0: \u8df3\u8f6c\u5230\u7247\u6bb5\u5f00\u59cb\u4f4d\u7f6e:",d.segment.startTime)):d.videoEl.currentTime=0,d.videoEl.play().then(function(){d.setplaystate(!0)}).catch(function(r){r.name==="NotAllowedError"?d.toast(P("autoplayBlocked","Autoplay blocked by browser"),2E3,!1,!0):d.toast(P("playbackFailed","Playback failed")+": "+r.message,2E3,!1,!0)})));else if(c.keyCode===37)c.preventDefault(),d.videoEl&&!d._config.isLive&&
(d.videoEl.readyState<2?console.log("\u89c6\u9891\u8fd8\u672a\u51c6\u5907\u597d\u5feb\u9000\uff0creadyState:",d.videoEl.readyState):d.keyState.leftPressed||(c=0,d.segment&&d.segment.isActive&&d.segment.startTime!==void 0&&(c=d.segment.startTime),d.videoEl.currentTime<=c||(d.keyState.leftPressed=!0,d.keyState.leftPressTime=Date.now(),d.keyState.wasPlayingBeforeRewind=!0,d.seekVideo(-5),d.keyState.leftTimer=setTimeout(function(){if(d.keyState.leftPressed){d.keyState.isRewinding=!0;d.keyState.frozenFrameTime=
d.videoEl.currentTime;d.keyState.rewindStartTime=Date.now();d.videoEl.paused||d.videoEl.pause();d.bigPlayOverlay&&(d.bigPlayOverlay.style.display="none");var r=d.videoEl.duration||1;r=r>=3600?20:r>=1800?25:r>=600?30:80;d.timeSpan||(d.timeSpan=d.controlbar?d.controlbar.querySelector(".zwp__currenttime"):null);d.keyState.leftRewindInterval=setInterval(function(){if(d.keyState.leftPressed&&d.videoEl){var G=d.videoEl.currentTime-5,J=0;d.segment&&d.segment.isActive&&d.segment.startTime!==void 0&&(J=d.segment.startTime);
G<=J?(d.videoEl.currentTime=J,clearInterval(d.keyState.leftRewindInterval),clearTimeout(d.keyState.leftTimer),d.keyState.leftRewindInterval=null,d.keyState.leftTimer=null,d.videoEl.play().then(function(){d.setplaystate(!0)}).catch(function(Q){console.warn("\u64ad\u653e\u542f\u52a8\u5931\u8d25:",Q)}),d.keyState.frozenFrameTime=0,d.keyState.isRewinding=!1,d.keyState.rewindCompleted=!0):(d.videoEl.currentTime=G,d.updateProgress&&d.updateProgress(G),d.timeSpan&&(d.timeSpan.innerHTML=ba(G)))}},r)}},300))));
else if(c.keyCode===39)c.preventDefault(),d.videoEl&&!d._config.isLive&&(d.videoEl.readyState<2?console.log("\u89c6\u9891\u8fd8\u672a\u51c6\u5907\u597d\u5feb\u8fdb\uff0creadyState:",d.videoEl.readyState):d.keyState.rightPressed||(c=d.videoEl.duration,d.segment&&d.segment.isActive&&d.segment.endTime!==void 0&&(c=d.segment.endTime),d.videoEl.currentTime>=c?console.log("\u5df2\u5230\u8fbe\u524d\u8fdb\u8fb9\u754c\uff0c\u4e0d\u5904\u7406\u53f3\u952e\u64cd\u4f5c"):(d.keyState.rightPressed=!0,d.keyState.rightPressTime=
Date.now(),d.keyState.originalPlaybackRate=d.videoEl.playbackRate||1,d.keyState.maxBoundary=c,d.videoEl.paused&&(d.videoEl.play(),d.setplaystate(!0)),d.keyState.rightTimer=setTimeout(function(){d.keyState.rightPressed&&(d.videoEl.playbackRate=3,d.keyState.isFastForward=!0)},300))));else if(c.keyCode===70||c.keyCode===102)c.preventDefault(),d.controlbar&&(c=d.controlbar.querySelector('[data-action="enterfullscreen"], [data-action="exitfullscreen"]'))&&c.click();else if(c.keyCode===82||c.keyCode===
114)c.preventDefault(),d._config.recordButton&&(c=d.controlbar?d.controlbar.querySelector(".zwp-recordBtn"):null)&&c.click()}}.bind(g);g.onKeyup=function(c){if(c){var d=this;if(c.keyCode===37)c.preventDefault(),d.keyState.leftPressed&&(d.keyState.leftPressed=!1,d.keyState.leftTimer&&(clearTimeout(d.keyState.leftTimer),d.keyState.leftTimer=null),d.keyState.leftRewindInterval&&(clearInterval(d.keyState.leftRewindInterval),d.keyState.leftRewindInterval=null),d.videoEl&&d.videoEl.play().then(function(){d.setplaystate(!0)}).catch(function(l){console.warn("\u64ad\u653e\u542f\u52a8\u5931\u8d25:",
l)}),d.keyState.frozenFrameTime=0,d.keyState.isRewinding=!1,d.keyState.rewindCompleted=!1);else if(c.keyCode===39&&(c.preventDefault(),d.keyState.rightPressed)){d.keyState.rightPressed=!1;d.keyState.rightTimer&&(clearTimeout(d.keyState.rightTimer),d.keyState.rightTimer=null);if(Date.now()-d.keyState.rightPressTime<300){c=d.videoEl.duration;d.segment&&d.segment.isActive&&d.segment.endTime!==void 0&&(c=d.segment.endTime);var f=d.videoEl.currentTime+5;if(f>c)f=c,console.log("\u53f3\u952e\u77ed\u6309\uff1a\u8c03\u6574\u5230\u8fb9\u754c\u4f4d\u7f6e",
c);else{d.seekVideo(5);return}d.videoEl.currentTime=f;d.updateProgress&&d.updateProgress(f);d.timeSpan&&(d.timeSpan.innerHTML=ba(f))}d.keyState.isFastForward&&d.videoEl&&(d.videoEl.playbackRate=d.keyState.originalPlaybackRate,d.keyState.isFastForward=!1)}}}.bind(g);g.on_volumeBoostSliderChange=function(c){var d=c.currentTarget;c=d.getAttribute("data-action");this.volumeBoostConfig||(this.volumeBoostConfig={volumeBoost:0});Qa(d);typeof this.volumeBoostConfig[c]!=="undefined"&&(d=parseFloat(d.value),
this.volumeBoostConfig[c]=d,this.audioContext||this.initAudioContext(),this.audioGainNode&&(c=Math.pow(10,d/20),this.audioGainNode.gain.value=c,console.log(`\u97f3\u9891\u6837\u672c\u589e\u5f3a: ${d}dB, \u589e\u76ca\u500d\u6570: ${c.toFixed(2)}x`)))}.bind(g);g.on_colorSliderChange=function(c){var d=c.currentTarget;c=d.getAttribute("data-action");this.colors||(this.colors={brightness:0,contrast:0,saturation:0,hue:0});Qa(d);if(typeof this.colors[c]!=="undefined"&&(d=parseInt(d.value),c==="hue"?this.colors.hue=
parseInt(d*180/100):this.colors[c]=d,this.videoEl)){c=null;d=this.colors;d.brightness&&(c="brightness("+(100+d.brightness)+"%)");if(d.contrast){var f=100+d.contrast;c=(c?c+" ":"")+("contrast("+f+"%)")}d.saturation&&(f=100+d.saturation,c=(c?c+" ":"")+("saturate("+f+"%)"));d.hue&&(d=d.hue,c=(c?c+" ":"")+("hue-rotate("+d+"deg)"));this.videoEl.style.filter=c}}.bind(g);g.createVolumeBoostPanel=function(){var c=this,d='<div class="zwp-volumeBoostPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
P("audioEffectAdjustment","Audio Effects")+'</div><div class="form-row"><label class="row-label">'+P("volumeBoost","Volume Boost")+'</label><div class="row-content">'+Ja("","volumeBoost",-12,12,.1,!0)+'</div></div><div class="form-row form-bottombar"><button class="zwp-form-button action-item" data-action="resetVolumeBoost">'+P("reset","Reset")+"</button></div></div>";c.overlay_layers.insertAdjacentHTML("beforeend",d);d=c.overlay_layers.querySelector(":scope > .zwp-volumeBoostPanel");var f=d.querySelector(".closeBtn");
f&&f.addEventListener("click",function(l){l.stopPropagation();var r=l.currentTarget.closest(".zwp-volumeBoostPanel");Da(r,500,function(){r.remove()});delete c.volumeBoostPanel});f=d.querySelectorAll('input[type="range"]');f.length>0&&f.forEach(function(l){l.addEventListener("input",g.on_volumeBoostSliderChange);if(c.volumeBoostConfig){var r=l.getAttribute("data-action");typeof c.volumeBoostConfig[r]!=="undefined"&&(l.value=c.volumeBoostConfig[r],Qa(l))}});d.addEventListener("mousedown",function(l){l.stopPropagation()});
d.addEventListener("dblclick",function(l){l.stopPropagation()});d.addEventListener("click",function(l){l.stopPropagation()});(f=d.querySelector(".zwp-form-button"))&&f.addEventListener("click",function(l){l.preventDefault();l.stopPropagation();l=l.currentTarget.closest(".zwp-volumeBoostPanel").querySelectorAll('input[type="range"]');l.length>0&&l.forEach(function(r){parseFloat(r.value)!==0&&(r.value=0,u(r,"input"))});c.audioGainNode&&(c.audioGainNode.gain.value=1,console.log("\u97f3\u9891\u589e\u76ca\u5df2\u91cd\u7f6e\u4e3a 0dB (\u500d\u6570: 1.0x)"))});
return c.volumeBoostPanel=d}.bind(g);g.createColorSettingPanel=function(){var c=this,d='<div class="zwp-colorSettingPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+P("videoColorAdjustment","Video Color Adjustment")+'</div><div class="form-row"><label class="row-label">'+P("brightness","Brightness")+'</label><div class="row-content">'+Ja("","brightness")+'</div></div><div class="form-row"><label class="row-label">'+P("contrast",
"Contrast")+'</label><div class="row-content">'+Ja("","contrast")+'</div></div><div class="form-row"><label class="row-label">'+P("saturation","Saturation")+'</label><div class="row-content">'+Ja("","saturation")+'</div></div><div class="form-row"><label class="row-label">'+P("hue","Hue")+'</label><div class="row-content">'+Ja("","hue")+'</div></div><div class="form-row form-bottombar"><button class="zwp-form-button action-item" data-action="resetcolors">'+P("reset","Reset")+"</button></div></div>";
c.overlay_layers.insertAdjacentHTML("beforeend",d);d=c.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");var f=d.querySelector(".closeBtn");f&&f.addEventListener("click",function(l){l.stopPropagation();var r=l.currentTarget.closest(".zwp-colorSettingPanel");Da(r,500,function(){r.remove()});delete c.colorSettingPanel});f=d.querySelectorAll('input[type="range"]');f.length>0&&f.forEach(function(l){l.addEventListener("input",g.on_colorSliderChange);if(c.colors){var r=l.getAttribute("data-action");
typeof c.colors[r]!=="undefined"&&(l.value=c.colors[r],Qa(l))}});d.addEventListener("mousedown",function(l){l.stopPropagation()});d.addEventListener("dblclick",function(l){l.stopPropagation()});d.addEventListener("click",function(l){l.stopPropagation()});(f=d.querySelector(".zwp-form-button"))&&f.addEventListener("click",function(l){l.preventDefault();l.stopPropagation();l=l.currentTarget.closest(".zwp-colorSettingPanel").querySelectorAll('input[type="range"]');l.length>0&&l.forEach(function(r){parseInt(r.value)!==
0&&(r.value=0,u(r,"input"))})});return c.colorSettingPanel=d}.bind(g);g.createRecordingSettingsPanel=function(){var c=this,d='<div class="zwp-recordingSettingsPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+P("recordingSettingsTitle","Recording Settings")+'</div><div class="form-row"><div class="zwp-radio-group"><label class="zwp-radio-item"><input type="radio" name="recordingOption" value="ask" checked><span class="zwp-radio-label">'+
P("recordingOptionAsk","Ask Every Time")+'</span></label><label class="zwp-radio-item"><input type="radio" name="recordingOption" value="video"><span class="zwp-radio-label">'+P("recordingOptionVideo","Record Video Directly")+'</span></label><label class="zwp-radio-item"><input type="radio" name="recordingOption" value="audio"><span class="zwp-radio-label">'+P("recordingOptionAudio","Record Audio Directly")+'</span></label></div></div><div class="form-row recording-note"><div class="zwp-note-text">'+
P("recordingNote","Note: If no audio is present, video will be recorded directly")+"</div></div></div>";c.overlay_layers.insertAdjacentHTML("beforeend",d);d=c.overlay_layers.querySelector(":scope > .zwp-recordingSettingsPanel");var f=d.querySelector(".closeBtn");f&&f.addEventListener("click",function(l){l.stopPropagation();var r=l.currentTarget.closest(".zwp-recordingSettingsPanel");Da(r,500,function(){r.remove()});delete c.recordingSettingsPanel});if(f=d.querySelector('input[name="recordingOption"][value="'+
(c.recordingSettings.mode||"ask")+'"]'))f.checked=!0;f=d.querySelectorAll('input[name="recordingOption"]');f.length>0&&f.forEach(function(l){l.addEventListener("change",function(r){r=r.target.value;c.recordingSettings.mode=r;console.log("\u5f55\u5236\u8bbe\u7f6e\u5df2\u66f4\u65b0\u4e3a:",r)});l.value===c.recordingSettings.mode&&(l.checked=!0)});d.addEventListener("mousedown",function(l){l.stopPropagation()});d.addEventListener("dblclick",function(l){l.stopPropagation()});d.addEventListener("click",
function(l){l.stopPropagation()});return c.recordingSettingsPanel=d}.bind(g);g.createShortcutHelpPanel=function(){var c=this,d='<div class="zwp-shortcutHelpPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+P("keyboardShortcuts","Keyboard Shortcuts")+'</div><div class="shortcut-list"><div class="shortcut-item"><div class="shortcut-key">Space/MediaKey </div><div class="shortcut-desc">'+P("shortcutPlayPause","Play / Pause")+'</div></div><div class="shortcut-item"><div class="shortcut-key">\u2192</div><div class="shortcut-desc">'+
P("shortcutSeekRight","Single press: forward 5s, hold: speed playback")+'</div></div><div class="shortcut-item"><div class="shortcut-key">\u2190</div><div class="shortcut-desc">'+P("shortcutSeekLeft","Rewind 5s (hold for continuous operation)")+'</div></div><div class="shortcut-item"><div class="shortcut-key">\u2191 / \u2193</div><div class="shortcut-desc">'+P("shortcutVolume","Increase / decrease volume by 5%")+'</div></div><div class="shortcut-item"><div class="shortcut-key">Esc</div><div class="shortcut-desc">'+
P("shortcutExit","Close menu / Exit fullscreen")+'</div></div><div class="shortcut-item"><div class="shortcut-key">F</div><div class="shortcut-desc">'+P("shortcutFullscreen","Fullscreen / Exit fullscreen")+'</div></div><div class="shortcut-item"><div class="shortcut-key">Enter</div><div class="shortcut-desc">'+P("shortcutSendDanmu","Send Danmu")+'</div></div><div class="shortcut-item"><div class="shortcut-key">D</div><div class="shortcut-desc">'+P("shortcutDanmu","Enable / Disable Danmu")+'</div></div><div class="shortcut-item"><div class="shortcut-key">M</div><div class="shortcut-desc">'+
P("shortcutMute","Mute / Unmute")+'</div></div><div class="shortcut-item"><div class="shortcut-key">0</div><div class="shortcut-desc">'+P("shortcutRestart","Restart")+'</div></div><div class="shortcut-item"><div class="shortcut-key">R</div><div class="shortcut-desc">'+P("shortcutRecord","Start / Stop Recording")+'</div></div><div class="shortcut-item"><div class="shortcut-key">L</div><div class="shortcut-desc">'+P("shortcutLight","Light Toggle")+'</div></div><div class="shortcut-item"><div class="shortcut-key">Shift + 1</div><div class="shortcut-desc">'+
P("shortcutSpeed1x","1x Speed (Normal)")+'</div></div><div class="shortcut-item"><div class="shortcut-key">Shift + 2</div><div class="shortcut-desc">'+P("shortcutSpeed2x","2x Speed")+"</div></div></div></div>";c.overlay_layers.insertAdjacentHTML("beforeend",d);d=c.overlay_layers.querySelector(":scope > .zwp-shortcutHelpPanel");var f=d.querySelector(".closeBtn");f&&f.addEventListener("click",function(l){l.stopPropagation();var r=l.currentTarget.closest(".zwp-shortcutHelpPanel");Da(r,500,function(){r.remove()});
delete c.shortcutHelpPanel});d.addEventListener("mousedown",function(l){l.stopPropagation()});d.addEventListener("dblclick",function(l){l.stopPropagation()});d.addEventListener("click",function(l){l.stopPropagation()});d.style.display="block";return c.shortcutHelpPanel=d}.bind(g);var za=function(c,d){if(c=c.querySelector(".zwp-optionPanel"))c=c.querySelectorAll(".zwp_switch"),c.length>0&&c.forEach(function(f){var l=f.getAttribute("data-action");d.indexOf(l)!==-1&&U(f,"switch_on")&&Y(f,"switch_on")})};
g.on_optionItemclick=function(c){c.stopPropagation();c=c.currentTarget;U(c,"zwp_switch")&&Sa(c);var d=c.getAttribute("data-action");if(d==="mirror")this.videoEl&&(c=U(c,"switch_on"),this._config.video_mirror=c,this.flipMirrorVideo(),c&&(this._config.video_rotated=0,za(this.controlbar,["rotated270","rotated90"])));else if(d==="flip")this.videoEl&&(c=U(c,"switch_on"),this._config.video_flip=c,this.flipMirrorVideo(),c&&(this._config.video_rotated=0,za(this.controlbar,["rotated270","rotated90"])));else if(d===
"rotated90")this.videoEl&&(c=U(c,"switch_on"),this._config.video_rotated=c?90:0,this.rotateVideo(),c&&(this._config.video_mirror=!1,this._config.video_flip=!1,za(this.controlbar,["mirror","flip","rotated270"])));else if(d==="rotated270")this.videoEl&&(c=U(c,"switch_on"),this._config.video_rotated=c?270:0,this.rotateVideo(),c&&(this._config.video_mirror=!1,this._config.video_flip=!1,za(this.controlbar,["mirror","flip","rotated90"])));else if(d==="loop")c=U(c,"switch_on"),this._config.loop=c;else if(d===
"showRecordingConfig"){var f=c.closest(".zwp-optionPanel");if(f&&(c=f.closest(".zwp-optionButton"))){c=this.overlay_layers.querySelector(":scope > .zwp-recordingSettingsPanel");if(!c&&(c=this.createRecordingSettingsPanel(),!c))return;c.style.display="block";f.style.display="none";setTimeout(function(){f.style.display=null},1E3)}}else if(d==="showVolumeBoostConfig"){if(f=c.closest(".zwp-optionPanel"))if(c=f.closest(".zwp-optionButton")){c=this.overlay_layers.querySelector(":scope > .zwp-volumeBoostPanel");
if(!c&&(c=this.createVolumeBoostPanel(),!c))return;c.style.display="block";f.style.display="none";setTimeout(function(){f.style.display=null},1E3)}}else if(d==="showColorConfig"&&(f=c.closest(".zwp-optionPanel"))&&(c=f.closest(".zwp-optionButton"))){c=this.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");if(!c&&(c=this.createColorSettingPanel(),!c))return;c.style.display="block";f.style.display="none";setTimeout(function(){f.style.display=null},1E3)}}.bind(g);g.flipMirrorVideo=function(){var c=
null;this._config.video_flip&&(c="rotateX(180.00deg)");this._config.video_mirror&&(c=c?c+" rotateY(180.00deg)":" rotateY(180.00deg)");this.videoEl.style.width="100%";this.videoEl.style.height="100%";this.videoEl.style.transform=c}.bind(g);g.rotateVideo=function(){var c=null,d=this.videoEl.parentNode;if(d&&d===this.videoWrapper)if(this._config.video_rotated){var f=d.offsetHeight;d=d.offsetWidth;var l=this.videoEl.videoHeight;this.videoEl.videoWidth&&l&&(this.videoEl.style.width=f+"px",this.videoEl.style.height=
d+"px",this.videoEl.style.transformOrigin="center center",l=(d-f)/2,f=(f-d)/2,this._config.video_rotated===90?c="translate("+l+"px, "+f+"px) rotate(0.25turn)":this._config.video_rotated===270&&(c="translate("+l+"px, "+f+"px) rotate(0.75turn)"),this.videoEl.style.transform=c)}else this.videoEl.style.transform&&(this.videoEl.style.transform=null,this.videoEl.style.width="100%",this.videoEl.style.height="100%")}.bind(g);g.setupEventsHandler=function(){var c=this,d=function(G){c.loadingOverlay&&(c.loadingOverlay.style.display=
"none");c.videoEl.play();c.setplaystate(!0);c.updateDuration(c);c._config.isLive&&c.controlbar&&(c.controlbar.querySelector(".zwp__duration-container").style.display="none");c._config.fluid&&(G=c.videoEl,S(c.playerElm,"zwp-fluid"),c.playerElm.style.maxWidth="100%",c.playerElm.style.width="100%",c.playerElm.style.height="0",c.playerElm.style.paddingTop=G.videoHeight&&G.videoWidth||c._config.keepAudioWindow?G.videoHeight*100/G.videoWidth+"%":"64px");c.buildProgressBar()};c.videoEl.addEventListener("loadedmetadata",
d);var f=c.videoEl,l=function(G){var J=!0;G.type==="ended"?!c._config.isLive&&c._config.loop?(N.setTimeout(function(){c.videoEl.currentTime=0;c.videoEl.play()},1E3),J=!1):(c.isEnded=!0,c.setplaystate(!1),c._config.isLive&&c._config.reconnect&&c.mpegtsPlayer&&(setTimeout(function(){c.lastDecodedFrames=0;c.closecall(c);c.openMpegts()},1E3),J=!1)):G.type==="play"?(delete c.isEnded,typeof c.postSeekTime!=="undefined"&&(c.seekTimeProgressByTime(c.postSeekTime),delete c.postSeekTime)):G.type==="pause"?
c.setplaystate(!1):G.type==="playing"&&c.setplaystate(!0);c.progressBar&&c.progressBar.buffering&&("play playing pause seeked ended error".split(" ").includes(G.type)?c.progressBar.buffering.style.display="none":["seeking","waiting","loadeddata"].includes(G.type)&&(c.progressBar.buffering.style.display=""));J&&typeof c._config.onmediaevent==="function"&&c._config.onmediaevent.call(c,G)},r=function(G){var J=this.currentTime;typeof c.postSeekTime!=="undefined"&&(J=c.postSeekTime);c.segment.isActive&&
!c.segment.isDragging&&J>=c.segment.endTime&&(c.keyState&&c.keyState.isFastForward?(this.currentTime=c.segment.endTime,c.videoEl.playbackRate=c.keyState.originalPlaybackRate||1,c.keyState.isFastForward=!1,c.keyState.rightPressed=!1,console.log("\u5feb\u8fdb\u5230\u8fbe\u7247\u6bb5\u7ed3\u675f\u4f4d\u7f6e\uff0c\u505c\u6b62\u5feb\u8fdb")):this.currentTime=c.segment.startTime);if(typeof c._config.ontimeupdate==="function")c._config.ontimeupdate(J);!c.timeSpan&&c.controlbar&&(c.timeSpan=c.controlbar.querySelector(".zwp__currenttime"));
c.timeSpan&&(c.timeSpan.innerHTML=ba(J));c.updateProgress(J);c.setProgressRail(G);c.renderSubtitles(J)};f.addEventListener("play",l);f.addEventListener("playing",l);f.addEventListener("pause",l);f.addEventListener("seeked",l);f.addEventListener("ended",l);f.addEventListener("error",l);f.addEventListener("seeking",l);f.addEventListener("waiting",l);f.addEventListener("timeupdate",r);c.keyboardEventsInitialized?c._config.localPlayback&&(document.removeEventListener("keydown",c.onKeydown),document.removeEventListener("keyup",
c.onKeyup),document.addEventListener("keydown",c.onKeydown),document.addEventListener("keyup",c.onKeyup)):(document.addEventListener("keydown",c.onKeydown),document.addEventListener("keyup",c.onKeyup),c.keyboardEventsInitialized=!0);g.videoEventsSetuped=!0;g.removeVideoEventHandlers=function(){if(this.videoEventsSetuped){var G=this.videoEl;G.removeEventListener("loadedmetadata",d);G.removeEventListener("play",l);G.removeEventListener("playing",l);G.removeEventListener("pause",l);G.removeEventListener("seeked",
l);G.removeEventListener("ended",l);G.removeEventListener("error",l);G.removeEventListener("seeking",l);G.removeEventListener("waiting",l);G.removeEventListener("timeupdate",r);document.removeEventListener("keydown",this.onKeydown);document.removeEventListener("keyup",this.onKeyup);this.keyState&&(this.keyState.leftTimer&&clearTimeout(this.keyState.leftTimer),this.keyState.rightTimer&&clearTimeout(this.keyState.rightTimer),this.keyState.leftRewindInterval&&clearInterval(this.keyState.leftRewindInterval));
delete this.videoEventsSetuped}}}.bind(g);g.showMediainfo=function(c){var d=this;if(d.overlay_layers){var f=d.overlay_layers.querySelector(".zwp__mediainfo-viewer");if(f){if(!c){c=f.querySelector(".closeBtn");var l=document.createEvent("Event");l.initEvent("click",!0,!0);c.dispatchEvent(l)}}else{c='<button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+(P("media-prop","Media properties")+"</div>");d.mediaInfo?(l=d.mediaInfo,l.hasVideo&&(c+='<div class="info-item"><span class="info-label">Video</span><span class="info-value">'+
l.vCodec+"</span></div>",c+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+l.width+"</span></div>",c+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+l.height+"</span></div>",c+='<div class="info-item"><span class="info-label">FPS</span><span class="info-value">'+l.fps+"</span></div>",c+='<div class="info-item"><span class="info-label">Profile</span><span class="info-value">'+l.profile+"</span></div>",c+='<div class="info-item"><span class="info-label">Level</span><span class="info-value">'+
l.level+"</span></div>"),l.hasAudio&&(c+='<div class="info-item"><span class="info-label">Audio</span><span class="info-value">'+l.aCodec+"</span></div>",c+='<div class="info-item"><span class="info-label">SampRate</span><span class="info-value">'+l.sampleRate+"</span></div>",c+='<div class="info-item"><span class="info-label">Channel</span><span class="info-value">'+l.channels+"</span></div>")):d.videoEl?(l=d.videoEl,l.videoWidth&&(c+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+
l.videoWidth+"</span></div>",c+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+l.videoHeight+"</span></div>"),l.duration&&(c+='<div class="info-item"><span class="info-label">Duration</span><span class="info-value">'+ba(l.duration)+"</span></div>")):c+='<div class="info-item"><div class="row-text">No More Media Info</div></div>';f=document.createElement("div");f.setAttribute("class","zwp__mediainfo-viewer zwp-popupwindow");f.innerHTML=c;d.overlay_layers.appendChild(f);
f.addEventListener("click",function(G){G.stopPropagation()});var r=function(G){G.preventDefault();G.stopPropagation();Da(f,500,function(){f.remove()});d.overlay_layers.removeEventListener("click",r);delete d.infoViewer};c=f.querySelector(".closeBtn");c.addEventListener("click",r);d.infoViewer=f}}}.bind(g);g.setMediainfo=function(c,d){c={engine:c,hasVideo:d.hasVideo,hasAudio:d.hasAudio};if(d.hasVideo){var f=d.videoCodec;f=f.indexOf("avc1")>=0?"H264/AVC":f.indexOf("hvc")>=0?"H265/HEVC":"Unknown";c.vCodec=
f;c.width=d.width;c.height=d.height;c.fps=d.fps;typeof c.fps==="number"&&(c.fps=c.fps.toFixed(2));c.profile=d.profile;c.level=d.level}d.hasAudio&&(f=d.audioCodec,f=f.indexOf("mp4a.40.2")>=0?"AAC-LC":f.indexOf("mp4a.40.5")>=0?"HE-AAC":f.indexOf("mp3")>=0?"MP3":"Unknown",c.aCodec=f,c.sampleRate=d.audioSampleRate,c.channels=d.audioChannelCount);this.mediaInfo=c}.bind(g);g.loadChapters=function(){var c=this;if(c.chapters)if(typeof c.chapters==="object"&&c.chapters instanceof File)c.detectMimeType(c.chapters).then(function(Q){return c.isValidChapterFile(c.chapters,
Q).then(function(L){return L?!0:(c.toast(P("unsupportedChapterFormat","Unsupported chapter format")+": "+Q,3E3,!0),!1)})}).then(function(Q){Q&&(Q=new FileReader,Q.onload=function(L){L=L.target.result;var O=c.getFileExtension(c.chapters.name);if(O===".vtt"||O===".webvtt"){if(L.substr(0,6)==="WEBVTT"&&(L=Ka(L))){var T=[];for(O=0;O<L.body.length;O++){var C=L.body[O];T.push({title:C.content,time:ba(C.from),desc:"no desc",image:null})}}}else if(O===".json")try{T=JSON.parse(L)}catch(W){console.error("Failed to parse JSON chapter file:",
W)}T&&Array.isArray(T)?(c.chapters=T,c.loadChapters()):(console.warn("Invalid chapter file: "+c.chapters.name),c.toast(P("invalidChapterFormat","Invalid chapter file format"),3E3,!0))},Q.onerror=function(){console.error("Failed to read chapter file: "+c.chapters.name);c.toast(P("failedToReadChapter","Failed to read chapter file"),3E3,!0)},Q.readAsText(c.chapters))}).catch(function(Q){console.error("Chapter file validation failed:",Q);c.toast(P("chapterValidationFailed","Chapter file validation failed"),
3E3,!0)});else{if(typeof c.chapters==="string")if(c.chapters.charAt(0)==="[")c.chapters=JSON.parse(c.chapters);else{if(c.chapters.substr(0,4)==="http")Wa(c.chapters,function(Q){if(Q.substr(0,6)==="WEBVTT")c.chapters=Q,c.loadChapters();else if(Q=JSON.parse(Q))c.chapters=Q,c.loadChapters()},function(Q){console.warn("get chapter list from "+c.chapters+" failed!")});else if(c.chapters.substr(0,6)==="WEBVTT"){var d=Ka(c.chapters);if(d){for(var f=[],l=0;l<d.body.length;l++){var r=d.body[l];f.push({title:r.content,
time:ba(r.from),desc:"no desc",image:null})}c.chapters=f;c.loadChapters()}else delete c.chapters}else delete c.chapters;return}else if(!Array.isArray(c.chapters))return;d=c.videoEl.duration;if(!isNaN(d)&&d!==Infinity){if(d=sb(d,c.chapters))if(f=c.controlbar.querySelector(".zwp__time-chapter"))f.innerHTML=d,d=f.querySelectorAll(".zwp__chapter_dot"),d.length>0&&d.forEach(function(Q){Q.addEventListener("mousedown",function(L){L.stopPropagation();L=Pa(this.getAttribute("data-time"));c.seekTimeProgressByTime(L)})});
if(c._config.chapterButton&&(d=c.controlbar.querySelector(".zwp__time-info"))){var G=d.querySelector(".zwp-chapterButton");G&&G.remove();var J=tb(c.chapters);J&&((f=d.querySelector(".zwp_danmuBarDock"))?f.insertAdjacentHTML("beforebegin",J.html):d.insertAdjacentHTML("beforeend",J.html),G=d.querySelector(".zwp-chapterButton"),d=G.querySelector(".zwp-chapterlist"),f=d.querySelectorAll(".chapter-item"),f.length>0&&f.forEach(function(Q){Q.addEventListener("click",function(L){L.stopPropagation();L=Pa(this.getAttribute("data-time"));
c.seekTimeProgressByTime(L)})}),d.addEventListener("mousedown",function(Q){Q.stopPropagation()}),d.addEventListener("dblclick",function(Q){Q.stopPropagation()}),G.querySelector(".zwp-chapterBtn").addEventListener("click",function(Q){Q.stopPropagation();if(Q=G.querySelector(".zwp-chapterPanel")){var L=c.overlay_layers.offsetHeight;if(!(L<100)){L-=100;L>400&&(L=400);var O=J.titleWidth;O>200&&(O=200);Q.style.height=L+"px";Q.style.width=80+O+10+"px";Q.style.display!=="block"?(L=Q.querySelector(".zwp-list-inner"),
$$(L).niceScroll({cursorborder:"",cursorcolor:"rgb(179 178 178 / 67%)",boxzoom:!1,rightdock:4}),Q.style.opacity=1,Q.style.display="block"):Q.style.display="none"}}}),(d=G.querySelector(".closeBtn"))&&d.addEventListener("click",function(Q){Q.stopPropagation();var L=Q.currentTarget.closest(".zwp-chapterPanel");Da(L,500,function(){L.style.display="none"})}))}}}}.bind(g);g.removeChapters=function(){if(this.chapters){if(this.controlbar){var c=this.controlbar.querySelector(".zwp__time-chapter");c&&(c.innerHTML=
"")}(c=this.controlbar.querySelector(".zwp__time-info"))&&(c=c.querySelector(".zwp-chapterButton"))&&c.remove();delete this.chapters}}.bind(g);g.doSnapshot=function(){if(this.videoEl&&this.videoEl.videoWidth){if(!this.snapCanvas&&(this.snapCanvas=document.createElement("canvas"),!this.snapCanvas))return;var c=this.videoEl,d=this.snapCanvas;d.width=this.videoEl.videoWidth;d.height=this.videoEl.videoHeight;var f=d.getContext("2d");f.fillStyle="#000000";f.beginPath();f.fillRect(0,0,c.videoWidth,c.videoHeight);
f.closePath();f.drawImage(c,0,0,c.videoWidth,c.videoHeight);if(typeof d.toBlob=="function"){var l="SNAP-"+jb();try{d.toBlob(function(r){const G=document.createElement("a");G.download=`${l}.jpg`;G.href=URL.createObjectURL(r);G.click();ib(r)},"image/jpg",.99)}catch(r){console.error("\u89c6\u9891\u6e90\u53d7CORS\u6807\u8bc6\u9650\u5236\uff0c\u65e0\u6cd5\u76f4\u63a5\u4e0b\u8f7d\u622a\u56fe\uff0c\u89c1\uff1a\n https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS")}}else console.error("\u6d4f\u89c8\u5668\u529f\u80fd\u9650\u5236\uff0c\u65e0\u6cd5\u622a\u53d6\u56fe\u50cf")}}.bind(g);
g.togglePictureInPicture=function(){var c=this;if(c.videoEl)if(document.pictureInPictureElement)document.exitPictureInPicture();else{var d=c.videoEl;c.smallWindowMode||(d.bindPicInPicEvent||(d.addEventListener("enterpictureinpicture",function(f){console.log(f.width,f.height);S(c.playerElm,"zwp-picInPic");c.overlay_layers.insertAdjacentHTML("beforeEnd",wb);(f=c.overlay_layers.querySelector(".zwp-pipExitButton"))&&f.addEventListener("click",function(l){l.stopPropagation();document.pictureInPictureElement&&
document.exitPictureInPicture()});c.isInPicInPic=!0}),d.addEventListener("leavepictureinpicture",function(){Y(c.playerElm,"zwp-picInPic");var f=c.overlay_layers.querySelector(".zwp-pipPlaceHolder");f&&c.overlay_layers.removeChild(f);setTimeout(function(){},500);delete c.isInPicInPic}),d.bindPicInPicEvent=!0),d.requestPictureInPicture())}}.bind(g);g.showSubtitle=function(c){var d=this;if(d.overlay_layers){var f=d.overlay_layers.querySelector(".zwp-subtitles-show");if(f){if(c?f.style.display!=="block"&&
(f.style.opacity=0,f.style.display="block",Ua(f,500,function(){})):Da(f,500,function(){Ea.removeElement(f);f.remove();delete d.subtitleShow;delete d.subtitle1;delete d.subtitle2}),d.controlbar){var l=d.controlbar.querySelector(".zwp-subtitleButton");l&&(l.style.display=c?"block":"none")}}else if(c){f=document.createElement("div");f.setAttribute("class","zwp-subtitles-show");f.innerHTML='<div class="zwp-subtitles-viever"><div class="zwp-subtitle subtitle-1"><span class="subtitle-text"></span></div><div class="zwp-subtitle subtitle-2"><span class="subtitle-text"></span></div></div>';
d.overlay_layers.appendChild(f);f.addEventListener("click",function(O){O.preventDefault();O.stopPropagation()});Ea.addElement(f);f.addEventListener("resize",function(O){this.updateSubtitlePosition()}.bind(d));d.subtitleShow=f;d.subtitle1=f.querySelector(".subtitle-1 > .subtitle-text");d.subtitle2=f.querySelector(".subtitle-2 > .subtitle-text");d.subtitle2.style.display="none";var r=f.querySelector(".zwp-subtitles-viever"),G=!1,J=0,Q=0;c="onpointerout"in document;var L="ontouchstart"in document.documentElement||
"ontouchstart"in N;d.on_subtitle_mousemove=function(O){var T=O.target;if(!G||T!==this.subtitle1&&T!==this.subtitle2)console.log("out subtitle");else{T=O.pageY;var C=!0;O.type=="touchmove"&&(O.changedTouches&&(T=O.changedTouches[0].pageY),C=!1);C&&O.preventDefault();O.stopPropagation();O=J-T;r.offsetTop<=54&&O>0||(O=Q+O,O<54&&(console.log("mouse move 0"),O=54),r.style.bottom=O+"px",console.log("move x: ",O))}}.bind(d);d.on_subtitle_mouseup=function(O){G&&("onpointerout"in document?(document.removeEventListener("pointermove",
this.on_subtitle_mousemove),document.removeEventListener("pointerup",this.on_subtitle_mouseup)):L?(document.removeEventListener("touchmove",this.on_subtitle_mousemove),document.removeEventListener("touchend",this.on_subtitle_mouseup)):(document.removeEventListener("mousemove",this.on_subtitle_mousemove),document.removeEventListener("mouseup",this.on_subtitle_mouseup)),G=!1)}.bind(d);d.on_subtitle_mousedown=function(O){"onpointerout"in document?(document.addEventListener("pointermove",this.on_subtitle_mousemove),
document.addEventListener("pointerup",this.on_subtitle_mouseup)):L?(document.addEventListener("touchmove",this.on_subtitle_mousemove),document.addEventListener("touchend",this.on_subtitle_mouseup)):(document.addEventListener("mousemove",this.on_subtitle_mousemove),document.addEventListener("mouseup",this.on_subtitle_mouseup));G=!0;J=O.pageY;var T=parseInt(r.offsetTop+r.offsetHeight);Q=this.subtitleShow.offsetHeight-T;O.stopPropagation();O.preventDefault()}.bind(d);d.on_subtitleItemclick=function(O){O.stopPropagation();
var T=O.currentTarget;U(T,"zwp_switch")&&Sa(T);O=T.getAttribute("data-action");T=U(T,"switch_on");O==="subtitleOn"?this.subtitleShow&&(this.subtitleShow.style.display=T?"block":"none"):O==="subtitleDefault"?this.subtitles["1"]&&(T?this.subtitles["1"].hidden&&(delete this.subtitles["1"].hidden,this.subtitle1.style.display="block"):(this.subtitles["1"].hidden=!0,this.subtitle1.style.display="none")):O==="subtitleSecond"&&this.subtitles["2"]&&(T?this.subtitles["2"].hidden&&(delete this.subtitles["2"].hidden,
this.subtitle2.style.display="block"):(this.subtitles["2"].hidden=!0,this.subtitle2.style.display="none"))}.bind(d);c?r.addEventListener("pointerdown",d.on_subtitle_mousedown):canTouch?r.addEventListener("touchstart",d.on_subtitle_mousedown):r.addEventListener("mousedown",d.on_subtitle_mousedown);if(d.controlbar){if(l=d.controlbar.querySelector(".zwp-subtitleButton"))l.style.display="block";(c=ya.querySelector(".zwp-subtitleMenu"))&&!c.bindSwitchEvent&&(l=c.querySelectorAll(".action-item"),l.length>
0&&l.forEach(function(O){O.addEventListener("click",d.on_subtitleItemclick);var T=O.getAttribute("data-action");T!=="subtitleOn"&&T!=="subtitleDefault"||S(O,"switch_on")}),c.bindSwitchEvent=!0)}}}}.bind(g);g.getSimpleSubtitleRenderer=function(){if(!this.overlay_layers)return null;var c=this.overlay_layers.querySelector(".zwp-subtitles-show");if(c){var d=c.querySelector(".zwp-simple-subtitles-viever");d||(c.innerHTML='<div class="zwp-simple-subtitles-viever"></div>',d=c.querySelector(".zwp-simple-subtitles-viever"));
return d}c=document.createElement("div");c.setAttribute("class","zwp-subtitles-show");c.innerHTML='<div class="zwp-simple-subtitles-viever"></div>';this.overlay_layers.appendChild(c);c.addEventListener("click",function(f){f.preventDefault();f.stopPropagation()});Ea.addElement(c);c.addEventListener("resize",function(f){this.updateSubtitlePosition()}.bind(this));this.subtitleShow=c;return c.querySelector(".zwp-simple-subtitles-viever")}.bind(g);g.loadSubtitle=function(c,d,f){var l=this;if(d==="1"||
d==="2")typeof c==="object"&&c instanceof File?l.detectMimeType(c).then(function(r){return l.isValidSubtitleFile(c,r).then(function(G){return G?!0:(l.toast(P("unsupportedSubtitleFormat","Unsupported subtitle format")+": "+r,3E3,!0),!1)})}).then(function(r){r&&(r=new FileReader,r.onload=function(G){G=G.target.result;var J=l.getFileExtension(c.name);if(J===".srt")var Q=Xa(G);else if(J===".vtt"||J===".webvtt")Q=Ka(G);else if(J===".json"||J===".bcc")Q=JSON.parse(G);Q?l.processLoadedSubtitle(Q,d,f||c.name):
(console.warn("Invalid subtitle file: "+c.name),l.toast(P("invalidSubtitleFormat","Invalid subtitle file format"),3E3,!0))},r.onerror=function(){console.error("Failed to read subtitle file: "+c.name);l.toast(P("failedToReadSubtitle","Failed to read subtitle file"),3E3,!0)},r.readAsText(c))}).catch(function(r){console.error("Subtitle file processing failed:",r);l.toast(P("subtitleValidationFailed","Subtitle file validation failed"),3E3,!0)}):typeof c==="string"&&Wa(c,function(r){var G=R(c);if(G===
".srt")var J=Xa(r);else if(G===".vtt")J=Ka(r);else if(G===".json"||G===".bcc")J=JSON.parse(r);J?l.processLoadedSubtitle(J,d,f):console.warn("Invalid subtitle file from "+c)},function(r){console.warn("get subtitle from "+c+" failed!")})}.bind(g);g.processLoadedSubtitle=function(c,d,f){this.subtitles||(this.subtitles={});f&&(c.title=f);d==="2"&&this._config.secondSubtitleHidden&&(c.hidden=!0);if(this.controlbar){var l=this.controlbar.querySelector(".zwp-subtitleMenu");if(l){l.querySelector(".main")||
(l.innerHTML=cb(),Y(l,"zwp-autosize"));if(d==="1"){var r=l.querySelector(".sub1");if(r){f||=P("mainSubtitle","Main subtitle");var G=r.querySelector(".zwp-option-item-label");G&&(G.innerHTML=f);r.style.display="block"}}if(d==="2"&&(r=l.querySelector(".sub2"))){f||=P("secondSubtitle","Second subtitle");if(G=r.querySelector(".zwp-option-item-label"))G.innerHTML=f;c.hidden||(f=r.querySelector(".zwp_switch"))&&S(f,"switch_on");r.style.display="block"}}}this.subtitles[d]=c;this.showSubtitleTimer||(this.showSubtitleTimer=
setTimeout(function(){this.showSubtitle(!0);delete this.showSubtitleTimer}.bind(this),300))}.bind(g);g.renderSubtitles=function(c){if(this.subtitleShow&&this.subtitles&&this.subtitleShow.style.display!=="none")for(var d=["1","2"],f=0;f<d.length;f++){var l=d[f];if(this.subtitles[l]){var r="subtitle"+l;l=this.subtitles[l];var G=!1;if(!l.hidden){if(l.current){if(c<l.current.from)G=!0;else if(c<l.current.to)continue;this[r]&&(this[r].innerHTML="",this[r].style.display="none");l.current=null}var J=l.nextSubtitleIdx||
0,Q=!0;if(G){var L=J-4;L<0&&(L=0);for(var O=J-2;O>=L;O--)if(G=l.body[O],c<=G.to){if(c>=G.from){l.current=G;l.nextSubtitleIdx=O+1;Q=!1;break}}else{l.nextSubtitleIdx=J;Q=!1;break}if(Q&&L>0){J=0;for(O=L-1;J<=O;)if(L=parseInt((J+O)/2),G=l.body[L],c<G.from)O=L-1;else if(c>G.to)J=L+1;else{l.current=G;l.nextSubtitleIdx=L+1;Q=!1;break}Q&&(l.nextSubtitleIdx=J)}}else{L=J+2;L>l.body.length&&(L=l.body.length);for(O=J;O<L;O++)if(G=l.body[O],c>=G.from){if(c<=G.to){l.current=G;l.nextSubtitleIdx=O+1;Q=!1;break}}else{l.nextSubtitleIdx=
J;Q=!1;break}if(Q){J=L;O=l.body.length-1;for(L>=l.body.length?c<l.body[l.body.length-1].from&&(J=0):c<l.body[L].from&&(J=0);J<=O;)if(L=parseInt((J+O)/2),G=l.body[L],c<G.from)O=L-1;else if(c>G.to)J=L+1;else{l.current=G;l.nextSubtitleIdx=L+1;Q=!1;break}Q&&(l.nextSubtitleIdx=J)}}l.current&&this[r]&&(this[r].innerHTML=l.current.content,this[r].style.display="block")}}}}.bind(g);g.updateSubtitlePosition=function(){if(this.subtitleShow&&this.subtitles){var c=["1","2"],d=this.subtitleShow.offsetWidth,f=
this.subtitleShow.offsetHeight;if(d&&f)for(d/=1024,f/=576,f=32*(d>f?f:d),d=0;d<c.length;d++){var l=c[d];this.subtitles[l]&&(l="subtitle"+l,this[l]&&(this[l].style.fontSize=f.toFixed(2)+"px"))}}}.bind(g);g.resetQualitiesMenu=function(){if(this&&!this.multiStreams&&this.controlbar){var c=this.controlbar.querySelector(".zwp-qualityButton");if(c){var d=c.querySelector(".zwp-qualityMenu");d&&(d.innerHTML='<li class="zwp-quality-item zwp-disabled" data-index="-1">No quality</li>');c.style.display="none"}}}.bind(g);
g.createQualitiesMenu=function(c){var d=this;if(c.length<=1)d.resetQualitiesMenu();else{var f=d.controlbar.querySelector(".zwp-qualityButton");if(f){var l="",r=P("level","Level")+" ";l+='<li class="zwp-quality-item active" data-idx="-1">'+P("qs-auto","AUTO SWITCH")+"</li>";for(var G=0;G<c.length;G++){var J="";typeof c[G]!=="undefined"&&(J=c[G].width&&c[G].height?c[G].width+"x"+c[G].height:r+(G+1));typeof c[G].bitrate!=="undefined"&&(J+=" ("+parseInt(c[G].bitrate/1E3)+"kbps)");l+='<li class="zwp-quality-item" data-br="'+
c[G].bitrate+'" data-idx="'+c[G].qualityIndex+'" data-vh="'+c[G].height+'">'+J+"</li>"}if(c=f.querySelector(".zwp-qualityMenu"))c.innerHTML=l,N.mQuery(c).find(".zwp-quality-item").click(function(Q){Q.preventDefault();Q.stopPropagation();Q=N.mQuery(this);Q.hasClass("active")||(Q.siblings().removeClass("active"),Q.addClass("active"),Q=this.getAttribute("data-idx"),typeof d.switchQualityLevel==="function"&&d.switchQualityLevel(Q))});f.style.display="block"}}}.bind(g);g.updateQualityLevel=function(c,
d){if(this&&this.controlbar){var f=this.controlbar.querySelector(".zwp-qualityButton");f&&(f=f.querySelector(".zwp-qualityMenu"))&&N.mQuery(f).children(".zwp-quality-item").each(function(l,r){l=parseInt(r.getAttribute("data-idx"));r=N.mQuery(r);l===-1?d&&!r.hasClass("active")&&(r.siblings(".active").removeClass("active"),r.addClass("active")):c===l?(d||r.hasClass("active")||(r.siblings(".active").removeClass("active"),r.addClass("active")),r.hasClass("current")||(r.siblings(".current").removeClass("current"),
r.addClass("current"))):r.hasClass("current")&&r.removeClass("current")})}}.bind(g);g.buildStreamSelector=function(){var c=this;if(c.multiStreams&&c.controlbar){var d=c.controlbar.querySelector(".zwp-qualityButton");if(d){var f="",l=c.multiStreams.murls;if(!Array.isArray(l)||l.length!==1){for(var r in l){var G=l[r];G=typeof G==="object"?G.name:r;f+='<li class="zwp-quality-item" data-stream="'+G+'">'+P(G,G)+"</li>"}if(l=d.querySelector(".zwp-qualityMenu"))l.innerHTML=f,f=N.mQuery(l).find(".zwp-quality-item"),
f.click(function(J){J.preventDefault();J.stopPropagation();J=this.getAttribute("data-stream");if(c.multiStreams.curStream!==J){var Q=c.multiStreams.murls;if(Array.isArray(Q))for(var L in Q){var O=Q[L];if(O.name===J){var T=O.url;break}}else T=Q[J];c.__switchStream(T);c.multiStreams.curStream=J;T=N.mQuery(this);T.hasClass("active")||(T.siblings(".active").removeClass("active"),T.addClass("active"));J=P(J,J);c.toast(P("switchedToQuality","Switched to")+" "+J+" "+P("quality","quality"))}}),f.each(function(J,
Q){J=this.getAttribute("data-stream");if(c.multiStreams.curStream===J&&(J=N.mQuery(this),!J.hasClass("active")))return J.siblings(".active").removeClass("active"),J.addClass("active"),!1});d.style.display="block"}}}}.bind(g);g.createSubtitlesMenu=function(c,d){var f=this;f.controlbar&&(d=f.controlbar.querySelector(".zwp-subtitleMenu"),c=pb(c),d.innerHTML=c,delete d.bindSwitchEvent,S(d,"zwp-autosize"),N.mQuery(d).find(".zwp-subtitles-item").click(function(l){l.preventDefault();l.stopPropagation();
l=N.mQuery(this);l.hasClass("active")||(l.siblings().removeClass("active"),l.addClass("active"),l=this.getAttribute("data-id"),typeof f.switchSubtitleTrack==="function"&&f.switchSubtitleTrack(l))}),c=f.controlbar.querySelector(".zwp-subtitleButton"))&&(c.style.display="block")}.bind(g);g.updateSubtitleTrack=function(c){}.bind(g);g.resetSubtitleMenu=function(){if(this.controlbar){var c=this.controlbar.querySelector(".zwp-subtitleButton");c&&(c.style.display="none")}}.bind(g);g.__getDanmuBarDock=function(){var c=
this.progressBar.timeInfo.querySelector(".zwp_danmuBarDock");c||(c=document.createElement("DIV"),c.setAttribute("class","zwp_danmuBarDock"),this.progressBar.timeInfo.appendChild(c),Ea.addElement(c),c.addEventListener("resize",function(d){var f=this;f.resizeTimer||(f.resizeTimer=N.setTimeout(function(){console.log("danmuBarDock resize");c.clientWidth<350?S(c,"zwp-mini"):Y(c,"zwp-mini");delete f.resizeTimer},50))}.bind(this)));return c}.bind(g);g.buildDanmuToolbar=function(c,d){var f=this,l;if(!f.danmuToolbar){c&&
(l=document.querySelector("#"+c));if(!l){if(!f.overlay_layers)return;d=null;l=f.progressBar&&f.progressBar.timeInfo?f.__getDanmuBarDock():f.overlay_layers}c=qb();l.insertAdjacentHTML("beforeend",c);f.danmuToolbar=l.querySelector(".zwp_danmu-controlbar");d&&S(f.danmuToolbar,d);l.appendChild(f.danmuToolbar);(d=f.danmuToolbar.querySelector(".zwp_switch"))&&d.addEventListener("click",function(r){r.stopPropagation();r=r.currentTarget;if(U(r,"zwp_switch")){Sa(r);var G=U(r,"switch_on");r=N.$$(this.danmuToolbar);
if(G){var J=r.find("button.btn_submit");J.removeClass("vtb_disabled").removeAttr("disabled");this.setEnableDanmu(!0);G=r.find(".barrage_inp_text");G.removeAttr("readonly").removeAttr("disabled").removeClass("disabled");G.attr("keydown")!="on"&&(G.keydown(function(Q){Q.which==13&&J.length>0&&J.trigger("click")}),G.attr("keydown","on"));r.find(".zwp-barrage_form").css("background-color","#28303db3").children("a.btn_bubble").toggleClass("disabled")}else r.find("button.btn_submit").addClass("vtb_disabled").attr({disabled:"disabled"}),
this.setEnableDanmu(!1),r.find(".barrage_inp_text").attr("readonly","readonly").attr("disabled","disabled").addClass("disabled"),r.find(".zwp-barrage_form").css("background-color","#202020b3").children("a.btn_bubble").toggleClass("disabled")}}.bind(f));(d=f.danmuToolbar.querySelector(".barrage_login"))&&d.addEventListener("click",function(r){r.preventDefault();r.stopPropagation();alert("login")});(d=f.danmuToolbar.querySelector(".zwp_dmconfig"))&&d.addEventListener("click",function(r){r.preventDefault();
r.stopPropagation();this.zwplayer=f;ub(r,this)});(d=f.danmuToolbar.querySelector(".btn_bubble"))&&d.addEventListener("click",function(r){r.preventDefault();r.stopPropagation();kb(this,r)});(d=f.danmuToolbar.querySelector(".btn_submit"))&&d.addEventListener("click",function(r){r.preventDefault();r.stopPropagation();a:{if(!this.inpbox){$inpbox=$$(this).parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");if(!$inpbox)break a;this.inpbox=$inpbox}if(f){r=this.inpbox.val();if(r=="")break a;
r.indexOf("&")!=-1&&(r=r.replace(/&/g,"&amp;"));r.indexOf("<")!=-1&&(r=r.replace(/</g,"&lt;"));r.indexOf(">")!=-1&&(r=r.replace(/>/g,"&gt;"));r.indexOf('"')!=-1&&(r=r.replace(/"/g,"&quot;"));r.indexOf("'")!=-1&&(r=r.replace(/'/g,"&#039;"));if(!f.sendDanmu(r))break a}this.inpbox.val("")}})}}.bind(g);g.reposDanmuToolbar=function(c){if(this.danmuToolbar&&this.progressBar&&this.progressBar.timeInfo){var d=this.__getDanmuBarDock(),f=this.danmuToolbar.parentNode;f&&(c?f!==d&&(f.removeChild(this.danmuToolbar),
d.appendChild(this.danmuToolbar),this.oldDanmuParentNode=f):this.oldDanmuParentNode&&(d.removeChild(this.danmuToolbar),this.oldDanmuParentNode.appendChild(this.danmuToolbar),delete this.oldDanmuParentNode))}}.bind(g);g.sendDanmu=function(c){if(typeof this._config.sendDanmu==="function"){var d="";this.danmuSetting.border&&(d+=',"border":"1"');this.danmuSetting.color&&(d+=',"color":"#'+this.danmuSetting.color+'"');this._config.sendDanmu('{"type":"danmu","text":"'+c+'"'+d+"}");return!0}alert("No danmu send function is setup");
return!1}.bind(g);g.showContextMenu=function(c){var d=this;if(c.offsetX!==void 0&&c.offsetY!==void 0){var f=c.offsetX;c=c.offsetY}else{var l=d.playerContainer.getBoundingClientRect();f=c.clientX-l.left;c=c.clientY-l.top}l=d.playerContainer.getBoundingClientRect();var r=l.width;l=l.height;var G="left",J="top",Q=f,L=c;f+180>r&&(G="right",Q=r-f);c+148>l&&(J="bottom",L=l-c);if(d.contextMenu)d.contextMenu.style[G==="left"?"right":"left"]=null,d.contextMenu.style[J==="top"?"bottom":"top"]=null,d.contextMenu.style[G]=
Q+"px",d.contextMenu.style[J]=L+"px";else{f='<div class="zwp-popupmenu" style="'+G+": "+Q+"px; "+J+":"+L+'px;"><a class="zwp-menuitem" data-action="shortcutHelp" href="javascript:void(0)"><span class="zwp-menucaption">'+(P("keyboardShortcuts","Keyboard Shortcuts")+"</span></a>");f=f+'<span class="zwp-menuseperator" action="shortcutHelp"></span><a class="zwp-menuitem" data-action="document" href="https://www.zwplayer.cn/docs/support.html" target="zwplayer-doc"><span class="zwp-menucaption">'+(P("player-help",
"Help and document")+"</span></a>");f+='<a class="zwp-menuitem" data-action="version" href="https://www.zwplayer.cn/pages/company/changelog.html?v=3.2.0" title="Build: 20251128" target="zwplayer-version"><span class="zwp-menucaption">'+P("version-update","Version update")+' (<span class="zwp-version">'+P("current")+": v3.2.0</span>) </span></a>";f=f+'<span class="zwp-menuseperator" action="version"></span><a class="zwp-menuitem" data-action="about" href="https://www.zwplayer.cn/pages/company/about.html"><span class="zwp-menucaption">'+
(P("about","About")+" zwplayer</span></a>");f+="</div>";c=d.playerContainer;Ia()&&(r=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)&&(c=r);c.insertAdjacentHTML("beforeEnd",f);d.contextMenu=c.querySelector(".zwp-popupmenu");var O=function(T){T.stopPropagation();T.preventDefault();var C=this.getAttribute("data-action");this.getAttribute("target");var W=this.getAttribute("href");d.hideContextMenu();setTimeout(function(){C===
"about"?N.open(W,"zwplayer-about"):C==="version"?N.open(W,"zwplayer-version"):C==="document"?N.open(W,"zwplayer-doc"):C==="shortcutHelp"&&d.createShortcutHelpPanel()},10)};d.contextMenu.querySelectorAll("a.zwp-menuitem").forEach(function(T){T.addEventListener("click",O,!1)});document.addEventListener("click",d.hideContextMenu)}}.bind(g);g.hideContextMenu=function(){if(this.contextMenu){var c=this.contextMenu.parentNode;c&&c.removeChild(this.contextMenu);delete this.contextMenu;document.removeEventListener("click",
this.hideContextMenu)}}.bind(g);g.toast=function(c,d,f,l){var r=this;d=d||2E3;r.toastTimerId&&(clearTimeout(r.toastTimerId),r.toastBox&&(r.overlay_layers.removeChild(r.toastBox),delete r.toastBox));if(c!=="closetoast"){if(typeof c==="object"){if("icon"in c)var G=c.icon;c=c.text}var J=document.createElement("div"),Q="",L="zwp-toast zwp-center";G&&(L+=" zwp-toast-icon",Q='<i class="xicon xicon-'+G+'"></i>');f&&(Q+='<a href="javascript:void(0)" class="zwp-toast-closebtn"><i class="xicon xicon-close"></i></a>',
L+=" zwp-use-close");l&&(L+=" zwp-lite");Q+='<span class="zwp-toast-text">'+c+"</span>";J.setAttribute("class",L);J.innerHTML=Q;r.overlay_layers.appendChild(J);r.toastBox=J;var O=function(T){if(r.toastBox){var C=r.toastBox.querySelector(".zwp-toast-closebtn");C&&C.removeEventListener("click",O);r.overlay_layers.removeChild(r.toastBox);delete r.toastBox}r.toastTimerId&&(T&&T.type==="click"&&clearTimeout(r.toastTimerId),delete r.toastTimerId)};r.toastTimerId=N.setTimeout(O,d);f&&(f=J.querySelector(".zwp-toast-closebtn"))&&
f.addEventListener("click",O)}}.bind(g);g.mutedConfirmBox=function(){var c=this;c.popup_layers||(c.popup_layers=document.createElement("div"),c.popup_layers.setAttribute("class","zwp__popup_layers"),c.playerContainer.appendChild(c.popup_layers));var d=document.createElement("div"),f='<span class="zwp-toast-text">'+P("mutedAutoplayMessagePre","Muted due to ")+' <a href="#mutemore" class="mutemore">'+P("browserLimits","Browser Restrictions")+"</a>"+P("mutedAutoplayMessagePost",". Click to ")+'<a href="#openaudio" class="openaudio">'+
P("openAudio","Enable")+'</a><button class="closeBtn" title="'+P("close","Close")+'"><i class="xicon xicon-close"></i></button></span>';d.setAttribute("class","zwp-toast zwp-confirm zwp-center");d.innerHTML=f;c.popup_layers.appendChild(d);c.mutedTipBox=d;(f=d.querySelector(".closeBtn"))&&f.addEventListener("click",function(l){l.preventDefault();c.mutedTipBox&&(c.popup_layers.removeChild(c.mutedTipBox),c.popup_layers.style.display=null,delete c.mutedTipBox);N.allowAutoAudioPlay=!0});(f=d.querySelector(".openaudio"))&&
f.addEventListener("click",function(l){l.preventDefault();l.stopPropagation();c.mutedTipBox&&(c.popup_layers.removeChild(c.mutedTipBox),c.popup_layers.style.display=null,delete c.mutedTipBox);c.setMuted(!1);N.allowAutoAudioPlay=!0});(f=d.querySelector(".mutemore"))&&f.addEventListener("click",function(l){l.preventDefault();l.stopPropagation();var r=d.querySelector(".moreInfoBox");r||(l='<div class="moreInfoBox"><div class="info-text">'+P("browserRestrictionsInfo","When you visit this site infrequently or often play muted content, browsers may limit audio volume, preventing automatic audio playback.")+
'</div><div class="info-control"><button class="info-btn">'+P("iUnderstand","OK")+"</button></div></div>",d.insertAdjacentHTML("beforeend",l),r=d.querySelector(".moreInfoBox"),r.querySelector(".info-btn").addEventListener("click",function(G){G.preventDefault();G.stopPropagation();r.style.display="none"}));r&&(r.style.display="block");N.allowAutoAudioPlay=!0});c.popup_layers.style.display="block"}.bind(g);typeof g._config.playerElm=="string"?(e=g._config.playerElm,e.charAt(0)!="#"&&(e="#"+e),g.playerElm=
document.querySelector(e)):Za(g._config.playerElm)&&(g.playerElm=g._config.playerElm);g.playerElm?U(g.playerElm,"zwp-wrap")||(g.playerElmOldClass=g.playerElm.getAttribute("class"),S(g.playerElm,"zwp-wrap"),g.doRemovePlayerClass=!0):(e="",typeof g._config.playerElm=="string"?(e=g._config.playerElm,e.charAt(0)=="#"&&(e=e.substr(1))):e="ZWP-"+(new Date).getTime(),g.playerElm=document.createElement("DIV"),g.playerElm.id=e,g.playerElm.style.position="absolute",g.playerElm.style.left=0,g.playerElm.style.top=
0,g.playerElm.style.width="640px",g.playerElm.style.height="360px",document.body.appendChild(g.playerElm),g.playerElm.setAttribute("class","zwp-wrap"),g.doDeletePlayerElm=!0);g.playerContainer=document.createElement("DIV");g.playerContainer.setAttribute("class","zwp-container");g.playerElm.appendChild(g.playerContainer);typeof g._config.videoElm=="string"?(e=g._config.videoElm,e.charAt(0)!="#"&&(e="#"+e),g.videoEl=document.querySelector(e)):Za(g._config.videoElm)&&(g.videoEl=g._config.videoElm);if(!g.videoEl){var ka=
document.createElement("DIV");ka.setAttribute("class","zwp-videoWrapper");g.playerContainer.appendChild(ka);Ea.addElement(ka);ka.addEventListener("resize",function(c){this._config.video_rotated&&this.rotateVideo()}.bind(g));g.videoWrapper=ka;g.videoEl=document.createElement("VIDEO");typeof g._config.videostyle=="string"&&g.videoEl.setAttribute("style",g._config.videostyle);typeof g._config.videoclass=="string"&&g.videoEl.setAttribute("class",g._config.videoclass);g._config.videostyle||g._config.videoclass||
g.videoEl.setAttribute("style","width:100%;height:100%;");typeof g._config.videoElm=="string"&&(e=g._config.videoElm,e.charAt(0)=="#"&&(e=e.substr(1)),g.videoEl.id=e);g.videoEl.setAttribute("playsinline","");g.videoEl.setAttribute("webkit-playsinline","");g.videoEl.setAttribute("autoplay","");ka.appendChild(g.videoEl);g.videoRemoveWhenClose=!0}e=g._config.defVolume/100;g.lastVolume=e;g.videoEl.volume=e;g._config.poster&&g.videoEl.setAttribute("poster",g._config.poster);if(!g._config.disableOverlayLayer&&
(e=document.createElement("div"),e.setAttribute("class","zwp__layers"),e.innerHTML='<div class="zwp__overlay zwp__layer zwp_loadingicon" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-loading"><span class="zwp__overlay-loading-bg-img"><svg width="80px" height="80px" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg></span></div></div>'+
vb,g.playerContainer.appendChild(e),g.overlay_layers=e,g.bigPlayOverlay=e.querySelector(".zwp__overlay-play"),g.bigPlayBtn=g.bigPlayOverlay.querySelector(".zwp__overlay-button"),g.localPlaybackHint=g.bigPlayOverlay.querySelector(".zwp-local-playback-hint"),g.loadingOverlay=e.querySelector(".zwp_loadingicon"),g.updateLocalPlaybackHint=function(c){if(g.localPlaybackHint){var d=g._config.url||g.murl;c?(g.localPlaybackHint.style.setProperty("display","none","important"),g.bigPlayBtn&&g.bigPlayBtn.style.setProperty("display",
"flex","important"),g.bigPlayOverlay&&g.bigPlayOverlay.style.setProperty("display","flex","important")):g._config.localPlayback&&!d?(g.localPlaybackHint.style.setProperty("display","flex","important"),g.bigPlayBtn&&g.bigPlayBtn.style.setProperty("display","none","important"),g.bigPlayOverlay&&g.bigPlayOverlay.style.setProperty("display","flex","important")):d&&(g.localPlaybackHint.style.setProperty("display","none","important"),g.bigPlayBtn&&g.bigPlayBtn.style.setProperty("display","flex","important"),
g.bigPlayOverlay&&g.bigPlayOverlay.style.setProperty("display","flex","important"))}},g._config.disablePlayBtn?S(g.bigPlayBtn,"zwp_disabled"):g.bigPlayBtn.addEventListener("click",function(c){c.preventDefault();c.stopPropagation();this.on_btnclick(c)}.bind(g)),g.localPlaybackHint&&(g.localPlaybackHint.addEventListener("click",function(c){c.preventDefault();c.stopPropagation();this.on_btnclick(c)}.bind(g)),g._config.localPlayback&&g.updateLocalPlaybackHint()),g._config.enableDanmu&&(g.danmuPlayer=
HUAYI.Danmu.create({playerId:e})),e.addEventListener("contextmenu",function(c){c.preventDefault();c.stopPropagation();Ra||this.showContextMenu(c)}.bind(g)),e.addEventListener("click",function(c){var d=this;c=function(f){f=f.querySelector(".closeBtn");var l=document.createEvent("Event");l.initEvent("click",!0,!0);f.dispatchEvent(l)};d.infoViewer?c(d.infoViewer):d.colorSettingPanel?c(d.colorSettingPanel):d.recordingSettingsPanel?c(d.recordingSettingsPanel):d.volumeBoostPanel?c(d.volumeBoostPanel):d.shortcutHelpPanel?
c(d.shortcutHelpPanel):d.contextMenu?d.hideContextMenu():d._config.disableClickPause||d._config.disablePlayBtn||d._config.isLive||(d.overlayLayerClickTimer&&(N.clearTimeout(d.overlayLayerClickTimer),delete d.overlayLayerClickTimer),d.playbtn&&(d.overlayLayerClickTimer=N.setTimeout(function(){d.playbtn.click();delete d.overlayLayerClickTimer},300)))}.bind(g)),g._config.logo)){if(typeof g._config.logo==="object"){if(typeof g._config.logo.icon==="string")var ia=g._config.logo.icon}else typeof g._config.logo===
"string"&&(ia=g._config.logo);if(ia){ka='<div class="zwp-logo"';if(typeof g._config.logo==="object"){var pa="";"dock"in g._config.logo?pa+=(g._config.logo.dock==="left"?"left":"right")+": "+(g._config.logo.x||"5%")+";":"x"in g._config.logo&&(pa+="right: "+g._config.logo.x+";");"y"in g._config.logo&&(pa+="top: "+g._config.logo.y+";");"width"in g._config.logo&&(pa+="width: "+g._config.logo.width+";");if("opacity"in g._config.logo){var Aa=g._config.logo.opacity/100;Aa>1&&(Aa=1);pa+="opacity: "+Aa+";"}pa&&
(ka+=' style="'+pa+'"')}e.insertAdjacentHTML("afterbegin",ka+('><img src="'+ia+'"></div>'))}}if(g._config.nativecontrols)g.videoEl.setAttribute("controls","controls"),g.overlay_layers&&(g.overlay_layers.style.bottom="70px"),g.videoEl.addEventListener("fullscreenchange",function(c){return!1}.bind(g));else if(g._config.controlbar){var ya=document.createElement("div");ya.setAttribute("class","zwp-controlbar");g._config.isLive||S(ya,"zwp-vodplayer");ya.innerHTML=fb(g._config);g.playerContainer.appendChild(ya);
g.controlbar=ya;g.playbtn=ya.querySelector(".zwp-playbtn");if(g.controlbar){ya.addEventListener("dblclick",function(c){c.stopPropagation()});ia=ya.querySelectorAll("button.zwpbtn");ia.length>0&&(g.btnBindZwp=!0,ia.forEach(function(c){c.addEventListener("click",g.on_btnclick)}));g._config.disablePlayBtn&&(ia=ya.querySelector(".zwp_playbtn"),S(ia,"zwp_disabled"),ia.setAttribute("disabled","disabled"));ia=ya.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");ia.length>0&&ia.forEach(function(c){c.addEventListener("click",
g.on_speedItemclick)});var va=ya.querySelector(".zwp-volume-docker");if(va){g.muteBtn=va.querySelector("button.zwp-muteBtn");g.volslider=va.querySelector(".zwp-volume-slider");g.voltotal=va.querySelector(".zwp-volume-total");g.volcurrent=g.volslider.querySelector(".zwp-volume-current");g.volthumb=g.volslider.querySelector(".zwp-volume-handle");var n=function(c){if(c!==null&&!isNaN(c)&&c!==void 0){c=Math.max(0,c);c=Math.min(c,1);if(c===0){Y(va,"zwp__mute");S(va,"zwp__unmute");var d=g.muteBtn;d.setAttribute("title",
"unmute");d.setAttribute("aria-label","unmute")}else Y(va,"zwp__unmute"),S(va,"zwp__mute"),d=g.muteBtn,d.setAttribute("title","muted"),d.setAttribute("aria-label","muted");d=g.volthumb;var f=g.volcurrent;c=c*100+"%";var l=getComputedStyle(d);f.style.bottom=0;f.style.height=c;d.style.bottom=c;d.style.marginBottom=-parseFloat(l.height)/2+"px"}},y=function(c){var d=A(g.voltotal),f=getComputedStyle(g.voltotal),l=!0;c.type=="touchmove"&&(c.changedTouches&&(l=c.changedTouches[0],c.pageX=l.pageX,c.pageY=
l.pageY),l=!1);f=parseFloat(f.height);f=(f-(c.pageY-d.top))/f;d.top!==0&&d.left!==0&&(f=Math.max(0,f),f=Math.min(f,1),n(f),d=g,d.setMuted(f===0),d.setVolume(f),l&&c.preventDefault(),c.stopPropagation())};g.positionVolumeThumb=n;g.on_volthumb_mousemove=function(c){var d=c.target;ma&&(d===g.volslider||d.closest(".zwp-volume-slider"))&&y(c)}.bind(g);g.on_volthumb_mouseup=function(c){ma&&("onpointerout"in document?(document.removeEventListener("pointermove",g.on_volthumb_mousemove),document.removeEventListener("pointerup",
g.on_volthumb_mouseup),document.removeEventListener("touchmove",g.on_volthumb_mousemove),document.removeEventListener("touchend",g.on_volthumb_mouseup)):(document.removeEventListener("mousemove",g.on_volthumb_mousemove),document.removeEventListener("mouseup",g.on_volthumb_mouseup)),ma=!1);ua||(g.volslider.style.display="none");console.log("volthumb_mouseup:"+c.type)}.bind(g);g.on_volthumb_mousedown=function(c){y(c);"onpointerout"in document?(document.addEventListener("pointermove",g.on_volthumb_mousemove),
document.addEventListener("pointerup",g.on_volthumb_mouseup),document.addEventListener("touchmove",g.on_volthumb_mousemove),document.addEventListener("touchend",g.on_volthumb_mouseup)):(document.addEventListener("mousemove",g.on_volthumb_mousemove),document.addEventListener("mouseup",g.on_volthumb_mouseup));ma=!0;c.preventDefault();c.stopPropagation()}.bind(g);var x=g.volslider;va.addEventListener("mouseenter",function(c){c.target===va&&(x.style.display="block",ua=!0,c.preventDefault(),c.stopPropagation())});
va.addEventListener("focusin",function(){x.style.display="block";ua=!0});va.addEventListener("focusout",function(c){if(!c.relatedTarget||c.relatedTarget&&!c.relatedTarget.matches(".zwp-volume-slider"))x.style.display="none"});va.addEventListener("mouseleave",function(){ua=!1;ma||(x.style.display="none")});va.addEventListener("focusout",function(){ua=!1});va.addEventListener("keydown",function(c){var d=c.which||c.keyCode||0;c.preventDefault();c.stopPropagation();d==32&&(g.videoEl.muted?g.setMuted(!1):
g.setMuted(!0))});x.addEventListener("dragstart",function(){return!1});x.addEventListener("mouseover",function(){ua=!0});x.addEventListener("focusin",function(){x.style.display="block";ua=!0});x.addEventListener("focusout",function(){ua=!1;ma||(x.style.display="none")});x.addEventListener("mousedown",g.on_volthumb_mousedown)}if(ia=ya.querySelector(".zwp-optionPanel"))ia=ia.querySelectorAll(".action-item"),ia.length>0&&ia.forEach(function(c){c.addEventListener("click",g.on_optionItemclick)})}}g._config.autoSmallWindow&&
!g.windowScrollHandler&&(g.windowScrollHandler=function(c){if(!this.isFullscr&&!this.isFullscrWin&&this.videoEl&&this.playerElm&&this.isPlaying&&!this.isInPicInPic)if(c=t(this.playerElm),(document.documentElement.scrollTop||document.body.scrollTop)>=c+this.playerElm.offsetHeight-100){if(!this.smallWindowMode){var d=this.playerContainer;mb(d,function(){Y(d,"zwp-smallwindow");d.style.left=null;d.style.top=null;d.style.width=null;d.style.height=null});S(d,"zwp-smallwindow");this.smallWindowMode=!0}}else this.smallWindowMode&&
(d=this.playerContainer,Y(d,"zwp-smallwindow"),d.style.left=null,d.style.top=null,d.style.width=null,d.style.height=null,delete this.smallWindowMode)}.bind(g),N.addEventListener("scroll",g.windowScrollHandler));g._config.clientip||(g._config.clientip="");g.videoEl&&(g._config.muted?g.setMuted(!0):typeof N.allowAutoAudioPlay==="undefined"?(g.setMuted(!0),hb(function(c){c?g.setMuted(!1):g._config.disableMutedConfirm||g.mutedConfirmBox();N.allowAutoAudioPlay=c})):N.allowAutoAudioPlay||(g.setMuted(!0),
g.mutedConfirmBox()),(g._config.snapshotButton||g._config.allowSnapshot)&&g.videoEl.setAttribute("crossorigin","Anonymous"));ia=function(c){var d=this;if(d.controlbar)if(d.isControlbarhidden){d.controlbar.style.display="flex";Y(d.playerElm,"hide-cursor");c=c||N.event;if(c.srcElement!=d.controlbar&&d.overlay_layers){var f=d.overlay_layers.offsetHeight,l=0;typeof c.offsetY!=="undefined"?l=f-c.offsetY:typeof c.layerY!=="undefined"&&(l=f-c.layerY);if(l>80)return}Ua(d.controlbar,500,function(r){r&&d.startHideControlbar(d)});
d.isControlbarhidden=!1}else d.startHideControlbar(d)}.bind(g);g.playerElm.addEventListener("mousemove",ia);g.playerElm.addEventListener("touchmove",ia);g.playerElm.addEventListener("dblclick",function(c){this.overlayLayerClickTimer&&(N.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);if(this.controlbar&&(c={},c.currentTarget=this.controlbar.querySelector(".zwp-fullscrBtn"),c.currentTarget))this.on_btnclick(c)}.bind(g));typeof g._config.autoplay=="undefined"&&(g._config.autoplay=
!0);g._config.url&&g._config.autoplay&&g.play(g._config.url);typeof g._config.onready=="function"&&g._config.onready.call(g);g._config.chapters&&(g.chapters=g._config.chapters);g._config.lostFocusPause&&typeof document.visibilityState!=="undefined"&&document.addEventListener("visibilitychange",function(){this._config.isLive||this.isInPicInPic||(document.visibilityState==="visible"?this.focusPaused&&this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.play(),this.setplaystate(!0),delete this.focusPaused):
this.focusPaused||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1),this.focusPaused=!0))}.bind(g));g._config.fluid?g._config.autoplay||(S(g.playerElm,"zwp-fluid"),g.playerElm.style.maxWidth="100%",g.playerElm.style.width="100%",g.playerElm.style.height="0",e=56.25,typeof g._config.ratio==="number"?e=g._config.ratio*100:typeof g._config.ratio==="string"?(ia=g._config.ratio.split(":"),ia.length===2&&(e=parseFloat(ia[0]),ia=parseFloat(ia[1]),e===0&&(e=1),e=ia*100/
e)):typeof g._config.width==="number"&&typeof g._config.height==="number"&&(e=g._config.width,e===0&&(e=1),e=g._config.height*100/e),g.playerElm.style.paddingTop=e+"%"):g._config.width&&g._config.height&&(g.playerElm.style.width=typeof g._config.width==="number"?g._config.width+"px":g._config.width,g.playerElm.style.height=typeof g._config.height==="number"?g._config.height+"px":g._config.height);g.initializeDragDrop=function(){if(g._config.localPlayback){var c=g.playerContainer||g.playerElm;c?(["dragenter",
"dragover","dragleave","drop"].forEach(function(d){c.addEventListener(d,g.preventDefaults,!1);document.body.addEventListener(d,g.preventDefaults,!1)}),["dragenter","dragover"].forEach(function(d){c.addEventListener(d,g.highlight,!1)}),["dragleave","drop"].forEach(function(d){c.addEventListener(d,g.unhighlight,!1)}),c.addEventListener("drop",g.handleDrop,!1)):console.warn("ZWPlayer: Cannot find container for drag drop support")}};g.preventDefaults=function(c){c.preventDefault();c.stopPropagation()};
g.highlight=function(c){g._config.localPlayback&&(c=g.playerContainer||g.playerElm,S(c,"zwp-drag-over"),g.localPlaybackHint&&g.localPlaybackHint.style.display!=="none"&&S(c,"zwp-drag-over-no-prompt"))};g.unhighlight=function(c){c=g.playerContainer||g.playerElm;Y(c,"zwp-drag-over");Y(c,"zwp-drag-over-no-prompt")};g.handleDrop=function(c){g._config.localPlayback&&(c=c.dataTransfer.files,c.length>0&&g.handleFiles(c))};g.handleFiles=function(c){Array.prototype.slice.call(c).forEach(function(d){g.uploadFile(d)})};
g.uploadFile=async function(c){if(g._config.localPlayback){var d={file:c,name:c.name,size:c.size,lastModified:c.lastModified,type:c.type,timestamp:(new Date).toISOString()};typeof g._config.onFileSelected==="function"&&g._config.onFileSelected.call(g,d);var f=await g.detectMimeType(c);console.log("ZWPlayer: File",c.name,"MIME type:",f);d.detectedMime=f;await g.isValidVideoFile(c,f)?(f=URL.createObjectURL(c),d.url=f,g.loadingOverlay&&(g.loadingOverlay.style.display="block"),g.playLocalFile(f,c.name,
d),typeof g._config.onFileLoaded==="function"&&g._config.onFileLoaded.call(g,d)):(d.error=P("unsupportedFileFormat","Unsupported file format"),d.errorCode="UNSUPPORTED_FORMAT",typeof g._config.onFileError==="function"&&g._config.onFileError.call(g,d),g.toast(P("unsupportedFileFormat","Unsupported file format")+": "+f,3E3,!0))}else g.toast(P("localFileDisabled","Local file playback is disabled"),3E3,!0)};g._mimeCache=new Map;g.detectMimeType=async function(c){var d=c.name+"_"+c.size+"_"+c.lastModified;
if(g._mimeCache.has(d))return g._mimeCache.get(d);if(c.type&&c.type!=="")var f=c.type;else{try{var l=await g.readFileHeader(c,16),r=g.detectMimeTypeFromHeader(l);r&&(f=r)}catch(G){console.error("Failed to read file header for MIME detection:",G)}f||(c=g.getFileExtension(c.name),f=g.getMimeFromExtension(c)||"application/octet-stream")}g._mimeCache.set(d,f);return f};g.readFileHeader=function(c,d){return new Promise(function(f,l){var r=new FileReader;r.onload=function(G){f(G.target.result)};r.onerror=
l;r.readAsArrayBuffer(c.slice(0,d))})};g.detectMimeTypeFromHeader=function(c){if(!c||c.byteLength===0)return null;c=new Uint8Array(c);return c.length>=8&&c[4]===102&&c[5]===116&&c[6]===121&&c[7]===112?"video/mp4":c.length>=4&&c[0]===26&&c[1]===69&&c[2]===223&&c[3]===163?"video/webm":c.length>=12&&c[0]===82&&c[1]===73&&c[2]===70&&c[3]===70&&c[8]===65&&c[9]===86&&c[10]===73&&c[11]===32?"video/x-msvideo":c.length>=8&&(c[4]===109&&c[5]===111&&c[6]===111&&c[7]===118||c[4]===102&&c[5]===114&&c[6]===101&&
c[7]===101)?"video/quicktime":c.length>=4&&c[0]===70&&c[1]===76&&c[2]===86&&c[3]===1?"video/x-flv":c.length>=4&&c[0]===26&&c[1]===69&&c[2]===223&&c[3]===163?"video/x-matroska":c.length>=16&&c[0]===48&&c[1]===38&&c[2]===178&&c[3]===117&&c[8]===6&&c[9]===230?"video/x-ms-wmv":c.length>=4&&(c[0]===71&&c[1]===64||c[0]===71&&(c[1]&240)===64)?"video/mp2t":null};g.getFileExtension=function(c){var d=c.lastIndexOf(".");return d!==-1?c.substring(d).toLowerCase():""};g.getMimeFromExtension=function(c){return{".mp4":"video/mp4",
".webm":"video/webm",".ogg":"video/ogg",".ogv":"video/ogg",".mov":"video/quicktime",".avi":"video/x-msvideo",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".3gp":"video/3gpp",".3g2":"video/3gpp2",".m4v":"video/x-m4v",".ts":"video/mp2t",".m4a":"audio/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".flac":"audio/flac",".opus":"audio/opus",".m3u8":"application/x-mpegURL",".dash":"application/dash+xml"}[c]||null};g.isValidVideoFile=async function(c,d){var f=".mp4 .webm .ogg .ogv .mov .mkv .m4v .flac .wav .m4a .mp3 .opus".split(" ");
if("video/mp4 video/webm video/ogg video/ogv video/quicktime video/x-matroska video/x-m4v video/H264 video/h264 audio/wav audio/x-wav audio/flac audio/opus audio/mp4 audio/mpeg audio/ogg".split(" ").indexOf(d)!==-1)return!0;if("video/mp2t video/3gpp video/x-ms-wmv video/x-flv video/x-msvideo video/MP2T application/vnd.apple.mpegurl application/x-mpegURL application/dash+xml".split(" ").indexOf(d)!==-1)return!1;if(d.startsWith("video/")||d.startsWith("audio/"))return!0;c=c.name.toLowerCase();for(d=
0;d<f.length;d++)if(c.endsWith(f[d]))return!0;return!1};g.isValidSubtitleFile=async function(c,d){var f=[".srt",".vtt"];if(["text/plain","text/srt","text/vtt","text/vtt","application/x-subrip"].indexOf(d)!==-1)return!0;c=c.name.toLowerCase();for(var l=0;l<f.length;l++)if(c.endsWith(f[l]))return!0;return d.startsWith("text/")?!0:!1};g.isValidChapterFile=async function(c,d){var f=[".vtt",".webvtt",".json"];if(["text/plain","text/vtt","text/vtt","application/json"].indexOf(d)!==-1)return!0;c=c.name.toLowerCase();
for(var l=0;l<f.length;l++)if(c.endsWith(f[l]))return!0;return d.startsWith("text/")?!0:!1};g.playLocalFile=function(c,d,f){(g.murl||g._config.url)&&g.stop();g._config.url=c;g.murl=c;g.currentFileName=d;g.isPlaying=!0;g.force_stopped=!1;g.loadingOverlay&&(g.loadingOverlay.style.display="flex");var l=qa(g);if(l){g.setupEventsHandler();g.startHideControlbar(g);g.toast(P("playingFile","playing")+": "+d,2E3,!1);var r={fileName:d,fileURL:c,timestamp:(new Date).toISOString(),source:"local"};f&&Object.assign(r,
f);typeof g._config.onLocalFilePlaybackStart==="function"&&g._config.onLocalFilePlaybackStart.call(g,r);g.updateLocalPlaybackHint&&g.updateLocalPlaybackHint();g.localFileUrls||(g.localFileUrls=[]);g.localFileUrls.push(c);g.videoEl.addEventListener("loadeddata",function(){g.setplaystate(!0);var G={fileName:d,fileURL:c,duration:g.videoEl.duration,videoWidth:g.videoEl.videoWidth,videoHeight:g.videoEl.videoHeight,currentTime:g.videoEl.currentTime,playbackRate:g.videoEl.playbackRate};f&&Object.assign(G,
f);typeof g._config.onLocalFileMetadataReady==="function"&&g._config.onLocalFileMetadataReady.call(g,G)},{once:!0});g.videoEl.readyState>=2&&(g.setplaystate(!0),r={fileName:d,fileURL:c,duration:g.videoEl.duration,videoWidth:g.videoEl.videoWidth,videoHeight:g.videoEl.videoHeight,currentTime:g.videoEl.currentTime,playbackRate:g.videoEl.playbackRate},f&&Object.assign(r,f),typeof g._config.onLocalFileMetadataReady==="function"&&g._config.onLocalFileMetadataReady.call(g,r))}else r={fileName:d,fileURL:c,
error:P("playbackFailedUnsupportedFormat","Playback failed, unsupported media format"),errorCode:"PLAYBACK_FAILED",timestamp:(new Date).toISOString()},f&&Object.assign(r,f),typeof g._config.onLocalFilePlaybackError==="function"&&g._config.onLocalFilePlaybackError.call(g,r),g.toast(P("playbackFailedUnsupportedFormat","Playback failed, unsupported media format"),3E3,!0),g.loadingOverlay&&(g.loadingOverlay.style.display="none"),g.isPlaying=!1,g._config.url=null,g.murl=null;return l};g.cleanupLocalFiles=
function(){this.localFileUrls&&(this.localFileUrls.forEach(function(c){URL.revokeObjectURL(c)}),this.localFileUrls=[])};g.selectLocalFile=function(){if(g._config.localPlayback){var c=document.createElement("input");c.type="file";c.accept="video/*,.mp4,.webm,.ogg,.ogv,.mov,.mkv,.m4v,audio/*,.flac,.wav,.m4a,.mp3,.opus";c.multiple=!1;c.onchange=function(d){d=d.target.files;d.length>0&&g.uploadFile(d[0])};c.click()}else g.toast(P("localFileDisabled","Local file playback is disabled"),3E3,!0)};if(g.playerContainer)g.initializeDragDrop();
else{var h=function(){g.playerContainer?g.initializeDragDrop():setTimeout(h,100)};setTimeout(h,100)}g._config.localPlayback&&(g.updateLocalPlaybackHint(),g.localPlaybackHint&&(ia=g.localPlaybackHint.querySelector(".zwp-local-playback-text"),e=g.localPlaybackHint.querySelector(".zwp-local-playback-subtitle"),ia&&(ia.textContent=P("selectOrDropVideo","Select or drag video/audio files")),e&&(e.textContent=P("supportedFormats","Supports MP4, WebM, MOV, MKV, M4V, OGG, FLAC, WAV, M4A, MP3, OPUS and other formats")),
g.localPlaybackHint.setAttribute("aria-label",P("selectLocalVideo","Select Local Video File"))),g.updateDragDropText=function(){var c=document.getElementById("zwp-dragdrop-text-style");c&&c.remove();c=document.createElement("style");c.id="zwp-dragdrop-text-style";c.textContent='.zwp-drag-over::before { content: "'+P("dragDropToPlay","Drag and drop video/audio files here to play")+'" !important; }';document.head.appendChild(c)},g.updateDragDropText());g.initKeyboardEvents=function(){!this.keyboardEventsInitialized&&
this.onKeydown&&this.onKeyup&&(document.addEventListener("keydown",this.onKeydown),document.addEventListener("keyup",this.onKeyup),this.keyboardEventsInitialized=!0)};g.initKeyboardEvents();return g},oa=async function(e){if(typeof N.RTCPeerConnection=="undefined")return alert("This browser does not support the stream.\r\nPlease play this stream in chrome!"),!1;var m=z(e.murl);if(!m)return e.toast("Invalid url"),!1;e.peer_conn=new RTCPeerConnection(typeof RTCPeerConnection.prototype.addTransceiver==
"function"?{iceServers:[],iceTransportPolicy:"all",bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"}:null);e.mediaStream=new MediaStream;e.peer_conn.ontrack=function(q){if(!this.hasTracks){this.setRtcstream(e.mediaStream);var F=H();console.log("start usetime:"+(K-F))}this.hasTracks++;this.mediaStream.addTrack(q.track);e.baseTrack&&q.track.kind!="video"||(e.baseTrack=q.track);e.rtcstatsTimerId||(e.packetsReceived=0,e.framesDecoded=0,e.emptyCount=0,e.rtcstatsTimerId=N.setInterval(function(){e.baseTrack&&
e.peer_conn.getStats(e.baseTrack).then(b=>{b.forEach(E=>{E.type=="inbound-rtp"&&E.kind=="video"&&(E.framesDecoded!=e.framesDecoded?(e.framesDecoded=E.framesDecoded,e.packetsReceived=E.packetsReceived,e.emptyCount=0):e.framesDecoded>0&&(e.emptyCount++,e.emptyCount>3&&(console.warn("Rtp Data break for "+e.emptyCount),e.closecall(e),oa(e))))})})},1E3))}.bind(e);e.hasTracks=0;if(typeof e.peer_conn.addTransceiver=="function"){(typeof e._config.hasAudio==="undefined"||e._config.hasAudio)&&await e.peer_conn.addTransceiver("audio",
{direction:"recvonly"});await e.peer_conn.addTransceiver("video",{direction:"recvonly"});var B=await e.peer_conn.createOffer()}else B=await e.peer_conn.createOffer({offerToReceiveAudio:typeof e._config.hasAudio==="undefined"||e._config.hasAudio,offerToReceiveVideo:!0});await e.peer_conn.setLocalDescription(B);(new Promise(function(q,F){var b=m.is_brtc?{streamurl:m.streamUrl,sdp:B.sdp}:{api:m.apiUrl,rtcstream:m.streamUrl,clientip:null,sdp:B.sdp};m.urlObject.schema==="webrtc"&&(delete b.rtcstream,b.streamurl=
m.streamUrl);console.log("Generated offer: ",b);M(m.apiUrl,JSON.stringify(b),function(E){console.log("Got answer: ",E);E.code?F(E):q(E)},function(E){"REQUEST:error"==E&&(e.tryStartPlayTimer=N.setTimeout(function(){delete e.tryStartPlayTimer;e.closecall(e);oa(e)},1E3));F(E)})})).then(q=>{e.peer_conn.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:q.sdp}))}).catch(q=>{console.log(q);e.peer_conn.close();e.peer_conn=null});e.closecall=function(q){q.rtcstatsTimerId&&(N.clearInterval(q.rtcstatsTimerId),
delete q.rtcstatsTimerId);q.tryStartPlayTimer&&(N.clearTimeout(q.tryStartPlayTimer),delete q.tryStartPlayTimer);typeof q.baseTrack!="undefined"&&delete q.baseTrack;q.peer_conn&&(q.videoEl&&(q.videoEl.srcObject=null),q.mediaStream&&delete q.mediaStream,q.peer_conn.close(),q.peer_conn=null)};return!0},ea=async function(e){var m=e._config.xmc_url||N.xmc_url;if(!m)return e.toast("The rtsp protocol is not supported without setting XMC."),!1;m+="play";e.wsclient&&(e.wsclient.close(),delete e.wsclient);
m=m.replace("http","ws");var B=new WebSocket(m);B.onopen=function(){var q=typeof e._config.rtspOverTcp==="undefined"?1:e._config.rtspOverTcp,F=typeof e._config.rtsp_bypass==="boolean"?e._config.rtsp_bypass:0,b=typeof e._config.use_audio==="undefined"?0:e._config.use_audio,E="MediaSource"in N&&N.MediaSource.isTypeSupported("video/mp4;codecs=hvc1.1.1.L93.B0")?1:0;q=JSON.stringify({msgtype:"playurl",data:{sourceurl:e.murl,rtsp_over_tcp:q,has_audio:b,has_hevc:E,rtsp_bypass:F}});B.send(q)};B.onmessage=
function(q){console.log(q.data);q=JSON.parse(q.data);if(typeof q=="object"&&q.type==="onresult"&&q.event==="playurl"&&typeof q.streaminfo==="object")if(e.closecall2=function(b){b.waitSignTimer&&(N.clearTimeout(b.waitSignTimer),delete b.waitSignTimer);b.wsclient&&(b.wsclient.close(),b.wsclient=null,delete b.wsclient)},q.snapshot&&e.videoEl&&e.videoEl.setAttribute("poster",q.snapshot),e._config.useFlv||typeof q.streaminfo.rtc_playurl!=="string")typeof q.streaminfo.http_playurl==="string"?(F=q.streaminfo.http_playurl+
q.streaminfo.stream+".flv",e.murl=F,ha(e)):e.closecall2(e);else{var F=q.streaminfo.rtc_playurl+q.streaminfo.stream+".rtc";q.first?e.waitSignTimer=setTimeout(function(){e.murl=F;oa(e);delete e.waitSignTimer},1E3):(e.murl=F,oa(e))}};B.onclose=function(){e.wsclient&&delete e.wsclient};B.onerror=function(){};e.wsclient=B;return!0},da=function(e){Ma("flv_js",La+"flv.min.js",function(m){console.log("js:"+m+" is load!");var B=N.flvjs;if(!B.isSupported())return!1;m=!1;typeof e._config.isLive==="boolean"&&
(m=e._config.isLive);var q={type:"flv",isLive:m,url:e.murl};var F={enableWorker:!1,enableStashBuffer:!1,stashInitialSize:0,lazyLoad:!1,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:0,isLive:!0};e.openFlv=function(){var b=B.createPlayer(q,F);b.on(B.Events.METADATA_ARRIVED,function(E){e.loadingOverlay&&(e.loadingOverlay.style.display="none");typeof E=="object"&&console.log("flvplayer:"+E.type)});b.on(B.Events.ERROR,function(E){typeof E=="object"?console.log("flvplayer:"+E.type):console.log("flvplayer:"+
E)});b.attachMediaElement(e.videoEl);e.videoEl.playbackRate=1;e.onFlvStaticInfo=function(E){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=E.decodedFrames?this.lastDecodedFrames=E.decodedFrames:(this.lastDecodedFrames=0,this.flvPlayer&&(this.closecall(this),this.openFlv(),this.setplaystate(!0))):this.lastDecodedFrames=E.decodedFrames)}.bind(e);e.onFlvError=function(E){E!=="NetworkError"||e.reconnectTimer||(e.reconnectTimer=N.setTimeout(function(){e.flvPlayer&&(e.closecall(e),
e.openFlv(),e.setplaystate(!0));delete e.reconnectTimer},1E3))}.bind(e);e.onMediainfoCb=function(E){E&&this.setMediainfo("flvjs",E)}.bind(e);b.on(B.Events.ERROR,e.onFlvError);b.on(B.Events.STATISTICS_INFO,e.onFlvStaticInfo);b.on(B.Events.MEDIA_INFO,e.onMediainfoCb);e.delayCheckTimerId=N.setInterval(function(){if(this.flvPlayer&&!this.videoEl.paused){var E=this.flvPlayer;if(E.buffered.length){let v=E.buffered.end(0)-E.currentTime;v>=6?E.currentTime=E.buffered.end(0)-.2:v>3&&(e.videoEl.playbackRate=
1.5,e.fastForwardTimerId=setTimeout(function(){e.videoEl.playbackRate=1;delete e.fastForwardTimerId},v*2E3))}}}.bind(e),2E3);b.load();b.play();e.flvPlayer=b;e.closecall=function(E){if(E.flvPlayer){var v=E.flvPlayer;v.off(B.Events.ERROR,E.onFlvError);v.off(B.Events.STATISTICS_INFO,E.onFlvStaticInfo);v.off(B.Events.MEDIA_INFO,E.onMediainfoCb);delete E.onFlvError;delete E.onFlvStaticInfo;delete E.onMediainfoCb;E.delayCheckTimerId&&(N.clearInterval(E.delayCheckTimerId),delete E.delayCheckTimerId);E.fastForwardTimerId&&
(N.clearTimeout(E.fastForwardTimerId),delete E.fastForwardTimerId);E.reconnectTimer&&(N.clearTimeout(E.reconnectTimer),delete E.reconnectTimer);v.pause();v.unload();v.detachMediaElement();v.destroy();delete E.flvPlayer}}};e.openFlv();e.setplaystate(!0)});return!0},ha=function(e){Ma("mpeg_js",La+"mpeg.min.js?v=2.1",function(m){console.log("js:"+m+" is load!");m=mpegts.getFeatureList();if(!mpegts.isSupported()||!m.mseLivePlayback)return!1;e.openMpegts=function(){var B=e.videoEl,q={autoCleanupSourceBuffer:!0,
stashInitialSize:128,autoCleanupMaxBackwardDuration:20,autoCleanupMinBackwardDuration:10,enableWorker:!0,enableStashBuffer:!1},F=void 0,b=void 0,E=!1,v=!1,Z={type:"mse",url:e.murl};typeof e._config.hasAudio==="boolean"&&(F=e._config.hasAudio);typeof e._config.hasVideo==="boolean"&&(b=e._config.hasVideo);typeof e._config.isLive==="boolean"&&(E=e._config.isLive);Z.hasAudio=F;Z.hasVideo=b;if(Z.isLive=E)e._config.useCustomLiveSync?v=!0:(q.liveSync=typeof e._config.useLiveChasing==="boolean"?e._config.useLiveChasing:
!0,q.liveSync&&(typeof e._config.liveSyncMaxLatency!=="undefined"&&(q.liveSyncMaxLatency=e._config.liveSyncMaxLatency),typeof e._config.liveSyncPlaybackRate!=="undefined"&&(q.liveSyncPlaybackRate=e._config.liveSyncPlaybackRate)));q=mpegts.createPlayer(Z,q);e.onErrorCb=function(D){var X=this;D!==mpegts.ErrorTypes.NETWORK_ERROR||X.reconnectTimer||(X.reconnectTimer=N.setTimeout(function(){X.mpegtsPlayer&&(X.closecall(X),X.openMpegts());delete X.reconnectTimer},1E3))}.bind(e);e.onEventCb=function(D){console.log(D)}.bind(e);
e.onMetadataCb=function(D){console.log(D)}.bind(e);e.onMediaInfoCb=function(D){D&&this.setMediainfo("mpegts",D)}.bind(e);e.onStatisCb=function(D){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=D.decodedFrames?(this.lastDecodedFrames=D.decodedFrames,delete this.waitDecodedFrames):(typeof this.waitDecodedFrames==="undefined"?this.waitDecodedFrames=0:this.waitDecodedFrames++,this._config.reconnectByWaitFrames&&this.waitDecodedFrames>10&&(this.lastDecodedFrames=0,delete this.waitDecodedFrames,
this.mpegtsPlayer&&(this.closecall(this),this.openMpegts()))):this.lastDecodedFrames=D.decodedFrames)}.bind(e);e.closecall=function(D){D.checkDelayTimerId&&(N.clearInterval(D.checkDelayTimerId),delete D.checkDelayTimerId);D.reconnectTimer||(N.clearTimeout(D.reconnectTimer),delete D.reconnectTimer);D.fastForwardTimerId&&(N.clearTimeout(D.fastForwardTimerId),delete D.fastForwardTimerId);if(D.mpegtsPlayer){var X=D.mpegtsPlayer;X.pause();X.off(mpegts.Events.ERROR,D.onErrorCb);X.off(mpegts.Events.MEDIA_INFO,
D.onMediaInfoCb);X.off(mpegts.Events.METADATA_ARRIVED,D.onMetadataCb);X.off(mpegts.Events.STATISTICS_INFO,D.onStatisCb);X.unload();X.detachMediaElement();X.destroy();delete D.onErrorCb;delete D.onMediaInfoCb;delete D.onMetadataCb;delete D.onStatisCb;delete D.onEventCb;delete D.mpegtsPlayer}};v&&(e.checkDelayTimerId=N.setInterval(function(){var D=this;if(D.mpegtsPlayer&&!D.videoEl.paused&&typeof D.fastForwardTimerId==="undefined"&&D.mpegtsPlayer.buffered.length){var X=D.mpegtsPlayer.buffered;X=X.end(X.length-
1)-D.mpegtsPlayer.currentTime;var ja=1.2;if(X>=6)ja=1.5;else if(X<2)return;var ma=X/ja*1E3;console.log("Custom chasing start ...chasingDuration:",ma);D.videoEl.playbackRate=ja;D.fastForwardTimerId=setTimeout(function(){D.videoEl.playbackRate=1;delete D.fastForwardTimerId;console.log("Custom chasing end ...chasingDuration:",ma)},ma)}}.bind(e),2E3));q.on(mpegts.Events.ERROR,e.onErrorCb);q.on(mpegts.Events.MEDIA_INFO,e.onMediaInfoCb);q.on(mpegts.Events.METADATA_ARRIVED,e.onMetadataCb);q.on(mpegts.Events.STATISTICS_INFO,
e.onStatisCb);q.attachMediaElement(B);q.load();q.play();e.mpegtsPlayer=q};e.openMpegts()});return!0},ta=function(e){Ma("hls_js",La+"hls.min.js",function(m){console.log("js:"+m+" is load!");var B=N.Hls;if(B.isSupported()){var q=e,F=new B;F.attachMedia(e.videoEl);F.on(B.Events.MEDIA_ATTACHED,function(){console.log("video and hlsPlayer are now bound together !");F.loadSource(e.murl);F.on(B.Events.MANIFEST_PARSED,function(v,Z){console.log("HLSPlayer manifest loaded, found "+Z.levels.length+" quality level");
q.loadingOverlay&&(q.loadingOverlay.style.display="none");q.videoEl.play();q.setplaystate(!0)})});F.on(B.Events.ERROR,function(v,Z){if(Z.fatal)switch(Z.type){case B.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");F.startLoad();break;case B.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");F.recoverMediaError();break;default:F.destroy(),delete e.hlsPlayer,q.setplaystate(!1)}});q.onHlsManifestParsed=function(v,Z){var D=this;if(Z.levels.length>
1){var X=[];for(v=0;v<Z.levels.length;v++){var ja={mediaType:"video",bitrate:Z.levels[v].bitrate,height:Z.levels[v].height,width:Z.levels[v].width,qualityIndex:v,name:Z.levels[v].name||"q"+v};X.push(ja)}D.switchQualityLevel=function(ma){F.nextLevel=parseInt(ma)}.bind(D);D.createQualitiesMenu(X);F.on(B.Events.LEVEL_SWITCHED,function(ma,ua){D.updateQualityLevel(F.currentLevel,F.autoLevelEnabled)},D)}else D.resetQualitiesMenu();if(Z.subtitleTracks&&Z.subtitleTracks.length>0){X=[];for(v=0;v<Z.subtitleTracks.length;v++)ja=
Z.subtitleTracks[v],ja.forced||(ja={"default":ja.default,id:ja.id,lang:ja.lang,name:ja.name,url:ja.url},X.push(ja));D.switchSubtitleTrack=function(ma){ma=parseInt(ma);ma===-1?F.subtitleDisplay=!1:(F.subtitleDisplay=!0,F.subtitleTrack=ma)};D.createSubtitlesMenu(X);F.on(B.Events.SUBTITLE_TRACK_SWITCH,function(ma,ua){D.updateSubtitleTrack(ua.id)})}}.bind(q);q.onHlsManifestLoaded=function(v,Z){console.log("hls on event MANIFEST_LOADED")}.bind(q);F.on(B.Events.MANIFEST_PARSED,q.onHlsManifestParsed);F.on(B.Events.MANIFEST_LOADED,
q.onHlsManifestLoaded);q.hlsPlayer=F;q.closecall=function(v){v.hlsPlayer&&(v.hlsPlayer.off(B.Events.MANIFEST_PARSED,v.onHlsManifestParsed),v.hlsPlayer.off(B.Events.MANIFEST_LOADED,v.onHlsManifestLoaded),v.hlsPlayer.detachMedia(),v.hlsPlayer.destroy(),delete v.hlsPlayer,delete v.onHlsManifestParsed,delete v.onHlsManifestLoaded)}}else if(e.videoEl.canPlayType("application/vnd.apple.mpegurl")){q=e;e.videoEl.zwplayer=e;var b=function(){typeof this.zwplayer=="object"&&(this.play(),this.zwplayer.setplaystate(!0))},
E=function(){typeof this.zwplayer=="object"&&console.log("HLS fatal media error encountered, try to recover")};q.videoEl.addEventListener("loadedmetadata",b);q.videoEl.addEventListener("error",E);q.closecall=function(v){typeof v.videoEl==="object"&&(v.videoEl.pause(),v.videoEl.src="",v.videoEl.removeEventListener("loadedmetadata",b),v.videoEl.removeEventListener("error",E),typeof v.videoEl.zwplayer=="object"&&delete v.videoEl.zwplayer)};q.videoEl.src=q.murl}else return e.toast("player cannot play hls media"),
!1});return!0},la=function(e){Ma("dash_js",La+"dash.all.min.js",function(m){console.log("js:"+m+" is load!");var B=N.dashjs,q=B.MediaPlayer().create();q.initialize(e.videoEl,e.murl,!0);m=e.getSimpleSubtitleRenderer();q.attachTTMLRenderingDiv(m);e.dashTextTrackList={};e.onDashMetadata=function(F){F&&console.log(F);this.loadingOverlay&&(this.loadingOverlay.style.display="none");this.videoEl.play();this.setplaystate(!0)}.bind(e);e.onDashQualityChanged=function(F){F=q.getQualityFor("video");var b=q.getSettings().streaming.abr.autoSwitchBitrate.video||
!1;e.updateQualityLevel(F,b)}.bind(e);e.onDashStreamInitialized=function(F){q.getBitrateInfoListFor("audio");F=q.getBitrateInfoListFor("video")||[];F.length>1?(this.switchQualityLevel=function(b){b=parseInt(b);var E={streaming:{abr:{autoSwitchBitrate:{}}}};b>=0?(E.streaming.abr.autoSwitchBitrate.video=!1,q.updateSettings(E),q.setQualityFor("video",b,!1)):(E.streaming.abr.autoSwitchBitrate.video=!0,q.updateSettings(E))}.bind(this),this.createQualitiesMenu(F),q.on(B.MediaPlayer.events.QUALITY_CHANGE_RENDERED,
this.onDashQualityChanged,this)):this.resetQualitiesMenu()}.bind(e);e.onDashTracksAdded=function(F){var b=this.dashTextTrackList;b[F.streamId]||(b[F.streamId]=[]);b[F.streamId]=b[F.streamId].concat(F.tracks)};e.onDashStreamDeactivated=function(F){var b=this.dashTextTrackList;F.streamInfo&&b[F.streamInfo.id]&&delete b[F.streamInfo.id]}.bind(e);e.onDashStreamActivated=function(F){F=F.streamInfo.id||"none";var b=this.dashTextTrackList;if(b[F]&&(F=b[F],!(F.length<1))){b=[];for(var E=0;E<F.length;E++){var v=
F[E],Z=nb(v.labels);Z?Z+=" : "+v.type:(Z=v.label||v.lang,Z+=" : "+v.kind);b.push({"default":v.defaultTrack,id:E,lang:v.lang,name:Z,url:v.url||""})}this.switchSubtitleTrack=function(D){var X=this.dashPlayer||null;X&&(parseInt(D),X.setTextTrack(D))}.bind(this);this.createSubtitlesMenu(b)}}.bind(e);q.on(B.MediaPlayer.events.PLAYBACK_METADATA_LOADED,e.onDashMetadata,e);q.on(B.MediaPlayer.events.STREAM_INITIALIZED,e.onDashStreamInitialized,e);q.on(B.MediaPlayer.events.STREAM_ACTIVATED,e.onDashStreamActivated,
e);q.on(B.MediaPlayer.events.STREAM_DEACTIVATED,e.onDashStreamDeactivated,e);q.on(B.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e);e.dashPlayer=q;e.closecall=function(F){F.dashPlayer&&(F.dashPlayer.pause(),F.dashPlayer.off(B.MediaPlayer.events.PLAYBACK_METADATA_LOADED,F.onDashMetadata,F),F.dashPlayer.off(B.MediaPlayer.events.STREAM_INITIALIZED,F.onDashStreamInitialized,F),F.dashPlayer.off(B.MediaPlayer.events.STREAM_ACTIVATED,F.onDashStreamActivated,F),F.dashPlayer.off(B.MediaPlayer.events.STREAM_DEACTIVATED,
F.onDashStreamDeactivated,F),F.dashPlayer.on(B.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e),F.switchQualityLevel&&(F.dashPlayer.off(B.MediaPlayer.events.QUALITY_CHANGE_RENDERED,F.onDashQualityChanged,F),delete F.switchQualityLevel),F.dashPlayer.destroy(),delete F.dashPlayer,delete F.onDashMetadata,delete F.onDashStreamInitialized,delete F.onDashStreamActivated,delete F.onDashStreamDeactivated,delete F.onDashTracksAdded,delete F.switchSubtitleTrack)}});return!0},ca=function(e,m){var B=
e._config.cdn_addr||N.cdn_addr;if(!B)return e.toast("The webcdn protocol is not supported due without setting cdn server address url."),!1;B.endsWith("/")||(B+="/");B+="cdnplay";e.wcdnClient&&(e.wcdnClient.close(),delete e.wcdnClient);B=B.replace("http","ws");N.location.protocol=="https:"&&(B=B.replace("ws:","wss:"));var q=m.indexOf("://");if(q<0)return e.toast("Invalid wcdn url:"+m),!1;m=m.substr(q+3);(q=e._config.userInfo||N.userInfo)||(q={userid:"0",username:"Visitor",nickname:"Visitor"});var F=
{msgtype:"startplay",data:{userid:q.userid||"0",username:q.username||"Visitor",nickname:q.nickname||"Visitor",avatar:q.avatar||"",streamurl:m}},b=function(E){var v=new WebSocket(B);v.onopen=function(Z){Z=JSON.stringify(F);v.send(Z)};v.onmessage=function(Z){if(typeof Z.data==="string")try{var D=JSON.parse(Z.data),X=D.msgtype||"none",ja=D.event||"none";if(X==="onresult")if(ja==="startplay"){var ma=D.data||null;if(ma&&typeof ma==="object"){Z=void 0;typeof E.closecall2==="function"&&(Z=E.closecall2,E.closecall2=
null);D={msgtype:"playstatus",data:{status:"playing"}};E.play(ma,!0)||(D.data.status="error");var ua=JSON.stringify(D);v.send(ua);typeof Z==="function"&&(E.closecall2=Z)}else{var g=D.msg||"Unknown error";g==="StreamNotExist"?(E.toast(P("waitStreamToReady","Waiting for stream")),E.errorHandleTimerId=N.setTimeout(function(){delete E.errorHandleTimerId;E.toast("closetoast");var za=JSON.stringify(F);v.send(za)},3E3)):(E.toast(ja+" error:"+g),E.errorHandleTimerId=N.setTimeout(function(){delete E.errorHandleTimerId;
E.stop()},2E3))}}else ja==="endplay"&&(console.log("Receive endplay result"),E.stop());else X==="error"?E.toast(ja+" error:"+D.msg||"Unknown error"):X==="command"&&(D.action||"none")==="stopplay"&&(E.toast("Server is close, player is stop."),E.errorHandleTimerId=N.setTimeout(function(){delete E.errorHandleTimerId;E.stop()},100),E.wcdnClient&&(E.wcdnClient.ws.close(),E.wcdnClient=null))}catch(za){console.warn("JSON.parse failed:",za)}};v.onerror=function(Z){console.error("Web CDN websocket Error:",
Z)};v.onclose=function(Z){this.wsVersionId===E.wsVersionId&&E.wcdnClient&&!E.cdnReconnectTimerId&&E.wcdnClient===this&&(E.cdnReconnectTimerId=setTimeout(function(){b(E)},1E3),delete E.wcdnClient)};v.wsVersionId=(new Date).getTime();E.wcdnClient=v;E.wsVersionId=v.wsVersionId;typeof E.cdnReconnectTimerId!=="undefined"&&delete E.cdnReconnectTimerId};e.closecall2=function(E){e.cdnReconnectTimerId&&(clearTimeout(e.cdnReconnectTimerId),delete e.cdnReconnectTimerId);e.errorHandleTimerId&&(clearTimeout(e.errorHandleTimerId),
delete e.errorHandleTimerId);e.wcdnClient?(E=e.wcdnClient,delete e.wcdnClient,E.close()):(e.toast("The wcdn connection has been passively closed."),console.log("Websocket connection is abnormally closed."))};b(e);return!0},qa=function(e){var m=e.videoEl;e.closecall=function(B){if(B.isPlayVideo){var q=B.videoEl;q.paused||q.pause();q.src="";delete B.isPlayVideo}};e.isPlayVideo=!0;m.src=e.murl;e.resetPlaybackState();return!0},V=function(e){var m=e.videoEl;e.closecall=function(B){if(B.isPlayAudio){var q=
B.videoEl;q.paused||q.pause();q.src="";delete B.isPlayAudio}};e.isPlayAudio=!0;m.src=e.murl;e.resetPlaybackState();return!0},I=function(e){var m=e.murl;if((m.type||"")==="dvr"&&m.http)return e.murl=m.http,qa(e);if(N.MediaSource&&N.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')){var B=N.RTCPeerConnection||N.webkitRTCPeerConnection||N.mozRTCPeerConnection||N.RTCIceGatherer;if(m.rtc&&B)return e.murl=m.rtc,oa(e);if(m["httpflv-n"])return e.murl=m["httpflv-n"],e._config.useOldFlv?
da(e):ha(e);if(m.httpflv)return e.murl=m.httpflv,e._config.useOldFlv?da(e):ha(e);if(m["wsflv-n"])return e.murl=m["wsflv-n"],e._config.useOldFlv?da(e):ha(e);if(m.wsflv)return e.murl=m.wsflv,e._config.useOldFlv?da(e):ha(e);if(m.hls)return e.murl=m.hls,ta(e);if(m.dash)return e.murl=m.dash,la(e);if(m.ts)return e.murl=m.ts,ha(e)}else if(e.murl.hls)return e.murl=e.murl.hls,ta(e);return!1},w=function(e){var m=[];var B=String.fromCharCode(107)+"u"+String.fromCharCode(97)+"ishou";var q=String.fromCharCode(46)+
"co"+String.fromCharCode(109)+"/",F=String.fromCharCode(100)+"ou"+String.fromCharCode(121)+"i"+String.fromCharCode(110);m.push("https://live."+B+q+"u/");m.push("https://live."+F+q);if(typeof e==="string"&&e.length>23)for(q=0;q<m.length;q++)if(B=m[q],e.indexOf(B)===0)return!0;return!1};fa.prototype={play:function(e,m,B){var q=this;if(e){q.murl&&q.stop();if(typeof e==="object"&&e instanceof File)try{var F=e;q.detectMimeType(F).then(function(ka){return q.isValidVideoFile(F,ka).then(function(ia){if(!ia)return q.toast(P("unsupportedFileFormat",
"Unsupported file format")+": "+ka,3E3,!0),q.stop(),!1;ia=URL.createObjectURL(F);e=q._currentBlobUrl=ia;q._currentFile=F;ia=q.getFileExtension(F.name);if(!ia||ia===".")if(ka.includes("mp4"))ia=".mp4";else if(ka.includes("webm"))ia=".webm";else if(ka.includes("ogg"))ia=".ogv";else if(ka.includes("avi"))ia=".avi";else if(ka.includes("mov"))ia=".mov";else if(ka.includes("flv"))ia=".flv";else if(ka.includes("m3u8"))ia=".m3u8";else if(ka.includes("mpd"))ia=".mpd";else if(ka.includes("mp2t")||ka.includes("ts"))ia=
".ts";else if(ka.includes("matroska")||ka.includes("webm"))ia=".mkv";q._detectedFileExt=ia;q._detectedMimeType=ka;console.log("Playing local file:",F.name,"Original MIME:",F.type,"Detected MIME:",ka,"Extension:",ia)})}).catch(function(ka){console.error("MIME detection failed:",ka);ka="."+F.name.split(".").pop().toLowerCase();q._detectedFileExt=ka;ka=URL.createObjectURL(F);q._currentFile=F;e=q._currentBlobUrl=ka})}catch(ka){return console.error("Failed to create blob URL for file:",ka),q.toast("Failed to load local file",
3E3,!0),!1}if(typeof e==="string"&&(e.startsWith("wcdn://")||e.startsWith("wcdns://")))return m=ca(q,e);if(typeof e==="object"){typeof e.thumbnails==="object"&&(q._config.thumbnails=JSON.parse(JSON.stringify(e.thumbnails)));if(typeof e.murls==="object"){q.multiStreams=JSON.parse(JSON.stringify(e));var b=e.murls}else Array.isArray(e)?(q.multiStreams={},b=e):(q.multiStreams={},b=[e]),q.multiStreams.murls=b;var E=!0,v="",Z=[],D;for(D in b){var X=b[D];if(typeof X==="object")if(Array.isArray(X)){var ja=
"";var ma=X[0];if(X.length>2){var ua=X[2];ja=X[1]}else ua=X.length>1?X[1]:D;Z.push({url:ma,name:ua,mime:ja});E&&(e=ma,v=ua,E=!1)}else{if(ma=!1,"default"in X&&X["default"]&&(ma=X["default"]),E||ma)"url"in X&&(e=X.url),v=E="name"in X?X.name:D,E=!1}else typeof X==="string"&&E&&(E=D,e=X,v=E,E=!1)}Z.length>0&&(q.multiStreams.murls=Z);q.multiStreams.curStream=v;console.log(e)}q.murl=e}if(!q.murl)return!1;q.force_stopped=!1;q.isPlaying=!0;q.loadingOverlay&&(q.loadingOverlay.style.display="flex");typeof m!=
"undefined"&&(m?q._config.isLive=m:delete q._config.isLive);typeof B!="undefined"&&(B?q._config.useOldFlv=B:delete q._config.useOldFlv);m=!1;if(typeof q.murl=="object")m=I(q);else if(typeof q.murl=="string"){m=R(q.murl);!m&&q._detectedFileExt&&(m=q._detectedFileExt);m||(b=q.murl.indexOf("mime_type="),b>0&&(b+=10,Z=q.murl.indexOf("&",b),Z<0&&(Z=q.murl.length),b=q.murl.substring(b,Z),b==="video_mp4"?m=".mp4":b==="video_flv"?m=".flv":b==="video_hls"?m=".m3u8":b==="video_rtc"?m=".rtc":b==="video_dash"&&
(m=".mpd")));if(!m&&(typeof q._config.streamtype==="string"&&(q._config.streamtype==="httpflv"?m=".flv":q._config.streamtype==="hls"?m=".m3u8":q._config.streamtype==="dash"?m=".mpd":q._config.streamtype==="mpegts"?m=".ts":q._config.streamtype==="webrtc"&&(m=".rtc")),!m&&w(q.murl))){var g=function(){setTimeout(function(){q.loadingOverlay&&(q.loadingOverlay.style.display="none")},1E3)};if(!q._config.url_proxy)return q.toast("Sorry, the player cannot play this media address",5E3,!0),g(),!1;var za=za;
M(q._config.url_proxy,JSON.stringify({roomUrl:q.murl,token:q._config.proxy_token||"12345678"}),function(ka){if(typeof ka==="object"&&ka.result){ka={murls:ka.flvStreams||ka.hlsStreams,multistream:1};if(!ka.murls)return q.toast("Sorry, missing valid address for this room.",5E3,!0),g(),!1;q.play(ka,za,B)}else q.toast("Sorry, unable to obtain a valid address for this room.",5E3,!0),g()},function(ka){q.toast("Sorry, failed to get address due to network!",5E3,!0);g()});return!1}m=q.murl.indexOf("rtsp")===
0?ea(q):m===".rtc"||q.murl.startsWith("webrtc://")||q.murl.startsWith("brtc://")?oa(q):m===".flv"?q._config.useOldFlv?da(q):ha(q):m===".m3u8"?ta(q):m===".mpd"?la(q):m===".mp4"?qa(q):m===".mp3"||m===".m4a"||m===".aac"||m===".mp4a"||m===".ogg"?V(q):m===".ts"?ha(q):qa(q)}m?(q.setupEventsHandler(),q.startHideControlbar(q),q.multiStreams&&N.setTimeout(function(){q.buildStreamSelector()},1E3)):(q.isPlaying=!1,q.loadingOverlay&&(q.loadingOverlay.style.display="none"),q.toast("Play media failed, unsupported media type",
5E3,!0));return m},__switchStream:function(e){if(typeof e!=="string")this.toast("Switch stream methon does not support "+e);else{this.murl=e;e=R(this.murl);if(!e){var m=this.murl.indexOf("mime_type=");if(m>0){m+=10;var B=this.murl.indexOf("&",m);B<0&&(B=this.murl.length);m=this.murl.substring(m,B);m==="video_mp4"?e=".mp4":m==="video_flv"?e=".flv":m==="video_hls"?e=".m3u8":m==="video_rtc"?e=".rtc":m==="video_dash"&&(e=".mpd")}}e||typeof this._config.streamtype==="string"&&(this._config.streamtype===
"httpflv"?e=".flv":this._config.streamtype==="hls"?e=".m3u8":this._config.streamtype==="dash"?e=".mpd":this._config.streamtype==="mpegts"?e=".ts":this._config.streamtype==="webrtc"&&(e=".rtc"));!this._config.isLive&&this.videoEl&&(this.postSeekTime=this.videoEl.currentTime);this.closecall&&(this.closecall(this),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());(this.murl.indexOf("rtsp")===
0?ea(this):e===".rtc"||this.murl.startsWith("webrtc://")||this.murl.startsWith("brtc://")?oa(this):e===".flv"?this._config.useOldFlv?da(this):ha(this):e===".m3u8"?ta(this):e===".mpd"?la(this):e===".mp4"?qa(this):e===".mp3"||e===".m4a"||e===".aac"||e===".mp4a"||e===".ogg"?V(this):e===".ts"?ha(this):qa(this))||this.toast("Switch stream failed, unsupported media type")}},stop:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),
delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());if(this._currentBlobUrl){try{URL.revokeObjectURL(this._currentBlobUrl),console.log("Revoked blob URL for local file")}catch(e){console.warn("Failed to revoke blob URL:",e)}this._detectedFileExt=this._currentFile=this._currentBlobUrl=null}this.isPlaying=!1;this.setplaystate(!1);this.updateProgress(0);this.timeSpan&&(this.timeSpan.innerHTML="");this.controlbar&&(this.controlbar.querySelector(".zwp__duration-container").style.display=
"none");this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.style.display="none");this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML="");this.subtitles&&delete this.subtitles;this.subtitleShow&&(this.subtitleShow.style.display="none");this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),delete this.toastBox));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),
this.popup_layers.style.display=null,delete this.mutedTipBox);this.overlayLayerClickTimer&&(N.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);delete this.multiStreams;this.resetSpeedMenu();this.resetQualitiesMenu();this.removeChapters();this.resetSubtitleMenu()},pause:function(){this.isPlaying&&this.videoEl&&!this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.pause(),this.setplaystate(!1))},resume:function(){this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&
(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)},seekTime:function(e){if(this.isPlaying&&this.videoEl&&!(e<0)){var m=this.videoEl.duration;isNaN(m)||m===Infinity||(e>m&&(e=m),this.videoEl.currentTime=e)}},getDuration:function(){if(this.isPlaying&&this.videoEl)return this.videoEl.duration},destroy:function(){this.cleanupLocalFiles&&this.cleanupLocalFiles();this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&
(this.closecall2(this),delete this.closecall2);this.videoRemoveWhenClose&&(this.videoEl&&this.videoWrapper&&(this.videoWrapper.removeChild(this.videoEl),this.playerContainer.removeChild(this.videoWrapper),delete this.videoWrapper),delete this.videoRemoveWhenClose);this.audioContext&&(this.audioContext.state!=="closed"&&this.audioContext.close(),this.audioContext=null,delete this.audioContext);this.audioGainNode&&(this.audioGainNode=null,delete this.audioGainNode);this.audioVolumeNode&&(this.audioVolumeNode=
null,delete this.audioVolumeNode);this.audioSource&&(this.audioSource=null,delete this.audioSource);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load(),this.videoEl=null,delete this.videoEl);this.snapCanvas&&delete this.snapCanvas;this.controlbar&&(this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML=""),this.playerContainer.removeChild(this.controlbar),delete this.controlbar);this.danmuToolbar&&(this.danmuToolbar.remove(),delete this.danmuToolbar);
this.subtitles&&delete this.subtitles;this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),delete this.toastBox));this.overlayLayerClickTimer&&(N.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);this.overlay_layers&&(this.subtitle1&&delete this.subtitle1,this.subtitle2&&delete this.subtitle2,this.subtitleShow&&(Ea.removeElement(this.subtitleShow),delete this.subtitleShow),this.danmuPlayer&&
(this.danmuPlayer.destroy(),delete this.danmuPlayer),this.playerContainer.removeChild(this.overlay_layers),delete this.overlay_layers);this.popup_layers&&(this.playerContainer.removeChild(this.popup_layers),delete this.popup_layers);this.playerElm&&(delete this.playerContainer.zwpDragable,this.playerElm.removeChild(this.playerContainer),delete this.playerContainer,this.doDeletePlayerElm?(document.removeChild(this.playerElm),delete this.playerElm):this.doRemovePlayerClass&&(Y(this.playerElm,"zwp-wrap"),
this.playerElm.setAttribute("class",this.playerElmOldClass)));this.windowScrollHandler&&(N.removeEventListener("scroll",this.windowScrollHandler),delete this.windowScrollHandler);this.updateLocalPlaybackHint&&this.updateLocalPlaybackHint()},seekVideo:function(e){if(this.videoEl){var m=this.videoEl.duration||0;e=this.videoEl.currentTime+e;e<0?e=0:e>m&&(e=m);this.videoEl.currentTime=e}},setplaystate:function(e){if(this.controlbar){this.playbtn||(this.playbtn=this.controlbar.querySelector(".zwp-playbtn"));
if(this.playbtn)if(e)this.playbtn.setAttribute("data-action","pause"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none");else{if(this.keyState&&this.keyState.isRewinding)return;this.playbtn.setAttribute("data-action","play");this.updateLocalPlaybackHint?this.updateLocalPlaybackHint(!0):this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="flex")}this.playerElm&&(e?(Y(this.playerElm,"zwp-pause"),S(this.playerElm,"zwp-playing")):(Y(this.playerElm,"zwp-playing"),S(this.playerElm,"zwp-pause")));
this.loadingOverlay&&(this.loadingOverlay.style.display="none")}},setEnableDanmu:function(e){e?this.overlay_layers&&!this.danmuPlayer&&(this.danmuPlayer=HUAYI.Danmu.create({playerId:this.overlay_layers})):this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer)},appendDanmu:function(e,m){this.danmuPlayer&&(m||(m=this.danmuSetting),this.danmuPlayer.addDanmu(e,m))},setChapters:function(e){e===null?this.removeChapters():(this.chapters=e,this.videoEl&&setTimeout(function(){this.loadChapters()}.bind(this),
1E3))},addSubtitle:function(e,m,B){this.loadSubtitle(e,m,B)},removeSubtitle:function(){this.showSubtitle(!1)},buildDanmuControlbar:function(e,m){this.buildDanmuToolbar(e,m)},notifyResize:function(e,m){this.playerElm&&(typeof e!=="undefined"&&(typeof e==="number"&&(e+="px"),this.playerElm.style.width=e),typeof m!=="undefined"&&(typeof m==="number"&&(m+="px"),this.playerElm.style.height=m))},lightOff:function(){this.playerElm&&S(this.playerElm,"zwp-state-light-off")},lightOn:function(){this.playerElm&&
Y(this.playerElm,"zwp-state-light-off")},get CurrentTime(){return this.isPlaying&&this.videoEl?this.videoEl.currentTime:-1},set CurrentTime(e){if(this.isPlaying&&this.videoEl&&!(e<0)){var m=this.videoEl.duration;isNaN(m)||m===Infinity||(e>m&&(e=m),this.videoEl.currentTime=e)}},setLanguage:function(e,m){if(!e||!Ca[e])return console.warn('ZWPlayer: Language "'+e+'" is not supported'),!1;var B=Fa;if(e&&Ca[e]){var q=Fa;Fa=e;m&&typeof N!=="undefined"&&N.dispatchEvent&&(q=new CustomEvent("zwplayerLanguageChanged",
{detail:{oldLang:q,newLang:e}}),N.dispatchEvent(q));q=!0}else console.warn('Language "'+e+'" is not supported'),q=!1;if(q){this._config.language=e;m&&this.controlbar&&this.refreshControlbar();if(this._config.onLanguageChange)this._config.onLanguageChange(B,e);return!0}return!1},getLanguage:function(){return this._config.language||Fa},getText:function(e,m){var B=this.getLanguage();return P(e,m,B)},refreshControlbar:function(){if(this.controlbar&&this._config.controlbar!==!1){var e=this.isPlaying,m=
this.videoEl?this.videoEl.currentTime:0;this.controlbar.innerHTML=fb(this._config);e&&this.videoEl&&(this.videoEl.currentTime=m)}this.localPlaybackHint&&this._config.localPlayback&&(e=this.localPlaybackHint.querySelector(".zwp-local-playback-text"),m=this.localPlaybackHint.querySelector(".zwp-local-playback-subtitle"),e&&(e.textContent=P("selectOrDropVideo","Select or drag video/audio files")),m&&(m.textContent=P("supportedFormats","Supports MP4, WebM, MOV, MKV, M4V, OGG, FLAC, WAV, M4A, MP3, OPUS and other formats")),
this.localPlaybackHint.setAttribute("aria-label",P("selectLocalVideo","Select Local Video File")));this.updateDragDropText&&this.updateDragDropText()}};return fa})})(window);
