import{W as Ka,E as Zi,X as Ya,l as Xa,Y as Za,h as Ja,k as fi,Z as es,p as ft,F as mt,z as Ge,Q as er,R as ci,G as nr,V as rr,J as Ci,O as ts,x as is,y as ns,N as rs,j as os,$ as as,M as ss,a0 as ls,o as As,v as Yi,c as Xi,t as tr,A as ds,a1 as cs}from"./index-NWZRBRJn.js";import{g as us,B as ir}from"./index-BAbag6cj.js";import{_ as or,a as ar,b as sr}from"./button-icon-ByvyKiiQ.js";import{c as Si,g as hs}from"./_commonjsHelpers-Cpj98o6Y.js";import{B as ps}from"./index_bock_centerbottom-DLZlv5Zh.js";var yo={exports:{}};(function(yt,_t){(function(Dt,Mt){yt.exports=Mt()})(Si,function(){function Dt(u,e,i){return(e=function(d){var b=function(l,p){if(typeof l!="object"||!l)return l;var t=l[Symbol.toPrimitive];if(t!==void 0){var a=t.call(l,p);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(l)}(d,"string");return typeof b=="symbol"?b:b+""}(e))in u?Object.defineProperty(u,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):u[e]=i,u}function Mt(u){var e,i;return!!((u??((i=window)==null||(e=i.navigator)==null?void 0:e.userAgent))||"").match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)}var mi={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _i(u,e){e===void 0&&(e=["h264"]);var i=(e||["h264"]).reduce(function(l,p){return p=p.toLowerCase(),l+(mi[p]||0)},0),d=u.split("?")[0],b=u.split("?")[1];return b=(b||"").split("&").filter(function(l){return!/^vc=\d?/.test(l)}).join("&"),d+"?"+b+(b?"&":"")+"vc="+i}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Si<"u"?Si:typeof self<"u"?self:{};function tt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}function wt(u){if(u.__esModule)return u;var e=u.default;if(typeof e=="function"){var i=function d(){return this instanceof d?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(u).forEach(function(d){var b=Object.getOwnPropertyDescriptor(u,d);Object.defineProperty(i,d,b.get?b:{enumerable:!0,get:function(){return u[d]}})}),i}var ni,vi={exports:{}},en=(ni||(ni=1,function(u){var e=Object.prototype.hasOwnProperty,i="~";function d(){}function b(a,n,s){this.fn=a,this.context=n,this.once=s||!1}function l(a,n,s,h,E){if(typeof s!="function")throw new TypeError("The listener must be a function");var v=new b(s,h||a,E),S=i?i+n:n;return a._events[S]?a._events[S].fn?a._events[S]=[a._events[S],v]:a._events[S].push(v):(a._events[S]=v,a._eventsCount++),a}function p(a,n){--a._eventsCount==0?a._events=new d:delete a._events[n]}function t(){this._events=new d,this._eventsCount=0}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(i=!1)),t.prototype.eventNames=function(){var a,n,s=[];if(this._eventsCount===0)return s;for(n in a=this._events)e.call(a,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(a)):s},t.prototype.listeners=function(a){var n=i?i+a:a,s=this._events[n];if(!s)return[];if(s.fn)return[s.fn];for(var h=0,E=s.length,v=new Array(E);h-1?this.pickers.splice(i,1):console.warn("Picker not found in the provider.")}closeOther(e){for(const i of this.pickers)i!==e&&(i.open=!1)}constructor(){this.pickers=[]}}).getInstance(),tn=["top","tl","tr","bottom","bl","br"],ei="epicker",Ui={getPopupContainer:()=>document.body,wrapClassName:"",open:!1,placement:"br",offset:[0,0],zIndex:1e3,content:"",trigger:"click",mouseLeaveDelay:.1,isMobile:!1};class Ii{get $popupContainer(){if(typeof this._options.getPopupContainer=="function"&&!this._options.isMobile){const e=this._options.getPopupContainer();if(e){if(!["INPUT","CANVAS","VIDEO","IMG"].includes(e==null?void 0:e.tagName))return e!==document.body&&(e.style.cssText+="position: relative;"),e;console.warn("popup container node does not support child elements, default body!")}else console.warn("popup container does not exist, default body!")}return document.body}get open(){return this._open}set open(e){this._disabled||(this._animationTimerClear(),e?(this.$content.style.display="inline-flex",this._options.isMobile&&document.body.classList.add(`${ei}-body-noscroll`),this._animationTimer=setTimeout(()=>{this._animationTimerClear(),this.$content.style.opacity="1"},20)):(this.$content.style.opacity="0",this._options.isMobile&&document.body.classList.remove(`${ei}-body-noscroll`),this._animationTimer=setTimeout(()=>{this._animationTimerClear(),this.$content.style.display="none"},350)),requestAnimationFrame(()=>{this._setPlacement()}),this._open!==!!e&&(this._onOpenChange(e),this._open=!!e))}get disabled(){return this._disabled}set disabled(e){e?this.$container.classList.add(`${ei}-disabled`):this.$container.classList.remove(`${ei}-disabled`),this._disabled=e}setPlacement(e){this._disabled||(tn.includes(e)?this._options.placement=e:console.warn(`${e} is not a valid placement`),this._setPlacement())}destroy(){this._removeHtml(),Bi.remove(this)}innerHTML(e){var i;this.$body&&(this.$body.innerHTML=e||""),(i=this.$popupContainer)==null||i.appendChild(this.$content)}_onOpenChange(e){this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,!!e)}_animationTimerClear(){this._animationTimer&&(clearTimeout(this._animationTimer),this._animationTimer=null)}_removeHtml(){var e,i;this.$content.removeEventListener("click",this._onContentClick),this.$container.removeEventListener("click",this._onContentClick),this._options.trigger==="click"&&this.$container.removeEventListener("click",this._onShow),this._options.trigger==="hover"&&(this.$container.removeEventListener("mouseover",this._onShow),this.$container.removeEventListener("mousemove",this._onShow),this.$container.removeEventListener("mouseleave",this._onHide),this.$content.removeEventListener("mouseover",this._onContentShow),this.$content.removeEventListener("mousemove",this._onContentShow),this.$content.removeEventListener("mouseleave",this._onHide)),this._options.isMobile||(window.removeEventListener("blur",this._onHide),document.removeEventListener("visibilitychange",this._onHide),window.removeEventListener("resize",this._onHide),document.removeEventListener("click",this._onDocumentClick)),this._$mask&&(this._$mask.removeEventListener("click",this._onHide),(i=this.$content)==null||i.removeChild(this._$mask)),(e=this.$popupContainer)==null||e.removeChild(this.$content),this.$content.innerHTML=""}_setPlacement(){if(!this._open||this._options.isMobile)return;const e=this.$container.getBoundingClientRect(),i=this.$content.getBoundingClientRect(),d=this.$popupContainer.getBoundingClientRect(),b=e.left-d.left,l=-(e.right-d.right),p=e.y-d.y;let t,a=b+(e.width-i.width)/2;const n=p-i.height,s=p+e.height;if(/^t/.test(this._options.placement)){var h,E,v;switch(this._options.placement){case"top":t=void 0;break;case"tl":t=void 0,a=b;break;case"tr":a=void 0,t=l}this.$content.style.cssText+=` ${t!==void 0?`right: ${t+(((h=this._options.offset)==null?void 0:h[0])||0)}px;`:""} ${a!==void 0?`left: ${a+(((E=this._options.offset)==null?void 0:E[0])||0)}px;`:""} top: ${n+(((v=this._options.offset)==null?void 0:v[1])||0)}px; z-index:${this._options.zIndex}; `}else if(/^b/.test(this._options.placement)){var S,B,x;switch(this._options.placement){case"bottom":t=void 0;break;case"bl":t=void 0,a=b;break;case"br":a=void 0,t=l}this.$content.style.cssText+=` ${t!==void 0?`right: ${t+(((S=this._options.offset)==null?void 0:S[0])||0)}px;`:""} ${a!==void 0?`left: ${a+(((B=this._options.offset)==null?void 0:B[0])||0)}px;`:""} top: ${s+(((x=this._options.offset)==null?void 0:x[1])||0)}px; z-index:${this._options.zIndex}; `}}_initContentStyle(){if(this.$content.classList.add(`${ei}`,`${ei}-${this._options.placement}`),this._options.isMobile&&(this.$content.classList.add(`${ei}-mobile`),this._$mask=document.createElement("div"),this._$mask.classList.add(`${ei}-mask`),this.$content.appendChild(this._$mask)),this.$body=document.createElement("div"),this.$body.classList.add(`${ei}-body`),this.$content.appendChild(this.$body),this._options.wrapClassName)try{this.$content.classList.add(this._options.wrapClassName)}catch{}}_eventListener(){this.$content.addEventListener("click",this._onContentClick),this.$container.addEventListener("click",this._onContentClick),this._options.trigger==="click"&&this.$container.addEventListener("click",this._onShow),this._options.trigger==="hover"&&(this.$container.addEventListener("mouseover",this._onShow),this.$container.addEventListener("mousemove",this._onShow),this.$container.addEventListener("mouseleave",this._onHide),this.$content.addEventListener("mouseover",this._onContentShow),this.$content.addEventListener("mousemove",this._onContentShow),this.$content.addEventListener("mouseleave",this._onHide)),this._$mask&&this._$mask.addEventListener("click",this._onHide),this._options.isMobile||(window.addEventListener("blur",this._onHide),document.addEventListener("visibilitychange",this._onHide),window.addEventListener("resize",this._onHide),document.addEventListener("click",this._onDocumentClick))}_onContentClick(e){e.stopPropagation(),Bi.closeOther(this)}_onShow(e){var i,d;e==null||(i=e.stopPropagation)==null||i.call(e),e==null||(d=e.preventDefault)==null||d.call(e),this._disabled||(this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!0)}_onContentShow(e){e.stopPropagation==null||e.stopPropagation.call(e),e.preventDefault==null||e.preventDefault.call(e),this.open&&!this._disabled&&this._onShow(null)}_onHide(){this._open&&!this._disabled&&(this._hideTimer=setTimeout(()=>{this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this.open=!1},this._options.mouseLeaveDelay>0?1e3*this._options.mouseLeaveDelay:100))}_onDocumentClick(e){if(!this.$content.contains(e.target)&&this.$content!==e.target&&!this.$container.contains(e.target)&&this.$container!==e.target){if(this._disabled)return;this._onHide()}}constructor(e){if(this._open=!1,this._animationTimer=null,this._hideTimer=null,this._disabled=!1,this._options=Object.assign({},Ui,e||{}),this._options.isMobile&&(this._options.trigger="click"),Bi.add(this),typeof this._options.container=="function"?this.$container=this._options.container():this.$container=this._options.container,!this.$container)throw new Error("container is required!");this.$content=document.createElement("div"),this._initContentStyle(),this.innerHTML(this._options.content),this._onContentClick=this._onContentClick.bind(this),this._onShow=this._onShow.bind(this),this._onContentShow=this._onContentShow.bind(this),this._onHide=this._onHide.bind(this),this._onDocumentClick=this._onDocumentClick.bind(this),this._eventListener(),this.open=!!this._options.open}}Ii.VERSION="0.1.0-beta.11";const Ft=9;if(typeof Element<"u"&&!Element.prototype.matches){const u=Element.prototype;u.matches=(u==null?void 0:u.matchesSelector)||(u==null?void 0:u.mozMatchesSelector)||(u==null?void 0:u.msMatchesSelector)||(u==null?void 0:u.oMatchesSelector)||(u==null?void 0:u.webkitMatchesSelector)}function Nt(u,e,i,d,b){const l=nn.apply(this,arguments);return u.addEventListener(i,l,b),{destroy:function(){u.removeEventListener(i,l,b)}}}function ri(u,e,i,d,b){return typeof u.addEventListener=="function"?Nt.apply(null,arguments):typeof i=="function"?Nt.bind(null,document).apply(null,arguments):(typeof u=="string"&&(u=document.querySelectorAll(u)),Array.prototype.map.call(u,function(l){return Nt(l,e,i,d,b)}))}function nn(u,e,i,d){return function(b){b.delegateTarget=function(l,p){for(;l&&l.nodeType!==Ft;){if(typeof l.matches=="function"&&l.matches(p))return l;l=l.parentNode}}(b.target,e),b.delegateTarget&&d.call(u,b)}}var Ar,dr={exports:{}},cr,ur,bo=(Ar||(Ar=1,function(u){(function(){var e=typeof window<"u"&&window.document!==void 0?window.document:{},i=u.exports,d=function(){for(var p,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=0,n=t.length,s={};aString(i[p])||""):b}get locale(){return this._locale}get translations(){return this._translations}appendTranslations(e){this._translations=hr(this._translations,e,{clone:!1}),this._locale||(this._locale=Object.keys(this._translations)[0]),this._onChange()}switchLocale(e){e in this._translations&&(this._locale=e,this._onChange())}getCurrentLocale(){return this._locale}getCurrentTranslation(){return this._translations[this._locale]}getVersion(){return"1.1.0-alpha.3"}_onChange(){return this.options.onChange==null?void 0:this.options.onChange.call(this.options,this)}_findChainValue(e,i){const d=i.split(".");let b=e;for(let l=0;l{var e;(e=this.$container)!=null&&e.classList.contains(`${ne}-disabled`)||this._onControlClick==null||this._onControlClick.call(this,u)})}hide(){this.$container&&(this.$container.style.display="none",this.$container.classList.add(`${ne}-hide`))}destroy(){var u;this.removeAllListeners(),(u=this.$popupContainer)==null||u.removeChild(this.$container)}_onControlClick(u){this.__options.onClick==null||this.__options.onClick.call(this.__options,u)}constructor(u){super(),this.__options={},this._disabled=!1,this._active=!1,this.__options=Object.assign({},u||{}),this.$container=document.createElement(u.tagName||"span"),this.$container.classList.add(`${ne}-control`),(u==null?void 0:u.controlType)==="text"?this.$container.classList.add(`${ne}-control-text`):(u==null?void 0:u.controlType)==="block"?this.$container.classList.add(`${ne}-control-block`):this.$container.classList.add(`${ne}-control-btn`),u!=null&&u.classNameSuffix&&this.$container.classList.add(`${ne}-control-${u==null?void 0:u.classNameSuffix}`),u!=null&&u.className&&this.$container.classList.add(u.className),u.getPopupContainer?this.$popupContainer=u.getPopupContainer==null?void 0:u.getPopupContainer.call(u):this.$popupContainer=document.body,this.$popupContainer.appendChild(this.$container),this._onClick()}};function on(){return on=Object.assign||function(u){for(var e=1;e
${((e=this._options.locale)==null?void 0:e.loading)||"loading..."}
`}show(e){e&&(this.$container.innerHTML=e),this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`),this.$popupContainer.classList.add(`${ne}-has-loading`)}hide(){super.hide(),this.$popupContainer.classList.remove(`${ne}-has-loading`)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},So,on({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},e),this.$container.classList.add(`${ne}-loading`,`${ne}-hide`),this._html()}}function an(){return an=Object.assign||function(u){for(var e=1;e`,(i=this.$container.querySelector(`.${ne}-poster-img`))==null||i.addEventListener("error",this._imgLoadErrorEvent)):this.$container.innerHTML=""}show(){this.$container&&(this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`))}hide(){var e,i;super.hide(),(i=this.$container)==null||(e=i.querySelector(`.${ne}-poster-img`))==null||e.removeEventListener("error",this._imgLoadErrorEvent)}destroy(){this.hide(),this.$popupContainer.removeChild(this.$container)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},fr,an({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},fr,e),this.$container.classList.add(`${ne}-poster`,`${ne}-hide`),this._imgLoadErrorEvent=this._imgLoadErrorEvent.bind(this),this._options.poster&&this.setPoster(this._options.poster)}}const Ct={play:``,pause:'',volume:u=>``,mobileFullscreen:``,fullscreen:``,exitFullscreen:` `,globalFullscreen:``,exitGlobalFullscreen:``,close:'',ptz:``,download:``,sdk:``,cloudRec:``,cloudRecord:``,playBack:``,playForward:``,filter:``,arrow:``,more:``,moreDot:``,minusCircle:``,plusCircle:``,record:``,talk:``,talkGrowth:u=>``,capturePicture:``,zoom:``,privacyMasking:``,info:``,error:``};function It(u,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d="";return i&&Object.keys(i).forEach(b=>{d+=`${b}="${i[b]}"`}),`${u}`}const ko=function(){return It(Ct.play,"play",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},To=function(){return It(Ct.pause,"pause",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Lo=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return It(Ct.volume(ne),"volume",u)},Bo=function(){return It(Ct.mobileFullscreen,"mobile-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Io=function(){return It(Ct.exitFullscreen,"exit-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Oo=function(){return It(Ct.fullscreen,"fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},xo=function(){return It(Ct.exitGlobalFullscreen,"exit-global-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Ro=function(){return It(Ct.globalFullscreen,"global-fullscreen",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Do=function(){return It(Ct.capturePicture,"capture-picture",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Mo=function(){return It(Ct.ptz,"ptz",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Po=function(){return It(Ct.record,"record",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},$o=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return It(Ct.talkGrowth(ne),"talk-growth",u)},Uo=function(){return It(Ct.minusCircle,"minus-circle",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Fo=function(){return It(Ct.plusCircle,"plus-circle",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},No=function(){return It(Ct.sdk,"sdk",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Vo=function(){return It(Ct.cloudRec,"cloud-rec",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},jo=function(){return It(Ct.cloudRecord,"cloud-record",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},Go=function(){return It(Ct.error,"error",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})},mr=function(){return It(Ct.info,"info",arguments.length>0&&arguments[0]!==void 0?arguments[0]:{})};function sn(){return sn=Object.assign||function(u){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${mr()}
${e}
`,i,"info")}warn(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${mr()}
${e}
`,i,"warn")}error(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this._show(`${Go()}
${e}
`,i,"error")}toast(e){}_show(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"info";this._timer&&(clearTimeout(this._timer),this._timer=null),this.$popupContainer.classList.add(`${ne}-has-message`,`${ne}-has-message-${d}`),typeof this._options.render=="function"?this.$container.innerHTML=this._options.render(e,i,d):this.$container.innerHTML=`
${e||""}
`,this.$container.style.display="flex",this.$container.classList.remove(`${ne}-hide`),i>0&&(this._timer=setTimeout(()=>{this.hide(),this._timer&&clearTimeout(this._timer),this._timer=null},1e3*i))}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.hide(),super.destroy()}hide(){super.hide(),this.$container.innerHTML="",Array.from(this.$popupContainer.classList).forEach(e=>{new RegExp(`^${ne}-has-message`,"ig").test(e)&&this.$popupContainer.classList.remove(e)})}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Object.assign({},_r,sn({},e,{tagName:"div",controlType:"block"}))),this._options=Object.assign({},_r,e),this.$container.classList.add(`${ne}-message`,`${ne}-hide`)}}function ln(){return ln=Object.assign||function(u){for(var e=1;e{d=Date.now(),i=null,u.apply(this,l)},a))}}var vr,gr,yr;class dt{static orientationEventListener(e){let i=null,d=()=>{var t,a;if((t=screen)!=null&&t.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type||screen.mozOrientation||screen.msOrientation};if(((a=window)==null?void 0:a.orientation)!==void 0){const n=window.orientation;return{angle:n>=0?n:360+n,type:Math.abs(n)===90?"landscape":"portrait"}}return dt.isMobile?{angle:window.innerWidth>window.innerHeight?90:0,type:window.innerWidth>window.innerHeight?"landscape":"portrait"}:{angle:0,type:"unknow"}},b=d(),l=()=>{const t=d==null?void 0:d();t.angle===b.angle&&t.type===b.type||(e==null||e(t),b=t)},p=()=>{i&&clearTimeout(i),l&&(i=setTimeout(l,200))};return screen.orientation?screen.orientation.addEventListener("change",l):"onorientationchange"in window?window.addEventListener("orientationchange",l):dt.isMobile&&window.addEventListener("resize",p),[b,()=>{screen.orientation&&l?screen.orientation.removeEventListener("change",l):"onorientationchange"in window&&l?window.removeEventListener("orientationchange",l):dt.isMobile&&window.removeEventListener("resize",p),l=null,p=null,d=null,i&&(clearTimeout(i),i=null)}]}static resizeObserver(e,i){let d=(l,p)=>{for(const t of l)t.target===e&&i&&i(l,p)},b=new ResizeObserver(Ni(d,50));return b.observe(e),{unobserve(){try{b==null||b.unobserve(e)}catch{}d=null},disconnect(){b==null||b.disconnect(),b=null,d=null}}}}dt.isMobile=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test((vr=navigator)==null?void 0:vr.userAgent)||/Macintosh/i.test((gr=navigator)==null?void 0:gr.userAgent)&&((yr=navigator)==null?void 0:yr.maxTouchPoints)>1;const zo={step:.01,range:[0,1],draggable:!0,disabled:!1,showPercent:!1,showPlus:!1,showMinus:!1,onChange:()=>{},renderText:(u,e)=>(100*e).toFixed(0)};class Ho{get disabled(){return this._disabled}set disabled(e){this._disabled=e}get value(){return this._value}set value(e){this._updateValuePercent("value",e)}get percent(){return this._percent}set percent(e){this._updateValuePercent("percent",e)}destroy(){var e,i,d,b,l,p,t,a,n,s;(i=this._delegateSliderMouseDown)==null||(e=i.destroy)==null||e.call(i),this._delegateSliderMouseDown=null,(b=this._delegateSliderHandleMouseDown)==null||(d=b.destroy)==null||d.call(b),this._delegateSliderHandleMouseDown=null,(p=this._delegateProgressMouseDown)==null||(l=p.destroy)==null||l.call(p),this._delegateProgressMouseDown=null,(a=this._delegatePlusClick)==null||(t=a.destroy)==null||t.call(a),this._delegatePlusClick=null,(s=this._delegateMinusClick)==null||(n=s.destroy)==null||n.call(s),this._delegateMinusClick=null,this.$content&&this.$container.removeChild(this.$content),this.$content=null}_updateValuePercent(e,i){if(e==="percent"){if(i<0||i>1)return;this._percent!==i&&(this._percent=+i.toFixed(2),this._convertPercentToValue(this._percent),this.options.onChange==null||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}else if(e==="value"){if(ithis.options.range[1])return;this._value!==i&&(this._value=+i.toFixed(2),this._convertValueToPercent(this._value),this.options.onChange==null||this.options.onChange.call(this.options,this._value,this._percent,this.options.range),this._updateUI())}}_convertPercentToValue(e){this._value=+(this.options.range[0]+(this.options.range[1]-this.options.range[0])*e).toFixed(2)}_convertValueToPercent(e){this._percent=+((e-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2)}_render(){var e;this.$content=document.createElement("div"),this.$content.className=`${ne}-progress ${(e=this.options.className)!=null?e:""}`,this.$content.innerHTML=`${this.options.showPercent?`
${this.options.renderText==null?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)}
`:""} ${this.options.showPlus?`
${Fo()}
`:""}
${this.options.showMinus?`
${Uo()}
`:""}`,this.$container.appendChild(this.$content)}_updateUI(){const e=this.$content;if(e==null||e.setAttribute("data-value",this._value+""),e.querySelector(`.${ne}-progress-slider-fill`)){const i=+(100*this._percent).toFixed(0);this.options.showPercent&&(e.querySelector(`.${ne}-progress-text`).innerHTML=this.options.renderText==null?void 0:this.options.renderText.call(this.options,this._value,this._percent,this.options.range)),e.querySelector(`.${ne}-progress-slider-fill`).style.height=i+"%",e.querySelector(`.${ne}-progress-slider-handle`).style.top=100-i+"%"}}_eventListeners(){this._delegateSliderMouseDown=ri(this.$content,`.${ne}-progress-slider`,"mousedown",e=>{var i,d;if(e.stopPropagation(),e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const b=this.$content.querySelector(`.${ne}-progress-slider`).getBoundingClientRect();let l=e.clientY-b.top;l=Math.max(0,Math.min(l,b.height));const p=+((b.height-l)/b.height).toFixed(2);this._convertPercentToValue(p),(d=this.options)==null||(i=d.onProgressClick)==null||i.call(d,this._value,p,this.options.range),this.percent=p}),this._delegateSliderHandleMouseDown=ri(this.$content,`.${ne}-progress-slider-handle`,"mousedown",e=>{if(e.stopPropagation(),!this.options.draggable||e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=e.clientY,d=this.$content.querySelector(`.${ne}-progress-slider-fill`).offsetHeight,b=this.$content.querySelector(`.${ne}-progress-slider`).offsetHeight;let l=Ni(a=>{if(a.stopPropagation(),!this.options.draggable||this._disabled)return;const n=i-a.clientY;let s=d+n;s=Math.max(0,Math.min(s,b)),this.percent=+(s/b).toFixed(2)},20);const p=this.$content;function t(){p.removeEventListener("mousemove",l),l=null,p.removeEventListener("mouseup",t),p.removeEventListener("mouseup",t)}p.addEventListener("mousemove",l),p.addEventListener("mouseup",t),p.addEventListener("mouseleave",t)}),this.options.showPlus&&(this._delegatePlusClick=ri(this.$content,`.${ne}-progress-plus`,"click",e=>{if(e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=this._value+this.options.step;i<=this.options.range[1]?this.value=i:this.value=this.options.range[1],this.options.onPlusClick==null||this.options.onPlusClick.call(this.options,this.value,this.percent,this.options.range)})),this.options.showMinus&&(this._delegateMinusClick=ri(this.$content,`.${ne}-progress-minus`,"click",e=>{if(e.delegateTarget.classList.contains(`${ne}-disabled`)||this._disabled)return;const i=this._value-this.options.step;i>=this.options.range[0]?this.value=i:this.value=this.options.range[0],this.options.onMinusClick==null||this.options.onMinusClick.call(this.options,this.value,this.percent,this.options.range)})),this._delegateProgressMouseDown=ri(this.$container,`.${ne}-progress`,"mousedown",e=>{e.stopPropagation()})}constructor(e){var i,d;if(this._percent=0,this._value=0,this._disabled=!1,this._delegateSliderMouseDown=null,this._delegateSliderHandleMouseDown=null,this._delegateProgressMouseDown=null,this._delegatePlusClick=null,this._delegateMinusClick=null,this.options=Object.assign({},zo,e),((i=this.options.range)==null?void 0:i.length)!==2)throw new Error("Progress range must be an array with two elements.");if(this.options.range[0]>=this.options.range[1])throw new Error("Progress range first element must be less than the second element.");this.$container=e.container,this._render(),this._eventListeners();const b=(d=this.options.defaultValue)!=null?d:this.options.range[0];this._value=+b.toFixed(2),this._percent=+((b-this.options.range[0])/(this.options.range[1]-this.options.range[0])).toFixed(2),this._updateUI(),this.disabled=this.options.disabled}}function An(){return An=Object.assign||function(u){for(var e=1;e{},onChange:()=>{}};function br(u,e,i,d,b,l,p){try{var t=u[l](p),a=t.value}catch(n){return void i(n)}t.done?e(a):Promise.resolve(a).then(d,b)}function dn(u){return function(){var e=this,i=arguments;return new Promise(function(d,b){var l=u.apply(e,i);function p(a){br(l,d,b,p,t,"next",a)}function t(a){br(l,d,b,p,t,"throw",a)}p(void 0)})}}const qo={prefix:"ezplayer"};class wi{static getInstance(){return wi.instance||(wi.instance=new wi),wi.instance}add(e,i){if(e){const d=this.fullscreens.findIndex(b=>b.element===e);d>=0?(this.fullscreens[d].onChange||(this.fullscreens[d].onChange=[]),this.fullscreens[d].onChange.push(i)):this.fullscreens.push({element:e,onChange:[i]})}}getChanges(e){const i=this.fullscreens.find(d=>d.element===e);return i&&(i==null?void 0:i.onChange)||[]}remove(e,i){const d=this.fullscreens.findIndex(p=>p.element===e);if(d>=0){var b;const p=(b=this.fullscreens[d].onChange)==null?void 0:b.find(t=>t===i);if(p){var l;const t=(l=this.fullscreens[d].onChange)==null?void 0:l.filter(a=>a!==p);this.fullscreens[d].onChange=t}(!this.fullscreens[d].onChange||this.fullscreens[d].onChange&&this.fullscreens[d].onChange.length===0)&&this.fullscreens.splice(d,1)}}constructor(){this.fullscreens=[]}}const cn=wi.getInstance();let Er=class{fullscreen(){return dn(function*(){if(!dt.isMobile)return yield li.request(this.$container);this._fullscreenchange(this.$container,!0)}).call(this)}exitFullscreen(){return dn(function*(){if(dt.isMobile)this._fullscreenchange(this.$container,!1);else if(this._isFullscreen)return yield li.exit()}).call(this)}toggle(){return dn(function*(){if(!dt.isMobile)return yield li.toggle(this.$container);this._fullscreenchange(this.$container,!this._isCurrentFullscreen)}).call(this)}destroy(){li.isEnabled&&li.off("change",this._fullscreenchange2),dt.isMobile&&this._options.onChange&&cn.remove(this.$container,this._options.onChange),this._fullscreenchange2=null}_fullscreenchange2(){this._fullscreenchange()}_fullscreenchange(u,e){if(this._isFullscreen=li.isFullscreen,u)this._isCurrentFullscreen=!!e,this._currentFullscreenElementList=[];else if(this._isFullscreen){const l=li.element,p=this._currentFullscreenElementList.indexOf(l);l&&p===-1?this._currentFullscreenElementList.unshift(l):l&&p>=1&&this._currentFullscreenElementList.shift();const t=this._currentFullscreenElementList.indexOf(this.$container);this._isCurrentFullscreen=t>=0}else this._isCurrentFullscreen=!1,this._currentFullscreenElementList=[];var i,d,b;this._isCurrentFullscreen?(i=this.$container)==null||i.classList.add(`${this._options.prefix}-fullscreen`):((d=this.$container)==null||d.classList.remove(`${this._options.prefix}-fullscreen`),(b=this.$container)==null||b.classList.remove(`${this._options.prefix}-global-fullscreen`)),dt.isMobile?cn.getChanges(this.$container).forEach(l=>{l({isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:dt.isMobile})}):this._options.onChange==null||this._options.onChange.call(this._options,{isCurrentFullscreen:this._isCurrentFullscreen,isFullscreen:this._isFullscreen,isMobile:dt.isMobile}),dt.isMobile&&(this._isCurrentFullscreen?document.body.classList.add(`${this._options.prefix}-body-mobile-noscroll`):document.body.classList.remove(`${this._options.prefix}-body-mobile-noscroll`))}constructor(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._isCurrentFullscreen=!1,this._isFullscreen=!1,this._currentFullscreenElementList=[],this.$container=u,this._options=Object.assign({},qo,e),this._options.onChange&&dt.isMobile&&cn.add(this.$container,this._options.onChange),this._isFullscreen=!!this._options.isFullscreen,this._fullscreenchange2=this._fullscreenchange2.bind(this),li.isEnabled&&li.on("change",this._fullscreenchange2)}};function un(){return un=Object.assign||function(u){for(var e=1;ee.part==="left"),u.filter(e=>e.part==="right")]}var Ko={autoFocus:3,footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"volume",part:"left",defaultActive:1,isrender:1},{iconId:"fullscreen",part:"right",defaultActive:0,isrender:1},{iconId:"globalFullscreen",part:"right",defaultActive:0,isrender:1}]}};const Tr={pcLive:{autoFocus:3,header:{btnList:[{iconId:"deviceID",part:"left",isrender:1},{iconId:"deviceName",part:"left",isrender:1},{iconId:"rec",part:"right",isrender:1},{iconId:"cloudRec",part:"right",isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",isrender:1},{iconId:"capturePicture",part:"left",isrender:1},{iconId:"sound",part:"left",isrender:1},{iconId:"pantile",part:"left",isrender:1},{iconId:"recordvideo",part:"left",isrender:1},{iconId:"talk",part:"left",isrender:1},{iconId:"zoom",part:"left",isrender:1},{iconId:"hd",part:"right",isrender:1},{iconId:"webExpend",part:"right",isrender:1},{iconId:"expend",part:"right",isrender:1}]}},pcRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileLive:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},mobileRec:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},security:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},voice:{header:{btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1}]},footer:{btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}};class Lr{destroy(){var e;(e=this.$popupContainer)==null||e.removeChild(this.$container)}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._options=e,this.$container=document.createElement("div"),this._defaultClass=`${ne}-${this._options.cType}`,this._options.cType&&this.$container.classList.add(this._defaultClass),e!=null&&e.className&&this.$container.classList.add(e.className),e!=null&&e.color&&(this.$container.style.cssText+=`--${ne}-default-color: ${e.color};`),e!=null&&e.activeColor&&(this.$container.style.cssText+=`--${ne}-active-color: ${e.activeColor};`),e!=null&&e.backgroundColor&&(this.$container.style.cssText+=`;background-image: url();background-color: ${e.backgroundColor};`),e.getPopupContainer?this.$popupContainer=e.getPopupContainer==null?void 0:e.getPopupContainer.call(e):this.$popupContainer=document.body,this.$left=document.createElement("div"),this.$left.classList.add(`${this._defaultClass}-left`),this.$right=document.createElement("div"),this.$right.classList.add(`${this._defaultClass}-right`),this.$container.appendChild(this.$left),this.$container.appendChild(this.$right),this.$popupContainer.appendChild(this.$container)}}function pn(){return pn=Object.assign||function(u){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{},{cType:"header"}))}}class Xo{destroy(){this.$container.remove()}constructor(e){if(this.$container=document.createElement("div"),this.$container.classList.add(`${ne}-content`),typeof e.getPopupContainer=="function"){const i=e.getPopupContainer==null?void 0:e.getPopupContainer.call(e);i==null||i.appendChild(this.$container)}}}function fn(){return fn=Object.assign||function(u){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{},{cType:"footer"}))}}function mn(){return mn=Object.assign||function(u){for(var e=1;e0&&((i=this._picker)==null||i.innerHTML(`
    ${e.map(d=>`
  • ${d.label}
  • `).join("")}
`),this._activeOption())}_render(e){if(e)if(this.$container.querySelector(`.${ne}-select-btn`))this.$container.querySelector(`.${ne}-select-btn`).innerHTML=`${e==null?void 0:e.label}`;else{const i=document.createElement("span");i.classList.add(`${ne}-btn`,`${ne}-select-btn`),i.innerHTML=`${e==null?void 0:e.label}`,this.$container.appendChild(i)}}_activeOption(){if(this._picker){var e,i;const d=(e=this._picker.$body)==null?void 0:e.querySelector(`.${ne}-active`);d==null||d.classList.remove(ne+"-active");const b=(i=this._picker.$body)==null?void 0:i.querySelector(`.${ne}-select-option[data-value="${this.value}"]`);b==null||b.classList.add(ne+"-active");const l=this.list.find(p=>p.value===this.value);this._render(l)}}_onSelectChange(){this._picker&&(this._delegation=ri(this._picker.$body,`.${ne}-select-option`,"click",e=>{const i=e.delegateTarget;if(!i.classList.contains(`${ne}-disabled`)){const d=i.getAttribute("data-value");if(this.value!==+d){this.value=+d,this._activeOption();const b=this.list.find(l=>l.value===this.value);this._options.onChange==null||this._options.onChange.call(this._options,this.value,b),this._picker.open=!1}}}))}destroy(){var e,i;(e=this._delegation)==null||e.destroy(),(i=this._picker)==null||i.destroy(),super.destroy()}_onControlClick(e){this._options.onClick==null||this._options.onClick.call(this._options,e)}constructor(e){super(En({tagName:"span",type:"button",controlType:"button"},e)),this._options=e,this.list=e.list||[],e.value===void 0&&e.value===null||(this.value=e.value),this._picker=new Ii({container:this.$container,getPopupContainer:()=>this.$container,trigger:dt.isMobile?"click":"hover",isMobile:dt.isMobile,wrapClassName:`${ne}-${e.classNameSuffix}-picker`,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:i=>{const d=this.list.find(b=>b.value===this.value);this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,i,this.value,d)}}),this.list&&this.updateSelectOptions(this.list),this._onSelectChange(),this._activeOption()}}function Sn(){return Sn=Object.assign||function(u){for(var e=1;e{this._playing!==e&&(this._playing=e,this._render())}),this._render()}},volume:class extends Bt{get muted(){return this._muted}set muted(u){this._muted!==u&&(u?(this._volume=0,this._progress&&(this._progress.value=0)):(this._volume=this._lastVolume,this._progress&&(this._progress.value=this._lastVolume)),this._muted=u,this._options.onChange==null||this._options.onChange.call(this._options,this.volume,u),this.emit(Pe.control.volumechange,this.volume,u)),this._updateUI()}get volume(){return this._lastVolume}set volume(u){if(u>=0&&u<=1){const e=+u.toFixed(2);this._lastVolume!==e&&(this._volume=e,this._lastVolume=this._volume,this._progress&&(this._progress.value=e),this._options.onChange==null||this._options.onChange.call(this._options,e,this._muted),this.emit(Pe.control.volumechange,e,this._muted)),this._updateUI()}}get disabled(){return this._disabled}set disabled(u){this._disabled=u,this.picker&&(this.picker.disabled=u),this._updateDisabledState(u)}destroy(){var u,e,i;(e=this._progress)==null||(u=e.destroy)==null||u.call(e),this._progress=null,(i=this.picker)==null||i.destroy(),this.picker=null,super.destroy()}_toggleMute(){if(!this.disabled)return this._lastVolume===0?(this.volume=this._options.volume||.5,void(this.muted=!1)):void(this.muted?this.muted=!1:this.muted=!0)}_updateUI(){var u,e,i,d;this._$content.classList.remove(ne+"-icon-volume-muted"),this._$content.classList.remove(ne+"-icon-volume-zero"),this._$content.classList.remove(ne+"-icon-volume-low"),this._$content.classList.remove(ne+"-icon-volume-high"),this._muted?(this._volume=0,this._$content.classList.add(ne+"-icon-volume-muted"),this._$content.setAttribute("title",((e=this._options)==null||(u=e.locale)==null?void 0:u.muted)||"muted")):(this._$content.classList.remove(ne+"-icon-volume-muted"),this._volume===0?this._$content.classList.add(ne+"-icon-volume-zero"):this._volume<=.5?this._$content.classList.add(ne+"-icon-volume-low"):this._$content.classList.add(ne+"-icon-volume-high"),this._$content.setAttribute("title",((d=this._options)==null||(i=d.locale)==null?void 0:i.volume)||"volume"))}get _$content(){return this.$container.querySelector(`.${ne}-icon-volume`)}_render(){var u;this.$container.innerHTML=Lo({title:(u=this._options.locale)==null?void 0:u.volume})}_onControlClick(){}_addEventListener(){ri(this.$container,`.${ne}-control-volume`,"mousedown",()=>{this.$container.classList.contains(`${ne}-disabled`)||this._toggleMute()})}constructor(u){super(An({},u,{tagName:"span",classNameSuffix:"volume",controlType:"button"})),this._muted=!1,this._volume=0,this._lastVolume=0,this._progress=null,this._options=Object.assign({},Wo,u),this._render(),this._volume=this._options.volume>=1?1:this._options.volume<=0?0:+this._options.volume.toFixed(2),this._lastVolume=this._volume,this._muted=!!this._options.muted||!1,dt.isMobile||(this.picker=new Ii({container:this.$container,getPopupContainer:()=>this.$container,trigger:this._options.trigger,open:this._options.open,offset:[0,-10],placement:"top",onOpenChange:e=>{this._options.onOpenChange==null||this._options.onOpenChange.call(this._options,e,this._muted?this._lastVolume:this.volume,this._muted),this.emit(Pe.control.volumePanelOpenChange,e,this._lastVolume,this._muted)}}),this._progress=new Ho({container:this.picker.$body,defaultValue:this._options.muted?0:this._options.volume,range:[0,1],step:.1,showPercent:!0,className:`${ne}-volume-progress`,onProgressClick:()=>{this.muted=!1},onChange:e=>{e!==this._volume&&(this.volume=e)}})),this._updateUI(),this._addEventListener(),this.on(Pe.audioCodecUnsupported,()=>{this.disabled=!0}),this.on(Pe.volumechange,(e,i)=>{this._muted!==i&&(this.muted=i),this._lastVolume!==e&&(this.volume=e)})}},deviceID:class extends Bt{_render(){this.$container.innerHTML=`DeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceIDDeviceID`}constructor(u){super(Tn({},u,{tagName:"span",controlType:"text",classNameSuffix:"device-id"})),this._render()}},deviceName:class extends Bt{_render(){this.$container.innerHTML=`DeviceNameDeviceNameDeviceNameDeviceNameDeviceNameDeviceName`}constructor(u){super(Ln({},u,{tagName:"span",controlType:"text",classNameSuffix:"device-name"})),this._render()}},capturePicture:class extends Bt{_render(){var u;this.$container.innerHTML=Do({title:(u=this._options.locale)==null?void 0:u.capturePicture})}_onControlClick(u){this.emit(Pe.control.capturePicture,this._options.type||"download",this._options.quality||.9),super._onControlClick(u)}constructor(u){super(_n({},u,{tagName:"span",classNameSuffix:"capture-picture"})),this._options=u,this._render()}},ptz:class extends Bt{_render(){this.$container.innerHTML=Mo()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(vn({},u,{tagName:"span",controlType:"button",classNameSuffix:"ptz"})),this._options=u,this._render()}},record:class extends Bt{_render(){this.$container.innerHTML=Po()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(gn({},u,{tagName:"span",controlType:"button",classNameSuffix:"record"})),this._options=u,this._render()}},talk:class extends Bt{_render(){this.$container.innerHTML=$o()}onClick(){}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(yn({},u,{tagName:"span",controlType:"button",classNameSuffix:"talk"})),this._options=u,this._render()}},zoom:class extends Bt{_render(){}destroy(){var u;this._options.rootContainer&&this._$zoomPanel&&((u=this._options.rootContainer)==null||u.removeChild(this._$zoomPanel),this._$zoomPanel=null),super.destroy()}_onControlClick(u){}constructor(u){super(bn({},u,{tagName:"span",controlType:"button",classNameSuffix:"zoom"})),this._options=Object.assign({},Jo,u||{}),this._render()}},definition:class extends Br{constructor(u){super(Sn({},u,{value:u.definition||1,controlType:"button",list:[{label:"4k",value:4},{label:"极清极清极清极清极清极清极清",value:2},{label:"1080p",value:1},{label:"标清标清标清标清标清标清标清标清",value:.5}],classNameSuffix:"definition",onChange:(e,i)=>{var d;u==null||(d=u.onChange)==null||d.call(u,e,i),this.emit(Pe.control.changeDefinition,e,i)},onOpenChange:(e,i,d)=>{var b;u==null||(b=u.onOpenChange)==null||b.call(u,e,i,d),this.emit(Pe.control.definitionPanelOpenChange,e,i,d)}}))}},fullscreen:Sr,globalFullscreen:class extends Sr{_render(){var u,e;this.$container.innerHTML=xo({title:(u=this.options.locale)==null?void 0:u.exitGlobalFullscreen})+Ro({title:(e=this.options.locale)==null?void 0:e.globalFullscreen})}_onControlClick(){var u,e;this.isCurrentFullscreen&&this._$rootContainer.classList.contains(`${ne}-global-fullscreen`)?(this._$rootContainer.classList.remove(`${ne}-global-fullscreen`),(u=this._fullscreenUtil)==null||u.exitFullscreen()):(this._$rootContainer.classList.add(`${ne}-global-fullscreen`),(e=this._fullscreenUtil)==null||e.fullscreen())}constructor(u){super(mn({},u,{controlType:"button",classNameSuffix:"global-fullscreen"}))}},rec:class extends Bt{_render(){var u,e,i;this.$container.innerHTML=No({title:(u=this._options.locale)==null?void 0:u.sdkRec,"data-type":"sdk"})+Vo({title:(e=this._options.locale)==null?void 0:e.cloudRec,"data-type":"cloudRec"})+jo({title:(i=this._options.locale)==null?void 0:i.cloudRecord,"data-type":"cloudRecord"})}_activeIcon(u){switch(this.$container.querySelectorAll(`.${ne}-icon`).forEach(b=>{b.classList.remove(`${ne}-active`)}),u){case"sdk":var e;(e=this.$container.querySelector(`.${ne}-icon-sdk`))==null||e.classList.add(`${ne}-active`);break;case"cloudRec":var i;(i=this.$container.querySelector(`.${ne}-icon-cloud-rec`))==null||i.classList.add(`${ne}-active`);break;case"cloudRecord":var d;(d=this.$container.querySelector(`.${ne}-icon-cloud-record`))==null||d.classList.add(`${ne}-active`)}}_onClickIcon(){this._delegation=ri(this.$container,`.${ne}-icon`,"click",u=>{const e=u.delegateTarget;if(!e.classList.contains(`${ne}-disabled`)){const i=e.getAttribute("data-type");this.recType!==i&&(this.recType=i,this._activeIcon(i),this.emit(Pe.control.changeRecType,i),this._options.onChange==null||this._options.onChange.call(this._options,i))}})}destroy(){var u;(u=this._delegation)==null||u.destroy(),this._delegation=null,super.destroy()}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(hn({},u,{tagName:"div",controlType:"block",classNameSuffix:"rec"})),this._options=u,this.recType=u.recType||"sdk",this._render(),this._onClickIcon(),this._activeIcon(u.recType)}},speed:class extends Br{constructor(u){super(Cn({},u,{value:u.speed||1,list:[{label:"4x4x",value:4},{label:"2x",value:2},{label:"1x1x",value:1},{label:"0.5x",value:.5}],classNameSuffix:"speed",controlType:"button",onChange:(e,i)=>{var d;u==null||(d=u.onChange)==null||d.call(u,e,i),this.emit(Pe.control.changeSpeed,e,i)},onOpenChange:(e,i,d)=>{var b;u==null||(b=u.onOpenChange)==null||b.call(u,e,i,d),this.emit(Pe.control.speedPanelOpenChange,e,i,d)}}))}},date:class extends Bt{_render(){this.$container.innerHTML="date"}_onControlClick(u){super._onControlClick(u)}constructor(u){super(wn({},u,{tagName:"span",controlType:"button",classNameSuffix:"date"})),this._options=u,this._render()}},timeLine:class extends Bt{_render(){this.$container.innerHTML=`Line`}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(kn({},u,{tagName:"div",controlType:"block",classNameSuffix:"time-line"})),this._options=u,this._render()}},playBack:class extends Bt{_render(){this.$container.innerHTML=` ${Ct.playBack} ${this._options.time||10} `}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(Bn({},u,{tagName:"span",controlType:"button",classNameSuffix:"play-back"})),this._options=u,this._render()}},playForward:class extends Bt{_render(){this.$container.innerHTML=` ${Ct.playForward} ${this._options.time||10} `}_onControlClick(u){this._options.onClick==null||this._options.onClick.call(this._options,u)}constructor(u){super(In({},u,{tagName:"span",controlType:"button",classNameSuffix:"play-forward"})),this._options=u,this._render()}}};function Ir(u,e,i,d,b,l,p){try{var t=u[l](p),a=t.value}catch(n){return void i(n)}t.done?e(a):Promise.resolve(a).then(d,b)}function Gi(u){return function(){var e=this,i=arguments;return new Promise(function(d,b){var l=u.apply(e,i);function p(a){Ir(l,d,b,p,t,"next",a)}function t(a){Ir(l,d,b,p,t,"throw",a)}p(void 0)})}}function gi(){return gi=Object.assign||function(u){for(var e=1;e=0&&e<=1&&this._volume!==e&&(this._volume=e,this.emit(Pe.volumechange,e,this._muted),(i=this.controls)!=null&&i.volumeControl&&((b=this.controls)==null||(d=b.volumeControl)==null?void 0:d.volume)!==e&&this.controls.volumeControl.emit(Pe.volumechange,e,this._muted))}get muted(){return this._muted}set muted(e){var i,d,b;this._muted!==e&&(this._muted=e,this.emit(Pe.volumechange,this._volume,this._muted),(i=this.controls)!=null&&i.volumeControl&&((b=this.controls)==null||(d=b.volumeControl)==null?void 0:d.muted)!==e&&this.controls.volumeControl.emit(Pe.volumechange,this._volume,e))}get zoom(){return this._zoom}set zoom(e){this._zoom=e}get recording(){return this._recording}get isCurrentFullscreen(){return this._isCurrentFullscreen}get recType(){return this._recType}get orientationAngle(){return this._orientationAngle}resize(e,i){let d="";d+=typeof e=="number"?`width: ${e}px;`:`width: ${e};`,d+=typeof i=="number"?`height: ${i}px;`:`height: ${i};`,this.$container&&(this.$container.style.cssText+=d)}fullscreen(){return Gi(function*(){var e;return yield(e=this._fullscreen)==null?void 0:e.fullscreen()}).call(this)}exitFullscreen(){return Gi(function*(){var e;return yield(e=this._fullscreen)==null?void 0:e.exitFullscreen()}).call(this)}changeTheme(e){this._changeThemeFlag=!0,this.emit==null||this.emit.call(this,Pe.changeTheme,e),this._renderTheme(e)}setPoster(e){var i;(i=this.posterControl)==null||i.setPoster(e)}destroy(){var e,i,d,b,l;this.$container&&(this.emit(Pe.theme.beforeDestroy),this._removeEventListener(),this._unmountedControls(),(e=this._loadingControl)==null||e.destroy(),this._loadingControl=null,(i=this.messageControl)==null||i.destroy(),this.messageControl=null,(d=this.posterControl)==null||d.destroy(),this.posterControl=null,(b=this.contentControl)==null||b.destroy(),this.contentControl=null,Array.from(((l=this.$container)==null?void 0:l.classList)||[]).forEach(p=>{new RegExp(`^${ne}-`,"ig").test(p)&&this.$container.classList.remove(p)}),this.emit(Pe.theme.destroyed),this._onPauseTimingFunc&&(this._onPauseTimingFunc=null),this.removeAllListeners(),this.i18n=null)}_initOptions(e){if(this.options=Object.assign({},Or,e),typeof this.options.container=="function"?this.$container=this.options.container():this.$container=this.options.container,!this.$container)throw new Error("container option is required!");const i=["zh","en"].includes(this.options.language)?this.options.language:"zh";this.i18n=new pr({zh:Cr,en:wr},{defaultLocale:i})}_initClassName(){var e,i;this.$container.classList.add(ne,dt.isMobile?ne+"-mobile":ne+"-pc"),["ezopen","flv","hls","mp4"].includes(this.options.type)&&this.$container.classList.add(`${ne}-${this.options.type}`),typeof this.options.className=="string"&&this.$container.classList.add(this.options.className),this.resize((e=this.options)==null?void 0:e.width,(i=this.options)==null?void 0:i.height)}_unmountedControls(){if(!this.controls)return;const e=Object.keys(this.controls).length>0||this._$header||this._$footer;if(this._interactiveResult&&(this._interactiveResult.cleanup==null||this._interactiveResult.cleanup.call(this._interactiveResult),this._interactiveResult=null),e&&this.emit(Pe.control.beforeUnmountControls),Object.keys(this.controls).length>0){for(const b in this.controls){var i,d;(i=(d=this.controls[b]).destroy)==null||i.call(d)}this.controls=null}this._$header&&(this._$header.destroy(),this._$header=null),this._$footer&&(this._$footer.destroy(),this._$footer=null),e&&this.emit(Pe.control.unmountedControls)}_renderTheme(e){return Gi(function*(){var i,d,b;if(this._unmountedControls(),Object.prototype.toString.call(e)!=="[object Object]")return;this.controls={},this.emit(Pe.control.beforeMountControls);const l=function(v){var S,B;const x={};var P;x.autoFocus=(P=v==null?void 0:v.autoFocus)!=null?P:3,x.poster=(v==null?void 0:v.poster)||"";const M=[],F=[],G=((v==null||(S=v.header)==null?void 0:S.btnList)||[]).filter(f=>f.isrender===1&&["deviceID","deviceName"].includes(f.iconId)?(M.push(f),!1):f.isrender===1&&rn.includes(f.iconId)?(F.push(F[0]?Vi({},f,{part:F[0].part}):f),!1):f.isrender===1).map(f=>(ji[f.iconId]&&(f.iconId=ji[f.iconId]),f)),K=((v==null||(B=v.footer)==null?void 0:B.btnList)||[]).filter(f=>f.isrender===1&&["deviceID","deviceName"].includes(f.iconId)?(M.push(f),!1):f.isrender===1&&rn.includes(f.iconId)?(F.push(F[0]?Vi({},f,{part:F[0].part}):f),!1):f.isrender===1).map(f=>(ji[f.iconId]&&(f.iconId=ji[f.iconId]),f));var H,Z,ie,T,m,g;return G.length>0||M.length>0||F.length>0?(x.header={},x.header.color=v==null||(H=v.header)==null?void 0:H.color,x.header.backgroundColor=v==null||(Z=v.header)==null?void 0:Z.backgroundColor,x.header.activeColor=v==null||(ie=v.header)==null?void 0:ie.activeColor,x.header.btnList=[...M||[],...F||[],...G||[]]):x.header=void 0,K.length>0?(x.footer={},x.footer.color=v==null||(T=v.footer)==null?void 0:T.color,x.footer.backgroundColor=v==null||(m=v.footer)==null?void 0:m.backgroundColor,x.footer.activeColor=v==null||(g=v.footer)==null?void 0:g.activeColor,x.footer.btnList=K):x.footer=void 0,x}(e);if(l.poster&&this.setPoster(l.poster),(i=this.posterControl)==null||i.show(),l.header){this._$header=new Yo({getPopupContainer:()=>this.$container,color:l.header.color,activeColor:l.header.activeColor,backgroundColor:l.header.backgroundColor});const[v,S]=kr(l.header.btnList||[]);this._renderControls(this._$header.$left,v),this._renderControls(this._$header.$right,S)}if(l.footer){this._$footer=new Zo({getPopupContainer:()=>this.$container,color:l.footer.color,activeColor:l.footer.activeColor,backgroundColor:l.footer.backgroundColor});const[v,S]=kr(l.footer.btnList||[]);this._renderControls(this._$footer.$left,v),this._renderControls(this._$footer.$right,S)}var p,t,a,n,s,h,E;(this._$header||this._$footer)&&(l==null?void 0:l.autoFocus)!==0&&(this._interactiveResult=function(v){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3,B=arguments.length>2?arguments[2]:void 0,x=null,P=!1;const M=v.querySelector(`.${ne}-header`),F=v.querySelector(`.${ne}-footer`);let G=()=>{x&&(clearTimeout(x),x=null)},K=()=>{G==null||G(),M==null||M.classList.remove(`${ne}-hide-transition`),F==null||F.classList.remove(`${ne}-hide-transition`),P||B(!0),P=!0},H=()=>{G==null||G(),v.classList.contains(`${ne}-player-pause`)||(M==null||M.classList.add(`${ne}-hide-transition`),F==null||F.classList.add(`${ne}-hide-transition`),P&&B(!1),P=!1)},Z=()=>{K==null||K(),x=setTimeout(()=>{G==null||G(),H==null||H()},S)},ie=Q=>{var ee;Q==null||(ee=Q.stopPropagation)==null||ee.call(Q),G==null||G()},T=()=>{P?H==null||H():Z==null||Z()},m=Q=>{var ee;Q==null||(ee=Q.stopPropagation)==null||ee.call(Q),Z==null||Z()};if(Z(),dt.isMobile&&T){const Q=window.PointerEvent?"pointerdown":"touchstart";v.addEventListener(Q,T),F&&F.addEventListener(Q,m),M&&M.addEventListener(Q,m)}else{const Q=window.PointerEvent?"pointerdown":"click";var g,f,O,j;v.addEventListener(Q,Z),v.addEventListener("mousemove",Z),v.addEventListener("mouseleave",H),F&&(F==null||(g=F.addEventListener)==null||g.call(F,Q,ie),F==null||(f=F.addEventListener)==null||f.call(F,"mousemove",ie)),M&&(M==null||(O=M.addEventListener)==null||O.call(M,Q,ie),M==null||(j=M.addEventListener)==null||j.call(M,"mousemove",ie))}return{cleanup:()=>{if(v){if(dt.isMobile&&T){const me=window.PointerEvent?"pointerdown":"touchstart";v.removeEventListener(me,T),F&&Z&&F.removeEventListener(me,m),M&&Z&&M.removeEventListener(me,m)}if(Z){const me=window.PointerEvent?"pointerdown":"click";var Q,ee,ue,fe;v.removeEventListener(me,Z),v.removeEventListener("mousemove",Z),v.removeEventListener("mouseleave",H),F&&G&&(F==null||(Q=F.removeEventListener)==null||Q.call(F,me,ie),F==null||(ee=F.removeEventListener)==null||ee.call(F,"mousemove",ie)),M&&G&&(M==null||(ue=M.removeEventListener)==null||ue.call(M,me,ie),M==null||(fe=M.removeEventListener)==null||fe.call(M,"mousemove",ie))}H&&v.removeEventListener("mouseleave",H),T=null,Z=null,H=null,K=null,m=null,ie=null,G==null||G(),G=null}},clearTimeout:G,setTimeoutShow:Z,hide:H}}(this.$container,1e3*((e==null?void 0:e.autoFocus)||3),v=>{this.emit(Pe.control.controlsBarOpenChange,v)}),this._onPauseTimingFunc&&(this.removeListener(Fi,this._onPauseTimingFunc),this._onPauseTimingFunc=null),this._onPauseTimingFunc=v=>{var S,B,x,P;v?(B=this._interactiveResult)==null||(S=B.clearTimeout)==null||S.call(B):(P=this._interactiveResult)==null||(x=P.setTimeoutShow)==null||x.call(P)},this.on(Fi,this._onPauseTimingFunc)),(t=(p=this).controls)!=null&&t.volumeControl&&(p.controls.volumeControl.on(Pe.control.volumechange,(v,S)=>{p.muted!==S&&(p.muted=S),p.volume!==v&&(p.volume=v),p.emit(Pe.control.volumechange,v,S)}),p.controls.volumeControl.on(Pe.control.volumePanelOpenChange,(v,S,B)=>{p.emit(Pe.control.volumePanelOpenChange,v,S,B)})),(a=p.controls)!=null&&a.playControl&&p.controls.playControl.on(Pe.control.play,v=>{p.playing!==v&&(p.playing=v,p.emit(Pe.control.play,v))}),(n=p.controls)!=null&&n.recControl&&p.controls.recControl.on(Pe.control.changeRecType,v=>{p.recType!==v&&(p.emit(Pe.control.changeRecType,v),p.emit(Pe.changeRecType,v))}),(s=p.controls)!=null&&s.definitionControl&&p.controls.definitionControl.on(Pe.control.definitionPanelOpenChange,(v,S,B)=>{dt.isMobile&&p.emit(Fi,v,S)}),(h=p.controls)!=null&&h.speedControl&&p.controls.speedControl.on(Pe.control.speedPanelOpenChange,(v,S,B)=>{dt.isMobile&&p.emit(Fi,v,S)}),(E=p.controls)!=null&&E.capturePictureControl&&p.controls.capturePictureControl.on(Pe.control.capturePicture,(v,S)=>{p.emit(Pe.control.capturePicture,v)}),this.emit(Pe.control.mountedControls),(d=this.controls)!=null&&d.volumeControl&&!this._changeThemeFlag&&(this.controls.volumeControl.disabled=!0),(b=this.controls)!=null&&b.globalFullscreenControl&&!this.playing&&(this.controls.globalFullscreenControl.disabled=!0)}).call(this)}_renderControls(e,i){return Gi(function*(){if(e){const a=this._changeThemeFlag,n=ea.reduce((s,h)=>(s[h]=this[h],s),{});for(const s of i){var d,b,l,p,t;rn.includes(s.iconId)?(d=this.controls)!=null&&d.recControl||(this.controls.recControl=new On.rec(gi({rootContainer:this.$container,getPopupContainer:()=>e,recType:this._recType,locale:((b=this.i18n)==null?void 0:b.getCurrentTranslation())||{}},((l=this.options)==null?void 0:l.recOptions)||{},a?n:{}))):On[s.iconId]&&(this.controls[`${s.iconId}Control`]=new On[s.iconId](gi({rootContainer:this.$container,getPopupContainer:()=>e,locale:((p=this.i18n)==null?void 0:p.getCurrentTranslation())||{}},((t=this.options)==null?void 0:t[`${s.iconId}Options`])||{},a?n:{})))}}}).call(this)}_mobileInnerWidthHeight(){if(dt.isMobile){var e,i,d,b;const l=Math.floor(window.innerHeight),p=Math.floor(window.innerWidth);(i=this.$container)==null||(e=i.style)==null||e.setProperty(`--${ne}-mobile-inner-height`,`${l}px`),(b=this.$container)==null||(d=b.style)==null||d.setProperty(`--${ne}-mobile-inner-width`,`${p}px`)}}_addEventListener(){this._fullscreen=new Er(this.$container,{prefix:ne,onChange:b=>{b.isCurrentFullscreen?this.emit(Pe.fullscreen):this._isCurrentFullscreen&&this.emit(Pe.exitFullscreen),this._isCurrentFullscreen=b.isCurrentFullscreen,this.emit(Pe.fullscreenChange,b)}});const e=b=>{if(this.$container){var l;switch((l=this.$container.classList)==null||l.remove(`${ne}-angle-0`,`${ne}-angle-90`,`${ne}-angle-180`,`${ne}-angle-270`),b.angle){case 0:this.$container.classList.add(`${ne}-angle-0`);break;case 90:this.$container.classList.add(`${ne}-angle-90`);break;case 180:this.$container.classList.add(`${ne}-angle-180`);break;case 270:this.$container.classList.add(`${ne}-angle-270`)}this.orientationAngle!==b.angle&&this.emit(Pe.orientationChange,b.angle),this._orientationAngle=b.angle,this._mobileInnerWidthHeight()}},[i,d]=dt.orientationEventListener(e);this._cleanupOrientation=d,e(i),this._mobileInnerWidthHeight(),window.addEventListener("resize",Ni(this._mobileInnerWidthHeight,20)),this._cleanUpResizeObserver=dt.resizeObserver(this.$container,Ni(()=>{const b=Math.floor(this.$container.clientWidth),l=Math.floor(this.$container.clientHeight);if(this.width!==b||this.height!==l){if(this.emit(Yt.EVENTS.resize,{width:b,height:l}),this._width=b,this._height=l,this._$header){var p,t,a,n;b-30<=(((t=this._$header)==null||(p=t.$left)==null?void 0:p.clientWidth)||0)+(((n=this._$header)==null||(a=n.$right)==null?void 0:a.clientWidth)||0)?this.emit(Yt.EVENTS.control.headerMoreShow,!0):this.emit(Yt.EVENTS.control.headerMoreShow,!1)}if(this._$footer){var s,h;b-16<=(((s=this._$footer.$left)==null?void 0:s.clientWidth)||0)+(((h=this._$footer.$right)==null?void 0:h.clientWidth)||0)?this.emit(Yt.EVENTS.control.footerMoreShow,!0):this.emit(Yt.EVENTS.control.footerMoreShow,!1)}}},20))}_removeEventListener(){var e,i,d,b;this._isCurrentFullscreen&&((b=this._fullscreen)==null||b.exitFullscreen()),(e=this._fullscreen)==null||e.destroy(),this._fullscreen=null,this._cleanupOrientation==null||this._cleanupOrientation.call(this),this._cleanupOrientation=null,(d=this._cleanUpResizeObserver)==null||(i=d.unobserve)==null||i.call(d),this._cleanUpResizeObserver=null,window.removeEventListener("resize",this._mobileInnerWidthHeight)}_reset(){this._zoom=1}constructor(e){var i,d,b,l,p,t;if(super(),this.options=Or,this.controls={},this._$header=null,this._$footer=null,this._interactiveResult=null,this._fullscreen=null,this._cleanupOrientation=null,this._cleanUpResizeObserver=null,this._width=0,this._height=0,this._isCurrentFullscreen=!1,this._orientationAngle=0,this._playing=!1,this._loading=!1,this._volume=0,this._muted=!1,this._zoom=1,this._recording=!1,this._changeThemeFlag=!1,this._onPauseTimingFunc=null,this._recType="sdk",e.onInitializing==null||e.onInitializing.call(e,this),this._initOptions(e),this._initClassName(),this.contentControl=new Xo({getPopupContainer:()=>this.$container}),this.options.loadingOptions!==null&&(this._loadingControl=new Co(gi({locale:((b=this.i18n)==null?void 0:b.getCurrentTranslation())||{}},this.options.loadingOptions||{},{getPopupContainer:()=>this.$container}))),this.options.messageOptions!==null&&(this.messageControl=new Qo(gi({locale:((l=this.i18n)==null?void 0:l.getCurrentTranslation())||{}},this.options.messageOptions||{},{getPopupContainer:()=>this.$container}))),this.options.posterOptions!==null&&(this.posterControl=new wo(gi({},this.options.posterOptions||{},{getPopupContainer:()=>this.contentControl.$container}))),this._volume=((i=this.options.volumeOptions)==null?void 0:i.volume)||0,this._muted=((d=this.options.volumeOptions)==null?void 0:d.muted)||!1,this._mobileInnerWidthHeight=this._mobileInnerWidthHeight.bind(this),["flv","hls","mp4"].includes(e.type))this._renderTheme([null].includes((p=this.options)==null?void 0:p.themeData)?null:Ko);else if(e.type==="ezopen"){var a;this._renderTheme([null].includes((a=this.options)==null?void 0:a.themeData)?null:Tr.pcLive)}this._addEventListener(),(t=this)==null||t.on(Pe.audioCodecUnsupported,()=>{var n;(n=t.controls)!=null&&n.volumeControl&&t.controls.volumeControl.emit(Pe.audioCodecUnsupported)}),t==null||t.on(Pe.message,(n,s,h)=>{var E;if(["fetchError","error"].includes(s))(E=t.messageControl)==null||E.error(n,h);else if(s==="warn"){var v;(v=t.messageControl)==null||v.warn(n,h)}else if(s==="info"){var S;(S=t.messageControl)==null||S.info(n,h)}}),t==null||t.on(Pe.audioInfo,n=>{var s;!(t==null||(s=t.controls)==null)&&s.volumeControl&&(n.audioFormatName||n.encType)&&(t.controls.volumeControl.disabled=!1)}),t==null||t.on(Pe.play,n=>{var s,h;n&&((h=t.messageControl)==null||h.hide()),!(t==null||(s=t.controls)==null)&&s.globalFullscreenControl&&(t.controls.globalFullscreenControl.disabled=!n)})}}Yt.TEMPLATES=Tr,Yt.EVENTS=Pe,Yt.LOCALES={zh:Cr,en:wr},Yt.THEME_VERSION="0.0.1-alpha.18";var xr,xn={exports:{}},ta=xn.exports,ia=(xr||(xr=1,function(u,e){var i;i=typeof self<"u"?self:ta,u.exports=function(d){var b=d||{},l=d.navigator!==void 0?d.navigator:{},p=function(a,n){var s=l.mimeTypes;for(var h in s)if(s[h][a]==n)return!0;return!1},t=null;return l.userAgentData!==void 0&&l.userAgentData.getHighEntropyValues(["platformVersion"]).then(function(a){l.userAgentData.platform==="Windows"&&(t=parseInt(a.platformVersion.split(".")[0])>=13?11:10)}),function(a){var n=a||l.userAgent||"",s={},h={Trident:n.indexOf("Trident")>-1||n.indexOf("NET CLR")>-1,Presto:n.indexOf("Presto")>-1,WebKit:n.indexOf("AppleWebKit")>-1,Gecko:n.indexOf("Gecko/")>-1,KHTML:n.indexOf("KHTML/")>-1,Safari:n.indexOf("Safari")>-1,Chrome:n.indexOf("Chrome")>-1||n.indexOf("CriOS")>-1,IE:n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1,Edge:n.indexOf("Edge")>-1||n.indexOf("Edg/")>-1||n.indexOf("EdgA")>-1||n.indexOf("EdgiOS")>-1,Firefox:n.indexOf("Firefox")>-1||n.indexOf("FxiOS")>-1,"Firefox Focus":n.indexOf("Focus")>-1,Chromium:n.indexOf("Chromium")>-1,Opera:n.indexOf("Opera")>-1||n.indexOf("OPR")>-1,Vivaldi:n.indexOf("Vivaldi")>-1,Yandex:n.indexOf("YaBrowser")>-1,Brave:!!l.brave,Arora:n.indexOf("Arora")>-1,Lunascape:n.indexOf("Lunascape")>-1,QupZilla:n.indexOf("QupZilla")>-1,"Coc Coc":n.indexOf("coc_coc_browser")>-1,Kindle:n.indexOf("Kindle")>-1||n.indexOf("Silk/")>-1,Iceweasel:n.indexOf("Iceweasel")>-1,Konqueror:n.indexOf("Konqueror")>-1,Iceape:n.indexOf("Iceape")>-1,SeaMonkey:n.indexOf("SeaMonkey")>-1,Epiphany:n.indexOf("Epiphany")>-1,360:n.indexOf("QihooBrowser")>-1||n.indexOf("QHBrowser")>-1,"360EE":n.indexOf("360EE")>-1,"360SE":n.indexOf("360SE")>-1,UC:n.indexOf("UCBrowser")>-1||n.indexOf(" UBrowser")>-1||n.indexOf("UCWEB")>-1,QQBrowser:n.indexOf("QQBrowser")>-1,QQ:n.indexOf("QQ/")>-1,Baidu:n.indexOf("Baidu")>-1||n.indexOf("BIDUBrowser")>-1||n.indexOf("baidubrowser")>-1||n.indexOf("baiduboxapp")>-1||n.indexOf("BaiduHD")>-1,Maxthon:n.indexOf("Maxthon")>-1,Sogou:n.indexOf("MetaSr")>-1||n.indexOf("Sogou")>-1,Liebao:n.indexOf("LBBROWSER")>-1||n.indexOf("LieBaoFast")>-1,"2345Explorer":n.indexOf("2345Explorer")>-1||n.indexOf("Mb2345Browser")>-1||n.indexOf("2345chrome")>-1,"115Browser":n.indexOf("115Browser")>-1,TheWorld:n.indexOf("TheWorld")>-1,Quark:n.indexOf("Quark")>-1,Qiyu:n.indexOf("Qiyu")>-1,XiaoMi:n.indexOf("MiuiBrowser")>-1,Huawei:n.indexOf("HuaweiBrowser")>-1||n.indexOf("HUAWEI/")>-1||n.indexOf("HONOR")>-1||n.indexOf("HBPC/")>-1,Vivo:n.indexOf("VivoBrowser")>-1,OPPO:n.indexOf("HeyTapBrowser")>-1,Wechat:n.indexOf("MicroMessenger")>-1,WechatWork:n.indexOf("wxwork/")>-1,Taobao:n.indexOf("AliApp(TB")>-1,Alipay:n.indexOf("AliApp(AP")>-1,Weibo:n.indexOf("Weibo")>-1,Douban:n.indexOf("com.douban.frodo")>-1,Suning:n.indexOf("SNEBUY-APP")>-1,iQiYi:n.indexOf("IqiyiApp")>-1,DingTalk:n.indexOf("DingTalk")>-1,Douyin:n.indexOf("aweme")>-1,Googlebot:n.indexOf("Googlebot")>-1,Baiduspider:n.indexOf("Baiduspider")>-1,Sogouspider:n.match(/Sogou (\S+) Spider/i),Bingbot:n.indexOf("bingbot")>-1,"360Spider":n.indexOf("360Spider")>-1||n.indexOf("HaosouSpider")>-1,Bytespider:n.indexOf("Bytespider")>-1,YisouSpider:n.indexOf("YisouSpider")>-1,YodaoBot:n.indexOf("YodaoBot")>-1,YandexBot:n.indexOf("YandexBot")>-1,Windows:n.indexOf("Windows")>-1,Linux:n.indexOf("Linux")>-1||n.indexOf("X11")>-1,"Mac OS":n.indexOf("Macintosh")>-1,Android:n.indexOf("Android")>-1||n.indexOf("Adr")>-1,HarmonyOS:n.indexOf("HarmonyOS")>-1,Ubuntu:n.indexOf("Ubuntu")>-1,FreeBSD:n.indexOf("FreeBSD")>-1,Debian:n.indexOf("Debian")>-1,"Windows Phone":n.indexOf("IEMobile")>-1||n.indexOf("Windows Phone")>-1,BlackBerry:n.indexOf("BlackBerry")>-1||n.indexOf("RIM")>-1,MeeGo:n.indexOf("MeeGo")>-1,Symbian:n.indexOf("Symbian")>-1,iOS:n.indexOf("like Mac OS X")>-1,"Chrome OS":n.indexOf("CrOS")>-1,WebOS:n.indexOf("hpwOS")>-1,Mobile:n.indexOf("Mobi")>-1||n.indexOf("iPh")>-1||n.indexOf("480")>-1,Tablet:n.indexOf("Tablet")>-1||n.indexOf("Pad")>-1||n.indexOf("Nexus 7")>-1||l.platform==="MacIntel"&&l.maxTouchPoints>1,isWebview:n.indexOf("; wv)")>-1},E=!1;if(b.chrome){var v=n.replace(/^.*Chrome\/([\d]+).*$/,"$1");b.chrome.adblock2345||b.chrome.common2345?h["2345Explorer"]=!0:p("type","application/360softmgrplugin")||p("type","application/mozilla-npqihooquicklogin")||v>36&&b.showModalDialog?E=!0:v>45&&!(E=p("type","application/vnd.chromium.remoting-viewer"))&&v>=69&&(E=p("type","application/hwepass2001.installepass2001")||p("type","application/asx"))}h.Mobile?h.Mobile=!(n.indexOf("iPad")>-1):E&&(p("type","application/gameplugin")||l&&l.connection!==void 0&&l.connection.saveData===void 0?h["360SE"]=!0:h["360EE"]=!0),h.Baidu&&h.Opera?h.Baidu=!1:h.iOS&&(h.Safari=!0);var S={engine:["WebKit","Trident","Gecko","Presto","KHTML"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Brave","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","XiaoMi","Vivo","OPPO","360","360SE","360EE","UC","QQBrowser","QQ","Huawei","Baidu","Maxthon","Sogou","Liebao","2345Explorer","115Browser","TheWorld","Quark","Qiyu","Wechat","WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi","DingTalk","Douyin","Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YisouSpider","YodaoBot","YandexBot"],system:["Windows","Linux","Mac OS","Android","HarmonyOS","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};for(var B in s.device="PC",s.language=function(){var G=l.browserLanguage||l.language;if(typeof G!="string")return"Unknown language";var K=G.split("-");return K[1]&&(K[1]=K[1].toUpperCase()),K.join("_")}(),S)for(var x=0;x-1&&(G=n.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var K={57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"},H=n.replace(/^.*Chrome\/([\d]+).*$/,"$1");return G||K[H]||""},"2345Explorer":function(){return{69:"10.0",55:"9.9"}[navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||n.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1").replace(/^.*Mb2345Browser\/([\d.]+).*$/,"$1")},"115Browser":function(){return n.replace(/^.*115Browser\/([\d.]+).*$/,"$1")},TheWorld:function(){return n.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return n.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Vivo:function(){return n.replace(/^.*VivoBrowser\/([\d.]+).*$/,"$1")},OPPO:function(){return n.replace(/^.*HeyTapBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return n.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return n.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return n.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return n.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return n.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return n.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return n.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return n.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return n.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return n.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")},DingTalk:function(){return n.replace(/^.*DingTalk\/([\d.]+).*$/,"$1")},Douyin:function(){return n.replace(/^.*app_version\/([\d.]+).*$/,"$1")},Huawei:function(){return n.replace(/^.*Version\/([\d.]+).*$/,"$1").replace(/^.*HuaweiBrowser\/([\d.]+).*$/,"$1").replace(/^.*HBPC\/([\d.]+).*$/,"$1")},Googlebot:function(){return n.replace(/^.*Googlebot\/([\d.]+).*$/,"$1")},Baiduspider:function(){return n.replace(/^.*Baiduspider(-render)?\/([\d.]+).*$/,"$1")},Sogouspider:function(){return n.replace(/^.*Sogou (\S+) Spider\/([\d.]+).*$/i,"$2")},Bingbot:function(){return n.replace(/^.*bingbot\/([\d.]+).*$/,"$1")},"360Spider":function(){return""},Bytespider:function(){return""},YisouSpider:function(){return n.replace(/^.*YisouSpider\/([\d.]+).*$/,"$1")},YodaoBot:function(){return n.replace(/^.*YodaoBot\/([\d.]+).*$/,"$1")},YandexBot:function(){return n.replace(/^.*YandexBot\/([\d.]+).*$/,"$1")}};return s.version="",F[s.browser]&&(s.version=F[s.browser](),s.version==n&&(s.version="")),s.browser=="Chrome"&&n.match(/\S+Browser/)&&(s.browser=n.match(/\S+Browser/)[0],s.version=n.replace(/^.*Browser\/([\d.]+).*$/,"$1")),s.browser=="Edge"?s.engine=parseInt(s.version)>75?"Blink":"EdgeHTML":(h.Chrome&&s.engine=="WebKit"&&parseInt(F.Chrome())>27||s.browser=="Opera"&&parseInt(s.version)>12||s.browser=="Yandex")&&(s.engine="Blink"),s}}(i)}(xn)),xn.exports),na=tt(ia);const ra=0,Rr=1,Rn="flv",Dr="m7s",Oi={videoBuffer:.2,videoBufferDelay:1e3,scaleMode:1,debug:!1,heartTimeout:15,heartTimeoutReplayTimes:5,timeout:10,loadingTimeout:10,loadingTimeoutDelay:3,loadingTimeoutReplayTimes:5,keepScreenOn:!1,muted:!0,hasAudio:!0,volume:.8,hasVideo:!0,decoder:"decoder.js",staticPath:"",url:"",rotate:0,isLive:!0,forceNoOffscreen:!0,protocol:Rr,demuxType:Rn,useMSE:!1,wasmDecodeErrorReplay:!0,openWebglAlignment:!1,wasmDecodeAudioSyncVideo:!1,autoPlay:!0,loggerOptions:{level:"INFO"}},Mr="init",Pr="initVideo",oa="render",aa="playAudio",$r="initAudio",Ur="audioCode",Fr="videoCode",sa="wasmError",la="Invalid NAL unit size",Ai=1,yi=2,Aa=8,da=9,ca="init",Nr="decode",ua="audioDecode",ha="close",pa="updateConfig",te=hr({fullscreenChange:"fullscreenChange",orientationChange:"orientationChange",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",loaded:"loaded",videoInfo:"videoInfo",timeUpdate:"timeUpdate",timeUpdateOSD:"timeUpdateOSD",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",heartTimeout:"heartTimeout",heartRetryTimes:"heartRetryTimes",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",loadingRetryTimes:"loadingRetryTimes",stats:"stats",performance:"performance",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",audioCodecUnsupported:"audioCodecUnsupported",unrecoverableEarlyEof:"unrecoverableEarlyEof",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",localVideoRecords:"localVideoRecords",getDefinitionListResult:"getDefinitionListResult",definitionChange:"definitionChange",definitionListChange:"definitionListChange",playbackRateListChange:"playbackRateListChange",playbackRateChange:"playbackRateChange",decoderLoaded:"decoderLoaded",end:"end"},Yt.EVENTS,{clone:!1}),Vr={load:te.load,timeUpdate:te.timeUpdate,videoInfo:te.videoInfo,audioInfo:te.audioInfo,error:te.error,kBps:te.kBps,log:te.log,start:te.start,delayTimeout:te.delayTimeout,fullscreen:"fullscreen",play:te.play,pause:te.pause,mute:te.mute,stats:te.stats,volumechange:te.volumechange,performance:te.performance,playToRenderTimes:te.playToRenderTimes},vt={playError:"playIsNotPauseOrUrlIsNull",fetchError:"NetworkError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsWidthOrHeightChange:"webcodecsWidthOrHeightChange",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceFull:te.mseSourceBufferFull,mseSourceBufferError:te.mseSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceBufferListLarge:"mediaSourceBufferListLarge",mediaSourceAppendBufferEndTimeout:"mediaSourceAppendBufferEndTimeout",wasmDecodeError:"wasmDecodeError",webglAlignmentError:"webglAlignmentError"},oi={download:"download",base64:"base64",blob:"blob"},fa={7:"H264(AVC)",12:"H265(HEVC)"},ma={10:"AAC",7:"ALAW",8:"MULAW"},bi={full:0,auto:1,fullAuto:2},jr="webcodecs",Dn="webgl",Mn="offscreen",_a="The user aborted a request",va="AbortError",ga="AbortError",Gr="https://open.ys7.com/";function ya(){}function Qr(){let u=arguments.length>1?arguments[1]:void 0;const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split(","),i=atob(e[1]),d=e[0].replace("data:","").replace(";base64","");let b=i.length;const l=new Uint8Array(b);for(;b--;)l[b]=i.charCodeAt(b);return new File([l],u||"file",{type:d})}function Wt(){return new Date().getTime()}function zr(u,e,i){if(u)return typeof e=="object"&&Object.keys(e).forEach(d=>{zr(u,d,e[d])}),u.style[e]=i,u}function Hr(){return performance&&typeof performance.now=="function"?performance.now():Date.now()}function Wr(){return/phone|pad|pod|iphone|ipod|ios|ipad|android|mobile|blackberry|iemobile|mqqbrowser|juc|wosbrowser|webos|symbian|windows phone|opera mini|huaweibrowser/i.test(window.navigator.userAgent.toLowerCase())}function Pn(u){return!function(e){return e==null}(u)}(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const u=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(u instanceof WebAssembly.Module)return new WebAssembly.Instance(u)instanceof WebAssembly.Instance}}catch{}})();class xi{constructor(){}on(e,i,d){const b=this.e||(this.e={});return(b[e]||(b[e]=[])).push({fn:i,ctx:d}),this}once(e,i,d){const b=this;function l(){b.off(e,l);for(var p=arguments.length,t=new Array(p),a=0;a1?d-1:0),l=1;l{delete d[p]}),void delete this.e;const b=d[e],l=[];if(b&&i)for(let p=0,t=b.length;p{this._isFullScreen=e.isCurrentFullscreen}),u.on(te.orientationChange,e=>{this._orientation=e})}resetInit(){this.init=!1,this.videoInfo={width:0,height:0,encType:"",encTypeCode:0}}destroy(){var u;this.resetInit(),this.player.$container&&this.$videoElement&&((u=this.player.$container)===null||u===void 0||u.removeChild(this.$videoElement)),this.$videoElement=null,this.off()}updateVideoInfo(u){var e,i,d,b,l,p,t,a,n,s,h;(u.height&&u.height!==((e=this.videoInfo)===null||e===void 0?void 0:e.height)||u.width&&u.width!==this.videoInfo.width||u!=null&&u.encTypeCode&&(u==null?void 0:u.encTypeCode)!==((i=this.videoInfo)===null||i===void 0?void 0:i.encTypeCode))&&(this.videoInfo=Object.assign(this.videoInfo||{},u||{}),u.encTypeCode&&(this.videoInfo.encTypeCode=u.encTypeCode,this.videoInfo.encType=fa[u.encTypeCode]),u.width&&(this.videoInfo.width=u.width),u.height&&(this.videoInfo.height=u.height),!((d=this.videoInfo)===null||d===void 0)&&d.width&&((b=this.videoInfo)===null||b===void 0?void 0:b.width)>0&&(!((l=this.videoInfo)===null||l===void 0)&&l.height)&&((p=this.videoInfo)===null||p===void 0?void 0:p.height)>0&&(!((t=this.videoInfo)===null||t===void 0)&&t.encTypeCode)&&this.player.emit(te.videoInfo,this.videoInfo),!((a=this.videoInfo)===null||a===void 0)&&a.hasAudio&&(!((n=this.videoInfo)===null||n===void 0)&&n.audioCodec)&&this.player.emit(te.audioInfo,{encType:(s=this.videoInfo)===null||s===void 0?void 0:s.audioCodec,audioFormatName:this._flvToMp4Codec((h=this.videoInfo)===null||h===void 0?void 0:h.audioCodec),audioCodec:this.videoInfo.audioCodec}))}_flvToMp4Codec(u){return{2:"mp3","mp4a.40.2":"AAC",10:"AAC"}[u]}play(){}pause(){}clearView(){}};const ui=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Si=="object"&&Si.global===Si?Si:void 0;function $n(u,e,i){const d=new XMLHttpRequest;d.open("GET",u),d.responseType="blob",d.onload=function(){Un(d.response,e,i)},d.onerror=function(){},d.send()}function Kr(u){const e=new XMLHttpRequest;e.open("HEAD",u,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Qi(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{const i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(i)}}const Yr=ui.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent);var Un=typeof window!="object"||window!==ui?function(){}:"download"in HTMLAnchorElement.prototype&&!Yr?function(u,e,i){const d=ui.URL||ui.webkitURL,b=document.createElementNS("http://www.w3.org/1999/xhtml","a");e=e||u.name||"download",b.download=e,b.rel="noopener",typeof u=="string"?(b.href=u,b.origin!==location.origin?Kr(b.href)?$n(u,e,i):Qi(b,b.target="_blank"):Qi(b)):(b.href=d.createObjectURL(u),setTimeout(function(){d.revokeObjectURL(b.href)},4e4),setTimeout(function(){Qi(b)},0))}:"msSaveOrOpenBlob"in navigator?function(u,e,i){if(e=e||u.name||"download",typeof u=="string")if(Kr(u))$n(u,e,i);else{const d=document.createElement("a");d.href=u,d.target="_blank",setTimeout(function(){Qi(d)})}else navigator.msSaveOrOpenBlob(function(d,b){return b===void 0?b={autoBom:!1}:typeof b!="object"&&(b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(d.type)?new Blob(["\uFEFF",d],{type:d.type}):d}(u,i),e)}:function(u,e,i,d){if((d=d||open("","_blank"))&&(d.document.title=d.document.body.innerText="downloading..."),typeof u=="string")return $n(u,e,i);const b=u.type==="application/octet-stream",l=/constructor/i.test(ui.HTMLElement)||ui.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||b&&l||Yr)&&typeof FileReader<"u"){const t=new FileReader;t.onloadend=function(){let a=t.result;a=p?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=a:location=a,d=null},t.readAsDataURL(u)}else{const t=ui.URL||ui.webkitURL,a=t.createObjectURL(u);d?d.location=a:location.href=a,d=null,setTimeout(function(){t.revokeObjectURL(a)},4e4)}};class ba extends qr{constructor(e){super(e),this._pageHide=!1,this.player=e;const i=document.createElement("canvas");i.style.position="absolute",i.style.top="0",i.style.left="0",this.$videoElement=i,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.contextGlRender=null,this.contextGlDestroy=null,this.bitmaprenderer=null,this.renderType=null,this._currentTime=0,this._initCanvasRender(),this._contextmenuEvent=d=>{d.target===this.$videoElement&&d.preventDefault()},document.addEventListener("contextmenu",this._contextmenuEvent),this.player.debug.log("CanvasVideo","init"),this._visibilitychange=this._visibilitychange.bind(this),document.addEventListener("visibilitychange",this._visibilitychange)}destroy(){this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.contextGlRender&&(this.contextGlDestroy&&this.contextGlDestroy(),this.contextGlDestroy=null,this.contextGlRender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this._contextmenuEvent&&(document.removeEventListener("contextmenu",this._contextmenuEvent),this._contextmenuEvent=null),this._visibilitychange&&(document.removeEventListener("visibilitychange",this._visibilitychange),this._visibilitychange=null),this.renderType=null,super.destroy(),this.player.debug.log("CanvasVideoLoader","destroy")}_visibilitychange(){this.player.debug.log("document.hidden",document.hidden),this._pageHide=document.hidden}_initContextGl(){this.contextGl=function(i){let d=null;const b=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let l=0;for(;!d&&l{var b=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join(` `),l=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join(` `);d&&i.pixelStorei(i.UNPACK_ALIGNMENT,1);var p=i.createShader(i.VERTEX_SHADER);i.shaderSource(p,b),i.compileShader(p),i.getShaderParameter(p,i.COMPILE_STATUS);var t=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(t,l),i.compileShader(t),i.getShaderParameter(t,i.COMPILE_STATUS);var a=i.createProgram();i.attachShader(a,p),i.attachShader(a,t),i.linkProgram(a),i.getProgramParameter(a,i.LINK_STATUS),i.useProgram(a);var n=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,n),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),i.STATIC_DRAW);var s=i.getAttribLocation(a,"vertexPos");i.enableVertexAttribArray(s),i.vertexAttribPointer(s,2,i.FLOAT,!1,0,0);var h=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW);var E=i.getAttribLocation(a,"texturePos");function v(P,M){var F=i.createTexture();return i.bindTexture(i.TEXTURE_2D,F),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.bindTexture(i.TEXTURE_2D,null),i.uniform1i(i.getUniformLocation(a,P),M),F}i.enableVertexAttribArray(E),i.vertexAttribPointer(E,2,i.FLOAT,!1,0,0);var S=v("ySampler",0),B=v("uSampler",1),x=v("vSampler",2);return{render:function(P,M,F,G,K){i.viewport(0,0,P,M),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,S),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P,M,0,i.LUMINANCE,i.UNSIGNED_BYTE,F),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,B),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P/2,M/2,0,i.LUMINANCE,i.UNSIGNED_BYTE,G),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,x),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,P/2,M/2,0,i.LUMINANCE,i.UNSIGNED_BYTE,K),i.drawArrays(i.TRIANGLE_STRIP,0,4)},destroy:function(){try{i.deleteProgram(a),i.deleteBuffer(n),i.deleteBuffer(h),i.deleteTexture(S),i.deleteTexture(B),i.deleteTexture(x)}catch{}}}})(this.contextGl,this.player._opt.openWebglAlignment);this.contextGlRender=e.render,this.contextGlDestroy=e.destroy}_initContext2D(){this.context2D=this.$videoElement.getContext("2d")}_initCanvasRender(){this._supportOffscreen()?(this.renderType=Mn,this._bindOffscreen()):(this.renderType=Dn,this._initContextGl())}_supportOffscreen(){return typeof this.$videoElement.transferControlToOffscreen=="function"&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}render(e){var i,d,b;switch(this.player.videoTimestamp=e.ts,this._currentTime=e.ts,this.renderType){case Mn:(i=this.bitmaprenderer)===null||i===void 0||i.transferFromImageBitmap(e.buffer);break;case Dn:this._pageHide||this.contextGlRender(this.$videoElement.width,this.$videoElement.height,e.output[0],e.output[1],e.output[2]);break;case jr:(d=this.context2D)===null||d===void 0||d.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),(b=e.videoFrame).close?b.close():b.destroy&&b.destroy()}}screenshot(e,i,d,b){e=e||Wt()+"",b=b||oi.download;const l={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};let p=.92;!l[i]&&oi[i]&&(b=i,i="png",d=void 0),typeof d=="string"&&(b=d,d=void 0),d!==void 0&&(p=Number(d));const t=this.$videoElement.toDataURL(l[i]||l.png,p);if(t!=="data:,"){if(b===oi.base64)return t;{const a=Qr(t,e+"."+i);return b===oi.blob?a:b===oi.download?(Un(a,e),a):void 0}}}clearView(){var e;switch(this.renderType){case Mn:(function(i,d){const b=document.createElement("canvas");return b.width=i,b.height=d,window.createImageBitmap(b,0,0,i,d)})(this.$videoElement.width,this.$videoElement.height).then(i=>{var d;(d=this.bitmaprenderer)===null||d===void 0||d.transferFromImageBitmap(i)});break;case Dn:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case jr:(e=this.context2D)===null||e===void 0||e.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}resize(){this.player.debug.log("canvasVideo","resize");const e=this.player._opt;let i=Math.floor(this.player.width),d=Math.floor(this.player.height);this._isFullScreen&&[0,180].includes(this._orientation)&&Mt()&&([i,d]=[d,i]);let b=this.$videoElement.width,l=this.$videoElement.height;const p=e.rotate,t=(i-b)/2,a=(d-l)/2;p!==270&&p!==90||(b=this.$videoElement.height,l=this.$videoElement.width);const n=i/b,s=d/l;let h=n>s?s:n;e.scaleMode!==bi.auto&&n!==s&&(h=n+","+s),e.scaleMode===bi.fullAuto&&(h=n>s?n:s);let E="scale("+h+")";p&&(E+=" rotate("+p+"deg)"),this.$videoElement.style.cssText+="transform-origin: 50% 50%;",this.$videoElement.style.transform=E,this.$videoElement.style.left=t+"px",this.$videoElement.style.top=a+"px"}get currentTime(){return(this._currentTime||0)/1e3}}class Ea extends xi{constructor(e){super(),this.bufferList=[],this.player=e,this.scriptNode=null,this.hasInitScriptNode=!1,this.audioContextChannel=null,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioContext.createGain();const i=this.audioContext.createBufferSource();i.buffer=this.audioContext.createBuffer(1,1,22050),i.connect(this.audioContext.destination),i.start(0),this.audioBufferSourceNode=i,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.audioEnabled(!0),this.gainNode.gain.value=0,this.playing=!1,this.audioSyncVideoOption={diff:null},this.audioInfo={encType:"",channels:"",sampleRate:""},this.init=!1,this.hasAudio=!1,this._muted=this.player._opt.muted,this._volume=this.player._opt.volume,!this._muted&&this._volume&&(this.volume=this._volume),this.on(te.videoSyncAudio,d=>{this.audioSyncVideoOption=d}),this.player.debug.log("AudioContext","init")}resetInit(){this.init=!1,this.audioInfo={encType:"",channels:"",sampleRate:""}}destroy(){this.closeAudio(),this.resetInit(),this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.onaudioprocess=ya,this.scriptNode=null),this.audioBufferSourceNode=null,this.mediaStreamAudioDestinationNode=null,this.hasInitScriptNode=!1,this.audioSyncVideoOption={diff:null},this.off(),this.player.debug.log("AudioContext","destroy")}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encType=ma[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(te.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get muted(){return this._muted}set muted(e){e?(this._setVolume(0),this.clear()):this._setVolume(this._volume),this._muted=e}get volume(){return this._volume}set volume(e){this.setVolume(e)}get bufferSize(){return this.bufferList.length}initScriptNode(){if(this.playing=!0,this.hasInitScriptNode)return;const e=this.audioInfo.channels,i=this.audioContext.createScriptProcessor(1024,0,e);i.onaudioprocess=d=>{const b=d.outputBuffer;if(this.bufferList.length&&this.playing){if(!this.player._opt.useWCS&&!this.player._opt.useMSE&&this.player._opt.wasmDecodeAudioSyncVideo){if(this.audioSyncVideoOption.diff>1e3)return void this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${this.audioSyncVideoOption.diff}, waiting`);if(this.audioSyncVideoOption.diff<-1e3){this.player.debug.warn("AudioContext",`audioSyncVideoOption less than diff :${this.audioSyncVideoOption.diff}, dropping`);let p=this.bufferList.shift();for(;p.ts-this.player.videoTimestamp<-1e3&&this.bufferList.length>0;)p=this.bufferList.shift();if(this.bufferList.length===0)return}}if(this.bufferList.length===0)return;const l=this.bufferList.shift();l&&l.ts&&(this.player.audioTimestamp=l.ts);for(let p=0;p20&&this.bufferList.length>50&&this.bufferList.shift())}pause(){this.audioSyncVideoOption={diff:null},this.playing=!1,this.clear()}resume(){this.playing=!0}}class zi{constructor(e){return new(zi.getLoaderFactory())(e)}static getLoaderFactory(){return Ea}}class Sa extends xi{constructor(e){super(),this.player=e,this.playing=!1,this.abortController=new AbortController,this.streamRate=(Hr(),i=>{Hr()}),e.debug.log("FetchStream","init"),this._streamSuccess=!1}destroy(){this.abort(),this.off(),this.streamRate=null,this.player.debug.log("FetchStream","destroy")}fetchStream(e,i={}){var d;this._streamSuccess=!1;const{demux:b}=this.player;this.player._times.streamStart=Wt(),this.abortController||(this.abortController=new AbortController);const l=Object.assign({signal:(d=this.abortController)===null||d===void 0?void 0:d.signal},{headers:i.headers||{}});fetch(e,l).then(p=>{if(p.status!==200)return this.abort(),this.emit(te.streamError),void this.player.emit(te.error,te.streamError);const t=p.body.getReader(),a=()=>{t.read().then(({done:n,value:s})=>{n?b.close():(this.streamRate&&this.streamRate(s.byteLength),b.dispatch(s),this._streamSuccess||(this._streamSuccess=!0,this.emit(te.streamSuccess)),a())}).catch(n=>{b.close();const s=n.toString();if(s.indexOf(_a)===-1&&s.indexOf(va)===-1&&n.name!==ga){this.abort();try{t.cancel()}catch{}this.emit(te.streamError,n),this.player.emit(te.error,te.streamError,n)}})};a()}).catch(p=>{b.close(),this.abort(),this.emit(te.streamError,p),this.player.emit(te.error,te.streamError),p==null||p.name})}abort(){this._streamSuccess=!1,this.abortController&&(this.abortController.abort(),this.abortController=null)}}class Fn{constructor(e){return new(Fn.getLoaderFactory(e._opt.protocol))(e)}static getLoaderFactory(e){return Sa}}class Xr{constructor(e){this.player=e,this.decoderWorker=new Worker((e._opt.staticPath===""?"":function(i,d){d===void 0&&(d="");var b=/^(https?:\/\/|^\/\/)/;return b.test(i)?i:(i=i.replace(/\/+/g,"/"),d=b.test(d||"")?d:window.location.href,new URL(i,d).href)}(e._opt.staticPath))+e._opt.decoder),this._initDecoderWorker(),e.debug.log("decoderWorker","init")}destroy(){this.decoderWorker.postMessage({cmd:ha}),this.decoderWorker.terminate(),this.decoderWorker=null,this.player.debug.log("decoderWorker","destroy")}_initDecoderWorker(){const{debug:e,events:{proxy:i}}=this.player;this.decoderWorker.onmessage=d=>{var b,l,p,t,a,n;const s=d.data;switch(s.cmd){case Mr:e.log("decoderWorker","onmessage:",Mr),this.player.loaded||this.player.emit(te.load),this.player.emit(te.decoderWorkerInit),this.player.emit(te.decoderLoaded),this._initWork();break;case Fr:e.log("decoderWorker","onmessage:",Fr,s.code),this.player._times.decodeStart||(this.player._times.decodeStart=Wt()),this.player.video.updateVideoInfo({encTypeCode:s.code});break;case Ur:e.log("decoderWorker","onmessage:",Ur,s.code),(b=this.player)===null||b===void 0||(b=b.audio)===null||b===void 0||(l=b.updateAudioInfo)===null||l===void 0||l.call(b,{encTypeCode:s.code});break;case Pr:if(e.log("decoderWorker","onmessage:",Pr,`width:${s.w},height:${s.h}`),(p=this.player)===null||p===void 0||(p=p.video)===null||p===void 0||(t=p.updateVideoInfo)===null||t===void 0||t.call(p,{width:s.w,height:s.h}),!this.player._opt.openWebglAlignment&&s.w/2%4!=0)return void this.player.emit(vt.webglAlignmentError);this.player.video.initCanvasViewSize();break;case $r:e.log("decoderWorker","onmessage:",$r,`channels:${s.channels},sampleRate:${s.sampleRate}`),this.player.audio&&(this.player.audio.updateAudioInfo(s),this.player.audio.initScriptNode(s));break;case oa:var h,E,v;this.player.handleRender(),this.player.video.render(s),this.player.emit(te.timeUpdate,s.ts/1e3),this.player.updateStats({fps:!0,ts:s.ts,buf:s.delay}),s.w&&s.h&&((h=this.player)===null||h===void 0||(E=(v=h.video).updateVideoInfo)===null||E===void 0||E.call(v,{width:s.w,height:s.h})),this.player._times.videoStart||(this.player._times.videoStart=Wt(),this.player.handlePlayToRenderTimes());break;case aa:this.player.playing&&this.player.audio&&this.player.audio.play(s.buffer,s.ts);break;case sa:s.message&&s.message.indexOf(la)!==-1&&this.player.emitError(vt.wasmDecodeError);break;default:(a=(n=this.player)[s.cmd])===null||a===void 0||a.call(n,s)}}}_initWork(){var e;const i={debug:this.player._opt.debug,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment};this.decoderWorker.postMessage({cmd:ca,opt:JSON.stringify(i),sampleRate:((e=this.player)===null||e===void 0||(e=e.audio)===null||e===void 0||(e=e.audioContext)===null||e===void 0?void 0:e.sampleRate)||0})}decodeVideo(e,i,d){const b={type:yi,ts:Math.max(i,0),isIFrame:d};this.decoderWorker.postMessage({cmd:Nr,buffer:e,options:b},[e.buffer])}decodeAudio(e,i){this.player._opt.useWCS||this.player._opt.useMSE?this._decodeAudioNoDelay(e,i):this._decodeAudio(e,i)}_decodeAudio(e,i){const d={type:Ai,ts:Math.max(i,0)};this.decoderWorker.postMessage({cmd:Nr,buffer:e,options:d},[e.buffer])}_decodeAudioNoDelay(e,i){this.decoderWorker.postMessage({cmd:ua,buffer:e,ts:Math.max(i,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker.postMessage({cmd:pa,key:e.key,value:e.value})}}class Zr extends xi{constructor(e){super(),this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.initInterval()}destroy(){this.stopId&&(clearInterval(this.stopId),this.stopId=null),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.off(),this.player.debug.log("CommonDemux","destroy")}getDelay(e){if(!e)return-1;if(this.firstTimestamp){if(e){const i=Date.now()-this.startTimestamp,d=e-this.firstTimestamp;this.delay=i>=d?i-d:d-i}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}initInterval(){this.player.debug.log("common dumex","init Interval");const e=()=>{let i;const d=this.player._opt.videoBuffer,b=this.player._opt.videoBufferDelay;if(this.bufferList.length)if(this.dropping){for(i=this.bufferList.shift(),i.type===Ai&&i.payload[1]===0&&this._doDecoderDecode(i);!i.isIFrame&&this.bufferList.length;)i=this.bufferList.shift(),i.type===Ai&&i.payload[1]===0&&this._doDecoderDecode(i);i.isIFrame&&this.getDelay(i.ts)<=Math.min(d,200)&&(this.dropping=!1,this._doDecoderDecode(i))}else i=this.bufferList[0],this.getDelay(i.ts)===-1?(this.bufferList.shift(),this._doDecoderDecode(i)):this.delay>d+b?(this.resetDelay(),this.dropping=!0):(i=this.bufferList[0],this.getDelay(i.ts)>d&&(this.bufferList.shift(),this._doDecoderDecode(i)))};e(),this.stopId=setInterval(e,10)}_doDecode(e,i,d,b,l){const p=this.player,t={ts:d,cts:l,type:i,isIFrame:!1};var a,n;if(p._opt.useWCS&&!p._opt.useOffscreen)i===yi&&(t.isIFrame=b),this.pushBuffer(e,t);else if(i===yi)p==null||(a=p.decoderWorker)===null||a===void 0||(n=a.decodeVideo)===null||n===void 0||n.call(a,e,d,b);else if(i===Ai){var s,h;p._opt.hasAudio&&(p==null||(s=p.decoderWorker)===null||s===void 0||(h=s.decodeAudio)===null||h===void 0||h.call(s,e,d))}}_doDecoderDecode(e){const i=this.player;var d,b;e.type===Ai?i._opt.hasAudio&&((d=i.decoderWorker)===null||d===void 0||(b=d.decodeAudio)===null||b===void 0||b.call(d,e.payload,e.ts)):e.type}pushBuffer(e,i){i.type===Ai?this.bufferList.push({ts:i.ts,payload:e,type:Ai}):i.type===yi&&this.bufferList.push({ts:i.ts,cts:i.cts,payload:e,type:yi,isIFrame:i.isIFrame})}close(){}}class Ca extends Zr{constructor(e){super(e),this.input=this._inputFlv(),this.flvDemux=this.dispatchFlvData(this.input),e.debug.log("FlvDemux","init")}destroy(){super.destroy(),this.input=null,this.flvDemux=null,this.player.debug.log("FlvDemux","destroy")}dispatch(e){this.flvDemux(e)}*_inputFlv(){yield 9;const e=new ArrayBuffer(4),i=new Uint8Array(e),d=new Uint32Array(e),b=this.player;for(;;){i[3]=0;const l=yield 15,p=l[4];i[0]=l[7],i[1]=l[6],i[2]=l[5];const t=d[0];i[0]=l[10],i[1]=l[9],i[2]=l[8];let a=d[0];a===16777215&&(i[3]=l[11],a=d[0]);const n=yield t;switch(p){case Aa:b._opt.hasAudio&&(b.updateStats({abps:n.byteLength}),n.byteLength>0&&this._doDecode(n,Ai,a));break;case da:if(b._times.demuxStart||(b._times.demuxStart=Wt()),b._opt.hasVideo){b.updateStats({vbps:n.byteLength});const s=n[0]>>4==1;if(n.byteLength>0){d[0]=n[4],d[1]=n[3],d[2]=n[2],d[3]=0;const h=d[0];this._doDecode(n,yi,a,s,h)}}}}}dispatchFlvData(e){let i=e.next(),d=null;return b=>{let l=new Uint8Array(b);if(d){const p=new Uint8Array(d.length+l.length);p.set(d),p.set(l,d.length),l=p,d=null}for(;l.length>=i.value;){const p=l.slice(i.value);i=e.next(l.slice(0,i.value)),l=p}l.length>0&&(d=l)}}close(){var e,i;(e=this.input)===null||e===void 0||(i=e.return)===null||i===void 0||i.call(e,null)}}class wa extends Zr{constructor(e){super(e),e.debug.log("M7sDemux","init")}destroy(){super.destroy(),this.player.debug.log("M7sDemux","destroy"),this.player=null}dispatch(e){const i=this.player,d=new DataView(e),b=d.getUint8(0),l=d.getUint32(1,!1);switch(b){case Ai:if(i._opt.hasAudio){const p=new Uint8Array(e,5);i.updateStats({abps:p.byteLength}),p.byteLength>0&&this._doDecode(p,b,l)}break;case yi:if(i._opt.hasVideo)if(i._times.demuxStart||(i._times.demuxStart=Wt()),d.byteLength>5){const p=new Uint8Array(e,5),t=d.getUint8(5)>>4==1;i.updateStats({vbps:p.byteLength}),p.byteLength>0&&this._doDecode(p,b,l,t)}else this.player.debug.warn("M7sDemux","dispatch","dv byteLength is",d.byteLength)}}}class Nn{constructor(e){return new(Nn.getLoaderFactory(e._opt.demuxType))(e)}static getLoaderFactory(e){return e===Dr?wa:e===Rn?Ca:void 0}}const Vn=()=>typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,jn=()=>"wakeLock"in navigator;class ka{constructor(e){if(this.player=e,this.enabled=!1,jn()){this._wakeLock=null;const i=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",i),document.addEventListener("fullscreenchange",i)}else Vn()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(e,i,d){const b=document.createElement("source");b.src=d,b.type=`video/${i}`,e.appendChild(b)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;return jn()?navigator.wakeLock.request("screen").then(i=>{this._wakeLock=i,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",()=>{e.log("wakeLock","Wake Lock released.")})}).catch(i=>{throw this.enabled=!1,e.error("wakeLock",`${i.name}, ${i.message}`),i}):Vn()?(this.disable(),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(i=>(this.enabled=!0,i)).catch(i=>{throw this.enabled=!1,i})}disable(){const e=this.player.debug;jn()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Vn()?this.noSleepTimer&&(e.warn("wakeLock","NoSleep now disabled for older iOS devices."),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}var Ta={info:"",log:"background: #4096ff; color: #FFF;",warn:"background: yellow; color: #FFF;",error:"background: red; color: #FFF;"},Jr=function(){function u(i){i===void 0&&(i={}),this._options={level:"INFO",showTime:!1},this._levelNum=3,this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(i)}var e=u.prototype;return e.setOptions=function(i){var d;this._options=Object.assign({},this._options,i),this._levelNum=this._matchLevel((d=this._options.level)!=null?d:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0)},e._matchLevel=function(i){var d=3;switch(i){case"INFO":d=3;break;case"LOG":d=2;break;case"WARN":d=1;break;case"ERROR":d=0}return d},e._loggerFactory=function(i,d){var b=console[i];if(d&&b){var l,p=this._options.name?"%c["+this._options.name+"]%c %c["+i.toUpperCase()+"]":"%c["+i.toUpperCase()+"]",t=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,Ta[i]].filter(function(a){return a!=null});return(l=b).bind.apply(l,[].concat([console,p],t))}return u.noop},e.getOptions=function(){return this._options},e.getVersion=function(){return"1.0.1"},u}();function Ri(u){return(u=+u)<10&&(u="0"+u),u+""}Jr.noop=function(){};var La=["info","log","warn","error"];function Ba(u){var e=new Jr(u);return new Proxy(e,{get:function(i,d){if(La.includes(d)){var b;if((b=i._options)!=null&&b.showTime){var l=(t=(p=new Date(Date.now())).getFullYear(),a=p.getMonth()+1,n=p.getDate(),s=p.getHours(),h=p.getMinutes(),E=p.getSeconds(),v=p.getMilliseconds(),t+"/"+Ri(a)+"/"+Ri(n)+" "+Ri(s)+":"+Ri(h)+":"+Ri(E)+":"+v);return i[d].bind(console,"["+l+"]")}return i[d].bind(console)}var p,t,a,n,s,h,E,v;return Reflect.get(i,d)}})}class Ia{constructor(e){this.master=e,this.logger=new Ba({name:"FLV",showTime:!0})}info(e,...i){this._setLogger()>=4&&this.logger.log(e,...i)}log(e,...i){this._setLogger()>=3&&this.logger.log(e,...i)}warn(e,...i){this._setLogger()>=2&&this.logger.warn(e,...i)}error(e,...i){this.logger.error(e,...i)}_setLogger(){var e,i,d,b,l;return this.master._opt.debug&&(!((e=this.master._opt.loggerOptions)===null||e===void 0)&&e.level)?((i=this.master._opt.loggerOptions)===null||i===void 0?void 0:i.level)==="INFO"?4:((d=this.master._opt.loggerOptions)===null||d===void 0?void 0:d.level)==="LOG"?3:((b=this.master._opt.loggerOptions)===null||b===void 0?void 0:b.level)==="WARN"?2:((l=this.master._opt.loggerOptions)===null||l===void 0?void 0:l.level)==="ERROR"?1:5:-1}}class Gn{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,i,d){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!e)return;if(Array.isArray(i))return i.map(p=>this.proxy(e,p,d,b));e.addEventListener(i,d,b);const l=()=>e.removeEventListener(i,d,b);return this.destroys.push(l),l}destroy(){var e;(e=this.master.debug)===null||e===void 0||e.log("Events","destroy"),this.destroys.forEach(i=>i())}}var Oa=u=>{const{events:{proxy:e}}=u,i=document.createElement("object");i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1"),i.type="text/html",i.data="about:blank",zr(i,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let d=u.width,b=u.height;e(i,"load",()=>{var l;e((l=i.contentDocument)===null||l===void 0?void 0:l.defaultView,"resize",()=>{u.width===d&&u.height===b||(d=u.width,b=u.height,u.emit(te.resize))})}),u.$container.appendChild(i),u.on(te.destroy,()=>{u.$container.removeChild(i)})};class xa{constructor(e){this.player=e,Oa(e)}}class eo extends xi{constructor(e,i,d){var b;super(),this.$container=e,this._opt=i,this.debug=new Ia(this),this._muted=i.muted,this._volume=i.volume||.8,this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._checkHeartTimeout=null,this._checkStatsInterval=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0},this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,b=this,Object.defineProperty(b,"rect",{get:()=>b.$container.getBoundingClientRect()}),["bottom","height","left","right","top","width"].forEach(l=>{Object.defineProperty(b,l,{get:()=>b.rect[l]})}),this.events=new Gn(this),this.video=new d(this),(l=>{l.on(te.decoderWorkerInit,()=>{l.debug.log("player","has loaded"),l.loaded=!0}),l.on(te.play,()=>{l.loading=!1}),l.on(te.resize,()=>{var t;(t=l.video)===null||t===void 0||t.resize()});const p=[te.timeUpdate];Object.keys(te).forEach(t=>{l.on(te[t],a=>{p.includes(t)||(typeof a!="object"||Object.prototype.toString.call(a)!=="[object Object]"?l.debug.log("player events",te[t],a):l.debug.log("player events",te[t],JSON.stringify(a)))})}),Object.keys(vt).forEach(t=>{l.on(vt[t],a=>{l.debug.log("player event error",vt[t],a)})})})(this),(l=>{const{_opt:p,debug:t,events:{proxy:a}}=l;a(document,"visibilitychange",()=>{p.hiddenAutoPause&&(t.log("visibilitychange",document.visibilityState,l._isPlayingBeforePageHidden),document.visibilityState==="visible"?l._isPlayingBeforePageHidden&&l.play():(l._isPlayingBeforePageHidden=l.playing,l.playing&&l.pause()))}),a(window,"fullscreenchange",()=>{l.keepScreenOn!==null&&document.visibilityState==="visible"&&l.enableWakeLock&&l.enableWakeLock()})})(this),this._fullscreen=!1,this.control=new xa(this)}get muted(){return this._muted}set muted(e){this._updateMuted(e)}_updateMuted(e){this._muted!==e&&(this._muted=e,this.emit(te.volumechange,this.volume,e))}get volume(){return this._volume}set volume(e){this._updateVolume(e)}_updateVolume(e){e>=0&&e<=1&&this._volume!==e&&(this.emit(te.volumechange,e,this._muted),this._volume=e)}destroy(){this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._volume=null,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.video&&(this.video.destroy(),this.video=null),this.events&&(this.events.destroy(),this.events=null),this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}updateOption(e){this._opt=Object.assign({},this._opt,e)}resize(){this.video.resize()}}var Ei,qt,Ht,to,Ra=(Ei=typeof self<"u"?self:window,qt={navigator:Ei.navigator!==void 0?Ei.navigator:{userAgent:""},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Ht={getMatchMap:function(u){return{Trident:u.indexOf("Trident")>-1||u.indexOf("NET CLR")>-1,Presto:u.indexOf("Presto")>-1,WebKit:u.indexOf("AppleWebKit")>-1,Gecko:u.indexOf("Gecko/")>-1,Safari:u.indexOf("Safari")>-1,Chrome:u.indexOf("Chrome")>-1||u.indexOf("CriOS")>-1,IE:u.indexOf("MSIE")>-1||u.indexOf("Trident")>-1,Edge:u.indexOf("Edge")>-1,Firefox:u.indexOf("Firefox")>-1||u.indexOf("FxiOS")>-1,"Firefox Focus":u.indexOf("Focus")>-1,Chromium:u.indexOf("Chromium")>-1,Opera:u.indexOf("Opera")>-1||u.indexOf("OPR")>-1,Vivaldi:u.indexOf("Vivaldi")>-1,Yandex:u.indexOf("YaBrowser")>-1,Arora:u.indexOf("Arora")>-1,Lunascape:u.indexOf("Lunascape")>-1,QupZilla:u.indexOf("QupZilla")>-1,"Coc Coc":u.indexOf("coc_coc_browser")>-1,Kindle:u.indexOf("Kindle")>-1||u.indexOf("Silk/")>-1,Iceweasel:u.indexOf("Iceweasel")>-1,Konqueror:u.indexOf("Konqueror")>-1,Iceape:u.indexOf("Iceape")>-1,SeaMonkey:u.indexOf("SeaMonkey")>-1,Epiphany:u.indexOf("Epiphany")>-1,360:u.indexOf("QihooBrowser")>-1||u.indexOf("QHBrowser")>-1,"360EE":u.indexOf("360EE")>-1,"360SE":u.indexOf("360SE")>-1,UC:u.indexOf("UC")>-1||u.indexOf(" UBrowser")>-1,QQBrowser:u.indexOf("QQBrowser")>-1,QQ:u.indexOf("QQ/")>-1,Baidu:u.indexOf("Baidu")>-1||u.indexOf("BIDUBrowser")>-1,Maxthon:u.indexOf("Maxthon")>-1,Sogou:u.indexOf("MetaSr")>-1||u.indexOf("Sogou")>-1,LBBROWSER:u.indexOf("LBBROWSER")>-1,"2345Explorer":u.indexOf("2345Explorer")>-1,TheWorld:u.indexOf("TheWorld")>-1,XiaoMi:u.indexOf("MiuiBrowser")>-1,Quark:u.indexOf("Quark")>-1,Qiyu:u.indexOf("Qiyu")>-1,Wechat:u.indexOf("MicroMessenger")>-1,Taobao:u.indexOf("AliApp(TB")>-1,Alipay:u.indexOf("AliApp(AP")>-1,Weibo:u.indexOf("Weibo")>-1,Douban:u.indexOf("com.douban.frodo")>-1,Suning:u.indexOf("SNEBUY-APP")>-1,iQiYi:u.indexOf("IqiyiApp")>-1,Windows:u.indexOf("Windows")>-1,Linux:u.indexOf("Linux")>-1||u.indexOf("X11")>-1,"Mac OS":u.indexOf("Macintosh")>-1,Android:u.indexOf("Android")>-1||u.indexOf("Adr")>-1,Ubuntu:u.indexOf("Ubuntu")>-1,FreeBSD:u.indexOf("FreeBSD")>-1,Debian:u.indexOf("Debian")>-1,"Windows Phone":u.indexOf("IEMobile")>-1||u.indexOf("Windows Phone")>-1,BlackBerry:u.indexOf("BlackBerry")>-1||u.indexOf("RIM")>-1,MeeGo:u.indexOf("MeeGo")>-1,Symbian:u.indexOf("Symbian")>-1,iOS:u.indexOf("like Mac OS X")>-1,"Chrome OS":u.indexOf("CrOS")>-1,WebOS:u.indexOf("hpwOS")>-1,Mobile:u.indexOf("Mobi")>-1||u.indexOf("iPh")>-1||u.indexOf("480")>-1,Tablet:u.indexOf("Tablet")>-1||u.indexOf("Nexus 7")>-1,iPad:u.indexOf("iPad")>-1}},matchInfoMap:function(u){var e,i=((e=qt.navigator)==null?void 0:e.userAgent)||"",d=Ht.getMatchMap(i);for(var b in qt.infoMap)for(var l=0;l36&&Ei.showModalDialog?b=!0:+l>45&&(b=i("type","application/vnd.chromium.remoting-viewer"))}if(d.Baidu&&d.Opera&&(d.Baidu=!1),d.Mobile&&(d.Mobile=!e.includes("iPad")),b&&(i("type","application/gameplugin")||qt.navigator&&qt.navigator.connection.saveData===void 0?d["360SE"]=!0:d["360EE"]=!0),d.IE||d.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 105:break;case 102:d["360EE"]=!0;break;case 104:d["360SE"]=!0}var p={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return e.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return e.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return e.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return e.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return e.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return e.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return e.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return e.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return e.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return e.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){return{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[+navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return u.browserVersion="",p[u.browser]&&(u.browserVersion=p[u.browser](),u.browserVersion==e&&(u.browserVersion="")),u.browser=="Edge"&&(u.engine="EdgeHTML"),u.browser=="Chrome"&&parseInt(u.browserVersion)>27&&(u.engine="Blink"),u.browser=="Opera"&&parseInt(u.browserVersion)>12&&(u.engine="Blink"),u.browser=="Yandex"&&(u.engine="Blink"),u.browser+" (version: "+u.browserVersion+"; kernel: "+u.engine+")"}},to={DeviceInfoObj:function(u){var e,i=function(p){var t;(t=u.info)==null||t.forEach(function(a){a.toLowerCase()===p.toLowerCase()&&(b[p]=d[p])})};u=u||{domain:""};var d={deviceType:Ht.getDeviceType(),OS:Ht.getOS(),OSVersion:Ht.getOSVersion(),sh:Ei.screen.height,sw:Ei.screen.width,lang:Ht.getLanguage(),netWork:Ht.getNetwork(),orientation:Ht.getOrientationStatu(),browserInfo:Ht.getBrowserInfo(),fingerprint:Ht.createFingerprint(u.domain),userAgent:(e=qt.navigator)==null?void 0:e.userAgent};if(!u.info||u.info.length===0)return d;var b={};for(var l in d)i(l);return b}},{getDeviceInfo:function(u){return to.DeviceInfoObj(u)}}),ki=function(){function u(){}return u.add=function(e,i){u.queues.push({url:e,data:i})},u.fire=function(){if(u.queues&&u.queues.length!==0){u.isStop=!1;var e=u.queues[0];e.url&&u.api.report(e.data),u.queues.splice(0,1),u.fire()}else u.isStop=!0},u}();ki.isStop=!0,ki.queues=[];var Da=function(){function u(i){this.url=i}var e=u.prototype;return e.report=function(i){this.checkUrl(this.url)&&this.sendInfo(i)},e.sendInfo=function(i){navigator.sendBeacon?this.sendBeacon(this.url,i):this.sendImage(this.url,i)},e.sendImage=function(i,d){var b=this.changeJSON2Query(d),l=new Image;l.onload=l.onerror=function(){l=null},l.src=i+"?"+b+"&random="+Math.random()},e.sendBeacon=function(i,d){try{navigator.sendBeacon(i,this.formatParamsByURLSearchParams(d))}catch{}},e.formatParamsByURLSearchParams=function(i){var d=new URLSearchParams;for(var b in i)typeof i[b]=="object"&&(i[b]=JSON.stringify(i[b])),d.append(b,i[b]);return d},e.changeJSON2Query=function(i){var d="";for(var b in i){d!=""&&(d+="&");var l=i[b];d+=b+"="+encodeURIComponent(typeof l=="object"?JSON.stringify(l):l)}return d},e.checkUrl=function(i){return!!i&&/^[hH][tT][tT][pP]([sS]?):\/\//.test(i)},u}();function Di(){return Di=Object.assign||function(u){for(var e=1;e0&&l[0]&&l[1]&&l[2]&&(d.serial=l[0],d.no=l[1],d.bitstream=l[2])}catch{}return d}return{}}class at{static initMonitor(e){at.collect=new Ma({forbidden:e,url:"https://log.ys7.com/statistics.do/opensdk_ezuikit",jsError:!1,promiseError:!1,resourceError:!1,extendsInfo:{protocol:"flv",v:"2.0.2"}})}static report(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};at.collect||at.initMonitor();try{const d=io(at.url);at.collect.send({url:at.url,serial:d.serial,no:d.no,action:e,logInfo:i})}catch{}}}class Pa extends eo{constructor(e,i){super(e,i,ba),this._opt.useMSE=!1,this._loadingTimeoutDelayTimer=null,this._opt.hasAudio&&(this.audio=new zi(this)),this.decoderWorker=new Xr(this),this.stream=null,this.demux=null,this._muted=this._opt.muted,Wr()&&(this.keepScreenOn=new ka(this)),this._enableSoundOnUserInteraction=this._enableSoundOnUserInteraction.bind(this),window.addEventListener("click",this._enableSoundOnUserInteraction),window.addEventListener("pointerdown",this._enableSoundOnUserInteraction),window.addEventListener("touchstart",this._enableSoundOnUserInteraction),window.addEventListener("keydown",this._enableSoundOnUserInteraction),document.body.addEventListener("click",this._enableSoundOnUserInteraction),document.body.addEventListener("pointerdown",this._enableSoundOnUserInteraction),document.body.addEventListener("touchstart",this._enableSoundOnUserInteraction),document.body.addEventListener("keydown",this._enableSoundOnUserInteraction),this.on(te.audioInfo,d=>{var b;d.encType&&!this.muted&&(!((b=this.audio)===null||b===void 0)&&b.isStateRunning())&&setTimeout(()=>{var l,p;(p=(l=this.audio).audioEnabled)===null||p===void 0||p.call(l,!0)},100)})}destroy(){var e,i,d,b,l,p;this._loading=!1,this._playing=!1,this._hasLoaded=!1,this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.audio&&((i=(e=this.audio).destroy)===null||i===void 0||i.call(e),this.audio=null),this.stream&&((b=(d=this.stream).destroy)===null||b===void 0||b.call(d),this.stream=null),this.demux&&((p=(l=this.demux)===null||l===void 0?void 0:l.destroy)===null||p===void 0||p.call(l),this.demux=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.releaseWakeLock(),this.keepScreenOn=null,this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,window.removeEventListener("click",this._enableSoundOnUserInteraction),window.removeEventListener("pointerdown",this._enableSoundOnUserInteraction),window.removeEventListener("touchstart",this._enableSoundOnUserInteraction),window.removeEventListener("keydown",this._enableSoundOnUserInteraction),document.body.removeEventListener("click",this._enableSoundOnUserInteraction),document.body.removeEventListener("pointerdown",this._enableSoundOnUserInteraction),document.body.removeEventListener("touchstart",this._enableSoundOnUserInteraction),document.body.removeEventListener("keydown",this._enableSoundOnUserInteraction),super.destroy()}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(te.playing,e),this.emit(te.volumechange,this.volume,this.muted),e?this.emit(te.play):this.emit(te.pause))}get playing(){return this._playing}get muted(){return this._muted}set muted(e){this.audio&&(this.audio.muted=e),super._updateMuted(e)}get volume(){return this._volume}set volume(e){this.audio&&(this.audio.volume=e),super._updateVolume(e)}set loading(e){this.loading!==e&&(this._loading=e,this.emit(te.loading,this._loading),e||this.emit(te.loaded))}get loading(){return this._loading}set audioTimestamp(e){e!==null&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){e!==null&&(this._videoTimestamp=e,this._opt.useWCS||this._opt.useMSE||this.audioTimestamp&&this.videoTimestamp&&this.audio&&this.audio.emit(te.videoSyncAudio,{audioTimestamp:this.audioTimestamp,videoTimestamp:this.videoTimestamp,diff:this.audioTimestamp-this.videoTimestamp}))}get videoTimestamp(){return this._videoTimestamp}get isDebug(){return this._opt.debug===!0}_init(){return new Promise((e,i)=>{this.stream||(this.stream=new Fn(this)),this.audio||this._opt.hasAudio&&(this.audio=new zi(this)),this.demux||(this.demux=new Nn(this)),this.decoderWorker?e():(this.decoderWorker=new Xr(this),this.once(te.decoderWorkerInit,()=>{e()}))})}play(e){return this._opt=Object.assign({},this._opt,e||{}),this.clearCheckHeartTimeout(),new Promise((i,d)=>{if(!this._opt.url)return d();this.loading=!0,this.playing=!1,this._times.playInitStart=Wt(),this._init().then(()=>{this._times.playStart=Wt(),this._opt.muted||(this.muted=!1),this.enableWakeLock();try{this.stream.fetchStream(this._opt.url,this._opt)}catch{}this.checkLoadingTimeout(),this.stream.once(te.streamError,b=>{this.stream&&(this.stream.destroy(),this.stream=null),this.clearCheckLoadingTimeout(),this.emit(te.streamError,b),this.emit(te.delayTimeout,b),d(b)}),this.stream.once(te.streamEnd,()=>{d()}),this.stream.once(te.streamSuccess,()=>{this.clearCheckLoadingTimeout(),this.emit(te.streamSuccess),i(),this._times.streamResponse=Wt(),this.video.play(),this.checkStatsInterval()})}).catch(b=>{d(b)}),this._resumeAudioAfterPause()})}close(){return new Promise(e=>{this._close().then(()=>{var i,d;(d=(i=this.video)===null||i===void 0?void 0:i.clearView)===null||d===void 0||d.call(i),e()})})}_resumeAudioAfterPause(){this._volume&&(this.volume=this._volume)}_close(){return new Promise(e=>{var i,d;this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this.stream&&(this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.audio&&((d=(i=this.audio).pause)===null||d===void 0||d.call(i)),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.playing=!1,this.loading=!1,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},setTimeout(()=>{e()},0)})}pause(e=!1){return e?this.close():this._close()}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}checkHeartTimeout(){var e;this._opt.heartTimeout!==0&&(this._checkHeartTimeout=setTimeout(()=>{if(this._checkHeartTimeout&&this.clearCheckHeartTimeout(),this.playing){if(this._stats.fps!==0)return;this.pause().then(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)})}},1e3*(((e=this._opt)===null||e===void 0?void 0:e.heartTimeout)||5)))}checkStatsInterval(){this._checkStatsInterval=setInterval(()=>{this.updateStats()},1e3)}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkLoadingTimeout(){this._opt.loadingTimeout!==0&&(this._checkLoadingTimeout=setTimeout(()=>{this.playing||(this.clearCheckLoadingTimeout(),this.pause().then(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)}).catch(()=>{}))},1e3*this._opt.loadingTimeout))}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.loading&&(this.emit(te.start),this.loading=!1),this.clearCheckLoadingTimeout(),this.playing||(this.playing=!0),this.checkHeart()}updateStats(e){e=e||{},this._startBpsTime||(this._startBpsTime=Wt()),Pn(e.ts)&&(this._stats.ts=e.ts),Pn(e.buf)&&(this._stats.buf=e.buf),e.fps&&(this._stats.fps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps);const i=Wt();i-this._startBpsTime<1e3||(this.emit(te.stats,this._stats),this._stats.fps=0,this._stats.abps=0,this._stats.vbps=0,this._startBpsTime=i)}resetStats(){this._startBpsTime=null,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}handlePlayToRenderTimes(){const e=this._times;e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart,e.demuxTimestamp=e.demuxStart-e.streamResponse,e.decodeTimestamp=e.decodeStart-e.demuxStart,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,this.emit(te.playToRenderTimes,e)}getOption(){return this._opt}emitError(e,i=""){at.report(51,{event:e,value:i}),this.emit(te.error,e,i),this.emit(e,i)}_enableSoundOnUserInteraction(){var e,i,d;this.muted||!((e=this.audio)===null||e===void 0)&&e.isStateSuspended()&&((d=(i=this.audio).audioEnabled)===null||d===void 0||d.call(i,!0))}}var no,ro={exports:{}},kt=(no||(no=1,function(u,e){(function(i,d){u.exports=d()})(self,()=>(()=>{var i={62:(l,p,t)=>{var a=t(1465)("span").classList,n=a&&a.constructor&&a.constructor.prototype;l.exports=n===Object.prototype?void 0:n},63:(l,p,t)=>{var a=t(4152);l.exports=function(n){return a(n)||n===null}},115:(l,p,t)=>{var a=t(815),n=t(4152),s=t(5727),h=t(452),E=t(6908),v=t(7553),S=TypeError,B=v("toPrimitive");l.exports=function(x,P){if(!n(x)||s(x))return x;var M,F=h(x,B);if(F){if(P===void 0&&(P="default"),M=a(F,x,P),!n(M)||s(M))return M;throw new S("Can't convert object to primitive value")}return P===void 0&&(P="number"),E(x,P)}},219:(l,p,t)=>{var a=t(2719),n=t(7024),s=t(256),h=function(E){return function(v,S,B){var x=a(v),P=s(x);if(P===0)return!E&&-1;var M,F=n(B,P);if(E&&S!=S){for(;P>F;)if((M=x[F++])!=M)return!0}else for(;P>F;F++)if((E||F in x)&&x[F]===S)return E||F||0;return!E&&-1}};l.exports={includes:h(!0),indexOf:h(!1)}},256:(l,p,t)=>{var a=t(2420);l.exports=function(n){return a(n.length)}},279:(l,p,t)=>{var a=t(815),n=t(5736),s=t(7749),h=t(4985),E=t(9273),v=TypeError;l.exports=function(S,B){var x=arguments.length<2?E(S):B;if(n(x))return s(a(x,S));throw new v(h(S)+" is not iterable")}},309:(l,p,t)=>{var a=t(9922),n=t(497);l.exports=a?{}.toString:function(){return"[object "+n(this)+"]"}},452:(l,p,t)=>{var a=t(5736),n=t(5599);l.exports=function(s,h){var E=s[h];return n(E)?void 0:a(E)}},458:(l,p,t)=>{var a=t(526),n=t(6458);l.exports=function(s){if(a(s)==="Function")return n(s)}},497:(l,p,t)=>{var a=t(9922),n=t(9211),s=t(526),h=t(7553)("toStringTag"),E=Object,v=s(function(){return arguments}())==="Arguments";l.exports=a?s:function(S){var B,x,P;return S===void 0?"Undefined":S===null?"Null":typeof(x=function(M,F){try{return M[F]}catch{}}(B=E(S),h))=="string"?x:v?s(B):(P=s(B))==="Object"&&n(B.callee)?"Arguments":P}},526:(l,p,t)=>{var a=t(6458),n=a({}.toString),s=a("".slice);l.exports=function(h){return s(n(h),8,-1)}},550:(l,p,t)=>{t.d(p,{A:()=>a});const a={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},577:(l,p,t)=>{var a=t(3463),n=t(1002),s=a("keys");l.exports=function(h){return s[h]||(s[h]=n(h))}},594:l=>{var p=TypeError;l.exports=function(t,a){if(t{var a=t(7553);p.f=a},648:(l,p,t)=>{t(2578),t(4579);var a=t(9364),n=t(1562),s=t(2363),h=t(5057),E=t(815),v=t(6458),S=t(9646),B=t(6666),x=t(3930),P=t(1176),M=t(8873),F=t(1541),G=t(7712),K=t(3587),H=t(2757),Z=t(9211),ie=t(4347),T=t(7042),m=t(497),g=t(7749),f=t(4152),O=t(6677),j=t(6122),Q=t(6330),ee=t(279),ue=t(9273),fe=t(1567),me=t(594),ge=t(7553),Oe=t(986),Ee=ge("iterator"),Be="URLSearchParams",De=Be+"Iterator",nt=K.set,Ke=K.getterFor(Be),We=K.getterFor(De),Me=s("fetch"),W=s("Request"),L=s("Headers"),U=W&&W.prototype,V=L&&L.prototype,X=n.TypeError,J=n.encodeURIComponent,le=String.fromCharCode,ce=h("String","fromCodePoint"),ye=parseInt,ae=v("".charAt),Ce=v([].join),pe=v([].push),Re=v("".replace),Et=v([].shift),ct=v([].splice),Se=v("".split),Ye=v("".slice),rt=v(/./.exec),zt=/\+/g,Je=/^[0-9a-f]+$/i,st=function(he,Te){var Ie=Ye(he,Te,Te+2);return rt(Je,Ie)?ye(Ie,16):NaN},bt=function(he){for(var Te=0,Ie=128;Ie>0&&he&Ie;Ie>>=1)Te++;return Te},Tt=function(he){var Te=null;switch(he.length){case 1:Te=he[0];break;case 2:Te=(31&he[0])<<6|63&he[1];break;case 3:Te=(15&he[0])<<12|(63&he[1])<<6|63&he[2];break;case 4:Te=(7&he[0])<<18|(63&he[1])<<12|(63&he[2])<<6|63&he[3]}return Te>1114111?null:Te},gt=function(he){for(var Te=(he=Re(he,zt," ")).length,Ie="",xe=0;xeTe){Ie+="%",xe++;continue}var it=st(he,xe+1);if(it!=it){Ie+=ze,xe++;continue}xe+=2;var ht=bt(it);if(ht===0)ze=le(it);else{if(ht===1||ht>4){Ie+="�",xe++;continue}for(var lt=[it],Rt=1;RtTe||ae(he,xe)!=="%");){var St=st(he,xe+1);if(St!=St){xe+=3;break}if(St>191||St<128)break;pe(lt,St),xe+=2,Rt++}if(lt.length!==ht){Ie+="�";continue}var jt=Tt(lt);jt===null?Ie+="�":ze=ce(jt)}}Ie+=ze,xe++}return Ie},Vt=/[!'()~]|%20/g,xt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pt=function(he){return xt[he]},Kt=function(he){return Re(J(he),Vt,Pt)},ti=G(function(he,Te){nt(this,{type:De,target:Ke(he).entries,index:0,kind:Te})},Be,function(){var he=We(this),Te=he.target,Ie=he.index++;if(!Te||Ie>=Te.length)return he.target=null,fe(void 0,!0);var xe=Te[Ie];switch(he.kind){case"keys":return fe(xe.key,!1);case"values":return fe(xe.value,!1)}return fe([xe.key,xe.value],!1)},!0),$e=function(he){this.entries=[],this.url=null,he!==void 0&&(f(he)?this.parseObject(he):this.parseQuery(typeof he=="string"?ae(he,0)==="?"?Ye(he,1):he:O(he)))};$e.prototype={type:Be,bindURL:function(he){this.url=he,this.update()},parseObject:function(he){var Te,Ie,xe,ze,it,ht,lt,Rt=this.entries,St=ue(he);if(St)for(Ie=(Te=ee(he,St)).next;!(xe=E(Ie,Te)).done;){if(it=(ze=ee(g(xe.value))).next,(ht=E(it,ze)).done||(lt=E(it,ze)).done||!E(it,ze).done)throw new X("Expected sequence with length 2");pe(Rt,{key:O(ht.value),value:O(lt.value)})}else for(var jt in he)ie(he,jt)&&pe(Rt,{key:jt,value:O(he[jt])})},parseQuery:function(he){if(he)for(var Te,Ie,xe=this.entries,ze=Se(he,"&"),it=0;it0?arguments[0]:void 0));S||(this.size=he.entries.length)},Fe=Ue.prototype;if(M(Fe,{append:function(he,Te){var Ie=Ke(this);me(arguments.length,2),pe(Ie.entries,{key:O(he),value:O(Te)}),S||this.length++,Ie.updateURL()},delete:function(he){for(var Te=Ke(this),Ie=me(arguments.length,1),xe=Te.entries,ze=O(he),it=Ie<2?void 0:arguments[1],ht=it===void 0?it:O(it),lt=0;ltIe.key?1:-1}),he.updateURL()},forEach:function(he){for(var Te,Ie=Ke(this).entries,xe=T(he,arguments.length>1?arguments[1]:void 0),ze=0;ze1?si(arguments[1]):{})}}),Z(W)){var Xt=function(he){return H(this,U),new W(he,arguments.length>1?si(arguments[1]):{})};U.constructor=Xt,Xt.prototype=U,a({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Xt})}}l.exports={URLSearchParams:Ue,getState:Ke}},719:(l,p,t)=>{t.d(p,{A:()=>a});const a=function(){function n(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return n.prototype.isComplete=function(){return!this.hasAudio||this.hasAudio&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount,!this.hasVideo||this.hasVideo&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen,this.mimeType!=null},n.prototype.isSeekable=function(){return this.hasKeyframesIndex},n.prototype.getNearestKeyframe=function(s){if(this.keyframesIndex==null)return null;var h=this.keyframesIndex,E=this._search(h.times,s);return{index:E,milliseconds:h.times[E],fileposition:h.filepositions[E]}},n.prototype._search=function(s,h){var E=0,v=s.length-1,S=0,B=0,x=v;for(h=s[S]&&h{var a=t(9364),n=t(815);a({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}})},775:(l,p,t)=>{var a=t(9845),n=t(1562),s=t(4191),h="__core-js_shared__",E=l.exports=n[h]||s(h,{});(E.versions||(E.versions=[])).push({version:"3.40.0",mode:a?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"})},778:(l,p,t)=>{t(4220)},804:(l,p,t)=>{var a=t(9364),n=t(5057),s=t(4347),h=t(6677),E=t(3463),v=t(9266),S=E("string-to-symbol-registry"),B=E("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!v},{for:function(x){var P=h(x);if(s(S,P))return S[P];var M=n("Symbol")(P);return S[P]=M,B[M]=P,M}})},815:(l,p,t)=>{var a=t(6898),n=Function.prototype.call;l.exports=a?n.bind(n):function(){return n.apply(n,arguments)}},834:(l,p,t)=>{t(6383)},947:(l,p,t)=>{var a=t(9364),n=t(7917),s=t(2809),h=t(7819),E=t(9083);a({target:"Object",stat:!0,forced:!n||s(function(){h.f(1)})},{getOwnPropertySymbols:function(v){var S=h.f;return S?S(E(v)):[]}})},986:(l,p,t)=>{var a=t(8626),n=Math.floor,s=function(h,E){var v=h.length;if(v<8)for(var S,B,x=1;x0;)h[B]=h[--B];B!==x++&&(h[B]=S)}else for(var P=n(v/2),M=s(a(h,0,P),E),F=s(a(h,P),E),G=M.length,K=F.length,H=0,Z=0;H{var a=t(6458),n=0,s=Math.random(),h=a(1 .toString);l.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+h(++n+s,36)}},1031:(l,p,t)=>{var a=t(7553),n=t(6122),s=t(3643).f,h=a("unscopables"),E=Array.prototype;E[h]===void 0&&s(E,h,{configurable:!0,value:n(null)}),l.exports=function(v){E[h][v]=!0}},1068:(l,p,t)=>{var a=t(63),n=String,s=TypeError;l.exports=function(h){if(a(h))return h;throw new s("Can't set "+n(h)+" as a prototype")}},1144:(l,p,t)=>{var a=t(815),n=t(4347),s=t(9615),h=t(7677),E=RegExp.prototype;l.exports=function(v){var S=v.flags;return S!==void 0||"flags"in E||n(v,"flags")||!s(E,v)?S:a(h,v)}},1147:(l,p,t)=>{var a,n,s,h=t(2809),E=t(9211),v=t(4152),S=t(6122),B=t(8125),x=t(3930),P=t(7553),M=t(9845),F=P("iterator"),G=!1;[].keys&&("next"in(s=[].keys())?(n=B(B(s)))!==Object.prototype&&(a=n):G=!0),!v(a)||h(function(){var K={};return a[F].call(K)!==K})?a={}:M&&(a=S(a)),E(a[F])||x(a,F,function(){return this}),l.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:G}},1176:(l,p,t)=>{var a=t(4233),n=t(3643);l.exports=function(s,h,E){return E.get&&a(E.get,h,{getter:!0}),E.set&&a(E.set,h,{setter:!0}),n.f(s,h,E)}},1209:(l,p,t)=>{var a=t(5057),n=t(6458),s=t(2630),h=t(7819),E=t(7749),v=n([].concat);l.exports=a("Reflect","ownKeys")||function(S){var B=s.f(E(S)),x=h.f;return x?v(B,x(S)):B}},1432:(l,p,t)=>{var a=t(6458),n=t(5736);l.exports=function(s,h,E){try{return a(n(Object.getOwnPropertyDescriptor(s,h)[E]))}catch{}}},1454:(l,p,t)=>{t(648)},1464:(l,p,t)=>{var a=t(9364),n=t(4979).map;a({target:"Array",proto:!0,forced:!t(8611)("map")},{map:function(s){return n(this,s,arguments.length>1?arguments[1]:void 0)}})},1465:(l,p,t)=>{var a=t(1562),n=t(4152),s=a.document,h=n(s)&&n(s.createElement);l.exports=function(E){return h?s.createElement(E):{}}},1541:(l,p,t)=>{var a=t(3643).f,n=t(4347),s=t(7553)("toStringTag");l.exports=function(h,E,v){h&&!v&&(h=h.prototype),h&&!n(h,s)&&a(h,s,{configurable:!0,value:E})}},1562:function(l){var p=function(t){return t&&t.Math===Math&&t};l.exports=p(typeof globalThis=="object"&&globalThis)||p(typeof window=="object"&&window)||p(typeof self=="object"&&self)||p(typeof Ut=="object"&&Ut)||p(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},1567:l=>{l.exports=function(p,t){return{value:p,done:t}}},1684:(l,p,t)=>{var a=t(5736),n=t(9083),s=t(5273),h=t(256),E=TypeError,v="Reduce of empty array with no initial value",S=function(B){return function(x,P,M,F){var G=n(x),K=s(G),H=h(G);if(a(P),H===0&&M<2)throw new E(v);var Z=B?H-1:0,ie=B?-1:1;if(M<2)for(;;){if(Z in K){F=K[Z],Z+=ie;break}if(Z+=ie,B?Z<0:H<=Z)throw new E(v)}for(;B?Z>=0:H>Z;Z+=ie)Z in K&&(F=P(F,K[Z],Z,G));return F}};l.exports={left:S(!1),right:S(!0)}},1766:(l,p,t)=>{var a=t(9364),n=t(4347),s=t(5727),h=t(4985),E=t(3463),v=t(9266),S=E("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!v},{keyFor:function(B){if(!s(B))throw new TypeError(h(B)+" is not a symbol");if(n(S,B))return S[B]}})},1900:(l,p,t)=>{l.exports=t(2632).default},1951:(l,p,t)=>{t.d(p,{$_:()=>a,EX:()=>s,EZ:()=>n,Sc:()=>h});var a=function(E,v,S,B,x){this.dts=E,this.pts=v,this.duration=S,this.originalDts=B,this.isSyncPoint=x,this.fileposition=null},n=function(){function E(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return E.prototype.appendSyncPoint=function(v){v.isSyncPoint=!0,this.syncPoints.push(v)},E}(),s=function(){function E(){this._list=[]}return E.prototype.clear=function(){this._list=[]},E.prototype.appendArray=function(v){var S=this._list;v.length!==0&&(S.length>0&&v[0].originalDts=S[P].dts&&v(((S=B[P].lastSample)===null||S===void 0?void 0:S.originalDts)||0)&&v=(((B=(S=x[M])===null||S===void 0?void 0:S.lastSample)===null||B===void 0?void 0:B.originalDts)||0)&&(M===x.length-1||M0&&(F=this._searchNearestSegmentBefore(P.originalBeginDts)+1),this._lastAppendLocation=F,this._list.splice(F,0,P)},E.prototype.getLastSegmentBefore=function(v){var S=this._searchNearestSegmentBefore(v);return S>=0?this._list[S]:null},E.prototype.getLastSampleBefore=function(v){var S=this.getLastSegmentBefore(v);return S!=null?S.lastSample:null},E.prototype.getLastSyncPointBefore=function(v){for(var S=this._searchNearestSegmentBefore(v),B=this._list[S].syncPoints;B.length===0&&S>0;)S--,B=this._list[S].syncPoints;return B.length>0?B[B.length-1]:null},E}()},2139:(l,p,t)=>{t.d(p,{A:()=>a});const a=t(5307)},2250:(l,p,t)=>{var a=t(6458),n=t(3930),s=Date.prototype,h="Invalid Date",E="toString",v=a(s[E]),S=a(s.getTime);String(new Date(NaN))!==h&&n(s,E,function(){var B=S(this);return B==B?v(this):h})},2327:l=>{l.exports={}},2363:(l,p,t)=>{var a=t(1562),n=t(9646),s=Object.getOwnPropertyDescriptor;l.exports=function(h){if(!n)return a[h];var E=s(a,h);return E&&E.value}},2377:(l,p,t)=>{var a=t(4979).forEach,n=t(5888)("forEach");l.exports=n?[].forEach:function(s){return a(this,s,arguments.length>1?arguments[1]:void 0)}},2382:(l,p,t)=>{var a=t(9364),n=t(815),s=t(9845),h=t(6656),E=t(9211),v=t(7712),S=t(8125),B=t(6641),x=t(1541),P=t(9277),M=t(3930),F=t(7553),G=t(2327),K=t(1147),H=h.PROPER,Z=h.CONFIGURABLE,ie=K.IteratorPrototype,T=K.BUGGY_SAFARI_ITERATORS,m=F("iterator"),g="keys",f="values",O="entries",j=function(){return this};l.exports=function(Q,ee,ue,fe,me,ge,Oe){v(ue,ee,fe);var Ee,Be,De,nt=function(V){if(V===me&&L)return L;if(!T&&V&&V in Me)return Me[V];switch(V){case g:case f:case O:return function(){return new ue(this,V)}}return function(){return new ue(this)}},Ke=ee+" Iterator",We=!1,Me=Q.prototype,W=Me[m]||Me["@@iterator"]||me&&Me[me],L=!T&&W||nt(me),U=ee==="Array"&&Me.entries||W;if(U&&(Ee=S(U.call(new Q)))!==Object.prototype&&Ee.next&&(s||S(Ee)===ie||(B?B(Ee,ie):E(Ee[m])||M(Ee,m,j)),x(Ee,Ke,!0,!0),s&&(G[Ke]=j)),H&&me===f&&W&&W.name!==f&&(!s&&Z?P(Me,"name",f):(We=!0,L=function(){return n(W,this)})),me)if(Be={values:nt(f),keys:ge?L:nt(g),entries:nt(O)},Oe)for(De in Be)(T||We||!(De in Me))&&M(Me,De,Be[De]);else a({target:ee,proto:!0,forced:T||We},Be);return s&&!Oe||Me[m]===L||M(Me,m,L,{name:me}),G[ee]=L,Be}},2420:(l,p,t)=>{var a=t(4685),n=Math.min;l.exports=function(s){var h=a(s);return h>0?n(h,9007199254740991):0}},2460:(l,p,t)=>{t.d(p,{A:()=>n});var a=t(2139);const n=function(){function s(){}return s.e=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","error",S)),s.ENABLE_ERROR&&(console.error?console.error(S):console.warn?console.warn(S):console.log(S))},s.i=function(h,E){h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var v="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&s.emitter.emit("log","info",v),s.ENABLE_INFO&&(console.info?console.info(v):console.log(v))},s.w=function(h,E){h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var v="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&s.emitter.emit("log","warn",v),s.ENABLE_WARN&&(console.warn?console.warn(v):console.log(v))},s.d=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","debug",S)),s.ENABLE_DEBUG&&(console.debug?console.debug(S):console.log(S))},s.v=function(h,E){var v;h&&!s.FORCE_GLOBAL_TAG||(h=s.GLOBAL_TAG);var S="[".concat(h,"] > ").concat(E);s.ENABLE_CALLBACK&&((v=s.emitter)===null||v===void 0||v.emit("log","verbose",S)),s.ENABLE_VERBOSE&&console.log(S)},s.FORCE_GLOBAL_TAG=!1,s.GLOBAL_TAG="ezuikit-flv",s.ENABLE_CALLBACK=!1,s.emitter=new a.A,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s}()},2578:(l,p,t)=>{var a=t(2719),n=t(1031),s=t(2327),h=t(3587),E=t(3643).f,v=t(2382),S=t(1567),B=t(9845),x=t(9646),P="Array Iterator",M=h.set,F=h.getterFor(P);l.exports=v(Array,"Array",function(K,H){M(this,{type:P,target:a(K),index:0,kind:H})},function(){var K=F(this),H=K.target,Z=K.index++;if(!H||Z>=H.length)return K.target=null,S(void 0,!0);switch(K.kind){case"keys":return S(Z,!1);case"values":return S(H[Z],!1)}return S([Z,H[Z]],!1)},"values");var G=s.Arguments=s.Array;if(n("keys"),n("values"),n("entries"),!B&&x&&G.name!=="values")try{E(G,"name",{value:"values"})}catch{}},2630:(l,p,t)=>{var a=t(3430),n=t(6853).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(s){return a(s,n)}},2632:(l,p,t)=>{t.d(p,{default:()=>Me});var a={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32},n=t(8098),s={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0,url:void 0,redirectedURL:void 0,cors:!1};function h(){return Object.assign({},s)}var E=function(){function W(){}return W.supportMSEH264Playback=function(){var L;return(L=window.MediaSource)===null||L===void 0?void 0:L.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},W.supportMSEH265Playback=function(){var L;return(L=window.MediaSource)===null||L===void 0?void 0:L.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"')},W.supportNetworkStreamIO=function(){var L=new n.A({},h()),U=L.loaderType;return L.destroy(),U==="fetch-stream-loader"||U==="xhr-moz-chunked-loader"},W.getNetworkLoaderTypeName=function(){var L=new n.A({},h()),U=L.loaderType;return L.destroy(),U},W.supportNativeMediaPlayback=function(L){W.videoElement===void 0&&(W.videoElement=window.document.createElement("video"));var U=W.videoElement.canPlayType(L);return U==="probably"||U==="maybe"},W.getFeatureList=function(){var L={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return L.msePlayback=W.supportMSEH264Playback(),L.networkStreamIO=W.supportNetworkStreamIO(),L.networkLoaderName=W.getNetworkLoaderTypeName()||"",L.mseLivePlayback=L.msePlayback&&L.networkStreamIO,L.mseH265Playback=W.supportMSEH265Playback(),L.nativeMP4H264Playback=W.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),L.nativeMP4H265Playback=W.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),L.nativeWebmVP8Playback=W.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),L.nativeWebmVP9Playback=W.supportNativeMediaPlayback('video/webm; codecs="vp9"'),L},W}();const v=E;var S=t(9034),B=t(2139),x=t(2460),P=t(8870);const M={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",DESTROYING:"destroying"};t(6041),t(8845),t(6815),t(9688),t(5758),t(5347),t(2578),t(5336),t(1464),t(4742),t(2250),t(6033),t(3813),t(4659),t(3074),t(9917),t(3478),t(5597),t(6263),t(6810),t(6728),t(7958),t(834),t(8862),t(4879),t(778),t(730),t(1454);var F=function(){var W=ENTRY_MODULE,L={};function U(X){if(L[X])return L[X].exports;var J=L[X]={exports:{}};return W[X](J,J.exports,U),J.exports}U.m=W,U.n=function(X){var J=X&&X.__esModule?function(){return X.default}:function(){return X};return U.d(J,{a:J}),J},U.d=function(X,J){for(var le in J)U.o(J,le)&&!U.o(X,le)&&Object.defineProperty(X,le,{enumerable:!0,get:J[le]})},U.g=function(){if(Object.prototype.toString.call(globalThis)==="[object Object]")return globalThis;try{return this||new Function("return this")()}catch{if(Object.prototype.toString.call(window)==="[object Object]")return window}}(),U.o=function(X,J){return Object.prototype.hasOwnProperty.call(X,J)},U.r=function(X){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(X,"__esModule",{value:!0})};var V=U(ENTRY_MODULE);return V.default||V},G="[\\.|\\-|\\+|\\w|/|@]+",K="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+G+").*?\\)";function H(W){return(W+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function Z(W,L,U){var V={};V[U]=[];var X,J=L.toString(),le=J.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||J.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!le)return V;for(var ce,ye=le[1],ae=new RegExp("(\\\\n|\\W)"+H(ye)+K,"g");ce=ae.exec(J);)ce[3]!=="dll-reference"&&V[U].push(ce[3]);for(ae=new RegExp("\\("+H(ye)+'\\("(dll-reference\\s('+G+'))"\\)\\)'+K,"g");ce=ae.exec(J);)W[ce[2]]||(V[U].push(ce[1]),W[ce[2]]=t(ce[1]).m),V[ce[2]]=V[ce[2]]||[],V[ce[2]].push(ce[4]);for(var Ce=Object.keys(V),pe=0;pe0},!1)}function T(W,L,U,V){var X=W[V].map(function(le){return'"'.concat(le,'": ').concat(L[V][le].toString())}).join(","),J=F.toString().split("ENTRY_MODULE");return"".concat(J[0],"{").concat(X,"}").concat(J[1],'"').concat(U,'"').concat(J[2])}var m=t(8635),g=t(9953),f=t(550),O=t(719);const j=function(){function W(L,U){if(this.TAG="Transmuxer",this._workerDestroying=!1,this._controller=null,this._emitter=new B.A,U.enableWorker&&typeof Worker<"u")try{this._worker=this._worker=function(X,J){J=J||{};var le={main:t.m},ce=J.all?{main:Object.keys(le.main)}:function(Re,Et){for(var ct={main:[7477]},Se={main:[]},Ye={main:{}};ie(ct);)for(var rt=Object.keys(ct),zt=0;zt0&&(J+=";codecs=".concat(X.codec));var le=!1;if(x.A.v(this.TAG,"Received Initialization Segment, mimeType: "+J),this._lastInitSegments[X.type]=X,J!==this._mimeTypes[X.type]){if(this._mimeTypes[X.type])x.A.v(this.TAG,"Notice: ".concat(X.type," mimeType changed, origin: ").concat(this._mimeTypes[X.type]||"",", target: ").concat(J));else{le=!0;try{var ce=this._sourceBuffers[X.type]=this._mediaSource.addSourceBuffer(J);ce.addEventListener("error",this.e.onSourceBufferError),ce.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(ye){return x.A.e(this.TAG,ye.message),void this._emitter.emit(Q,{code:ye.code,msg:ye.message})}}this._mimeTypes[X.type]=J}U||this._pendingSegments[X.type].push(X),le||this._sourceBuffers[X.type]&&!(!((V=this._sourceBuffers[X.type])===null||V===void 0)&&V.updating)&&this._doAppendSegments(),P.A.safari&&X.container==="audio/mpeg"&&X.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=X.mediaDuration/1e3,this._updateMediaSourceDuration())},W.prototype.appendMediaSegment=function(L){var U=L;this._pendingSegments[U.type].push(U),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var V=this._sourceBuffers[U.type];!V||V.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},W.prototype.seek=function(L){var U,V;for(var X in this._sourceBuffers)if(this._sourceBuffers[X]){var J=this._sourceBuffers[X];if(((U=this._mediaSource)===null||U===void 0?void 0:U.readyState)==="open")try{J==null||J.abort()}catch(pe){x.A.e(this.TAG,pe.message)}this._idrList.clear();var le=this._pendingSegments[X];if(le.splice(0,le.length),((V=this._mediaSource)===null||V===void 0?void 0:V.readyState)!=="closed"){if(J){for(var ce=0;ce=1&&V-le.start(0)>=(((U=this._config)===null||U===void 0?void 0:U.autoCleanupMaxBackwardDuration)||0))return!0}}return!1},W.prototype._doCleanupSourceBuffer=function(){var L,U,V,X=(L=this._mediaElement)===null||L===void 0?void 0:L.currentTime;for(var J in this._sourceBuffers){var le=this._sourceBuffers[J];if(le){for(var ce=le.buffered,ye=!1,ae=0;ae=(((U=this._config)===null||U===void 0?void 0:U.autoCleanupMaxBackwardDuration)||0)){ye=!0;var Re=X-(((V=this._config)===null||V===void 0?void 0:V.autoCleanupMinBackwardDuration)||0);this._pendingRemoveRanges[J].push({start:Ce,end:Re})}}else pe0&&(isNaN(le)||ce>le)&&(x.A.v(this.TAG,"Update MediaSource duration from ".concat(le," to ").concat(ce)),this._mediaSource.duration=ce),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},W.prototype._doRemoveRanges=function(){var L;for(var U in this._pendingRemoveRanges)if(this._sourceBuffers[U]&&!(!((L=this._sourceBuffers[U])===null||L===void 0)&&L.updating))for(var V=this._sourceBuffers[U],X=this._pendingRemoveRanges[U];X.length&&!(V!=null&&V.updating);){var J=X.shift();V==null||V.remove(J.start,J.end)}},W.prototype._doAppendSegments=function(){var L,U,V,X=this._pendingSegments;for(var J in X)if(this._sourceBuffers[J]&&!(!((L=this._sourceBuffers[J])===null||L===void 0)&&L.updating)&&X[J].length>0){var le=X[J].shift();if(le!=null&&le.timestampOffset){var ce=((U=this._sourceBuffers[J])===null||U===void 0?void 0:U.timestampOffset)||0,ye=le.timestampOffset/1e3;Math.abs(ce-ye)>.1&&(x.A.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(ce," to ").concat(ye)),this._sourceBuffers[J]&&(this._sourceBuffers[J].timestampOffset=ye)),delete le.timestampOffset}if(!le.data||le.data.byteLength===0)continue;try{(V=this._sourceBuffers[J])===null||V===void 0||V.appendBuffer(le.data),this._isBufferFull=!1,J==="video"&&le.hasOwnProperty("info")&&this._idrList.appendArray(le.info.syncPoints)}catch(ae){this._pendingSegments[J].unshift(le),ae.code===22?(this._isBufferFull||this._emitter.emit(fe),this._isBufferFull=!0):(x.A.e(this.TAG,ae.message),this._emitter.emit(Q,{code:ae.code,msg:ae.message}))}}},W.prototype._onSourceOpen=function(){var L;if(x.A.v(this.TAG,"MediaSource onSourceOpen"),(L=this._mediaSource)===null||L===void 0||L.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var U=this._pendingSourceBufferInit;U.length;){var V=U.shift();this.appendInitSegment(V,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(ee)},W.prototype._onSourceEnded=function(){x.A.v(this.TAG,"MediaSource onSourceEnded")},W.prototype._onSourceClose=function(){x.A.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},W.prototype._hasPendingSegments=function(){var L=this._pendingSegments;return L.video.length>0||L.audio.length>0},W.prototype._hasPendingRemoveRanges=function(){var L=this._pendingRemoveRanges;return L.video.length>0||L.audio.length>0},W.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(ue)},W.prototype._onSourceBufferError=function(L){x.A.e(this.TAG,"SourceBuffer Error: ".concat(L))},W}();var Ee=t(6399),Be={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},De={NETWORK_EXCEPTION:S.Xv.EXCEPTION,NETWORK_STATUS_CODE_INVALID:S.Xv.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:S.Xv.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:S.Xv.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Ee.A.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ee.A.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ee.A.CODEC_UNSUPPORTED};const nt=function(){function W(L,U){var V,X,J;this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new B.A,this._config=h(),typeof U=="object"&&Object.assign(this._config,U);var le=L.type.toLowerCase();if(le!=="mse"&&le!=="mpegts"&&le!=="m2ts"&&le!=="flv")throw new ge.Qn("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");L.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=L,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var ce=P.A.chrome&&(P.A.version&&((V=P.A.version)===null||V===void 0?void 0:V.major)<50||P.A.version&&((X=P.A===null||P.A===void 0?void 0:P.A.version)===null||X===void 0?void 0:X.major)===50&&(((J=P.A===null||P.A===void 0?void 0:P.A.version)===null||J===void 0?void 0:J.build)||-1)<2661);this._alwaysSeekKeyframe=!!(ce||P.A.msedge||P.A.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return W.prototype.destroy=function(){this._emitter.emit(M.DESTROYING),this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},W.prototype.on=function(L,U){var V=this;L===M.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){V._emitter.emit(M.MEDIA_INFO,V.mediaInfo)}):L===M.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(function(){V._emitter.emit(M.STATISTICS_INFO,V.statisticsInfo)}),this._emitter.addListener(L,U)},W.prototype.off=function(L,U){this._emitter.removeListener(L,U)},W.prototype.attachMediaElement=function(L){var U,V,X,J,le,ce=this;if(this._mediaElement=L,L.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),L.addEventListener("seeking",this.e.onvSeeking),L.addEventListener("canplay",this.e.onvCanPlay),L.addEventListener("stalled",this.e.onvStalled),L.addEventListener("progress",this.e.onvProgress),this._msectl=new Oe(this._config),(U=this._msectl)===null||U===void 0||U.on(ue,this._onmseUpdateEnd.bind(this)),(V=this._msectl)===null||V===void 0||V.on(fe,this._onmseBufferFull.bind(this)),(X=this._msectl)===null||X===void 0||X.on(ee,function(){ce._mseSourceOpened=!0,ce._hasPendingLoad&&(ce._hasPendingLoad=!1,ce.load())}),(J=this._msectl)===null||J===void 0||J.on(Q,function(ye){ce._emitter.emit(M.ERROR,Be.MEDIA_ERROR,De.MEDIA_MSE_ERROR,ye)}),(le=this._msectl)===null||le===void 0||le.attachMediaElement(L),this._pendingSeekTime!=null)try{L.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch{}},W.prototype.detachMediaElement=function(){var L;this._mediaElement&&((L=this._msectl)===null||L===void 0||L.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},W.prototype.load=function(){var L=this;if(!this._mediaElement)throw new ge.j4("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ge.j4("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(!this._config.deferLoadAfterSourceOpen||this._mseSourceOpened?(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new j(this._mediaDataSource,this._config),this._transmuxer.on(f.A.INIT_SEGMENT,function(U,V){var X;(X=L._msectl)===null||X===void 0||X.appendInitSegment(V)}),this._transmuxer.on(f.A.MEDIA_SEGMENT,function(U,V){var X,J,le;if((X=L._msectl)===null||X===void 0||X.appendMediaSegment(V),L._config.lazyLoad&&!L._config.isLive){var ce=(J=L._mediaElement)===null||J===void 0?void 0:J.currentTime;V.info.endDts>=1e3*(ce+(((le=L._config)===null||le===void 0?void 0:le.lazyLoadMaxDuration)||0))&&L._progressChecker==null&&(x.A.v(L.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),L._suspendTransmuxer())}}),this._transmuxer.on(f.A.LOADING_COMPLETE,function(){var U;(U=L._msectl)===null||U===void 0||U.endOfStream(),L._emitter.emit(M.LOADING_COMPLETE)}),this._transmuxer.on(f.A.RECOVERED_EARLY_EOF,function(){L._emitter.emit(M.RECOVERED_EARLY_EOF)}),this._transmuxer.on(f.A.IO_ERROR,function(U,V){L._emitter.emit(M.ERROR,Be.NETWORK_ERROR,U,V)}),this._transmuxer.on(f.A.DEMUX_ERROR,function(U,V){L._emitter.emit(M.ERROR,Be.MEDIA_ERROR,U,{code:-1,msg:V})}),this._transmuxer.on(f.A.MEDIA_INFO,function(U){L._mediaInfo=U,L._emitter.emit(M.MEDIA_INFO,Object.assign({},U))}),this._transmuxer.on(f.A.METADATA_ARRIVED,function(U){L._emitter.emit(M.METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SCRIPTDATA_ARRIVED,function(U){L._emitter.emit(M.SCRIPTDATA_ARRIVED,U)}),this._transmuxer.on(f.A.TIMED_ID3_METADATA_ARRIVED,function(U){L._emitter.emit(M.TIMED_ID3_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SMPTE2038_METADATA_ARRIVED,function(U){L._emitter.emit(M.SMPTE2038_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.SCTE35_METADATA_ARRIVED,function(U){L._emitter.emit(M.SCTE35_METADATA_ARRIVED,U)}),this._transmuxer.on(f.A.PES_PRIVATE_DATA_DESCRIPTOR,function(U){L._emitter.emit(M.PES_PRIVATE_DATA_DESCRIPTOR,U)}),this._transmuxer.on(f.A.PES_PRIVATE_DATA_ARRIVED,function(U){L._emitter.emit(M.PES_PRIVATE_DATA_ARRIVED,U)}),this._transmuxer.on(f.A.STATISTICS_INFO,function(U){L._statisticsInfo=L._fillStatisticsInfo(U),L._emitter.emit(M.STATISTICS_INFO,Object.assign({},L._statisticsInfo))}),this._transmuxer.on(f.A.RECOMMEND_SEEKPOINT,function(U){L._mediaElement&&!L._config.accurateSeek&&(L._requestSetTime=!0,L._mediaElement.currentTime=U/1e3)}),this._transmuxer.open()):this._hasPendingLoad=!0)},W.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},W.prototype.play=function(){var L,U,V,X;return U=this,X=function(){return function(J,le){var ce,ye,ae,Ce,pe={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return Ce={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ce[Symbol.iterator]=function(){return this}),Ce;function Re(Et){return function(ct){return function(Se){if(ce)throw new TypeError("Generator is already executing.");for(;Ce&&(Ce=0,Se[0]&&(pe=0)),pe;)try{if(ce=1,ye&&(ae=2&Se[0]?ye.return:Se[0]?ye.throw||((ae=ye.return)&&ae.call(ye),0):ye.next)&&!(ae=ae.call(ye,Se[1])).done)return ae;switch(ye=0,ae&&(Se=[2&Se[0],ae.value]),Se[0]){case 0:case 1:ae=Se;break;case 4:return pe.label++,{value:Se[1],done:!1};case 5:pe.label++,ye=Se[1],Se=[0];continue;case 7:Se=pe.ops.pop(),pe.trys.pop();continue;default:if(!((ae=(ae=pe.trys).length>0&&ae[ae.length-1])||Se[0]!==6&&Se[0]!==2)){pe=0;continue}if(Se[0]===3&&(!ae||Se[1]>ae[0]&&Se[1]0&&!(!((V=this._mediaElement)===null||V===void 0)&&V.paused)){var ce=J.end(J.length-1);if(ce>(((X=this._config)===null||X===void 0?void 0:X.liveBufferLatencyMaxLatency)||0)&&ce-le>(this._config.liveBufferLatencyMaxLatency||0)){var ye=ce-(this._config.liveBufferLatencyMinRemain||0);this.currentTime=ye}}if(this._config.lazyLoad&&!this._config.isLive){for(var ae=0,Ce=0;Ce=le+(this._config.lazyLoadMaxDuration||0)&&this._progressChecker==null&&(x.A.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},W.prototype._onmseBufferFull=function(){x.A.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},W.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},W.prototype._checkProgressAndResume=function(){for(var L,U,V,X=((L=this._mediaElement)===null||L===void 0?void 0:L.currentTime)||0,J=((U=this._mediaElement)===null||U===void 0?void 0:U.buffered)||[],le=!1,ce=0;ce=ye&&X=ae-(this._config.lazyLoadRecoverDuration||0)&&(le=!0);break}}le&&(window.clearInterval(this._progressChecker),this._progressChecker=null,le&&(x.A.v(this.TAG,"Continue loading from paused position"),(V=this._transmuxer)===null||V===void 0||V.resume()))},W.prototype._isTimepointBuffered=function(L){for(var U,V=(U=this._mediaElement)===null||U===void 0?void 0:U.buffered,X=0;X=J&&L0){var ye=this._mediaElement.buffered.start(0);(ye<1&&L0&&U.currentTime0){var ce=le.start(0);if(ce<1&&J0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},W.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},W.prototype.play=function(){var L,U,V,X;return U=this,X=function(){return function(J,le){var ce,ye,ae,Ce,pe={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return Ce={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ce[Symbol.iterator]=function(){return this}),Ce;function Re(Et){return function(ct){return function(Se){if(ce)throw new TypeError("Generator is already executing.");for(;Ce&&(Ce=0,Se[0]&&(pe=0)),pe;)try{if(ce=1,ye&&(ae=2&Se[0]?ye.return:Se[0]?ye.throw||((ae=ye.return)&&ae.call(ye),0):ye.next)&&!(ae=ae.call(ye,Se[1])).done)return ae;switch(ye=0,ae&&(Se=[2&Se[0],ae.value]),Se[0]){case 0:case 1:ae=Se;break;case 4:return pe.label++,{value:Se[1],done:!1};case 5:pe.label++,ye=Se[1],Se=[0];continue;case 7:Se=pe.ops.pop(),pe.trys.pop();continue;default:if(!((ae=(ae=pe.trys).length>0&&ae[ae.length-1])||Se[0]!==6&&Se[0]!==2)){pe=0;continue}if(Se[0]===3&&(!ae||Se[1]>ae[0]&&Se[1]{var a=t(6458),n=t(2809),s=t(9211),h=t(497),E=t(5057),v=t(3732),S=function(){},B=E("Reflect","construct"),x=/^\s*(?:class|function)\b/,P=a(x.exec),M=!x.test(S),F=function(K){if(!s(K))return!1;try{return B(S,[],K),!0}catch{return!1}},G=function(K){if(!s(K))return!1;switch(h(K)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!P(x,v(K))}catch{return!0}};G.sham=!0,l.exports=!B||n(function(){var K;return F(F.call)||!F(Object)||!F(function(){K=!0})||K})?G:F},2719:(l,p,t)=>{var a=t(5273),n=t(5840);l.exports=function(s){return a(n(s))}},2757:(l,p,t)=>{var a=t(9615),n=TypeError;l.exports=function(s,h){if(a(h,s))return s;throw new n("Incorrect invocation")}},2792:(l,p,t)=>{var a=t(9646),n=t(2809);l.exports=a&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2807:(l,p,t)=>{var a=t(9047);l.exports=function(n,s){return new(a(n))(s===0?0:s)}},2809:l=>{l.exports=function(p){try{return!!p()}catch{return!0}}},2897:(l,p,t)=>{var a=t(9646),n=t(815),s=t(7403),h=t(6330),E=t(2719),v=t(4151),S=t(4347),B=t(6071),x=Object.getOwnPropertyDescriptor;p.f=a?x:function(P,M){if(P=E(P),M=v(M),B)try{return x(P,M)}catch{}if(S(P,M))return h(!n(s.f,P,M),P[M])}},2915:(l,p,t)=>{var a=t(7553),n=t(2327),s=a("iterator"),h=Array.prototype;l.exports=function(E){return E!==void 0&&(n.Array===E||h[s]===E)}},3074:(l,p,t)=>{var a=t(9364),n=t(9083),s=t(7642);a({target:"Object",stat:!0,forced:t(2809)(function(){s(1)})},{keys:function(h){return s(n(h))}})},3430:(l,p,t)=>{var a=t(6458),n=t(4347),s=t(2719),h=t(219).indexOf,E=t(7923),v=a([].push);l.exports=function(S,B){var x,P=s(S),M=0,F=[];for(x in P)!n(E,x)&&n(P,x)&&v(F,x);for(;B.length>M;)n(P,x=B[M++])&&(~h(F,x)||v(F,x));return F}},3439:(l,p,t)=>{var a=t(9646),n=t(6458),s=t(815),h=t(2809),E=t(7642),v=t(7819),S=t(7403),B=t(9083),x=t(5273),P=Object.assign,M=Object.defineProperty,F=n([].concat);l.exports=!P||h(function(){if(a&&P({b:1},P(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var G={},K={},H=Symbol("assign detection"),Z="abcdefghijklmnopqrst";return G[H]=7,Z.split("").forEach(function(ie){K[ie]=ie}),P({},G)[H]!==7||E(P({},K)).join("")!==Z})?function(G,K){for(var H=B(G),Z=arguments.length,ie=1,T=v.f,m=S.f;Z>ie;)for(var g,f=x(arguments[ie++]),O=T?F(E(f),T(f)):E(f),j=O.length,Q=0;j>Q;)g=O[Q++],a&&!s(m,f,g)||(H[g]=f[g]);return H}:P},3463:(l,p,t)=>{var a=t(775);l.exports=function(n,s){return a[n]||(a[n]=s||{})}},3478:(l,p,t)=>{var a=t(9646),n=t(1562),s=t(6458),h=t(4346),E=t(5405),v=t(9277),S=t(6122),B=t(2630).f,x=t(9615),P=t(9666),M=t(6677),F=t(1144),G=t(8587),K=t(9614),H=t(3930),Z=t(2809),ie=t(4347),T=t(3587).enforce,m=t(9603),g=t(7553),f=t(7517),O=t(6288),j=g("match"),Q=n.RegExp,ee=Q.prototype,ue=n.SyntaxError,fe=s(ee.exec),me=s("".charAt),ge=s("".replace),Oe=s("".indexOf),Ee=s("".slice),Be=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,De=/a/g,nt=/a/g,Ke=new Q(De)!==De,We=G.MISSED_STICKY,Me=G.UNSUPPORTED_Y;if(h("RegExp",a&&(!Ke||We||f||O||Z(function(){return nt[j]=!1,Q(De)!==De||Q(nt)===nt||String(Q(De,"i"))!=="/a/i"})))){for(var W=function(V,X){var J,le,ce,ye,ae,Ce,pe=x(ee,this),Re=P(V),Et=X===void 0,ct=[],Se=V;if(!pe&&Re&&Et&&V.constructor===W)return V;if((Re||x(ee,V))&&(V=V.source,Et&&(X=F(Se))),V=V===void 0?"":M(V),X=X===void 0?"":M(X),Se=V,f&&"dotAll"in De&&(le=!!X&&Oe(X,"s")>-1)&&(X=ge(X,/s/g,"")),J=X,We&&"sticky"in De&&(ce=!!X&&Oe(X,"y")>-1)&&Me&&(X=ge(X,/y/g,"")),O&&(ye=function(Ye){for(var rt,zt=Ye.length,Je=0,st="",bt=[],Tt=S(null),gt=!1,Vt=!1,xt=0,Pt="";Je<=zt;Je++){if((rt=me(Ye,Je))==="\\")rt+=me(Ye,++Je);else if(rt==="]")gt=!1;else if(!gt)switch(!0){case rt==="[":gt=!0;break;case rt==="(":if(st+=rt,Ee(Ye,Je+1,Je+3)==="?:")continue;fe(Be,Ee(Ye,Je+1))&&(Je+=2,Vt=!0),xt++;continue;case(rt===">"&&Vt):if(Pt===""||ie(Tt,Pt))throw new ue("Invalid capture group name");Tt[Pt]=!0,bt[bt.length]=[Pt,xt],Vt=!1,Pt="";continue}Vt?Pt+=rt:st+=rt}return[st,bt]}(V),V=ye[0],ct=ye[1]),ae=E(Q(V,X),pe?this:ee,W),(le||ce||ct.length)&&(Ce=T(ae),le&&(Ce.dotAll=!0,Ce.raw=W(function(Ye){for(var rt,zt=Ye.length,Je=0,st="",bt=!1;Je<=zt;Je++)(rt=me(Ye,Je))!=="\\"?bt||rt!=="."?(rt==="["?bt=!0:rt==="]"&&(bt=!1),st+=rt):st+="[\\s\\S]":st+=rt+me(Ye,++Je);return st}(V),J)),ce&&(Ce.sticky=!0),ct.length&&(Ce.groups=ct)),V!==Se)try{v(ae,"source",Se===""?"(?:)":Se)}catch{}return ae},L=B(Q),U=0;L.length>U;)K(W,Q,L[U++]);ee.constructor=W,W.prototype=ee,H(n,"RegExp",W,{constructor:!0})}m("RegExp")},3479:(l,p,t)=>{var a=t(5993);l.exports=a==="NODE"},3587:(l,p,t)=>{var a,n,s,h=t(4468),E=t(1562),v=t(4152),S=t(9277),B=t(4347),x=t(775),P=t(577),M=t(7923),F="Object already initialized",G=E.TypeError,K=E.WeakMap;if(h||x.state){var H=x.state||(x.state=new K);H.get=H.get,H.has=H.has,H.set=H.set,a=function(ie,T){if(H.has(ie))throw new G(F);return T.facade=ie,H.set(ie,T),T},n=function(ie){return H.get(ie)||{}},s=function(ie){return H.has(ie)}}else{var Z=P("state");M[Z]=!0,a=function(ie,T){if(B(ie,Z))throw new G(F);return T.facade=ie,S(ie,Z,T),T},n=function(ie){return B(ie,Z)?ie[Z]:{}},s=function(ie){return B(ie,Z)}}l.exports={set:a,get:n,has:s,enforce:function(ie){return s(ie)?n(ie):a(ie,{})},getterFor:function(ie){return function(T){var m;if(!v(T)||(m=n(T)).type!==ie)throw new G("Incompatible receiver, "+ie+" required");return m}}}},3643:(l,p,t)=>{var a=t(9646),n=t(6071),s=t(2792),h=t(7749),E=t(4151),v=TypeError,S=Object.defineProperty,B=Object.getOwnPropertyDescriptor,x="enumerable",P="configurable",M="writable";p.f=a?s?function(F,G,K){if(h(F),G=E(G),h(K),typeof F=="function"&&G==="prototype"&&"value"in K&&M in K&&!K[M]){var H=B(F,G);H&&H[M]&&(F[G]=K.value,K={configurable:P in K?K[P]:H[P],enumerable:x in K?K[x]:H[x],writable:!1})}return S(F,G,K)}:S:function(F,G,K){if(h(F),G=E(G),h(K),n)try{return S(F,G,K)}catch{}if("get"in K||"set"in K)throw new v("Accessors not supported");return"value"in K&&(F[G]=K.value),F}},3732:(l,p,t)=>{var a=t(6458),n=t(9211),s=t(775),h=a(Function.toString);n(s.inspectSource)||(s.inspectSource=function(E){return h(E)}),l.exports=s.inspectSource},3813:(l,p,t)=>{t(1541)(Math,"Math",!0)},3930:(l,p,t)=>{var a=t(9211),n=t(3643),s=t(4233),h=t(4191);l.exports=function(E,v,S,B){B||(B={});var x=B.enumerable,P=B.name!==void 0?B.name:v;if(a(S)&&s(S,P,B),B.global)x?E[v]=S:h(v,S);else{try{B.unsafe?E[v]&&(x=!0):delete E[v]}catch{}x?E[v]=S:n.f(E,v,{value:S,enumerable:!1,configurable:!B.nonConfigurable,writable:!B.nonWritable})}return E}},3992:(l,p,t)=>{var a=t(9364),n=t(5057),s=t(8891),h=t(815),E=t(6458),v=t(2809),S=t(9211),B=t(5727),x=t(8626),P=t(9695),M=t(7917),F=String,G=n("JSON","stringify"),K=E(/./.exec),H=E("".charAt),Z=E("".charCodeAt),ie=E("".replace),T=E(1 .toString),m=/[\uD800-\uDFFF]/g,g=/^[\uD800-\uDBFF]$/,f=/^[\uDC00-\uDFFF]$/,O=!M||v(function(){var ue=n("Symbol")("stringify detection");return G([ue])!=="[null]"||G({a:ue})!=="{}"||G(Object(ue))!=="{}"}),j=v(function(){return G("\uDF06\uD834")!=='"\\udf06\\ud834"'||G("\uDEAD")!=='"\\udead"'}),Q=function(ue,fe){var me=x(arguments),ge=P(fe);if(S(ge)||ue!==void 0&&!B(ue))return me[1]=function(Oe,Ee){if(S(ge)&&(Ee=h(ge,this,F(Oe),Ee)),!B(Ee))return Ee},s(G,null,me)},ee=function(ue,fe,me){var ge=H(me,fe-1),Oe=H(me,fe+1);return K(g,ue)&&!K(f,Oe)||K(f,ue)&&!K(g,ge)?"\\u"+T(Z(ue,0),16):ue};G&&a({target:"JSON",stat:!0,arity:3,forced:O||j},{stringify:function(ue,fe,me){var ge=x(arguments),Oe=s(O?Q:G,null,ge);return j&&typeof Oe=="string"?ie(Oe,m,ee):Oe}})},4151:(l,p,t)=>{var a=t(115),n=t(5727);l.exports=function(s){var h=a(s,"string");return n(h)?h:h+""}},4152:(l,p,t)=>{var a=t(9211);l.exports=function(n){return typeof n=="object"?n!==null:a(n)}},4160:(l,p,t)=>{var a=t(815),n=t(5057),s=t(7553),h=t(3930);l.exports=function(){var E=n("Symbol"),v=E&&E.prototype,S=v&&v.valueOf,B=s("toPrimitive");v&&!v[B]&&h(v,B,function(x){return a(S,this)},{arity:1})}},4191:(l,p,t)=>{var a=t(1562),n=Object.defineProperty;l.exports=function(s,h){try{n(a,s,{value:h,configurable:!0,writable:!0})}catch{a[s]=h}return h}},4220:(l,p,t)=>{t(6810);var a,n=t(9364),s=t(9646),h=t(6666),E=t(1562),v=t(7042),S=t(6458),B=t(3930),x=t(1176),P=t(2757),M=t(4347),F=t(3439),G=t(4478),K=t(8626),H=t(4417).codeAt,Z=t(4955),ie=t(6677),T=t(1541),m=t(594),g=t(648),f=t(3587),O=f.set,j=f.getterFor("URL"),Q=g.URLSearchParams,ee=g.getState,ue=E.URL,fe=E.TypeError,me=E.parseInt,ge=Math.floor,Oe=Math.pow,Ee=S("".charAt),Be=S(/./.exec),De=S([].join),nt=S(1 .toString),Ke=S([].pop),We=S([].push),Me=S("".replace),W=S([].shift),L=S("".split),U=S("".slice),V=S("".toLowerCase),X=S([].unshift),J="Invalid scheme",le="Invalid host",ce="Invalid port",ye=/[a-z]/i,ae=/[\d+-.a-z]/i,Ce=/\d/,pe=/^0x/i,Re=/^[0-7]+$/,Et=/^\d+$/,ct=/^[\da-f]+$/i,Se=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ye=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+/,zt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Je=/[\t\n\r]/g,st=function(_){var I,k,$,D;if(typeof _=="number"){for(I=[],k=0;k<4;k++)X(I,_%256),_=ge(_/256);return De(I,".")}if(typeof _=="object"){for(I="",$=function(N){for(var z=null,q=1,R=null,Y=0,se=0;se<8;se++)N[se]!==0?(Y>q&&(z=R,q=Y),R=null,Y=0):(R===null&&(R=se),++Y);return Y>q?R:z}(_),k=0;k<8;k++)D&&_[k]===0||(D&&(D=!1),$===k?(I+=k?":":"::",D=!0):(I+=nt(_[k],16),k<7&&(I+=":")));return"["+I+"]"}return _},bt={},Tt=F({},bt,{" ":1,'"':1,"<":1,">":1,"`":1}),gt=F({},Tt,{"#":1,"?":1,"{":1,"}":1}),Vt=F({},gt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xt=function(_,I){var k=H(_,0);return k>32&&k<127&&!M(I,_)?_:encodeURIComponent(_)},Pt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Kt=function(_,I){var k;return _.length===2&&Be(ye,Ee(_,0))&&((k=Ee(_,1))===":"||!I&&k==="|")},ti=function(_){var I;return _.length>1&&Kt(U(_,0,2))&&(_.length===2||(I=Ee(_,2))==="/"||I==="\\"||I==="?"||I==="#")},$e=function(_){return _==="."||V(_)==="%2e"},Ue={},Fe={},Xe={},ut={},si={},Xt={},he={},Te={},Ie={},xe={},ze={},it={},ht={},lt={},Rt={},St={},jt={},Zt={},Lt={},di={},c={},A=function(_,I,k){var $,D,N,z=ie(_);if(I){if(D=this.parse(z))throw new fe(D);this.searchParams=null}else{if(k!==void 0&&($=new A(k,!0)),D=this.parse(z,null,$))throw new fe(D);(N=ee(new Q)).bindURL(this),this.searchParams=N}};A.prototype={type:"URL",parse:function(_,I,k){var $,D,N,z,q,R=this,Y=I||Ue,se=0,re="",de=!1,oe=!1,_e=!1;for(_=ie(_),I||(R.scheme="",R.username="",R.password="",R.host=null,R.port=null,R.path=[],R.query=null,R.fragment=null,R.cannotBeABaseURL=!1,_=Me(_,rt,""),_=Me(_,zt,"$1")),_=Me(_,Je,""),$=G(_);se<=$.length;){switch(D=$[se],Y){case Ue:if(!D||!Be(ye,D)){if(I)return J;Y=Xe;continue}re+=V(D),Y=Fe;break;case Fe:if(D&&(Be(ae,D)||D==="+"||D==="-"||D==="."))re+=V(D);else{if(D!==":"){if(I)return J;re="",Y=Xe,se=0;continue}if(I&&(R.isSpecial()!==M(Pt,re)||re==="file"&&(R.includesCredentials()||R.port!==null)||R.scheme==="file"&&!R.host))return;if(R.scheme=re,I)return void(R.isSpecial()&&Pt[R.scheme]===R.port&&(R.port=null));re="",R.scheme==="file"?Y=lt:R.isSpecial()&&k&&k.scheme===R.scheme?Y=ut:R.isSpecial()?Y=Te:$[se+1]==="/"?(Y=si,se++):(R.cannotBeABaseURL=!0,We(R.path,""),Y=Lt)}break;case Xe:if(!k||k.cannotBeABaseURL&&D!=="#")return J;if(k.cannotBeABaseURL&&D==="#"){R.scheme=k.scheme,R.path=K(k.path),R.query=k.query,R.fragment="",R.cannotBeABaseURL=!0,Y=c;break}Y=k.scheme==="file"?lt:Xt;continue;case ut:if(D!=="/"||$[se+1]!=="/"){Y=Xt;continue}Y=Ie,se++;break;case si:if(D==="/"){Y=xe;break}Y=Zt;continue;case Xt:if(R.scheme=k.scheme,D===a)R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query=k.query;else if(D==="/"||D==="\\"&&R.isSpecial())Y=he;else if(D==="?")R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query="",Y=di;else{if(D!=="#"){R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.path.length--,Y=Zt;continue}R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,R.path=K(k.path),R.query=k.query,R.fragment="",Y=c}break;case he:if(!R.isSpecial()||D!=="/"&&D!=="\\"){if(D!=="/"){R.username=k.username,R.password=k.password,R.host=k.host,R.port=k.port,Y=Zt;continue}Y=xe}else Y=Ie;break;case Te:if(Y=Ie,D!=="/"||Ee(re,se+1)!=="/")continue;se++;break;case Ie:if(D!=="/"&&D!=="\\"){Y=xe;continue}break;case xe:if(D==="@"){de&&(re="%40"+re),de=!0,N=G(re);for(var ve=0;ve65535)return ce;R.port=R.isSpecial()&&we===Pt[R.scheme]?null:we,re=""}if(I)return;Y=jt;continue}return ce}re+=D;break;case lt:if(R.scheme="file",D==="/"||D==="\\")Y=Rt;else{if(!k||k.scheme!=="file"){Y=Zt;continue}switch(D){case a:R.host=k.host,R.path=K(k.path),R.query=k.query;break;case"?":R.host=k.host,R.path=K(k.path),R.query="",Y=di;break;case"#":R.host=k.host,R.path=K(k.path),R.query=k.query,R.fragment="",Y=c;break;default:ti(De(K($,se),""))||(R.host=k.host,R.path=K(k.path),R.shortenPath()),Y=Zt;continue}}break;case Rt:if(D==="/"||D==="\\"){Y=St;break}k&&k.scheme==="file"&&!ti(De(K($,se),""))&&(Kt(k.path[0],!0)?We(R.path,k.path[0]):R.host=k.host),Y=Zt;continue;case St:if(D===a||D==="/"||D==="\\"||D==="?"||D==="#"){if(!I&&Kt(re))Y=Zt;else if(re===""){if(R.host="",I)return;Y=jt}else{if(z=R.parseHost(re))return z;if(R.host==="localhost"&&(R.host=""),I)return;re="",Y=jt}continue}re+=D;break;case jt:if(R.isSpecial()){if(Y=Zt,D!=="/"&&D!=="\\")continue}else if(I||D!=="?")if(I||D!=="#"){if(D!==a&&(Y=Zt,D!=="/"))continue}else R.fragment="",Y=c;else R.query="",Y=di;break;case Zt:if(D===a||D==="/"||D==="\\"&&R.isSpecial()||!I&&(D==="?"||D==="#")){if((q=V(q=re))===".."||q==="%2e."||q===".%2e"||q==="%2e%2e"?(R.shortenPath(),D==="/"||D==="\\"&&R.isSpecial()||We(R.path,"")):$e(re)?D==="/"||D==="\\"&&R.isSpecial()||We(R.path,""):(R.scheme==="file"&&!R.path.length&&Kt(re)&&(R.host&&(R.host=""),re=Ee(re,0)+":"),We(R.path,re)),re="",R.scheme==="file"&&(D===a||D==="?"||D==="#"))for(;R.path.length>1&&R.path[0]==="";)W(R.path);D==="?"?(R.query="",Y=di):D==="#"&&(R.fragment="",Y=c)}else re+=xt(D,gt);break;case Lt:D==="?"?(R.query="",Y=di):D==="#"?(R.fragment="",Y=c):D!==a&&(R.path[0]+=xt(D,bt));break;case di:I||D!=="#"?D!==a&&(D==="'"&&R.isSpecial()?R.query+="%27":R.query+=D==="#"?"%23":xt(D,bt)):(R.fragment="",Y=c);break;case c:D!==a&&(R.fragment+=xt(D,Tt))}se++}},parseHost:function(_){var I,k,$;if(Ee(_,0)==="["){if(Ee(_,_.length-1)!=="]"||(I=function(D){var N,z,q,R,Y,se,re,de=[0,0,0,0,0,0,0,0],oe=0,_e=null,ve=0,Ae=function(){return Ee(D,ve)};if(Ae()===":"){if(Ee(D,1)!==":")return;ve+=2,_e=++oe}for(;Ae();){if(oe===8)return;if(Ae()!==":"){for(N=z=0;z<4&&Be(ct,Ae());)N=16*N+me(Ae(),16),ve++,z++;if(Ae()==="."){if(z===0||(ve-=z,oe>6))return;for(q=0;Ae();){if(R=null,q>0){if(!(Ae()==="."&&q<4))return;ve++}if(!Be(Ce,Ae()))return;for(;Be(Ce,Ae());){if(Y=me(Ae(),10),R===null)R=Y;else{if(R===0)return;R=10*R+Y}if(R>255)return;ve++}de[oe]=256*de[oe]+R,++q!=2&&q!==4||oe++}if(q!==4)return;break}if(Ae()===":"){if(ve++,!Ae())return}else if(Ae())return;de[oe++]=N}else{if(_e!==null)return;ve++,_e=++oe}}if(_e!==null)for(se=oe-_e,oe=7;oe!==0&&se>0;)re=de[oe],de[oe--]=de[_e+se-1],de[_e+--se]=re;else if(oe!==8)return;return de}(U(_,1,-1)),!I))return le;this.host=I}else if(this.isSpecial()){if(_=Z(_),Be(Se,_)||(I=function(D){var N,z,q,R,Y,se,re,de=L(D,".");if(de.length&&de[de.length-1]===""&&de.length--,(N=de.length)>4)return D;for(z=[],q=0;q1&&Ee(R,0)==="0"&&(Y=Be(pe,R)?16:8,R=U(R,Y===8?1:2)),R==="")se=0;else{if(!Be(Y===10?Et:Y===8?Re:ct,R))return D;se=me(R,Y)}We(z,se)}for(q=0;q=Oe(256,5-N))return null}else if(se>255)return null;for(re=Ke(z),q=0;q1?arguments[1]:void 0,$=O(I,new A(_,!1,k));s||(I.href=$.serialize(),I.origin=$.getOrigin(),I.protocol=$.getProtocol(),I.username=$.getUsername(),I.password=$.getPassword(),I.host=$.getHost(),I.hostname=$.getHostname(),I.port=$.getPort(),I.pathname=$.getPathname(),I.search=$.getSearch(),I.searchParams=$.getSearchParams(),I.hash=$.getHash())},r=o.prototype,y=function(_,I){return{get:function(){return j(this)[_]()},set:I&&function(k){return j(this)[I](k)},configurable:!0,enumerable:!0}};if(s&&(x(r,"href",y("serialize","setHref")),x(r,"origin",y("getOrigin")),x(r,"protocol",y("getProtocol","setProtocol")),x(r,"username",y("getUsername","setUsername")),x(r,"password",y("getPassword","setPassword")),x(r,"host",y("getHost","setHost")),x(r,"hostname",y("getHostname","setHostname")),x(r,"port",y("getPort","setPort")),x(r,"pathname",y("getPathname","setPathname")),x(r,"search",y("getSearch","setSearch")),x(r,"searchParams",y("getSearchParams")),x(r,"hash",y("getHash","setHash"))),B(r,"toJSON",function(){return j(this).serialize()},{enumerable:!0}),B(r,"toString",function(){return j(this).serialize()},{enumerable:!0}),ue){var C=ue.createObjectURL,w=ue.revokeObjectURL;C&&B(o,"createObjectURL",v(C,ue)),w&&B(o,"revokeObjectURL",v(w,ue))}T(o,"URL"),n({global:!0,constructor:!0,forced:!h,sham:!s},{URL:o})},4233:(l,p,t)=>{var a=t(6458),n=t(2809),s=t(9211),h=t(4347),E=t(9646),v=t(6656).CONFIGURABLE,S=t(3732),B=t(3587),x=B.enforce,P=B.get,M=String,F=Object.defineProperty,G=a("".slice),K=a("".replace),H=a([].join),Z=E&&!n(function(){return F(function(){},"length",{value:8}).length!==8}),ie=String(String).split("String"),T=l.exports=function(m,g,f){G(M(g),0,7)==="Symbol("&&(g="["+K(M(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),f&&f.getter&&(g="get "+g),f&&f.setter&&(g="set "+g),(!h(m,"name")||v&&m.name!==g)&&(E?F(m,"name",{value:g,configurable:!0}):m.name=g),Z&&f&&h(f,"arity")&&m.length!==f.arity&&F(m,"length",{value:f.arity});try{f&&h(f,"constructor")&&f.constructor?E&&F(m,"prototype",{writable:!1}):m.prototype&&(m.prototype=void 0)}catch{}var O=x(m);return h(O,"source")||(O.source=H(ie,typeof g=="string"?g:"")),m};Function.prototype.toString=T(function(){return s(this)&&P(this).source||S(this)},"toString")},4346:(l,p,t)=>{var a=t(2809),n=t(9211),s=/#|\.prototype\./,h=function(x,P){var M=v[E(x)];return M===B||M!==S&&(n(P)?a(P):!!P)},E=h.normalize=function(x){return String(x).replace(s,".").toLowerCase()},v=h.data={},S=h.NATIVE="N",B=h.POLYFILL="P";l.exports=h},4347:(l,p,t)=>{var a=t(6458),n=t(9083),s=a({}.hasOwnProperty);l.exports=Object.hasOwn||function(h,E){return s(n(h),E)}},4383:(l,p,t)=>{t.d(p,{Al:()=>s,Qn:()=>E,Xu:()=>v,j4:()=>h});var a,n=(a=function(S,B){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,P){x.__proto__=P}||function(x,P){for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(x[M]=P[M])},a(S,B)},function(S,B){if(typeof B!="function"&&B!==null)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function x(){this.constructor=S}a(S,B),S.prototype=B===null?Object.create(B):(x.prototype=B.prototype,new x)}),s=function(){function S(B){this.name="RuntimeException",this._message=B}return Object.defineProperty(S.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),S.prototype.toString=function(){return this.name+": "+this.message},S}(),h=function(S){function B(x){var P=S.call(this,x)||this;return P.name="IllegalStateException",P}return n(B,S),B}(s),E=function(S){function B(x){var P=S.call(this,x)||this;return P.name="InvalidArgumentException",P}return n(B,S),B}(s),v=function(S){function B(x){var P=S.call(this,x)||this;return P.name="NotImplementedException",P}return n(B,S),B}(s)},4417:(l,p,t)=>{var a=t(6458),n=t(4685),s=t(6677),h=t(5840),E=a("".charAt),v=a("".charCodeAt),S=a("".slice),B=function(x){return function(P,M){var F,G,K=s(h(P)),H=n(M),Z=K.length;return H<0||H>=Z?x?"":void 0:(F=v(K,H))<55296||F>56319||H+1===Z||(G=v(K,H+1))<56320||G>57343?x?E(K,H):F:x?S(K,H,H+2):G-56320+(F-55296<<10)+65536}};l.exports={codeAt:B(!1),charAt:B(!0)}},4468:(l,p,t)=>{var a=t(1562),n=t(9211),s=a.WeakMap;l.exports=n(s)&&/native code/.test(String(s))},4478:(l,p,t)=>{var a=t(7042),n=t(815),s=t(9083),h=t(5957),E=t(2915),v=t(2671),S=t(256),B=t(8286),x=t(279),P=t(9273),M=Array;l.exports=function(F){var G=s(F),K=v(this),H=arguments.length,Z=H>1?arguments[1]:void 0,ie=Z!==void 0;ie&&(Z=a(Z,H>2?arguments[2]:void 0));var T,m,g,f,O,j,Q=P(G),ee=0;if(!Q||this===M&&E(Q))for(T=S(G),m=K?new this(T):M(T);T>ee;ee++)j=ie?Z(G[ee],ee):G[ee],B(m,ee,j);else for(m=K?new this:[],O=(f=x(G,Q)).next;!(g=n(O,f)).done;ee++)j=ie?h(f,Z,[g.value,ee],!0):g.value,B(m,ee,j);return m.length=ee,m}},4579:(l,p,t)=>{var a=t(9364),n=t(6458),s=t(7024),h=RangeError,E=String.fromCharCode,v=String.fromCodePoint,S=n([].join);a({target:"String",stat:!0,arity:1,forced:!!v&&v.length!==1},{fromCodePoint:function(B){for(var x,P=[],M=arguments.length,F=0;M>F;){if(x=+arguments[F++],s(x,1114111)!==x)throw new h(x+" is not a valid code point");P[F]=x<65536?E(x):E(55296+((x-=65536)>>10),x%1024+56320)}return S(P,"")}})},4659:(l,p,t)=>{var a=t(9364),n=t(9646),s=t(3643).f;a({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!n},{defineProperty:s})},4685:(l,p,t)=>{var a=t(9879);l.exports=function(n){var s=+n;return s!=s||s===0?0:a(s)}},4715:(l,p,t)=>{var a=t(5057);l.exports=a("document","documentElement")},4742:(l,p,t)=>{var a=t(9364),n=t(1684).left,s=t(5888),h=t(4941);a({target:"Array",proto:!0,forced:!t(3479)&&h>79&&h<83||!s("reduce")},{reduce:function(E){var v=arguments.length;return n(this,E,v,v>1?arguments[1]:void 0)}})},4879:(l,p,t)=>{var a=t(1562),n=t(9402),s=t(62),h=t(2578),E=t(9277),v=t(1541),S=t(7553)("iterator"),B=h.values,x=function(M,F){if(M){if(M[S]!==B)try{E(M,S,B)}catch{M[S]=B}if(v(M,F,!0),n[F]){for(var G in h)if(M[G]!==h[G])try{E(M,G,h[G])}catch{M[G]=h[G]}}}};for(var P in n)x(a[P]&&a[P].prototype,P);x(s,"DOMTokenList")},4884:(l,p,t)=>{var a=t(526),n=t(2719),s=t(2630).f,h=t(8626),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(v){return E&&a(v)==="Window"?function(S){try{return s(S)}catch{return h(E)}}(v):s(n(v))}},4941:(l,p,t)=>{var a,n,s=t(1562),h=t(8053),E=s.process,v=s.Deno,S=E&&E.versions||v&&v.version,B=S&&S.v8;B&&(n=(a=B.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!n&&h&&(!(a=h.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=h.match(/Chrome\/(\d+)/))&&(n=+a[1]),l.exports=n},4955:(l,p,t)=>{var a=t(6458),n=2147483647,s=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,E="Overflow: input needs wider integers to process",v=RangeError,S=a(h.exec),B=Math.floor,x=String.fromCharCode,P=a("".charCodeAt),M=a([].join),F=a([].push),G=a("".replace),K=a("".split),H=a("".toLowerCase),Z=function(m){return m+22+75*(m<26)},ie=function(m,g,f){var O=0;for(m=f?B(m/700):m>>1,m+=B(m/g);m>455;)m=B(m/35),O+=36;return B(O+36*m/(m+38))},T=function(m){var g=[];m=function(We){for(var Me=[],W=0,L=We.length;W=55296&&U<=56319&&W=Q&&OB((n-ee)/Oe))throw new v(E);for(ee+=(ge-Q)*Oe,Q=ge,f=0;fn)throw new v(E);if(O===Q){for(var Ee=ee,Be=36;;){var De=Be<=ue?1:Be>=ue+26?26:Be-ue;if(Ee{var a=t(7042),n=t(6458),s=t(5273),h=t(9083),E=t(256),v=t(2807),S=n([].push),B=function(x){var P=x===1,M=x===2,F=x===3,G=x===4,K=x===6,H=x===7,Z=x===5||K;return function(ie,T,m,g){for(var f,O,j=h(ie),Q=s(j),ee=E(Q),ue=a(T,m),fe=0,me=g||v,ge=P?me(ie,ee):M||H?me(ie,0):void 0;ee>fe;fe++)if((Z||fe in Q)&&(O=ue(f=Q[fe],fe,j),x))if(P)ge[fe]=O;else if(O)switch(x){case 3:return!0;case 5:return f;case 6:return fe;case 2:S(ge,f)}else switch(x){case 4:return!1;case 7:S(ge,f)}return K?-1:F||G?G:ge}};l.exports={forEach:B(0),map:B(1),filter:B(2),some:B(3),every:B(4),find:B(5),findIndex:B(6),filterReject:B(7)}},4985:l=>{var p=String;l.exports=function(t){try{return p(t)}catch{return"Object"}}},5057:(l,p,t)=>{var a=t(1562),n=t(9211);l.exports=function(s,h){return arguments.length<2?(E=a[s],n(E)?E:void 0):a[s]&&a[s][h];var E}},5273:(l,p,t)=>{var a=t(6458),n=t(2809),s=t(526),h=Object,E=a("".split);l.exports=n(function(){return!h("z").propertyIsEnumerable(0)})?function(v){return s(v)==="String"?E(v,""):h(v)}:h},5307:l=>{var p=Object.prototype.hasOwnProperty,t="~";function a(){}function n(v,S,B){this.fn=v,this.context=S,this.once=B||!1}function s(v,S,B,x,P){if(typeof B!="function")throw new TypeError("The listener must be a function");var M=new n(B,x||v,P),F=t?t+S:S;return v._events[F]?v._events[F].fn?v._events[F]=[v._events[F],M]:v._events[F].push(M):(v._events[F]=M,v._eventsCount++),v}function h(v,S){--v._eventsCount==0?v._events=new a:delete v._events[S]}function E(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1)),E.prototype.eventNames=function(){var v,S,B=[];if(this._eventsCount===0)return B;for(S in v=this._events)p.call(v,S)&&B.push(t?S.slice(1):S);return Object.getOwnPropertySymbols?B.concat(Object.getOwnPropertySymbols(v)):B},E.prototype.listeners=function(v){var S=t?t+v:v,B=this._events[S];if(!B)return[];if(B.fn)return[B.fn];for(var x=0,P=B.length,M=new Array(P);x{var a=t(9364),n=t(6458),s=t(5273),h=t(2719),E=t(5888),v=n([].join);a({target:"Array",proto:!0,forced:s!==Object||!E("join",",")},{join:function(S){return v(h(this),S===void 0?",":S)}})},5347:(l,p,t)=>{var a=t(9364),n=t(2377);a({target:"Array",proto:!0,forced:[].forEach!==n},{forEach:n})},5405:(l,p,t)=>{var a=t(9211),n=t(4152),s=t(6641);l.exports=function(h,E,v){var S,B;return s&&a(S=E.constructor)&&S!==v&&n(B=S.prototype)&&B!==v.prototype&&s(h,B),h}},5597:(l,p,t)=>{var a=t(9364),n=t(9377);a({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},5599:l=>{l.exports=function(p){return p==null}},5716:(l,p,t)=>{var a=t(6458),n=t(9083),s=Math.floor,h=a("".charAt),E=a("".replace),v=a("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,B=/\$([$&'`]|\d{1,2})/g;l.exports=function(x,P,M,F,G,K){var H=M+x.length,Z=F.length,ie=B;return G!==void 0&&(G=n(G),ie=S),E(K,ie,function(T,m){var g;switch(h(m,0)){case"$":return"$";case"&":return x;case"`":return v(P,0,M);case"'":return v(P,H);case"<":g=G[v(m,1,-1)];break;default:var f=+m;if(f===0)return T;if(f>Z){var O=s(f/10);return O===0?T:O<=Z?F[O-1]===void 0?h(m,1):F[O-1]+h(m,1):T}g=F[f-1]}return g===void 0?"":g})}},5727:(l,p,t)=>{var a=t(5057),n=t(9211),s=t(9615),h=t(9742),E=Object;l.exports=h?function(v){return typeof v=="symbol"}:function(v){var S=a("Symbol");return n(S)&&s(S.prototype,E(v))}},5736:(l,p,t)=>{var a=t(9211),n=t(4985),s=TypeError;l.exports=function(h){if(a(h))return h;throw new s(n(h)+" is not a function")}},5758:(l,p,t)=>{var a=t(9364),n=t(4979).filter;a({target:"Array",proto:!0,forced:!t(8611)("filter")},{filter:function(s){return n(this,s,arguments.length>1?arguments[1]:void 0)}})},5810:(l,p,t)=>{var a=t(526);l.exports=Array.isArray||function(n){return a(n)==="Array"}},5840:(l,p,t)=>{var a=t(5599),n=TypeError;l.exports=function(s){if(a(s))throw new n("Can't call method on "+s);return s}},5888:(l,p,t)=>{var a=t(2809);l.exports=function(n,s){var h=[][n];return!!h&&a(function(){h.call(null,s||function(){return 1},1)})}},5957:(l,p,t)=>{var a=t(7749),n=t(8401);l.exports=function(s,h,E,v){try{return v?h(a(E)[0],E[1]):h(E)}catch(S){n(s,"throw",S)}}},5993:(l,p,t)=>{var a=t(1562),n=t(8053),s=t(526),h=function(E){return n.slice(0,E.length)===E};l.exports=h("Bun/")?"BUN":h("Cloudflare-Workers")?"CLOUDFLARE":h("Deno/")?"DENO":h("Node.js/")?"NODE":a.Bun&&typeof Bun.version=="string"?"BUN":a.Deno&&typeof Deno.version=="object"?"DENO":s(a.process)==="process"?"NODE":a.window&&a.document?"BROWSER":"REST"},6033:(l,p,t)=>{var a=t(1562);t(1541)(a.JSON,"JSON",!0)},6041:(l,p,t)=>{t(7267),t(804),t(1766),t(3992),t(947)},6071:(l,p,t)=>{var a=t(9646),n=t(2809),s=t(1465);l.exports=!a&&!n(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!==7})},6122:(l,p,t)=>{var a,n=t(7749),s=t(7815),h=t(6853),E=t(7923),v=t(4715),S=t(1465),B=t(577),x="prototype",P="script",M=B("IE_PROTO"),F=function(){},G=function(Z){return"<"+P+">"+Z+""},K=function(Z){Z.write(G("")),Z.close();var ie=Z.parentWindow.Object;return Z=null,ie},H=function(){try{a=new ActiveXObject("htmlfile")}catch{}var Z,ie,T;H=typeof document<"u"?document.domain&&a?K(a):(ie=S("iframe"),T="java"+P+":",ie.style.display="none",v.appendChild(ie),ie.src=String(T),(Z=ie.contentWindow.document).open(),Z.write(G("document.F=Object")),Z.close(),Z.F):K(a);for(var m=h.length;m--;)delete H[x][h[m]];return H()};E[M]=!0,l.exports=Object.create||function(Z,ie){var T;return Z!==null?(F[x]=n(Z),T=new F,F[x]=null,T[M]=Z):T=H(),ie===void 0?T:s.f(T,ie)}},6263:(l,p,t)=>{var a=t(6656).PROPER,n=t(3930),s=t(7749),h=t(6677),E=t(2809),v=t(1144),S="toString",B=RegExp.prototype,x=B[S],P=E(function(){return x.call({source:"a",flags:"b"})!=="/a/b"}),M=a&&x.name!==S;(P||M)&&n(B,S,function(){var F=s(this);return"/"+h(F.source)+"/"+h(v(F))},{unsafe:!0})},6285:(l,p,t)=>{var a=t(1562);l.exports=a},6288:(l,p,t)=>{var a=t(2809),n=t(1562).RegExp;l.exports=a(function(){var s=n("(?b)","g");return s.exec("b").groups.a!=="b"||"b".replace(s,"$c")!=="bc"})},6330:l=>{l.exports=function(p,t){return{enumerable:!(1&p),configurable:!(2&p),writable:!(4&p),value:t}}},6383:(l,p,t)=>{var a=t(9364),n=t(1562);a({global:!0,forced:n.globalThis!==n},{globalThis:n})},6399:(l,p,t)=>{t.d(p,{A:()=>a});const a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},6458:(l,p,t)=>{var a=t(6898),n=Function.prototype,s=n.call,h=a&&n.bind.bind(s,s);l.exports=a?h:function(E){return function(){return s.apply(E,arguments)}}},6641:(l,p,t)=>{var a=t(1432),n=t(4152),s=t(5840),h=t(1068);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var E,v=!1,S={};try{(E=a(Object.prototype,"__proto__","set"))(S,[]),v=S instanceof Array}catch{}return function(B,x){return s(B),h(x),n(B)&&(v?E(B,x):B.__proto__=x),B}}():void 0)},6656:(l,p,t)=>{var a=t(9646),n=t(4347),s=Function.prototype,h=a&&Object.getOwnPropertyDescriptor,E=n(s,"name"),v=E&&(function(){}).name==="something",S=E&&(!a||a&&h(s,"name").configurable);l.exports={EXISTS:E,PROPER:v,CONFIGURABLE:S}},6666:(l,p,t)=>{var a=t(2809),n=t(7553),s=t(9646),h=t(9845),E=n("iterator");l.exports=!a(function(){var v=new URL("b?a=1&b=2&c=3","https://a"),S=v.searchParams,B=new URLSearchParams("a=1&a=2&b=3"),x="";return v.pathname="c%20d",S.forEach(function(P,M){S.delete("b"),x+=M+P}),B.delete("a",2),B.delete("b",void 0),h&&(!v.toJSON||!B.has("a",1)||B.has("a",2)||!B.has("a",void 0)||B.has("b"))||!S.size&&(h||!s)||!S.sort||v.href!=="https://a/c%20d?a=1&c=3"||S.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!S[E]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||x!=="a1c3"||new URL("https://x",void 0).host!=="x"})},6677:(l,p,t)=>{var a=t(497),n=String;l.exports=function(s){if(a(s)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return n(s)}},6728:(l,p,t)=>{var a=t(815),n=t(9518),s=t(7749),h=t(5599),E=t(2420),v=t(6677),S=t(5840),B=t(452),x=t(9987),P=t(9260);n("match",function(M,F,G){return[function(K){var H=S(this),Z=h(K)?void 0:B(K,M);return Z?a(Z,K,H):new RegExp(K)[M](v(H))},function(K){var H=s(this),Z=v(K),ie=G(F,H,Z);if(ie.done)return ie.value;if(!H.global)return P(H,Z);var T=H.unicode;H.lastIndex=0;for(var m,g=[],f=0;(m=P(H,Z))!==null;){var O=v(m[0]);g[f]=O,O===""&&(H.lastIndex=x(Z,E(H.lastIndex),T)),f++}return f===0?null:g}]})},6810:(l,p,t)=>{var a=t(4417).charAt,n=t(6677),s=t(3587),h=t(2382),E=t(1567),v="String Iterator",S=s.set,B=s.getterFor(v);h(String,"String",function(x){S(this,{type:v,string:n(x),index:0})},function(){var x,P=B(this),M=P.string,F=P.index;return F>=M.length?E(void 0,!0):(x=a(M,F),P.index+=x.length,E(x,!1))})},6815:(l,p,t)=>{var a=t(5057),n=t(7225),s=t(1541);n("toStringTag"),s(a("Symbol"),"Symbol")},6853:l=>{l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6898:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")})},6908:(l,p,t)=>{var a=t(815),n=t(9211),s=t(4152),h=TypeError;l.exports=function(E,v){var S,B;if(v==="string"&&n(S=E.toString)&&!s(B=a(S,E))||n(S=E.valueOf)&&!s(B=a(S,E))||v!=="string"&&n(S=E.toString)&&!s(B=a(S,E)))return B;throw new h("Can't convert object to primitive value")}},7024:(l,p,t)=>{var a=t(4685),n=Math.max,s=Math.min;l.exports=function(h,E){var v=a(h);return v<0?n(v+E,0):s(v,E)}},7042:(l,p,t)=>{var a=t(458),n=t(5736),s=t(6898),h=a(a.bind);l.exports=function(E,v){return n(E),v===void 0?E:s?h(E,v):function(){return E.apply(v,arguments)}}},7225:(l,p,t)=>{var a=t(6285),n=t(4347),s=t(605),h=t(3643).f;l.exports=function(E){var v=a.Symbol||(a.Symbol={});n(v,E)||h(v,E,{value:s.f(E)})}},7267:(l,p,t)=>{var a=t(9364),n=t(1562),s=t(815),h=t(6458),E=t(9845),v=t(9646),S=t(7917),B=t(2809),x=t(4347),P=t(9615),M=t(7749),F=t(2719),G=t(4151),K=t(6677),H=t(6330),Z=t(6122),ie=t(7642),T=t(2630),m=t(4884),g=t(7819),f=t(2897),O=t(3643),j=t(7815),Q=t(7403),ee=t(3930),ue=t(1176),fe=t(3463),me=t(577),ge=t(7923),Oe=t(1002),Ee=t(7553),Be=t(605),De=t(7225),nt=t(4160),Ke=t(1541),We=t(3587),Me=t(4979).forEach,W=me("hidden"),L="Symbol",U="prototype",V=We.set,X=We.getterFor(L),J=Object[U],le=n.Symbol,ce=le&&le[U],ye=n.RangeError,ae=n.TypeError,Ce=n.QObject,pe=f.f,Re=O.f,Et=m.f,ct=Q.f,Se=h([].push),Ye=fe("symbols"),rt=fe("op-symbols"),zt=fe("wks"),Je=!Ce||!Ce[U]||!Ce[U].findChild,st=function($e,Ue,Fe){var Xe=pe(J,Ue);Xe&&delete J[Ue],Re($e,Ue,Fe),Xe&&$e!==J&&Re(J,Ue,Xe)},bt=v&&B(function(){return Z(Re({},"a",{get:function(){return Re(this,"a",{value:7}).a}})).a!==7})?st:Re,Tt=function($e,Ue){var Fe=Ye[$e]=Z(ce);return V(Fe,{type:L,tag:$e,description:Ue}),v||(Fe.description=Ue),Fe},gt=function($e,Ue,Fe){$e===J&>(rt,Ue,Fe),M($e);var Xe=G(Ue);return M(Fe),x(Ye,Xe)?(Fe.enumerable?(x($e,W)&&$e[W][Xe]&&($e[W][Xe]=!1),Fe=Z(Fe,{enumerable:H(0,!1)})):(x($e,W)||Re($e,W,H(1,Z(null))),$e[W][Xe]=!0),bt($e,Xe,Fe)):Re($e,Xe,Fe)},Vt=function($e,Ue){M($e);var Fe=F(Ue),Xe=ie(Fe).concat(ti(Fe));return Me(Xe,function(ut){v&&!s(xt,Fe,ut)||gt($e,ut,Fe[ut])}),$e},xt=function($e){var Ue=G($e),Fe=s(ct,this,Ue);return!(this===J&&x(Ye,Ue)&&!x(rt,Ue))&&(!(Fe||!x(this,Ue)||!x(Ye,Ue)||x(this,W)&&this[W][Ue])||Fe)},Pt=function($e,Ue){var Fe=F($e),Xe=G(Ue);if(Fe!==J||!x(Ye,Xe)||x(rt,Xe)){var ut=pe(Fe,Xe);return!ut||!x(Ye,Xe)||x(Fe,W)&&Fe[W][Xe]||(ut.enumerable=!0),ut}},Kt=function($e){var Ue=Et(F($e)),Fe=[];return Me(Ue,function(Xe){x(Ye,Xe)||x(ge,Xe)||Se(Fe,Xe)}),Fe},ti=function($e){var Ue=$e===J,Fe=Et(Ue?rt:F($e)),Xe=[];return Me(Fe,function(ut){!x(Ye,ut)||Ue&&!x(J,ut)||Se(Xe,Ye[ut])}),Xe};S||(ee(ce=(le=function(){if(P(ce,this))throw new ae("Symbol is not a constructor");var $e=arguments.length&&arguments[0]!==void 0?K(arguments[0]):void 0,Ue=Oe($e),Fe=function(Xe){var ut=this===void 0?n:this;ut===J&&s(Fe,rt,Xe),x(ut,W)&&x(ut[W],Ue)&&(ut[W][Ue]=!1);var si=H(1,Xe);try{bt(ut,Ue,si)}catch(Xt){if(!(Xt instanceof ye))throw Xt;st(ut,Ue,si)}};return v&&Je&&bt(J,Ue,{configurable:!0,set:Fe}),Tt(Ue,$e)})[U],"toString",function(){return X(this).tag}),ee(le,"withoutSetter",function($e){return Tt(Oe($e),$e)}),Q.f=xt,O.f=gt,j.f=Vt,f.f=Pt,T.f=m.f=Kt,g.f=ti,Be.f=function($e){return Tt(Ee($e),$e)},v&&(ue(ce,"description",{configurable:!0,get:function(){return X(this).description}}),E||ee(J,"propertyIsEnumerable",xt,{unsafe:!0}))),a({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:le}),Me(ie(zt),function($e){De($e)}),a({target:L,stat:!0,forced:!S},{useSetter:function(){Je=!0},useSimple:function(){Je=!1}}),a({target:"Object",stat:!0,forced:!S,sham:!v},{create:function($e,Ue){return Ue===void 0?Z($e):Vt(Z($e),Ue)},defineProperty:gt,defineProperties:Vt,getOwnPropertyDescriptor:Pt}),a({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Kt}),nt(),Ke(le,L),ge[W]=!0},7403:(l,p)=>{var t={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,n=a&&!t.call({1:2},1);p.f=n?function(s){var h=a(this,s);return!!h&&h.enumerable}:t},7477:(l,p,t)=>{var a=t(8635),n=t(9953),s=t(550),h=null,E=function(O,j){self.postMessage({msg:"logcat_callback",data:{type:O,logcat:j}})};function v(O,j){var Q={msg:s.A.INIT_SEGMENT,data:{type:O,data:j}};self.postMessage(Q,[j.data])}function S(O,j){var Q={msg:s.A.MEDIA_SEGMENT,data:{type:O,data:j}};self.postMessage(Q,[j.data])}function B(){var O={msg:s.A.LOADING_COMPLETE};self.postMessage(O)}function x(){var O={msg:s.A.RECOVERED_EARLY_EOF};self.postMessage(O)}function P(O){var j={msg:s.A.MEDIA_INFO,data:O};self.postMessage(j)}function M(O){var j={msg:s.A.METADATA_ARRIVED,data:O};self.postMessage(j)}function F(O){var j={msg:s.A.SCRIPTDATA_ARRIVED,data:O};self.postMessage(j)}function G(O){var j={msg:s.A.TIMED_ID3_METADATA_ARRIVED,data:O};self.postMessage(j)}function K(O){var j={msg:s.A.SMPTE2038_METADATA_ARRIVED,data:O};self.postMessage(j)}function H(O){var j={msg:s.A.SCTE35_METADATA_ARRIVED,data:O};self.postMessage(j)}function Z(O){var j={msg:s.A.PES_PRIVATE_DATA_DESCRIPTOR,data:O};self.postMessage(j)}function ie(O){var j={msg:s.A.PES_PRIVATE_DATA_ARRIVED,data:O};self.postMessage(j)}function T(O){var j={msg:s.A.STATISTICS_INFO,data:O};self.postMessage(j)}function m(O,j){self.postMessage({msg:s.A.IO_ERROR,data:{type:O,info:j}})}function g(O,j){self.postMessage({msg:s.A.DEMUX_ERROR,data:{type:O,info:j}})}function f(O){self.postMessage({msg:s.A.RECOMMEND_SEEKPOINT,data:O})}self.addEventListener("message",function(O){switch(O.data.cmd){case"init":(h=new n.A(O.data.param[0],O.data.param[1])).on(s.A.IO_ERROR,m),h.on(s.A.DEMUX_ERROR,g),h.on(s.A.INIT_SEGMENT,v),h.on(s.A.MEDIA_SEGMENT,S),h.on(s.A.LOADING_COMPLETE,B),h.on(s.A.RECOVERED_EARLY_EOF,x),h.on(s.A.MEDIA_INFO,P),h.on(s.A.METADATA_ARRIVED,M),h.on(s.A.SCRIPTDATA_ARRIVED,F),h.on(s.A.TIMED_ID3_METADATA_ARRIVED,G),h.on(s.A.SMPTE2038_METADATA_ARRIVED,K),h.on(s.A.SCTE35_METADATA_ARRIVED,H),h.on(s.A.PES_PRIVATE_DATA_DESCRIPTOR,Z),h.on(s.A.PES_PRIVATE_DATA_ARRIVED,ie),h.on(s.A.STATISTICS_INFO,T),h.on(s.A.RECOMMEND_SEEKPOINT,f);break;case"destroy":h&&(h.destroy(),h=null),self.postMessage({msg:"destroyed"});break;case"start":h==null||h.start();break;case"stop":h==null||h.stop();break;case"seek":h==null||h.seek(O.data.param);break;case"pause":h==null||h.pause();break;case"resume":h==null||h.resume();break;case"logging_config":var j=O.data.param;a.A.applyConfig(j),j.enableCallback===!0?a.A.addLogListener(E):a.A.removeLogListener(E)}})},7478:(l,p,t)=>{var a=t(4347),n=t(1209),s=t(2897),h=t(3643);l.exports=function(E,v,S){for(var B=n(v),x=h.f,P=s.f,M=0;M{var a=t(2809),n=t(1562).RegExp;l.exports=a(function(){var s=n(".","s");return!(s.dotAll&&s.test(` `)&&s.flags==="s")})},7553:(l,p,t)=>{var a=t(1562),n=t(3463),s=t(4347),h=t(1002),E=t(7917),v=t(9742),S=a.Symbol,B=n("wks"),x=v?S.for||S:S&&S.withoutSetter||h;l.exports=function(P){return s(B,P)||(B[P]=E&&s(S,P)?S[P]:x("Symbol."+P)),B[P]}},7642:(l,p,t)=>{var a=t(3430),n=t(6853);l.exports=Object.keys||function(s){return a(s,n)}},7677:(l,p,t)=>{var a=t(7749);l.exports=function(){var n=a(this),s="";return n.hasIndices&&(s+="d"),n.global&&(s+="g"),n.ignoreCase&&(s+="i"),n.multiline&&(s+="m"),n.dotAll&&(s+="s"),n.unicode&&(s+="u"),n.unicodeSets&&(s+="v"),n.sticky&&(s+="y"),s}},7712:(l,p,t)=>{var a=t(1147).IteratorPrototype,n=t(6122),s=t(6330),h=t(1541),E=t(2327),v=function(){return this};l.exports=function(S,B,x,P){var M=B+" Iterator";return S.prototype=n(a,{next:s(+!P,x)}),h(S,M,!1,!0),E[M]=v,S}},7749:(l,p,t)=>{var a=t(4152),n=String,s=TypeError;l.exports=function(h){if(a(h))return h;throw new s(n(h)+" is not an object")}},7815:(l,p,t)=>{var a=t(9646),n=t(2792),s=t(3643),h=t(7749),E=t(2719),v=t(7642);p.f=a&&!n?Object.defineProperties:function(S,B){h(S);for(var x,P=E(B),M=v(B),F=M.length,G=0;F>G;)s.f(S,x=M[G++],P[x]);return S}},7819:(l,p)=>{p.f=Object.getOwnPropertySymbols},7917:(l,p,t)=>{var a=t(4941),n=t(2809),s=t(1562).String;l.exports=!!Object.getOwnPropertySymbols&&!n(function(){var h=Symbol("symbol detection");return!s(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&a&&a<41})},7923:l=>{l.exports={}},7955:l=>{var p=TypeError;l.exports=function(t){if(t>9007199254740991)throw p("Maximum allowed index exceeded");return t}},7958:(l,p,t)=>{var a=t(8891),n=t(815),s=t(6458),h=t(9518),E=t(2809),v=t(7749),S=t(9211),B=t(5599),x=t(4685),P=t(2420),M=t(6677),F=t(5840),G=t(9987),K=t(452),H=t(5716),Z=t(9260),ie=t(7553)("replace"),T=Math.max,m=Math.min,g=s([].concat),f=s([].push),O=s("".indexOf),j=s("".slice),Q="a".replace(/./,"$0")==="$0",ee=!!/./[ie]&&/./[ie]("a","$0")==="";h("replace",function(ue,fe,me){var ge=ee?"$":"$0";return[function(Oe,Ee){var Be=F(this),De=B(Oe)?void 0:K(Oe,ie);return De?n(De,Oe,Be,Ee):n(fe,M(Be),Oe,Ee)},function(Oe,Ee){var Be=v(this),De=M(Oe);if(typeof Ee=="string"&&O(Ee,ge)===-1&&O(Ee,"$<")===-1){var nt=me(fe,Be,De,Ee);if(nt.done)return nt.value}var Ke=S(Ee);Ke||(Ee=M(Ee));var We,Me=Be.global;Me&&(We=Be.unicode,Be.lastIndex=0);for(var W,L=[];(W=Z(Be,De))!==null&&(f(L,W),Me);)M(W[0])===""&&(Be.lastIndex=G(De,P(Be.lastIndex),We));for(var U,V="",X=0,J=0;J=X&&(V+=j(De,X,ye)+le,X=ye+ce.length)}return V+j(De,X)}]},!!E(function(){var ue=/./;return ue.exec=function(){var fe=[];return fe.groups={a:"7"},fe},"".replace(ue,"$")!=="7"})||!Q||ee)},8053:(l,p,t)=>{var a=t(1562).navigator,n=a&&a.userAgent;l.exports=n?String(n):""},8098:(l,p,t)=>{t.d(p,{A:()=>ie});var a=t(2460);const n=function(){function T(){var m;this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,!((m=self.performance)===null||m===void 0)&&m.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return T.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},T.prototype.addBytes=function(m){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=m,this._totalBytes+=m):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=m,this._totalBytes+=m):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=m,this._totalBytes+=m,this._lastCheckpoint=this._now())},Object.defineProperty(T.prototype,"currentKBps",{get:function(){this.addBytes(0);var m=(this._now()-this._lastCheckpoint)/1e3;return m===0&&(m=1),this._intervalBytes/m/1024},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"averageKBps",{get:function(){var m=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/m/1024},enumerable:!1,configurable:!0}),T}();var s,h=t(9034),E=t(8870),v=t(4383),S=(s=function(T,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var O in f)Object.prototype.hasOwnProperty.call(f,O)&&(g[O]=f[O])},s(T,m)},function(T,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function g(){this.constructor=T}s(T,m),T.prototype=m===null?Object.create(m):(g.prototype=m.prototype,new g)});const B=function(T){function m(g,f){var O=T.call(this,"fetch-stream-loader")||this;return O.TAG="FetchStreamLoader",O._seekHandler=g,O._config=f,O._needStash=!0,O._requestAbort=!1,O._abortController=null,O._contentLength=null,O._receivedLength=0,O}return S(m,T),m.isSupported=function(){var g;try{var f=E.A.msedge&&(((g=E.A===null||E.A===void 0?void 0:E.A.version)===null||g===void 0?void 0:g.minor)||0)>=15048&&!E.A.webkit,O=!E.A.msedge||f;return self.fetch&&self.ReadableStream&&O}catch{return!1}},m.prototype.destroy=function(){this.isWorking()&&this.abort(),T.prototype.destroy.call(this)},m.prototype.open=function(g,f){var O=this;this._dataSource=g,this._range=f;var j=g.url;this._config.reuseRedirectedURL&&g.redirectedURL!==void 0&&(j=g.redirectedURL);var Q=this._seekHandler.getConfig(j,f),ee=new self.Headers;if(typeof Q.headers=="object"){var ue=Q.headers;for(var fe in ue)ue.hasOwnProperty(fe)&&ee.append(fe,ue[fe])}var me={method:"GET",headers:ee,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var fe in this._config.headers)ee.append(fe,this._config.headers[fe]);g.cors||(me.mode="same-origin"),g.withCredentials&&(me.credentials="include"),g!=null&&g.referrerPolicy&&(me.referrerPolicy=g.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,this._abortController&&(me.signal=this._abortController.signal)),this._status=h.eO.kConnecting,self.fetch(Q.url,me).then(function(ge){var Oe,Ee;if(O._requestAbort)return O._status=h.eO.kIdle,void((Oe=ge.body)===null||Oe===void 0||Oe.cancel());if(ge.ok&&ge.status>=200&&ge.status<=299){if(ge.url!==Q.url&&O._onURLRedirect){var Be=O._seekHandler.removeURLParameters(ge.url);O._onURLRedirect(Be)}var De=ge.headers.get("Content-Length");return De!=null&&(O._contentLength=parseInt(De),O._contentLength!==0&&O._onContentLengthKnown&&O._onContentLengthKnown(O._contentLength)),O._pump.call(O,(Ee=ge.body)===null||Ee===void 0?void 0:Ee.getReader())}if(O._status=h.eO.kError,!O._onError)throw new v.Al("FetchStreamLoader: Http code invalid, "+ge.status+" "+ge.statusText);O._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:ge.status,msg:ge.statusText})}).catch(function(ge){var Oe;if(!(!((Oe=O._abortController)===null||Oe===void 0)&&Oe.signal.aborted)){if(O._status=h.eO.kError,!O._onError)throw ge;O._onError(h.Xv.EXCEPTION,{code:-1,msg:ge.message})}})},m.prototype.abort=function(){var g;if(this._requestAbort=!0,(this._status!==h.eO.kBuffering||!E.A.chrome)&&this._abortController)try{(g=this._abortController)===null||g===void 0||g.abort()}catch{}},m.prototype._pump=function(g){var f=this;return g.read().then(function(O){var j,Q,ee,ue;if(O.done)if(f._contentLength!==null&&f._receivedLength299)){if(this._status=h.eO.kError,!this._onError)throw new v.Al("MozChunkedLoader: Http code invalid, "+f.status+" "+f.statusText);this._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:f.status,msg:f.statusText})}else this._status=h.eO.kBuffering}},m.prototype._onProgress=function(g){var f;if(this._status!==h.eO.kError){this._contentLength===null&&g.total!==null&&g.total!==0&&(this._contentLength=g.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var O=g.target.response,j=(((f=this._range)===null||f===void 0?void 0:f.from)||0)+this._receivedLength;this._receivedLength+=O.byteLength,this._onDataArrival&&this._onDataArrival(O,j,this._receivedLength)}},m.prototype._onLoadEnd=function(g){this._requestAbort?this._requestAbort=!1:this._status!==h.eO.kError&&(this._status=h.eO.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))},m.prototype._onXhrError=function(g){this._status=h.eO.kError;var f=0,O=null;if(this._contentLength&&g.loaded=this._contentLength&&(Q=(((f=this._range)===null||f===void 0?void 0:f.from)||0)+this._contentLength-1),this._currentRequestRange={from:j,to:Q},this._internalOpen(this._dataSource,this._currentRequestRange)},m.prototype._internalOpen=function(g,f){this._lastTimeLoaded=0;var O=g.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?O=this._currentRedirectedURL:g.redirectedURL!=null&&(O=g.redirectedURL));var j=this._seekHandler.getConfig(O,f);this._currentRequestURL=j.url;var Q=this._xhr=new XMLHttpRequest;if(Q.open("GET",j.url,!0),Q.responseType="arraybuffer",Q.onreadystatechange=this._onReadyStateChange.bind(this),Q.onprogress=this._onProgress.bind(this),Q.onload=this._onLoad.bind(this),Q.onerror=this._onXhrError.bind(this),g.withCredentials&&(Q.withCredentials=!0),typeof j.headers=="object"){var ee=j.headers;for(var ue in ee)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue])}if(typeof this._config.headers=="object")for(var ue in ee=this._config.headers)ee.hasOwnProperty(ue)&&Q.setRequestHeader(ue,ee[ue]);Q.send()},m.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=h.eO.kComplete},m.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},m.prototype._onReadyStateChange=function(g){var f=g.target;if(f.readyState===2){if(f.responseURL!=null){var O=this._seekHandler.removeURLParameters(f.responseURL);f.responseURL!==this._currentRequestURL&&O!==this._currentRedirectedURL&&(this._currentRedirectedURL=O,this._onURLRedirect&&this._onURLRedirect(O))}if(f.status>=200&&f.status<=299){if(this._waitForTotalLength)return;this._status=h.eO.kBuffering}else{if(this._status=h.eO.kError,!this._onError)throw new v.Al("RangeLoader: Http code invalid, "+f.status+" "+f.statusText);this._onError(h.Xv.HTTP_STATUS_CODE_INVALID,{code:f.status,msg:f.statusText})}}},m.prototype._onProgress=function(g){if(this._status!==h.eO.kError){if(this._contentLength===null){var f=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,f=!0;var O=g.total;this._internalAbort(),O!=null&&O!==0&&(this._totalLength=O)}if(this._range.to===-1?this._contentLength=(this._totalLength||0)-this._range.from:this._contentLength=this._range.to-this._range.from+1,f)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var j=g.loaded-this._lastTimeLoaded;this._lastTimeLoaded=g.loaded,this._speedSampler.addBytes(j)}},m.prototype._normalizeSpeed=function(g){var f=this._chunkSizeKBList,O=f.length-1,j=0,Q=0,ee=O;if(g=f[j]&&g=3&&(f=this._speedSampler.currentKBps)),f!==0){var O=this._normalizeSpeed(f);this._currentSpeedNormalized!==O&&(this._currentSpeedNormalized=O,this._currentChunkSizeKB=O)}var j=g.target.response,Q=this._range.from+this._receivedLength;this._receivedLength+=j.byteLength;var ee=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var Q=g.split("&"),ee=0;ee0;ue[0]!==this._startName&&ue[0]!==this._endName&&(fe&&(j+="&"),j+=Q[ee])}return j.length===0?f:f+"?"+j},T}(),ie=function(){function T(m,g,f){this.TAG="IOController",this._config=g,this._extraData=f,this._stashInitialSize=65536,g.stashInitialSize!==void 0&&g.stashInitialSize>0&&(this._stashInitialSize=g.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,g.enableStashBuffer||(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=m,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(m.url||""),this._refTotalLength=m.filesize?m.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new n,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return T.prototype.destroy=function(){var m,g,f;!((m=this._loader)===null||m===void 0)&&m.isWorking()&&((g=this._loader)===null||g===void 0||g.abort()),(f=this._loader)===null||f===void 0||f.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},T.prototype.isWorking=function(){var m;return((m=this._loader)===null||m===void 0?void 0:m.isWorking())&&!this._paused},T.prototype.isPaused=function(){return this._paused},Object.defineProperty(T.prototype,"status",{get:function(){var m;return(m=this._loader)===null||m===void 0?void 0:m.status},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"extraData",{get:function(){return this._extraData},set:function(m){this._extraData=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(m){this._onDataArrival=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(m){this._onSeeked=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onError",{get:function(){return this._onError},set:function(m){this._onError=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onComplete",{get:function(){return this._onComplete},set:function(m){this._onComplete=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(m){this._onRedirect=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(m){this._onRecoveredEarlyEof=m},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentURL",{get:function(){var m;return(m=this._dataSource)===null||m===void 0?void 0:m.url},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasRedirect",{get:function(){var m;return this._redirectedURL!=null||((m=this._dataSource)===null||m===void 0?void 0:m.redirectedURL)!==void 0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentRedirectedURL",{get:function(){var m;return this._redirectedURL||((m=this._dataSource)===null||m===void 0?void 0:m.redirectedURL)},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentSpeed",{get:function(){var m,g;return this._loaderClass===F?(m=this._loader)===null||m===void 0?void 0:m.currentSpeed:(g=this._speedSampler)===null||g===void 0?void 0:g.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"loaderType",{get:function(){var m;return(m=this._loader)===null||m===void 0?void 0:m.type},enumerable:!1,configurable:!0}),T.prototype._selectSeekHandler=function(){var m=this._config;if(m.seekType==="range")this._seekHandler=new H(!!this._config.rangeLoadZeroStart);else if(m.seekType==="param"){var g=m.seekParamStart||"bstart",f=m.seekParamEnd||"bend";this._seekHandler=new Z(g,f)}else{if(m.seekType!=="custom")throw new v.Qn("Invalid seekType in config: ".concat((m==null?void 0:m.seekType)||""));if(typeof m.customSeekHandler!="function")throw new v.Qn("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new m.customSeekHandler}},T.prototype._selectLoader=function(){var m;if(this._config.customLoader!=null)this._loaderClass=((m=this._config)===null||m===void 0?void 0:m.customLoader)||null;else if(this._isWebSocketURL)this._loaderClass=K;else if(B.isSupported())this._loaderClass=B;else if(P.isSupported())this._loaderClass=P;else{if(!F.isSupported())throw new v.Al("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=F}},T.prototype._createLoader=function(){var m;this._loaderClass&&(this._loader=new this._loaderClass(this._seekHandler,this._config),!((m=this._loader)===null||m===void 0)&&m.needStashBuffer||(this._enableStash=!1),this._loader&&(this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)))},T.prototype.open=function(m){var g,f;this._currentRange={from:0,to:-1},m&&(this._currentRange.from=m),(g=this._speedSampler)===null||g===void 0||g.reset(),m||(this._fullRequestFlag=!0),(f=this._loader)===null||f===void 0||f.open(this._dataSource,Object.assign({},this._currentRange))},T.prototype.abort=function(){var m;(m=this._loader)===null||m===void 0||m.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},T.prototype.pause=function(){var m,g;this.isWorking()&&((m=this._loader)===null||m===void 0||m.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange&&(this._currentRange.to=this._stashByteStart-1)):this._resumeFrom=(((g=this._currentRange)===null||g===void 0?void 0:g.to)||0)+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},T.prototype.resume=function(){if(this._paused){this._paused=!1;var m=this._resumeFrom;this._resumeFrom=0,this._internalSeek(m,!0)}},T.prototype.seek=function(m){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(m,!0)},T.prototype._internalSeek=function(m,g){var f,O,j,Q;!((f=this._loader)===null||f===void 0)&&f.isWorking()&&((O=this._loader)===null||O===void 0||O.abort()),this._flushStashBuffer(g),(j=this._loader)===null||j===void 0||j.destroy(),this._loader=null;var ee={from:m,to:-1};this._currentRange={from:ee.from,to:-1},(Q=this._speedSampler)===null||Q===void 0||Q.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ee),this._onSeeked&&this._onSeeked()},T.prototype.updateUrl=function(m){if(!m||typeof m!="string"||m.length===0)throw new v.Qn("Url must be a non-empty string!");this._dataSource.url=m},T.prototype._expandBuffer=function(m){for(var g=this._stashSize;g+10485760){var O=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(f,0,g).set(O,0)}this._stashBuffer=f,this._bufferSize=g}},T.prototype._normalizeSpeed=function(m){var g=this._speedNormalizeList,f=g.length-1,O=0,j=0,Q=f;if(m=g[O]&&m=512&&m<=1024?Math.floor(1.5*m):2*m)>8192&&(g=8192);var f=1024*g+1048576;this._bufferSize0){var ue=this._stashBuffer.slice(0,this._stashUsed);(ge=this._dispatchChunks(ue,this._stashByteStart))0&&(Oe=new Uint8Array(ue,ge),me.set(Oe,0),this._stashUsed=Oe.byteLength,this._stashByteStart+=ge):(this._stashUsed=0,this._stashByteStart+=ge),this._stashUsed+m.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+m.byteLength),me=new Uint8Array(this._stashBuffer,0,this._bufferSize)),me.set(new Uint8Array(m),this._stashUsed),this._stashUsed+=m.byteLength}else(ge=this._dispatchChunks(m,g))this._bufferSize&&(this._expandBuffer(fe),me=new Uint8Array(this._stashBuffer,0,this._bufferSize)),me.set(new Uint8Array(m,ge),0),this._stashUsed+=fe,this._stashByteStart=g+ge);else if(this._stashUsed===0){var fe;(ge=this._dispatchChunks(m,g))this._bufferSize&&this._expandBuffer(fe),(me=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(m,ge),0),this._stashUsed+=fe,this._stashByteStart=g+ge)}else{var me,ge;if(this._stashUsed+m.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+m.byteLength),(me=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(m),this._stashUsed),this._stashUsed+=m.byteLength,(ge=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))0){var Oe=new Uint8Array(this._stashBuffer,ge);me.set(Oe,0)}this._stashUsed-=ge,this._stashByteStart+=ge}}},T.prototype._flushStashBuffer=function(m){if(this._stashUsed>0){var g=this._stashBuffer.slice(0,this._stashUsed),f=this._dispatchChunks(g,this._stashByteStart),O=g.byteLength-f;if(f0){var j=new Uint8Array(this._stashBuffer,0,this._bufferSize),Q=new Uint8Array(g,f);j.set(Q,0),this._stashUsed=Q.byteLength,this._stashByteStart+=f}return 0}a.A.w(this.TAG,"".concat(O," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,O}return 0},T.prototype._onLoaderComplete=function(m,g){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},T.prototype._onLoaderError=function(m,g){var f;switch(a.A.e(this.TAG,"Loader error, code = ".concat(g.code,", msg = ").concat(g.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,m=h.Xv.UNRECOVERABLE_EARLY_EOF),m){case h.Xv.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var O=(((f=this._currentRange)===null||f===void 0?void 0:f.to)||0)+1;return void(O{var a=t(4347),n=t(9211),s=t(9083),h=t(577),E=t(8465),v=h("IE_PROTO"),S=Object,B=S.prototype;l.exports=E?S.getPrototypeOf:function(x){var P=s(x);if(a(P,v))return P[v];var M=P.constructor;return n(M)&&P instanceof M?M.prototype:P instanceof S?B:null}},8286:(l,p,t)=>{var a=t(9646),n=t(3643),s=t(6330);l.exports=function(h,E,v){a?n.f(h,E,s(0,v)):h[E]=v}},8401:(l,p,t)=>{var a=t(815),n=t(7749),s=t(452);l.exports=function(h,E,v){var S,B;n(h);try{if(!(S=s(h,"return"))){if(E==="throw")throw v;return v}S=a(S,h)}catch(x){B=!0,S=x}if(E==="throw")throw v;if(B)throw S;return n(S),v}},8465:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})},8587:(l,p,t)=>{var a=t(2809),n=t(1562).RegExp,s=a(function(){var v=n("a","y");return v.lastIndex=2,v.exec("abcd")!==null}),h=s||a(function(){return!n("a","y").sticky}),E=s||a(function(){var v=n("^r","gy");return v.lastIndex=2,v.exec("str")!==null});l.exports={BROKEN_CARET:E,MISSED_STICKY:h,UNSUPPORTED_Y:s}},8611:(l,p,t)=>{var a=t(2809),n=t(7553),s=t(4941),h=n("species");l.exports=function(E){return s>=51||!a(function(){var v=[];return(v.constructor={})[h]=function(){return{foo:1}},v[E](Boolean).foo!==1})}},8626:(l,p,t)=>{var a=t(6458);l.exports=a([].slice)},8635:(l,p,t)=>{t.d(p,{A:()=>s});var a=t(2139),n=t(2460);const s=function(){function h(){}return Object.defineProperty(h,"forceGlobalTag",{get:function(){return n.A.FORCE_GLOBAL_TAG},set:function(E){n.A.FORCE_GLOBAL_TAG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"globalTag",{get:function(){return n.A.GLOBAL_TAG},set:function(E){n.A.GLOBAL_TAG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableAll",{get:function(){return n.A.ENABLE_VERBOSE&&n.A.ENABLE_DEBUG&&n.A.ENABLE_INFO&&n.A.ENABLE_WARN&&n.A.ENABLE_ERROR},set:function(E){n.A.ENABLE_VERBOSE=E,n.A.ENABLE_DEBUG=E,n.A.ENABLE_INFO=E,n.A.ENABLE_WARN=E,n.A.ENABLE_ERROR=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableDebug",{get:function(){return n.A.ENABLE_DEBUG},set:function(E){n.A.ENABLE_DEBUG=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableVerbose",{get:function(){return n.A.ENABLE_VERBOSE},set:function(E){n.A.ENABLE_VERBOSE=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableInfo",{get:function(){return n.A.ENABLE_INFO},set:function(E){n.A.ENABLE_INFO=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableWarn",{get:function(){return n.A.ENABLE_WARN},set:function(E){n.A.ENABLE_WARN=E,h._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"enableError",{get:function(){return n.A.ENABLE_ERROR},set:function(E){n.A.ENABLE_ERROR=E,h._notifyChange()},enumerable:!1,configurable:!0}),h.getConfig=function(){return{globalTag:n.A.GLOBAL_TAG,forceGlobalTag:n.A.FORCE_GLOBAL_TAG,enableVerbose:n.A.ENABLE_VERBOSE,enableDebug:n.A.ENABLE_DEBUG,enableInfo:n.A.ENABLE_INFO,enableWarn:n.A.ENABLE_WARN,enableError:n.A.ENABLE_ERROR,enableCallback:n.A.ENABLE_CALLBACK}},h.applyConfig=function(E){n.A.GLOBAL_TAG=E.globalTag,n.A.FORCE_GLOBAL_TAG=E.forceGlobalTag,n.A.ENABLE_VERBOSE=E.enableVerbose,n.A.ENABLE_DEBUG=E.enableDebug,n.A.ENABLE_INFO=E.enableInfo,n.A.ENABLE_WARN=E.enableWarn,n.A.ENABLE_ERROR=E.enableError,n.A.ENABLE_CALLBACK=!!E.enableCallback},h._notifyChange=function(){var E=h.emitter;if(E.listenerCount("change")>0){var v=h.getConfig();E.emit("change",v)}},h.registerListener=function(E){h.emitter.addListener("change",E)},h.removeListener=function(E){h.emitter.removeListener("change",E)},h.addLogListener=function(E){n.A.emitter.addListener("log",E),n.A.emitter.listenerCount("log")>0&&(n.A.ENABLE_CALLBACK=!0,h._notifyChange())},h.removeLogListener=function(E){n.A.emitter.removeListener("log",E),n.A.emitter.listenerCount("log")===0&&(n.A.ENABLE_CALLBACK=!1,h._notifyChange())},h.emitter=new a.A,h}()},8845:(l,p,t)=>{var a=t(9364),n=t(9646),s=t(1562),h=t(6458),E=t(4347),v=t(9211),S=t(9615),B=t(6677),x=t(1176),P=t(7478),M=s.Symbol,F=M&&M.prototype;if(n&&v(M)&&(!("description"in F)||M().description!==void 0)){var G={},K=function(){var f=arguments.length<1||arguments[0]===void 0?void 0:B(arguments[0]),O=S(F,this)?new M(f):f===void 0?M():M(f);return f===""&&(G[O]=!0),O};P(K,M),K.prototype=F,F.constructor=K;var H=String(M("description detection"))==="Symbol(description detection)",Z=h(F.valueOf),ie=h(F.toString),T=/^Symbol\((.*)\)[^)]+$/,m=h("".replace),g=h("".slice);x(F,"description",{configurable:!0,get:function(){var f=Z(this);if(E(G,f))return"";var O=ie(f),j=H?g(O,7,-1):m(O,T,"$1");return j===""?void 0:j}}),a({global:!0,constructor:!0,forced:!0},{Symbol:K})}},8862:(l,p,t)=>{var a=t(1562),n=t(9402),s=t(62),h=t(2377),E=t(9277),v=function(B){if(B&&B.forEach!==h)try{E(B,"forEach",h)}catch{B.forEach=h}};for(var S in n)n[S]&&v(a[S]&&a[S].prototype);v(s)},8870:(l,p,t)=>{t.d(p,{A:()=>n});var a={};(function(){var s=self.navigator.userAgent.toLowerCase(),h=/(edge)\/([\w.]+)/.exec(s)||/(opr)[\/]([\w.]+)/.exec(s)||/(chrome)[ \/]([\w.]+)/.exec(s)||/(iemobile)[\/]([\w.]+)/.exec(s)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(s)||/(webkit)[ \/]([\w.]+)/.exec(s)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||s.includes("trident")&&/(rv)(?::| )([\w.]+)/.exec(s)||!s.includes("compatible")&&/(firefox)[ \/]([\w.]+)/.exec(s)||[],E=/(ipad)/.exec(s)||/(ipod)/.exec(s)||/(windows phone)/.exec(s)||/(iphone)/.exec(s)||/(kindle)/.exec(s)||/(android)/.exec(s)||/(windows)/.exec(s)||/(mac)/.exec(s)||/(linux)/.exec(s)||/(cros)/.exec(s)||[],v={browser:h[5]||h[3]||h[1]||"",version:h[2]||h[4]||"0",majorVersion:h[4]||h[2]||"0",platform:E[0]||""},S={};if(v.browser){S[v.browser]=!0;var B=v.majorVersion.split(".");S.version={major:parseInt(v.majorVersion,10),string:v.version},B.length>1&&(S.version.minor=parseInt(B[1],10)),B.length>2&&(S.version.build=parseInt(B[2],10))}if(v.platform&&(S[v.platform]=!0),(S.chrome||S.opr||S.safari)&&(S.webkit=!0),S.rv||S.iemobile){S.rv&&delete S.rv;var x="msie";v.browser=x,S[x]=!0}if(S.edge){delete S.edge;var P="msedge";v.browser=P,S[P]=!0}if(S.opr){var M="opera";v.browser=M,S[M]=!0}if(S.safari&&S.android){var F="android";v.browser=F,S[F]=!0}for(var G in S.name=v.browser,S.platform=v.platform,a)Object.prototype.hasOwnProperty.call(a,G)&&delete a[G];Object.assign(a,S)})();const n=a},8873:(l,p,t)=>{var a=t(3930);l.exports=function(n,s,h){for(var E in s)a(n,E,s[E],h);return n}},8891:(l,p,t)=>{var a=t(6898),n=Function.prototype,s=n.apply,h=n.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(a?h.bind(s):function(){return h.apply(s,arguments)})},9034:(l,p,t)=>{t.d(p,{HC:()=>h,Xv:()=>s,eO:()=>n});var a=t(4383),n={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},s={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},h=function(){function E(v){this._type=v||"undefined",this._status=n.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return E.prototype.destroy=function(){this._status=n.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},E.prototype.isWorking=function(){return this._status===n.kConnecting||this._status===n.kBuffering},Object.defineProperty(E.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(v){this._onContentLengthKnown=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(v){this._onURLRedirect=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(v){this._onDataArrival=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onError",{get:function(){return this._onError},set:function(v){this._onError=v},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onComplete",{get:function(){return this._onComplete},set:function(v){this._onComplete=v},enumerable:!1,configurable:!0}),E.prototype.open=function(v,S){throw new a.Xu("Unimplemented abstract function!")},E.prototype.abort=function(){throw new a.Xu("Unimplemented abstract function!")},E}()},9047:(l,p,t)=>{var a=t(5810),n=t(2671),s=t(4152),h=t(7553)("species"),E=Array;l.exports=function(v){var S;return a(v)&&(S=v.constructor,(n(S)&&(S===E||a(S.prototype))||s(S)&&(S=S[h])===null)&&(S=void 0)),S===void 0?E:S}},9083:(l,p,t)=>{var a=t(5840),n=Object;l.exports=function(s){return n(a(s))}},9211:l=>{var p=typeof document=="object"&&document.all;l.exports=p===void 0&&p!==void 0?function(t){return typeof t=="function"||t===p}:function(t){return typeof t=="function"}},9260:(l,p,t)=>{var a=t(815),n=t(7749),s=t(9211),h=t(526),E=t(9377),v=TypeError;l.exports=function(S,B){var x=S.exec;if(s(x)){var P=a(x,S,B);return P!==null&&n(P),P}if(h(S)==="RegExp")return a(E,S,B);throw new v("RegExp#exec called on incompatible receiver")}},9266:(l,p,t)=>{var a=t(7917);l.exports=a&&!!Symbol.for&&!!Symbol.keyFor},9273:(l,p,t)=>{var a=t(497),n=t(452),s=t(5599),h=t(2327),E=t(7553)("iterator");l.exports=function(v){if(!s(v))return n(v,E)||n(v,"@@iterator")||h[a(v)]}},9277:(l,p,t)=>{var a=t(9646),n=t(3643),s=t(6330);l.exports=a?function(h,E,v){return n.f(h,E,s(1,v))}:function(h,E,v){return h[E]=v,h}},9364:(l,p,t)=>{var a=t(1562),n=t(2897).f,s=t(9277),h=t(3930),E=t(4191),v=t(7478),S=t(4346);l.exports=function(B,x){var P,M,F,G,K,H=B.target,Z=B.global,ie=B.stat;if(P=Z?a:ie?a[H]||E(H,{}):a[H]&&a[H].prototype)for(M in x){if(G=x[M],F=B.dontCallGetSet?(K=n(P,M))&&K.value:P[M],!S(Z?M:H+(ie?".":"#")+M,B.forced)&&F!==void 0){if(typeof G==typeof F)continue;v(G,F)}(B.sham||F&&F.sham)&&s(G,"sham",!0),h(P,M,G,B)}}},9377:(l,p,t)=>{var a,n,s=t(815),h=t(6458),E=t(6677),v=t(7677),S=t(8587),B=t(3463),x=t(6122),P=t(3587).get,M=t(7517),F=t(6288),G=B("native-string-replace",String.prototype.replace),K=RegExp.prototype.exec,H=K,Z=h("".charAt),ie=h("".indexOf),T=h("".replace),m=h("".slice),g=(n=/b*/g,s(K,a=/a/,"a"),s(K,n,"a"),a.lastIndex!==0||n.lastIndex!==0),f=S.BROKEN_CARET,O=/()??/.exec("")[1]!==void 0;(g||O||f||M||F)&&(H=function(j){var Q,ee,ue,fe,me,ge,Oe,Ee=this,Be=P(Ee),De=E(j),nt=Be.raw;if(nt)return nt.lastIndex=Ee.lastIndex,Q=s(H,nt,De),Ee.lastIndex=nt.lastIndex,Q;var Ke=Be.groups,We=f&&Ee.sticky,Me=s(v,Ee),W=Ee.source,L=0,U=De;if(We&&(Me=T(Me,"y",""),ie(Me,"g")===-1&&(Me+="g"),U=m(De,Ee.lastIndex),Ee.lastIndex>0&&(!Ee.multiline||Ee.multiline&&Z(De,Ee.lastIndex-1)!==` `)&&(W="(?: "+W+")",U=" "+U,L++),ee=new RegExp("^(?:"+W+")",Me)),O&&(ee=new RegExp("^"+W+"$(?!\\s)",Me)),g&&(ue=Ee.lastIndex),fe=s(K,We?ee:Ee,U),We?fe?(fe.input=m(fe.input,L),fe[0]=m(fe[0],L),fe.index=Ee.lastIndex,Ee.lastIndex+=fe[0].length):Ee.lastIndex=0:g&&fe&&(Ee.lastIndex=Ee.global?fe.index+fe[0].length:ue),O&&fe&&fe.length>1&&s(G,fe[0],ee,function(){for(me=1;me{l.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9518:(l,p,t)=>{t(5597);var a=t(815),n=t(3930),s=t(9377),h=t(2809),E=t(7553),v=t(9277),S=E("species"),B=RegExp.prototype;l.exports=function(x,P,M,F){var G=E(x),K=!h(function(){var T={};return T[G]=function(){return 7},""[x](T)!==7}),H=K&&!h(function(){var T=!1,m=/a/;return x==="split"&&((m={}).constructor={},m.constructor[S]=function(){return m},m.flags="",m[G]=/./[G]),m.exec=function(){return T=!0,null},m[G](""),!T});if(!K||!H||M){var Z=/./[G],ie=P(G,""[x],function(T,m,g,f,O){var j=m.exec;return j===s||j===B.exec?K&&!O?{done:!0,value:a(Z,m,g,f)}:{done:!0,value:a(T,g,m,f)}:{done:!1}});n(String.prototype,x,ie[0]),n(B,G,ie[1])}F&&v(B[G],"sham",!0)}},9603:(l,p,t)=>{var a=t(5057),n=t(1176),s=t(7553),h=t(9646),E=s("species");l.exports=function(v){var S=a(v);h&&S&&!S[E]&&n(S,E,{configurable:!0,get:function(){return this}})}},9614:(l,p,t)=>{var a=t(3643).f;l.exports=function(n,s,h){h in n||a(n,h,{configurable:!0,get:function(){return s[h]},set:function(E){s[h]=E}})}},9615:(l,p,t)=>{var a=t(6458);l.exports=a({}.isPrototypeOf)},9646:(l,p,t)=>{var a=t(2809);l.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},9666:(l,p,t)=>{var a=t(4152),n=t(526),s=t(7553)("match");l.exports=function(h){var E;return a(h)&&((E=h[s])!==void 0?!!E:n(h)==="RegExp")}},9688:(l,p,t)=>{var a=t(9364),n=t(2809),s=t(5810),h=t(4152),E=t(9083),v=t(256),S=t(7955),B=t(8286),x=t(2807),P=t(8611),M=t(7553),F=t(4941),G=M("isConcatSpreadable"),K=F>=51||!n(function(){var Z=[];return Z[G]=!1,Z.concat()[0]!==Z}),H=function(Z){if(!h(Z))return!1;var ie=Z[G];return ie!==void 0?!!ie:s(Z)};a({target:"Array",proto:!0,arity:1,forced:!K||!P("concat")},{concat:function(Z){var ie,T,m,g,f,O=E(this),j=x(O,0),Q=0;for(ie=-1,m=arguments.length;ie{var a=t(6458),n=t(5810),s=t(9211),h=t(526),E=t(6677),v=a([].push);l.exports=function(S){if(s(S))return S;if(n(S)){for(var B=S.length,x=[],P=0;P{var a=t(7917);l.exports=a&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},9845:l=>{l.exports=!1},9879:l=>{var p=Math.ceil,t=Math.floor;l.exports=Math.trunc||function(a){var n=+a;return(n>0?t:p)(n)}},9917:(l,p,t)=>{var a=t(9922),n=t(3930),s=t(309);a||n(Object.prototype,"toString",s,{unsafe:!0})},9922:(l,p,t)=>{var a={};a[t(7553)("toStringTag")]="z",l.exports=String(a)==="[object z]"},9953:(l,p,t)=>{t.d(p,{A:()=>di});var a=t(2139),n=t(2460),s=t(8870),h=t(719);function E(c,A,o){var r=c;if(A+o=128){A.push(String.fromCharCode(65535&C)),r+=2;continue}}else if(o[r]<240){if(E(o,r,2)&&(C=(15&o[r])<<12|(63&o[r+1])<<6|63&o[r+2])>=2048&&(63488&C)!=55296){A.push(String.fromCharCode(65535&C)),r+=3;continue}}else if(o[r]<248){var C;if(E(o,r,3)&&(C=(7&o[r])<<18|(63&o[r+1])<<12|(63&o[r+2])<<6|63&o[r+3])>65536&&C<1114112){C-=65536,A.push(String.fromCharCode(C>>>10|55296)),A.push(String.fromCharCode(1023&C|56320)),r+=4;continue}}}A.push("�"),++r}return A.join("")};var S,B=t(4383),x=(S=new ArrayBuffer(2),new DataView(S).setInt16(0,256,!0),new Int16Array(S)[0]===256);const P=function(){function c(){}return c.parseScriptData=function(A,o,r){var y={};try{var C=c.parseValue(A,o,r),w=c.parseValue(A,o+C.size,r-C.size);y[C.data]=w.data}catch(_){n.A.e("AMF",_.toString())}return y},c.parseObject=function(A,o,r){if(r<3)throw new B.j4("Data not enough when parse ScriptDataObject");var y=c.parseString(A,o,r),C=c.parseValue(A,o+y.size,r-y.size),w=C.objectEnd;return{data:{name:y.data,value:C.data},size:y.size+C.size,objectEnd:w}},c.parseVariable=function(A,o,r){return c.parseObject(A,o,r)},c.parseString=function(A,o,r){if(r<2)throw new B.j4("Data not enough when parse String");var y=new DataView(A,o,r).getUint16(0,!x);return{data:y>0?v(new Uint8Array(A,o+2,y)):"",size:2+y}},c.parseLongString=function(A,o,r){if(r<4)throw new B.j4("Data not enough when parse LongString");var y=new DataView(A,o,r).getUint32(0,!x);return{data:y>0?v(new Uint8Array(A,o+4,y)):"",size:4+y}},c.parseDate=function(A,o,r){if(r<10)throw new B.j4("Data size invalid when parse Date");var y=new DataView(A,o,r),C=y.getFloat64(0,!x),w=y.getInt16(8,!x);return{data:new Date(C+=60*w*1e3),size:10}},c.parseValue=function(A,o,r){if(r<1)throw new B.j4("Data not enough when parse Value");var y,C=new DataView(A,o,r),w=1,_=C.getUint8(0),I=!1;try{switch(_){case 0:y=C.getFloat64(1,!x),w+=8;break;case 1:y=!!C.getUint8(1),w+=1;break;case 2:var k=c.parseString(A,o+1,r-1);y=k.data,w+=k.size;break;case 3:y={};var $=0;for((16777215&C.getUint32(r-4,!x))==9&&($=3);w32)throw new B.Qn("ExpGolomb: readBits() bits exceeded max 32bits!");if(A<=this._current_word_bits_left){var o=this._current_word>>>32-A;return this._current_word<<=A,this._current_word_bits_left-=A,o}var r=this._current_word_bits_left?this._current_word:0;r>>>=32-this._current_word_bits_left;var y=A-this._current_word_bits_left;this._fillCurrentWord();var C=Math.min(y,this._current_word_bits_left),w=this._current_word>>>32-C;return this._current_word<<=C,this._current_word_bits_left-=C,r<>>A)return this._current_word<<=A,this._current_word_bits_left-=A,A;return this._fillCurrentWord(),A+this._skipLeadingZero()},c.prototype.readUEG=function(){var A=this._skipLeadingZero();return this.readBits(A+1)-1},c.prototype.readSEG=function(){var A=this.readUEG();return 1&A?A+1>>>1:-1*(A>>>1)},c}(),F=function(){function c(){}return c._ebsp2rbsp=function(A){for(var o=A,r=o.byteLength,y=new Uint8Array(r),C=0,w=0;w=2&&o[w]===3&&o[w-1]===0&&o[w-2]===0||(y[C]=o[w],C++);return new Uint8Array(y.buffer,0,C)},c.parseSPS=function(A){for(var o=A.subarray(1,4),r="avc1.",y=0;y<3;y++){var C=o[y].toString(16);C.length<2&&(C="0"+C),r+=C}var w=c._ebsp2rbsp(A),_=new M(w);_.readByte();var I=_.readByte();_.readByte();var k=_.readByte();_.readUEG();var $=c.getProfileString(I),D=c.getLevelString(k),N=1,z=420,q=8,R=8;if((I===100||I===110||I===122||I===244||I===44||I===83||I===86||I===118||I===128||I===138||I===144)&&((N=_.readUEG())===3&&_.readBits(1),N<=3&&(z=[0,420,422,444][N]),q=_.readUEG()+8,R=_.readUEG()+8,_.readBits(1),_.readBool()))for(var Y=N!==3?8:12,se=0;se0&&je<16?(At=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][je-1],ke=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][je-1]):je===255&&(At=_.readByte()<<8|_.readByte(),ke=_.readByte()<<8|_.readByte())}if(_.readBool()&&_.readBool(),_.readBool()&&(_.readBits(4),_.readBool()&&_.readBits(24)),_.readBool()&&(_.readUEG(),_.readUEG()),_.readBool()){var $t=_.readBits(32),Jt=_.readBits(32);Ne=_.readBool(),pt=(Qe=Jt)/(Ve=2*$t)}}var et=1;At===1&&ke===1||(et=At/ke);var ot=0,qe=0;N===0?(ot=1,qe=2-Ae):(ot=N===3?1:2,qe=(N===1?2:1)*(2-Ae));var Ze=16*(_e+1),Gt=16*(ve+1)*(2-Ae);Ze-=(Le+we)*ot,Gt-=(be+He)*qe;var hi=Math.ceil(Ze*et);return _.destroy(),_=null,{codec_mimetype:r,profile_idc:I,level_idc:k,profile_string:$,level_string:D,chroma_format_idc:N,bit_depth:q,bit_depth_luma:q,bit_depth_chroma:R,ref_frames:oe,chroma_format:z,chroma_format_string:c.getChromaFormatString(z),frame_rate:{fixed:Ne,fps:pt,fps_den:Ve,fps_num:Qe},sar_ratio:{width:At,height:ke},codec_size:{width:Ze,height:Gt},present_size:{width:hi,height:Gt}}},c._skipScalingList=function(A,o){for(var r=8,y=8,C=0;C=2&&o[w]===3&&o[w-1]===0&&o[w-2]===0||(y[C]=o[w],C++);return new Uint8Array(y.buffer,0,C)},c.parseVPS=function(A){var o=c._ebsp2rbsp(A),r=new M(o);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}},c.parseSPS=function(A){var o=c._ebsp2rbsp(A),r=new M(o);r.readByte(),r.readByte();for(var y=0,C=0,w=0,_=0,I=(r.readBits(4),r.readBits(3)),k=(r.readBool(),r.readBits(2)),$=r.readBool(),D=r.readBits(5),N=r.readByte(),z=r.readByte(),q=r.readByte(),R=r.readByte(),Y=r.readByte(),se=r.readByte(),re=r.readByte(),de=r.readByte(),oe=r.readByte(),_e=r.readByte(),ve=r.readByte(),Ae=[],Le=[],we=0;we0)for(we=I;we<8;we++)r.readBits(2);for(we=0;we1&&r.readSEG(),we=0;we0&&Pi<=16?(pi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][Pi-1],Qt=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][Pi-1]):Pi===255&&(pi=r.readBits(16),Qt=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),r.readBool()&&(r.readUEG(),r.readUEG(),r.readUEG(),r.readUEG()),r.readBool()&&(Kn=r.readBits(32),Yn=r.readBits(32),r.readBool()&&r.readUEG(),r.readBool())){var Xn,Zn,Ki=!1;for(Xn=r.readBool(),Zn=r.readBool(),(Xn||Zn)&&((Ki=r.readBool())&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),Ki&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5)),we=0;we<=I;we++){var po=r.readBool();Ti=po;var fo=!1,Jn=1;po||(fo=r.readBool());var mo=!1;if(fo?r.readSEG():mo=r.readBool(),mo||(Jn=r.readUEG()+1),Xn)for(qe=0;qe>3,C=!!(4&A[r]),w=!!(2&A[r]);A[r],r+=1,C&&(r+=1);var _=Number.POSITIVE_INFINITY;if(w){_=0;for(var I=0;_|=(127&A[r])<<7*I,128&A[r+=1];I++);}y===1&&(o=c.parseSeuqneceHeader(A.subarray(r,r+_))),r+=_}return o},c.parseSeuqneceHeader=function(A){var o=new M(A),r=o.readBits(3),y=(o.readBool(),o.readBool()),C=!0,w=0,_=0,I=[];if(y)I.push({operating_point_idc:0,level:o.readBits(5),tier:0});else{if(o.readBool()){var k=o.readBits(32),$=o.readBits(32),D=o.readBool();if(D){for(var N=0;o.readBits(1)===0;)N+=1;N>=32||o.readBits(N)}w=$,_=k,C=D,o.readBool()&&(o.readBits(5),o.readBits(32),o.readBits(5),o.readBits(5))}for(var z=o.readBool(),q=o.readBits(5),R=0;R<=q;R++){var Y=o.readBits(12),se=o.readBits(5),re=se>7?o.readBits(1):0;I.push({operating_point_idc:Y,level:se,tier:re}),z&&o.readBool()&&o.readBits(4)}}var de=I[0],oe=de.level,_e=de.tier,ve=o.readBits(4),Ae=o.readBits(4),Le=o.readBits(ve+1)+1,we=o.readBits(Ae+1)+1,be=!1;y||(be=o.readBool()),be&&(o.readBits(4),o.readBits(4)),o.readBool(),o.readBool(),o.readBool();var He=!1;y||(o.readBool(),o.readBool(),o.readBool(),o.readBool(),(He=o.readBool())&&(o.readBool(),o.readBool()),(o.readBool()||o.readBits(1))&&(o.readBool()||o.readBits(1)),He&&o.readBits(3)),o.readBool(),o.readBool(),o.readBool();var At=o.readBool(),ke=8;ke=r===2&&At?o.readBool()?12:10:At?10:8;var pt=!1;r!==1&&(pt=o.readBool()),o.readBool()&&(o.readBits(8),o.readBits(8),o.readBits(8));var Ne=1,Qe=1;return pt?(o.readBits(1),Ne=1,Qe=1):(o.readBits(1),r===0?(Ne=1,Qe=1):r===1?(Ne=0,Qe=0):ke===12?o.readBits(1)&&o.readBits(1):(Ne=1,Qe=0),Ne&&Qe&&o.readBits(2),o.readBits(1)),o.readBool(),o.destroy(),o=null,{codec_mimetype:"av01.".concat(r,".").concat(c.getLevelString(oe,_e),".").concat(ke.toString(10).padStart(2,"0")),level:oe,tier:_e,level_string:c.getLevelString(oe,_e),profile_idc:r,profile_string:"".concat(r),bit_depth:ke,ref_frames:1,chroma_format:c.getChromaFormat(pt,Ne,Qe),chroma_format_string:c.getChromaFormatString(pt,Ne,Qe),frame_rate:{fixed:C,fps:w/_,fps_den:_,fps_num:w},sar_ratio:{width:1,height:1},codec_size:{width:Le,height:we},present_size:{width:1*Le,height:we}}},c.getLevelString=function(A,o){return"".concat(A.toString(10).padStart(2,"0")).concat(o===0?"M":"H")},c.getChromaFormat=function(A,o,r){return A?0:o===0&&r===0?3:o===1&&r===0?2:o===1&&r===1?1:Number.NaN},c.getChromaFormatString=function(A,o,r){return A?"4:0:0":o===0&&r===0?"4:4:4":o===1&&r===0?"4:2:2":o===1&&r===1?"4:2:0":"Unknown"},c}();var g=function(){function c(A,o){this.TAG="FLVDemuxer",this._config=o,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=A.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=A.hasAudioTrack,this._hasVideo=A.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new h.A,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()}return c.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},c.probe=function(A){var o=new Uint8Array(A);if(o.byteLength<9)return{needMoreData:!0};var r={match:!1};if(o[0]!==70||o[1]!==76||o[2]!==86||o[3]!==1)return r;var y,C=(4&o[4])>>>2!=0,w=!!(1&o[4]),_=(y=o)[5]<<24|y[6]<<16|y[7]<<8|y[8];return _<9?r:{match:!0,consumed:_,dataOffset:_,hasAudioTrack:C,hasVideoTrack:w}},c.prototype.bindDataSource=function(A){return A.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(c.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(A){this._onTrackMetadata=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(A){this._onMediaInfo=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(A){this._onMetaDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(A){this._onScriptDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onError",{get:function(){return this._onError},set:function(A){this._onError=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(A){this._onDataAvailable=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(A){this._timestampBase=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedDuration",{get:function(){return this._duration},set:function(A){this._durationOverrided=!0,this._duration=A,this._mediaInfo&&(this._mediaInfo.duration=A)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedHasAudio",{set:function(A){this._hasAudioFlagOverrided=!0,this._hasAudio=A,this._mediaInfo&&(this._mediaInfo.hasAudio=A)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overridedHasVideo",{set:function(A){this._hasVideoFlagOverrided=!0,this._hasVideo=A,this._mediaInfo&&(this._mediaInfo.hasVideo=A)},enumerable:!1,configurable:!0}),c.prototype.resetMediaInfo=function(){this._mediaInfo=new h.A},c.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},c.prototype.parseChunks=function(A,o){var r,y;if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new B.j4("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var C=0,w=this._littleEndian;if(o===0){if(!(A.byteLength>13))return 0;var _=c.probe(A);C=(_==null?void 0:_.dataOffset)||0}for(this._firstParse&&(this._firstParse=!1,o+C!==this._dataOffset&&n.A.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(I=new DataView(A,C)).getUint32(0,!w)!==0&&n.A.w(this.TAG,"PrevTagSize0 !== 0 !!!"),C+=4);CA.byteLength)break;var k=I.getUint8(0),$=16777215&I.getUint32(0,!w);if(C+11+$+4>A.byteLength)break;if(k===8||k===9||k===18){var D=I.getUint8(4),N=I.getUint8(5),z=I.getUint8(6)|N<<8|D<<16|I.getUint8(7)<<24;16777215&I.getUint32(7,!w)&&n.A.w(this.TAG,"Meet tag which has StreamID != 0!");var q=C+11;switch(k){case 8:this._parseAudioData(A,q,$,z);break;case 9:this._parseVideoData(A,q,$,z,o+C);break;case 18:this._parseScriptData(A,q,$)}var R=I.getUint32(11+$,!w);R!==11+$&&n.A.w(this.TAG,"Invalid PrevTagSize ".concat(R)),C+=11+$+4}else n.A.w(this.TAG,"Unsupported tag type ".concat(k,", skipped")),C+=11+$+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(!((r=this._audioTrack)===null||r===void 0)&&r.length||!((y=this._videoTrack)===null||y===void 0)&&y.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),C},c.prototype._parseScriptData=function(A,o,r){var y,C,w,_=P.parseScriptData(A,o,r);if(_.hasOwnProperty("onMetaData")){if(_.onMetaData==null||typeof _.onMetaData!="object")return void n.A.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&n.A.w(this.TAG,"Found another onMetaData tag!"),this._metadata=_;var I=(y=this._metadata)===null||y===void 0?void 0:y.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},I)),typeof(I==null?void 0:I.hasAudio)=="boolean"&&(this._hasAudioFlagOverrided||(this._hasAudio=I.hasAudio,this._mediaInfo&&(this._mediaInfo.hasAudio=this._hasAudio))),typeof(I==null?void 0:I.hasVideo)=="boolean"&&(this._hasVideoFlagOverrided||(this._hasVideo=I.hasVideo,this._mediaInfo&&(this._mediaInfo.hasVideo=this._hasVideo))),typeof(I==null?void 0:I.audiodatarate)=="number"&&this._mediaInfo&&(this._mediaInfo.audioDataRate=I.audiodatarate),typeof(I==null?void 0:I.videodatarate)=="number"&&this._mediaInfo&&(this._mediaInfo.videoDataRate=I.videodatarate),typeof(I==null?void 0:I.width)=="number"&&this._mediaInfo&&(this._mediaInfo.width=I.width),typeof(I==null?void 0:I.height)=="number"&&this._mediaInfo&&(this._mediaInfo.height=I.height),typeof(I==null?void 0:I.duration)=="number"){if(!this._durationOverrided){var k=Math.floor(I.duration*this._timescale);this._duration=k,this._mediaInfo&&(this._mediaInfo.duration=k)}}else this._mediaInfo&&(this._mediaInfo.duration=0);if(typeof(I==null?void 0:I.framerate)=="number"){var $=Math.floor(1e3*I.framerate);if($>0){var D=$/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=D,this._referenceFrameRate.fps_num=$,this._referenceFrameRate.fps_den=1e3,this._mediaInfo&&(this._mediaInfo.fps=D)}}if(typeof(I==null?void 0:I.keyframes)=="object"){this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!0);var N=I.keyframes;this._mediaInfo&&(this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(N)),I.keyframes=null}else this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!1);this._dispatch=!1,this._mediaInfo&&(this._mediaInfo.metadata=I),n.A.v(this.TAG,"Parsed onMetaData"),!((C=this._mediaInfo)===null||C===void 0)&&C.isComplete()&&((w=this._onMediaInfo)===null||w===void 0||w.call(this,this._mediaInfo))}Object.keys(_).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},_))},c.prototype._parseKeyframesIndex=function(A){for(var o=[],r=[],y=1;y>>4;if(Y===2||Y===10){var se=0,re=(12&R)>>>2;if(re>=0&&re<=4){se=this._flvSoundRateTable[re];var de=1&R,oe=this._audioMetadata,_e=this._audioTrack;if(oe||(this._hasAudio!==!1||this._hasAudioFlagOverrided||(this._hasAudio=!0,this._mediaInfo&&(this._mediaInfo.hasAudio=!0)),(oe=this._audioMetadata={}).type="audio",oe.id=_e==null?void 0:_e.id,oe.timescale=this._timescale,oe.duration=this._duration,oe.audioSampleRate=se,oe.channelCount=de===0?1:2),Y===10){var ve=this._parseAACAudioData(A,o+1,r-1);if(ve===void 0)return;if((ve==null?void 0:ve.packetType)===0){if(oe!=null&&oe.config){if(T(ve.data.config,oe==null?void 0:oe.config))return;n.A.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var Ae=ve.data;oe.audioSampleRate=Ae==null?void 0:Ae.samplingRate,oe.channelCount=Ae==null?void 0:Ae.channelCount,oe.codec=Ae==null?void 0:Ae.codec,oe.originalCodec=Ae==null?void 0:Ae.originalCodec,oe.config=Ae==null?void 0:Ae.config,oe.refSampleDuration=1024/oe.audioSampleRate*oe.timescale,n.A.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(!((_=this._audioTrack)===null||_===void 0)&&_.length||!((I=this._videoTrack)===null||I===void 0)&&I.length)&&((k=this._onDataAvailable)===null||k===void 0||k.call(this,this._audioTrack,this._videoTrack)):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,($=this._onTrackMetadata)===null||$===void 0||$.call(this,"audio",oe),(be=this._mediaInfo).audioCodec=oe.originalCodec||"",be.audioSampleRate=oe.audioSampleRate,be.audioChannelCount=oe.channelCount,be.hasVideo?be.videoCodec!=null&&(be.mimeType='video/x-flv; codecs="'+be.videoCodec+","+be.audioCodec+'"'):be.mimeType='video/x-flv; codecs="'+be.audioCodec+'"',be!=null&&be.isComplete()&&((D=this._onMediaInfo)===null||D===void 0||D.call(this,be))}else if(ve.packetType===1){var Le=this._timestampBase+y,we={unit:ve.data,length:ve.data.byteLength,dts:Le,pts:Le};_e&&(_e==null||_e.samples.push(we),_e.length+=((N=ve==null?void 0:ve.data)===null||N===void 0?void 0:N.length)||0)}else n.A.e(this.TAG,"Flv: Unsupported AAC data type ".concat(ve.packetType))}else if(Y===2){if(!oe.codec){var be;if((Ae=this._parseMP3AudioData(A,o+1,r-1,!0))===void 0)return;oe.audioSampleRate=Ae.samplingRate,oe.channelCount=Ae.channelCount,oe.codec=Ae.codec,oe.originalCodec=Ae.originalCodec,oe.refSampleDuration=1152/oe.audioSampleRate*oe.timescale,n.A.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,(z=this._onTrackMetadata)===null||z===void 0||z.call(this,"audio",oe),(be=this._mediaInfo).audioCodec=oe.codec,be.audioSampleRate=oe.audioSampleRate,be.audioChannelCount=oe.channelCount,be.audioDataRate=Ae.bitRate,be!=null&&be.hasVideo?be.videoCodec!=null&&(be.mimeType='video/x-flv; codecs="'+be.videoCodec+","+be.audioCodec+'"'):be.mimeType='video/x-flv; codecs="'+be.audioCodec+'"',be.isComplete()&&((q=this._onMediaInfo)===null||q===void 0||q.call(this,be))}var He=this._parseMP3AudioData(A,o+1,r-1,!1);if(He===void 0)return;Le=this._timestampBase+y;var At={unit:He,length:He.byteLength,dts:Le,pts:Le};_e==null||_e.samples.push(At),_e&&(_e.length+=He.length)}}else(w=this._onError)===null||w===void 0||w.call(this,G.A.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+re)}else(C=this._onError)===null||C===void 0||C.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Y)}},c.prototype._parseAACAudioData=function(A,o,r){if(!(r<=1)){var y={},C=new Uint8Array(A,o,r);return y.packetType=C[0],C[0]===0?y.data=this._parseAACAudioSpecificConfig(A,o+1,r-1):y.data=C.subarray(1),y}n.A.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},c.prototype._parseAACAudioSpecificConfig=function(A,o,r){var y,C,w,_,I=new Uint8Array(A,o,r),k=null,$=0,D=null;if($=w=I[0]>>>3,(_=(7&I[0])<<1|I[1]>>>7)<0||_>=this._mpegSamplingRates.length)(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var N=this._mpegSamplingRates[_],z=(120&I[1])>>>3;if(!(z<0||z>=8)){$===5&&(D=(7&I[1])<<1|I[2]>>>7,I[2]);var q=self.navigator.userAgent.toLowerCase();return q.includes("firefox")?_>=6?($=5,k=new Array(4),D=_-3):($=2,k=new Array(2),D=_):q.includes("android")?($=2,k=new Array(2),D=_):($=5,D=_,k=new Array(4),_>=6?D=_-3:z===1&&($=2,k=new Array(2),D=_)),k[0]=$<<3,k[0]|=(15&_)>>>1,k[1]=(15&_)<<7,k[1]|=(15&z)<<3,$===5&&(k[1]|=(15&D)>>>1,k[2]=(1&D)<<7,k[2]|=8,k[3]=0),{config:k,samplingRate:N,channelCount:z,codec:"mp4a.40."+$,originalCodec:"mp4a.40."+w}}(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},c.prototype._parseMP3AudioData=function(A,o,r,y){if(!(r<4)){this._littleEndian;var C,w=new Uint8Array(A,o,r);if(y){if(w[0]!==255)return;var _=w[1]>>>3&3,I=(6&w[1])>>1,k=(240&w[2])>>>4,$=(12&w[2])>>>2,D=3&~(w[3]>>>6)?2:1,N=0,z=0;switch(_){case 0:N=this._mpegAudioV25SampleRateTable[$];break;case 2:N=this._mpegAudioV20SampleRateTable[$];break;case 3:N=this._mpegAudioV10SampleRateTable[$]}switch(I){case 1:k>>4;if(128&I){var $=15&I,D=String.fromCharCode.apply(String,function(z,q,R){if(arguments.length===2)for(var Y,se=0,re=q.length;se0)&&!(Y=re.next()).done;)de.push(Y.value)}catch(oe){se={error:oe}}finally{try{Y&&!Y.done&&(R=re.return)&&R.call(re)}finally{if(se)throw se.error}}return de}(new Uint8Array(A,o,r).slice(1,5)),!1));D==="hvc1"?this._parseEnhancedHEVCVideoPacket(A,o+5,r-5,y,C,k,$):D==="av01"?this._parseEnhancedAV1VideoPacket(A,o+5,r-5,y,C,k,$):(_=this._onError)===null||_===void 0||_.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(D))}else{var N=15&I;N===7?this._parseAVCVideoPacket(A,o+1,r-1,y,C,k):N===12?this._parseHEVCVideoPacket(A,o+1,r-1,y,C,k):(w=this._onError)===null||w===void 0||w.call(this,G.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(N))}}},c.prototype._parseAVCVideoPacket=function(A,o,r,y,C,w){var _;if(r<4)n.A.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var I=this._littleEndian,k=new DataView(A,o,r),$=k.getUint8(0),D=(16777215&k.getUint32(0,!I))<<8>>8;$===0?this._parseAVCDecoderConfigurationRecord(A,o+4,r-4):$===1?this._parseAVCVideoData(A,o+4,r-4,y,C,w,D):$===2||(_=this._onError)===null||_===void 0||_.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat($))}},c.prototype._parseHEVCVideoPacket=function(A,o,r,y,C,w){var _;if(r<4)n.A.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var I=this._littleEndian,k=new DataView(A,o,r),$=k.getUint8(0),D=(16777215&k.getUint32(0,!I))<<8>>8;$===0?this._parseHEVCDecoderConfigurationRecord(A,o+4,r-4):$===1?this._parseHEVCVideoData(A,o+4,r-4,y,C,w,D):$===2||(_=this._onError)===null||_===void 0||_.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat($))}},c.prototype._parseEnhancedHEVCVideoPacket=function(A,o,r,y,C,w,_){var I,k=this._littleEndian,$=new DataView(A,o,r);if(_===0)this._parseHEVCDecoderConfigurationRecord(A,o,r);else if(_===1){var D=(4294967040&$.getUint32(0,!k))>>8;this._parseHEVCVideoData(A,o+3,r-3,y,C,w,D)}else _===3?this._parseHEVCVideoData(A,o,r,y,C,w,0):_===2||(I=this._onError)===null||I===void 0||I.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(_))},c.prototype._parseEnhancedAV1VideoPacket=function(A,o,r,y,C,w,_){var I,k;this._littleEndian,_===0?this._parseAV1CodecConfigurationRecord(A,o,r):_===1?this._parseAV1VideoData(A,o,r,y,C,w,0):_===5?(I=this._onError)===null||I===void 0||I.call(this,G.A.FORMAT_ERROR,"Flv: Not Suported MP2T AV1 video packet type ".concat(_)):_===2||(k=this._onError)===null||k===void 0||k.call(this,G.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(_))},c.prototype._parseAVCDecoderConfigurationRecord=function(A,o,r){var y,C,w,_,I,k,$,D,N,z,q;if(r<7)n.A.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var R=this._videoMetadata,Y=this._videoTrack,se=this._littleEndian,re=new DataView(A,o,r);if(R){if(R.avcc!==void 0){var de=new Uint8Array(A,o,r);if(T(de,R.avcc))return;n.A.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo!==!1||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(R=this._videoMetadata={}).type="video",R.id=Y==null?void 0:Y.id,R.timescale=this._timescale,R.duration=this._duration;var oe=re.getUint8(0),_e=re.getUint8(1);if(re.getUint8(2),re.getUint8(3),oe===1&&_e!==0)if(this._naluLengthSize=1+(3&re.getUint8(4)),this._naluLengthSize===3||this._naluLengthSize===4){var ve=31&re.getUint8(5);if(ve!==0){ve>1&&n.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(ve));for(var Ae=6,Le=0;Le1&&n.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat($t)),Ae++,Le=0;Le<$t;Le++)we=re.getUint16(Ae,!se),Ae+=2,we!==0&&(Ae+=we);R.avcc=new Uint8Array(r),R.avcc.set(new Uint8Array(A,o,r),0),n.A.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(!((D=this._audioTrack)===null||D===void 0)&&D.length||!((N=this._videoTrack)===null||N===void 0)&&N.length)&&((z=this._onDataAvailable)===null||z===void 0||z.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,(q=this._onTrackMetadata)===null||q===void 0||q.call(this,"video",R)}else($=this._onError)===null||$===void 0||$.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else(w=this._onError)===null||w===void 0||w.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else(C=this._onError)===null||C===void 0||C.call(this,G.A.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else(y=this._onError)===null||y===void 0||y.call(this,G.A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},c.prototype._parseHEVCDecoderConfigurationRecord=function(A,o,r){var y,C,w,_,I,k,$;if(r<22)n.A.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");else{var D=this._videoMetadata,N=this._videoTrack,z=this._littleEndian,q=new DataView(A,o,r);if(D){if(D.hvcc!==void 0){var R=new Uint8Array(A,o,r);if(T(R,D.hvcc))return;n.A.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo!==!1||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(D=this._videoMetadata={}).type="video",D.id=N==null?void 0:N.id,D.timescale=this._timescale,D.duration=this._duration;var Y=q.getUint8(0),se=31&q.getUint8(1);if(Y===1&&se!==0)if(this._naluLengthSize=1+(3&q.getUint8(21)),this._naluLengthSize===3||this._naluLengthSize===4){for(var re=q.getUint8(22),de=0,oe=23;de=r){n.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(q,", offset = ").concat(N,", dataSize = ").concat(r));break}var Y=k.getUint32(N,!I);if(z===3&&(Y>>>=8),Y>r-z)return void n.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(q,", NaluSize > DataSize!"));var se=31&k.getUint8(N+z);se===5&&(R=!0);var re=new Uint8Array(A,o+N,z+Y),de={type:se,data:re};$.push(de),D+=re.byteLength,N+=z+Y}if($.length){var oe=this._videoTrack,_e={units:$,length:D,isKeyframe:R,dts:q,cts:_,pts:q+_};R&&(_e.fileposition=C),oe&&(oe.samples.push(_e),oe.length+=D)}},c.prototype._parseHEVCVideoData=function(A,o,r,y,C,w,_){for(var I=this._littleEndian,k=new DataView(A,o,r),$=[],D=0,N=0,z=this._naluLengthSize,q=this._timestampBase+y,R=w===1;N=r){n.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(q,", offset = ").concat(N,", dataSize = ").concat(r));break}var Y=k.getUint32(N,!I);if(z===3&&(Y>>>=8),Y>r-z)return void n.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(q,", NaluSize > DataSize!"));var se=31&k.getUint8(N+z);se!==19&&se!==20||(R=!0);var re=new Uint8Array(A,o+N,z+Y),de={type:se,data:re};$.push(de),D+=re.byteLength,N+=z+Y}if($.length){var oe=this._videoTrack,_e={units:$,length:D,isKeyframe:R,dts:q,cts:_,pts:q+_};R&&(_e.fileposition=C),oe&&(oe==null||oe.samples.push(_e),oe.length+=D)}},c.prototype._parseAV1VideoData=function(A,o,r,y,C,w,_){this._littleEndian;var I,k=[],$=this._timestampBase+y,D=w===1;if(I=r,k.push({unitType:0,data:new Uint8Array(A,o+0,r)}),k.length){var N=this._videoTrack,z={units:k,length:I,isKeyframe:D,dts:$,cts:_,pts:$+_};D&&(z.fileposition=C),N&&(N==null||N.samples.push(z),N.length+=I)}},c}();const f=g,O=function(){function c(){}return c.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},c}();var j,Q=function(){this.program_pmt_pid={}};(function(c){c[c.kMPEG1Audio=3]="kMPEG1Audio",c[c.kMPEG2Audio=4]="kMPEG2Audio",c[c.kPESPrivateData=6]="kPESPrivateData",c[c.kADTSAAC=15]="kADTSAAC",c[c.kLOASAAC=17]="kLOASAAC",c[c.kAC3=129]="kAC3",c[c.kEAC3=135]="kEAC3",c[c.kID3=21]="kID3",c[c.kSCTE35=134]="kSCTE35",c[c.kH264=27]="kH264",c[c.kH265=36]="kH265"})(j||(j={}));var ee,ue=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}},fe=function(){},me=function(){},ge=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0,this.random_access_indicator=0};(function(c){c[c.kUnspecified=0]="kUnspecified",c[c.kSliceNonIDR=1]="kSliceNonIDR",c[c.kSliceDPA=2]="kSliceDPA",c[c.kSliceDPB=3]="kSliceDPB",c[c.kSliceDPC=4]="kSliceDPC",c[c.kSliceIDR=5]="kSliceIDR",c[c.kSliceSEI=6]="kSliceSEI",c[c.kSliceSPS=7]="kSliceSPS",c[c.kSlicePPS=8]="kSlicePPS",c[c.kSliceAUD=9]="kSliceAUD",c[c.kEndOfSequence=10]="kEndOfSequence",c[c.kEndOfStream=11]="kEndOfStream",c[c.kFiller=12]="kFiller",c[c.kSPSExt=13]="kSPSExt",c[c.kReserved0=14]="kReserved0"})(ee||(ee={}));var Oe,Ee,Be=function(){},De=function(c){var A=c.data.byteLength;this.type=c.type,this.data=new Uint8Array(4+A),new DataView(this.data.buffer).setUint32(0,A),this.data.set(c.data,4)},nt=function(){function c(A){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=A,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not find H264 startcode until payload end!")}return c.prototype.findNextStartCodeOffset=function(A){for(var o=A,r=this.data_;;){if(o+3>=r.byteLength)return this.eof_flag_=!0,r.byteLength;var y=r[o+0]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3],C=r[o+0]<<16|r[o+1]<<8|r[o+2];if(y===1||C===1)return o;o++}},c.prototype.readNextNaluPayload=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_startcode_offset_,y=31&A[r+=(A[r]<<24|A[r+1]<<16|A[r+2]<<8|A[r+3])==1?4:3],C=(128&A[r])>>>7,w=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=w,!(y>=ee.kReserved0)&&C===0){var _=A.subarray(r,w);(o=new Be).type=y,o.data=_}}return o},c}(),Ke=function(){function c(A,o,r){var y=8+A.byteLength+1+2+o.byteLength,C=!1;A[3]!==66&&A[3]!==77&&A[3]!==88&&(C=!0,y+=4);var w=this.data=new Uint8Array(y);w[0]=1,w[1]=A[1],w[2]=A[2],w[3]=A[3],w[4]=255,w[5]=225;var _=A.byteLength;w[6]=_>>>8,w[7]=255&_;var I=8;w.set(A,8),w[I+=_]=1;var k=o.byteLength;w[I+1]=k>>>8,w[I+2]=255&k,w.set(o,I+3),I+=3+k,C&&(w[I]=252|r.chroma_format_idc,w[I+1]=248|r.bit_depth_luma-8,w[I+2]=248|r.bit_depth_chroma-8,w[I+3]=0,I+=4)}return c.prototype.getData=function(){return this.data},c}();(function(c){c[c.kNull=0]="kNull",c[c.kAACMain=1]="kAACMain",c[c.kAAC_LC=2]="kAAC_LC",c[c.kAAC_SSR=3]="kAAC_SSR",c[c.kAAC_LTP=4]="kAAC_LTP",c[c.kAAC_SBR=5]="kAAC_SBR",c[c.kAAC_Scalable=6]="kAAC_Scalable",c[c.kLayer1=32]="kLayer1",c[c.kLayer2=33]="kLayer2",c[c.kLayer3=34]="kLayer3"})(Oe||(Oe={})),function(c){c[c.k96000Hz=0]="k96000Hz",c[c.k88200Hz=1]="k88200Hz",c[c.k64000Hz=2]="k64000Hz",c[c.k48000Hz=3]="k48000Hz",c[c.k44100Hz=4]="k44100Hz",c[c.k32000Hz=5]="k32000Hz",c[c.k24000Hz=6]="k24000Hz",c[c.k22050Hz=7]="k22050Hz",c[c.k16000Hz=8]="k16000Hz",c[c.k12000Hz=9]="k12000Hz",c[c.k11025Hz=10]="k11025Hz",c[c.k8000Hz=11]="k8000Hz",c[c.k7350Hz=12]="k7350Hz"}(Ee||(Ee={}));var We,Me,W=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],L=(We=function(c,A){return We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var y in r)Object.prototype.hasOwnProperty.call(r,y)&&(o[y]=r[y])},We(c,A)},function(c,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function o(){this.constructor=c}We(c,A),c.prototype=A===null?Object.create(A):(o.prototype=A.prototype,new o)}),U=function(){},V=function(c){function A(){return c!==null&&c.apply(this,arguments)||this}return L(A,c),A}(U),X=function(){function c(A){this.TAG="AACADTSParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found ADTS syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])>>>4==4095)return o;o++}},c.prototype.readNextAACFrame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=(8&A[r+1])>>>3,C=(6&A[r+1])>>>1,w=1&A[r+1],_=(192&A[r+2])>>>6,I=(60&A[r+2])>>>2,k=(1&A[r+2])<<2|(192&A[r+3])>>>6,$=(3&A[r+3])<<11|A[r+4]<<3|(224&A[r+5])>>>5;if(A[r+6],r+$>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var D=w===1?7:9,N=$-D;r+=D;var z=this.findNextSyncwordOffset(r+N);if(this.current_syncword_offset_=z,(y===0||y===1)&&C===0){var q=A.subarray(r,r+N);(o=new U).audio_object_type=_+1,o.sampling_freq_index=I,o.sampling_frequency=W[I],o.channel_config=k,o.data=q}}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),J=function(){function c(A){this.TAG="AACLOASParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found LOAS syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+1>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<3|r[o+1]>>>5)==695)return o;o++}},c.prototype.getLATMValue=function(A){for(var o=A.readBits(2),r=0,y=0;y<=o;y++)r<<=8,r|=A.readByte();return r},c.prototype.readNextAACFrame=function(A){for(var o=this.data_,r=null;r==null&&!this.eof_flag_;){var y=this.current_syncword_offset_,C=(31&o[y+1])<<8|o[y+2];if(y+3+C>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var w=new M(o.subarray(y+3,y+3+C)),_=null;if(w.readBool()){if(A==null){n.A.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(y+3+C),w.destroy();continue}_=A}else{var I=w.readBool();if(I&&w.readBool()){n.A.e(this.TAG,"audioMuxVersionA is Not Supported"),w.destroy();break}if(I&&this.getLATMValue(w),!w.readBool()){n.A.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),w.destroy();break}if(w.readBits(6)!==0){n.A.e(this.TAG,"more than 2 numSubFrames Not Supported"),w.destroy();break}if(w.readBits(4)!==0){n.A.e(this.TAG,"more than 2 numProgram Not Supported"),w.destroy();break}if(w.readBits(3)!==0){n.A.e(this.TAG,"more than 2 numLayer Not Supported"),w.destroy();break}var k=I?this.getLATMValue(w):0,$=w.readBits(5);k-=5;var D=w.readBits(4);k-=4;var N=w.readBits(4);k-=4,w.readBits(3),(k-=3)>0&&w.readBits(k);var z=w.readBits(3);if(z!==0){n.A.e(this.TAG,"frameLengthType = ".concat(z,". Only frameLengthType = 0 Supported")),w.destroy();break}w.readByte();var q=w.readBool();if(q)if(I)this.getLATMValue(w);else{for(var R=0;;){R<<=8;var Y=w.readBool();if(R+=w.readByte(),!Y)break}console.log(R)}w.readBool()&&w.readByte(),(_=new V).audio_object_type=$,_.sampling_freq_index=D,_.sampling_frequency=W[_.sampling_freq_index],_.channel_config=N,_.other_data_present=q}for(var se=0;;){var re=w.readByte();if(se+=re,re!==255)break}for(var de=new Uint8Array(se),oe=0;oe=6?(r=5,A=new Array(4),w=y-3):(r=2,A=new Array(2),w=y):_.includes("android")?(r=2,A=new Array(2),w=y):(r=5,w=y,A=new Array(4),y>=6?w=y-3:C===1&&(r=2,A=new Array(2),w=y)),A[0]=r<<3,A[0]|=(15&y)>>>1,A[1]=(15&y)<<7,A[1]|=(15&C)<<3,r===5&&(A[1]|=(15&w)>>>1,A[2]=(1&w)<<7,A[2]|=8,A[3]=0),this.config=A,this.sampling_rate=W[y],this.channel_count=C,this.codec_mimetype="mp4a.40."+r.toString(),this.original_codec_mimetype="mp4a.40."+o.toString()},ce=function(){},ye=function(){};(function(c){c[c.kSpliceNull=0]="kSpliceNull",c[c.kSpliceSchedule=4]="kSpliceSchedule",c[c.kSpliceInsert=5]="kSpliceInsert",c[c.kTimeSignal=6]="kTimeSignal",c[c.kBandwidthReservation=7]="kBandwidthReservation",c[c.kPrivateCommand=255]="kPrivateCommand"})(Me||(Me={}));var ae,Ce=function(c){var A=c.readBool();return A?(c.readBits(6),{time_specified_flag:A,pts_time:4*c.readBits(31)+c.readBits(2)}):(c.readBits(7),{time_specified_flag:A})},pe=function(c){var A=c.readBool();return c.readBits(6),{auto_return:A,duration:4*c.readBits(31)+c.readBits(2)}},Re=function(c,A){var o=A.readBits(8);return c?{component_tag:o}:{component_tag:o,splice_time:Ce(A)}},Et=function(c){return{component_tag:c.readBits(8),utc_splice_time:c.readBits(32)}},ct=function(c){var A=c.readBits(32),o=c.readBool();c.readBits(7);var r={splice_event_id:A,splice_event_cancel_indicator:o};if(o)return r;if(r.out_of_network_indicator=c.readBool(),r.program_splice_flag=c.readBool(),r.duration_flag=c.readBool(),c.readBits(5),r.program_splice_flag)r.utc_splice_time=c.readBits(32);else{r.component_count=c.readBits(8),r.components=[];for(var y=0;y=r.byteLength)return this.eof_flag_=!0,r.byteLength;var y=r[o+0]<<24|r[o+1]<<16|r[o+2]<<8|r[o+3],C=r[o+0]<<16|r[o+1]<<8|r[o+2];if(y===1||C===1)return o;o++}},c.prototype.readNextNaluPayload=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_startcode_offset_,y=A[r+=(A[r]<<24|A[r+1]<<16|A[r+2]<<8|A[r+3])==1?4:3]>>1&63,C=(128&A[r])>>>7,w=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=w,C===0){var _=A.subarray(r,w);(o=new Tt).type=y,o.data=_}}return o},c}(),xt=function(){function c(A,o,r,y){var C=23+(5+A.byteLength)+(5+o.byteLength)+(5+r.byteLength),w=this.data=new Uint8Array(C);w[0]=1,w[1]=(3&y.general_profile_space)<<6|(y.general_tier_flag?1:0)<<5|31&y.general_profile_idc,w[2]=y.general_profile_compatibility_flags_1,w[3]=y.general_profile_compatibility_flags_2,w[4]=y.general_profile_compatibility_flags_3,w[5]=y.general_profile_compatibility_flags_4,w[6]=y.general_constraint_indicator_flags_1,w[7]=y.general_constraint_indicator_flags_2,w[8]=y.general_constraint_indicator_flags_3,w[9]=y.general_constraint_indicator_flags_4,w[10]=y.general_constraint_indicator_flags_5,w[11]=y.general_constraint_indicator_flags_6,w[12]=y.general_level_idc,w[13]=240|(3840&y.min_spatial_segmentation_idc)>>8,w[14]=255&y.min_spatial_segmentation_idc,w[15]=252|3&y.parallelismType,w[16]=252|3&y.chroma_format_idc,w[17]=248|7&y.bit_depth_luma_minus8,w[18]=248|7&y.bit_depth_chroma_minus8,w[19]=0,w[20]=0,w[21]=(3&y.constant_frame_rate)<<6|(7&y.num_temporal_layers)<<3|(y.temporal_id_nested?1:0)<<2|3,w[22]=3,w[23]=128|ae.kSliceVPS,w[24]=0,w[25]=1,w[26]=(65280&A.byteLength)>>8,w[27]=255&A.byteLength,w.set(A,28),w[23+(5+A.byteLength)+0]=128|ae.kSliceSPS,w[23+(5+A.byteLength)+1]=0,w[23+(5+A.byteLength)+2]=1,w[23+(5+A.byteLength)+3]=(65280&o.byteLength)>>8,w[23+(5+A.byteLength)+4]=255&o.byteLength,w.set(o,23+(5+A.byteLength)+5),w[23+(5+A.byteLength+5+o.byteLength)+0]=128|ae.kSlicePPS,w[23+(5+A.byteLength+5+o.byteLength)+1]=0,w[23+(5+A.byteLength+5+o.byteLength)+2]=1,w[23+(5+A.byteLength+5+o.byteLength)+3]=(65280&r.byteLength)>>8,w[23+(5+A.byteLength+5+o.byteLength)+4]=255&r.byteLength,w.set(r,23+(5+A.byteLength+5+o.byteLength)+5)}return c.prototype.getData=function(){return this.data},c}(),Pt=function(){},Kt=function(){},ti=function(){},$e=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],Ue=function(){function c(A){this.TAG="AC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])==2935)return o;o++}},c.prototype.readNextAC3Frame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=A[r+4]>>6,C=[48e3,44200,33e3][y],w=63&A[r+4],_=2*$e[y][w];if(r+_>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var I=this.findNextSyncwordOffset(r+_);this.current_syncword_offset_=I;var k=A[r+5]>>3,$=7&A[r+5],D=A[r+6]>>5,N=0;1&D&&D!==1&&(N+=2),4&D&&(N+=2),D===2&&(N+=2);var z=(A[r+6]<<8|A[r+7])>>12-N&1,q=[2,1,2,3,3,4,4,5][D]+z;(o=new ti).sampling_frequency=C,o.channel_count=q,o.channel_mode=D,o.bit_stream_identification=k,o.low_frequency_effects_channel_on=z,o.bit_stream_mode=$,o.frame_size_code=w,o.data=A.subarray(r,r+_)}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),Fe=function(c){var A;A=[c.sampling_rate_code<<6|c.bit_stream_identification<<1|c.bit_stream_mode>>2,(3&c.bit_stream_mode)<<6|c.channel_mode<<3|c.low_frequency_effects_channel_on<<2|c.frame_size_code>>4,c.frame_size_code<<4&224],this.config=A,this.sampling_rate=c.sampling_frequency,this.bit_stream_identification=c.bit_stream_identification,this.bit_stream_mode=c.bit_stream_mode,this.low_frequency_effects_channel_on=c.low_frequency_effects_channel_on,this.channel_count=c.channel_count,this.channel_mode=c.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},Xe=function(){},ut=function(){function c(A){this.TAG="EAC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&n.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return c.prototype.findNextSyncwordOffset=function(A){for(var o=A,r=this.data_;;){if(o+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if((r[o+0]<<8|r[o+1])==2935)return o;o++}},c.prototype.readNextEAC3Frame=function(){for(var A=this.data_,o=null;o==null&&!this.eof_flag_;){var r=this.current_syncword_offset_,y=new M(A.subarray(r+2)),C=(y.readBits(2),y.readBits(3),y.readBits(11)+1<<1),w=y.readBits(2),_=null,I=null;w===3?(_=[24e3,22060,16e3][w=y.readBits(2)],I=3):(_=[48e3,44100,32e3][w],I=y.readBits(2));var k=y.readBits(3),$=y.readBits(1),D=y.readBits(5);if(r+C>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var N=this.findNextSyncwordOffset(r+C);this.current_syncword_offset_=N;var z=[2,1,2,3,3,4,4,5][k]+$;y.destroy(),(o=new Xe).sampling_frequency=_,o.channel_count=z,o.channel_mode=k,o.bit_stream_identification=D,o.low_frequency_effects_channel_on=$,o.frame_size=C,o.num_blks=[1,2,3,6][I],o.data=A.subarray(r,r+C)}return o},c.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},c.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},c}(),si=function(c){var A,o=Math.floor(c.frame_size*c.sampling_frequency/(16*c.num_blks));A=[255&o,248&o,c.sampling_rate_code<<6|c.bit_stream_identification<<1,c.channel_mode<<1|c.low_frequency_effects_channel_on,0],this.config=A,this.sampling_rate=c.sampling_frequency,this.bit_stream_identification=c.bit_stream_identification,this.num_blks=c.num_blks,this.low_frequency_effects_channel_on=c.low_frequency_effects_channel_on,this.channel_count=c.channel_count,this.channel_mode=c.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"},Xt=function(){var c=function(A,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,y){r.__proto__=y}||function(r,y){for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&(r[C]=y[C])},c(A,o)};return function(A,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=A}c(A,o),A.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}}(),he=function(){return he=Object.assign||function(c){for(var A,o=1,r=arguments.length;o0)&&!(r=C.next()).done;)w.push(r.value)}catch(_){y={error:_}}finally{try{r&&!r.done&&(o=C.return)&&o.call(C)}finally{if(y)throw y.error}}return w},Ie=function(c,A,o){if(arguments.length===2)for(var r,y=0,C=A.length;y=4?(n.A.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),y-=4):C===204&&n.A.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:C,sync_offset:y})},A.prototype.bindDataSource=function(o){return o.onDataArrival=this.parseChunks.bind(this),this},A.prototype.resetMediaInfo=function(){this.media_info_=new h.A},A.prototype.parseChunks=function(o,r){var y;if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new B.j4("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var C=0;for(this.first_parse_&&(this.first_parse_=!1,C=this.sync_offset_);C+this.ts_packet_size_<=o.byteLength;){var w=r+C;this.ts_packet_size_===192&&(C+=4);var _=new Uint8Array(o,C,188),I=_[0];if(I!==71){n.A.e(this.TAG,"sync_byte = ".concat(I,", not 0x47"));break}var k=(64&_[1])>>>6,$=(_[1],(31&_[1])<<8|_[2]),D=(48&_[3])>>>4,N=15&_[3],z={},q=4;if(D===2||D===3){var R=_[4];if(5+R===188){C+=188,this.ts_packet_size_===204&&(C+=16);continue}R>0&&(z=this.parseAdaptationField(o,C+4,1+R)),q=5+R}if(D===1||D===3){if($===0||$===this.current_pmt_pid_||this.pmt_!==void 0&&this.pmt_.pid_stream_type[$]===j.kSCTE35){var Y=188-q;this.handleSectionSlice(o,C+q,Y,{pid:$,file_position:w,payload_unit_start_indicator:k,continuity_conunter:N,random_access_indicator:z.random_access_indicator})}else if(((y=this.pmt_)===null||y===void 0?void 0:y.pid_stream_type[$])!==void 0){Y=188-q;var se=this.pmt_.pid_stream_type[$];($===this.pmt_.common_pids.h264||$===this.pmt_.common_pids.h265||$===this.pmt_.common_pids.adts_aac||$===this.pmt_.common_pids.loas_aac||$===this.pmt_.common_pids.ac3||$===this.pmt_.common_pids.eac3||$===this.pmt_.common_pids.opus||$===this.pmt_.common_pids.mp3||this.pmt_.pes_private_data_pids[$]||this.pmt_.timed_id3_pids[$])&&this.handlePESSlice(o,C+q,Y,{pid:$,stream_type:se,file_position:w,payload_unit_start_indicator:k,continuity_conunter:N,random_access_indicator:z.random_access_indicator})}}C+=188,this.ts_packet_size_===204&&(C+=16)}return this.dispatchAudioVideoMediaSegment(),C},A.prototype.parseAdaptationField=function(o,r,y){var C=new Uint8Array(o,r,y),w=C[0];return w>0?w>183?(n.A.w(this.TAG,"Illegal adaptation_field_length: ".concat(w)),{}):{discontinuity_indicator:(128&C[1])>>>7,random_access_indicator:(64&C[1])>>>6,elementary_stream_priority_indicator:(32&C[1])>>>5}:{}},A.prototype.handleSectionSlice=function(o,r,y,C){var w=new Uint8Array(o,r,y),_=this.section_slice_queues_?this.section_slice_queues_[C.pid]:{};if(C.payload_unit_start_indicator){var I=w[0];if(_!==void 0&&(_==null?void 0:_.total_length)!==0){var k=new Uint8Array(o,r+1,Math.min(y,I));_.slices.push(k),_.total_length+=k.byteLength,_.total_length===_.expected_length?this.emitSectionSlices(_,C):this.clearSlices(_,C)}for(var $=1+I;$=_.expected_length&&this.clearSlices(_,C),$+=k.byteLength}}else _!==void 0&&_.total_length!==0&&(k=new Uint8Array(o,r,Math.min(y,_.expected_length-_.total_length)),_.slices.push(k),_.total_length+=k.byteLength,_.total_length===_.expected_length?this.emitSectionSlices(_,C):_.total_length>=_.expected_length&&this.clearSlices(_,C))},A.prototype.handlePESSlice=function(o,r,y,C){var w=new Uint8Array(o,r,y),_=w[0]<<16|w[1]<<8|w[2],I=(w[3],w[4]<<8|w[5]);if(C.payload_unit_start_indicator){if(_!==1)return void n.A.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value ".concat(_));var k=this.pes_slice_queues_[C.pid];k&&(k.expected_length===0||k.expected_length===k.total_length?this.emitPESSlices(k,C):this.clearSlices(k,C)),this.pes_slice_queues_&&(this.pes_slice_queues_[C.pid]=new ge,this.pes_slice_queues_[C.pid].file_position=C.file_position,this.pes_slice_queues_[C.pid].random_access_indicator=C.random_access_indicator)}if(this.pes_slice_queues_[C.pid]!==void 0){var $=this.pes_slice_queues_[C.pid];$.slices.push(w),C.payload_unit_start_indicator&&($.expected_length=I===0?0:I+6),$.total_length+=w.byteLength,$.expected_length>0&&$.expected_length===$.total_length?this.emitPESSlices($,C):$.expected_length>0&&$.expected_length<$.total_length&&this.clearSlices($,C)}},A.prototype.emitSectionSlices=function(o,r){for(var y=new Uint8Array(o.total_length),C=0,w=0;C>>6,I=r[8],k=void 0,$=void 0;_!==2&&_!==3||(k=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,$=_===3?536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2:k);var D=9+I,N=void 0;if(w!==0){if(w<3+I)return void n.A.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");N=w-3-I}else N=r.byteLength-D;var z=r.subarray(D,D+N);switch(o.stream_type){case j.kMPEG1Audio:case j.kMPEG2Audio:this.parseMP3Payload(z,k);break;case j.kPESPrivateData:this.pmt_.common_pids.opus===o.pid?this.parseOpusPayload(z,k):this.pmt_.common_pids.ac3===o.pid?this.parseAC3Payload(z,k):this.pmt_.common_pids.eac3===o.pid?this.parseEAC3Payload(z,k):this.pmt_.smpte2038_pids[o.pid]?this.parseSMPTE2038MetadataPayload(z,k,$,o.pid,C):this.parsePESPrivateDataPayload(z,k,$,o.pid,C);break;case j.kADTSAAC:this.parseADTSAACPayload(z,k);break;case j.kLOASAAC:this.parseLOASAACPayload(z,k);break;case j.kAC3:this.parseAC3Payload(z,k);break;case j.kEAC3:this.parseEAC3Payload(z,k);break;case j.kID3:this.parseTimedID3MetadataPayload(z,k,$,o.pid,C);break;case j.kH264:this.parseH264Payload(z,k,$,o.file_position,o.random_access_indicator);break;case j.kH265:this.parseH265Payload(z,k,$,o.file_position,o.random_access_indicator)}}else C!==188&&C!==191&&C!==240&&C!==241&&C!==255&&C!==242&&C!==248||o.stream_type!==j.kPESPrivateData||(D=6,N=void 0,N=w!==0?w:r.byteLength-D,z=r.subarray(D,D+N),this.parsePESPrivateDataPayload(z,void 0,void 0,o.pid,C));else n.A.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value ".concat(y))},A.prototype.parsePAT=function(o){var r=o[0];if(r===0){var y=(15&o[1])<<8|o[2],C=(o[3],o[4],(62&o[5])>>>1),w=1&o[5],_=o[6],I=(o[7],null);if(w===1&&_===0)(I=new Q).version_number=C;else if((I=this.pat_)==null)return;for(var k=y-5-4,$=-1,D=-1,N=8;N<8+k;N+=4){var z=o[N]<<8|o[N+1],q=(31&o[N+2])<<8|o[N+3];z===0?I.network_pid=q:(I.program_pmt_pid[z]=q,$===-1&&($=z),D===-1&&(D=q))}w===1&&_===0&&(this.pat_===void 0&&n.A.v(this.TAG,"Parsed first PAT: ".concat(JSON.stringify(I))),this.pat_=I,this.current_program_=$,this.current_pmt_pid_=D)}else n.A.e(this.TAG,"parsePAT: table_id ".concat(r," is not corresponded to PAT!"))},A.prototype.parsePMT=function(o){var r=o[0];if(r===2){var y=(15&o[1])<<8|o[2],C=o[3]<<8|o[4],w=(62&o[5])>>>1,_=1&o[5],I=o[6],k=(o[7],null);if(_===1&&I===0)(k=new ue).program_number=C,k.version_number=w,this.program_pmt_map_[C]=k;else if((k=this.program_pmt_map_[C])==null)return;o[8],o[9];for(var $=(15&o[10])<<8|o[11],D=12+$,N=y-9-$-4,z=D;z0){for(var de=z+5;de1&&(n.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat($,"ms, PES pts: ").concat(k,"ms")),k=$)}}for(var D=new X(o),N=null,z=k,q=0;(N=D.readNextAACFrame())!=null;){I=1024/N.sampling_frequency*1e3;var R={codec:"aac",data:N};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)):(this.audio_metadata_={codec:"aac",audio_object_type:N.audio_object_type,sampling_freq_index:N.sampling_freq_index,sampling_frequency:N.sampling_frequency,channel_config:N.channel_config},this.dispatchAudioInitSegment(R)),q=z;var Y=Math.floor(z),se={unit:N.data,length:N.data.byteLength,pts:Y,dts:Y};this.audio_track_&&((w=this.audio_track_)===null||w===void 0||w.samples.push(se),this.audio_track_.length+=N.data.byteLength),z+=I}D.hasIncompleteData()&&(this.aac_last_incomplete_data_=D.getIncompleteData()),q&&(this.aac_last_sample_pts_=q)}},A.prototype.parseLOASAACPayload=function(o,r){var y,C,w;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var _=new Uint8Array(o.byteLength+this.aac_last_incomplete_data_.byteLength);_.set(this.aac_last_incomplete_data_,0),_.set(o,this.aac_last_incomplete_data_.byteLength),o=_}var I,k=0;if(r!==void 0&&(k=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="aac"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)I=1024/this.audio_metadata_.sampling_frequency*1e3,k=this.aac_last_sample_pts_+I;else if(r===void 0)return void n.A.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){I=1024/this.audio_metadata_.sampling_frequency*1e3;var $=this.aac_last_sample_pts_+I;Math.abs($-k)>1&&(n.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat($,"ms, PES pts: ").concat(k,"ms")),k=$)}}for(var D=new J(o),N=null,z=k,q=0;(N=D.readNextAACFrame((C=this.loas_previous_frame)!==null&&C!==void 0?C:void 0))!=null;){this.loas_previous_frame=N,I=1024/N.sampling_frequency*1e3;var R={codec:"aac",data:N};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)):(this.audio_metadata_={codec:"aac",audio_object_type:N.audio_object_type,sampling_freq_index:N.sampling_freq_index,sampling_frequency:N.sampling_frequency,channel_config:N.channel_config},this.dispatchAudioInitSegment(R)),q=z;var Y=Math.floor(z),se={unit:N.data,length:N.data.byteLength,pts:Y,dts:Y};this.audio_track_&&((w=this.audio_track_)===null||w===void 0||w.samples.push(se),this.audio_track_.length+=N.data.byteLength),z+=I}D.hasIncompleteData()&&(this.aac_last_incomplete_data_=D.getIncompleteData()),q&&(this.aac_last_sample_pts_=q)}},A.prototype.parseAC3Payload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="ac-3"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=1536/this.audio_metadata_.sampling_frequency*1e3,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"AC3: Unknown pts")}for(var I=new Ue(o),k=null,$=_,D=0;(k=I.readNextAC3Frame())!=null;){w=1536/k.sampling_frequency*1e3;var N={codec:"ac-3",data:k};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"ac-3",sampling_frequency:k.sampling_frequency,bit_stream_identification:k.bit_stream_identification,bit_stream_mode:k.bit_stream_mode,low_frequency_effects_channel_on:k.low_frequency_effects_channel_on,channel_mode:k.channel_mode},this.dispatchAudioInitSegment(N)),D=$;var z=Math.floor($),q={unit:k.data,length:k.data.byteLength,pts:z,dts:z};this.audio_track_&&((C=this.audio_track_)===null||C===void 0||C.samples.push(q),this.audio_track_.length+=k.data.byteLength),$+=w}D&&(this.aac_last_sample_pts_=D)}},A.prototype.parseEAC3Payload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="ec-3"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=256*(this.audio_metadata_.num_blks||0)/(this.audio_metadata_.sampling_frequency||0)*1e3,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"EAC3: Unknown pts")}for(var I=new ut(o),k=null,$=_,D=0;(k=I.readNextEAC3Frame())!=null;){w=1536/k.sampling_frequency*1e3;var N={codec:"ec-3",data:k};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"ec-3",sampling_frequency:k.sampling_frequency,bit_stream_identification:k.bit_stream_identification,low_frequency_effects_channel_on:k.low_frequency_effects_channel_on,num_blks:k.num_blks,channel_mode:k.channel_mode},this.dispatchAudioInitSegment(N)),D=$;var z=Math.floor($),q={unit:k.data,length:k.data.byteLength,pts:z,dts:z};this.audio_track_&&((C=this.audio_track_)===null||C===void 0||C.samples.push(q),this.audio_track_.length+=k.data.byteLength),$+=w}D&&(this.aac_last_sample_pts_=D)}},A.prototype.parseOpusPayload=function(o,r){var y,C;if(!this.has_video_||this.video_init_segment_dispatched_){var w,_=0;if(r!==void 0&&(_=r/this.timescale_),((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="opus"){if(r===void 0&&this.aac_last_sample_pts_!==void 0)w=20,_=this.aac_last_sample_pts_+w;else if(r===void 0)return void n.A.w(this.TAG,"Opus: Unknown pts")}for(var I=_,k=0,$=0;$>>3&3,w=(6&o[1])>>1,_=(o[2],(12&o[2])>>>2),I=3&~(o[3]>>>6)?2:1,k=0,$=34;switch(C){case 0:k=[11025,12e3,8e3,0][_];break;case 2:k=[22050,24e3,16e3,0][_];break;case 3:k=[44100,48e3,32e3,0][_]}switch(w){case 1:$=34;break;case 2:$=33;break;case 3:$=32}var D=new Kt;D.object_type=$,D.sample_rate=k,D.channel_count=I,D.data=o;var N={codec:"mp3",data:D};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(N)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(N)):(this.audio_metadata_={codec:"mp3",object_type:$,sample_rate:k,channel_count:I},this.dispatchAudioInitSegment(N));var z={unit:o,length:o.byteLength,pts:r/this.timescale_,dts:r/this.timescale_};this.audio_track_&&((y=this.audio_track_)===null||y===void 0||y.samples.push(z),this.audio_track_.length+=o.byteLength)}},A.prototype.detectAudioMetadataChange=function(o){var r,y,C,w;if(o.codec!==((r=this.audio_metadata_)===null||r===void 0?void 0:r.codec))return n.A.v(this.TAG,"Audio: Audio Codecs changed from "+"".concat((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec," to ").concat(o.codec)),!0;if(o.codec==="aac"&&this.audio_metadata_.codec==="aac"){if((_=o.data).audio_object_type!==this.audio_metadata_.audio_object_type)return n.A.v(this.TAG,"AAC: AudioObjectType changed from "+"".concat(this.audio_metadata_.audio_object_type," to ").concat(_.audio_object_type)),!0;if(_.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return n.A.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sampling_freq_index," to ").concat(_.sampling_freq_index)),!0;if(_.channel_config!==this.audio_metadata_.channel_config)return n.A.v(this.TAG,"AAC: Channel configuration changed from "+"".concat((C=this.audio_metadata_)===null||C===void 0?void 0:C.channel_config," to ").concat(_.channel_config)),!0}else if(o.codec==="ac-3"&&this.audio_metadata_.codec==="ac-3"){var _;if((_=o.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return n.A.v(this.TAG,"AC3: Sampling Frequency changed from "+"".concat((w=this.audio_metadata_)===null||w===void 0?void 0:w.sampling_frequency," to ").concat(_.sampling_frequency)),!0;if(_.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return n.A.v(this.TAG,"AC3: Bit Stream Identification changed from "+"".concat(this.audio_metadata_.bit_stream_identification," to ").concat(_.bit_stream_identification)),!0;if(_.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return n.A.v(this.TAG,"AC3: BitStream Mode changed from "+"".concat(this.audio_metadata_.bit_stream_mode," to ").concat(_.bit_stream_mode)),!0;if(_.channel_mode!==this.audio_metadata_.channel_mode)return n.A.v(this.TAG,"AC3: Channel Mode changed from "+"".concat(this.audio_metadata_.channel_mode," to ").concat(_.channel_mode)),!0;if(_.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return n.A.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+"".concat(this.audio_metadata_.low_frequency_effects_channel_on," to ").concat(_.low_frequency_effects_channel_on)),!0}else if(o.codec==="opus"&&this.audio_metadata_.codec==="opus"){if((I=o.meta).sample_rate!==this.audio_metadata_.sample_rate)return n.A.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(I.sample_rate)),!0;if(I.channel_count!==this.audio_metadata_.channel_count)return n.A.v(this.TAG,"Opus: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(I.channel_count)),!0}else if(o.codec==="mp3"&&this.audio_metadata_.codec==="mp3"){var I;if((I=o.data).object_type!==this.audio_metadata_.object_type)return n.A.v(this.TAG,"MP3: AudioObjectType changed from "+"".concat(this.audio_metadata_.object_type," to ").concat(I.object_type)),!0;if(I.sample_rate!==this.audio_metadata_.sample_rate)return n.A.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(I.sample_rate)),!0;if(I.channel_count!==this.audio_metadata_.channel_count)return n.A.v(this.TAG,"MP3: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(I.channel_count)),!0}return!1},A.prototype.dispatchAudioInitSegment=function(o){var r,y,C,w,_,I,k={type:"audio"};if(k.id=(r=this.audio_track_)===null||r===void 0?void 0:r.id,k.timescale=1e3,k.duration=this.duration_,((y=this.audio_metadata_)===null||y===void 0?void 0:y.codec)==="aac"){var $=o.codec==="aac"?o.data:null,D=new le($);k.audioSampleRate=D.sampling_rate,k.channelCount=D.channel_count,k.codec=D.codec_mimetype,k.originalCodec=D.original_codec_mimetype,k.config=D.config,k.refSampleDuration=1024/k.audioSampleRate*k.timescale}else if(((C=this.audio_metadata_)===null||C===void 0?void 0:C.codec)==="ac-3"){var N=o.codec==="ac-3"?o.data:null,z=new Fe(N);k.audioSampleRate=z.sampling_rate,k.channelCount=z.channel_count,k.codec=z.codec_mimetype,k.originalCodec=z.original_codec_mimetype,k.config=z.config,k.refSampleDuration=1536/k.audioSampleRate*k.timescale}else if(((w=this.audio_metadata_)===null||w===void 0?void 0:w.codec)==="ec-3"){var q=o.codec==="ec-3"?o.data:null,R=new si(q);k.audioSampleRate=R.sampling_rate,k.channelCount=R.channel_count,k.codec=R.codec_mimetype,k.originalCodec=R.original_codec_mimetype,k.config=R.config,k.refSampleDuration=256*R.num_blks/k.audioSampleRate*k.timescale}else((_=this.audio_metadata_)===null||_===void 0?void 0:_.codec)==="opus"?(k.audioSampleRate=this.audio_metadata_.sample_rate,k.channelCount=this.audio_metadata_.channel_count,k.channelConfigCode=this.audio_metadata_.channel_config_code,k.codec="opus",k.originalCodec="opus",k.config=void 0,k.refSampleDuration=20):((I=this.audio_metadata_)===null||I===void 0?void 0:I.codec)==="mp3"&&(k.audioSampleRate=this.audio_metadata_.sample_rate,k.channelCount=this.audio_metadata_.channel_count,k.codec="mp3",k.originalCodec="mp3",k.config=void 0);this.audio_init_segment_dispatched_||n.A.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: ".concat(k.codec)),this.onTrackMetadata&&this.onTrackMetadata("audio",k),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var Y=this.media_info_;Y.hasAudio=!0,Y.audioCodec=k.originalCodec,Y.audioSampleRate=k.audioSampleRate,Y.audioChannelCount=k.channelCount,Y.hasVideo&&Y.videoCodec?Y.mimeType='video/mp2t; codecs="'.concat(Y.videoCodec,",").concat(Y.audioCodec,'"'):Y.mimeType='video/mp2t; codecs="'.concat(Y.audioCodec,'"'),Y.isComplete()&&this.onMediaInfo&&this.onMediaInfo(Y)},A.prototype.dispatchPESPrivateDataDescriptor=function(o,r,y){var C=new ye;C.pid=o,C.stream_type=r,C.descriptor=y,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(C)},A.prototype.parsePESPrivateDataPayload=function(o,r,y,C,w){var _=new ce;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}else _.nearest_pts=this.aac_last_sample_pts_;if(y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}this.onPESPrivateData&&this.onPESPrivateData(_)},A.prototype.parseTimedID3MetadataPayload=function(o,r,y,C,w){var _=new ce;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}if(y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}this.onTimedID3Metadata&&this.onTimedID3Metadata(_)},A.prototype.parseSMPTE2038MetadataPayload=function(o,r,y,C,w){var _=new Pt;if(_.pid=C,_.stream_id=w,_.len=o.byteLength,_.data=o,r!==void 0){var I=Math.floor(r/this.timescale_);_.pts=I}if(_.nearest_pts=this.aac_last_sample_pts_,y!==void 0){var k=Math.floor(y/this.timescale_);_.dts=k}_.ancillaries=function($){for(var D=new M($),N=0,z=[];N+=6,D.readBits(6)===0;){var q=D.readBool();N+=1;var R=D.readBits(11);N+=11;var Y=D.readBits(12);N+=12;var se=255&D.readBits(10);N+=10;var re=255&D.readBits(10);N+=10;var de=255&D.readBits(10);N+=10;for(var oe=new Uint8Array(de),_e=0;_e>>24&255,C[1]=y>>>16&255,C[2]=y>>>8&255,C[3]=255&y,C.set(A,4);var k=8;for(I=0;I<_;I++)C.set(w[I],k),k+=w[I].byteLength;return C},c.generateInitSegment=function(A){var o=c.box(c.types.ftyp,c.constants.FTYP),r=c.moov(A),y=new Uint8Array(o.byteLength+r.byteLength);return y.set(o,0),y.set(r,o.byteLength),y},c.moov=function(A){var o=c.mvhd(A.timescale,A.duration),r=c.trak(A),y=c.mvex(A);return c.box(c.types.moov,o,r,y)},c.mvhd=function(A,o){return c.box(c.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A,o>>>24&255,o>>>16&255,o>>>8&255,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},c.trak=function(A){return c.box(c.types.trak,c.tkhd(A),c.mdia(A))},c.tkhd=function(A){var o=A.id,r=A.duration,y=A.presentWidth,C=A.presentHeight;return c.box(c.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,y>>>8&255,255&y,0,0,C>>>8&255,255&C,0,0]))},c.mdia=function(A){return c.box(c.types.mdia,c.mdhd(A),c.hdlr(A),c.minf(A))},c.mdhd=function(A){var o=A.timescale,r=A.duration;return c.box(c.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))},c.hdlr=function(A){var o;return o=A.type==="audio"?c.constants.HDLR_AUDIO:c.constants.HDLR_VIDEO,c.box(c.types.hdlr,o)},c.minf=function(A){var o;return o=A.type==="audio"?c.box(c.types.smhd,c.constants.SMHD):c.box(c.types.vmhd,c.constants.VMHD),c.box(c.types.minf,o,c.dinf(),c.stbl(A))},c.dinf=function(){return c.box(c.types.dinf,c.box(c.types.dref,c.constants.DREF))},c.stbl=function(A){return c.box(c.types.stbl,c.stsd(A),c.box(c.types.stts,c.constants.STTS),c.box(c.types.stsc,c.constants.STSC),c.box(c.types.stsz,c.constants.STSZ),c.box(c.types.stco,c.constants.STCO))},c.stsd=function(A){return A.type==="audio"?A.codec==="mp3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp3(A)):A.codec==="ac-3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.ac3(A)):A.codec==="ec-3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.ec3(A)):A.codec==="opus"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.Opus(A)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp4a(A)):A.type==="video"&&A.codec.startsWith("hvc1")?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.hvc1(A)):A.type==="video"&&A.codec.startsWith("av01")?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.av01(A)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.avc1(A))},c.mp3=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types[".mp3"],y)},c.mp4a=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types.mp4a,y,c.esds(A))},c.ac3=function(A){var o,r=A.channelCount,y=A.audioSampleRate,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,y>>>8&255,255&y,0,0]);return c.box(c.types["ac-3"],C,c.box(c.types.dac3,new Uint8Array((o=A.config)!==null&&o!==void 0?o:[])))},c.ec3=function(A){var o,r=A.channelCount,y=A.audioSampleRate,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,y>>>8&255,255&y,0,0]);return c.box(c.types["ec-3"],C,c.box(c.types.dec3,new Uint8Array((o=A.config)!==null&&o!==void 0?o:[])))},c.esds=function(A){var o,r=(o=A.config)!==null&&o!==void 0?o:[],y=r.length,C=new Uint8Array([0,0,0,0,3,23+y,0,1,0,4,15+y,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([y]).concat(r).concat([6,1,2]));return c.box(c.types.esds,C)},c.Opus=function(A){var o=A.channelCount,r=A.audioSampleRate,y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,o,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return c.box(c.types.Opus,y,c.dOps(A))},c.dOps=function(A){var o=A.channelCount,r=A.channelConfigCode,y=A.audioSampleRate,C=[];switch(r){case 1:case 2:C=[0];break;case 0:C=[255,1,1,0,1];break;case 128:C=[255,2,0,0,1];break;case 3:C=[1,2,1,0,2,1];break;case 4:C=[1,2,2,0,1,2,3];break;case 5:C=[1,3,2,0,4,1,2,3];break;case 6:C=[1,4,2,0,4,1,2,3,5];break;case 7:C=[1,4,2,0,4,1,2,3,5,6];break;case 8:C=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:C=[1,1,2,0,1];break;case 131:C=[1,1,3,0,1,2];break;case 132:C=[1,1,4,0,1,2,3];break;case 133:C=[1,1,5,0,1,2,3,4];break;case 134:C=[1,1,6,0,1,2,3,4,5];break;case 135:C=[1,1,7,0,1,2,3,4,5,6];break;case 136:C=[1,1,8,0,1,2,3,4,5,6,7]}var w=new Uint8Array(function(_,I,k){if(arguments.length===2)for(var $,D=0,N=I.length;D>>24&255,y>>>17&255,y>>>8&255,y>>>0&255,0,0],function(_,I){var k=typeof Symbol=="function"&&_[Symbol.iterator];if(!k)return _;var $,D,N=k.call(_),z=[];try{for(;(I===void 0||I-- >0)&&!($=N.next()).done;)z.push($.value)}catch(q){D={error:q}}finally{try{$&&!$.done&&(k=N.return)&&k.call(N)}finally{if(D)throw D.error}}return z}(C),!1));return c.box(c.types.dOps,w)},c.avc1=function(A){var o=A.avcc,r=A.codecWidth,y=A.codecHeight,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,y>>>8&255,255&y,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.avc1,C,c.box(c.types.avcC,o))},c.hvc1=function(A){var o=A.hvcc,r=A.codecWidth,y=A.codecHeight,C=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,y>>>8&255,255&y,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.hvc1,C,c.box(c.types.hvcC,o))},c.av01=function(A){var o,r,y=A.av1c,C=(o=A.codecWidth)!==null&&o!==void 0?o:192,w=(r=A.codecHeight)!==null&&r!==void 0?r:108,_=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,C>>>8&255,255&C,w>>>8&255,255&w,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.av01,_,c.box(c.types.av1C,y))},c.mvex=function(A){return c.box(c.types.mvex,c.trex(A))},c.trex=function(A){var o=A.id,r=new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return c.box(c.types.trex,r)},c.moof=function(A,o){return c.box(c.types.moof,c.mfhd(A.sequenceNumber),c.traf(A,o))},c.mfhd=function(A){var o=new Uint8Array([0,0,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A]);return c.box(c.types.mfhd,o)},c.traf=function(A,o){var r=A.id,y=c.box(c.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),C=c.box(c.types.tfdt,new Uint8Array([0,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),w=c.sdtp(A),_=c.trun(A,w.byteLength+16+16+8+16+8+8);return c.box(c.types.traf,y,C,_,w)},c.sdtp=function(A){for(var o=A.samples||[],r=o.length,y=new Uint8Array(4+r),C=0;C>>24&255,y>>>16&255,y>>>8&255,255&y,o>>>24&255,o>>>16&255,o>>>8&255,255&o],0);for(var _=0;_>>24&255,I>>>16&255,I>>>8&255,255&I,k>>>24&255,k>>>16&255,k>>>8&255,255&k,$.isLeading<<2|$.dependsOn,$.isDependedOn<<6|$.hasRedundancy<<4|$.isNonSync,0,0,D>>>24&255,D>>>16&255,D>>>8&255,255&D],12+16*_)}return c.box(c.types.trun,w)},c.mdat=function(A){return c.box(c.types.mdat,A)},c.constants={FTYP:new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),STSD_PREFIX:new Uint8Array([0,0,0,0,0,0,0,1]),STTS:it,STSC:it,STCO:it,STSZ:new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),HDLR_VIDEO:new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),HDLR_AUDIO:new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),DREF:new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),SMHD:new Uint8Array([0,0,0,0,0,0,0,0]),VMHD:new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},c}();ht.init();const lt=ht,Rt=function(){function c(){}return c.getSilentFrame=function(A,o){if(A==="mp4a.40.2"){if(o===1)return new Uint8Array([0,200,0,128,35,128]);if(o===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(o===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(o===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(o===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(o===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(o===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(o===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(o===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},c}();var St=t(1951);const jt=function(){function c(A){var o;this.TAG="MP4Remuxer",this._fillSilentAfterSeek=!1,this._config=A,this._isLive=!!A.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new St.Sc("audio"),this._videoSegmentInfoList=new St.Sc("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.A.chrome||!(s.A.version&&s.A.version.major<50||s.A.version&&s.A.version.major===50&&(((o=s.A.version)===null||o===void 0?void 0:o.build)||0)<2661)),this._fillSilentAfterSeek=!(!s.A.msedge&&!s.A.msie),this._mp3UseMpegAudio=!s.A.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return c.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},c.prototype.bindDataSource=function(A){var o;return A.onDataAvailable=(o=this.remux)===null||o===void 0?void 0:o.bind(this),A.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(c.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(A){this._onInitSegment=A},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(A){this._onMediaSegment=A},enumerable:!1,configurable:!0}),c.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},c.prototype.seek=function(A){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},c.prototype.remux=function(A,o){if(!this._onMediaSegment)throw new B.j4("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(A,o),o&&this._remuxVideo(o),A&&this._remuxAudio(A)},c.prototype._onTrackMetadataReceived=function(A,o){var r=null,y="mp4",C=o.codec;if(A==="audio")this._audioMeta=o,o.codec==="mp3"&&this._mp3UseMpegAudio?(y="mpeg",C="",r=new Uint8Array):r=lt.generateInitSegment(o);else{if(A!=="video")return;this._videoMeta=o,r=lt.generateInitSegment(o)}if(!this._onInitSegment)throw new B.j4("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(A,{type:A,data:r.buffer,codec:C,container:"".concat(A,"/").concat(y),mediaDuration:o.duration})},c.prototype._calculateDtsBase=function(A,o){var r,y;this._dtsBaseInited||(!((r=A==null?void 0:A.samples)===null||r===void 0)&&r.length&&(this._audioDtsBase=A.samples[0].dts),!((y=o==null?void 0:o.samples)===null||y===void 0)&&y.length&&(this._videoDtsBase=o.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},c.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},c.prototype.flushStashedSamples=function(){var A=this._videoStashedLastSample,o=this._audioStashedLastSample,r={type:"video",id:1,sequenceNumber:0,samples:[],length:0};A!=null&&(r.samples.push(A),r.length=A==null?void 0:A.length);var y={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};o!=null&&(y.samples.push(o),y.length=o==null?void 0:o.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(r,!0),this._remuxAudio(y,!0)},c.prototype._remuxAudio=function(A,o){var r,y,C,w,_,I,k;if(this._audioMeta!=null){var $,D,N=A,z=N.samples,q=-1,R=this._audioMeta.refSampleDuration,Y=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,se=this._dtsBaseInited&&this._audioNextDts===void 0,re=!1;if(z&&z.length!==0&&(z.length!==1||o)){var de=0,oe=null,_e=0;Y?(de=0,_e=N.length):(de=8,_e=8+N.length);var ve=null;if(z.length>1&&(_e-=(ve=z.pop()).length),this._audioStashedLastSample!=null){var Ae=this._audioStashedLastSample;this._audioStashedLastSample=null,z.unshift(Ae),_e+=Ae.length}ve!=null&&(this._audioStashedLastSample=ve);var Le=z[0].dts-this._dtsBase;if(this._audioNextDts)$=Le-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())$=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(re=!0);else{var we=this._audioSegmentInfoList.getLastSampleBefore(Le);if(we!=null){var be=Le-(we.originalDts+we.duration);be<=3&&(be=0),$=Le-(we.dts+we.duration+be)}else $=0}if(re){var He=Le-$,At=this._videoSegmentInfoList.getLastSegmentBefore(Le);if(At!=null&&At.beginDts=3*(R||0)&&this._fillAudioTimestampGap&&!s.A.safari){$t=!0;var qe,Ze=Math.floor($/(R||0));n.A.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. `+"originalDts: ".concat(je," ms, curRefDts: ").concat(ot," ms, ")+"dtsCorrection: ".concat(Math.round($)," ms, generate: ").concat(Ze," frames")),ke=Math.floor(ot),et=Math.floor(ot+(R||0))-ke,(qe=Rt.getSilentFrame((C=this._audioMeta)===null||C===void 0?void 0:C.originalCodec,this._audioMeta.channelCount))==null&&(n.A.w(this.TAG,"Unable to generate silent frame for "+"".concat((w=this._audioMeta)===null||w===void 0?void 0:w.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),qe=Ve),Jt=[];for(var Gt=0;Gt=1?(_=Ne[Ne.length-1])===null||_===void 0?void 0:_.duration:Math.floor(R||0),this._audioNextDts=ke+et;q===-1&&(q=ke),Ne.push({dts:ke,pts:ke,cts:0,unit:Ae.unit,size:(I=Ae.unit)===null||I===void 0?void 0:I.byteLength,duration:et,originalDts:je,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),$t&&Ne.push.apply(Ne,Jt)}}if(Ne.length===0)return N.samples=[],void(N.length=0);for(Y?oe=new Uint8Array(_e):((oe=new Uint8Array(_e))[0]=_e>>>24&255,oe[1]=_e>>>16&255,oe[2]=_e>>>8&255,oe[3]=255&_e,oe.set(lt.types.mdat,4)),Qe=0;Qe1&&(q-=(R=k.pop()).length),this._videoStashedLastSample!=null){var Y=this._videoStashedLastSample;this._videoStashedLastSample=null,k.unshift(Y),q+=(Y==null?void 0:Y.length)||0}R!=null&&(this._videoStashedLastSample=R);var se=k[0].dts-this._dtsBase;if(this._videoNextDts)C=se-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())C=0;else{var re=this._videoSegmentInfoList.getLastSampleBefore(se);if(re!=null){var de=se-(re.originalDts+re.duration);de<=3&&(de=0),C=se-(re.dts+re.duration+de)}else C=0}for(var oe=new St.EZ,_e=[],ve=0;ve=1?_e[_e.length-1].duration:Math.floor(((r=this._videoMeta)===null||r===void 0?void 0:r.refSampleDuration)||0),we){var ke=new St.$_(be,At,Ae,Y.dts,!0);ke.fileposition=Y.fileposition,oe.appendSyncPoint(ke)}_e.push({dts:be,pts:At,cts:He,units:Y.units,size:Y.length,isKeyframe:we,duration:Ae,originalDts:Le,flags:{isLeading:0,dependsOn:we?2:1,isDependedOn:we?1:0,hasRedundancy:0,isNonSync:we?0:1}})}for((z=new Uint8Array(q))[0]=q>>>24&255,z[1]=q>>>16&255,z[2]=q>>>8&255,z[3]=255&q,z.set(lt.types.mdat,4),ve=0;ve<_e.length;ve++)for(var pt=_e[ve].units;pt!=null&&pt.length;){var Ne=pt.shift(),Qe=Ne==null?void 0:Ne.data;z.set(Qe,N),N+=Qe.byteLength}var Ve=_e[_e.length-1];if(w=Ve.dts+Ve.duration,_=Ve.pts+Ve.duration,this._videoNextDts=w,oe.beginDts=$,oe.endDts=w,oe.beginPts=D,oe.endPts=_,oe.originalBeginDts=_e[0].originalDts,oe.originalEndDts=Ve.originalDts+Ve.duration,oe.firstSample=new St.$_(_e[0].dts,_e[0].pts,_e[0].duration,_e[0].originalDts,!!_e[0].isKeyframe),oe.lastSample=new St.$_(Ve.dts,Ve.pts,Ve.duration,Ve.originalDts,!!Ve.isKeyframe),this._isLive||this._videoSegmentInfoList.append(oe),I.samples=_e,I.sequenceNumber++,this._forceFirstIDR){var je=_e[0].flags;je.dependsOn=2,je.isNonSync=0}var $t=lt.moof(I,$);I.samples=[],I.length=0,(y=this._onMediaSegment)===null||y===void 0||y.call(this,"video",{type:"video",data:this._mergeBoxes($t,z).buffer,sampleCount:_e.length,info:oe})}}},c.prototype._mergeBoxes=function(A,o){var r=new Uint8Array(A.byteLength+o.byteLength);return r.set(A,0),r.set(o,A.byteLength),r},c}();var Zt=t(8098),Lt=t(550);const di=function(){function c(A,o){var r;this.TAG="TransmuxingController",this._emitter=new a.A,this._config=o,A.segments||(A.segments=[{duration:A.duration,filesize:A.filesize,url:A.url}]),typeof A.cors!="boolean"&&(A.cors=!0),typeof A.withCredentials!="boolean"&&(A.withCredentials=!1),this._mediaDataSource=A,this._currentSegmentIndex=0;var y=0;(r=this._mediaDataSource.segments)===null||r===void 0||r.forEach(function(C){C.timestampBase=y,y+=C.duration,C.cors=A.cors,C.withCredentials=A.withCredentials,o.referrerPolicy&&(C.referrerPolicy=o.referrerPolicy)}),isNaN(y)||this._mediaDataSource.duration===y||(this._mediaDataSource.duration=y),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return c.prototype.destroy=function(){var A,o,r;this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&((A=this._ioctl)===null||A===void 0||A.destroy(),this._ioctl=null),this._demuxer&&((o=this._demuxer)===null||o===void 0||o.destroy(),this._demuxer=null),this._remuxer&&((r=this._remuxer)===null||r===void 0||r.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},c.prototype.on=function(A,o){this._emitter.addListener(A,o)},c.prototype.off=function(A,o){this._emitter.removeListener(A,o)},c.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},c.prototype._loadSegment=function(A,o){var r,y,C;if(this._currentSegmentIndex=A,(r=this._mediaDataSource)===null||r===void 0?void 0:r.segments){var w=(y=this._mediaDataSource)===null||y===void 0?void 0:y.segments[A],_=this._ioctl=new Zt.A(w,this._config,A);_.onError=this._onIOException.bind(this),_.onSeeked=this._onIOSeeked.bind(this),_.onComplete=this._onIOComplete.bind(this),_.onRedirect=this._onIORedirect.bind(this),_.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),o?(C=this._demuxer)===null||C===void 0||C.bindDataSource(this._ioctl):_.onDataArrival=this._onInitChunkArrival.bind(this),_.open(o)}},c.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},c.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},c.prototype.pause=function(){var A;!((A=this._ioctl)===null||A===void 0)&&A.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},c.prototype.resume=function(){var A;!((A=this._ioctl)===null||A===void 0)&&A.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},c.prototype.seek=function(A){var o,r,y,C,w,_,I,k,$,D,N,z,q,R;if(this._mediaInfo!=null&&(!((o=this._mediaInfo)===null||o===void 0)&&o.isSeekable())){var Y=this._searchSegmentIndexContains(A);if(Y===this._currentSegmentIndex){var se=!((r=this._mediaInfo)===null||r===void 0)&&r.segments?(y=this._mediaInfo)===null||y===void 0?void 0:y.segments[Y]:{};if(se===void 0)this._pendingSeekTime=A;else{var re=se==null?void 0:se.getNearestKeyframe(A);(C=this._remuxer)===null||C===void 0||C.seek(re==null?void 0:re.milliseconds),(w=this._ioctl)===null||w===void 0||w.seek(re==null?void 0:re.fileposition),this._pendingResolveSeekPoint=re==null?void 0:re.milliseconds}}else{var de=!((_=this._mediaInfo)===null||_===void 0)&&_.segments?(I=this._mediaInfo)===null||I===void 0?void 0:I.segments[Y]:{};de===void 0?(this._pendingSeekTime=A,this._internalAbort(),(k=this._remuxer)===null||k===void 0||k.seek(),($=this._remuxer)===null||$===void 0||$.insertDiscontinuity(),this._loadSegment(Y)):(re=de.getNearestKeyframe(A),this._internalAbort(),(D=this._remuxer)===null||D===void 0||D.seek(A),(N=this._remuxer)===null||N===void 0||N.insertDiscontinuity(),this._demuxer&&((z=this._demuxer)===null||z===void 0||z.resetMediaInfo(),this._demuxer.timestampBase=!((q=this._mediaDataSource)===null||q===void 0)&&q.segments?(R=this._mediaDataSource)===null||R===void 0?void 0:R.segments[Y].timestampBase:0),this._loadSegment(Y,re==null?void 0:re.fileposition),this._pendingResolveSeekPoint=re==null?void 0:re.milliseconds,this._reportSegmentMediaInfo(Y))}this._enableStatisticsReporter()}},c.prototype._searchSegmentIndexContains=function(A){var o,r=this._mediaDataSource.segments,y=((r==null?void 0:r.length)||0)-1;if(((r==null?void 0:r.length)||0)===0)return y;for(var C=0;C<((r==null?void 0:r.length)||0);C++)if(r&&A<(((o=r[C])===null||o===void 0?void 0:o.timestampBase)||0)){y=C-1;break}return y},c.prototype._onInitChunkArrival=function(A,o){var r,y,C,w,_,I=this,k=0;if(o>0)(r=this._demuxer)===null||r===void 0||r.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments?(y=this._mediaDataSource.segments[this._currentSegmentIndex])===null||y===void 0?void 0:y.timestampBase:0,k=((C=this._demuxer)===null||C===void 0?void 0:C.parseChunks(A,o))||0;else{var $=null;($=f.probe(A)).match&&(this._setupFLVDemuxerRemuxer($),k=((w=this._demuxer)===null||w===void 0?void 0:w.parseChunks(A,o))||0),$.match||$!=null&&$.needMoreData||($=ze.probe(A)).match&&(this._setupTSDemuxerRemuxer($),k=((_=this._demuxer)===null||_===void 0?void 0:_.parseChunks(A,o))||0),$.match||$!=null&&$.needMoreData||($=null,n.A.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(function(){I._internalAbort()}),this._emitter.emit(Lt.A.DEMUX_ERROR,G.A.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return k},c.prototype._setupFLVDemuxerRemuxer=function(A){var o;this._demuxer=new f(A,this._config),this._remuxer||(this._remuxer=new jt(this._config));var r=this._mediaDataSource;r.duration===void 0||isNaN(r.duration)||(this._demuxer.overridedDuration=r.duration),typeof r.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=r.hasAudio),typeof r.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=r.hasVideo),r.segments&&this._demuxer&&this._remuxer&&(this._demuxer.timestampBase=(o=r==null?void 0:r.segments[this._currentSegmentIndex])===null||o===void 0?void 0:o.timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this))},c.prototype._setupTSDemuxerRemuxer=function(A){var o=this._demuxer=new ze(A,this._config);this._remuxer||(this._remuxer=new jt(this._config)),o.onError=this._onDemuxException.bind(this),o.onMediaInfo=this._onMediaInfo.bind(this),o.onMetaDataArrived=this._onMetaDataArrived.bind(this),o.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),o.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),o.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),o.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),o.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},c.prototype._onMediaInfo=function(A){var o,r,y=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},A),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=((r=(o=this._mediaDataSource)===null||o===void 0?void 0:o.segments)===null||r===void 0?void 0:r.length)||0,Object.setPrototypeOf(this._mediaInfo,h.A.prototype));var C=Object.assign({},A);Object.setPrototypeOf(C,h.A.prototype),this._mediaInfo.segments&&(this._mediaInfo.segments[this._currentSegmentIndex]=C),this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var w=y._pendingSeekTime;y._pendingSeekTime=null,y.seek(w)})},c.prototype._onMetaDataArrived=function(A){this._emitter.emit(Lt.A.METADATA_ARRIVED,A)},c.prototype._onScriptDataArrived=function(A){this._emitter.emit(Lt.A.SCRIPTDATA_ARRIVED,A)},c.prototype._onTimedID3Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.dts!==void 0&&(A.dts-=r),this._emitter.emit(Lt.A.TIMED_ID3_METADATA_ARRIVED,A))},c.prototype._onSMPTE2038Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.dts!==void 0&&(A.dts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),this._emitter.emit(Lt.A.SMPTE2038_METADATA_ARRIVED,A))},c.prototype._onSCTE35Metadata=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),this._emitter.emit(Lt.A.SCTE35_METADATA_ARRIVED,A))},c.prototype._onPESPrivateDataDescriptor=function(A){this._emitter.emit(Lt.A.PES_PRIVATE_DATA_DESCRIPTOR,A)},c.prototype._onPESPrivateData=function(A){var o,r=(o=this._remuxer)===null||o===void 0?void 0:o.getTimestampBase();r!==void 0&&(A.pts!==void 0&&(A.pts-=r),A.nearest_pts!==void 0&&(A.nearest_pts-=r),A.dts!==void 0&&(A.dts-=r),this._emitter.emit(Lt.A.PES_PRIVATE_DATA_ARRIVED,A))},c.prototype._onIOSeeked=function(){var A;(A=this._remuxer)===null||A===void 0||A.insertDiscontinuity()},c.prototype._onIOComplete=function(A){var o,r,y=A+1;y<(((r=(o=this._mediaDataSource)===null||o===void 0?void 0:o.segments)===null||r===void 0?void 0:r.length)||0)?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(y)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(Lt.A.LOADING_COMPLETE),this._disableStatisticsReporter())},c.prototype._onIORedirect=function(A){var o,r=(o=this._ioctl)===null||o===void 0?void 0:o.extraData;this._mediaDataSource.segments&&(this._mediaDataSource.segments[r].redirectedURL=A)},c.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(Lt.A.RECOVERED_EARLY_EOF)},c.prototype._onIOException=function(A,o){n.A.e(this.TAG,"IOException: type = ".concat(A,", code = ").concat(o.code,", msg = ").concat(o.msg)),this._emitter.emit(Lt.A.IO_ERROR,A,o),this._disableStatisticsReporter()},c.prototype._onDemuxException=function(A,o){n.A.e(this.TAG,"DemuxException: type = ".concat(A,", info = ").concat(o)),this._emitter.emit(Lt.A.DEMUX_ERROR,A,o)},c.prototype._onRemuxerInitSegmentArrival=function(A,o){this._emitter.emit(Lt.A.INIT_SEGMENT,A,o)},c.prototype._onRemuxerMediaSegmentArrival=function(A,o){if(this._pendingSeekTime==null&&(this._emitter.emit(Lt.A.MEDIA_SEGMENT,A,o),this._pendingResolveSeekPoint!=null&&A==="video")){var r=o.info.syncPoints,y=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,s.A.safari&&r.length>0&&r[0].originalDts===y&&(y=r[0].pts),this._emitter.emit(Lt.A.RECOMMEND_SEEKPOINT,y)}},c.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&this._reportStatisticsInfo&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},c.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},c.prototype._reportSegmentMediaInfo=function(A){var o,r,y,C,w=!((o=this._mediaInfo)===null||o===void 0)&&o.segments?(r=this._mediaInfo)===null||r===void 0?void 0:r.segments[A]:{},_=Object.assign({},w);_.duration=(y=this._mediaInfo)===null||y===void 0?void 0:y.duration,_.segmentCount=(C=this._mediaInfo)===null||C===void 0?void 0:C.segmentCount,delete _.segments,delete _.keyframesIndex,this._emitter.emit(Lt.A.MEDIA_INFO,_)},c.prototype._reportStatisticsInfo=function(){var A,o,r,y,C,w,_={};_.url=(A=this._ioctl)===null||A===void 0?void 0:A.currentURL,_.hasRedirect=(o=this._ioctl)===null||o===void 0?void 0:o.hasRedirect,_.hasRedirect&&(_.redirectedURL=(r=this._ioctl)===null||r===void 0?void 0:r.currentRedirectedURL),_.speed=(y=this._ioctl)===null||y===void 0?void 0:y.currentSpeed,_.loaderType=(C=this._ioctl)===null||C===void 0?void 0:C.loaderType,_.currentSegmentIndex=this._currentSegmentIndex,_.totalSegmentCount=(w=this._mediaDataSource.segments)===null||w===void 0?void 0:w.length,this._emitter.emit(Lt.A.STATISTICS_INFO,_)},c}()},9987:(l,p,t)=>{var a=t(4417).charAt;l.exports=function(n,s,h){return s+(h?a(n,s).length:1)}}},d={};function b(l){var p=d[l];if(p!==void 0)return p.exports;var t=d[l]={exports:{}};return i[l].call(t.exports,t,t.exports,b),t.exports}return b.m=i,b.d=(l,p)=>{for(var t in p)b.o(p,t)&&!b.o(l,t)&&Object.defineProperty(l,t,{enumerable:!0,get:p[t]})},b.o=(l,p)=>Object.prototype.hasOwnProperty.call(l,p),b(1900)})())}(ro)),ro.exports);class oo extends qr{constructor(e){var i,d;super(e),this._videoMuted=!0,this.player=e;const b=document.createElement("video"),l=document.createElement("canvas");this.$posterElement=document.createElement("img"),b.oncontextmenu=t=>{t.preventDefault()},b.crossOrigin="anonymous",this._videoMuted=!window.___enableSoundOnUserInteraction___&&this.player._opt.autoPlay||this.player._opt.muted||!this.player._opt.hasAudio,b.muted=this._videoMuted,b.style.position="absolute",b.style.top="0px",b.style.left="0px",this._delayPlay=!1,e.$container.appendChild(b),this.videoInfo={width:"",height:"",encType:""},this.$videoElement=b,this.$canvasElement=l,this.canvasContext=l.getContext("2d"),this.fixChromeVideoFlashBug(),this.resize();const{proxy:p}=this.player.events;p(this.$videoElement,"loadstart",()=>{this.player.emit("loadstart")}),p(this.$videoElement,"loadeddata",()=>{this.player.debug.log("Video",`loadeddata ${this._delayPlay}`),this.player.emit(te.streamSuccess)}),p(this.$videoElement,"canplay",()=>{this.player.debug.log("Video",`canplay and _delayPlay is ${this._delayPlay}`),this._delayPlay&&this._play(),this.player.$container.contains(this.$posterElement)&&this.$posterElement&&this.player.$container.removeChild(this.$posterElement)}),p(this.$videoElement,"waiting",()=>{this.player.emit(te.videoWaiting)}),p(this.$videoElement,"timeupdate",()=>{this.player.emit(te.timeUpdate,this.currentTime),!this.isPlaying()&&this.init&&(this.player.debug.log("Video","timeupdate and this.isPlaying is false and retry play"),this.$videoElement.play())}),(d=(i=this.player.debug)===null||i===void 0?void 0:i.log)===null||d===void 0||d.call(i,"Video","init"),this._enableSoundOnUserInteraction=this._enableSoundOnUserInteraction.bind(this),window.addEventListener("mouseup",this._enableSoundOnUserInteraction),window.addEventListener("click",this._enableSoundOnUserInteraction),window.addEventListener("touchstart",this._enableSoundOnUserInteraction),window.addEventListener("keydown",this._enableSoundOnUserInteraction)}destroy(){var e;this.$canvasElement=null,this.canvasContext=null,this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(this.vwriter.close(),this.vwriter=null),!((e=this.player.$container)===null||e===void 0)&&e.contains(this.$posterElement)&&this.$posterElement&&this.player.$container.removeChild(this.$posterElement),super.destroy(),this.player.debug.log("Video","destroy")}fixChromeVideoFlashBug(){const e=function(){const d=navigator.userAgent.toLowerCase(),b={},l={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:d.indexOf("chrome")>-1&&d.indexOf("safari")>-1,Firefox:d.indexOf("firefox")>-1,Opera:d.indexOf("opera")>-1,Safari:d.indexOf("safari")>-1&&d.indexOf("chrome")===-1,Edge:d.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(d),WeixinBrowser:/MicroMessenger/i.test(d)};for(let p in l)if(l[p]){let t="";if(p==="IE")t=d.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if(p==="Chrome"){for(const a in navigator.mimeTypes)navigator.mimeTypes[a].type==="application/360softmgrplugin"&&(p="360");t=d.match(/chrome\/([\d.]+)/)[1]}else p==="Firefox"?t=d.match(/firefox\/([\d.]+)/)[1]:p==="Opera"?t=d.match(/opera\/([\d.]+)/)[1]:p==="Safari"?t=d.match(/version\/([\d.]+)/)[1]:p==="Edge"?t=d.match(/edge\/([\d.]+)/)[1]:p==="QQBrowser"&&(t=d.match(/qqbrowser\/([\d.]+)/)[1]);b.type=p,b.version=parseInt(t)}return b}(),i=e.type.toLowerCase();(i==="chrome"||i==="edge")&&(this.player.$container.style.backdropFilter="blur(0px)")}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),e===0)return this.player.debug.warn("Video","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._play()}}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_play(){if(this.$videoElement){const e=setTimeout(()=>{this.$videoElement.play().then(()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),setTimeout(()=>{this.isPlaying()||(this.player.debug.warn("Video","play failed and retry play"),this._play())},100)}).catch(i=>{this.player.debug.error("Video","_play error",i)}).finally(()=>{clearTimeout(e)})},20)}}pause(e){this._poster(),this.$videoElement.paused||(e?this.$videoElement&&this.$videoElement.pause():setTimeout(()=>{this.$videoElement&&this.$videoElement.pause()},100))}clearView(){}screenshot(e,i,d,b){var l;e=e||Wt()+"",b=b||oi.download,i=i||"png";const p={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};typeof d!="number"&&(d=Number(d||.92));const t=this.$videoElement,a=this.$canvasElement;a.width=t.videoWidth,a.height=t.videoHeight,(l=this.canvasContext)===null||l===void 0||l.drawImage(t,0,0,a.width,a.height);const n=a.toDataURL(p[i]||p.png,d);if(setTimeout(()=>{var s;(s=this.canvasContext)===null||s===void 0||s.clearRect(0,0,a.width,a.height),a.width=0,a.height=0},2e3),n!=="data:,"){if(b===oi.base64)return n;{const s=Qr(n,e+"."+i);return b===oi.blob?s:b===oi.download?(Un(s,e),s):void 0}}}initCanvasViewSize(){this.resize()}_poster(){const e=this.screenshot("poster","png",.75,oi.base64);e===void 0||e.length<10||(this.$posterElement.src=e,this.$posterElement.style.position="absolute",this.$posterElement.style.top="0px",this.$posterElement.style.left="0px",this.$posterElement.style.zIndex="1",this.$posterElement.style.objectFit="contain",this.$posterElement.style.pointerEvents="none",this.player.$container.appendChild(this.$posterElement),this.resize())}render(e){this.vwriter&&this.vwriter.write(e.videoFrame)}resize(){this._resizeElement(this.$videoElement),this._resizeElement(this.$posterElement)}_resizeElement(e){const i=this.player._opt;let d=this.player.width,b=this.player.height;const l=i.rotate;this._isFullScreen&&[0,180].includes(this._orientation)&&Mt()&&([d,b]=[b,d]),e.width=d,e.height=b,l!==270&&l!==90||(e.width=b,e.height=d);const p=(d-e.width)/2,t=(b-e.height)/2;let a="contain";i.scaleMode===bi.full&&(a="fill"),i.scaleMode===bi.fullAuto&&(a="cover"),e.style.objectFit=a,e.style.transform="rotate("+l+"deg)",e.style.left=p+"px",e.style.top=t+"px"}isPlaying(){return this.$videoElement&&!this.$videoElement.paused}get currentTime(){var e;return((e=this.$videoElement)===null||e===void 0?void 0:e.currentTime)||0}_enableSoundOnUserInteraction(){!this.player._opt.autoPlay||this.player.muted||window.____enableSoundOnUserInteraction___||(this.$videoElement.muted=!1),window.____enableSoundOnUserInteraction___=!0,window.removeEventListener("mouseup",this._enableSoundOnUserInteraction),window.removeEventListener("click",this._enableSoundOnUserInteraction),window.removeEventListener("touchstart",this._enableSoundOnUserInteraction),window.removeEventListener("keydown",this._enableSoundOnUserInteraction)}}class $a extends eo{constructor(e,i){super(e,i,oo),this._checkLoadingTimeout=null,this._opt.useMSE=!0,this.emit(te.decoderLoaded),i.autoPlay&&this._createPlayer(i)}close(){}_createPlayer(e){var i;this._opt=Object.assign({},this._opt,e),this._removeFlvEvents(),this.player&&(this.player.unload(),this.player.detachMediaElement(),this.player.destroy(),this.player=null),this.events||(this.events=new Gn(this)),this.video||(this.video=new oo(this)),(i=kt.LoggingControl)===null||i===void 0||i.applyConfig({globalTag:"EzuikitFlv",enableVerbose:!!this._opt.debug,enableDebug:!!this._opt.debug,enableInfo:!!this._opt.debug,enableWarn:!!this._opt.debug,enableError:!0}),this.player=kt.createPlayer({type:"flv",url:e.url,isLive:e.isLive},{stashInitialSize:128,enableWorker:!0,liveBufferLatencyChasing:!0,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:86400,fixAudioTimestampGap:!1}),this.player.attachMediaElement(this.video.$videoElement),this._flvEvents()}_removeFlvEvents(){this.player&&(this.player.off(kt.Events.ERROR),this.player.off(kt.Events.LOADING_COMPLETE),this.player.off(kt.Events.RECOVERED_EARLY_EOF),this.player.off(kt.Events.MEDIA_INFO),this.player.off(kt.Events.STATISTICS_INFO),this.player.off(kt.Events.DESTROYING))}_flvEvents(){if(this.player){let e=0;this.player.on(kt.Events.ERROR,(i,d,b)=>{var l;if(i==="MediaError"&&d==="MediaMSEError"&&b.code===9&&this.emit(vt.mediaSourceH265NotSupport,b),this.emit(te.error,{errorTypes:i,errorDetails:d,info:b}),i.indexOf("NetworkError")>-1&&(this.emit(te.streamError,{errorTypes:i,errorDetails:d,info:b,api:this._opt.url,type:"stream"}),this.player))try{this.pause().then(()=>{this.emit(te.delayTimeout)}).catch(()=>{this.emit(te.delayTimeout)})}catch{}if(i==="MediaError"&&d==="CodecUnsupported"&&b.code===-1&&b.msg.indexOf("Unsupported audio codec"))e===0&&(at.report(51,{event:i,value:b}),e=1,this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b)),this.emit(te.audioCodecUnsupported,!0));else if(!((l=b.msg)===null||l===void 0)&&l.includes("SourceBuffer is full")){const p=this.player._msectl._sourceBuffers[0];try{const t=this.video.$videoElement.currentTime;Math.max(0,t-5)>0&&p&&!p.updating&&p.remove(0,Math.max(0,t-5))}catch{}at.report(51,{event:i,value:b}),this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b))}else i==="NetworkError"&&d==="UnrecoverableEarlyEof"||(at.report(51,{event:i,value:b}),this.debug.error(`${kt.Events.ERROR}`,i,d,JSON.stringify(b)))}),this.player.on(kt.Events.LOADING_COMPLETE,i=>{this.debug.warn(`${kt.Events.LOADING_COMPLETE}`,JSON.stringify(i))}),this.player.on(kt.Events.RECOVERED_EARLY_EOF,i=>{this.debug.warn(`${kt.Events.RECOVERED_EARLY_EOF}`,i)}),this.player.on("media_info",i=>{this.clearCheckLoadingTimeout(),this.video.updateVideoInfo(Object.assign({encTypeCode:(i==null?void 0:i.videoCodec.indexOf("avc"))>=0?7:12},i))}),this.player.on(kt.Events.STATISTICS_INFO,i=>{i.decodedFrames===this._decodedFrames&&this._checkHeartTimeout===null?this.checkHeartTimeout():i.decodedFrames!==this._decodedFrames&&(this.clearCheckHeartTimeout(),this._decodedFrames=i.decodedFrames)}),this.player.on(kt.Events.DESTROYING,i=>{this.debug.log(`${kt.Events.DESTROYING}`,JSON.stringify(i))}),this.on(te.videoWaiting,()=>{this.clearCheckHeartTimeout(),this._checkHeartTimeout===null&&this.handleRender()}),this._onVideoLoadstart=this._onVideoLoadstart.bind(this),this.off("loadstart"),this.on("loadstart",this._onVideoLoadstart),this.on(te.timeUpdate,()=>{this.clearCheckHeartTimeout()}),this._onVideoStreamSuccess=this._onVideoStreamSuccess.bind(this),this.off(te.streamSuccess,this._onVideoStreamSuccess),this.on(te.streamSuccess,this._onVideoStreamSuccess)}}_onVideoLoadstart(){this.checkLoadingTimeout()}_onVideoStreamSuccess(){this.clearCheckLoadingTimeout()}getOption(){return this._opt}emitError(e,i=""){this.emit(te.error,e,i),this.emit(e,i)}destroy(){this._destroy(),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.video&&(this.video.destroy(),this.video=null),this.events&&(this.events.destroy(),this.events=null),this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}_destroy(){this.player&&this.playing&&this.player.pause(),this._flvPlayerDestroy(),this._loading=!1,this._playing=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0}resetStats(){}get loaded(){return!0}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(te.playing,e),e?this.emit(te.play):this.emit(te.pause))}get playing(){return this._playing}get muted(){return this._muted}set muted(e){this.video&&(this.video.$videoElement.muted=e,this.player&&(this.player.muted=e)),super._updateMuted(e)}get volume(){return this._volume}set volume(e){super._updateVolume(e),this.video&&(this.video.$videoElement.volume=e)}set loading(e){this.loading!==e&&(this._loading=e,this.emit(te.loading,this._loading),e||this.emit(te.loaded))}get loading(){return this._loading}set audioTimestamp(e){e!==null&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){e!==null&&(this._videoTimestamp=e)}get videoTimestamp(){return this._videoTimestamp}get isDebug(){return!!this._opt.debug}checkLoadingTimeout(){var e;this._opt.loadingTimeout!==0&&(this._checkLoadingTimeout=setTimeout(()=>{this.clearCheckLoadingTimeout();try{this.pause().then(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)}).catch(()=>{this.emit(te.timeout,te.loadingTimeout),this.emit(te.loadingTimeout)})}catch{}},1e3*(((e=this._opt)===null||e===void 0?void 0:e.loadingTimeout)||10)))}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkHeartTimeout(){var e,i;if(this._opt.heartTimeout===0)return;const d=((e=this.video)===null||e===void 0?void 0:e.currentTime)||0;this._checkHeartTimeout=setTimeout(()=>{var b;if(this._checkHeartTimeout&&this.clearCheckHeartTimeout(),this.playing&&this.video){if(d!==(((b=this.video)===null||b===void 0?void 0:b.currentTime)||0))return;try{this.pause().then(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)}).catch(()=>{this.emit(te.timeout,te.heartTimeout),this.emit(te.heartTimeout)})}catch{}}},1e3*(((i=this._opt)===null||i===void 0?void 0:i.heartTimeout)||5))}handleRender(){this.loading&&(this.emit(te.start),this.loading=!1),this.playing||(this.playing=!0),this.checkHeart()}updateOption(e){var i;super.updateOption(e),(i=kt.LoggingControl)===null||i===void 0||i.applyConfig({globalTag:"EzuikitFlv",enableVerbose:!!e.debug,enableDebug:!!e.debug,enableInfo:!!e.debug,enableWarn:!!e.debug,enableError:!0})}play(e={}){return this._play(e)}_play(e={}){return this.player&&this._destroy(),this.clearCheckHeartTimeout(),this._createPlayer(Object.assign({},this._opt,e)),this.loading=!0,this._playing=!1,this._times.playInitStart=Wt(),this.player?(this.player.load(),new Promise((i,d)=>{this.player.play().then(()=>{this.loading=!1,this.playing=!0,this._opt.muted||(this.muted=!1),i()}).catch(b=>{d(b)})})):Promise.reject()}_flvPlayerDestroy(){this.player&&(this.video.pause(),this.player.unload(),this._removeFlvEvents(),this.player.detachMediaElement(),this.player.destroy(),this.player=null)}_close(){return new Promise(e=>{this._loading=!1,this._playing=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.video&&this.video.resetInit(),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.player&&(this._flvPlayerDestroy(),this._pause=!0),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,setTimeout(()=>{e()},110)})}pause(){return this._close()}resumeAudioAfterPause(){}}class Qn{constructor(e,i){return this._opt=Object.assign({},Oi,i),(Wr()||na().browser==="360EE")&&(this._opt.useMSE=!1),new(Qn.getLoaderFactory(this._opt.useMSE))(e,this._opt)}static getLoaderFactory(e){return e?$a:Pa}}function ao(u){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const i=new URL(u),d=u.split("?")[1];let b={};if(d){const p=d.split("&");for(let t of p){if(t==="")continue;const a=t.split("=");a[0]&&(b[a[0]]=a[1])}}const l={protocol:i.protocol,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,query:b,url:u};if(e&&/_(\d+)_(\d+)\.flv/.test(u)){const p=i.pathname.split("/")[i.pathname.split("/").length-1].replace(/.flv$/,"").split("_");p[0].indexOf("-")>=0?(l.streamName=p[0].split("-")[0],l.deviceSerial=p[0].split("-")[1]):l.deviceSerial=p[0],l.channelNo=+p[1],l.streamTypeIn=+p[2]}return l}var so,lo={exports:{}},Ao=wt(Object.freeze({__proto__:null,default:{}})),Ua=(so||(so=1,function(u){(function(){var e="input is invalid type",i=typeof window=="object",d=i?window:{};d.JS_MD5_NO_WINDOW&&(i=!1);var b=!i&&typeof self=="object",l=!d.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;l?d=Ut:b&&(d=self);var p,t=!d.JS_MD5_NO_COMMON_JS&&u.exports,a=!d.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",n="0123456789abcdef".split(""),s=[128,32768,8388608,-2147483648],h=[0,8,16,24],E=["hex","array","digest","buffer","arrayBuffer","base64"],v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[];if(a){var B=new ArrayBuffer(68);p=new Uint8Array(B),S=new Uint32Array(B)}var x=Array.isArray;!d.JS_MD5_NO_NODE_JS&&x||(x=function(T){return Object.prototype.toString.call(T)==="[object Array]"});var P=ArrayBuffer.isView;!a||!d.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&P||(P=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});var M=function(T){var m=typeof T;if(m==="string")return[T,!0];if(m!=="object"||T===null)throw new Error(e);if(a&&T.constructor===ArrayBuffer)return[new Uint8Array(T),!1];if(!x(T)&&!P(T))throw new Error(e);return[T,!1]},F=function(T){return function(m){return new H(!0).update(m)[T]()}},G=function(T){var m,g=Ao,f=Ao.Buffer;return m=f.from&&!d.JS_MD5_NO_BUFFER_FROM?f.from:function(O){return new f(O)},function(O){if(typeof O=="string")return g.createHash("md5").update(O,"utf8").digest("hex");if(O==null)throw new Error(e);return O.constructor===ArrayBuffer&&(O=new Uint8Array(O)),x(O)||P(O)||O.constructor===f?g.createHash("md5").update(m(O)).digest("hex"):T(O)}},K=function(T){return function(m,g){return new Z(m,!0).update(g)[T]()}};function H(T){if(T)S[0]=S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0,this.blocks=S,this.buffer8=p;else if(a){var m=new ArrayBuffer(68);this.buffer8=new Uint8Array(m),this.blocks=new Uint32Array(m)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function Z(T,m){var g,f=M(T);if(T=f[0],f[1]){var O,j=[],Q=T.length,ee=0;for(g=0;g>>6,j[ee++]=128|63&O):O<55296||O>=57344?(j[ee++]=224|O>>>12,j[ee++]=128|O>>>6&63,j[ee++]=128|63&O):(O=65536+((1023&O)<<10|1023&T.charCodeAt(++g)),j[ee++]=240|O>>>18,j[ee++]=128|O>>>12&63,j[ee++]=128|O>>>6&63,j[ee++]=128|63&O);T=j}T.length>64&&(T=new H(!0).update(T).array());var ue=[],fe=[];for(g=0;g<64;++g){var me=T[g]||0;ue[g]=92^me,fe[g]=54^me}H.call(this,m),this.update(fe),this.oKeyPad=ue,this.inner=!0,this.sharedMemory=m}H.prototype.update=function(T){if(this.finalized)throw new Error("finalize already called");var m=M(T);T=m[0];for(var g,f,O=m[1],j=0,Q=T.length,ee=this.blocks,ue=this.buffer8;j>>6,ue[f++]=128|63&g):g<55296||g>=57344?(ue[f++]=224|g>>>12,ue[f++]=128|g>>>6&63,ue[f++]=128|63&g):(g=65536+((1023&g)<<10|1023&T.charCodeAt(++j)),ue[f++]=240|g>>>18,ue[f++]=128|g>>>12&63,ue[f++]=128|g>>>6&63,ue[f++]=128|63&g);else for(f=this.start;j>>2]|=g<>>2]|=(192|g>>>6)<>>2]|=(128|63&g)<=57344?(ee[f>>>2]|=(224|g>>>12)<>>2]|=(128|g>>>6&63)<>>2]|=(128|63&g)<>>2]|=(240|g>>>18)<>>2]|=(128|g>>>12&63)<>>2]|=(128|g>>>6&63)<>>2]|=(128|63&g)<>>2]|=T[j]<=64?(this.start=f-64,this.hash(),this.hashed=!0):this.start=f}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},H.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,m=this.lastByteIndex;T[m>>>2]|=s[3&m],m>=56&&(this.hashed||this.hash(),T[0]=T[16],T[16]=T[1]=T[2]=T[3]=T[4]=T[5]=T[6]=T[7]=T[8]=T[9]=T[10]=T[11]=T[12]=T[13]=T[14]=T[15]=0),T[14]=this.bytes<<3,T[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},H.prototype.hash=function(){var T,m,g,f,O,j,Q=this.blocks;this.first?m=((m=((T=((T=Q[0]-680876937)<<7|T>>>25)-271733879|0)^(g=((g=(-271733879^(f=((f=(-1732584194^2004318071&T)+Q[1]-117830708)<<12|f>>>20)+T|0)&(-271733879^T))+Q[2]-1126478375)<<17|g>>>15)+f|0)&(f^T))+Q[3]-1316259209)<<22|m>>>10)+g|0:(T=this.h0,m=this.h1,g=this.h2,m=((m+=((T=((T+=((f=this.h3)^m&(g^f))+Q[0]-680876936)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[1]-389564586)<<12|f>>>20)+T|0)&(T^m))+Q[2]+606105819)<<17|g>>>15)+f|0)&(f^T))+Q[3]-1044525330)<<22|m>>>10)+g|0),m=((m+=((T=((T+=(f^m&(g^f))+Q[4]-176418897)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[5]+1200080426)<<12|f>>>20)+T|0)&(T^m))+Q[6]-1473231341)<<17|g>>>15)+f|0)&(f^T))+Q[7]-45705983)<<22|m>>>10)+g|0,m=((m+=((T=((T+=(f^m&(g^f))+Q[8]+1770035416)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[9]-1958414417)<<12|f>>>20)+T|0)&(T^m))+Q[10]-42063)<<17|g>>>15)+f|0)&(f^T))+Q[11]-1990404162)<<22|m>>>10)+g|0,m=((m+=((T=((T+=(f^m&(g^f))+Q[12]+1804603682)<<7|T>>>25)+m|0)^(g=((g+=(m^(f=((f+=(g^T&(m^g))+Q[13]-40341101)<<12|f>>>20)+T|0)&(T^m))+Q[14]-1502002290)<<17|g>>>15)+f|0)&(f^T))+Q[15]+1236535329)<<22|m>>>10)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[1]-165796510)<<5|T>>>27)+m|0)^m))+Q[6]-1069501632)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[11]+643717713)<<14|g>>>18)+f|0)^f))+Q[0]-373897302)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[5]-701558691)<<5|T>>>27)+m|0)^m))+Q[10]+38016083)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[15]-660478335)<<14|g>>>18)+f|0)^f))+Q[4]-405537848)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[9]+568446438)<<5|T>>>27)+m|0)^m))+Q[14]-1019803690)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[3]-187363961)<<14|g>>>18)+f|0)^f))+Q[8]+1163531501)<<20|m>>>12)+g|0,m=((m+=((f=((f+=(m^g&((T=((T+=(g^f&(m^g))+Q[13]-1444681467)<<5|T>>>27)+m|0)^m))+Q[2]-51403784)<<9|f>>>23)+T|0)^T&((g=((g+=(T^m&(f^T))+Q[7]+1735328473)<<14|g>>>18)+f|0)^f))+Q[12]-1926607734)<<20|m>>>12)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[5]-378558)<<4|T>>>28)+m|0))+Q[8]-2022574463)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[11]+1839030562)<<16|g>>>16)+f|0))+Q[14]-35309556)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[1]-1530992060)<<4|T>>>28)+m|0))+Q[4]+1272893353)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[7]-155497632)<<16|g>>>16)+f|0))+Q[10]-1094730640)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[13]+681279174)<<4|T>>>28)+m|0))+Q[0]-358537222)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[3]-722521979)<<16|g>>>16)+f|0))+Q[6]+76029189)<<23|m>>>9)+g|0,m=((m+=((j=(f=((f+=((O=m^g)^(T=((T+=(O^f)+Q[9]-640364487)<<4|T>>>28)+m|0))+Q[12]-421815835)<<11|f>>>21)+T|0)^T)^(g=((g+=(j^m)+Q[15]+530742520)<<16|g>>>16)+f|0))+Q[2]-995338651)<<23|m>>>9)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[0]-198630844)<<6|T>>>26)+m|0)|~g))+Q[7]+1126891415)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[14]-1416354905)<<15|g>>>17)+f|0)|~T))+Q[5]-57434055)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[12]+1700485571)<<6|T>>>26)+m|0)|~g))+Q[3]-1894986606)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[10]-1051523)<<15|g>>>17)+f|0)|~T))+Q[1]-2054922799)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[8]+1873313359)<<6|T>>>26)+m|0)|~g))+Q[15]-30611744)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[6]-1560198380)<<15|g>>>17)+f|0)|~T))+Q[13]+1309151649)<<21|m>>>11)+g|0,m=((m+=((f=((f+=(m^((T=((T+=(g^(m|~f))+Q[4]-145523070)<<6|T>>>26)+m|0)|~g))+Q[11]-1120210379)<<10|f>>>22)+T|0)^((g=((g+=(T^(f|~m))+Q[2]+718787259)<<15|g>>>17)+f|0)|~T))+Q[9]-343485551)<<21|m>>>11)+g|0,this.first?(this.h0=T+1732584193|0,this.h1=m-271733879|0,this.h2=g-1732584194|0,this.h3=f+271733878|0,this.first=!1):(this.h0=this.h0+T|0,this.h1=this.h1+m|0,this.h2=this.h2+g|0,this.h3=this.h3+f|0)},H.prototype.hex=function(){this.finalize();var T=this.h0,m=this.h1,g=this.h2,f=this.h3;return n[T>>>4&15]+n[15&T]+n[T>>>12&15]+n[T>>>8&15]+n[T>>>20&15]+n[T>>>16&15]+n[T>>>28&15]+n[T>>>24&15]+n[m>>>4&15]+n[15&m]+n[m>>>12&15]+n[m>>>8&15]+n[m>>>20&15]+n[m>>>16&15]+n[m>>>28&15]+n[m>>>24&15]+n[g>>>4&15]+n[15&g]+n[g>>>12&15]+n[g>>>8&15]+n[g>>>20&15]+n[g>>>16&15]+n[g>>>28&15]+n[g>>>24&15]+n[f>>>4&15]+n[15&f]+n[f>>>12&15]+n[f>>>8&15]+n[f>>>20&15]+n[f>>>16&15]+n[f>>>28&15]+n[f>>>24&15]},H.prototype.toString=H.prototype.hex,H.prototype.digest=function(){this.finalize();var T=this.h0,m=this.h1,g=this.h2,f=this.h3;return[255&T,T>>>8&255,T>>>16&255,T>>>24&255,255&m,m>>>8&255,m>>>16&255,m>>>24&255,255&g,g>>>8&255,g>>>16&255,g>>>24&255,255&f,f>>>8&255,f>>>16&255,f>>>24&255]},H.prototype.array=H.prototype.digest,H.prototype.arrayBuffer=function(){this.finalize();var T=new ArrayBuffer(16),m=new Uint32Array(T);return m[0]=this.h0,m[1]=this.h1,m[2]=this.h2,m[3]=this.h3,T},H.prototype.buffer=H.prototype.arrayBuffer,H.prototype.base64=function(){for(var T,m,g,f="",O=this.array(),j=0;j<15;)T=O[j++],m=O[j++],g=O[j++],f+=v[T>>>2]+v[63&(T<<4|m>>>4)]+v[63&(m<<2|g>>>6)]+v[63&g];return T=O[j],f+=v[T>>>2]+v[T<<4&63]+"=="},Z.prototype=new H,Z.prototype.finalize=function(){if(H.prototype.finalize.call(this),this.inner){this.inner=!1;var T=this.array();H.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(T),H.prototype.finalize.call(this)}};var ie=function(){var T=F("hex");l&&(T=G(T)),T.create=function(){return new H},T.update=function(f){return T.create().update(f)};for(var m=0;m1&&arguments[1]!==void 0?arguments[1]:{};const d=/http[s]?:\/\//.test(e)?e:`${this.baseURL}${e}`,b=i.headers;return delete i.headers,fetch(d,{...i||{},...b===null?{}:{headers:{clientType:"ezuikit-flv",accessToken:this.accessToken,deviceSerial:this.deviceSerial,localIndex:this.channelNo,...b||{}}}})}get(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetch(e,{...i||{},method:"get"})}post(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetch(e,{...i||{},method:"post"})}setVideoLevelService(e){const i=new FormData;return i.append("videoLevel",parseInt(e)),this.post(`${co}`,{body:i}).then(d=>d.json()).catch(d=>{var b,l;(b=(l=this._player).emit)===null||b===void 0||b.call(l,vt.fetchError,{api:co,error:d})})}async getLocalVideoUnifyQueryService(e){var i,d,b,l;const p=(e.startTime+36e5*(((i=this._player._opt)===null||i===void 0?void 0:i.timeZone)||0))/1e3,t=(e.endTime+36e5*(((d=this._player._opt)===null||d===void 0?void 0:d.timeZone)||0))/1e3,a=async s=>{let h=[];try{var E,v,S;const M=await this.get(`${zn}?startTime=${s.startTime}&endTime=${s.endTime}&pageSize=${s.pageSize||200}`).then(F=>F.json()).catch(F=>{var G,K;(G=(K=this._player).emit)===null||G===void 0||G.call(K,vt.fetchError,{api:zn,error:F})});var B,x,P;if((M==null||(E=M.meta)===null||E===void 0?void 0:E.code)!==200)return(B=(x=this._player).emit)===null||B===void 0||B.call(x,vt.fetchError,{api:zn,error:M==null?void 0:M.meta}),h;M!=null&&(v=M.data)!==null&&v!==void 0&&(v=v.records)!==null&&v!==void 0&&v.length&&(h=h.concat(M.data.records||[])),M!=null&&(S=M.data)!==null&&S!==void 0&&S.hasMore&&(h=h.concat(await a({...s,startTime:M==null||(P=M.data)===null||P===void 0?void 0:P.nextFileTime})))}catch{}return h},n=await a({...e,startTime:p,endTime:t})||[];return this._player.playbackRecords=(n||[]).map(s=>{var h,E;return{...s,startTime:s.startTime-3600*(((h=this._player._opt)===null||h===void 0?void 0:h.timeZone)||0),endTime:s.endTime-3600*(((E=this._player._opt)===null||E===void 0?void 0:E.timeZone)||0)}}).reduce((s,h)=>{const E=s[s.length-1];return E&&E.endTime===h.startTime?E.endTime=h.endTime:s.push(h),s},[]),(b=(l=this._player).emit)===null||b===void 0||b.call(l,te.localVideoRecords,this._player.playbackRecords),n}async getVideoQualityService(){let e=Qa;try{var i,d;const p=await this.get(`${Hn}?deviceSerial=${this.deviceSerial}`).then(t=>t.json()).catch(t=>{this._player.emit(vt.fetchError,{api:Hn,error:t})});var b,l;if((p==null||(i=p.meta)===null||i===void 0?void 0:i.code)!==200)return(b=(l=this._player).emit)===null||b===void 0||b.call(l,vt.fetchError,{api:Hn,error:p==null?void 0:p.meta}),e;p!=null&&(d=p.data)!==null&&d!==void 0&&d.length&&(e=p.data)}catch{}return e=e.map(p=>({...p,name:Hi[p.videoLevel]||"未知"})),e}getPlayAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const i=new FormData;return Object.keys(e).forEach(d=>{i.append(d,e[d])}),i.append("protocol",4),i.append("accessToken",this.accessToken),i.append("deviceSerial",this.deviceSerial),i.append("channelNo",this.channelNo),this.post(`${Na}`,{body:i}).then(d=>d.json()).then(d=>{var b;return+d.code==200?d==null||(b=d.data)===null||b===void 0?void 0:b.url:""})}getRecordAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.appName&&this.v?(delete e.expireTime,this.getCDNRecordAddressService(e)):this.getPlayAddressService({...e,type:2})}getLiveAddressService(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.appName&&this.v?(delete e.expireTime,this.getCDNLiveAddressService(e)):this.getPlayAddressService({...e,type:1})}getCDNPlayAddressService(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const d=new FormData,b=new Date,l=`${b.getFullYear()}-${Ot(b.getMonth()+1)}-${Ot(b.getDate())} 00:00:00`,p=`${b.getFullYear()}-${Ot(b.getMonth()+1)}-${Ot(b.getDate())} 23:59:59`;return d.append("startTime",l),d.append("endTime",p),d.append("playProtocol",2),d.append("streamName",Fa((function(t,a){var n,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),h=[];for(a=a||s.length,n=0;n{d.append(t,i[t])}),this.post(e,{body:d}).then(t=>t.json()).then(t=>{var a,n;return+((a=t.meta)===null||a===void 0?void 0:a.code)==200?(n=t.data)===null||n===void 0?void 0:n.cdnUrl:""})}async getCDNLiveAddressService(e){return this.getCDNPlayAddressService(`${Va}`,e)}async getCDNRecordAddressService(e){return this.getCDNPlayAddressService(`${ja}`,{recordStartTime:e.startTime,recordEndTime:e.stopTime,quality:e.quality,type:e.type||1})}async getStreamInterreputInfo(e){const i=new FormData;return i.append("streamId",e),this.post(Ga,{body:i,headers:null}).then(d=>d.json())}}function Mi(u){return new Date(Wn(u,arguments.length>1&&arguments[1]!==void 0?arguments[1]:"/"))}function Wn(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"/";return`${(u=u.replace(/\//gi,"").replace(/-/gi,"").replace(/:/gi,"").replace(/ /gi,"")).substring(0,4)}${e}${u.substring(4,6)}${e}${u.substring(6,8)} ${u.substring(8,10)}:${u.substring(10,12)}:${u.substring(12,14)}`}function qn(u){let e=null;if(e=typeof u=="string"?document.querySelector("#"+u.replace(/^#/,"")):u,!e)throw new Error("Flv required node can be a string (dom id) or dom (HTMLElement node)");if(e.nodeName==="CANVAS"||e.nodeName==="VIDEO")throw new Error(`Flv container type can not be ${e.nodeName} type`);return e}var za={95e3:"服务端内部处理异常",95400:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",95402:"回放找不到录像文件",95403:"操作码或信令密钥与设备不匹配",95404:"设备不在线 检查设备网络",95405:"流媒体向设备发送或接受信令超时/cas响应超时",95406:"token失效",95407:"客户端的URL格式错误",95409:"预览开启隐私保护",95411:"token无权限",95412:"session不存在",95413:"token验证失败 刷新重试",95415:"设备通道错",95416:"设备资源受限 刷新重试",95417:"设备4G流量耗尽",95451:"设备不支持的码流类型",95452:"设备链接流媒体服务器失败",95454:"流媒体中关于设备取流会话不存在",95455:"设备通道未关联",95456:"设备通道关联设备不在线",95457:"客户端不支持端到端加密",95458:"设备不支持当前并发ECDH密",95459:"VTDU 处理ECDH 加密失败",95460:"手表正在拍照或录像",95461:"手表正在视频聊天",95462:"手表正在识图",95463:"手表正在QQ视频",95464:"手表正在坐姿检测",95465:"手表温度过高",95466:"设备视频通话中,不支持预览",95492:"设备不支持的命令",95500:"服务器处理失败",95503:"vtm返回分配vtdu失败, 请稍后重试",95504:"服务器负载达到上限,请稍后重试",95505:"vtm ecdh解密失败",95506:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",95507:"不支持该4G卡套餐在非萤石App取流",95544:"设备返回无视频源",95545:"视频分享时间已经结束",95546:"取流并发路数限制",95547:"开放平台用户并发限制",95556:"ticket校验失败",95557:"回放服务器等待流头超时, 刷新重试,检测设备网络,重启设备",95558:"查找录像开始时间错误",95560:"群组分享取流二次验证失败",95561:"分享群组用户被锁住",95562:"群组分享用户权限变更",95563:"认证服务连接失败",95564:"认证超时",95565:"缓存无效",95566:"不在分享时间内预览",95567:"分享通道被锁定",95568:"未找到认证类型",95569:"认证返回的参数异常",95600:"分享设备不在分享时间内",95601:"群组分享用户没权限",95602:"群组分享权限变更",95530:"机房故障不可用, 刷新重试",95610:"接收流头失败",95620:"心跳超时",95701:"cas信令返回格式错误",95702:"SPGW请求Cas、Status透传超时,刷新重试",95703:"SPGW请求http不通,刷新重试",96001:"客户端参数出错",96002:"等待客户端侧心跳超时(20秒无心跳包)",96099:"客户端默认错误",96101:"不支持的命令",96102:"设备流头发送失败, 刷新重试",96103:"cas/设备返回错误1, 刷新重试",96104:"cas/设备返回错误-1, 刷新重试",96105:"设备返回错误码3, 刷新重试",96106:"设备返回错误码4, 刷新重试",96107:"设备返回错误码5, 刷新重试",96108:"cas信令回应重复, 刷新重试",96109:"视频广场取消分享",96110:"设备信令默认错误 设备错返回的错误码,不具体 刷新重试,或者重启设备",96501:"设备数据链路和实际链路不匹配, 刷新重试",96502:"设备数据链路重复建立连接, 刷新重试",96503:"设备数据链路端口不匹配, 刷新重试",96504:"缓存设备数据链路失败, 刷新重试",96505:"设备发送确认头消息重复, 刷新重试",96506:"设备数据先于确定头部到达, 刷新重试",96508:"设备数据头部长度非法, 刷新重试,或者重启设备",96509:"索引找不到设备数据管理块, 刷新重试",96510:"设备数据链路vtdu内存块协议状态不匹配",96511:"设备数据头部没有streamkey错误",96512:"设备数据头部非法",96513:"设备数据长度过小",96514:"设备老协议推流头部没有streamkey错误",96515:"设备老协议推流数据非法",96516:"设备老协议索引找不到内存管理块",96517:"设备老协议推流数据非法",96518:"设备数据包过大, 刷新重试,或者重启设备",96519:"设备推流链路网络不稳定, 设备长时间未推流超时",96520:"设备推流链路网络不稳定, 设备网络异常",90601:"流ID不存在",90602:"流被禁用",90603:"不在可用时间区间",90604:"用户设备关系验证失败",90605:"通道被隐藏",90606:"4G无限流量卡",4050:"服务内部调用向vtdu取流的接口失败",4054:"服务内部生成ticket失败",4056:"vtm服务信息为空",4057:"取流url非法(可能是格式、参数错误)",4058:"取流url过期(不在可用时间)",9048:"并发限制",9049:"带宽限制",9053:"不支持H265",9057:"设备码流加密",9060:"设备取流校验不通过",9061:"auth认证不通过",9062:"auth认证网络有问题"},Ha={95e3:"Internal server processing error",95400:"Private protocol VTM detection failed: Invalid parameters (stream type < 0 or empty device serial number), (App should not retry streaming)",95402:"Playback failed: Recording file not found",95403:"Operation code/signaling key mismatch with the device",95404:"Device offline, Check device network",95405:"Stream server timeout when sending/receiving device signaling or CAS response timeout, Check device network or restart device",95406:"Token expired, Refresh token or restart device",95407:"Invalid client URL format",95409:"Privacy protection enabled during preview",95411:"Token lacks permissions/user unauthorized",95412:"Session does not exist",95413:"Token verification failed, Refresh token",95415:"Invalid device channel",95416:"Device resource limit reached, Retry later",95417:"Device 4G data quota exhausted",95451:"Unsupported stream type by device",95452:"Device failed to connect to stream server",95454:"Streaming session not found in stream server",95455:"Device channel not associated",95456:"Associated device channel offline",95457:"Client does not support end-to-end encryption",95458:"Device does not support current concurrent ECDH encryption",95459:"VTDU failed to process ECDH encryption",95460:"Watch is capturing photos/video",95461:"Watch is in video chat",95462:"Watch is performing image recognition",95463:"Watch is in QQ video call",95464:"Watch is performing posture detection",95465:"Watch temperature too high",95466:"Device in video call; preview not supported",95492:"Unsupported command by device",95500:"Server processing failure",95503:"VTM failed to allocate VTDU, Retry later (VTDU service issue)",95504:"Server overloaded, Retry later",95505:"VTM ECDH decryption failed",95506:"IPC streaming not supported (requires NVR binding)",95507:"4G plan does not support non-EZVIZ app streaming",95544:"No video source from device",95545:"Video sharing period ended",95546:"Stream concurrency limit reached",95547:"Open platform user concurrency limit exceeded",95556:"Ticket validation failed",95557:"Playback server timeout waiting for stream header, Retry later or check device network.",95558:"Invalid playback start time",95560:"Group sharing stream secondary validation failed",95561:"Group shared user locked",95562:"Group sharing permissions modified",95563:"Authentication service connection failed",95564:"Authentication timeout",95565:"Invalid cache",95566:"Preview outside sharing period",95567:"Shared channel locked",95568:"Authentication type not found",95569:"Invalid authentication parameters",95600:"Shared device not in sharing period",95601:"Group user lacks permissions",95602:"Group sharing permissions modified",95530:"Data center outage, Retry later",95610:"Failed to receive stream header",95620:"Heartbeat timeout",95701:"CAS signaling format error",95702:"SPGW request to CAS/Status timeout, Retry later",95703:"SPGW HTTP request failed, Retry later",96001:"Client parameter error",96002:"Client heartbeat timeout (20s no packet)",96099:"Default client error",96101:"Unsupported command",96102:"Device stream header delivery failed, Retry later",96103:"CAS/device returned error code 1, Retry later",96104:"CAS/device returned error code -1, Retry later",96105:"Device returned error code 3, Retry later",96106:"Device returned error code 4, Retry later",96107:"Device returned error code 5, Retry later",96108:"Duplicate CAS signaling response, Retry later",96109:"Video sharing canceled by platform",96110:"Default device signaling error, Retry or restart device",96501:"Device data path mismatch, Retry later",96502:"Duplicate device data path connection, Retry later",96503:"Device data port mismatch, Retry later",96504:"Failed to cache device data path (insufficient memory), Retry later",96505:"Duplicate device acknowledgment header, Retry later",96506:"Device data arrived before header confirmation, Retry later",96508:"Invalid device data header length, Retry or restart device",96509:"Data management block not found, Retry later",96510:"VTDU protocol state mismatch for device data path",96511:"Missing stream key in device data header",96512:"Invalid device data header",96513:"Device data length too small",96514:"Legacy protocol: Missing stream key in push header",96515:"Invalid legacy protocol push data",96516:"Legacy protocol: Data management block not found",96517:"Invalid legacy protocol push data",96518:"Device data packet too large, Retry or restart device",96519:"Unstable device push stream (timeout due to inactivity)",96520:"Unstable device push stream (network issue)",90601:"Stream ID does not exist",90602:"Stream is disabled",90603:"Not within the available time range",90604:"User-device relationship verification failed",90605:"Channel is hidden",90606:"4G unlimited data plan",4050:"Internal service call to VTDU for stream retrieval failed",4054:"Internal service failed to generate ticket",4056:"VTM service information is empty",4057:"Stream retrieval URL is invalid (possibly due to format or parameter error)",4058:"Stream retrieval URL has expired (not within valid time range)",9048:"Concurrency limit exceeded",9049:"Bandwidth limit exceeded",9053:"H265 encoding not supported",9057:"Device stream is encrypted",9060:"Device stream retrieval validation failed",9061:"Auth authentication failed",9062:"Auth authentication network issue"};const ho=["h264","h265"],Wa=[.5,1,2,4,8];class ai extends Yt{constructor(e){var i,d,b;super({...e,volumeOptions:{muted:e.muted??Oi.muted,volume:e.volume??Oi.volume,...e.volumeOptions||{}},container:qn(e.id||e.container),type:"flv"}),Dt(this,"urlInfo",{}),Dt(this,"services",null),Dt(this,"_loadingTimeoutDelayTimer",null),Dt(this,"_heartTimeoutDelayTimer",null),(i=this.i18n)===null||i===void 0||(d=i.appendTranslations)===null||d===void 0||d.call(i,{zh:za,en:Ha}),at.initMonitor(e.ignoreMonitor||e.disableColect);const l=Object.assign({},{isLive:!0,timeZone:0},Oi,e);let p=qn(e.id||e.container);if(!e.url)throw new Error("Flv url is empty");var t;at.url=e.url,at.report(1,{name:"constructor"}),p.classList.add("ezui-player-container","ezui-flv-container"),delete l.container,l.forceNoOffscreen=!0,Pn(l.videoBuffer)&&(l.videoBuffer=1e3*Number(l.videoBuffer)),this._opt=l,this.urlInfo=ao(l.url,this._opt.isEzviz),this.$container=p,this._heartTimeoutDelayTimes=0,this._loadingTimeoutReplayTimes=0,this.events=new Gn(this),this._initPlayer(p,l),this._videoInfo={},this._currentPlayDate=null,this.definitionList=[],this.definition={},this._playbackRate=1,this.playbackRateList=Wa,this.playbackRecords=[],this.services=new uo(this,{baseURL:((b=this._opt.env)===null||b===void 0?void 0:b.domain)||Gr,accessToken:this._opt.accessToken,deviceSerial:this.urlInfo.deviceSerial,channelNo:this.urlInfo.channelNo}),this._httpServices(),(t=this).on(te.volumechange,(a,n)=>{var s,h;((s=t.player)===null||s===void 0?void 0:s.volume)!==a&&(t.player.volume=a),((h=t.player)===null||h===void 0?void 0:h.muted)!==n&&(t.player.muted=n)}),t.on(te.control.play,a=>{a?t.play():t.pause()}),t.on(te.fullscreenChange,a=>{t.player.emit(te.fullscreenChange,a)}),t.on(te.orientationChange,a=>{t.player.emit(te.orientationChange,a)}),function(a){var n,s;(n=a.player)===null||n===void 0||n.on(te.volumechange,(h,E)=>{a.volume!==h&&(a.volume=h),a.muted!==E&&(a.muted=E)}),(s=a.player)===null||s===void 0||s.on(te.audioCodecUnsupported,h=>{a.emit(te.audioCodecUnsupported,h)})}(this),this.options.useMSE&&(this._onvisibilitychange=this._onvisibilitychange.bind(this),document.addEventListener("visibilitychange",this._onvisibilitychange))}_httpServices(){try{var e,i,d;if(this._opt.isEzviz&&(e=this._opt)!==null&&e!==void 0&&e.accessToken&&this.urlInfo.deviceSerial&&this.urlInfo.channelNo>=0&&this.urlInfo.streamTypeIn){if(this.services=new uo(this,{baseURL:(((i=this._opt.env)===null||i===void 0?void 0:i.domain)||Gr).replace(/\/$/,""),accessToken:this._opt.accessToken,deviceSerial:this.urlInfo.deviceSerial,channelNo:this.urlInfo.channelNo,appName:this._opt.appName,v:(d=this.urlInfo.query)===null||d===void 0?void 0:d.v}),this._isEzvizPlayback(this._opt.url)&&!this._opt.isLive){var b,l,p,t;this._playbackRate=+(((b=this.urlInfo)===null||b===void 0||(b=b.query)===null||b===void 0?void 0:b.playbackSpeed)||1),(l=this.services)===null||l===void 0||l.getLocalVideoUnifyQueryService({startTime:Mi((p=this.urlInfo)===null||p===void 0||(p=p.query)===null||p===void 0?void 0:p.begin).getTime(),endTime:Mi((t=this.urlInfo)===null||t===void 0||(t=t.query)===null||t===void 0?void 0:t.end).getTime()});let S=null,B=0;this.on(te.timeUpdate,x=>{const P=this.playbackRecords.length;if(P>0){var M,F;const Z=Mi(this.urlInfo.query.begin).getTime()/1e3;let ie=(M=this.playbackRecords[B])===null||M===void 0?void 0:M.startTime,T=(F=this.playbackRecords[B])===null||F===void 0?void 0:F.endTime;if(Z<=this.playbackRecords[0].startTime)B=0;else{if(Z>=this.playbackRecords[this.playbackRecords.length-1].endTime)return;for(let f=0;f=O.startTime&&Z<=O.endTime){var G;B=f,ie=Z,T=(G=this.playbackRecords[B])===null||G===void 0?void 0:G.endTime;break}{const j=this.playbackRecords[f+1];if(Z>=O.endTime&&Z<=j.startTime){var K,H;B=f+1,ie=(K=this.playbackRecords[B])===null||K===void 0?void 0:K.startTime,T=(H=this.playbackRecords[B])===null||H===void 0?void 0:H.endTime;break}}}}let m=parseInt(ie+x,10);if(x===0)return;this.emit(te.timeUpdateOSD,{currentTime:x,currentFragmentPlayEnd:ie+x>=T,currentSliceIndex:B,osd:m}),m+3>=this.playbackRecords[P-1].endTime&&(S&&clearTimeout(S),S=setTimeout(()=>{this.emit(te.end),clearTimeout(S),this.pause()},3e3)),ie+x>=T&&B{let x=[this.urlInfo.url,B[1]].sort((M,F)=>{const G=K=>{const H=K.match(/_(\d+)\.flv/);return H?parseInt(H[1],10):0};return G(M)-G(F)});const P=B[0].map((M,F)=>({...M,url:M.streamTypeIn===1?x[0]:x[1]}));this.definitionList=P,this.emit(te.getDefinitionListResult,P),this.emit(te.definitionListChange,P)})}}}catch(S){var E,v;(E=this.player)===null||E===void 0||(E=E.debug)===null||E===void 0||(v=E.error)===null||v===void 0||v.call(E,S)}}setDefinitionList(e){this.player&&(this.definitionList=e,this.emit(te.definitionListChange,e))}switchDefinition(e){if(this.player){if(e.videoLevel>=0&&[1,2].includes(e.streamTypeIn)){const p=this.definitionList.find(t=>t.videoLevel===e.videoLevel);if(p){if(this.emit(te.definitionChange,p),this.definition=p,p.url){var i;return p.type!=="compatible"&&((i=this.services)===null||i===void 0||i.setVideoLevelService(p.videoLevel)),this.playing?this.pause().then(()=>{this.play({url:p.url})}):this.play({url:p.url}),Promise.resolve(0)}var d;return(d=this.player.debug)===null||d===void 0||d.warn("play url is not found"),Promise.resolve(1)}var b;return(b=this.player.debug)===null||b===void 0||b.warn("definition is not found"),Promise.resolve(1)}var l;return(l=this.player.debug)===null||l===void 0||l.warn(`not support ${e==null?void 0:e.videoLevel}`),Promise.resolve(1)}}setPlaybackRateList(e){this.player&&(this.playbackRateList=e,this.emit(te.playbackRateListChange,e))}get playbackRate(){return this._playbackRate}set playbackRate(e){this.switchPlaybackRate(e)}switchPlaybackRate(e){var i,d,b;return this.player&&this._isEzvizPlayback(this._opt.url)?(e=+e,(i=this.playbackRateList)!==null&&i!==void 0&&i.includes(e)?this._getNewRecordPlayUrl({playbackRate:e}).then(l=>l?(this._playbackRate=e,this.emit(te.playbackRateChange,e),this.playing?this.pause().then(p=>{this.play({url:l})}):this.play({url:l}),0):1):((d=this.player)===null||d===void 0||(d=d.debug)===null||d===void 0||d.warn(`not support ${e}`),Promise.resolve(1))):((b=this.player)===null||b===void 0||(b=b.debug)===null||b===void 0||b.warn(`not support ${e}`),Promise.resolve(1))}_getNewRecordPlayUrl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.player&&this._isEzvizPlayback(this._opt.url)){var i,d,b,l;const p=Mi(this._currentPlayDate||((i=this.urlInfo)===null||i===void 0||(i=i.query)===null||i===void 0?void 0:i.begin)),t=Mi((d=this.urlInfo)===null||d===void 0||(d=d.query)===null||d===void 0?void 0:d.end);return(b=this.services)===null||b===void 0?void 0:b.getRecordAddressService({expireTime:parseInt((new Date(1e3*((l=this.urlInfo.query)===null||l===void 0?void 0:l.expire)).getTime()-new Date().getTime())/1e3,10),startTime:`${p.getFullYear()}-${Ot(p.getMonth()+1)}-${Ot(p.getDate())} ${Ot(p.getHours())}:${Ot(p.getMinutes())}:${Ot(p.getSeconds())}`,stopTime:`${t.getFullYear()}-${Ot(t.getMonth()+1)}-${Ot(t.getDate())} ${Ot(t.getHours())}:${Ot(t.getMinutes())}:${Ot(t.getSeconds())}`,playbackSpeed:e.playbackRate||this.playbackRate,quality:this.urlInfo.streamTypeIn})}return Promise.resolve("")}_isEzvizPlayback(e){return this._opt.isEzviz&&/rec=(local|cloud)/.test(this._opt.url)}static _setOptions(e){const i=qn((e=Object.assign({},{isLive:!0,timeZone:0},Oi,e)).id||e.container);return e.container=i,e}destroy(){this.events&&(this.events.destroy(),this.events=null),super.destroy(),this.player&&(this.player.destroy(),this.player=null),this.$container&&(this.$container.classList.remove("ezui-flv-container"),this.$container.classList.remove("ezui-player-container"),this.$container=null),this.definitionList=[],this.definition={},this._videoInfo={},this._currentPlayDate=null,this.urlInfo={},this._playbackRate=1,this.playbackRateList=[],this.playbackRecords=[],this.$container=null,this._opt={},this._loadingTimeoutReplayTimes=0,this.removeAllListeners(),document.removeEventListener("visibilitychange",this._onvisibilitychange),at.report(50,{name:"destroy"})}_handlevideoInfo(e){this._videoInfo=e||{}}_initPlayer(e,i){var d,b,l,p;i.url&&(i.url=_i(i.url,ho)),this.player=new Qn(this.contentControl.$container,Object.assign({},i,{orientation:this.orientationAngle})),(d=this.player.debug)===null||d===void 0||d.log("Flv","version",ai.version),(b=this.player.debug)===null||b===void 0||b.log("Flv","_initPlayer",JSON.stringify(i)),this._bindEvents(),i.autoPlay&&this.play(),this._handlevideoInfo=this._handlevideoInfo.bind(this),(l=this.player)===null||l===void 0||l.off(te.videoInfo,this._handlevideoInfo),(p=this.player)===null||p===void 0||p.on(te.videoInfo,this._handlevideoInfo)}_resetPlayer(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.player.destroy(),this.player=null,this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)}_bindEvents(){Object.keys(Vr).forEach(e=>{[te.volumechange,te.play].includes(e)||this.player.on(Vr[e],i=>{this.emit(e,i)})})}setDebug(e){this.player.updateOption({debug:e}),at.report(50,{name:"setDebug"})}setLogger(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.player.updateOption({loggerOptions:{...this.player._opt.loggerOptions||{},...e}})}closeSound(){this.setVolume(0),at.report(50,{name:"closeSound"})}openSound(){this.setVolume(.8),at.report(50,{name:"openSound"})}setVolume(e){this.volume=e}getVolume(){return at.report(50,{name:"getVolume"}),this.volume}audioResume(){var e,i;(e=this.player)===null||e===void 0||(e=e.audio)===null||e===void 0||(i=e.audioEnabled)===null||i===void 0||i.call(e,!0),at.report(50,{name:"audioResume"})}setScaleMode(e){return new Promise((i,d)=>{try{e=Number(e)}catch(b){return void d(b)}[bi.full,bi.auto,bi.fullAuto].includes(e)?(this.player.updateOption({scaleMode:e}),this.player.resize(),i(),at.report(50,{name:"setScaleMode"})):d("scale mode 0 | 1 | 2")})}pause(){var e,i;return at.report(50,{name:"pause"}),this._delayTimeoutTimer&&(clearTimeout(this._delayTimeoutTimer),this._delayTimeoutTimer=null),this._heartTimeoutDelayTimer&&(clearTimeout(this._heartTimeoutDelayTimer),this._heartTimeoutDelayTimer=null),this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this.playing=!1,(e=this.player)===null||e===void 0||(i=e.pause)===null||i===void 0?void 0:i.call(e)}clearView(){this.player.video.clearView(),at.report(50,{name:"clearView"})}async play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._loadingTimeoutReplayTimes=0,this.__play(e)}async __play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.loading=!0,e.url&&(at.url=e.url),typeof e=="string"&&(e={url:e}),this._currentPlayDate&&!e.url&&this._isEzvizPlayback())try{e.url=await this.services.getRecordAddressService({expireTime:86400,quality:this.urlInfo.streamTypeIn,startTime:Wn(this._currentPlayDate,"-"),stopTime:Wn(this.urlInfo.query.end,"-"),playbackSpeed:this.playbackRate}),this._currentPlayDate=null}catch{}const i=_i(e.url||this._opt.url,ho);return this.urlInfo=ao(i,this._opt.isEzviz),this._playbackRate=this.urlInfo.query.playbackSpeed||1,this._opt=Object.assign({},this._opt,e||{},{url:i}),this._opt.urlQuery=io(e.url),at.report(50,{name:"play"}),this.playing=!0,await new Promise((d,b)=>{var l;if(!this._opt.url)return this.emit(te.error,vt.playError),void b("play url is empty");(l=this.player)!==null&&l!==void 0&&l.playing?(this.clearView(),this.player.play({...this._opt,muted:this.muted,volume:this.volume}).then(()=>{this.loading=!1,this.posterControl.hide(),d()}).catch(p=>{this.player.debug.warn("Flv","pause -> play and play error",p),this.player.pause().then(()=>{b(p)})})):this._play({...this._opt,muted:this.muted,volume:this.volume}).then(()=>{this.loading=!1,this.posterControl.hide(),d()}).catch(p=>{this.player.debug.warn("Flv","this._play error",p),b(p)})})}_play(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((i,d)=>{const b=e.url.indexOf("http")===0,l=b?Rr:ra,p=b||e.url.indexOf(".flv")!==-1||this._opt.isFlv?Rn:Dr;this.player.updateOption({protocol:l,demuxType:p}),this.player.once(vt.webglAlignmentError,()=>{this.player.off(vt.webglAlignmentError),this.pause().then(()=>{this.player.debug.log("Flv","webglAlignmentError"),this._resetPlayer({openWebglAlignment:!0}),this.play(e).then(()=>{this.player.debug.log("Flv","webglAlignmentError and play success")}).catch(()=>{this.player.debug.log("Flv","webglAlignmentError and play error")})})}),this.player.once(vt.mediaSourceH265NotSupport,()=>{this.player.off(vt.mediaSourceH265NotSupport),this.pause().then(()=>{this.player._opt.autoWasm&&(this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play"),this._resetPlayer({useMSE:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play success")}).catch(()=>{this.player.debug.log("Flv","auto wasm [mse-> wasm] reset player and play error")}))})}),this.player.once(vt.mediaSourceFull,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source full"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source full and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source full and reset player and play error")})})}),this.player.once(vt.mediaSourceAppendBufferError,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source append buffer error"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source append buffer error and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source append buffer error and reset player and play error")})})}),this.player.once(vt.mediaSourceBufferListLarge,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source buffer list large"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source buffer list large and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source buffer list large and reset player and play error")})})}),this.player.once(vt.mediaSourceAppendBufferEndTimeout,()=>{this.pause().then(()=>{this.player.debug.log("Flv","media source append buffer end timeout"),this._resetPlayer(),this.play(e).then(()=>{this.player.debug.log("Flv","media source append buffer end timeout and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","media source append buffer end timeout and reset player and play error")})})}),this.player.once(vt.mseSourceBufferError,()=>{this.pause().then(()=>{this.player.debug.log("Flv","mseSourceBufferError close success")})}),this.player.once(vt.webcodecsH265NotSupport,()=>{this.pause().then(()=>{this.player._opt.autoWasm&&(this.player.debug.log("Flv","auto wasm [wcs-> wasm] reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","auto wasm [wcs-> wasm] reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","auto wasm [wcs-> wasm] reset player and play error")}))})}),this.player.once(vt.wasmDecodeError,()=>{this.player._opt.wasmDecodeErrorReplay&&this.pause().then(()=>{this.player.debug.log("Flv","wasm decode error and reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e).then(()=>{this.player.debug.log("Flv","wasm decode error and reset player and play success")}).catch(()=>{this.player.debug.warn("Flv","wasm decode error and reset player and play error")})})}),this.player.off(te.delayTimeout,this._onDelayTimeout),this._onDelayTimeout=this._onDelayTimeout.bind(this),this.player.once(te.delayTimeout,this._onDelayTimeout),this.player.off(te.heartTimeout,this._onHeartTimeout),this._onHeartTimeout=this._onHeartTimeout.bind(this),this.player.once(te.heartTimeout,this._onHeartTimeout),this.player.off(te.loadingTimeout,this._onLoadingTimeout),this._onLoadingTimeout=this._onLoadingTimeout.bind(this),this.player.once(te.loadingTimeout,this._onLoadingTimeout),this.player.off(te.streamSuccess,this._onStreamSuccess),this._onStreamSuccess=this._onStreamSuccess.bind(this),this.player.once(te.streamSuccess,this._onStreamSuccess),this.player.off(te.streamError,this._onStreamError),this._onStreamError=this._onStreamError.bind(this),this.player.once(te.streamError,this._onStreamError),this.hasLoaded()?this.player.play(e).then(()=>{var t,a;(t=this.player)!==null&&t!==void 0&&(t=t.video)!==null&&t!==void 0&&t.$videoElement&&((a=this.urlInfo.query)===null||a===void 0?void 0:a.playbackSpeed)>=1&&(this.player.video.$videoElement.playbackRate=this.urlInfo.query.playbackSpeed),i()}).catch(t=>{if(this.player){this.player.debug.warn("Flv","hasLoaded and play error",t),t==null||t.name;try{this.player.pause().then(()=>{d(t)})}catch{}}}):this.player.once(te.decoderWorkerInit,()=>{this.player.play(e).then(()=>{var t,a;(t=this.player)!==null&&t!==void 0&&(t=t.video)!==null&&t!==void 0&&t.$videoElement&&((a=this.urlInfo.query)===null||a===void 0?void 0:a.playbackSpeed)>=1&&(this.player.video.$videoElement.playbackRate=this.urlInfo.query.playbackSpeed),i()}).catch(t=>{if(this.player){this.player.debug.warn("Flv","decoderWorkerInit and play error",t);try{this.player.pause().then(()=>{d(t)})}catch{}}})})})}_onDelayTimeout(e){this._delayTimeoutTimer=setTimeout(()=>{this._delayTimeoutTimer&&(clearTimeout(this._delayTimeoutTimer),this._delayTimeoutTimer=null),this._loadingTimeoutReplayTimes<+this.player._opt.loadingTimeoutReplayTimes||+this.player._opt.loadingTimeoutReplayTimes==-1?(this._loadingTimeoutReplayTimes+=1,this.player.debug.warn("Flv",`delay timeout replay time is ${this._loadingTimeoutReplayTimes}`),this.player.off(te.delayTimeout,this._onDelayTimeout),this.emit(te.loadingRetryTimes,this._loadingTimeoutReplayTimes),this.__play(this._opt).then(()=>{this._loadingTimeoutReplayTimes=0})):this._getDeviceStreamErrorInfo()},1e3*(this._opt.loadingTimeoutDelay||3))}_onHeartTimeout(){this._heartTimeoutDelayTimes<+this.player._opt.heartTimeoutReplayTimes||+this.player._opt.heartTimeoutReplayTimes==-1?(this._heartTimeoutDelayTimes+=1,this.player.debug.warn("Flv",`heart timeout replay time is ${this._heartTimeoutDelayTimes}`),this.player.off(te.heartTimeout,this._onLoadingTimeout),this.emit(te.heartRetryTimes,this._heartTimeoutDelayTimes),this.__play(this._opt).then(()=>{this._heartTimeoutDelayTimes=0})):this._getDeviceStreamErrorInfo()}_onLoadingTimeout(){this._loadingTimeoutDelayTimer=setTimeout(()=>{this._loadingTimeoutDelayTimer&&(clearTimeout(this._loadingTimeoutDelayTimer),this._loadingTimeoutDelayTimer=null),this._loadingTimeoutReplayTimes<+this.player._opt.loadingTimeoutReplayTimes||+this.player._opt.loadingTimeoutReplayTimes==-1?(this._loadingTimeoutReplayTimes+=1,this.player.debug.warn("Flv",`loading timeout replay time is ${this._loadingTimeoutReplayTimes}`),this.player.off(te.delayTimeout,this._onLoadingTimeout),this.emit(te.loadingRetryTimes,this._loadingTimeoutReplayTimes),this.__play(this._opt).then(()=>{this._loadingTimeoutReplayTimes=0})):this._getDeviceStreamErrorInfo()},1e3*(this._opt.loadingTimeoutDelay||3))}_getDeviceStreamErrorInfo(){var e,i;this.services&&(e=this.urlInfo)!==null&&e!==void 0&&(e=e.query)!==null&&e!==void 0&&e.sid?this.services.getStreamInterreputInfo((i=this.urlInfo)===null||i===void 0||(i=i.query)===null||i===void 0?void 0:i.sid).then(d=>{if(this.playing=!1,d.meta.code===200){var b,l;let p=this.i18n.t((b=d.data)===null||b===void 0?void 0:b.intrCode);/^\[missing /.test(p)?(l=d.data)!==null&&l!==void 0&&l.intrCode?this.emit(te.message,this.i18n.t("fetchError")+` [${d.data.intrCode}]`,"fetchError"):this.emit(te.message,this.i18n.t("fetchError"),"fetchError"):this.emit(te.message,p+` [${d.data.intrCode}]`,"fetchError")}else this.emit(te.message,this.i18n.t("fetchError"),"fetchError")}).catch(()=>{this.playing=!1,this.emit(te.message,this.i18n.t("fetchError"),"fetchError")}):(this.playing=!1,this.emit(te.message,this.i18n.t("fetchError"),"fetchError"))}_onStreamSuccess(){this.emit(te.streamSuccess)}_onStreamError(){this.emit(te.streamError)}setBufferTime(e){var i,d;e=Number(e),this.player.updateOption({videoBuffer:1e3*e}),(i=this.player)===null||i===void 0||(i=i.decoderWorker)===null||i===void 0||(d=i.updateWorkConfig)===null||d===void 0||d.call(i,{key:"videoBuffer",value:1e3*e})}setRotate(e){at.report(50,{name:"setRotate",value:e});try{e=parseInt(e,10)}catch{return Promise.reject("rotate 0 | 90 | 180 | 270")}return new Promise((i,d)=>{ai.ROTATE.includes(e)?(this.player.updateOption({rotate:e}),this.player.resize(),i()):d("rotate 0 | 90 | 180 | 270")})}hasLoaded(){return this.player.loaded}setKeepScreenOn(){this.player.updateOption({keepScreenOn:!0}),at.report(50,{name:"setKeepScreenOn"})}get videoInfo(){return this._videoInfo}get currentTime(){return this.player.video?this.player.video.currentTime:0}screenshot(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"png",d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.92,b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"download";if(this.player.video)return d=+d,this.player.video.screenshot(e,i,d,b)}getState(){return{playing:!!this.player&&this.player.playing,muted:!(this.player&&this.muted),fullscreen:this.currentFullscreen,loaded:!!this.player&&this.player.loaded,volume:this.player?parseFloat(this.player.volume).toFixed(2):0,isDebug:!!this.player&&this.player.isDebug}}getOptions(){return this.player?this.player._opt:{}}getVersion(){return at.report(50,{name:"getVersion"}),"2.0.2"}static supportType(e){if(e.type==="flv")return!0;if(e.url){let i=e.url;i.startsWith("http://")||i.startsWith("https://")||(i=/^\/\//.test(i)?"http:"+i:location.origin+location.pathname+i);try{return/\.flv$/i.test(new URL(i).pathname)}catch{}}return!1}_onvisibilitychange(){!document.hidden&&this.playing&&this.muted&&this.options.isLive&&this.pause().finally(()=>{var e;(e=this.play)===null||e===void 0||e.call(this).catch(i=>{})})}}return Dt(ai,"ERROR",vt),Dt(ai,"EVENTS",te),Dt(ai,"QUALITY_ENUM",Hi),Dt(ai,"ROTATE",[0,90,180,270]),Dt(ai,"TIMEOUT",{delayTimeout:te.delayTimeout}),Dt(ai,"version","2.0.2"),ai})})(yo);var fs=yo.exports;const ms=hs(fs),Ji=Ka.create({baseURL:"https://home.ynims.com:6060",headers:{"Content-Type":"application/json"}});Ji.interceptors.request.use(yt=>(yt.headers={"Content-Type":"application/json"},yt),yt=>{console.log(yt),Promise.reject(yt)});Ji.interceptors.response.use(yt=>{const _t=yt.data;return yt.status===200?_t.code===0||(_t.code===401?Promise.reject(_t):_t.code===-1&&Zi.error(_t.errorMsg)):Ya.open({message:"提示",description:_t.errorMsg,icon:()=>Xa(Za,{style:"color: #ff4d4f"}),onClick:()=>{console.log("Notification Clicked!")}}),_t},yt=>(console.log("err"+yt),Promise.reject(yt)));const lr=yt=>(is("data-v-6581adc9"),yt=yt(),ns(),yt),_s={class:"the-box9"},vs={class:"change-num"},gs={key:0,class:"btn",src:or,alt:""},ys={key:1,class:"icon",src:ar,alt:""},bs={key:2,class:"icon",src:sr,alt:""},Es=lr(()=>Ge("div",{class:"text"},"本周菜品",-1)),Ss={key:0,class:"btn",src:or,alt:""},Cs={key:1,class:"icon",src:ar,alt:""},ws={key:2,class:"icon",src:sr,alt:""},ks=lr(()=>Ge("div",{class:"text"},"本周活动",-1)),Ts={key:0,class:"btn",src:or,alt:""},Ls={key:1,class:"icon",src:ar,alt:""},Bs={key:2,class:"icon",src:sr,alt:""},Is=lr(()=>Ge("div",{class:"text"},"监控视频",-1)),Os={class:"info_contenbox"},xs={key:0,class:"activebox"},Rs={key:0,class:"scollrcontent"},Ds={class:"week_name"},Ms=["innerHTML"],Ps=["innerHTML"],$s=["innerHTML"],Us={key:1,class:"activebox"},Fs=ts('

上午

08:00-09:00

下午

16:00-17:00

',1),Ns={class:"scollrcontent"},Vs={class:"time_name"},js={class:"time_text1"},Gs={class:"time_text1"},Qs={key:2,id:"video_content",style:{width:"430px !important",height:"280px !important","margin-left":"-15px !important"}},zs={__name:"Toast",props:["pageinfo"],setup(yt){const _t=fi(0),Dt=fi(null),Mt=yt;console.log("props.pageinfo",Mt.pageinfo);const mi=Ut=>{console.log(Ut),_t.value=Ut,Ut==2&&_i()},_i=()=>{var Ut;if(!Mt.pageinfo.tenantList||!((Ut=Mt.pageinfo.tenantList)!=null&&Ut.length)||!Mt.pageinfo.tenantList[0].tenantId)return Zi.error("暂无监控资源!");try{Ji.get("/v2/api/screen/getCameraAddress?organizationId="+Mt.pageinfo.tenantList[0].tenantId).then(tt=>{if(tt.code==200){const wt=tt.data.data.url;if(!wt)return Zi.error("暂无监控资源!");setTimeout(()=>{Dt.value=new ms({url:wt,id:"video_content",decoder:"/decoder.js",autoPlay:!0})},500)}})}catch(tt){console.log("error",tt),Zi.error("暂无监控资源!")}};return es(()=>{Dt.value&&Dt.value.destroy()}),(Ut,tt)=>(ft(),mt("div",_s,[Ge("div",vs,[Ge("div",{class:er(["change-num-item",{isActive:_t.value===0}]),onClick:tt[0]||(tt[0]=wt=>mi(0))},[_t.value===0?(ft(),mt("img",gs)):ci("",!0),_t.value===0?(ft(),mt("img",ys)):(ft(),mt("img",bs)),Es],2),Ge("div",{class:er(["change-num-item",{isActive:_t.value===1}]),onClick:tt[1]||(tt[1]=wt=>mi(1))},[_t.value===1?(ft(),mt("img",Ss)):ci("",!0),_t.value===1?(ft(),mt("img",Cs)):(ft(),mt("img",ws)),ks],2),Ge("div",{class:er(["change-num-item",{isActive:_t.value===2}]),onClick:tt[2]||(tt[2]=wt=>mi(2))},[_t.value===2?(ft(),mt("img",Ts)):ci("",!0),_t.value===2?(ft(),mt("img",Ls)):(ft(),mt("img",Bs)),Is],2)]),Ge("div",Os,[_t.value==0?(ft(),mt("div",xs,[yt.pageinfo.weekDishes?(ft(),mt("div",Rs,[(ft(!0),mt(nr,null,rr(yt.pageinfo.weekDishes,(wt,ni)=>(ft(),mt("div",{class:"list_dishe",key:ni},[Ge("p",Ds,Ci(wt[0]),1),Ge("p",{class:"valuetext",innerHTML:wt[1]},null,8,Ms),Ge("p",{class:"valuetext",innerHTML:wt[2]},null,8,Ps),Ge("p",{class:"valuetext",innerHTML:wt[3]},null,8,$s)]))),128))])):ci("",!0)])):ci("",!0),_t.value==1?(ft(),mt("div",Us,[Fs,Ge("div",Ns,[(ft(!0),mt(nr,null,rr(yt.pageinfo.weekActivity,(wt,ni)=>(ft(),mt("div",{class:"list_detial",key:ni},[Ge("p",Vs,Ci(wt.weekday),1),Ge("div",js,[Ge("p",null,Ci(wt.morning),1)]),Ge("div",Gs,[Ge("p",null,Ci(wt.afternoon),1)])]))),128))])])):ci("",!0),_t.value==2?(ft(),mt("div",Qs)):ci("",!0)])]))}},Hs=Ja(zs,[["__scopeId","data-v-6581adc9"]]),Ws="/assets/backbtnimg-CkMcIRZk.png",qs="/assets/index_todayactive-PLRCv3o7.png",Ks="/assets/index_detailtoast-D3OGocAM.png",Ys={class:"room_info"},Xs={class:"left_infocontent"},Zs={class:"left-top",style:{display:"flex","align-items":"baseline"}},Js=["src"],el=Ge("span",{class:"btn-icon"},"▶",-1),tl=Ge("span",{class:"btn-text"},"视频介绍",-1),il=[el,tl],nl=Ge("div",{class:"btn-hint"},"点击查看机构介绍视频",-1),rl={class:"desc_imgvideobox"},ol=["src"],al={class:"backPlateBox boxwidthele"},sl={class:"roomdesctextbox"},ll={class:"right_infcontnet"},Al={class:"backPlateBox todayactive"},dl={class:"toady_activebox"},cl={class:"left_text"},ul={class:"backPlateBox toastbox"},hl={class:"video-modal-header"},pl={class:"video-container"},fl={key:0,class:"video-player",id:"videoPlayer",controls:"",autoplay:""},ml=["src"],_l={key:1,class:"no-video"},vl=Ge("p",null,"暂无视频介绍",-1),gl=[vl],wl={__name:"roomdetail",emits:["dow_map"],setup(yt,{emit:_t}){const Dt=_t,Mt=rs(),mi=os(),_i=as(),Ut=fi([]),tt=fi({}),wt=fi(""),ni=fi(!1),vi=fi(""),en=fi(localStorage.getItem("isGrid")),Li={石溪:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E7%9F%B3%E6%BA%AA%E9%99%A2.mp4",东涌:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%B8%9C%E6%B6%8C%E9%99%A2.mp4",海珠:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E6%B5%B7%E7%8F%A0%E9%99%A2.mp4",五心:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%BA%94%E5%BF%83%E9%99%A2.mp4",南沙:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%8D%97%E6%B2%99%E9%99%A2.mp4",天河老人院:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%A4%A9%E6%B2%B3%E5%88%86%E9%99%A2%E4%BB%8B%E7%BB%8D.mp4",天河颐养:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E5%A4%A9%E6%B2%B3%E5%8C%BB%E5%85%BB%E9%99%A2.mp4",从化:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E4%BB%8E%E5%8C%96%E9%99%A2.mp4",花都:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E8%8A%B1%E9%83%BD%E9%99%A2.mp4",黄冈:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%BB%84%E5%86%88%E9%99%A2.mp4",秭归:"",麻城:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%BA%BB%E5%9F%8E%E9%99%A2.mp4",阳新:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%98%B3%E6%96%B0%E9%99%A2.mp4",沙市:"",鄂州:"https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/%E9%84%82%E5%B7%9E%E9%99%A2.mp4"};ss(()=>{Mt.setIsRoomDetailpage(!0),Mt.tenantId=_i.query.tenantId,wt.value=_i.query.title,Ii(),ls.on("roomDetails",Ft=>{console.log("监听全局emit预警事件data",Ft),Ft&&Bi(Ft)})});const Bi=async Ft=>{if(Ft.data.organizationId==Mt.tenantId)try{Ji.get("/v2/api/screen/getTodayData?tenantId="+Ft.data.organizationId).then(Nt=>{Nt.code==200&&(Ut.value=Nt.data)})}catch(Nt){console.log("error",Nt),message.error("暂无监控资源!")}},tn=()=>{Dt("dow_map",1),mi.push({path:"/index/main"})},ei=()=>{for(const Ft in Li)wt.value.includes(Ft)&&(vi.value=Li[Ft]);ni.value=!0},Ui=()=>{ni.value=!1,vi.value=""},Ii=()=>{let Ft={};Mt.isRoomDetailpage?Ft={tenantIds:Mt.tenantId,queryFlag:2}:Ft={tenantIds:Mt.tenantId,queryFlag:1},us(Ft).then(Nt=>{Nt.data.todayUpdate.length?Ut.value=Nt.data.todayUpdate:Ut.value=[],tt.value=Nt.data,Dt("dow_map",Nt.data)})};return As(()=>{Mt.setIsRoomDetailpage(!1)}),(Ft,Nt)=>(ft(),mt("div",Ys,[Ge("div",Xs,[Ge("div",Zs,[en.value==0?(ft(),mt("div",{key:0,class:"backbtn",onClick:tn},[Ge("img",{src:Yi(Ws),alt:""},null,8,Js)])):ci("",!0),Ge("div",{class:"video-play-btn-wrapper"},[Ge("div",{class:"video-play-btn",onClick:ei},il),nl])]),Ge("div",rl,[Ge("img",{src:tt.value&&tt.value.tenantList&&tt.value.tenantList[0].picture?tt.value.tenantList[0].picture:"",alt:""},null,8,ol)]),Ge("div",al,[Xi(ir,{title:tt.value&&tt.value.tenantList&&tt.value.tenantList[0].enterpriseName?tt.value.tenantList[0].enterpriseName:"",url:Yi(ps)},{default:tr(()=>[Ge("div",sl,Ci(tt.value&&tt.value.tenantList&&tt.value.tenantList[0].introduction?tt.value.tenantList[0].introduction:"暂无介绍"),1)]),_:1},8,["title","url"])])]),Ge("div",ll,[Ge("div",Al,[Xi(ir,{title:"今日动态",url:Yi(qs)},{default:tr(()=>[Ge("div",dl,[(ft(!0),mt(nr,null,rr(Ut.value,(ri,nn)=>(ft(),mt("div",{class:"list_acitve",key:nn},[Ge("p",cl,Ci(ri.content),1)]))),128))])]),_:1},8,["url"])]),Ge("div",ul,[Xi(ir,{title:"院级公告",url:Yi(Ks)},{default:tr(()=>[Xi(Hs,{pageinfo:tt.value},null,8,["pageinfo"])]),_:1},8,["url"])])]),ni.value?(ft(),mt("div",{key:0,class:"video-modal",onClick:Ui},[Ge("div",{class:"video-modal-content",onClick:Nt[0]||(Nt[0]=cs(()=>{},["stop"]))},[Ge("div",hl,[Ge("h3",null,Ci(wt.value)+" - 视频介绍",1),Ge("span",{class:"close-btn",onClick:Ui},"×")]),Ge("div",pl,[vi.value?(ft(),mt("video",fl,[Ge("source",{src:vi.value,type:"video/mp4"},null,8,ml),ds(" 您的浏览器不支持视频播放 ")])):(ft(),mt("div",_l,gl))])])])):ci("",!0)]))}};export{wl as default};