@volcengine/veplayer 1.6.5-rc.0 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +3 -45
  2. package/esm/index.d.ts +1405 -0
  3. package/esm/veplayer.biz.live.development.css +41 -0
  4. package/esm/veplayer.biz.live.development.js +3157 -0
  5. package/esm/veplayer.biz.live.production.css +1 -0
  6. package/esm/veplayer.biz.live.production.js +2 -0
  7. package/esm/veplayer.biz.vod.development.js +13 -0
  8. package/esm/veplayer.biz.vod.production.js +2 -0
  9. package/esm/veplayer.d.ts +3071 -0
  10. package/esm/veplayer.development.css +743 -0
  11. package/esm/veplayer.development.js +21023 -0
  12. package/esm/veplayer.live.d.ts +3074 -0
  13. package/esm/veplayer.live.development.css +743 -0
  14. package/esm/veplayer.live.development.js +21022 -0
  15. package/esm/veplayer.live.production.css +1 -0
  16. package/esm/veplayer.live.production.js +11 -0
  17. package/esm/veplayer.production.css +1 -0
  18. package/esm/veplayer.production.js +11 -0
  19. package/esm/veplayer.vod.d.ts +1405 -0
  20. package/esm/veplayer.vod.development.css +702 -0
  21. package/esm/veplayer.vod.development.js +13104 -0
  22. package/esm/veplayer.vod.production.css +1 -0
  23. package/esm/veplayer.vod.production.js +11 -0
  24. package/package.json +78 -6
  25. package/umd/index.d.ts +1405 -0
  26. package/umd/veplayer.biz.live.development.css +41 -0
  27. package/umd/veplayer.biz.live.development.js +3169 -0
  28. package/umd/veplayer.biz.live.production.css +1 -0
  29. package/umd/veplayer.biz.live.production.js +1 -0
  30. package/umd/veplayer.biz.vod.development.js +29 -0
  31. package/umd/veplayer.biz.vod.production.js +1 -0
  32. package/umd/veplayer.d.ts +3071 -0
  33. package/umd/veplayer.development.css +743 -0
  34. package/umd/veplayer.development.js +21026 -0
  35. package/umd/veplayer.live.d.ts +3074 -0
  36. package/umd/veplayer.live.development.css +743 -0
  37. package/umd/veplayer.live.development.js +21034 -0
  38. package/umd/veplayer.live.production.css +1 -0
  39. package/umd/veplayer.live.production.js +1 -0
  40. package/umd/veplayer.production.css +1 -0
  41. package/umd/veplayer.production.js +1 -0
  42. package/umd/veplayer.vod.d.ts +1405 -0
  43. package/umd/veplayer.vod.development.css +702 -0
  44. package/umd/veplayer.vod.development.js +13119 -0
  45. package/umd/veplayer.vod.production.css +1 -0
  46. package/umd/veplayer.vod.production.js +1 -0
  47. package/index.d.ts +0 -3256
  48. package/index.min.css +0 -1
  49. package/index.min.js +0 -2
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=function(e){return e&&e.Math==Math&&e},i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,l=Function.prototype,u=l.apply,c=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),d=a,f=Function.prototype,p=f.call,v=d&&f.bind.bind(p,p),g=d?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),b=function(e){return _(m(e),8,-1)},w=b,k=g,E=function(e){if("Function"===w(e))return k(e)},T="object"==typeof document&&document.all,S={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},C=S.all,x=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===C}:function(e){return"function"==typeof e},P={},A=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=a,R=Function.prototype.call,O=I?R.bind(R):function(){return R.apply(R,arguments)},M={},D={}.propertyIsEnumerable,L=Object.getOwnPropertyDescriptor,N=L&&!D.call({1:2},1);M.f=N?function(e){var t=L(this,e);return!!t&&t.enumerable}:D;var F,U,B=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},V=o,j=b,H=Object,z=g("".split),W=V((function(){return!H("z").propertyIsEnumerable(0)}))?function(e){return"String"==j(e)?z(e,""):H(e)}:H,G=function(e){return null==e},K=G,Y=TypeError,X=function(e){if(K(e))throw Y("Can't call method on "+e);return e},q=W,J=X,Q=function(e){return q(J(e))},Z=x,$=S.all,ee=S.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Z(e)||e===$}:function(e){return"object"==typeof e?null!==e:Z(e)},te={},ne=te,re=i,ie=x,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(re[e]):ne[e]&&ne[e][t]||re[e]&&re[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=i,ce=le,he=ue.process,de=ue.Deno,fe=he&&he.versions||de&&de.version,pe=fe&&fe.v8;pe&&(U=(F=pe.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&ce&&(!(F=ce.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=ce.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ve=U,ge=ve,ye=o,me=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,ke=x,Ee=se,Te=Object,Se=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return ke(t)&&Ee(t.prototype,Te(e))},Ce=String,xe=function(e){try{return Ce(e)}catch(t){return"Object"}},Pe=x,Ae=xe,Ie=TypeError,Re=function(e){if(Pe(e))return e;throw Ie(Ae(e)+" is not a function")},Oe=Re,Me=G,De=function(e,t){var n=e[t];return Me(n)?void 0:Oe(n)},Le=O,Ne=x,Fe=ee,Ue=TypeError,Be={exports:{}},Ve=i,je=Object.defineProperty,He=function(e,t){try{je(Ve,e,{value:t,configurable:!0,writable:!0})}catch(n){Ve[e]=t}return t},ze="__core-js_shared__",We=i[ze]||He(ze,{}),Ge=We;(Be.exports=function(e,t){return Ge[e]||(Ge[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Ke=Be.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},Je=qe,Qe=g({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return Qe(Je(e),t)},$e=g,et=0,tt=Math.random(),nt=$e(1..toString),rt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},it=Ke,ot=Ze,at=rt,st=_e,lt=be,ut=i.Symbol,ct=it("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,dt=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},ft=O,pt=ee,vt=Se,gt=De,yt=function(e,t){var n,r;if("string"===t&&Ne(n=e.toString)&&!Fe(r=Le(n,e)))return r;if(Ne(n=e.valueOf)&&!Fe(r=Le(n,e)))return r;if("string"!==t&&Ne(n=e.toString)&&!Fe(r=Le(n,e)))return r;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=dt("toPrimitive"),bt=function(e,t){if(!pt(e)||vt(e))return e;var n,r=gt(e,_t);if(r){if(void 0===t&&(t="default"),n=ft(r,e,t),!pt(n)||vt(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Se,kt=function(e){var t=bt(e,"string");return wt(t)?t:t+""},Et=ee,Tt=i.document,St=Et(Tt)&&Et(Tt.createElement),Ct=function(e){return St?Tt.createElement(e):{}},xt=Ct,Pt=!A&&!o((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),At=A,It=O,Rt=M,Ot=B,Mt=Q,Dt=kt,Lt=Ze,Nt=Pt,Ft=Object.getOwnPropertyDescriptor;P.f=At?Ft:function(e,t){if(e=Mt(e),t=Dt(t),Nt)try{return Ft(e,t)}catch(n){}if(Lt(e,t))return Ot(!It(Rt.f,e,t),e[t])};var Ut=o,Bt=x,Vt=/#|\.prototype\./,jt=function(e,t){var n=zt[Ht(e)];return n==Gt||n!=Wt&&(Bt(t)?Ut(t):!!t)},Ht=jt.normalize=function(e){return String(e).replace(Vt,".").toLowerCase()},zt=jt.data={},Wt=jt.NATIVE="N",Gt=jt.POLYFILL="P",Kt=jt,Yt=Re,Xt=a,qt=E(E.bind),Jt=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},Qt={},Zt=A&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,en=String,tn=TypeError,nn=function(e){if($t(e))return e;throw tn(en(e)+" is not an object")},rn=A,on=Pt,an=Zt,sn=nn,ln=kt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,dn="enumerable",fn="configurable",pn="writable";Qt.f=rn?an?function(e,t,n){if(sn(e),t=ln(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var r=hn(e,t);r&&r[pn]&&(e[t]=n.value,n={configurable:fn in n?n[fn]:r[fn],enumerable:dn in n?n[dn]:r[dn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return cn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=Qt,gn=B,yn=A?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=i,_n=h,bn=E,wn=x,kn=P.f,En=Kt,Tn=te,Sn=Jt,Cn=yn,xn=Ze,Pn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},An=function(e,t){var n,r,i,o,a,s,l,u,c,h=e.target,d=e.global,f=e.stat,p=e.proto,v=d?mn:f?mn[h]:(mn[h]||{}).prototype,g=d?Tn:Tn[h]||Cn(Tn,h,{})[h],y=g.prototype;for(o in t)r=!(n=En(d?o:h+(f?".":"#")+o,e.forced))&&v&&xn(v,o),s=g[o],r&&(l=e.dontCallGetSet?(c=kn(v,o))&&c.value:v[o]),a=r&&l?l:t[o],r&&typeof s==typeof a||(u=e.bind&&r?Sn(a,mn):e.wrap&&r?Pn(a):p&&wn(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Cn(u,"sham",!0),Cn(g,o,u),p&&(xn(Tn,i=h+"Prototype")||Cn(Tn,i,{}),Cn(Tn[i],o,a),e.real&&y&&(n||!y[o])&&Cn(y,o,a)))},In=b,Rn=Array.isArray||function(e){return"Array"==In(e)},On=Math.ceil,Mn=Math.floor,Dn=Math.trunc||function(e){var t=+e;return(t>0?Mn:On)(t)},Ln=function(e){var t=+e;return t!=t||0===t?0:Dn(t)},Nn=Ln,Fn=Math.min,Un=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Bn=Un,Vn=function(e){return Bn(e.length)},jn=TypeError,Hn=function(e){if(e>9007199254740991)throw jn("Maximum allowed index exceeded");return e},zn=kt,Wn=Qt,Gn=B,Kn=function(e,t,n){var r=zn(t);r in e?Wn.f(e,r,Gn(0,n)):e[r]=n},Yn={};Yn[dt("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,Jn=x,Qn=b,Zn=dt("toStringTag"),$n=Object,er="Arguments"==Qn(function(){return arguments}()),tr=qn?Qn:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=$n(e),Zn))?n:er?Qn(t):"Object"==(r=Qn(t))&&Jn(t.callee)?"Arguments":r},nr=x,rr=We,ir=g(Function.toString);nr(rr.inspectSource)||(rr.inspectSource=function(e){return ir(e)});var or=rr.inspectSource,ar=g,sr=o,lr=x,ur=tr,cr=or,hr=function(){},dr=[],fr=ae("Reflect","construct"),pr=/^\s*(?:class|function)\b/,vr=ar(pr.exec),gr=!pr.exec(hr),yr=function(e){if(!lr(e))return!1;try{return fr(hr,dr,e),!0}catch(t){return!1}},mr=function(e){if(!lr(e))return!1;switch(ur(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gr||!!vr(pr,cr(e))}catch(t){return!0}};mr.sham=!0;var _r=!fr||sr((function(){var e;return yr(yr.call)||!yr(Object)||!yr((function(){e=!0}))||e}))?mr:yr,br=Rn,wr=_r,kr=ee,Er=dt("species"),Tr=Array,Sr=function(e){var t;return br(e)&&(t=e.constructor,(wr(t)&&(t===Tr||br(t.prototype))||kr(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?Tr:t},Cr=function(e,t){return new(Sr(e))(0===t?0:t)},xr=o,Pr=ve,Ar=dt("species"),Ir=function(e){return Pr>=51||!xr((function(){var t=[];return(t.constructor={})[Ar]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Rr=An,Or=o,Mr=Rn,Dr=ee,Lr=qe,Nr=Vn,Fr=Hn,Ur=Kn,Br=Cr,Vr=Ir,jr=ve,Hr=dt("isConcatSpreadable"),zr=jr>=51||!Or((function(){var e=[];return e[Hr]=!1,e.concat()[0]!==e})),Wr=function(e){if(!Dr(e))return!1;var t=e[Hr];return void 0!==t?!!t:Mr(e)};Rr({target:"Array",proto:!0,arity:1,forced:!zr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=Lr(this),s=Br(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(Wr(o=-1===t?a:arguments[t]))for(i=Nr(o),Fr(l+i),n=0;n<i;n++,l++)n in o&&Ur(s,l,o[n]);else Fr(l+1),Ur(s,l++,o);return s.length=l,s}});var Gr=tr,Kr=String,Yr=function(e){if("Symbol"===Gr(e))throw TypeError("Cannot convert a Symbol value to a string");return Kr(e)},Xr={},qr=Ln,Jr=Math.max,Qr=Math.min,Zr=function(e,t){var n=qr(e);return n<0?Jr(n+t,0):Qr(n,t)},$r=Q,ei=Zr,ti=Vn,ni=function(e){return function(t,n,r){var i,o=$r(t),a=ti(o),s=ei(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ri={includes:ni(!0),indexOf:ni(!1)},ii={},oi=Ze,ai=Q,si=ri.indexOf,li=ii,ui=g([].push),ci=function(e,t){var n,r=ai(e),i=0,o=[];for(n in r)!oi(li,n)&&oi(r,n)&&ui(o,n);for(;t.length>i;)oi(r,n=t[i++])&&(~si(o,n)||ui(o,n));return o},hi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],di=ci,fi=hi,pi=Object.keys||function(e){return di(e,fi)},vi=A,gi=Zt,yi=Qt,mi=nn,_i=Q,bi=pi;Xr.f=vi&&!gi?Object.defineProperties:function(e,t){mi(e);for(var n,r=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,n=i[a++],r[n]);return e};var wi,ki=ae("document","documentElement"),Ei=rt,Ti=Ke("keys"),Si=function(e){return Ti[e]||(Ti[e]=Ei(e))},Ci=nn,xi=Xr,Pi=hi,Ai=ii,Ii=ki,Ri=Ct,Oi="prototype",Mi="script",Di=Si("IE_PROTO"),Li=function(){},Ni=function(e){return"<"+Mi+">"+e+"</"+Mi+">"},Fi=function(e){e.write(Ni("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ui=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Ui="undefined"!=typeof document?document.domain&&wi?Fi(wi):(t=Ri("iframe"),n="java"+Mi+":",t.style.display="none",Ii.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ni("document.F=Object")),e.close(),e.F):Fi(wi);for(var r=Pi.length;r--;)delete Ui[Oi][Pi[r]];return Ui()};Ai[Di]=!0;var Bi=Object.create||function(e,t){var n;return null!==e?(Li[Oi]=Ci(e),n=new Li,Li[Oi]=null,n[Di]=e):n=Ui(),void 0===t?n:xi.f(n,t)},Vi={},ji=ci,Hi=hi.concat("length","prototype");Vi.f=Object.getOwnPropertyNames||function(e){return ji(e,Hi)};var zi={},Wi=Zr,Gi=Vn,Ki=Kn,Yi=Array,Xi=Math.max,qi=function(e,t,n){for(var r=Gi(e),i=Wi(t,r),o=Wi(void 0===n?r:n,r),a=Yi(Xi(o-i,0)),s=0;i<o;i++,s++)Ki(a,s,e[i]);return a.length=s,a},Ji=b,Qi=Q,Zi=Vi.f,$i=qi,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];zi.f=function(e){return eo&&"Window"==Ji(e)?function(e){try{return Zi(e)}catch(t){return $i(eo)}}(e):Zi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,ro=function(e,t,n,r){return r&&r.enumerable?e[t]=n:no(e,t,n),e},io=Qt,oo=function(e,t,n){return io.f(e,t,n)},ao={},so=dt;ao.f=so;var lo,uo,co,ho=te,fo=Ze,po=ao,vo=Qt.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=O,mo=ae,_o=dt,bo=ro,wo=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_o("toPrimitive");t&&!t[r]&&bo(t,r,(function(e){return yo(n,this)}),{arity:1})},ko=tr,Eo=Xn?{}.toString:function(){return"[object "+ko(this)+"]"},To=Xn,So=Qt.f,Co=yn,xo=Ze,Po=Eo,Ao=dt("toStringTag"),Io=function(e,t,n,r){if(e){var i=n?e:e.prototype;xo(i,Ao)||So(i,Ao,{configurable:!0,value:t}),r&&!To&&Co(i,"toString",Po)}},Ro=x,Oo=i.WeakMap,Mo=Ro(Oo)&&/native code/.test(String(Oo)),Do=i,Lo=ee,No=yn,Fo=Ze,Uo=We,Bo=Si,Vo=ii,jo="Object already initialized",Ho=Do.TypeError,zo=Do.WeakMap;if(Mo||Uo.state){var Wo=Uo.state||(Uo.state=new zo);Wo.get=Wo.get,Wo.has=Wo.has,Wo.set=Wo.set,lo=function(e,t){if(Wo.has(e))throw Ho(jo);return t.facade=e,Wo.set(e,t),t},uo=function(e){return Wo.get(e)||{}},co=function(e){return Wo.has(e)}}else{var Go=Bo("state");Vo[Go]=!0,lo=function(e,t){if(Fo(e,Go))throw Ho(jo);return t.facade=e,No(e,Go,t),t},uo=function(e){return Fo(e,Go)?e[Go]:{}},co=function(e){return Fo(e,Go)}}var Ko={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var n;if(!Lo(t)||(n=uo(t)).type!==e)throw Ho("Incompatible receiver, "+e+" required");return n}}},Yo=Jt,Xo=W,qo=qe,Jo=Vn,Qo=Cr,Zo=g([].push),$o=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var d,f,p=qo(l),v=Xo(p),g=Yo(u,c),y=Jo(v),m=0,_=h||Qo,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(f=g(d=v[m],m,p),e))if(t)b[m]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:Zo(b,d)}else switch(e){case 4:return!1;case 7:Zo(b,d)}return o?-1:r||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=An,na=i,ra=O,ia=g,oa=A,aa=_e,sa=o,la=Ze,ua=se,ca=nn,ha=Q,da=kt,fa=Yr,pa=B,va=Bi,ga=pi,ya=Vi,ma=zi,_a=to,ba=P,wa=Qt,ka=Xr,Ea=M,Ta=ro,Sa=oo,Ca=Ke,xa=ii,Pa=rt,Aa=dt,Ia=ao,Ra=go,Oa=wo,Ma=Io,Da=Ko,La=ea.forEach,Na=Si("hidden"),Fa="Symbol",Ua="prototype",Ba=Da.set,Va=Da.getterFor(Fa),ja=Object[Ua],Ha=na.Symbol,za=Ha&&Ha[Ua],Wa=na.TypeError,Ga=na.QObject,Ka=ba.f,Ya=wa.f,Xa=ma.f,qa=Ea.f,Ja=ia([].push),Qa=Ca("symbols"),Za=Ca("op-symbols"),$a=Ca("wks"),es=!Ga||!Ga[Ua]||!Ga[Ua].findChild,ts=oa&&sa((function(){return 7!=va(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ka(ja,t);r&&delete ja[t],Ya(e,t,n),r&&e!==ja&&Ya(ja,t,r)}:Ya,ns=function(e,t){var n=Qa[e]=va(za);return Ba(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},rs=function(e,t,n){e===ja&&rs(Za,t,n),ca(e);var r=da(t);return ca(n),la(Qa,r)?(n.enumerable?(la(e,Na)&&e[Na][r]&&(e[Na][r]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][r]=!0),ts(e,r,n)):Ya(e,r,n)},is=function(e,t){ca(e);var n=ha(t),r=ga(n).concat(ls(n));return La(r,(function(t){oa&&!ra(os,n,t)||rs(e,t,n[t])})),e},os=function(e){var t=da(e),n=ra(qa,this,t);return!(this===ja&&la(Qa,t)&&!la(Za,t))&&(!(n||!la(this,t)||!la(Qa,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),r=da(t);if(n!==ja||!la(Qa,r)||la(Za,r)){var i=Ka(n,r);return!i||!la(Qa,r)||la(n,Na)&&n[Na][r]||(i.enumerable=!0),i}},ss=function(e){var t=Xa(ha(e)),n=[];return La(t,(function(e){la(Qa,e)||la(xa,e)||Ja(n,e)})),n},ls=function(e){var t=e===ja,n=Xa(t?Za:ha(e)),r=[];return La(n,(function(e){!la(Qa,e)||t&&!la(ja,e)||Ja(r,Qa[e])})),r};aa||(Ha=function(){if(ua(za,this))throw Wa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?fa(arguments[0]):void 0,t=Pa(e),n=function(e){this===ja&&ra(n,Za,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(ja,t,{configurable:!0,set:n}),ns(t,e)},Ta(za=Ha[Ua],"toString",(function(){return Va(this).tag})),Ta(Ha,"withoutSetter",(function(e){return ns(Pa(e),e)})),Ea.f=os,wa.f=rs,ka.f=is,ba.f=as,ya.f=ma.f=ss,_a.f=ls,Ia.f=function(e){return ns(Aa(e),e)},oa&&Sa(za,"description",{configurable:!0,get:function(){return Va(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Ha}),La(ga($a),(function(e){Ra(e)})),ta({target:Fa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):is(va(e),t)},defineProperty:rs,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Oa(),Ma(Ha,Fa),xa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=An,hs=ae,ds=Ze,fs=Yr,ps=Ke,vs=us,gs=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=fs(e);if(ds(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=An,_s=Ze,bs=Se,ws=xe,ks=us,Es=Ke("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Ts=g([].slice),Ss=Rn,Cs=x,xs=b,Ps=Yr,As=g([].push),Is=An,Rs=ae,Os=h,Ms=O,Ds=g,Ls=o,Ns=x,Fs=Se,Us=Ts,Bs=function(e){if(Cs(e))return e;if(Ss(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?As(n,i):"number"!=typeof i&&"Number"!=xs(i)&&"String"!=xs(i)||As(n,Ps(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ss(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Vs=_e,js=String,Hs=Rs("JSON","stringify"),zs=Ds(/./.exec),Ws=Ds("".charAt),Gs=Ds("".charCodeAt),Ks=Ds("".replace),Ys=Ds(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,Js=/^[\uDC00-\uDFFF]$/,Qs=!Vs||Ls((function(){var e=Rs("Symbol")();return"[null]"!=Hs([e])||"{}"!=Hs({a:e})||"{}"!=Hs(Object(e))})),Zs=Ls((function(){return'"\\udf06\\ud834"'!==Hs("\udf06\ud834")||'"\\udead"'!==Hs("\udead")})),$s=function(e,t){var n=Us(arguments),r=Bs(t);if(Ns(r)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(r)&&(t=Ms(r,this,js(e),t)),!Fs(t))return t},Os(Hs,null,n)},el=function(e,t,n){var r=Ws(n,t-1),i=Ws(n,t+1);return zs(qs,e)&&!zs(Js,i)||zs(Js,e)&&!zs(qs,r)?"\\u"+Ys(Gs(e,0),16):e};Hs&&Is({target:"JSON",stat:!0,arity:3,forced:Qs||Zs},{stringify:function(e,t,n){var r=Us(arguments),i=Os(Qs?$s:Hs,null,r);return Zs&&"string"==typeof i?Ks(i,Xs,el):i}});var tl=to,nl=qe;An({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(nl(e)):[]}}),go("asyncIterator"),go("hasInstance"),go("isConcatSpreadable"),go("iterator"),go("match"),go("matchAll"),go("replace"),go("search"),go("species"),go("split");var rl=wo;go("toPrimitive"),rl();var il=ae,ol=Io;go("toStringTag"),ol(il("Symbol"),"Symbol"),go("unscopables"),Io(i.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=A,dl=Ze,fl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=dl(fl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(fl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Ze,_l=x,bl=qe,wl=yl,kl=Si("IE_PROTO"),El=Object,Tl=El.prototype,Sl=wl?El.getPrototypeOf:function(e){var t=bl(e);if(ml(t,kl))return t[kl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Tl:null},Cl=o,xl=x,Pl=ee,Al=Bi,Il=Sl,Rl=ro,Ol=dt("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Il(Il(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Dl=!Pl(al)||Cl((function(){var e={};return al[Ol].call(e)!==e}));xl((al=Dl?{}:Al(al))[Ol])||Rl(al,Ol,(function(){return this}));var Ll={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Ll.IteratorPrototype,Fl=Bi,Ul=B,Bl=Io,Vl=cl,jl=function(){return this},Hl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Fl(Nl,{next:Ul(+!r,n)}),Bl(e,i,!1,!0),Vl[i]=jl,e},zl=g,Wl=Re,Gl=x,Kl=String,Yl=TypeError,Xl=function(e,t,n){try{return zl(Wl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},ql=nn,Jl=function(e){if("object"==typeof e||Gl(e))return e;throw Yl("Can't set "+Kl(e)+" as a prototype")},Ql=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Xl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return ql(n),Jl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zl=An,$l=O,eu=gl,tu=Hl,nu=Sl,ru=Io,iu=ro,ou=cl,au=Ll,su=eu.PROPER,lu=au.BUGGY_SAFARI_ITERATORS,uu=dt("iterator"),cu="keys",hu="values",du="entries",fu=function(){return this},pu=function(e,t,n,r,i,o,a){tu(n,t,r);var s,l,u,c=function(e){if(e===i&&v)return v;if(!lu&&e in f)return f[e];switch(e){case cu:case hu:case du:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",d=!1,f=e.prototype,p=f[uu]||f["@@iterator"]||i&&f[i],v=!lu&&p||c(i),g="Array"==t&&f.entries||p;if(g&&(s=nu(g.call(new e)))!==Object.prototype&&s.next&&(ru(s,h,!0,!0),ou[h]=fu),su&&i==hu&&p&&p.name!==hu&&(d=!0,v=function(){return $l(p,this)}),i)if(l={values:c(hu),keys:o?v:c(cu),entries:c(du)},a)for(u in l)(lu||d||!(u in f))&&iu(f,u,l[u]);else Zl({target:t,proto:!0,forced:lu||d},l);return a&&f[uu]!==v&&iu(f,uu,v,{name:i}),ou[t]=v,l},vu=function(e,t){return{value:e,done:t}},gu=Q,yu=cl,mu=Ko;Qt.f;var _u=pu,bu=vu,wu="Array Iterator",ku=mu.set,Eu=mu.getterFor(wu);_u(Array,"Array",(function(e,t){ku(this,{type:wu,target:gu(e),index:0,kind:t})}),(function(){var e=Eu(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,bu(void 0,!0)):bu("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),yu.Arguments=yu.Array;var Tu={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},Su=i,Cu=tr,xu=yn,Pu=cl,Au=dt("toStringTag");for(var Iu in Tu){var Ru=Su[Iu],Ou=Ru&&Ru.prototype;Ou&&Cu(Ou)!==Au&&xu(Ou,Au,Iu),Pu[Iu]=Pu.Array}var Mu=ul;go("dispose");var Du=Mu;go("asyncDispose");var Lu=An,Nu=g,Fu=ae("Symbol"),Uu=Fu.keyFor,Bu=Nu(Fu.prototype.valueOf);Lu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Uu(Bu(e))}catch(t){return!1}}});for(var Vu=An,ju=Ke,Hu=ae,zu=g,Wu=Se,Gu=dt,Ku=Hu("Symbol"),Yu=Ku.isWellKnown,Xu=Hu("Object","getOwnPropertyNames"),qu=zu(Ku.prototype.valueOf),Ju=ju("wks"),Qu=0,Zu=Xu(Ku),$u=Zu.length;Qu<$u;Qu++)try{var ec=Zu[Qu];Wu(Ku[ec])&&Gu(ec)}catch($U){}Vu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Yu&&Yu(e))return!0;try{for(var t=qu(e),n=0,r=Xu(Ju),i=r.length;n<i;n++)if(Ju[r[n]]==t)return!0}catch($U){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var tc=Du,nc=n(tc),rc=g,ic=Ln,oc=Yr,ac=X,sc=rc("".charAt),lc=rc("".charCodeAt),uc=rc("".slice),cc=function(e){return function(t,n){var r,i,o=oc(ac(t)),a=ic(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=lc(o,a))<55296||r>56319||a+1===s||(i=lc(o,a+1))<56320||i>57343?e?sc(o,a):r:e?uc(o,a,a+2):i-56320+(r-55296<<10)+65536}},hc={codeAt:cc(!1),charAt:cc(!0)}.charAt,dc=Yr,fc=Ko,pc=pu,vc=vu,gc="String Iterator",yc=fc.set,mc=fc.getterFor(gc);pc(String,"String",(function(e){yc(this,{type:gc,string:dc(e),index:0})}),(function(){var e,t=mc(this),n=t.string,r=t.index;return r>=n.length?vc(void 0,!0):(e=hc(n,r),t.index+=e.length,vc(e,!1))}));var _c=ao.f("iterator"),bc=n(_c);function wc(e){return(wc="function"==typeof nc&&"symbol"==typeof bc?function(e){return typeof e}:function(e){return e&&"function"==typeof nc&&e.constructor===nc&&e!==nc.prototype?"symbol":typeof e})(e)}var kc={exports:{}},Ec=An,Tc=A,Sc=Qt.f;Ec({target:"Object",stat:!0,forced:Object.defineProperty!==Sc,sham:!Tc},{defineProperty:Sc});var Cc=te.Object,xc=kc.exports=function(e,t,n){return Cc.defineProperty(e,t,n)};Cc.defineProperty.sham&&(xc.sham=!0);var Pc=kc.exports,Ac=n(Pc);An({target:"Object",stat:!0,sham:!A},{create:Bi});var Ic=te.Object,Rc=n((function(e,t){return Ic.create(e,t)})),Oc=qe,Mc=Sl,Dc=yl;An({target:"Object",stat:!0,forced:o((function(){Mc(1)})),sham:!Dc},{getPrototypeOf:function(e){return Mc(Oc(e))}});var Lc=te.Object.getPrototypeOf,Nc=n(Lc),Fc=o,Uc=function(e,t){var n=[][e];return!!n&&Fc((function(){n.call(null,t||function(){return 1},1)}))},Bc=ea.forEach,Vc=Uc("forEach")?[].forEach:function(e){return Bc(this,e,arguments.length>1?arguments[1]:void 0)};An({target:"Array",proto:!0,forced:[].forEach!=Vc},{forEach:Vc});var jc=te,Hc=function(e){return jc[e+"Prototype"]},zc=Hc("Array").forEach,Wc=tr,Gc=Ze,Kc=se,Yc=zc,Xc=Array.prototype,qc={DOMTokenList:!0,NodeList:!0},Jc=n((function(e){var t=e.forEach;return e===Xc||Kc(Xc,e)&&t===Xc.forEach||Gc(qc,Wc(e))?Yc:t})),Qc=A,Zc=Rn,$c=TypeError,eh=Object.getOwnPropertyDescriptor,th=Qc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch($U){return $U instanceof TypeError}}()?function(e,t){if(Zc(e)&&!eh(e,"length").writable)throw $c("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},nh=qe,rh=Vn,ih=th,oh=Hn;An({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch($U){return $U instanceof TypeError}}()},{push:function(e){var t=nh(this),n=rh(t),r=arguments.length;oh(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return ih(t,n),n}});var ah=Hc("Array").push,sh=se,lh=ah,uh=Array.prototype,ch=n((function(e){var t=e.push;return e===uh||sh(uh,e)&&t===uh.push?lh:t}));An({target:"Object",stat:!0},{setPrototypeOf:Ql});var hh=te.Object.setPrototypeOf,dh=n(hh),fh=ae,ph=Vi,vh=to,gh=nn,yh=g([].concat),mh=fh("Reflect","ownKeys")||function(e){var t=ph.f(gh(e)),n=vh.f;return n?yh(t,n(e)):t},_h=Ze,bh=mh,wh=P,kh=Qt,Eh=ee,Th=yn,Sh=Error,Ch=g("".replace),xh=String(Sh("zxcasd").stack),Ph=/\n\s*at [^:]*:[^\n]*/,Ah=Ph.test(xh),Ih=B,Rh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ih(1,7)),7!==e.stack)})),Oh=yn,Mh=function(e,t){if(Ah&&"string"==typeof e&&!Sh.prepareStackTrace)for(;t--;)e=Ch(e,Ph,"");return e},Dh=Rh,Lh=Error.captureStackTrace,Nh=cl,Fh=dt("iterator"),Uh=Array.prototype,Bh=function(e){return void 0!==e&&(Nh.Array===e||Uh[Fh]===e)},Vh=tr,jh=De,Hh=G,zh=cl,Wh=dt("iterator"),Gh=function(e){if(!Hh(e))return jh(e,Wh)||jh(e,"@@iterator")||zh[Vh(e)]},Kh=O,Yh=Re,Xh=nn,qh=xe,Jh=Gh,Qh=TypeError,Zh=function(e,t){var n=arguments.length<2?Jh(e):t;if(Yh(n))return Xh(Kh(n,e));throw Qh(qh(e)+" is not iterable")},$h=O,ed=nn,td=De,nd=function(e,t,n){var r,i;ed(e);try{if(!(r=td(e,"return"))){if("throw"===t)throw n;return n}r=$h(r,e)}catch($U){i=!0,r=$U}if("throw"===t)throw n;if(i)throw r;return ed(r),n},rd=Jt,id=O,od=nn,ad=xe,sd=Bh,ld=Vn,ud=se,cd=Zh,hd=Gh,dd=nd,fd=TypeError,pd=function(e,t){this.stopped=e,this.result=t},vd=pd.prototype,gd=function(e,t,n){var r,i,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=rd(t,c),g=function(e){return r&&dd(r,"normal",e),new pd(!0,e)},y=function(e){return h?(od(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(d)r=e.iterator;else if(f)r=e;else{if(!(i=hd(e)))throw fd(ad(e)+" is not iterable");if(sd(i)){for(o=0,a=ld(e);a>o;o++)if((s=y(e[o]))&&ud(vd,s))return s;return new pd(!1)}r=cd(e,i)}for(l=d?e.next:r.next;!(u=id(l,r)).done;){try{s=y(u.value)}catch($U){dd(r,"throw",$U)}if("object"==typeof s&&s&&ud(vd,s))return s}return new pd(!1)},yd=Yr,md=An,_d=se,bd=Sl,wd=Ql,kd=function(e,t,n){for(var r=bh(t),i=kh.f,o=wh.f,a=0;a<r.length;a++){var s=r[a];_h(e,s)||n&&_h(n,s)||i(e,s,o(t,s))}},Ed=Bi,Td=yn,Sd=B,Cd=function(e,t){Eh(t)&&"cause"in t&&Th(e,"cause",t.cause)},xd=function(e,t,n,r){Dh&&(Lh?Lh(e,t):Oh(e,"stack",Mh(n,r)))},Pd=gd,Ad=function(e,t){return void 0===e?arguments.length<2?"":t:yd(e)},Id=dt("toStringTag"),Rd=Error,Od=[].push,Md=function(e,t){var n,r=_d(Dd,this);wd?n=wd(Rd(),r?bd(this):Dd):(n=r?this:Ed(Dd),Td(n,Id,"Error")),void 0!==t&&Td(n,"message",Ad(t)),xd(n,Md,n.stack,1),arguments.length>2&&Cd(n,arguments[2]);var i=[];return Pd(e,Od,{that:i}),Td(n,"errors",i),n};wd?wd(Md,Rd):kd(Md,Rd,{name:!0});var Dd=Md.prototype=Ed(Rd.prototype,{constructor:Sd(1,Md),message:Sd(1,""),name:Sd(1,"AggregateError")});md({global:!0,constructor:!0,arity:2},{AggregateError:Md});var Ld,Nd,Fd,Ud,Bd="undefined"!=typeof process&&"process"==b(process),Vd=ae,jd=oo,Hd=A,zd=dt("species"),Wd=function(e){var t=Vd(e);Hd&&t&&!t[zd]&&jd(t,zd,{configurable:!0,get:function(){return this}})},Gd=se,Kd=TypeError,Yd=function(e,t){if(Gd(t,e))return e;throw Kd("Incorrect invocation")},Xd=_r,qd=xe,Jd=TypeError,Qd=function(e){if(Xd(e))return e;throw Jd(qd(e)+" is not a constructor")},Zd=nn,$d=Qd,ef=G,tf=dt("species"),nf=function(e,t){var n,r=Zd(e).constructor;return void 0===r||ef(n=Zd(r)[tf])?t:$d(n)},rf=TypeError,of=function(e,t){if(e<t)throw rf("Not enough arguments");return e},af=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),sf=i,lf=h,uf=Jt,cf=x,hf=Ze,df=o,ff=ki,pf=Ts,vf=Ct,gf=of,yf=af,mf=Bd,_f=sf.setImmediate,bf=sf.clearImmediate,wf=sf.process,kf=sf.Dispatch,Ef=sf.Function,Tf=sf.MessageChannel,Sf=sf.String,Cf=0,xf={},Pf="onreadystatechange";df((function(){Ld=sf.location}));var Af=function(e){if(hf(xf,e)){var t=xf[e];delete xf[e],t()}},If=function(e){return function(){Af(e)}},Rf=function(e){Af(e.data)},Of=function(e){sf.postMessage(Sf(e),Ld.protocol+"//"+Ld.host)};_f&&bf||(_f=function(e){gf(arguments.length,1);var t=cf(e)?e:Ef(e),n=pf(arguments,1);return xf[++Cf]=function(){lf(t,void 0,n)},Nd(Cf),Cf},bf=function(e){delete xf[e]},mf?Nd=function(e){wf.nextTick(If(e))}:kf&&kf.now?Nd=function(e){kf.now(If(e))}:Tf&&!yf?(Ud=(Fd=new Tf).port2,Fd.port1.onmessage=Rf,Nd=uf(Ud.postMessage,Ud)):sf.addEventListener&&cf(sf.postMessage)&&!sf.importScripts&&Ld&&"file:"!==Ld.protocol&&!df(Of)?(Nd=Of,sf.addEventListener("message",Rf,!1)):Nd=Pf in vf("script")?function(e){ff.appendChild(vf("script"))[Pf]=function(){ff.removeChild(this),Af(e)}}:function(e){setTimeout(If(e),0)});var Mf={set:_f,clear:bf},Df=function(){this.head=null,this.tail=null};Df.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Lf,Nf,Ff,Uf,Bf,Vf=Df,jf=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,Hf=/web0s(?!.*chrome)/i.test(le),zf=i,Wf=Jt,Gf=P.f,Kf=Mf.set,Yf=Vf,Xf=af,qf=jf,Jf=Hf,Qf=Bd,Zf=zf.MutationObserver||zf.WebKitMutationObserver,$f=zf.document,ep=zf.process,tp=zf.Promise,np=Gf(zf,"queueMicrotask"),rp=np&&np.value;if(!rp){var ip=new Yf,op=function(){var e,t;for(Qf&&(e=ep.domain)&&e.exit();t=ip.get();)try{t()}catch($U){throw ip.head&&Lf(),$U}e&&e.enter()};Xf||Qf||Jf||!Zf||!$f?!qf&&tp&&tp.resolve?((Uf=tp.resolve(void 0)).constructor=tp,Bf=Wf(Uf.then,Uf),Lf=function(){Bf(op)}):Qf?Lf=function(){ep.nextTick(op)}:(Kf=Wf(Kf,zf),Lf=function(){Kf(op)}):(Nf=!0,Ff=$f.createTextNode(""),new Zf(op).observe(Ff,{characterData:!0}),Lf=function(){Ff.data=Nf=!Nf}),rp=function(e){ip.head||Lf(),ip.add(e)}}var ap=rp,sp=function(e){try{return{error:!1,value:e()}}catch($U){return{error:!0,value:$U}}},lp=i.Promise,up="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,cp=!up&&!Bd&&"object"==typeof window&&"object"==typeof document,hp=i,dp=lp,fp=x,pp=Kt,vp=or,gp=dt,yp=cp,mp=up,_p=ve,bp=dp&&dp.prototype,wp=gp("species"),kp=!1,Ep=fp(hp.PromiseRejectionEvent),Tp={CONSTRUCTOR:pp("Promise",(function(){var e=vp(dp),t=e!==String(dp);if(!t&&66===_p)return!0;if(!bp.catch||!bp.finally)return!0;if(!_p||_p<51||!/native code/.test(e)){var n=new dp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[wp]=r,!(kp=n.then((function(){}))instanceof r))return!0}return!t&&(yp||mp)&&!Ep})),REJECTION_EVENT:Ep,SUBCLASSING:kp},Sp={},Cp=Re,xp=TypeError,Pp=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw xp("Bad Promise constructor");t=e,n=r})),this.resolve=Cp(t),this.reject=Cp(n)};Sp.f=function(e){return new Pp(e)};var Ap,Ip,Rp=An,Op=Bd,Mp=i,Dp=O,Lp=ro,Np=Io,Fp=Wd,Up=Re,Bp=x,Vp=ee,jp=Yd,Hp=nf,zp=Mf.set,Wp=ap,Gp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch($U){}},Kp=sp,Yp=Vf,Xp=Ko,qp=lp,Jp=Tp,Qp=Sp,Zp="Promise",$p=Jp.CONSTRUCTOR,ev=Jp.REJECTION_EVENT,tv=Xp.getterFor(Zp),nv=Xp.set,rv=qp&&qp.prototype,iv=qp,ov=rv,av=Mp.TypeError,sv=Mp.document,lv=Mp.process,uv=Qp.f,cv=uv,hv=!!(sv&&sv.createEvent&&Mp.dispatchEvent),dv="unhandledrejection",fv=function(e){var t;return!(!Vp(e)||!Bp(t=e.then))&&t},pv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&_v(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?u(av("Promise-chain cycle")):(r=fv(n))?Dp(r,n,l,u):l(n)):u(o)}catch($U){c&&!i&&c.exit(),u($U)}},vv=function(e,t){e.notified||(e.notified=!0,Wp((function(){for(var n,r=e.reactions;n=r.get();)pv(n,e);e.notified=!1,t&&!e.rejection&&yv(e)})))},gv=function(e,t,n){var r,i;hv?((r=sv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mp.dispatchEvent(r)):r={promise:t,reason:n},!ev&&(i=Mp["on"+e])?i(r):e===dv&&Gp("Unhandled promise rejection",n)},yv=function(e){Dp(zp,Mp,(function(){var t,n=e.facade,r=e.value;if(mv(e)&&(t=Kp((function(){Op?lv.emit("unhandledRejection",r,n):gv(dv,n,r)})),e.rejection=Op||mv(e)?2:1,t.error))throw t.value}))},mv=function(e){return 1!==e.rejection&&!e.parent},_v=function(e){Dp(zp,Mp,(function(){var t=e.facade;Op?lv.emit("rejectionHandled",t):gv("rejectionhandled",t,e.value)}))},bv=function(e,t,n){return function(r){e(t,r,n)}},wv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,vv(e,!0))},kv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw av("Promise can't be resolved itself");var r=fv(t);r?Wp((function(){var n={done:!1};try{Dp(r,t,bv(kv,n,e),bv(wv,n,e))}catch($U){wv(n,$U,e)}})):(e.value=t,e.state=1,vv(e,!1))}catch($U){wv({done:!1},$U,e)}}};$p&&(ov=(iv=function(e){jp(this,ov),Up(e),Dp(Ap,this);var t=tv(this);try{e(bv(kv,t),bv(wv,t))}catch($U){wv(t,$U)}}).prototype,(Ap=function(e){nv(this,{type:Zp,done:!1,notified:!1,parent:!1,reactions:new Yp,rejection:!1,state:0,value:void 0})}).prototype=Lp(ov,"then",(function(e,t){var n=tv(this),r=uv(Hp(this,iv));return n.parent=!0,r.ok=!Bp(e)||e,r.fail=Bp(t)&&t,r.domain=Op?lv.domain:void 0,0==n.state?n.reactions.add(r):Wp((function(){pv(r,n)})),r.promise})),Ip=function(){var e=new Ap,t=tv(e);this.promise=e,this.resolve=bv(kv,t),this.reject=bv(wv,t)},Qp.f=uv=function(e){return e===iv||undefined===e?new Ip(e):cv(e)}),Rp({global:!0,constructor:!0,wrap:!0,forced:$p},{Promise:iv}),Np(iv,Zp,!1,!0),Fp(Zp);var Ev=dt("iterator"),Tv=!1;try{var Sv=0,Cv={next:function(){return{done:!!Sv++}},return:function(){Tv=!0}};Cv[Ev]=function(){return this},Array.from(Cv,(function(){throw 2}))}catch($U){}var xv=function(e,t){if(!t&&!Tv)return!1;var n=!1;try{var r={};r[Ev]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch($U){}return n},Pv=lp,Av=Tp.CONSTRUCTOR||!xv((function(e){Pv.all(e).then(void 0,(function(){}))})),Iv=O,Rv=Re,Ov=Sp,Mv=sp,Dv=gd;An({target:"Promise",stat:!0,forced:Av},{all:function(e){var t=this,n=Ov.f(t),r=n.resolve,i=n.reject,o=Mv((function(){var n=Rv(t.resolve),o=[],a=0,s=1;Dv(e,(function(e){var l=a++,u=!1;s++,Iv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Lv=An,Nv=Tp.CONSTRUCTOR;lp&&lp.prototype,Lv({target:"Promise",proto:!0,forced:Nv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Fv=O,Uv=Re,Bv=Sp,Vv=sp,jv=gd;An({target:"Promise",stat:!0,forced:Av},{race:function(e){var t=this,n=Bv.f(t),r=n.reject,i=Vv((function(){var i=Uv(t.resolve);jv(e,(function(e){Fv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Hv=O,zv=Sp;An({target:"Promise",stat:!0,forced:Tp.CONSTRUCTOR},{reject:function(e){var t=zv.f(this);return Hv(t.reject,void 0,e),t.promise}});var Wv=nn,Gv=ee,Kv=Sp,Yv=function(e,t){if(Wv(e),Gv(t)&&t.constructor===e)return t;var n=Kv.f(e);return(0,n.resolve)(t),n.promise},Xv=An,qv=lp,Jv=Tp.CONSTRUCTOR,Qv=Yv,Zv=ae("Promise"),$v=!Jv;Xv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Qv($v&&this===Zv?qv:this,e)}});var eg=O,tg=Re,ng=Sp,rg=sp,ig=gd;An({target:"Promise",stat:!0,forced:Av},{allSettled:function(e){var t=this,n=ng.f(t),r=n.resolve,i=n.reject,o=rg((function(){var n=tg(t.resolve),i=[],o=0,a=1;ig(e,(function(e){var s=o++,l=!1;a++,eg(n,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var og=O,ag=Re,sg=ae,lg=Sp,ug=sp,cg=gd,hg="No one promise resolved";An({target:"Promise",stat:!0,forced:Av},{any:function(e){var t=this,n=sg("AggregateError"),r=lg.f(t),i=r.resolve,o=r.reject,a=ug((function(){var r=ag(t.resolve),a=[],s=0,l=1,u=!1;cg(e,(function(e){var c=s++,h=!1;l++,og(r,t,e).then((function(e){h||u||(u=!0,i(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,hg)))}))})),--l||o(new n(a,hg))}));return a.error&&o(a.value),r.promise}});var dg=An,fg=lp,pg=o,vg=ae,gg=x,yg=nf,mg=Yv,_g=fg&&fg.prototype;dg({target:"Promise",proto:!0,real:!0,forced:!!fg&&pg((function(){_g.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=yg(this,vg("Promise")),n=gg(e);return this.then(n?function(n){return mg(t,e()).then((function(){return n}))}:e,n?function(n){return mg(t,e()).then((function(){throw n}))}:e)}});var bg=te.Promise,wg=Sp,kg=sp;An({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=wg.f(this),n=kg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Eg=bg,Tg=n(Eg),Sg=An,Cg=Rn,xg=g([].reverse),Pg=[1,2];Sg({target:"Array",proto:!0,forced:String(Pg)===String(Pg.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}});var Ag=Hc("Array").reverse,Ig=se,Rg=Ag,Og=Array.prototype,Mg=n((function(e){var t=e.reverse;return e===Og||Ig(Og,e)&&t===Og.reverse?Rg:t})),Dg=An,Lg=Rn,Ng=_r,Fg=ee,Ug=Zr,Bg=Vn,Vg=Q,jg=Kn,Hg=dt,zg=Ts,Wg=Ir("slice"),Gg=Hg("species"),Kg=Array,Yg=Math.max;Dg({target:"Array",proto:!0,forced:!Wg},{slice:function(e,t){var n,r,i,o=Vg(this),a=Bg(o),s=Ug(e,a),l=Ug(void 0===t?a:t,a);if(Lg(o)&&(n=o.constructor,(Ng(n)&&(n===Kg||Lg(n.prototype))||Fg(n)&&null===(n=n[Gg]))&&(n=void 0),n===Kg||void 0===n))return zg(o,s,l);for(r=new(void 0===n?Kg:n)(Yg(l-s,0)),i=0;s<l;s++,i++)s in o&&jg(r,i,o[s]);return r.length=i,r}});var Xg=Hc("Array").slice,qg=se,Jg=Xg,Qg=Array.prototype,Zg=function(e){var t=e.slice;return e===Qg||qg(Qg,e)&&t===Qg.slice?Jg:t},$g=n(Zg);function ey(){ey=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Ac||function(e,t,n){e[t]=n.value},i="function"==typeof nc?nc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Rc(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var h={};function d(){}function f(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Nc&&Nc(Nc(S([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=d.prototype=Rc(v);function m(e){var t;Jc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(r,o,a,s){var l=c(e[r],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==wc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),ch(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],Jc(e).call(e,k,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return dh?dh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Rc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,o){void 0===o&&(o=Tg);var a=new _(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)ch(n).call(n,r);return Mg(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,T.prototype={constructor:T,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Jc(t=this.tryEntries).call(t,E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+$g(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function ty(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch($U){return void n($U)}s.done?t(l):Tg.resolve(l).then(r,i)}function ny(e){return function(){var t=this,n=arguments;return new Tg((function(r,i){var o=e.apply(t,n);function a(e){ty(o,r,i,a,s,"next",e)}function s(e){ty(o,r,i,a,s,"throw",e)}a(void 0)}))}}An({target:"Array",stat:!0},{isArray:Rn});var ry=n(te.Array.isArray);function iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var oy=Gh,ay=n(oy),sy=nn,ly=nd,uy=Jt,cy=O,hy=qe,dy=function(e,t,n,r){try{return r?t(sy(n)[0],n[1]):t(n)}catch($U){ly(e,"throw",$U)}},fy=Bh,py=_r,vy=Vn,gy=Kn,yy=Zh,my=Gh,_y=Array,by=function(e){var t=hy(e),n=py(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=uy(i,r>2?arguments[2]:void 0));var a,s,l,u,c,h,d=my(t),f=0;if(!d||this===_y&&fy(d))for(a=vy(t),s=n?new this(a):_y(a);a>f;f++)h=o?i(t[f],f):t[f],gy(s,f,h);else for(c=(u=yy(t,d)).next,s=n?new this:[];!(l=cy(c,u)).done;f++)h=o?dy(u,i,[l.value,f],!0):l.value,gy(s,f,h);return s.length=f,s};An({target:"Array",stat:!0,forced:!xv((function(e){Array.from(e)}))},{from:by});var wy=te.Array.from,ky=n(wy);function Ey(e,t){var n;if(e){if("string"==typeof e)return iy(e,t);var r=$g(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?ky(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iy(e,t):void 0}}function Ty(e){return function(e){if(ry(e))return iy(e)}(e)||function(e){if(void 0!==nc&&null!=ay(e)||null!=e["@@iterator"])return ky(e)}(e)||Ey(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Cy=ao.f("toPrimitive"),xy=n(Cy);function Py(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[xy];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}function Ay(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ac(e,Py(r.key),r)}}function Iy(e,t,n){return t&&Ay(e.prototype,t),n&&Ay(e,n),Ac(e,"prototype",{writable:!1}),e}function Ry(e,t,n){return(t=Py(t))in e?Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oy=te.Object.getOwnPropertySymbols,My=n(Oy),Dy=An,Ly=ri.indexOf,Ny=Uc,Fy=E([].indexOf),Uy=!!Fy&&1/Fy([1],1,-0)<0;Dy({target:"Array",proto:!0,forced:Uy||!Ny("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Uy?Fy(this,e,t)||0:Ly(this,e,t)}});var By=Hc("Array").indexOf,Vy=se,jy=By,Hy=Array.prototype,zy=function(e){var t=e.indexOf;return e===Hy||Vy(Hy,e)&&t===Hy.indexOf?jy:t},Wy=n(zy),Gy=qe,Ky=pi;An({target:"Object",stat:!0,forced:o((function(){Ky(1)}))},{keys:function(e){return Ky(Gy(e))}});var Yy=te.Object.keys,Xy=n(Yy);function qy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Xy(e);for(r=0;r<o.length;r++)n=o[r],Wy(t).call(t,n)>=0||(i[n]=e[n]);return i}(e,t);if(My){var o=My(e);for(r=0;r<o.length;r++)n=o[r],Wy(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Jy=ea.filter;An({target:"Array",proto:!0,forced:!Ir("filter")},{filter:function(e){return Jy(this,e,arguments.length>1?arguments[1]:void 0)}});var Qy=Hc("Array").filter,Zy=se,$y=Qy,em=Array.prototype,tm=function(e){var t=e.filter;return e===em||Zy(em,e)&&t===em.filter?$y:t},nm=n(tm),rm={exports:{}},im=An,om=o,am=Q,sm=P.f,lm=A;im({target:"Object",stat:!0,forced:!lm||om((function(){sm(1)})),sham:!lm},{getOwnPropertyDescriptor:function(e,t){return sm(am(e),t)}});var um=te.Object,cm=rm.exports=function(e,t){return um.getOwnPropertyDescriptor(e,t)};um.getOwnPropertyDescriptor.sham&&(cm.sham=!0);var hm=rm.exports,dm=n(hm),fm=mh,pm=Q,vm=P,gm=Kn;An({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(e){for(var t,n,r=pm(e),i=vm.f,o=fm(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&gm(a,t,n);return a}});var ym=te.Object.getOwnPropertyDescriptors,mm=n(ym),_m={exports:{}},bm=An,wm=A,km=Xr.f;bm({target:"Object",stat:!0,forced:Object.defineProperties!==km,sham:!wm},{defineProperties:km});var Em=te.Object,Tm=_m.exports=function(e,t){return Em.defineProperties(e,t)};Em.defineProperties.sham&&(Tm.sham=!0);var Sm=_m.exports,Cm=n(Sm);function xm(e,t){var n=Xy(e);if(My){var r=My(e);t&&(r=nm(r).call(r,(function(t){return dm(e,t).enumerable}))),ch(n).apply(n,r)}return n}function Pm(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Jc(n=xm(Object(i),!0)).call(n,(function(t){Ry(e,t,i[t])})):mm?Cm(e,mm(i)):Jc(r=xm(Object(i))).call(r,(function(t){Ac(e,t,dm(i,t))}))}return e}var Am=Hc("Array").concat,Im=se,Rm=Am,Om=Array.prototype,Mm=n((function(e){var t=e.concat;return e===Om||Im(Om,e)&&t===Om.concat?Rm:t})),Dm=An,Lm=ea.find,Nm="find",Fm=!0;Nm in[]&&Array(1)[Nm]((function(){Fm=!1})),Dm({target:"Array",proto:!0,forced:Fm},{find:function(e){return Lm(this,e,arguments.length>1?arguments[1]:void 0)}});var Um=Hc("Array").find,Bm=se,Vm=Um,jm=Array.prototype,Hm=n((function(e){var t=e.find;return e===jm||Bm(jm,e)&&t===jm.find?Vm:t})),zm={exports:{}},Wm=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Gm=o,Km=ee,Ym=b,Xm=Wm,qm=Object.isExtensible,Jm=Gm((function(){qm(1)}))||Xm?function(e){return!!Km(e)&&((!Xm||"ArrayBuffer"!=Ym(e))&&(!qm||qm(e)))}:qm,Qm=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Zm=An,$m=g,e_=ii,t_=ee,n_=Ze,r_=Qt.f,i_=Vi,o_=zi,a_=Jm,s_=Qm,l_=!1,u_=rt("meta"),c_=0,h_=function(e){r_(e,u_,{value:{objectID:"O"+c_++,weakData:{}}})},d_=zm.exports={enable:function(){d_.enable=function(){},l_=!0;var e=i_.f,t=$m([].splice),n={};n[u_]=1,e(n).length&&(i_.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===u_){t(r,i,1);break}return r},Zm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:o_.f}))},fastKey:function(e,t){if(!t_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n_(e,u_)){if(!a_(e))return"F";if(!t)return"E";h_(e)}return e[u_].objectID},getWeakData:function(e,t){if(!n_(e,u_)){if(!a_(e))return!0;if(!t)return!1;h_(e)}return e[u_].weakData},onFreeze:function(e){return s_&&l_&&a_(e)&&!n_(e,u_)&&h_(e),e}};e_[u_]=!0;var f_=zm.exports,p_=An,v_=i,g_=f_,y_=o,m_=yn,__=gd,b_=Yd,w_=x,k_=ee,E_=Io,T_=Qt.f,S_=ea.forEach,C_=A,x_=Ko.set,P_=Ko.getterFor,A_=ro,I_=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:A_(e,r,t[r],n);return e},R_=Bi,O_=oo,M_=I_,D_=Jt,L_=Yd,N_=G,F_=gd,U_=pu,B_=vu,V_=Wd,j_=A,H_=f_.fastKey,z_=Ko.set,W_=Ko.getterFor,G_={getConstructor:function(e,t,n,r){var i=e((function(e,i){L_(e,o),z_(e,{type:t,index:R_(null),first:void 0,last:void 0,size:0}),j_||(e.size=0),N_(i)||F_(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=W_(t),s=function(e,t,n){var r,i,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:i=H_(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),j_?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var n,r=a(e),i=H_(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return M_(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,j_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=l(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),j_?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=D_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),M_(o,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),j_&&O_(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=W_(t),o=W_(r);U_(e,t,(function(e,t){z_(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?B_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,B_(void 0,!0))}),n?"entries":"values",!n,!0),V_(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=v_[e],l=s&&s.prototype,u={};if(C_&&w_(s)&&(o||l.forEach&&!y_((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){x_(b_(t,c),{type:e,collection:new s}),null!=n&&__(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=P_(e);S_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||m_(c,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!k_(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||T_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),g_.enable();E_(r,e,!1,!0),u[e]=r,p_({global:!0,forced:!0},u),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),G_);var K_=te.Map,Y_=Jt,X_=O,q_=Re,J_=Qd,Q_=G,Z_=gd,$_=[].push,eb=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return J_(this),(t=void 0!==a)&&q_(a),Q_(e)?new this:(n=[],t?(r=0,i=Y_(a,o>2?arguments[2]:void 0),Z_(e,(function(e){X_($_,n,i(e,r++))}))):Z_(e,$_,{that:n}),new this(n))};An({target:"Map",stat:!0,forced:!0},{from:eb});var tb=Ts,nb=function(){return new this(tb(arguments))};An({target:"Map",stat:!0,forced:!0},{of:nb});var rb=xe,ib=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(rb(e)+" is not a map")},ob=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},ab=ae("Map"),sb={Map:ab,set:ob("set",2),get:ob("get",1),has:ob("has",1),remove:ob("delete",1),proto:ab.prototype},lb=ib,ub=sb.remove;An({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=lb(this),n=!0,r=0,i=arguments.length;r<i;r++)e=ub(t,arguments[r]),n=n&&e;return!!n}});var cb=ib,hb=sb.get,db=sb.has,fb=sb.set;An({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=cb(this);return db(i,e)?(n=hb(i,e),"update"in t&&(n=t.update(n,e,i),fb(i,e,n)),n):(r=t.insert(e,i),fb(i,e,r),r)}});var pb=O,vb=function(e,t,n){for(var r,i,o=n||e.next;!(r=pb(o,e)).done;)if(void 0!==(i=t(r.value)))return i},gb=function(e,t,n){return n?vb(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},yb=Jt,mb=ib,_b=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=mb(this),n=yb(e,arguments.length>1?arguments[1]:void 0);return!1!==_b(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var bb=Jt,wb=ib,kb=gb,Eb=sb.Map,Tb=sb.set;An({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=wb(this),n=bb(e,arguments.length>1?arguments[1]:void 0),r=new Eb;return kb(t,(function(e,i){n(e,i,t)&&Tb(r,i,e)})),r}});var Sb=Jt,Cb=ib,xb=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Cb(this),n=Sb(e,arguments.length>1?arguments[1]:void 0),r=xb(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var Pb=Jt,Ab=ib,Ib=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Ab(this),n=Pb(e,arguments.length>1?arguments[1]:void 0),r=Ib(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var Rb=An,Ob=O,Mb=x,Db=Re,Lb=gd,Nb=sb.Map,Fb=g([].push);Rb({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Mb(this)?this:Nb);Db(t);var r=Db(n.has),i=Db(n.get),o=Db(n.set);return Lb(e,(function(e){var a=t(e);Ob(r,n,a)?Fb(Ob(i,n,a),e):Ob(o,n,a,[e])})),n}});var Ub=function(e,t){return e===t||e!=e&&t!=t},Bb=ib,Vb=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Vb(Bb(this),(function(t){if(Ub(t,e))return!0}),!0)}});var jb=O,Hb=gd,zb=x,Wb=Re,Gb=sb.Map;An({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(zb(this)?this:Gb);Wb(t);var r=Wb(n.set);return Hb(e,(function(e){jb(r,n,t(e),e)})),n}});var Kb=ib,Yb=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Yb(Kb(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Xb=Jt,qb=ib,Jb=gb,Qb=sb.Map,Zb=sb.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=qb(this),n=Xb(e,arguments.length>1?arguments[1]:void 0),r=new Qb;return Jb(t,(function(e,i){Zb(r,n(e,i,t),e)})),r}});var $b=Jt,ew=ib,tw=gb,nw=sb.Map,rw=sb.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=ew(this),n=$b(e,arguments.length>1?arguments[1]:void 0),r=new nw;return tw(t,(function(e,i){rw(r,i,n(e,i,t))})),r}});var iw=ib,ow=gd,aw=sb.set;An({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=iw(this),n=arguments.length,r=0;r<n;)ow(arguments[r++],(function(e,n){aw(t,e,n)}),{AS_ENTRIES:!0});return t}});var sw=Re,lw=ib,uw=gb,cw=TypeError;An({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=lw(this),n=arguments.length<2,r=n?void 0:arguments[1];if(sw(e),uw(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw cw("Reduce of empty map with no initial value");return r}});var hw=Jt,dw=ib,fw=gb;An({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=dw(this),n=hw(e,arguments.length>1?arguments[1]:void 0);return!0===fw(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var pw=Re,vw=ib,gw=TypeError,yw=sb.get,mw=sb.has,_w=sb.set;An({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=vw(this),r=arguments.length;pw(t);var i=mw(n,e);if(!i&&r<3)throw gw("Updating absent value");var o=i?yw(n,e):pw(r>2?arguments[2]:void 0)(e,n);return _w(n,e,t(o,e,n)),n}});var bw=O,ww=Re,kw=x,Ew=nn,Tw=TypeError,Sw=function(e,t){var n,r=Ew(this),i=ww(r.get),o=ww(r.has),a=ww(r.set),s=arguments.length>2?arguments[2]:void 0;if(!kw(t)&&!kw(s))throw Tw("At least one callback required");return bw(o,r,e)?(n=bw(i,r,e),kw(t)&&(n=t(n),bw(a,r,e,n))):kw(s)&&(n=s(),bw(a,r,e,n)),n};An({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Sw}),An({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Sw});var Cw=K_,xw=n(Cw),Pw=n(Cw),Aw=ea.map;An({target:"Array",proto:!0,forced:!Ir("map")},{map:function(e){return Aw(this,e,arguments.length>1?arguments[1]:void 0)}});var Iw=Hc("Array").map,Rw=se,Ow=Iw,Mw=Array.prototype,Dw=n((function(e){var t=e.map;return e===Mw||Rw(Mw,e)&&t===Mw.map?Ow:t})),Lw=n(Eg),Nw=n(tm),Fw=ri.includes;An({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Fw(this,e,arguments.length>1?arguments[1]:void 0)}});var Uw=Hc("Array").includes,Bw=ee,Vw=b,jw=dt("match"),Hw=function(e){var t;return Bw(e)&&(void 0!==(t=e[jw])?!!t:"RegExp"==Vw(e))},zw=TypeError,Ww=function(e){if(Hw(e))throw zw("The method doesn't accept regular expressions");return e},Gw=dt("match"),Kw=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Gw]=!1,"/./"[e](t)}catch($U){}}return!1},Yw=An,Xw=Ww,qw=X,Jw=Yr,Qw=Kw,Zw=g("".indexOf);Yw({target:"String",proto:!0,forced:!Qw("includes")},{includes:function(e){return!!~Zw(Jw(qw(this)),Jw(Xw(e)),arguments.length>1?arguments[1]:void 0)}});var $w=Hc("String").includes,ek=se,tk=Uw,nk=$w,rk=Array.prototype,ik=String.prototype,ok=n((function(e){var t=e.includes;return e===rk||ek(rk,e)&&t===rk.includes?tk:"string"==typeof e||e===ik||ek(ik,e)&&t===ik.includes?nk:t})),ak=n(zy),sk=n(Yy),lk=n(Zg),uk=xe,ck=TypeError,hk=function(e,t){if(!delete e[t])throw ck("Cannot delete property "+uk(t)+" of "+uk(e))},dk=An,fk=qe,pk=Zr,vk=Ln,gk=Vn,yk=th,mk=Hn,_k=Cr,bk=Kn,wk=hk,kk=Ir("splice"),Ek=Math.max,Tk=Math.min;dk({target:"Array",proto:!0,forced:!kk},{splice:function(e,t){var n,r,i,o,a,s,l=fk(this),u=gk(l),c=pk(e,u),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=u-c):(n=h-2,r=Tk(Ek(vk(t),0),u-c)),mk(u+n-r),i=_k(l,r),o=0;o<r;o++)(a=c+o)in l&&bk(i,o,l[a]);if(i.length=r,n<r){for(o=c;o<u-r;o++)s=o+n,(a=o+r)in l?l[s]=l[a]:wk(l,s);for(o=u;o>u-r+n;o--)wk(l,o-1)}else if(n>r)for(o=u-r;o>c;o--)s=o+n-1,(a=o+r-1)in l?l[s]=l[a]:wk(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return yk(l,u-r+n),i}});var Sk=Hc("Array").splice,Ck=se,xk=Sk,Pk=Array.prototype,Ak=n((function(e){var t=e.splice;return e===Pk||Ck(Pk,e)&&t===Pk.splice?xk:t}));An({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Ik=n(te.Number.isNaN),Rk="\t\n\v\f\r                 \u2028\u2029\ufeff",Ok=X,Mk=Yr,Dk=Rk,Lk=g("".replace),Nk=RegExp("^["+Dk+"]+"),Fk=RegExp("(^|[^"+Dk+"])["+Dk+"]+$"),Uk=function(e){return function(t){var n=Mk(Ok(t));return 1&e&&(n=Lk(n,Nk,"")),2&e&&(n=Lk(n,Fk,"$1")),n}},Bk={start:Uk(1),end:Uk(2),trim:Uk(3)},Vk=i,jk=o,Hk=g,zk=Yr,Wk=Bk.trim,Gk=Rk,Kk=Vk.parseInt,Yk=Vk.Symbol,Xk=Yk&&Yk.iterator,qk=/^[+-]?0x/i,Jk=Hk(qk.exec),Qk=8!==Kk(Gk+"08")||22!==Kk(Gk+"0x16")||Xk&&!jk((function(){Kk(Object(Xk))}))?function(e,t){var n=Wk(zk(e));return Kk(n,t>>>0||(Jk(qk,n)?16:10))}:Kk;An({global:!0,forced:parseInt!=Qk},{parseInt:Qk});var Zk=n(te.parseInt),$k=Hc("Array").keys,eE=tr,tE=Ze,nE=se,rE=$k,iE=Array.prototype,oE={DOMTokenList:!0,NodeList:!0},aE=n((function(e){var t=e.keys;return e===iE||nE(iE,e)&&t===iE.keys||tE(oE,eE(e))?rE:t})),sE=n(Oy),lE=n(hm),uE=n(ym),cE=n(Sm),hE=n(Pc),dE=n(tc),fE=n(_c),pE=n(hh),vE=n(Lc),gE=g,yE=Re,mE=ee,_E=Ze,bE=Ts,wE=a,kE=Function,EE=gE([].concat),TE=gE([].join),SE={},CE=wE?kE.bind:function(e){var t=yE(this),n=t.prototype,r=bE(arguments,1),i=function(){var n=EE(r,bE(arguments));return this instanceof i?function(e,t,n){if(!_E(SE,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";SE[t]=kE("C,a","return new C("+TE(r,",")+")")}return SE[t](e,n)}(t,n.length,n):t.apply(e,n)};return mE(n)&&(i.prototype=n),i},xE=An,PE=h,AE=CE,IE=Qd,RE=nn,OE=ee,ME=Bi,DE=o,LE=ae("Reflect","construct"),NE=Object.prototype,FE=[].push,UE=DE((function(){function e(){}return!(LE((function(){}),[],e)instanceof e)})),BE=!DE((function(){LE((function(){}))})),VE=UE||BE;xE({target:"Reflect",stat:!0,forced:VE,sham:VE},{construct:function(e,t){IE(e),RE(t);var n=arguments.length<3?e:IE(arguments[2]);if(BE&&!UE)return LE(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return PE(FE,r,t),new(PE(AE,e,r))}var i=n.prototype,o=ME(OE(i)?i:NE),a=PE(e,o,t);return OE(a)?a:o}});var jE=te.Reflect.construct,HE=n(jE),zE=n(jE),WE=Ze,GE=O,KE=ee,YE=nn,XE=function(e){return void 0!==e&&(WE(e,"value")||WE(e,"writable"))},qE=P,JE=Sl;An({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return YE(t)===o?t[n]:(r=qE.f(t,n))?XE(r)?r.value:void 0===r.get?void 0:GE(r.get,o):KE(i=JE(t))?e(i,n,o):void 0}});var QE=te.Reflect.get,ZE=n(QE),$E=n(QE),eT=n(oy),tT=n(wy),nT=n(Cy);function rT(e,t){var n=sk(e);if(sE){var r=sE(e);t&&(r=Nw(r).call(r,(function(t){return lE(e,t).enumerable}))),n.push.apply(n,r)}return n}function iT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rT(Object(n),!0).forEach((function(t){uT(e,t,n[t])})):uE?cE(e,uE(n)):rT(Object(n)).forEach((function(t){hE(e,t,lE(n,t))}))}return e}function oT(e){return(oT="function"==typeof dE&&"symbol"==typeof fE?function(e){return typeof e}:function(e){return e&&"function"==typeof dE&&e.constructor===dE&&e!==dE.prototype?"symbol":typeof e})(e)}function aT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),hE(e,_T(r.key),r)}}function lT(e,t,n){return t&&sT(e.prototype,t),n&&sT(e,n),hE(e,"prototype",{writable:!1}),e}function uT(e,t,n){return(t=_T(t))in e?hE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cT(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),hE(e,"prototype",{writable:!1}),t&&dT(e,t)}function hT(e){return(hT=pE?vE.bind():function(e){return e.__proto__||vE(e)})(e)}function dT(e,t){return(dT=pE?pE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pT(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fT(e)}function vT(e){var t=function(){if("undefined"==typeof Reflect||!zE)return!1;if(zE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zE(Boolean,[],(function(){}))),!0}catch(sU){return!1}}();return function(){var n,r=hT(e);if(t){var i=hT(this).constructor;n=zE(r,arguments,i)}else n=r.apply(this,arguments);return pT(this,n)}}function gT(){return gT="undefined"!=typeof Reflect&&$E?$E.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hT(e)););return e}(e,t);if(r){var i=lE(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gT.apply(this,arguments)}function yT(e){return function(e){if(Array.isArray(e))return mT(e)}(e)||function(e){if(void 0!==dE&&null!=eT(e)||null!=e["@@iterator"])return tT(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return mT(e,t);var r=lk(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return tT(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _T(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[nT];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var bT=A,wT=g,kT=O,ET=o,TT=pi,ST=to,CT=M,xT=qe,PT=W,AT=Object.assign,IT=Object.defineProperty,RT=wT([].concat),OT=!AT||ET((function(){if(bT&&1!==AT({b:1},AT(IT({},"a",{enumerable:!0,get:function(){IT(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=AT({},e)[n]||TT(AT({},t)).join("")!=r}))?function(e,t){for(var n=xT(e),r=arguments.length,i=1,o=ST.f,a=CT.f;r>i;)for(var s,l=PT(arguments[i++]),u=o?RT(TT(l),o(l)):TT(l),c=u.length,h=0;c>h;)s=u[h++],bT&&!kT(a,l,s)||(n[s]=l[s]);return n}:AT,MT=OT;An({target:"Object",stat:!0,arity:2,forced:Object.assign!==MT},{assign:MT});var DT=n(te.Object.assign),LT={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?lk(r).call(r,1):r);return sE?Mm(i).call(i,sE(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(LT);var NT=n(LT.exports),FT=Ln,UT=Yr,BT=X,VT=RangeError,jT=g,HT=Un,zT=Yr,WT=X,GT=jT((function(e){var t=UT(BT(this)),n="",r=FT(e);if(r<0||r==1/0)throw VT("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n})),KT=jT("".slice),YT=Math.ceil,XT=function(e){return function(t,n,r){var i,o,a=zT(WT(t)),s=HT(n),l=a.length,u=void 0===r?" ":zT(r);return s<=l||""==u?a:((o=GT(u,YT((i=s-l)/u.length))).length>i&&(o=KT(o,0,i)),e?a+o:o+a)}},qT={start:XT(!1),end:XT(!0)},JT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),QT=qT.start;An({target:"String",proto:!0,forced:JT},{padStart:function(e){return QT(this,e,arguments.length>1?arguments[1]:void 0)}});var ZT=Hc("String").padStart,$T=se,eS=ZT,tS=String.prototype,nS=n((function(e){var t=e.padStart;return"string"==typeof e||e===tS||$T(tS,e)&&t===tS.padStart?eS:t})),rS=i,iS=o,oS=Yr,aS=Bk.trim,sS=Rk,lS=g("".charAt),uS=rS.parseFloat,cS=rS.Symbol,hS=cS&&cS.iterator,dS=1/uS(sS+"-0")!=-1/0||hS&&!iS((function(){uS(Object(hS))}))?function(e){var t=aS(oS(e)),n=uS(t);return 0===n&&"-"==lS(t,0)?-0:n}:uS;An({global:!0,forced:parseFloat!=dS},{parseFloat:dS});var fS=n(te.parseFloat),pS=gl.PROPER,vS=o,gS=Rk,yS=Bk.trim;An({target:"String",proto:!0,forced:function(e){return vS((function(){return!!gS[e]()||"​…᠎"!=="​…᠎"[e]()||pS&&gS[e].name!==e}))}("trim")},{trim:function(){return yS(this)}});var mS=Hc("String").trim,_S=se,bS=mS,wS=String.prototype,kS=n((function(e){var t=e.trim;return"string"==typeof e||e===wS||_S(wS,e)&&t===wS.trim?bS:t})),ES=qi,TS=Math.floor,SS=function(e,t){var n=e.length,r=TS(n/2);return n<8?CS(e,t):xS(e,SS(ES(e,0,r),t),SS(ES(e,r),t),t)},CS=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},xS=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},PS=SS,AS=le.match(/firefox\/(\d+)/i),IS=!!AS&&+AS[1],RS=/MSIE|Trident/.test(le),OS=le.match(/AppleWebKit\/(\d+)\./),MS=!!OS&&+OS[1],DS=An,LS=g,NS=Re,FS=qe,US=Vn,BS=hk,VS=Yr,jS=o,HS=PS,zS=Uc,WS=IS,GS=RS,KS=ve,YS=MS,XS=[],qS=LS(XS.sort),JS=LS(XS.push),QS=jS((function(){XS.sort(void 0)})),ZS=jS((function(){XS.sort(null)})),$S=zS("sort"),eC=!jS((function(){if(KS)return KS<70;if(!(WS&&WS>3)){if(GS)return!0;if(YS)return YS<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)XS.push({k:t+r,v:n})}for(XS.sort((function(e,t){return t.v-e.v})),r=0;r<XS.length;r++)t=XS[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));DS({target:"Array",proto:!0,forced:QS||!ZS||!$S||!eC},{sort:function(e){void 0!==e&&NS(e);var t=FS(this);if(eC)return void 0===e?qS(t):qS(t,e);var n,r,i=[],o=US(t);for(r=0;r<o;r++)r in t&&JS(i,t[r]);for(HS(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:VS(t)>VS(n)?1:-1}}(e)),n=US(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)BS(t,r++);return t}});var tC,nC=Hc("Array").sort,rC=se,iC=nC,oC=Array.prototype,aC=n((function(e){var t=e.sort;return e===oC||rC(oC,e)&&t===oC.sort?iC:t})),sC="undefined"!=typeof window&&window.location&&ak(tC=window.location.href).call(tC,"xgplayerdebugger=1")>-1,lC="color: #525252; background-color: #90ee90;",uC="color: #525252; background-color: red;",cC="color: #525252; background-color: yellow; ",hC="%c[xgplayer]",dC={config:{debug:sC?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Mm(t=[hC,lC,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Mm(t=[hC,cC,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,Mm(t=[hC,uC,e]).call(t,o))}}};var fC=function(){function e(t){aT(this,e),this.bufferedList=t}return lT(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),pC={};function vC(e){var t=oT(e);return null!==e&&("object"===t||"function"===t)}function gC(e,t,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0,f=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function v(e,t){return f?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,r=t-(e-l);return h?Math.min(r,o-n):r}(e))}function m(e){return s=void 0,d&&r?p(e):(r=i=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,d=new Array(o),f=0;f<o;f++)d[f]=arguments[f];if(r=d,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,vC(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,d="trailing"in n?!!n.trailing:d),_.cancel=function(){void 0!==s&&function(e){if(f)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,r=l=i=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function yC(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}pC.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,sk(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},pC.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var i=r.children;return r=null,i.length>0?(i=i[0],n&&pC.addClass(i,n),t&&sk(t).forEach((function(e){i.setAttribute(e,t[e])})),i):null}catch(o){return dC.logError("util.createDomFromHtml",o),null}},pC.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(sU){var n=e.className&&"object"===oT(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},pC.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)}))}catch(sU){pC.hasClass(e,t)||(e.className&&"object"===oT(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},pC.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.remove(t)}))}catch(sU){pC.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===oT(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},pC.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){pC.hasClass(e,t)?pC.removeClass(e,t):pC.addClass(e,t)}))},pC.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===pC.typeOf(e[n]))t.push(e[n]);else if("Object"===pC.typeOf(e[n])){var r;Dw(r=sk(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},pC.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(sU){dC.logError("util.findDom",sU),0===ak(n).call(n,"#")&&(e=t.getElementById(lk(n).call(n,1)))}return e},pC.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},pC.padStart=function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},pC.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=nS(pC).call(pC,Math.floor(e/3600),2,0),n=nS(pC).call(pC,Math.floor((e-3600*t)/60),2,0),r=nS(pC).call(pC,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},pC.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},pC.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},pC.deepCopy=function(e,t){if("Object"===pC.typeOf(t)&&"Object"===pC.typeOf(e))return sk(t).forEach((function(n){if("Object"!==pC.typeOf(t[n])||t[n]instanceof Node)if("Array"===pC.typeOf(t[n])){var r;e[n]="Array"===pC.typeOf(e[n])?Mm(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:pC.deepCopy(e[n],t[n])})),e},pC.deepMerge=function(e,t){var n;return Dw(n=sk(t)).call(n,(function(n){var r;"Array"===pC.typeOf(t[n])&&"Array"===pC.typeOf(e[n])?"Array"===pC.typeOf(e[n])&&(r=e[n]).push.apply(r,yT(t[n])):pC.typeOf(e[n])!==pC.typeOf(t[n])||null===e[n]||"Object"!==pC.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):pC.deepMerge(e[n],t[n])})),e},pC.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},pC.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},pC.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),r))},pC.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},pC.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=setTimeout((function(){t(),pC.clearTimeout(e,r)}),n);return e._timers.push(r),r},pC.clearTimeout=function(e,t){var n=e._timers;if("Array"===pC.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){Ak(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},pC.clearAllTimers=function(e){var t=e._timers;"Array"===pC.typeOf(t)&&(Dw(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},pC.createImgBtn=function(e,t,n,r){var i,o,a,s,l,u,c,h,d,f,p,v=pC.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,i;return!(ak(n).call(n,e)>-1&&ak(r).call(r,e)>-1)||(u=fS(kS(t=lk(n).call(n,0,ak(n).call(n,e))).call(t)),c=fS(kS(i=lk(r).call(r,0,ak(r).call(r,e))).call(i)),h=e,!1)})),v.style.width=Mm(i="".concat(u)).call(i,h),v.style.height=Mm(o="".concat(c)).call(o,h),v.style.backgroundSize=Mm(a=Mm(s=Mm(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Mm(d=Mm(f=Mm(p="-".concat(c/2)).call(p,h," auto auto -")).call(f,u/2)).call(d,h):"auto 5px auto 5px");return v},pC.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Zk(e,16))})),Mm(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},pC.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},pC.checkIsFunction=function(e){return e&&"function"==typeof e},pC.checkIsObject=function(e){return null!==e&&"object"===oT(e)},pC.hide=function(e){e.style.display="none"},pC.show=function(e,t){e.style.display=t||"block"},pC.isUndefined=function(e){if(null==e)return!0},pC.isNotNull=function(e){return!(null==e)},pC.setStyleFromCsstext=function(e,t){if(t)if("String"===pC.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Dw(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;Dw(r=sk(t)).call(r,(function(n){e.style[n]=t[n]}))}},pC.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return Dw(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(ak(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Dw(t=sk(a)).call(t,(function(t){e.style[t]=a[t]})),o},pC.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return Dw(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},pC.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},pC.stopPropagation=function(e){e&&e.stopPropagation()},pC.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},pC.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},pC.checkTouchSupport=function(){return"ontouchstart"in window},pC.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});aC(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<t?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new fC(i)},pC.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},pC.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},pC.getHostFromUrl=function(e){if("String"!==pC.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},pC.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},pC.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},pC.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Zk(e)}catch(sU){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Zk(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},pC.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},pC.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},pC.createPositionBar=function(e,t){var n=pC.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},pC.getTransformStyle=function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0};return Mm(e=Mm(t=Mm(n="scale(".concat(r.scale||1,") translate(")).call(n,r.x||0,"%, ")).call(t,r.y||0,"%) rotate(")).call(e,r.rotate||0,"deg)")},pC.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360};var mC=/(Android)\s([\d.]+)/,_C=/(Version)\/([\d.]+)/,bC=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],wC={get device(){return wC.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Mm(e=[]).call(e,Nw(t=sk(r)).call(t,(function(e){return r[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o,s=!(a||r||n||o),l=/(?:iPad|PlayBook)/.test(e);return{isTablet:o,isPhone:a,isIpad:l,isIos:a||l,isAndroid:r,isPc:s,isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?_C:mC)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Zk(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&Dw(bC).call(bC,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch($U){return this._logger.error(e,$U),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Lw.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Lw.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(sU){return Lw.resolve(t)}}},kC="3.0.7",EC={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},TC={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},SC=lT((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};aT(this,e);var r=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,d=h.readyState,f=h.networkState,p=n.errorCode||o.code;TC[p]&&(p=TC[p]);var v={playerVersion:kC,currentTime:s,duration:a,ended:l,readyState:d,networkState:f,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:pC.getHostFromUrl(u||c)};return n.ext&&Dw(i=sk(n.ext)).call(i,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:kC,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[y[m]]=arguments[m];return g.ex=r?(r[arguments[0]]||{}).msg:"",g}})),CC="play",xC="ended",PC="pause",AC="error",IC="seeked",RC="timeupdate",OC="waiting",MC="canplay",DC="durationchange",LC="volumechange",NC="loadeddata",FC="emptied",UC="focus",BC="blur",VC="ready",jC="urlNull",HC="autoplay_started",zC="autoplay_was_prevented",WC="complete",GC="replay",KC="destroy",YC="urlchange",XC="download_speed_change",qC="fullscreen_change",JC="cssFullscreen_change",QC="mini_state_change",ZC="definition_change",$C="before_definition_change",ex="after_definition_change",tx="retry",nx="video_resize",rx="pip_change",ix="playnext",ox="shortcut",ax="user_action",sx="reset",lx="source_error",ux="source_success",cx=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],hx=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:ex,AUTOPLAY_PREVENTED:zC,AUTOPLAY_STARTED:HC,BEFORE_DEFINITION_CHANGE:$C,BUFFER_CHANGE:"bufferedChange",CANPLAY:MC,CANPLAY_THROUGH:"canplaythrough",COMPLETE:WC,CSS_FULLSCREEN_CHANGE:JC,DEFINITION_CHANGE:ZC,DESTROY:KC,DOWNLOAD_SPEED_CHANGE:XC,DURATION_CHANGE:DC,EMPTIED:FC,ENDED:xC,ERROR:AC,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:qC,LOADED_DATA:NC,LOAD_START:"loadstart",MINI_STATE_CHANGE:QC,PAUSE:PC,PIP_CHANGE:rx,PLAY:CC,PLAYER_BLUR:BC,PLAYER_FOCUS:UC,PLAYING:"playing",PLAYNEXT:ix,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:VC,REPLAY:GC,RESET:sx,RETRY:tx,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:IC,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:ox,SOURCE_ERROR:lx,SOURCE_SUCCESS:ux,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:RC,URL_CHANGE:YC,URL_NULL:jC,USER_ACTION:ax,VIDEO_EVENTS:cx,VIDEO_RESIZE:nx,VOLUME_CHANGE:LC,WAITING:OC,XGLOG:"xglog"});function dx(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var fx=function(e){cT(n,e);var t=vT(n);function n(e){var r;aT(this,n),(r=t.call(this,e))._hasStart=!1,r._currentTime=0,r._duration=0,r._internalOp={},r._lastMuted=!1,r.vtype="MP4",r._rate=-1,r.mediaConfig=DT({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var i=e["x5-video-player-type"]||e.x5VideoPlayerType;return wC.isWeixin&&wC.os.isAndroid&&i&&(r.mediaConfig["x5-video-player-type"]=i,delete r.mediaConfig.playsinline,delete r.mediaConfig["webkit-playsinline"],delete r.mediaConfig["x5-playsinline"]),e.loop&&(r.mediaConfig.loop="loop"),r.media=pC.createDom(r.mediaConfig.mediaType,"",r.mediaConfig,""),e.defaultPlaybackRate&&(r.media.defaultPlaybackRate=r.media.playbackRate=e.defaultPlaybackRate),"Number"===pC.typeOf(e.volume)&&(r.volume=e.volume),e.autoplayMuted&&(r.media.muted=!0,r._lastMuted=!0),e.autoplay&&(r.media.autoplay=!0),r._interval={},r.mediaEventMiddleware={},r.attachVideoEvents(),r}return lT(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Dw(t=sk(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Dw(t=sk(e)).call(t,(function(e){delete n.mediaEventMiddleware[e]}))}},{key:"attachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=Dw(cx).call(cx,(function(t){var n,r=Mm(n="on".concat(t.charAt(0).toUpperCase())).call(n,lk(t).call(t,1));return"function"==typeof e[r]&&e.on(t,e[r]),uT({},t,function(e,t){return function(n,r){var i={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:pC.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var o=t.media?t.media.playbackRate:0;if(o&&t._rate===o)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(i.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(i.error=r||t.video.error),t.mediaEventMiddleware[e]){var a=dx.bind(t,e,i);try{t.mediaEventMiddleware[e].call(t,i,a)}catch(s){throw dx.call(t,e,i),s}}else dx.call(t,e,i)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=sk(e)[0];t.addEventListener(n,e[n],!1)}))}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach((function(e){var n=sk(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,r=sk(t)[0],i=Mm(n="on".concat(r.charAt(0).toUpperCase())).call(n,lk(r).call(r,1));"function"==typeof e[i]&&e.off(r,e[i])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e){n.media.appendChild(pC.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||"")}))}));var r=e.children;if(r){this._videoSourceCount=r.length,this._vLoadeddata=function(e){n.emit(ux,{src:e.target.currentSrc,host:pC.getHostFromUrl(e.target.currentSrc)})};for(var i=null,o=0;o<this._evHandlers.length;o++)if("error"===sk(this._evHandlers[o])[0]){i=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){if(n._videoSourceCount--,0===n._videoSourceCount){var t={code:4,message:"sources_load_error"};i?i.error(e,t):n.errorHandler("error",t)}var r=EC[4];n.emit(lx,new SC(n,{errorType:r,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<r.length;a++)r[a].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var t=e.children;if(t&&0!==t.length&&this._sourceError){for(var n=0;n<t.length;n++)t[n].removeEventListener("error",this._sourceError);for(;t.length>0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var n=this.media.error||t,r=n.code?EC[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new SC(this,{errorType:r,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var n=this.media.currentTime;if(e)for(var r=0,i=e.length;r<i&&(t[0]=e.start(r),t[1]=e.end(r),!(t[0]<=n&&n<=t[1]));r++);return t[0]-n<=0&&n-t[1]<=0?t:[0,0]}},{key:"autoplay",get:function(){return!!this.media&&this.media.autoplay},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?pC.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var t=this.media.buffered;if(!t||0===t.length)return e;for(var n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){if(!this.media.error)return"";return["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(YC,e),this.emit(OC),this._currentTime=0,this._duration=0,/^blob/.test(this.media.currentSrc)||/^blob/.test(this.media.src)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===pC.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=gT(hT(n.prototype),"emit",this)).call.apply(i,Mm(r=[this,e,t]).call(r,a))}},{key:"on",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=gT(hT(n.prototype),"on",this)).call.apply(i,Mm(r=[this,e,t]).call(r,a))}},{key:"once",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=gT(hT(n.prototype),"once",this)).call.apply(i,Mm(r=[this,e,t]).call(r,a))}},{key:"off",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=gT(hT(n.prototype),"off",this)).call.apply(i,Mm(r=[this,e,t]).call(r,a))}},{key:"offAll",value:function(){gT(hT(n.prototype),"removeAllListeners",this).call(this)}}]),n}(NT),px=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};aT(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return lT(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.add(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.put(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var r=this,i=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);i.onerror=function(){n.call(r,null)},i.onsuccess=function(e){var t=e.target.result;n.call(r,t)}}},{key:"deleteData",value:function(e,t){this.myDB.db.transaction(e,"readwrite").objectStore(e).delete(t)}},{key:"clearData",value:function(e){this.myDB.db.transaction(e,"readwrite").objectStore(e).clear()}}]),e}(),vx=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],gx=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],yx=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],mx="data-xgplayerid";function _x(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Mm(r=[e]).call(r,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,Mm(t=[e]).call(t,i))})):n.call.apply(n,Mm(s=[e]).call(s,o)))}function bx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Mm(a=[this]).call(a,lk(Array.prototype).call(arguments)))}catch(sU){var l,u;throw sU.message=Mm(l=Mm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,sU.message),sU}if(this.__hooks&&this.__hooks[e])try{var c,h,d,f=(h=this.__hooks[e]).call.apply(h,Mm(c=[this,this]).call(c,lk(Array.prototype).call(arguments)));if(f)if(f.then)f.then((function(e){var r;!1!==e&&_x.apply(void 0,Mm(r=[o,t,n.next]).call(r,yT(i)))})).catch((function(e){throw e}));else _x.apply(void 0,Mm(d=[this,t,n.next]).call(d,lk(Array.prototype).call(arguments)));else if(void 0===f){var p;_x.apply(void 0,Mm(p=[this,t,n.next]).call(p,lk(Array.prototype).call(arguments)))}}catch(sU){var v,g;throw sU.message=Mm(v=Mm(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(v,sU.message),sU}else _x.apply(void 0,Mm(r=[this,t,n.next]).call(r,lk(Array.prototype).call(arguments)))}.bind(this)}function wx(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(n&&(n[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function kx(e,t){var n=this.__hooks;n&&delete n[e]}function Ex(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.useHooks&&t.useHooks.apply(t,r)}}function Tx(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.removeHooks&&t.removeHooks.apply(t,r)}}}function Sx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Dw(t).call(t,(function(t){e.__hooks[t]=null})),hE(e,"hooks",{get:function(){var t;return e.__hooks&&Dw(t=sk(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function Cx(e){e.__hooks=null}function xx(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a;if(!e.__hooks||!e.__hooks[t])return n.call.apply(n,Mm(a=[e,e]).call(a,i));var s,l,u=(l=e.__hooks[t]).call.apply(l,Mm(s=[e,e]).call(s,i));if(u&&u.then)u.then((function(t){var r;return!1===t?null:n.call.apply(n,Mm(r=[e,e]).call(r,i))})).catch((function(e){console.warn("[runHooks]".concat(t," reject"),e.message)}));else if(!1!==u){var c;return n.call.apply(n,Mm(c=[e,e]).call(c,i))}}function Px(e,t){var n;dC.logError(Mm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var Ax=function(){function e(t){aT(this,e),pC.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),Sx(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return lT(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=pC.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){n.__events[e]=t,n.player.on(e,t)})):Px(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(r){n.__onceEvents[r]=t,n.player.once(e,t)})):Px(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(r){delete n.__events[e],n.player.off(r,t)})):Px(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){sk(e[t]).forEach((function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,Mm(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=iT(iT({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return bx.call.apply(bx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return wx.call.apply(wx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return kx.call.apply(kx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,r=this.pluginName;this.offAll(),pC.clearAllTimers(this),pC.checkIsFunction(this.destroy)&&this.destroy(),Dw(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),Cx(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&hE(e,n,t[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var Ix=Element.prototype;Ix.matches=Ix.matchesSelector||Ix.mozMatchesSelector||Ix.msMatchesSelector||Ix.oMatchesSelector||Ix.webkitMatchesSelector}var Rx=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function Ox(e,t,n,r,i){var o=Mx.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function Mx(e,t,n,r){return function(n){n.delegateTarget=Rx(n.target,t),n.delegateTarget&&r.call(e,n)}}var Dx=function(e,t,n,r,i){return"function"==typeof e.addEventListener?Ox.apply(null,arguments):"function"==typeof n?Ox.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Dw(Array.prototype).call(e,(function(e){return Ox(e,t,n,r,i)})))},Lx=n(Dx),Nx={CONTROLS:"controls",ROOT:"root"},Fx={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"};function Ux(e){return!!e&&(ak(e)&&/^(?:http|data:|\/)/.test(e))}function Bx(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(e instanceof window.Element)return pC.addClass(e,i),Dw(r=sk(o)).call(r,(function(t){e.setAttribute(t,o[t])})),e;if(Ux(e)||Ux(e.url))return o.src=Ux(e)?e:e.url||"",s=pC.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(pC.addClass(s,i),Dw(l=sk(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(dC.logWarn(Mm(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(sU){return dC.logError("Plugin named [".concat(a,"]:createIcon"),sU),null}return"string"==typeof e?pC.createDomFromHtml(e,o,i):(dC.logWarn(Mm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function Vx(e,t){var n,r=t.config.icons||t.playerConfig.icons;Dw(n=sk(e)).call(n,(function(n){var i=e[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(e,t){var n;return"object"===oT(e)&&e.class&&"string"==typeof e.class?Mm(n="".concat(t," ")).call(n,e.class):t}(r[n],o),a=function(e,t){var n;return"object"===oT(e)&&e.attr&&"object"===oT(e.attr)&&Dw(n=sk(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(r[n],a),s=Bx(r[n],n,o,a,t.pluginName)),!s&&i&&(s=Bx(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[n]=s}))}var jx=function(e){cT(n,e);var t=vT(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return aT(this,n),(e=t.call(this,r)).__delegates=[],e}return lT(n,[{key:"__init",value:function(e){if(gT(hT(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,r=null;this.icons={},this.root=null,this.parent=null,Vx(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,Dw(a=sk(i=s)).call(a,(function(e){hE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:i[e]&&i[e][t]||""}})}));var l="";try{l=this.render()}catch(sU){var u;throw dC.logError("Plugin:".concat(this.pluginName,":render"),sU),new Error(Mm(u="Plugin:".concat(this.pluginName,":render:")).call(u,sU.message))}if(l)(r=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=pC.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(r)}this.root=r,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t,n=this.children();if(n&&"object"===oT(n))if(sk(n).length>0)Dw(t=sk(n)).call(t,(function(t){var r,i,o=t,a=n[o],s={root:e.root};"function"==typeof a?(r=e.config[o]||{},i=a):"object"===oT(a)&&"function"==typeof a.plugin&&(r=a.options?pC.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),e.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r<t.children.length;r++)t.children[r].children.length>0?e(t.children[r],n):n(t.children[r])}(t,(function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=n[t]||r[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var i=gT(hT(n.prototype),"registerPlugin",this).call(this,e,t,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,r){var i=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){i.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,r);this.__delegates=Mm(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var r,i=Mm(r="".concat(e,"_")).call(r,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),Ak(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,r=this;if(this.root)return"String"===pC.typeOf(e)?this.root.style[e]=t:void("Object"===pC.typeOf(e)&&Dw(n=sk(e)).call(n,(function(t){r.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,r=this;if(this.root)return"String"===pC.typeOf(e)?this.root.setAttribute(e,t):void("Object"===pC.typeOf(e)&&Dw(n=sk(e)).call(n,(function(t){r.root.setAttribute(t,e[t])})))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?Hm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return dC.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,r,i=this,o=this.player;(Dw(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Dw(r=this._children).call(r,(function(e){o.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),gT(hT(n.prototype),"__destroy",this).call(this),this.icons={},Dw(t=["root","parent"]).call(t,(function(e){i[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,i=Number(n),o=e instanceof window.Node;if(r){for(var a=0,s=null,l="";a<r;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=i){l="beforebegin";break}u<i&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof r)if(Array.isArray(n))n.forEach((function(n){var a,s=Lx(e,t,n,r,i);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=Lx(e,t,n,r,i);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return Nx}},{key:"POSITIONS",get:function(){return Fx}}]),n}(Ax),Hx=function(){function e(){var t=this;if(aT(this,e),uT(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var r=0;r<e.length;r++)t.__runHandler(e[r].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return vC(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),gC(e,t,{leading:r,trailing:i,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(sU){console.error(sU)}}return lT(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=e.getAttribute(mx),r=this.__handlers,i=-1,o=0;o<r.length;o++)r[o]&&e===r[o].target&&(i=o);i>-1?this.__handlers[i].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,r=-1;Dw(t=this.__handlers).call(t,(function(t,n){e===t.target&&(r=n)}));try{this.observer&&this.observer.unobserve(e)}catch(sU){}this.observer&&this.observer.unobserve(e),r>-1&&Ak(n=this.__handlers).call(n,r,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch($U){console.error($U)}return!0}return!1}}]),e}(),zx=null;var Wx={pluginGroup:{},init:function(e){var t,n,r=e._pluginInfoId;r||(r=(new Date).getTime(),e._pluginInfoId=r),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},zx||(zx=new Hx),zx.addObserver(t,n)),0===sk(this.pluginGroup).length&&(e.isUserActive=!0),this.pluginGroup[r]={_player:e,_originalOptions:e.config||{},_plugins:{}}},checkPlayerRoot:function(e){if(this.pluginGroup){for(var t=sk(this.pluginGroup),n=0;n<t.length;n++){var r=this.pluginGroup[t[n]]._player;if(r.root===e)return r}return null}return null},formatPluginInfo:function(e,t){var n=null,r=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,r=e.options):(n=e,r={}),t&&(r.config=t||{}),{PLUFGIN:n,options:r}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=sk(t),r=null,i=0;i<n.length;i++)if(e.toLowerCase()===n[i].toLowerCase()){r=t[n[i]];break}return"Object"===pC.typeOf(r)?{root:r.root,position:r.position}:{}},lazyRegister:function(e,t){var n=this,r=t.timeout||1500;return Lw.race([t.loader().then((function(t){var r;r=t&&t.__esModule?t.default:t,n.register(e,r,t.options)})),new Lw((function(e,t){setTimeout((function(){t(new Error("timeout"))}),r)}))])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var r=e._pluginInfoId;if(r&&this.pluginGroup[r]){this.pluginGroup[r]._plugins||(this.pluginGroup[r]._plugins={});var i=this.pluginGroup[r]._plugins,o=this.pluginGroup[r]._originalOptions;n.player=this.pluginGroup[r]._player;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=sk(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===pC.typeOf(u)?n.config=DT({},n.config,o[s[l]]):"Boolean"===pC.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&sk(t.defaultConfig).forEach((function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])})),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{i[a.toLowerCase()]&&(this.unRegister(r,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return i[a.toLowerCase()]=c,i[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(sU){var r;console.error(Mm(r="[unRegister:".concat(t,"] cgid:[")).call(r,e,"] error"),sU)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var r=t.toLowerCase();return this.pluginGroup[n]._plugins[r]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Lw((function(e){e()}))}return new Lw((function(r){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Lw.all(e._loadingPlugins):Lw.resolve()).then((function(){var i,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];sk(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(sU){throw s.push(n(null)),sU}})),Lw.all(Mm(i=[]).call(i,s)).then((function(){r()})).catch((function(e){console.error(e),r()}))}else r()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;sk(n).forEach((function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()}))}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var r=this.pluginGroup[n]._plugins;sk(r).forEach((function(t){if(r[t].updateLang)r[t].updateLang(e);else try{r[t].lang=e}catch($U){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var r=[],i=this.pluginGroup[n]._plugins;sk(i).forEach((function(e){"controls"!==e&&i[e]&&(r.push({plugin:i[e].func,options:i[e].__args}),t.unRegister(n,e))})),r.forEach((function(n){t.register(e,n.plugin,n.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};sk(n).forEach((function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()}))}},setCurrentUserActive:function(e,t){if(this.pluginGroup[e]){if(!t)return this.pluginGroup[e]._player.isUserActive=t,e;for(var n=sk(this.pluginGroup),r=0;r<n.length;r++){var i=this.pluginGroup[n[r]];i&&i._player&&(this.pluginGroup[n[r]]._player.isUserActive=!1)}return this.pluginGroup[e]._player.isUserActive=t,e}},getCurrentUseActiveId:function(){if(this.pluginGroup){for(var e=sk(this.pluginGroup),t=0;t<e.length;t++){var n=this.pluginGroup[e[t]];if(n&&n._player&&n._player.isUserActive)return e[t]}return null}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,r;n=e.root,zx.unObserver(n,r);for(var i=this.pluginGroup[t]._plugins,o=0,a=sk(i);o<a.length;o++){var s=a[o];this.unRegister(t,s)}var l=e.isUseActive;if(delete this.pluginGroup[t],delete e._pluginInfoId,l){var u=sk(this.pluginGroup);u.length>0&&this.setCurrentUserActive(u[u.length-1],!0)}}}},Gx="xgplayer",Kx="xgplayer-is-enter",Yx="xgplayer-pause",Xx="xgplayer-playing",qx="xgplayer-ended",Jx="xgplayer-isloading",Qx="xgplayer-is-error",Zx="xgplayer-replay",$x="xgplayer-nostart",eP="xgplayer-inactive",tP="xgplayer-is-fullscreen",nP="xgplayer-is-cssfullscreen",rP="xgplayer-rotate-fullscreen",iP="xgplayer-rotate-parent",oP="xgplayer-fullscreen-parent",aP="xgplayer-fullscreen-inner",sP="no-controls",lP="flex-controls",uP="controls-autohide",cP="top-bar-autohide",hP="not-allow-autoplay",dP="seeking";function fP(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},ignores:[],whitelist:[],inactive:3e3,lang:yC(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var pP=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=fT(r),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),uT(fT(r),"onMouseLeave",(function(){fT(r).player.focus()})),r}return lT(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==wC.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,r=n.disable,i=n.height,o=n.mode;if(!r){"flex"===o&&this.player.addClass(lP);var a={height:"".concat(i,"px")};Dw(e=sk(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Hm(this).call(this,"xg-left-grid"),this.center=Hm(this).call(this,"xg-center-grid"),this.right=Hm(this).call(this,"xg-right-grid"),this.innerRoot=Hm(this).call(this,"xg-inner-controls"),this.on(QC,(function(e){e?pC.addClass(t.root,"mini-controls"):pC.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==wC.device&&"mobile"!==s&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&pC.addClass(this.root,uP)}},{key:"pauseAutoHide",value:function(){pC.removeClass(this.root,uP)}},{key:"show",value:function(){pC.addClass(this.root,"show")}},{key:"hide",value:function(){pC.removeClass(this.root,"show")}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(this.root){var i=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:i.position){case Fx.CONTROLS_LEFT:t.root=this.left;break;case Fx.CONTROLS_RIGHT:t.root=this.right;break;case Fx.CONTROLS_CENTER:t.root=this.center;break;case Fx.CONTROLS:t.root=this.root;break;default:t.root=this.left}return gT(hT(n.prototype),"registerPlugin",this).call(this,e,t,r)}}}},{key:"destroy",value:function(){"mobile"!==wC.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,r=e.initShow;if(!e.disable){var i=pC.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},uT({},uP,n),{"xgplayer-controls-initshow":r||!n});return'<xg-controls class="'.concat(i,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(jx),vP={LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}},gP={lang:{},langKeys:[],textKeys:[]};function yP(e,t){return sk(t).forEach((function(n){var r,i=pC.typeOf(t[n]),o=pC.typeOf(e[n]);"Array"===i?("Array"!==o&&(e[n]=[]),(r=e[n]).push.apply(r,yT(t[n]))):"Object"===i?("Object"!==o&&(e[n]={}),yP(e[n],t[n])):e[n]=t[n]})),e}function mP(){var e;Dw(e=sk(gP.lang.en)).call(e,(function(e){gP.textKeys[e]=e}))}function _P(e,t){var n=e.LANG;if(t||(t=gP),t.lang){var r=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?yP(t.lang[n],r):(t.langKeys.push(n),t.lang[n]=r),mP()}}_P(vP);var bP={get textKeys(){return gP.textKeys},get langKeys(){return gP.langKeys},get lang(){var e,t={};return Dw(e=gP.langKeys).call(e,(function(e){t[e]=gP.lang[e]})),gP.lang["zh-cn"]&&(t.zh=gP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=gP),t.lang){var r;if("Array"!==pC.typeOf(e))n=Dw(r=sk(e)).call(r,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var i=t.lang;Dw(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),i[e.LANG]?yP(i[e.LANG]||{},e.TEXT||{}):_P(e,t)})),mP()}},use:_P,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return yP(n.lang,gP.lang),(t=n.langKeys).push.apply(t,yT(gP.langKeys)),yP(n.textKeys,gP.textKeys),n}},wP=1,kP=2,EP=3,TP=4,SP=5,CP=6,xP=7,PP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],AP=["play","pause","replay","retry"],IP=0,RP=0,OP=function(e){cT(n,e);var t=vT(n);function n(e){var r;aT(this,n);var i,o=pC.deepMerge(fP(),e);uT(fT(r=t.call(this,o)),"canPlayFunc",(function(){if(r.config){var e=r.config,t=e.autoplay,n=e.startTime,i=e.defaultPlaybackRate;dC.logInfo("player","canPlayFunc, startTime",n),n&&(r.currentTime=n>r.duration?r.duration:n,r.config.startTime=0),r.playbackRate=i,(t||r._useAutoplay)&&r.mediaPlay(),r.off(MC,r.canPlayFunc),r.removeClass(Kx)}})),uT(fT(r),"onFullscreenChange",(function(e,t){var n=function(){pC.setTimeout(fT(r),(function(){r.resize()}),100)},i=pC.getFullScreenEl();r._fullActionFrom?r._fullActionFrom="":r.emit(ax,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:r.currentTime,duration:r.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var r=e.getAttribute(n);return!(!r||r!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(i,r.playerId,mx);if(t||i&&(i===r._fullscreenEl||o))n(),!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!0,r.changeFullStyle(r.root,i,tP),r.emit(qC,!0,r._fullScreenOffset),r.cssfullscreen&&r.exitCssFullscreen();else if(r.fullscreen){n();var a=fT(r),s=a._fullScreenOffset;a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),pC.setTimeout(fT(r),(function(){r.fullscreen=!1,r._fullScreenOffset=null}),100)):(!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!1,r._fullScreenOffset=null),r.cssfullscreen?r.removeClass(tP):r.recoverFullStyle(r.root,r._fullscreenEl,tP),r._fullscreenEl=null,r.emit(qC,!1)}})),uT(fT(r),"_onWebkitbeginfullscreen",(function(e){r._fullscreenEl=r.media,r.onFullscreenChange(e,!0)})),uT(fT(r),"_onWebkitendfullscreen",(function(e){r.onFullscreenChange(e,!1)})),Sx(fT(r),AP),r.config=o,r._pluginInfoId=pC.generateSessionId(),(i=fT(r)).logInfo=dC.logInfo.bind(i),i.logWarn=dC.logWarn.bind(i),i.logError=dC.logError.bind(i);var a=r.constructor.defaultPreset;if(r.config.presets.length){var s,l=ak(s=r.config.presets).call(s,"default");l>=0&&a&&(r.config.presets[l]=a)}else a&&r.config.presets.push(a);if(r.userTimer=null,r.waitTimer=null,r._state=wP,r.isError=!1,r._hasStart=!1,r.isSeeking=!1,r.isCanplay=!1,r._useAutoplay=!1,r.rotateDeg=0,r.isActive=!1,r.fullscreen=!1,r.cssfullscreen=!1,r.isRotateFullscreen=!1,r._fullscreenEl=null,r._cssfullscreenEl=null,r.curDefinition=null,r._orgCss="",r._fullScreenOffset=null,r._videoHeight=0,r._videoWidth=0,r.videoPos={pi:1,scale:0,rotate:0,x:0,y:0,h:-1,w:-1,vy:0,vx:0},r._accPlayed={t:0,acc:0,loopAcc:0},r.innerContainer=null,r.controls=null,r.topBar=null,r.root=null,r.__i18n=bP.init(r._pluginInfoId),wC.os.isAndroid&&wC.osVersion>0&&wC.osVersion<6&&(r.config.autoplay=!1),r.database=new px,r.isUserActive=!1,r._onceSeekCanplay=null,r._isPauseBeforeSeek=0,!r._initDOM())return console.error(new Error("can't find the dom which id is ".concat(r.config.id," or this.config.el does not exist"))),pT(r);var u=r.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var d,f=Hm(d=h.list).call(d,(function(e){return e.definition&&e.definition===h.defaultDefinition}));f||(h.defaultDefinition=h.list[0].definition,f=h.list[0]),r.config.url=f.url,r.curDefinition=f}return r._bindEvents(),r._registerPresets(),r._registerPlugins(),Wx.onPluginsReady(fT(r)),r.getInitDefinition(),r.setState(kP),pC.setTimeout(fT(r),(function(){r.emit(VC)}),0),r.onReady&&r.onReady(),(r.config.videoInit||r.config.autoplay)&&(!r.hasStart||r.state<TP)&&r.start(),r}return lT(n,[{key:"_initDOM",value:function(){var e,t,n,r=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var i=this.config.el;if(!i||1!==i.nodeType)return this.emit(AC,new SC("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=i}var o=Wx.checkPlayerRoot(this.root);o&&(dC.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),o.destroy()),this.root.setAttribute(mx,this.playerId),Wx.init(this),this._initBaseDoms();var a=this.constructor.XgVideoProxy;if(a&&this.mediaConfig.mediaType===a.mediaType){var s=this.innerContainer||this.root;this.detachVideoEvents(this.media);var l=new a(s,this.config,this.mediaConfig);this.attachVideoEvents(l),this.media=l}if(this.media.setAttribute(mx,this.playerId),this.config.controls){var u=this.config.controls.root||null,c=Wx.register(this,pP,{root:u});this.controls=c}var h="mobile"===this.config.isMobileSimulateMode?"mobile":wC.device;if(this.addClass(Mm(e=Mm(t=Mm(n="".concat(Gx," ")).call(n,eP," xgplayer-")).call(t,h," ")).call(e,this.config.controls?"":sP)),this.config.autoplay?this.addClass(Kx):this.addClass($x),this.config.fluid){var d=this.config,f=d.width,p=d.height;"number"==typeof f&&"number"==typeof p||(f=600,p=337.5);var v={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*p/f,"%")};sk(v).forEach((function(e){r.root.style[e]=v[e]}))}else["width","height"].forEach((function(e){r.config[e]&&("number"!=typeof r.config[e]?r.root.style[e]=r.config[e]:r.root.style[e]="".concat(r.config[e],"px"))}));return!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=pC.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach((function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+lk(t).call(t,1)])})),vx.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),wC.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(NC,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(CC,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),vx.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(CC,this.playFunc),this.off(MC,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==pC.typeOf(e)||0!==e.length)||(e="",this.emit(jC),dC.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this._detachSourceEvents(this.media),"Array"===pC.typeOf(e)&&e.length>0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e,"Number"===pC.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var r=this.media.readyState;dC.logInfo("_startInit readyState",r),this.config.autoplay&&(!/^blob/.test(this.media.currentSrc)&&!/^blob/.test(this.media.src)&&this.load(),(wC.os.isIpad||wC.os.isPhone)&&this.mediaPlay()),r>=2?this.canPlayFunc():this.once(MC,this.canPlayFunc),(!this.hasStart||this.state<TP)&&Wx.afterInit(this),this.hasStart=!0,this.setState(TP),pC.setTimeout(this,(function(){t.emit(WC)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],r=this.config.plugins||[],i=this.config.i18n||[];t&&bP.extend(i,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;r.forEach((function(n){try{var r=n.plugin?n.plugin.pluginName:n.pluginName;if(r&&ak(o).call(o,r.toLowerCase())>-1)return null;if(!t&&a[r.toLowerCase()])return;if(n.lazy&&n.loader){var i=Wx.lazyRegister(e,n);return void(n.forceBeforeInit&&(i.then((function(){var t,n;Ak(t=e._loadingPlugins).call(t,ak(n=e._loadingPlugins).call(n,i),1)})).catch((function(t){var n,r;dC.logError("_registerPlugins:loadingPlugin",t),Ak(n=e._loadingPlugins).call(n,ak(r=e._loadingPlugins).call(r,i),1)})),e._loadingPlugins.push(i)))}return e.registerPlugin(n)}catch(s){dC.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,r,i,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,l=o.ignores,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,d=o.i18n,f=void 0===d?[]:d;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(r=e.config.plugins).push.apply(r,yT(s)),(i=e.config.ignores).push.apply(i,yT(u)),Dw(n=sk(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];f.push.apply(f,yT(p)),e.config.i18n=f}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case Fx.ROOT_RIGHT:this.rightBar||(this.rightBar=pC.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case Fx.ROOT_LEFT:this.leftBar||(this.leftBar=pC.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case Fx.ROOT_TOP:this.topBar||(this.topBar=pC.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&pC.addClass(this.topBar,cP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=Wx.formatPluginInfo(e,t),r=n.PLUFGIN,i=n.options,o=this.config.plugins;!Wx.checkPluginIfExits(r.pluginName,o)&&o.push(r);var a=Wx.getRootByConfig(r.pluginName,this.config);a.root&&(i.root=a.root),a.position&&(i.position=a.position);var s=i.position?i.position:i.config&&i.config.position||r.defaultConfig&&r.defaultConfig.position;return!i.root&&"string"==typeof s&&ak(s).call(s,"controls")>-1?this.controls&&this.controls.registerPlugin(r,i,r.pluginName):(i.root||(i.root=this._getRootByPosition(s)),Wx.register(this,r,i))}},{key:"deregister",value:function(e){"string"==typeof e?Wx.unRegister(this,e):e instanceof Ax&&Wx.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof Ax&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--){if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){var r;Ak(r=this.config.plugins).call(r,n,1);break}}}},{key:"plugins",get:function(){return Wx.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=Wx.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(pC.hasClass(this.root,e)||pC.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&pC.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return pC.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>EP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(EP),this._registerPlugins(!1),Wx.beforeInit(this).then((function(){if(t.config)return e||(e=t.url||t.config.url),t._startInit(e)})).catch((function(e){throw e.fileName="player",e.lineNumber="236",dC.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,r=e;"Object"===pC.typeOf(e)&&(r=e.url);var i=this.currentTime,o=this.paused&&!this.isError;return this.src=r,new Lw((function(e,t){var a=function(e){n.off("timeupdate",s),n.off("canplay",s),t(e)},s=function(){n.currentTime=i,o&&n.pause(),n.off("error",a),e(!0)};n.once("error",a),r?(wC.os.isAndroid?n.once("timeupdate",s):n.once("canplay",s),n.play()):n.errorHandler("error",{code:6,message:"empty_src"})}))}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<TP)return this.removeClass($x),this.addClass(Kx),this.start(),void(this._useAutoplay=!0);this.state<CP&&(this.removeClass($x),!this.isCanplay&&this.addClass(Kx));var t=gT(hT(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(hP),e.addClass(Xx),e.state<CP&&(dC.logInfo(">>>>playPromise.then"),e.setState(CP),e.emit(HC))})).catch((function(t){if(dC.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(Kx);"NotAllowedError"===t.name&&(e._errorTimer=pC.setTimeout(e,(function(){e._errorTimer=null,e.emit(zC),e.addClass(hP),e.removeClass(Kx),e.pause(),e.setState(SP)}),0))})):(dC.logWarn("video.play not return promise"),this.state<CP&&(this.setState(CP),this.removeClass(hP),this.removeClass($x),this.removeClass(Kx),this.addClass(Xx),this.emit(HC))),t}},{key:"mediaPause",value:function(){gT(hT(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){gT(hT(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(Yx),xx(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;xx(this,"pause",(function(){gT(hT(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Ik(Number(e))&&this.hasStart){var r=this.config,i=r.isSeekedPlay,o=r.seekedStatus,a=t||(i?"play":o);e=e<0?0:e>this.duration?Zk(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(IC,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(Kx),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(IC,this._onceSeekCanplay),this.state<CP?(this.removeClass($x),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,r=n.definition;!n.url&&r&&r.list&&r.list.length>0&&r.defaultDefinition&&Dw(e=r.list).call(e,(function(e){e.definition===r.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,r=this.config.definition;if(Array.isArray(null==r?void 0:r.list)&&r.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=Zk(e.bitrate,10)||0),this.emit(ZC,{from:t,to:e}),this.hasStart){var i=this.switchURL(e.url,iT({seamless:!1!==r.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));i&&i.then?i.then((function(){n.emit(ex,{from:t,to:e})})):this.emit(ex,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(NC,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[hP,Xx,$x,Yx,Zx,Kx,qx,Qx,Jx];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(Kx),this.emit(sx)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(Dw(t).call(t,(function(t){e.deregister(t)})),n)){var r,i=fP();aE(r=sk(this.config)).call(r,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=i[t])}))}}},{key:"destroy",value:function(){var e,t=this,r=this.innerContainer,i=this.root,o=this.media;if(i&&o){if(this.hasStart=!1,this._useAutoplay=!1,i.removeAttribute(mx),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),pC.clearAllTimers(this),this.emit(KC),Wx.destroy(this),Cx(this),gT(hT(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),r)for(var a=r.children,s=0;s<a.length;s++)r.removeChild(a[s]);!r&&o instanceof window.Node&&i.contains(o)&&i.removeChild(o),Dw(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){t[e]&&i.removeChild(t[e]),t[e]=null}));var l=i.className.split(" ");l.length>0?i.className=Nw(l).call(l,(function(e){return ak(e).call(e,"xgplayer")<0})).join(" "):i.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){t[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(qx),this.currentTime=0,this.isSeeking=!1,xx(this,"replay",(function(){e.once(IC,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(GC),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(Qx),this.addClass(Jx),xx(this,"retry",(function(){var t=e.currentTime;e.src=e.config.url,!e.config.isLive&&(e.currentTime=t),e.once(MC,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,r){e&&(r||(r=oP),this._orgCss||(this._orgCss=pC.filterStyleFromText(e)),pC.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=pC.filterStyleFromText(t),pC.addClass(t,r),t.setAttribute(mx,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,r){r||(r=oP),this._orgCss&&(pC.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),pC.removeClass(e,n),t&&t!==e&&this._orgPCss&&(pC.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",pC.removeClass(t,r),t.removeAttribute(mx))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if(e||(e=t),this._fullScreenOffset={top:pC.scrollTop(),left:pC.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",pC.getFullScreenEl()!==this._fullscreenEl)try{for(var r=0;r<gx.length;r++){var i=gx[r];if(e[i]){var o="webkitRequestFullscreen"===i?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[i]();return o&&o.then?o:Lw.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Lw.resolve()):Lw.reject(new Error("call getFullscreen fail"))}catch(a){return Lw.reject(new Error("call getFullscreen fail"))}else this.onFullscreenChange()}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||pC.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<yx.length;n++){var r=yx[n];if(document[r]){var i=document[r]();return i&&i.then?i:Lw.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Lw.resolve()):Lw.reject(new Error("call exitFullscreen fail"))}catch(o){return Lw.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var n=t?Mm(e="".concat(aP," ")).call(e,nP):nP;this.changeFullStyle(this.root,t,n);var r=this.config.fullscreen,i=void 0===r?{}:r;(!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen())&&(this.fullscreen=!0,this.emit(qC,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(JC,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Mm(e="".concat(aP," ")).call(e,nP):nP;if(this.fullscreen){var n=this.config.fullscreen,r=void 0===n?{}:n;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(qC,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(JC,!1)}},{key:"getRotateFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(t);var n=t?Mm(e="".concat(aP," ")).call(e,rP):rP;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,iP),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(qC,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Mm(t="".concat(aP," ")).call(t,rP):rP;this.recoverFullStyle(this.root,this._fullscreenEl,n,iP),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(qC,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit(UC,iT({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?this.emit(BC,iT({paused:this.paused,ended:this.ended},e)):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoHide,r=void 0===n?!this.config.closePlayerBlur:n,i=t.delay,o=void 0===i?this.config.inactive:i;this.isActive=!0,this.removeClass(eP),this.userTimer&&(pC.clearTimeout(this,this.userTimer),this.userTimer=null),r?this.userTimer=pC.setTimeout(this,(function(){e.userTimer=null,e.blur()}),o):this.userTimer&&(pC.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(eP)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(Kx),this.removeClass(Qx),this.removeClass(Jx),this.isCanplay=!0,this.waitTimer&&pC.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(Qx),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===xP&&this.setState(CP),this.removeClass(Yx),this.ended&&this.removeClass(qx),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(Yx),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(pC.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(qx),this.setState(xP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(hP),this.removeClass($x),this.removeClass(Kx),this.removeClass(Jx),this.addClass(Qx)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(dP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&pC.clearTimeout(this,this.waitTimer),this.removeClass(Jx),this.removeClass(dP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&pC.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=pC.setTimeout(this,(function(){e.addClass(Jx),pC.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[$x,Yx,qx,Qx,Zx,Jx].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.resize(),(this.waitTimer||this.hasClass(Jx))&&this.media.readyState>2&&(this.removeClass(Jx),pC.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state<CP&&this.duration&&(this.setState(CP),this.emit(HC)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===pC.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var r="String"===pC.typeOf(e)?e:e.type||"";n.props&&"Array"!==pC.typeOf(n.props)&&(n.props=[n.props]),this.emit(ax,iT({eventType:r,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var t=(new Date).getTime()-this._accPlayed.t;this._accPlayed.acc+=t,this._accPlayed.t=0,("ended"===e||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var t=this.media.buffered;if(!t||0===t.length||!this.duration)return!0;for(var n=e||this.media.currentTime||.2,r=t.length,i=0;i<r;i++)if(t.start(i)<=n&&t.end(i)>n)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,n=e.vy,r=e.vx,i=e.h,o=e.w,a=this.videoPos._pi;if(a||(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:t},l=0,u=0,c=1,h=Math.abs(t/90),d=this.root,f=this.innerContainer,p=d.offsetWidth,v=f?f.offsetHeight:d.offsetHeight,g=v,y=p;if(h%2==0)c=i>0?100/i:o>0?100/o:1,s.scale=c,l=n>0?(100-i)/2-n:0,s.y=2===h?0-l:l,u=r>0?(100-o)/2-r:0,s.x=2===h?0-u:u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px");else if(h%2==1){g=p;var m=v-p;u=-m/2/(y=v)*100,s.x=3===h?u+n/2:u-n/2,l=m/2/g*100,s.y=3===h?l+r/2:l-r/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=pC.getTransformStyle(s);this.media.style.transform=_,this.media.style.webkitTransform=_}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,n=this;e&&Dw(t=sk(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var r=n.plugins[t.toLowerCase()];r&&"Function"===pC.typeOf(r.setConfig)&&r.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,xx(this,"playnext",(function(){t.start(),t.emit(ix,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.media,n=t.videoWidth,r=t.videoHeight,i=this.config,o=i.fitVideoSize,a=i.videoFillMode;if("fill"!==a&&"cover"!==a||this.setAttribute("data-xgfill",a),r&&n){this._videoHeight=r,this._videoWidth=n;var s=this.root.getBoundingClientRect(),l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=s.width,c=s.height-l,h=Zk(n/r*1e3,10),d=Zk(u/c*1e3,10),f=u,p=c,v={};"auto"===o&&d>h||"fixWidth"===o?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/f,"%"):v.height="".concat(p+l,"px")):("auto"===o&&d<h||"fixHeight"===o)&&(f=h*c/1e3,v.width="".concat(f,"px")),this.fullscreen||this.cssfullscreen||sk(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===a&&d<h||"fillWidth"===a&&d>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:f,vHeight:p,cWidth:f,cHeight:p+l};this.resizePosition(),this.emit(nx,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,n):this.media.style.objectPosition=Mm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;dC.logInfo("setState",Mm(t="state from:".concat(PP[this.state]," to:")).call(t,PP[e])),this._state=e}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(kP),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===CP||this._state===xP},set:function(e){e?this.setState(CP):this._state>=CP&&this.setState(TP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,r=null,i=null;n.list=e,this.emit("resourceReady",e),e.forEach((function(e){var o;(null===(o=t.curDefinition)||void 0===o?void 0:o.definition)===e.definition&&(r=e),n.defaultDefinition===e.definition&&(i=e)})),!i&&e.length>0&&(i=e[0]),r?this.changeDefinition(r):i&&this.changeDefinition(i)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=Zk(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Nw(t=bP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,Wx.setLang(e,this)):console.error(Mm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,bP.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return kC}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return gT(hT(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=gT(hT(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return gT(hT(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed;return this.updateAcc("get"),e.acc}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=pC.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return RP},set:function(e){RP=e}},{key:"realTimeSpeed",get:function(){return IP},set:function(e){IP=e}},{key:"hook",value:function(e,t){var n;return bx.call.apply(bx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return wx.call.apply(wx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return kx.call.apply(kx,Mm(n=[this]).call(n,lk(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return Ex.call.apply(Ex,Mm(r=[this]).call(r,lk(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return Tx.call.apply(Tx,Mm(r=[this]).call(r,lk(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),this.muted=t),Wx.setCurrentUserActive(this.playerId,e)}}],[{key:"debugger",get:function(){return dC.config.debug},set:function(e){dC.config.debug=e}},{key:"getCurrentUserActivePlayerId",value:function(){return Wx.getCurrentUseActiveId()}},{key:"setCurrentUserActive",value:function(e,t){Wx.setCurrentUserActive(e,t)}},{key:"isHevcSupported",value:function(){return wC.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return wC.probeConfigSupported(e)}},{key:"install",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=t)}},{key:"use",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]=t}}]),n}(fx);uT(OP,"defaultPreset",null),uT(OP,"XgVideoProxy",null);function MP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var DP=CE;An({target:"Function",proto:!0,forced:Function.bind!==DP},{bind:DP});var LP,NP,FP=Hc("Function").bind,UP=se,BP=FP,VP=Function.prototype,jP=n((function(e){var t=e.bind;return e===VP||UP(VP,e)&&t===VP.bind?BP:t}));function HP(e,t){var n;return(HP=dh?jP(n=dh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function zP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Rc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ac(e,"prototype",{writable:!1}),t&&HP(e,t)}function WP(e){var t;return(WP=dh?jP(t=Nc).call(t):function(e){return e.__proto__||Nc(e)})(e)}function GP(){if("undefined"==typeof Reflect||!HE)return!1;if(HE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(HE(Boolean,[],(function(){}))),!0}catch(sU){return!1}}function KP(e){var t=GP();return function(){var n,r=WP(e);if(t){var i=WP(this).constructor;n=HE(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return MP(e)}(this,n)}}function YP(e,t,n){var r;GP()?YP=jP(r=HE).call(r):YP=function(e,t,n){var r=[null];ch(r).apply(r,t);var i=new(jP(Function).apply(e,r));return n&&HP(i,n.prototype),i};return YP.apply(null,arguments)}function XP(e){var t="function"==typeof xw?new xw:void 0;return XP=function(e){if(null===e||(n=e,-1===Wy(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return YP(e,arguments,WP(this).constructor)}return i.prototype=Rc(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),HP(i,e)},XP(e)}var qP=function(e){return e.Fatal="Fatal",e.Error="Error",e}(qP||{}),JP=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=100]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(JP||{}),QP=(Ry(LP={},2100,{messageTextKey:"NETWORK",level:"Error"}),Ry(LP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Ry(LP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Ry(LP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Ry(LP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Ry(LP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Ry(LP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Ry(LP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Ry(LP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Ry(LP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Ry(LP,100,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),LP),ZP=(Ry(NP={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Ry(NP,"network",{messageTextKey:"NETWORK",level:"Error"}),Ry(NP,"demux",{messageTextKey:"DEMUX",level:"Error"}),Ry(NP,"remux",{messageTextKey:"REMUX",level:"Error"}),Ry(NP,"media",{messageTextKey:"MEDIA",level:"Error"}),Ry(NP,"drm",{messageTextKey:"DRM",level:"Error"}),Ry(NP,"other",{messageTextKey:"OTHER",level:"Error"}),Ry(NP,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),NP),$P=function(e){zP(n,e);var t=KP(n);function n(e,r){var i,o,a,s,l,u,c;Sy(this,n);var h="string"==typeof e?{message:e}:e,d=null!==(i=null!==(o=null!==(a=null==r?void 0:r.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==i?i:null==r?void 0:r.getText("UNKNOWN");return Ry(MP(c=t.call(this,d)),"errorCode",void 0),Ry(MP(c),"level",void 0),Ry(MP(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return Iy(n)}(XP(Error));function eA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new $P(Pm(Pm({errorCode:e},QP[e]),t),n)}function tA(e,t){var n,r,i=QP[e.errorCode]||ZP[e.errorType],o=e.errorCode;return new $P({messageTextKey:null==i?void 0:i.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(r=null==i?void 0:i.level)&&void 0!==r?r:"Error",ext:e},t)}var nA=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){pC.addClass(this.root,"hide")}},{key:"show",value:function(){pC.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(xC,(function(){e.isEndedShow&&pC.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(RC,(function(){e.onTimeUpdate()})),this.on(YC,(function(){pC.removeClass(e.root,"hide"),pC.addClass(e.root,"xg-showplay"),e.once(RC,(function(){e.onTimeUpdate()}))}))):this.on(CC,(function(){pC.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?pC.removeClass(this.root,"xg-showplay"):this.once(RC,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"render",value:function(){var e,t=this.config,n=t.poster,r=t.hideCanplay,i=n?"background-image:url(".concat(n,");"):"";return Mm(e='<xg-poster class="xgplayer-poster '.concat(r?"xg-showplay":"",'" style="')).call(e,i,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),n}(jx);function rA(){return(new DOMParser).parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n',"image/svg+xml").firstChild}function iA(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}var oA={};function aA(e){var t;e?window.clearTimeout(e):Dw(t=sk(oA)).call(t,(function(e){window.clearTimeout(oA[e].id),delete oA[e]}))}var sA=function(e){cT(n,e);var t=vT(n);function n(e){var r;return aT(this,n),uT(fT(r=t.call(this,e)),"onPlayerReset",(function(){r.autoPlayStart=!1;var e="auto"===r.config.mode?"auto-hide":"hide";r.setAttr("data-state","play"),pC.removeClass(r.root,e),r.show()})),uT(fT(r),"onAutoplayStart",(function(){if(!r.autoPlayStart){var e="auto"===r.config.mode?"auto-hide":"hide";pC.addClass(r.root,e),r.autoPlayStart=!0,r.onPlayPause("play")}})),r.autoPlayStart=!1,r}return lT(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.playerConfig;this.initIcons(),this.once(VC,(function(){n&&(n.lang&&"en"===n.lang?pC.addClass(t.root,"lang-is-en"):"jp"===n.lang&&pC.addClass(t.root,"lang-is-jp"))})),this.on(HC,this.onAutoplayStart),n.autoplay||this.show(),this.on(zC,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),pC.removeClass(e.root,t),e.show()})),this.on(CC,(function(){e.onPlayPause("play")})),this.on(PC,(function(){e.onPlayPause("pause")})),this.on(sx,(function(){e.onPlayerReset()})),this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:rA,class:"xg-icon-play"},startPause:{icon:iA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){pC.addClass(this.root,"hide")}},{key:"show",value:function(){pC.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){pC.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){pC.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return oA[e]&&window.clearTimeout(oA[e].id),oA[e]={},n.start&&n.start(),oA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(oA[e].id),delete oA[e]}),t),oA[e].id}("pauseplay",400,{start:function(){pC.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){pC.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){pC.removeClass(this.root,"interact"),aA(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<kP)||(this.player.paused||t.state!==CP?t.play():t.pause())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<CP)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.ended)return this.switchStatus(),this.show(),void this.endAnimate();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),aA(this._animateId)}},{key:"render",value:function(){var e=this.playerConfig.autoplay?"auto"===this.config.mode?"auto-hide":"hide":"";return'\n <xg-start class="xgplayer-start '.concat(e,'">\n <xg-start-inner></xg-start-inner>\n </xg-start>')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),n}(jx),lA=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=pC.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var n="",r=1;r<=12;r++)n+='<div class="xgplayer-enter-bar'.concat(r,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(jx);function uA(e,t,n){try{var r,i;return Mm(r=Mm(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,e.i18nKeys[t],'">\n ')).call(r,e.i18n[t],"\n </div>")}catch(sU){return'<div class="xg-tips hide"></div>'}}var cA=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e,t="MINISCREEN";return Mm(e='\n <xg-icon class="xgplayer-miniicon">\n <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="'.concat(this.i18nKeys[t],'">')).call(e,this.i18n[t],"</span></div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:Fx.CONTROLS_RIGHT,index:10}}}]),n}(jx);function hA(e){var t=fS(e);return-1===ak(e).call(e,"%")&&!Ik(t)&&t}var dA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],fA=dA.length;function pA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===oT(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<fA;t++)e[dA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var r=n.isBorderBox="border-box"===t.boxSizing,i=0;i<fA;i++){var o=dA[i],a=t[o],s=fS(a);n[o]=Ik(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,d=n.borderLeftWidth+n.borderRightWidth,f=n.borderTopWidth+n.borderBottomWidth,p=r,v=hA(t.width);!1!==v&&(n.width=v+(p?0:l+d));var g=hA(t.height);return!1!==g&&(n.height=g+(p?0:u+f)),n.innerWidth=n.width-(l+d),n.innerHeight=n.height-(u+f),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function vA(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.identifier===t)return r}}var gA="dragStart",yA="dragMove",mA="dragEnded",_A={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},bA=function(e){cT(n,e);var t=vT(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return aT(this,n),(r=t.call(this)).isEnabled=!0,r.isDragging=!1,r.isDown=!1,r.position={},r.downPoint={},r.dragPoint={x:0,y:0},r.startPos={x:0,y:0},r._root=e instanceof Element?e:document.querySelector(e),r._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),r._root&&r._handlerDom?(r._bindStartEvent(),r):pT(r)}return lT(n,[{key:"_bindStartEvent",value:function(){var e,t=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),Dw(e=_A[this._startKey]).call(e,(function(e){t["on".concat(e)]=t["on".concat(e)].bind(t)}))}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var n=_A[this._startKey];Dw(n).call(n,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(Dw(e=this._boundPointerEvents).call(e,(function(e){window.removeEventListener(e,t["on".concat(e)])})),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame((function(){e.animate()})))}},{key:"positionDrag",value:function(){var e,t=Mm(e="translate3d(".concat(this.dragPoint.x,"px, ")).call(e,this.dragPoint.y,"px, 0)");this._root.style.transform=t,this._root.style.webKitTransform=t}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=vA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=vA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=vA(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var n=pA(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(gA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(mA)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,r=n.x,i=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,r),s=this.checkContain("y",s,i),this.position.x=r+a,this.position.y=i+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(yA,this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=Ik(t)?0:t,this.position.y=Ik(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===ak(t).call(t,"matrix")){var n=t.split(","),r=0===ak(t).call(t,"matrix3d")?12:4,i=Zk(n[r],10),o=Zk(n[r+1],10);this.position.x+=i,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==ak(e).call(e,"%")){var n=pA(this._root.parentNode);return n?fS(e)/100*n[t]:0}return Zk(e,10)}}]),n}(NT),wA=function(e){cT(n,e);var t=vT(n);function n(e){var r;aT(this,n),uT(fT(r=t.call(this,e)),"onCancelClick",(function(e){r.exitMini(),r.isClose=!0})),uT(fT(r),"onCenterClick",(function(e){var t=fT(r).player;t.paused?t.play():t.pause()})),uT(fT(r),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-r.pos.scrollY)<50)){var t=Zk(pC.getCss(r.player.root,"height"));t+=r.config.scrollTop,r.pos.scrollY=window.scrollY,window.scrollY>t+5?!r.isMini&&!r.isClose&&r.getMini():window.scrollY<=t&&(r.isMini&&r.exitMini(),r.isClose=!1)}})),r.isMini=!1,r.isClose=!1;var i=fT(r).config;return r.pos={left:i.left<0?window.innerWidth-i.width-20:i.left,top:i.top<0?window.innerHeight-i.height-20:i.top,height:r.config.height,width:r.config.width,scrollY:window.scrollY||0},r.lastStyle=null,r}return lT(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(PC,(function(){e.setAttr("data-state","pause")})),this.on(CC,(function(){e.setAttr("data-state","play")}))}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(cA,n,cA.pluginName)}var r=pC.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",r,this.onCancelClick),this.bind(".play-icon",r,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new bA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:rA,class:"xg-icon-play"},pause:{icon:iA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e,t=this;if(!this.isMini){var n=this.player,r=this.playerConfig,i=this.config.target||this.player.root;this.lastStyle={},pC.addClass(n.root,"xgplayer-mini"),Dw(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=i.style[e],i.style[e]="".concat(t.pos[e],"px")})),r.fluid&&(i.style["padding-top"]=""),this.emit(QC,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,r=this.playerConfig,i=this.config.target||this.player.root;(pC.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Dw(t=sk(this.lastStyle)).call(t,(function(t){i.style[t]=e.lastStyle[t]}));this.lastStyle=null,r.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*r.height/r.width,"%")),this.emit(QC,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=pC.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-mini-layer class="xg-mini-layer">\n <xg-mini-header class="xgplayer-mini-header">\n '.concat(uA(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n </xg-mini-header>\n <div class="mini-cancel-btn">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>\n </svg>\n </div>\n <div class="play-icon">\n </div>\n </xg-mini-layer>')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),n}(jx),kA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},EA=["videoClick","videoDbClick"],TA=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=fT(r),n=t.player,i=t.playerConfig;n.isActive||(n.focus({autoHide:!i.closeDelayBlur}),!i.closeFocusVideoFocus&&n.media.focus())})),uT(fT(r),"onMouseEnter",(function(e){var t=fT(r),n=t.playerConfig,i=t.player;!n.closeFocusVideoFocus&&i.media.focus(),n.closeDelayBlur?i.focus({autoHide:!1}):i.focus()})),uT(fT(r),"onMouseLeave",(function(e){var t=r.playerConfig,n=t.closePlayerBlur,i=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(i?r.player.focus({autoHide:!0,delay:i}):r.player.blur())})),uT(fT(r),"onVideoClick",(function(e){var t=fT(r),n=t.player,i=t.playerConfig;e.target&&i.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),i.closeVideoStopPropagation||e.stopPropagation(),r._clickCount++,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),r.clickTimer=setTimeout((function(){r._clickCount&&(r._clickCount--,xx(fT(r),EA[0],(function(e,t){r.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(r.clickTimer),r.clickTimer=null)}),300))})),uT(fT(r),"onVideoDblClick",(function(e){var t=fT(r),n=t.player,i=t.playerConfig;i.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!i.closeVideoClick&&r._clickCount<2?r._clickCount=0:(r._clickCount=0,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),e.preventDefault(),e.stopPropagation(),xx(fT(r),EA[1],(function(e,t){r.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),r}return lT(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Dw(EA).call(EA,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===wC.device&&!wC.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,r=n.video,i=n.root,o=this.playerConfig.enableContextmenu;i&&i.addEventListener("click",this.onVideoClick,!1),i&&i.addEventListener("dblclick",this.onVideoDblClick,!1),Dw(e=sk(kA)).call(e,(function(e){i.addEventListener(e,t[kA[e]],!1)})),o&&r&&r.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var t=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:t.paused,to:!t.paused}),t.ended?t.duration!==1/0&&t.duration>0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e,t=this,n=this.player,r=n.video,i=n.root;this.clickTimer&&clearTimeout(this.clickTimer),i.removeEventListener("click",this.onVideoClick,!1),i.removeEventListener("dblclick",this.onVideoDblClick,!1),r.removeEventListener("contextmenu",this.onContextmenu,!1),Dw(e=sk(kA)).call(e,(function(e){i.removeEventListener(e,t[kA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(Ax),SA="press",CA="pressend",xA="doubleclick",PA="click",AA="touchmove",IA="touchstart",RA="touchend",OA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},MA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function DA(e){return e&&e.length>0?e[e.length-1]:null}var LA=function(){function e(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};aT(this,e),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Dw(n=sk(i)).call(n,(function(e){r.config[e]=i[e]})),this.root=t,this.events="mouse"===i.eventType?MA:OA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return lT(e,[{key:"_initEvent",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this),this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(SA,e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(xA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(PA,e)}),n.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var n,r=this.__handlers[e],i=-1,o=0;o<r.length;o++)if(r[o]===t){i=o;break}if(i>=0)Ak(n=this.__handlers[e]).call(n,i,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Dw(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch($U){console.error("trigger>>:".concat(e),$U)}}))}},{key:"onTouchStart",value:function(e){var t=this._pos,n=this.root,r=DA(e.touches);t.x=r?Zk(r.pageX,10):e.pageX,t.y=r?Zk(r.pageX,10):e.pageX,t.start=!0,this.__setPress(e),n.addEventListener(this.events.end,this.onTouchEnd),n.addEventListener(this.events.cancel,this.onTouchCancel),n.addEventListener(this.events.move,this.onTouchMove),this.trigger(IA,e)}},{key:"onTouchCancel",value:function(e){this.onTouchEnd(e)}},{key:"onTouchEnd",value:function(e){var t=this._pos,n=this.root;this.__clearPress(),n.removeEventListener(this.events.cancel,this.onTouchCancel),n.removeEventListener(this.events.end,this.onTouchEnd),n.removeEventListener(this.events.move,this.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&this.trigger(CA,e),this.trigger(RA,e),!t.press&&!t.moving&&this.__setDb(e),t.press=!1,t.start=!1,t.moving=!1}},{key:"onTouchMove",value:function(e){var t=this._pos,n=this.config,r=DA(e.touches),i=r?Zk(r.pageX,10):e.pageX,o=r?Zk(r.pageY,10):e.pageX,a=i-t.x,s=o-t.y;Math.abs(s)<n.miniStep&&Math.abs(a)<n.miniStep||(this.__clearPress(),t.press&&this.trigger(CA,e),t.press=!1,t.moving=!0,this.trigger(AA,e))}},{key:"destroy",value:function(){var e,t=this,n={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Dw(e=sk(n)).call(e,(function(e){t.root.removeEventListener("touchend",t[n[e]])}))}}]),e}();function NA(){return(new DOMParser).parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}var FA="auto",UA="seeking",BA="playbackrate",VA=["videoClick","videoDbClick"],jA=function(e){cT(n,e);var t=vT(n);function n(e){var r;return aT(this,n),uT(fT(r=t.call(this,e)),"onTouchStart",(function(e){var t=fT(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=r.getTouche(e);if(s&&!i.disableGesture&&r.duration>0&&!n.ended){o.isStart=!0,pC.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Hm(r).call(r,".xg-dur").innerHTML=pC.format(r.duration);var l=r.root.getBoundingClientRect();90===n.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var u=Zk(s.pageX-o.left,10),c=Zk(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=i.scopeL*o.width,o.scopeR=(1-i.scopeR)*o.width,o.scopeM1=o.width*(1-i.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),uT(fT(r),"onTouchMove",(function(e){var t=r.getTouche(e),n=fT(r),i=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&r.duration&&i.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=Zk(t.pageX-i.left,10),c=Zk(t.pageY-i.top,10),h=90===a.rotateDeg?c:u,d=90===a.rotateDeg?u:c;if(Math.abs(h-i.x)>s||Math.abs(d-i.y)>s){var f=h-i.x,p=d-i.y,v=i.scope;if(-1===v&&(0===(v=r.checkScope(h,d,f,p,i))&&(l?a.blur():a.focus({autoHide:!1}),!i.time&&(i.time=Zk(1e3*a.currentTime,10)+1e3*r.timeOffset)),i.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;e.cancelable&&e.preventDefault(),r.executeMove(f,p,v,i.width,i.height),i.x=h,i.y=d}}})),uT(fT(r),"onTouchEnd",(function(e){var t=fT(r),n=t.player,i=t.pos,o=t.playerConfig;if(i.isStart){i.scope>-1&&e.cancelable&&e.preventDefault();var a=r.config,s=a.disableGesture,l=a.gestureX;!s&&l?(r.endLastMove(i.scope),setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10)):i.time=0,i.scope=-1,r.resetPos(),pC.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),r.changeAction(FA)}})),uT(fT(r),"onRootTouchMove",(function(e){!r.config.disableGesture&&r.config.gestureX&&r.checkIsRootTarget(e)&&(e.stopPropagation(),r.pos.isStart?r.onTouchMove(e):r.onTouchStart(e))})),uT(fT(r),"onRootTouchEnd",(function(e){r.pos.isStart&&r.checkIsRootTarget(e)&&(e.stopPropagation(),r.onTouchEnd(e))})),r.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},r.timer=null,r}return lT(n,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:NA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Dw(VA).call(VA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,r=this.config,i=this.player;!0===n.closeVideoDblclick&&(r.closedbClick=!0),this.resetPos(),pC.isUndefined(n.disableGesture)||(r.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=pC.createDom("xg-mask","",{},"xgmask"),i.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new LA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),i.root.addEventListener("touchmove",this.onRootTouchMove,!0),i.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(DC,(function(){var e=t.player,n=t.config;1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([MC,xC],(function(){var e=t.pos,n=e.time;!e.isStart&&n>0&&(t.pos.time=0)}));var a={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Dw(e=sk(a)).call(e,(function(e){t.touch.on(e,(function(n){t[a[e]](n)}))})),!r.disableActive){var s=i.plugins.progress;s&&(s.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),s.addCallBack("dragend",(function(){t.changeAction(FA)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Hm(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor;t&&(Hm(this).call(this,".xg-curbar").style.backgroundColor=t,Hm(this).call(this,".xg-cur").style.color=t);n&&(Hm(this).call(this,".xg-bar").style.backgroundColor=n,Hm(this).call(this,".time-preview").style.color=n);this.config.disableTimeProgress&&pC.addClass(Hm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Dw(e=["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"]).call(e,(function(e){t.pos[e]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var n=t.plugins.start;n&&n.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,n,r,i){var o=i.width,a=-1;if(e<0||e>o)return a;var s=0===r?Math.abs(n):Math.abs(n/r);return Math.abs(n)>0&&s>=1.73&&e>i.scopeM1&&e<i.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<i.scopeL?1:e>i.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,r,i){switch(n){case 0:this.updateTime(e/r*this.config.scopeM);break;case 1:this.updateBrightness(t/i);break;case 2:wC.os.isIos||this.updateVolume(t/i)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,r=this.player,i=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)r.seek(Number(o).toFixed(1)),i.hideControlsEnd?r.blur():r.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(FA)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,n=this.config,r=this.playerConfig;t.state<CP?r.closeVideoClick||(this.sendUseAction(pC.createEvent("click")),t.play()):!n.closedbClick||r.closeVideoClick?t.isActive?t.blur():t.focus():r.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(pC.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=CP&&(this.sendUseAction(pC.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;xx(this,VA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;xx(this,VA[1],(function(e,n){t.dbClickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:r.playbackRate,to:n.pressRate}),r.playbackRate=n.pressRate,this.changeAction(BA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:r.playbackRate,to:t.rate}),r.playbackRate=t.rate,t.rate=1,this.changeAction(FA))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,r=this.player.duration;e=Number(e.toFixed(4));var i=Zk(e*n.moveDuration,10)+this.timeOffset;i=(i+=this.pos.time)<0?0:i>1e3*r?1e3*r-200:i,t.getPlugin("time")&&t.getPlugin("time").updateTime(i/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(i/1e3/this.duration,!0),this.activeSeekNote(i/1e3,e>0),n.isTouchingSeek&&t.seek(Number((i-this.timeOffset)/1e3).toFixed(1)),this.pos.time=i}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=Zk(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var r=Zk(10*t.volume,10)-Zk(n.volume/10,10);r=r>10?10:r<1?0:r,t.volume=r/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,r=this.xgMask,i=t.light+.8*e;i=i>n.maxDarkness?n.maxDarkness:i<0?0:i,r&&(r.style.backgroundColor="rgba(0,0,0,".concat(i,")")),t.light=i}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,r=this.config,i=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!i&&!r.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(UA);var o=n.plugins.start;if(o&&o.focusHide(),Hm(this).call(this,".xg-dur").innerHTML=pC.format(this.duration),Hm(this).call(this,".xg-cur").innerHTML=pC.format(e),Hm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)pC.removeClass(Hm(this).call(this,".xg-seek-show"),"xg-back");else pC.addClass(Hm(this).call(this,".xg-seek-show"),"xg-back");this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<TP)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!1}},{key:"enableGesture",value:function(){this.config.disableGesture=!0}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0)}},{key:"render",value:function(){var e,t,n,r="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Mm(e=Mm(t=Mm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(r,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(n,this.config.disableSeekIcon?" hide-seek-icon":"",'">\n <i class="xg-seek-icon"></i>\n <span class="xg-cur">00:00</span>\n <span>/</span>\n <span class="xg-dur">00:00</span>\n </div>\n <div class="xg-bar xg-timebar">\n <div class="xg-curbar"></div>\n </div>\n </div>\n <div class="xg-playbackrate xg-top-note">\n <span><i>')).call(t,this.config.pressRate,"X</i>")).call(e,this.i18n.FORWARD,"</span>\n </div>\n </xg-trigger>\n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),n}(jx);function HA(e){e.preventDefault(),e.returnValue=!1}var zA=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){var t=e||window.event;if(r.player&&(r.player.isUserActive||r.config.isIgnoreUserActive)&&!(r.config.disable||r.config.disableBodyTrigger||!r.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey)){var n,i,o=t.keyCode;return!(t.target!==document.body&&(!r.config.isGlobalTrigger||(n=t.target,i=n.tagName,"INPUT"===i||"TEXTAREA"===i||n.isContentEditable))||!r.checkCode(o,!0))&&(HA(t),r.handleKeyCode(o,e),!1)}})),uT(fT(r),"onKeydown",(function(e){var t=e||window.event;if(!(r.config.disable||r.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)&&(r.player.isUserActive||r.config.isIgnoreUserActive)&&(r.player.isUserActive||r.config.isIgnoreUserActive)){if(!t||37!==t.keyCode&&!r.checkCode(t.keyCode)||t.target!==r.player.root&&t.target!==r.player.video&&t.target!==r.player.controls.el)return!0;HA(t),r.handleKeyCode(t.keyCode,e)}})),r}return lT(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Dw(e=sk(n)).call(e,(function(e){var r;t.keyCodeMap[e]?Dw(r=["keyCode","action","disable","isBodyTarget"]).call(r,(function(r){n[e][r]&&(t.keyCodeMap[e][r]=n[e][r])})):t.keyCodeMap[e]=n[e]}))}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e="function"==typeof this.config.seekStep?this.config.seekStep(this.player):this.config.seekStep;e&&"number"==typeof e&&(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disable:!1},right:{keyCode:39,action:"seek",disable:!1},esc:{keyCode:27,action:"exitFullscreen",disable:!1}},this.mergekeyCodeMap(),this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,r=e.bottom,i=window.innerHeight;return!(n<0&&n<0-.9*t||r>0&&r-i>.9*t)}},{key:"checkCode",value:function(e,t){var n,r=this,i=!1;return Dw(n=sk(this.keyCodeMap)).call(n,(function(n){r.keyCodeMap[n]&&e===r.keyCodeMap[n].keyCode&&!r.keyCodeMap[n].disable&&(i=!t||t&&!r.keyCodeMap[n].noBodyTarget)})),i}},{key:"downVolume",value:function(e){var t=this.player,n=fS((t.volume-.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n>=0?n:0}},{key:"upVolume",value:function(e){var t=this.player,n=fS((t.volume+.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n<=1?n:1}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,r=t.duration,i=n,o={currentTime:{from:n,to:i=n+this.seekStep<=r?n+this.seekStep:r}};this.emitUserAction(e,"seek",{props:o}),this.player.currentTime=i}},{key:"seekBack",value:function(e){var t=this.player.currentTime,n=0;t-this.seekStep>=0&&(n=t-this.seekStep);var r={currentTime:{from:t,to:n}};this.emitUserAction(e,"seek",{props:r}),this.player.currentTime=n}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,n=t.fullscreen,r=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),r&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:r,to:!r}),t.exitCssFullscreen())}},{key:"handleKeyCode",value:function(e,t){var n,r=this;Dw(n=sk(this.keyCodeMap)).call(n,(function(n){var i=r.keyCodeMap[n],o=i.action,a=i.keyCode,s=i.disable;a!==e||s||("function"==typeof o?o(t,r.player):"string"==typeof o&&"function"==typeof r[o]&&r[o](t,r.player),r.emit(ox,iT({key:n,target:t.target},r.keyCodeMap[n])))}))}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!0,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!1,keyCodeMap:{},disable:!1,isIgnoreUserActive:!1}}}]),n}(Ax);function WA(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n',"image/svg+xml").firstChild}var GA=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"registerIcons",value:function(){return{loadingIcon:WA}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n <xg-loading class="xgplayer-loading">\n <xg-loading-inner></xg-loading-inner>\n </xg-loading>'}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:Fx.ROOT}}}]),n}(jx),KA=An,YA=ea.findIndex,XA="findIndex",qA=!0;XA in[]&&Array(1)[XA]((function(){qA=!1})),KA({target:"Array",proto:!0,forced:qA},{findIndex:function(e){return YA(this,e,arguments.length>1?arguments[1]:void 0)}});var JA=Hc("Array").findIndex,QA=se,ZA=JA,$A=Array.prototype,eI=n((function(e){var t=e.findIndex;return e===$A||QA($A,e)&&t===$A.findIndex?ZA:t})),tI=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onMouseenter",(function(e){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),uT(fT(r),"_onMouseLeave",(function(e){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return lT(n,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave)}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(jx),nI=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"afterCreate",value:function(){var e=this;gT(hT(n.prototype),"afterCreate",this).call(this);var t=this.player;this.config.disable||(this.initIcons(),this.btnClick=this.btnClick.bind(this),this.bind(["touchend","click"],this.btnClick),this.on([PC,AC,FC],(function(){e.animate(t.paused)})),this.on(CC,(function(){e.animate(t.paused)})),this.animate(!0))}},{key:"registerIcons",value:function(){return{play:{icon:rA,class:"xg-icon-play"},pause:{icon:iA,class:"xg-icon-pause"}}}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player;return this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),this.animate(!1)):(t.pause(),this.animate(!0)),!1}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var t=this.i18nKeys,n=Hm(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){gT(hT(n.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(uA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:Fx.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(tI);function rI(){return(new DOMParser).parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>',"image/svg+xml").firstChild}var iI=function(e){cT(n,e);var t=vT(n);function n(){return aT(this,n),t.apply(this,arguments)}return lT(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:rI,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){pC.addClass(this.root,"show")}},{key:"hide",value:function(){pC.removeClass(this.root,"show")}},{key:"render",value:function(){return'<xg-icon class="xgplayer-back">\n </xg-icon>'}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:Fx.ROOT_TOP,index:0}}}]),n}(jx);function oI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n',"image/svg+xml").firstChild}function aI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n',"image/svg+xml").firstChild}var sI=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return lT(n,[{key:"afterCreate",value:function(){var e=this;gT(hT(n.prototype),"afterCreate",this).call(this);var t=this.config,r=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=pC.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(qC,(function(t){var n=Hm(e).call(e,".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:iI,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===wC.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:oI,class:"xg-get-fullscreen"},exitFullscreen:{icon:aI,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){gT(hT(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===wC.device?"touchend":"click",this.handleFullscreen),"mobile"===wC.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?t.exitFullscreen():t.getFullscreen().catch((function(e){}))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"show",value:function(){gT(hT(n.prototype),"show",this).call(this)}},{key:"hide",value:function(){gT(hT(n.prototype),"hide",this).call(this)}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(uA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:Fx.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(tI);function lI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function uI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function cI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n',"image/svg+xml").firstChild}var hI=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=fT(r).player,n=Hm(r).call(r,".xgplayer-bar");pC.event(e);var i=n.getBoundingClientRect(),o=pC.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,e),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),uT(fT(r),"onBarMouseMove",(function(e){var t=fT(r)._d;if(t.isStart){var n=fT(r),i=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),pC.event(e);var a=pC.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,e)}})),uT(fT(r),"onBarMouseUp",(function(e){pC.event(e),document.removeEventListener("mouseup",r.onBarMouseUp);var t=fT(r)._d;t.isStart=!1,t.isMoving=!1})),uT(fT(r),"onMouseenter",(function(e){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),uT(fT(r),"onMouseleave",(function(e){r._d.isActive=!1,r.unFocus(100,!1,e),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),uT(fT(r),"onVolumeChange",(function(e){if(r.player){var t=r.player,n=t.muted,i=t.volume;r._d.isMoving||(Hm(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return lT(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:uI,class:"xg-volume-small"},volumeLarge:{icon:lI,class:"xg-volume"},volumeMuted:{icon:cI,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,n=t.commonStyle,r=t.volume;if(n.volumeColor)Hm(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;this.changeMutedHandler=this.hook("mutedChange",(function(t){e.changeMuted(t)}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==wC.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(LC,this.onVolumeChange),this.once(NC,this.onVolumeChange),"Number"!==pC.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,r=Hm(this).call(this,".xgplayer-drag"),i=Hm(this).call(this,".xgplayer-bar");if(i&&r){var o=Zk(e/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,n=e.muted,r=Hm(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);r.innerText=n?0:Math.ceil(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(pC.clearTimeout(this,this._timerId),this._timerId=null),pC.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(pC.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=pC.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),pC.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(r)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(pC.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===wC.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,n=this.config.showValueLabel;return Mm(e='\n <xg-icon class="xgplayer-volume" data-state="normal">\n <div class="xgplayer-icon">\n </div>\n <xg-slider class="xgplayer-slider">\n '.concat(n?'<div class="xgplayer-value-label">'.concat(100*t,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(e,100*t,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:Fx.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(jx);function dI(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}function fI(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}var pI="picture-in-picture",vI="inline",gI="fullscreen",yI=function(e){cT(n,e);var t=vT(n);function n(){var e,r;aT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return uT(fT(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!r.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),r.isPip?(r.exitPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),r.setAttr("data-state","normal")):4===r.player.media.readyState&&(r.requestPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),r.setAttr("data-state","pip"))})),r}return lT(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.pip&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(gT(hT(n.prototype),"afterCreate",this).call(this),this.pMode=vI,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(WC,(function(){e.config.showIcon&&(pC.removeClass(Hm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:dI,class:"xg-get-pip"},pipIconExit:{icon:fI,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,t=this.player;this.leavePIPCallback=function(){var n=t.paused;pC.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),t.emit(rx,!1)},this.enterPIPCallback=function(n){t.emit(rx,!0),e.pipWindow=n.pictureInPictureWindow,e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var r=t.media.webkitPresentationMode;e.pMode===gI&&r!==gI&&t.onFullscreenChange(null,!1),e.pMode=r,r===pI?e.enterPIPCallback(n):r===vI&&e.leavePIPCallback(n)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"requestPIP",value:function(){var e=this.player,t=this.playerConfig;if(this.isPIPAvailable()&&!this.isPip)try{var r=t.poster;return r&&(e.media.poster="String"===pC.typeOf(r)?r:r.poster),n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("picture-in-picture"):e.media.requestPictureInPicture(),!0}catch(i){return console.error("requestPiP",i),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{return this.isPIPAvailable()&&this.isPip&&(n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture()),!0}catch(t){return console.error("exitPIP",t),!1}}},{key:"isPip",get:function(){var e=this.player;return document.pictureInPictureElement&&document.pictureInPictureElement===e.media||e.media.webkitPresentationMode===pI}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return("Boolean"!==pC.typeOf(document.pictureInPictureEnabled)||document.pictureInPictureEnabled)&&("Boolean"===pC.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===pC.typeOf(e.webkitSetPresentationMode))}},{key:"destroy",value:function(){gT(hT(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(this.config.showIcon&&this.isPIPAvailable())return'<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(uA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:Fx.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),n}(tI),mI=o,_I=dt("iterator"),bI=!mI((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[_I]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),wI=An,kI=i,EI=O,TI=g,SI=A,CI=bI,xI=ro,PI=oo,AI=I_,II=Io,RI=Hl,OI=Ko,MI=Yd,DI=x,LI=Ze,NI=Jt,FI=tr,UI=nn,BI=ee,VI=Yr,jI=Bi,HI=B,zI=Zh,WI=Gh,GI=of,KI=PS,YI=dt("iterator"),XI="URLSearchParams",qI=XI+"Iterator",JI=OI.set,QI=OI.getterFor(XI),ZI=OI.getterFor(qI),$I=Object.getOwnPropertyDescriptor,eR=function(e){if(!SI)return kI[e];var t=$I(kI,e);return t&&t.value},tR=eR("fetch"),nR=eR("Request"),rR=eR("Headers"),iR=nR&&nR.prototype,oR=rR&&rR.prototype,aR=kI.RegExp,sR=kI.TypeError,lR=kI.decodeURIComponent,uR=kI.encodeURIComponent,cR=TI("".charAt),hR=TI([].join),dR=TI([].push),fR=TI("".replace),pR=TI([].shift),vR=TI([].splice),gR=TI("".split),yR=TI("".slice),mR=/\+/g,_R=Array(4),bR=function(e){return _R[e-1]||(_R[e-1]=aR("((?:%[\\da-f]{2}){"+e+"})","gi"))},wR=function(e){try{return lR(e)}catch($U){return e}},kR=function(e){var t=fR(e,mR," "),n=4;try{return lR(t)}catch($U){for(;n;)t=fR(t,bR(n--),wR);return t}},ER=/[!'()~]|%20/g,TR={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},SR=function(e){return TR[e]},CR=function(e){return fR(uR(e),ER,SR)},xR=RI((function(e,t){JI(this,{type:qI,iterator:zI(QI(e).entries),kind:t})}),"Iterator",(function(){var e=ZI(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),PR=function(e){this.entries=[],this.url=null,void 0!==e&&(BI(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===cR(e,0)?yR(e,1):e:VI(e)))};PR.prototype={type:XI,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,l=WI(e);if(l)for(n=(t=zI(e,l)).next;!(r=EI(n,t)).done;){if(o=(i=zI(UI(r.value))).next,(a=EI(o,i)).done||(s=EI(o,i)).done||!EI(o,i).done)throw sR("Expected sequence with length 2");dR(this.entries,{key:VI(a.value),value:VI(s.value)})}else for(var u in e)LI(e,u)&&dR(this.entries,{key:u,value:VI(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=gR(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=gR(t,"="),dR(this.entries,{key:kR(pR(n)),value:kR(hR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],dR(n,CR(e.key)+"="+CR(e.value));return hR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var AR=function(){MI(this,IR);var e=JI(this,new PR(arguments.length>0?arguments[0]:void 0));SI||(this.length=e.entries.length)},IR=AR.prototype;if(AI(IR,{append:function(e,t){GI(arguments.length,2);var n=QI(this);dR(n.entries,{key:VI(e),value:VI(t)}),SI||this.length++,n.updateURL()},delete:function(e){GI(arguments.length,1);for(var t=QI(this),n=t.entries,r=VI(e),i=0;i<n.length;)n[i].key===r?vR(n,i,1):i++;SI||(this.length=n.length),t.updateURL()},get:function(e){GI(arguments.length,1);for(var t=QI(this).entries,n=VI(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){GI(arguments.length,1);for(var t=QI(this).entries,n=VI(e),r=[],i=0;i<t.length;i++)t[i].key===n&&dR(r,t[i].value);return r},has:function(e){GI(arguments.length,1);for(var t=QI(this).entries,n=VI(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){GI(arguments.length,1);for(var n,r=QI(this),i=r.entries,o=!1,a=VI(e),s=VI(t),l=0;l<i.length;l++)(n=i[l]).key===a&&(o?vR(i,l--,1):(o=!0,n.value=s));o||dR(i,{key:a,value:s}),SI||(this.length=i.length),r.updateURL()},sort:function(){var e=QI(this);KI(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=QI(this).entries,r=NI(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new xR(this,"keys")},values:function(){return new xR(this,"values")},entries:function(){return new xR(this,"entries")}},{enumerable:!0}),xI(IR,YI,IR.entries,{name:"entries"}),xI(IR,"toString",(function(){return QI(this).serialize()}),{enumerable:!0}),SI&&PI(IR,"size",{get:function(){return QI(this).entries.length},configurable:!0,enumerable:!0}),II(AR,XI),wI({global:!0,constructor:!0,forced:!CI},{URLSearchParams:AR}),!CI&&DI(rR)){var RR=TI(oR.has),OR=TI(oR.set),MR=function(e){if(BI(e)){var t,n=e.body;if(FI(n)===XI)return t=e.headers?new rR(e.headers):new rR,RR(t,"content-type")||OR(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),jI(e,{body:HI(0,VI(n)),headers:HI(0,t)})}return e};if(DI(tR)&&wI({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return tR(e,arguments.length>1?MR(arguments[1]):{})}}),DI(nR)){var DR=function(e){return MI(this,iR),new nR(e,arguments.length>1?MR(arguments[1]):{})};iR.constructor=DR,DR.prototype=iR,wI({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:DR})}}var LR=function(){function e(t){aT(this,e),this.config=t.config,this.parent=t.root,this.root=pC.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var r="mobile"===wC.device?"touchend":"click";this._delegates=jx.delegate.call(this,this.root,"li",r,this.onItemClick)}return lT(e,[{key:"renderItemList",value:function(e){var t,n=this,r=this.config,i=this.root;(e?r.data=e:e=r.data,r.style)&&Dw(t=sk(r.style)).call(t,(function(e){i.style[e]=r[e]}));e.length>0&&(this.attrKeys=sk(e[0])),this.root.innerHTML="",Dw(e).call(e,(function(e,t){var r=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(pC.createDom("li","<span>".concat(e.showText,"</span>"),e,r))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&pC.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,r=this.root.querySelector(".selected");pC.addClass(t,"selected"),r&&pC.removeClass(r,"selected"),n(e,{from:r?this.getAttrObj(r,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Dw(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var r=e.getAttribute("data-index");return r&&(n.index=Number(r)),n}},{key:"show",value:function(){pC.removeClass(this.root,"hide"),pC.addClass(this.root,"active")}},{key:"hide",value:function(){pC.removeClass(this.root,"active"),pC.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;sk(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Dw(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null);this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),NR=te,FR=h;NR.JSON||(NR.JSON={stringify:JSON.stringify});var UR=function(e,t,n){return FR(NR.JSON.stringify,null,arguments)},BR=n(UR),VR=n(ao.f("toStringTag")),jR=An,HR=E;P.f;var zR=Un,WR=Yr,GR=Ww,KR=X,YR=Kw,XR=HR("".startsWith),qR=HR("".slice),JR=Math.min;jR({target:"String",proto:!0,forced:!YR("startsWith")},{startsWith:function(e){var t=WR(KR(this));GR(e);var n=zR(JR(arguments.length>1?arguments[1]:void 0,t.length)),r=WR(e);return XR?XR(t,r,n):qR(t,n,n+r.length)===r}});var QR,ZR=Hc("String").startsWith,$R=se,eO=ZR,tO=String.prototype,nO=n((function(e){var t=e.startsWith;return"string"==typeof e||e===tO||$R(tO,e)&&t===tO.startsWith?eO:t})),rO={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange"},iO=Pm(Pm({},hx),rO),oO=(Ry(QR={},rO.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Ry(QR,rO.AUTOPLAY_STARTED,{event:HC}),Ry(QR,rO.AUTOPLAY_PREVENTED,{event:zC}),Ry(QR,rO.FULLSCREEN_CHANGE,{event:qC}),Ry(QR,rO.CSS_FULLSCREEN_CHANGE,{event:JC}),Ry(QR,rO.MINI_STATE_CHANGE,{event:QC}),Ry(QR,rO.DEFINITION_CHANGE,{event:ZC}),Ry(QR,rO.BEFORE_DEFINITION_CHANGE,{event:$C}),Ry(QR,rO.AFTER_DEFINITION_CHANGE,{event:ex}),Ry(QR,rO.VIDEO_RESIZE,{event:nx}),Ry(QR,rO.PIP_CHANGE,{event:rx}),Ry(QR,rO.USER_ACTION,{event:ax}),Ry(QR,rO.DOWNLOAD_SPEED_CHANGE,{event:XC}),QR);var aO=/["'&<>]/;function sO(e,t){return function(e){if(ry(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==nc&&ay(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(ch(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ey(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lO=A,uO=g,cO=pi,hO=Q,dO=uO(M.f),fO=uO([].push),pO=function(e){return function(t){for(var n,r=hO(t),i=cO(r),o=i.length,a=0,s=[];o>a;)n=i[a++],lO&&!dO(r,n)||fO(s,e?[n,r[n]]:r[n]);return s}},vO={entries:pO(!0),values:pO(!1)},gO=vO.entries;An({target:"Object",stat:!0},{entries:function(e){return gO(e)}});var yO=n(te.Object.entries);function mO(e,t){var n=void 0!==nc&&ay(e)||e["@@iterator"];if(!n){if(ry(e)||(n=Ey(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var _O=Re,bO=qe,wO=W,kO=Vn,EO=TypeError,TO=function(e){return function(t,n,r,i){_O(n);var o=bO(t),a=wO(o),s=kO(o),l=e?s-1:0,u=e?-1:1;if(r<2)for(;;){if(l in a){i=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw EO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(i=n(i,a[l],l,o));return i}},SO={left:TO(!1),right:TO(!0)}.left;An({target:"Array",proto:!0,forced:!Bd&&ve>79&&ve<83||!Uc("reduce")},{reduce:function(e){var t=arguments.length;return SO(this,e,t,t>1?arguments[1]:void 0)}});var CO=Hc("Array").reduce,xO=se,PO=CO,AO=Array.prototype,IO=n((function(e){var t=e.reduce;return e===AO||xO(AO,e)&&t===AO.reduce?PO:t}));var RO=function(){function e(t){var n;Sy(this,e),Ry(this,"definition",void 0),Ry(this,"source",void 0),Ry(this,"text",void 0),Ry(this,"fallbackUrl",void 0),Ry(this,"urls",void 0),Ry(this,"_currentUrlRef",void 0);var r=t.url,i=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=i,this.text=o,this.source=a,this.urls=Mm(n=[r]).call(n,Ty(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,r=1;r<e.length;r++){var i=r===e.length-1?t:null,o={url:e[r],next:i};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return Iy(e,[{key:"url",get:function(){return this._currentUrlRef.url}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),OO=function(){function e(t,n,r){var i=this;Sy(this,e),Ry(this,"name",void 0),Ry(this,"text",void 0),Ry(this,"definitions",void 0),this.definitions=Dw(t).call(t,(function(e){return new RO(DT({},e,{source:i}))})),this.name=n,this.text=r}return Iy(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var n=void 0,r=void 0,i=void 0;if("string"==typeof t?n=t:Array.isArray(t)?i=t:(n=t.url,r=t.fallbackUrls,i=t.sources),"string"==typeof n)return e.normalizeUrl(n,r);if(Array.isArray(i)){if(0===i.length)throw new Error('"sources" cannot be an empty array');return Dw(i).call(i,(function(t){var n;return new e(Dw(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var r=new e([],"unknown");return r.add(new RO({definition:"unknown",url:t,source:r,fallbackUrls:n})),[r]}}]),e}(),MO=function(){function e(t){var n,r,i,o;Sy(this,e),Ry(this,"defaultSource",void 0),Ry(this,"defaultDefinition",void 0),Ry(this,"maxFallbackRound",void 0),Ry(this,"_prepareList",[]),Ry(this,"_currentDefinition",void 0),Ry(this,"_sources",void 0),Ry(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?Hm(this).call(this,a):null===(n=Hm(r=this.sources).call(r,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Hm(i=n.definitions).call(i,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}var t;return Iy(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url}},{key:"find",value:function(e,t){var n,r,i,o,a,s=this;if("string"==typeof e)return Hm(o=IO(a=this.sources).call(a,(function(e,t){return Mm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=Hm(n=this.sources).call(n,(function(t){var n,r;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(r=s.source)||void 0===r?void 0:r.name)})),u=null==l?void 0:Hm(r=l.definitions).call(r,(function(t){var n,r;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(r=s.definition)||void 0===r?void 0:r.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(i=l.definitions)&&void 0!==i&&i.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var n,r,i,o,a;return this._sources=OO.normalize(e),this._currentDefinition=null!==(n=Hm(this).call(this,null!=t?t:{source:null!==(r=this.defaultSource)&&void 0!==r?r:null===(i=this._currentDefinition)||void 0===i?void 0:i.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"registerPrepare",value:function(e){this._prepareList.push(e)}},{key:"prepare",value:(t=ny(ey().mark((function e(t){var n,r,i;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=mO(this._prepareList),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i(t);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))),function(e){return t.apply(this,arguments)})},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function DO(){var e;"undefined"!=typeof Reflect&&ZE?DO=jP(e=ZE).call(e):DO=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=WP(e)););return e}(e,t);if(r){var i=dm(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return DO.apply(this,arguments)}function LO(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var NO=function(e){zP(n,e);var t=KP(n);function n(){var e,r;Sy(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ry(MP(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_error",void 0),r}return Iy(n,[{key:"_errorTip",get:function(){var e,t,n,r=this.player.config.i18nManager,i=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?r.normalize(this.config.errorTipsText):Mm(t="".concat(i?"[".concat(i,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===wC.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:LO,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof $P?e:tA(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),DO(WP(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){DO(WP(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===wC.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(iO.FALLBACK_ERROR,this.showError.bind(this)),this.off(MC,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Mm(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(iO.FALLBACK_ERROR,this.showError.bind(this)),this.on(MC,this.hideError.bind(this)),this.on(CC,this.hideError.bind(this)),this.on(tx,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Hm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Hm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var r=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,i=pC.createDom("div",Mm(n="".concat(r.normalize(e.label),": ")).call(n,r.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",i)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(iO.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,n=Hm(this).call(this,".veplayer-error-refresh");n&&(n.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:jx.POSITIONS.ROOT}}}]),n}(jx),FO=function(e){zP(n,e);var t=KP(n);function n(){var e,r;Sy(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ry(MP(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_toastNumber",0),Ry(MP(r),"_toastMap",{}),r}return Iy(n,[{key:"toast",value:function(e,t){var n=this,r=t||{},i=r.duration,o=void 0===i?2e3:i,a=r.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,n){var r=this,i=pC.createDom("div","",void 0,"veplayer-toast-container"),o=pC.checkIsObject(e)?e:pC.createDom("div",e,void 0,"veplayer-toast-txt");if(i.appendChild(o),t){var a=pC.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){r.remove(n)})),i.appendChild(a)}return i}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(jx);function UO(){return(new DOMParser).parseFromString('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>\n</svg>',"image/svg+xml").firstChild}var BO=function(){function e(t){Sy(this,e),Ry(this,"_root",void 0),Ry(this,"_config",void 0),Ry(this,"_parent",void 0),Ry(this,"_listDom",void 0),Ry(this,"_container",void 0),Ry(this,"_titleDom",void 0),Ry(this,"_player",void 0),Ry(this,"_delegates",void 0),Ry(this,"_listType",void 0);var n=t.config,r=t.root,i=t.player;this._config=n,this._parent=r,this._player=i,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return Iy(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,r=this._config;return e&&(r.list=e),this._listDom||(this._listDom=pC.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=r.list)||void 0===t||Dw(t).call(t,(function(e,t){var r,i,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(r=e.className)&&void 0!==r?r:"");e["data-index"]=t;var a=pC.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(i=n._listDom)||void 0===i||i.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==VO.Inner)return this._titleDom||(this._titleDom=pC.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&pC.removeClass(this._root,"panel-".concat(this._listType)),this._root&&pC.addClass(this._root,"panel-".concat(e));var t="mobile"===wC.device?"touchend":"click";e===VO.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,n,r=Mm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=pC.createDom("div","",{},r),this._parent&&this._parent.appendChild(this._root);var i=this.renderTitle(),o=this.renderItemList();this._container=pC.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),i&&this._container.appendChild(i),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(pC.removeClass(this._root,"hide"),pC.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(pC.removeClass(this._root,"active"),pC.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,r)}},{key:"_unbind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,r)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(qC,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(qC,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,r=ok(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&r)this.changeMode(VO.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var i;this.changeMode(null===(i=this._config)||void 0===i?void 0:i.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===wC.device?"touchend":"click";this._listType===VO.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=jx.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===wC.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(Dw(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,n,r,i,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");pC.addClass(o,"selected"),l&&(pC.removeClass(l,"selected"),i=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==wc(i)?null===(n=this._config.list)||void 0===n?void 0:n[i]:void 0,to:null===(r=this._config.list)||void 0===r?void 0:r[u]};null==a||a(e,c),o&&i===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),VO={Middle:"middle",Bottom:"bottom",Fullscreen:"fullscreen",Inner:"inner"},jO=function(e){return e.Icon="Icon",e.Text="Text",e}(jO||{}),HO="mobile"===wC.device,zO=[VO.Bottom,VO.Fullscreen,VO.Inner],WO=[VO.Middle],GO=[VO.Bottom,VO.Inner,VO.Fullscreen],KO=[VO.Bottom,VO.Inner,VO.Fullscreen],YO=function(e){zP(n,e);var t=KP(n);function n(e){var r;return Sy(this,n),Ry(MP(r=t.call(this,e)),"optionsList",void 0),Ry(MP(r),"_isIcon",void 0),Ry(MP(r),"_isActive",void 0),Ry(MP(r),"_curIndex",void 0),Ry(MP(r),"activeEvent",void 0),Ry(MP(r),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseenter",{pluginName:r.pluginName}),r.toggle(!0)})),Ry(MP(r),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseleave",{pluginName:r.pluginName}),r._isActive&&r.toggle(!1)})),r._isIcon=!1,r._isActive=!1,r._curIndex=0,r}return Iy(n,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&pC.addClass(this.root,"portrait"),HO&&this.on(UC,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=HO?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=sk(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var r=this.appendChild(".xgplayer-icon",pC.createDom("span","",{},"icon-text"));r&&pC.addClass(r,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||pC.addClass(this.root,"show")}},{key:"hide",value:function(){pC.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&ok(GO).call(GO,n)?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n&&ok(GO).call(GO,n)?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var r=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||r&&ok(GO).call(GO,r))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,n=null==e?void 0:e[t];if(n){var r,i=Hm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(i)i.innerHTML=o.normalize(null!==(r=null==n?void 0:n.iconText)&&void 0!==r?r:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var r,i=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof BO&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&ok(KO).call(KO,o.listType)?new BO({config:{list:e||[],onItemClick:function(e,t){i.onItemClick(e,t)},onOptionClick:function(e,t){i.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(r=o.listType)&&void 0!==r?r:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return i.toggle(!1)}},root:s.root,player:s}):new LR({config:{data:e||[],onItemClick:function(e,t){i.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),HO||t&&ok(zO).call(zO,t)||(t=VO.Bottom),HO||t&&ok(WO).call(WO,t)||(t=VO.Middle),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:HO?fD.ROOT_TOP_RIGHT:fD.CONTROLS_RIGHT,listType:HO?VO.Bottom:VO.Middle,index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:HO?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(jx),XO=function(e){zP(n,e);var t=KP(n);function n(){return Sy(this,n),t.apply(this,arguments)}return Iy(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"afterCreate",value:function(){DO(WP(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:UO}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,r=e.source,i=this.player.config.i18nManager,o=Dw(t).call(t,(function(e){var t;return Pm(Pm({},e),{},{showText:null!==(t=i.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=eI(o).call(o,(function(e){return e.name===(null==r?void 0:r.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),DO(WP(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var r,i=this;DO(WP(n.prototype),"onItemClick",this).call(this,e,t),null===(r=this.player.config)||void 0===r||r.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){i.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return Pm(Pm({},YO.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),n}(YO);function qO(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>\n</svg>',"image/svg+xml").firstChild}var JO={exports:{}};!function(e,n){var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",S="[object Int32Array]",C="[object Uint8Array]",x="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",I=/\w*$/,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[b]=M[a]=M[s]=M[w]=M[k]=M[E]=M[T]=M[S]=M[c]=M[h]=M[d]=M[p]=M[v]=M[g]=M[y]=M[C]=M[x]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var D="object"==wc(t)&&t&&t.Object===Object&&t,L="object"==("undefined"==typeof self?"undefined":wc(self))&&self&&self.Object===Object&&self,N=D||L||Function("return this")(),F=n&&!n.nodeType&&n,U=F&&e&&!e.nodeType&&e,B=U&&U.exports===F;function V(e,t){return e.set(t[0],t[1]),e}function j(e,t){return e.add(t),e}function H(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(sU){}return t}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,q=Function.prototype,J=Object.prototype,Q=N["__core-js_shared__"],Z=(Y=/[^.]+$/.exec(Q&&aE(Q)&&aE(Q).IE_PROTO||""))?"Symbol(src)_1."+Y:"",$=q.toString,ee=J.hasOwnProperty,te=J.toString,ne=RegExp("^"+$.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=B?N.Buffer:void 0,ie=N.Symbol,oe=N.Uint8Array,ae=G(vE,Object),se=Object.create,le=J.propertyIsEnumerable,ue=Ak(X),ce=sE,he=re?re.isBuffer:void 0,de=G(sk,Object),fe=Ue(N,"DataView"),pe=Ue(N,"Map"),ve=Ue(N,"Promise"),ge=Ue(N,"Set"),ye=Ue(N,"WeakMap"),me=Ue(Object,"create"),_e=ze(fe),be=ze(pe),we=ze(ve),ke=ze(ge),Ee=ze(ye),Te=ie?ie.prototype:void 0,Se=Te?Te.valueOf:void 0;function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){this.__data__=new xe(e)}function Ie(e,t){var n=Ge(e)||function(e){return function(e){return function(e){return!!e&&"object"==wc(e)}(e)&&Ke(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||je(a,r))||n.push(a);return n}function Re(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Me(e,t,n,r,i,f,m){var R;if(r&&(R=f?r(e,i,f,m):r(e)),void 0!==R)return R;if(!qe(e))return e;var O=Ge(e);if(O){if(R=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,R)}else{var D=Ve(e),L=D==l||D==u;if(Ye(e))return function(e,t){if(t)return lk(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(D==d||D==o||L&&!f){if(z(e))return f?e:{};if(R=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(L?{}:e),!t)return function(e,t){return Ne(e,Be(e),t)}(e,function(e,t){return e&&Ne(t,Je(t),e)}(R,e))}else{if(!M[D])return f?e:{};R=function(e,t,n,r){var i=e.constructor;switch(t){case _:return Le(e);case a:case s:return new i(+e);case b:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case k:case E:case T:case S:case C:case x:case P:case A:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case c:return function(e,t,n){var r=t?n(W(e),!0):W(e);return H(r,V,new e.constructor)}(e,r,n);case h:case g:return new i(e);case p:return function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var r=t?n(K(e),!0):K(e);return H(r,j,new e.constructor)}(e,r,n);case y:return o=e,Se?Object(Se.call(o)):{}}var o}(e,D,Me,t)}}m||(m=new Ae);var N=m.get(e);if(N)return N;if(m.set(e,R),!O)var F=n?function(e){return function(e,t,n){var r=t(e);return Ge(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Je,Be)}(e):Je(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(F||e,(function(i,o){F&&(i=e[o=i]),Re(R,o,Me(i,t,n,r,o,e,m))})),R}function De(e){return!(!qe(e)||(t=e,Z&&Z in t))&&(Xe(e)||z(e)?ne:R).test(ze(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r?r(n[a],e[a],a,n,e):void 0;Re(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,r,i=e.__data__;return("string"==(r=wc(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:Dw(i)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return De(n)?n:void 0}Ce.prototype.clear=function(){this.__data__=me?me(null):{}},Ce.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ce.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},Ce.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Ce.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?r:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},xe.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Oe(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Ce,map:new(pe||xe),string:new Ce}},Pe.prototype.delete=function(e){return Fe(this,e).delete(e)},Pe.prototype.get=function(e){return Fe(this,e).get(e)},Pe.prototype.has=function(e){return Fe(this,e).has(e)},Pe.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new xe},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Pe(r)}return n.set(e,t),this};var Be=ce?G(ce,Object):function(){return[]},Ve=function(e){return te.call(e)};function je(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function ze(e){if(null!=e){try{return $.call(e)}catch(sU){}try{return e+""}catch(sU){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(fe&&Ve(new fe(new ArrayBuffer(1)))!=b||pe&&Ve(new pe)!=c||ve&&Ve(ve.resolve())!=f||ge&&Ve(new ge)!=v||ye&&Ve(new ye)!=m)&&(Ve=function(e){var t=te.call(e),n=t==d?e.constructor:void 0,r=n?ze(n):void 0;if(r)switch(r){case _e:return b;case be:return c;case we:return f;case ke:return v;case Ee:return m}return t});var Ge=Array.isArray;function Ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Xe(e)}var Ye=he||function(){return!1};function Xe(e){var t=qe(e)?te.call(e):"";return t==l||t==u}function qe(e){var t=wc(e);return!!e&&("object"==t||"function"==t)}function Je(e){return Ke(e)?Ie(e):function(e){if(!He(e))return de(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(JO,JO.exports);var QO=n(JO.exports),ZO=function(e){zP(r,e);var t,n=KP(r);function r(){var e,t;Sy(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ry(MP(t=n.call.apply(n,Mm(e=[this]).call(e,o))),"_waitingStartTime",0),Ry(MP(t),"_timer",void 0),Ry(MP(t),"_toastId",void 0),t}return Iy(r,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;DO(WP(r.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(iO.WAITING,this._waiting.bind(this)),this.on(iO.PLAYING,this._clearTimer.bind(this)),this.on(iO.PAUSE,this._clearTimer.bind(this)),this.on(iO.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:qO}}}},{key:"renderItemList",value:function(){var e,t,n,i=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[],s=Dw(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=i.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=eI(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),DO(WP(r.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,i=this;this._showToast(t.to),DO(WP(r.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){i.renderItemList()}))}},{key:"fallback",value:(t=ny(ey().mark((function e(){var t,n,r,i,o,a,s,l=arguments;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},i=this.player.config.sourceManager,!((o=eI(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=i.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=QO(i.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!r.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(iO.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(iO.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,n=this.player.config.i18nManager;return new Lw((function(r){var i,o,a=null===(i=t.player)||void 0===i?void 0:i.getPlugin("toast");if(a){var s=pC.createDom("div",n.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,u=pC.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),r(!0)}))}else r(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var r=e+1,i=Hm(n).call(n,{definition:this.config.demotePriority[r]});return i||this._getNextDefinition(r)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(iO.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,r,i=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(Mm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(r=e.text&&this.player.config.i18nManager.normalize(e.text))&&void 0!==r?r:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(iO.AFTER_DEFINITION_CHANGE,(function(){void 0!==i._toastId&&o.remove(i._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Pm(Pm({},YO.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),r}(YO),$O={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]"},eM=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e}(eM||{}),tM=function(){function e(t){var n=this;Sy(this,e),Ry(this,"modules",{}),Ry(this,"mountPromiseMap",{}),Ry(this,"_baseUrl",void 0),Ry(this,"_moduleSystem",void 0),Ry(this,"load",function(){var e=ny(ey().mark((function e(t,r){var i,o,a,s,l;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if($O[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=n.modules[t].exports,e.abrupt("return",null!==(i=o.default)&&void 0!==i?i:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,$O[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=r?r:s,name:t,state:0,exports:{}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Ry(this,"register",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),this._baseUrl=t.baseUrl}return Iy(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new Lw((function(n,r){var i=document.createElement("script");i.src=e.src,i.onload=function(){e.state=1,n(t[e.name].exports),i.onload=null},i.onerror=function(t){e.state=2,e.error=t,r(t),i.onerror=null},document.body.appendChild(i)}))}}]),e}(),nM=h,rM=Q,iM=Ln,oM=Vn,aM=Uc,sM=Math.min,lM=[].lastIndexOf,uM=!!lM&&1/[1].lastIndexOf(1,-0)<0,cM=aM("lastIndexOf"),hM=uM||!cM?function(e){if(uM)return nM(lM,this,arguments)||0;var t=rM(this),n=oM(t),r=n-1;for(arguments.length>1&&(r=sM(r,iM(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:lM;An({target:"Array",proto:!0,forced:hM!==[].lastIndexOf},{lastIndexOf:hM});var dM,fM,pM=Hc("Array").lastIndexOf,vM=se,gM=pM,yM=Array.prototype,mM=n((function(e){var t=e.lastIndexOf;return e===yM||vM(yM,e)&&t===yM.lastIndexOf?gM:t})),_M=null!==(dM=null===(fM=document.currentScript)||void 0===fM?void 0:fM.src)&&void 0!==dM?dM:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.0.0-rc.0","/object/umd/"),bM=new tM({baseUrl:lk(_M).call(_M,0,mM(_M).call(_M,"/"))}),wM=bM.register;function kM(e,t){return EM.apply(this,arguments)}function EM(){return(EM=ny(ey().mark((function e(t,n){var r;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bM.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),eA(JP.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(r=e.t0.target)||void 0===r?void 0:r.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function TM(e){return function(t){var n;return null==t?void 0:ok(n=t.split("?")[0].toLowerCase()).call(n,e)}}var SM=TM(".m3u8"),CM=TM(".mp4"),xM=TM(".flv"),PM=TM(".sdp"),AM=TM(".mpd");function IM(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:cD.H264)===cD.H265?wC.isHevcSupported():wC.isMSESupport()}function RM(){return(RM=ny(ey().mark((function e(){var t;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kM(eM.PluginXgvideo);case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.isSupported());case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var OM=Pm(Pm({},pC),{},{getStreamType:function(e){return SM(e)?"hls":xM(e)?"flv":PM(e)?"rtm":CM(e)?"mp4":AM(e)?"dash":"unknown"},isMseSupported:IM,isSoftDecodeSupported:function(){return RM.apply(this,arguments)}}),MM=wC.isWeixin,DM=wC.os,LM=wC.device,NM=DM.isAndroid,FM=DM.isIos,UM="mobile"===LM,BM=0,VM=!1,jM=function(e){zP(n,e);var t=KP(n);function n(e){var r;return Sy(this,n),Ry(MP(r=t.call(this,e)),"_hasSetUserAutoplay",void 0),Ry(MP(r),"_timer",void 0),Ry(MP(r),"_wxTimer",void 0),Ry(MP(r),"_state",{mode:0,showUnmuteBt:!1}),Ry(MP(r),"userClickPlay",(function(){if(!VM){var e=r.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),VM=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),VM=!0)}})),r}return Iy(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(zC,this.handleAutoplayPrevented.bind(this)),this.player.on(HC,this.handleAutoplayStart.bind(this)),this.player.on(LC,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){MM&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():NM?this.player.once(MC,this.wxCanPlayFn.bind(this)):FM&&this.player.once(WC,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(rO.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(rO.AUTOPLAY_FAIL,{mode:"unmute"}),NM&&MM?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(rO.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(rO.AUTOPLAY_FAIL,{mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=setTimeout((function(){e._timer&&clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(rO.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(rO.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(rO.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var n=t.getText("UNMUTE"),r=pC.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(r),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-BM>200){BM=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(rO.AUTOPLAY_UNMUTE);var t="mobile"===wC.device,n=PM(this.player.config.url);t&&n&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(zC,this.handleAutoplayPrevented.bind(this)),this.player.off(HC,this.handleAutoplayStart.bind(this)),this.player.off(LC,this.handleVolumechange.bind(this)),this._timer&&window.clearTimeout(this._timer),this._wxTimer&&window.clearTimeout(this._wxTimer),document.removeEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1),this._hasSetUserAutoplay){var e=UM?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:jx.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(jx),HM=vO.values;An({target:"Object",stat:!0},{values:function(e){return HM(e)}});var zM=n(te.Object.values);function WM(){return(new DOMParser).parseFromString('<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var GM,KM,YM=function(e){zP(n,e);var t=KP(n);function n(){return Sy(this,n),t.apply(this,arguments)}return Iy(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var r,i=null!==(r=n.normalize(e.textTips))&&void 0!==r?r:e.pluginName;if(t.player.root){var o=pC.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=i)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Dw(t).call(t,(function(t,r){var i,o=pC.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=pC.createDom("div","",{},"panel-icon-svg"),s=null!==(i=n.normalize(t.textTips))&&void 0!==i?i:t.pluginName;return o.appendChild(a),o.appendChild(pC.createDom("span",s,{"plugin-index":r},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&pC.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&pC.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:WM}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return Pm(Pm({},YO.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:jO.Icon,panel:{className:"more-panel-content"}})}}]),n}(YO),XM=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(XM||{}),qM=function(e){zP(n,e);var t=KP(n);function n(){return Sy(this,n),t.apply(this,arguments)}return Iy(n,[{key:"registerIcons",value:function(){return{more:{icon:WM,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,r=t.collapsePlugins,i={};return n.forEach((function(t){i[t.pluginName]={plugin:t,options:{root:e.root}}})),r.length&&(i[YM.pluginName]={plugin:YM,options:{root:this.root,plugins:r}}),i}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,n=[],r=[],i=null===(e=this.player.config.ignores)||void 0===e?void 0:Dw(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=i&&ok(i).call(i,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):r.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=r?r:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:jx.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,r,i,o,a,s=null!==(r=null===(i=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===i?void 0:i.position)&&void 0!==r?r:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!ok(a=zM(XM)).call(a,s)}}]),n}(jx),JM=[nI,sI,hI,wA,yI,nA,sA,GA,lA,NO,FO,XO,ZO,jM],QM=Mm(GM=[]).call(GM,JM,[zA,TA,qM]),ZM=Mm(KM=[]).call(KM,JM,[jA,qM]),$M="pc"===wC.device?QM:ZM;function eD(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function tD(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var nD={startPlay:function(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild},play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild},fullscreen:tD,exitFullscreen:eD,replay:function(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild},volumeLarge:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeMuted:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeSmall:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}},rD=Pm(Pm({},nD),{},{fullscreen:tD,exitFullscreen:eD}),iD=Pm(Pm({},nD),{},{fullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',"image/svg+xml").firstChild},exitFullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',"image/svg+xml").firstChild}}),oD="pc"===wC.device?rD:iD,aD=Pm(Pm({},vP.TEXT),{},{DEFINITION_FALLBACK_TOAST:"The current network is unstable, it is recommended to switch to ",DEFINITION_SWITCHING:"Switching to",ERROR_REFRESH:"Refresh",UNMUTE:"Click to unmute",MANIFEST:"视频解析错误",NETWORK:"Network error",NETWORK_TIMEOUT:"Network timeout",NETWORK_FORBIDDEN:"鉴权异常",NETWORK_NOTFOUND:"播放地址不存在",DEMUX:"视频解析错误",REMUX:"视频解析错误",MEDIA:"视频播放发生错误",MEDIA_ERR_CODEC_NOT_SUPPORTED:"当前浏览器不支持视频解码",MEDIA_ERR_URL_EMPTY:"当前播放地址为空",DRM:"权限验证失败",OTHER:"其他报错",RUNTIME:"视频播放发生错误",MODULE_LOAD_ERROR:"插件模块加载异常",UNKNOWN:"未知报错"}),sD=Pm(Pm({},{ERROR_TYPES:{network:{code:1,msg:"视频下载错误"},mse:{code:2,msg:"流追加错误"},parse:{code:3,msg:"解析错误"},format:{code:4,msg:"格式错误"},decoder:{code:5,msg:"解码错误"},runtime:{code:6,msg:"语法错误"},timeout:{code:7,msg:"播放超时"},other:{code:8,msg:"其他错误"}},HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"网络错误",MEDIA_ERR_DECODE:"解码错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}),{},{DEFINITION_FALLBACK_TOAST:"当前网络不稳定,建议切换到",DEFINITION_SWITCHING:"正在切换至",ERROR_REFRESH:"刷新",UNMUTE:"点击取消静音",MANIFEST:"视频解析错误",NETWORK:"网络错误",NETWORK_TIMEOUT:"网络超时",NETWORK_FORBIDDEN:"鉴权异常",NETWORK_NOTFOUND:"播放地址不存在",DEMUX:"视频解析错误",REMUX:"视频解析错误",MEDIA:"视频播放发生错误",MEDIA_ERR_CODEC_NOT_SUPPORTED:"当前浏览器不支持视频解码",MEDIA_ERR_URL_EMPTY:"当前播放地址为空",DRM:"权限验证失败",OTHER:"其他报错",RUNTIME:"视频播放发生错误",MODULE_LOAD_ERROR:"插件模块加载异常",UNKNOWN:"未知报错"}),lD=function(){function e(t){var n;if(Sy(this,e),Ry(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||yC()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var r,i,o=Dw(r=yO(null==t||null===(i=t.i18n)||void 0===i?void 0:i.texts)).call(r,(function(e){var t=sO(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return Iy(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,n,r;if(e){var i=null==bP?void 0:bP.lang;return null!==(t=null==i||null===(n=i[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==i||null===(r=i.en)||void 0===r?void 0:r[e]}}}],[{key:"langKeys",get:function(){return bP.langKeys}},{key:"isLangValid",value:function(e){var t;return ok(t=bP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){bP.extend(e,t)}}]),e}(),uD=["autoplay"],cD=function(e){return e.H265="h265",e.H264="h264",e}(cD||{}),hD=function(e){return e.SoftFirst="soft-first",e.H264First="h264-first",e}(hD||{}),dD=function(e){return e.Software="software",e.Hardware="hardware",e}(dD||{}),fD=Pm(Pm({},jx.POSITIONS),XM),pD={id:"veplayer",width:"100%",height:"100%",decodeType:"hardware",fullscreen:{useCssFullscreen:!1}},vD=function(e){var t,n,r,i=e.autoplay,o=qy(e,uD);(o.poster&&(o.poster=function(e){var t,n=""+e,r=aO.exec(n);if(!r)return n;var i,o="",a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==i&&(o+=n.substring(a,i)),a=i+1,o+=t}return a!==i?o+n.substring(a,i):o}(o.poster)),o.icons=Pm(Pm({},oD),o.icons?(t=o.icons,n={},yO(null!=t?t:{}).forEach((function(e){var t=sO(e,2),r=t[0],i=t[1];"string"==typeof i?console.warn("icons.".concat(r," has been removed")):n[r]=i})),n):{}),o.autoplay=Boolean(i),i&&"boolean"!=typeof i)&&(o.autoplayMuted=null==i?void 0:i.muted,o.videoAttributes=Pm(Pm({},null!==(r=o.videoAttributes)&&void 0!==r?r:{}),{},{muted:null==i?void 0:i.muted}),o.autoplayPlugin=i);return delete o.i18n,o},gD=function(){function e(){var t,n,r,i,o,a,s,l,u,c,h,d,f=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Sy(this,e),Ry(this,"_player",void 0),Ry(this,"_sourceManager",void 0),Ry(this,"_preparePlugins",void 0),Ry(this,"_previousPrepareResult",void 0),Ry(this,"_i18nManager",void 0),Ry(this,"_events",{}),Ry(this,"_errorCallback",void 0),this._sourceManager=p.sourceManager,this._preparePlugins=p.preparePlugins,this._previousPrepareResult=p.prepareResult,this._i18nManager=null!==(t=p.i18nManager)&&void 0!==t?t:new lD({i18n:p.i18n});var v=vD(Pm(Pm({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Mm(r=[]).call(r,Ty(null!==(i=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==i?i:[]),Ty(null!==(a=p.plugins)&&void 0!==a?a:$M)),y=[],m=[];g.forEach((function(e){qM.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new OP(Pm(Pm(Pm({},pD),v),{},{definition:Pm({list:null!==(s=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==s?s:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(c=p.definition)&&void 0!==c?c:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:Pm(Pm({},null!==(d=p.sources)&&void 0!==d?d:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(iO.PLAYER_CREATE_FINISH,this._player),this._sourceManager.registerPrepare((function(e){return f.prepare(e)})),this._errorCallback=function(e){return f._handleFallback(e)},this._player.on(AC,this._errorCallback)}var t,n,r,i,o,a;return Iy(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(lD.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,r,i,o=lD.langKeys().join(","),a={en:Mm(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":Mm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(r=this._i18nManager)||void 0===r||null===(i=r.normalize)||void 0===i?void 0:i.call(r,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=ny(ey().mark((function e(t,n){var r,i,o,a;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(r=this._sourceManager.sources)||void 0===r||null===(r=r[0].definitions)||void 0===r?void 0:r.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t);case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=Hm(i=this._sourceManager).call(i,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Mm(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n=this._transformEvent(e,t),r=n.xgCallback,i=n.xgEventName;if(r){var o,a,s;null!==(o=this._events)&&void 0!==o&&o[e]||(this._events[e]=new Pw),this._events[e].set(t,r);for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];(a=this._player).once.apply(a,Mm(s=[i,r]).call(s,u))}}},{key:"off",value:function(e,t){var n,r=null===(n=this._events[e])||void 0===n?void 0:n.get(t),i=this._transformEvent(e).xgEventName;if(r){for(var o,a,s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];(o=this._player).off.apply(o,Mm(a=[i,r]).call(a,l)),this._events[e].delete(t)}}},{key:"emit",value:function(e,t){for(var n,r,i=this._transformEvent(e).xgEventName,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(n=this._player).emit.apply(n,Mm(r=[i,t]).call(r,a))}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n=this._transformEvent(e,t),r=n.xgCallback,i=n.xgEventName;if(r){var o,a,s;null!==(o=this._events)&&void 0!==o&&o[e]||(this._events[e]=new Pw),this._events[e].set(t,r);for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];(a=this._player).on.apply(a,Mm(s=[i,r]).call(s,u))}}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.emit(iO.RETRY),this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"getFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"getCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e,t){return this._player.unRegisterPlugin(e,t)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===fD.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(r):r.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===fD.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(r):r.hide())}))}},{key:"destroy",value:function(){this._player.off(AC,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=ny(ey().mark((function e(t){var n,r,i,o,a,s,l,u,c=this;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return a=e.sent,s=this._diffPlugins(null!==(r=null===(i=this._previousPrepareResult)||void 0===i?void 0:i.plugins)&&void 0!==r?r:[],null!==(o=null==a?void 0:a.plugins)&&void 0!==o?o:[]),l=s.removedPlugins,u=s.addedPlugins,null==l||l.forEach((function(e){c._player.unRegisterPlugin(e)})),this._previousPrepareResult=a,null!=a&&a.options&&this._player.setConfig(a.options),e.abrupt("return",Dw(u).call(u,(function(e){return c._player.registerPlugin(e)})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(i=ny(ey().mark((function e(t){var n,r,i=this;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(Kx),n=this._sourceManager.url,r=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(Kx),this.emit(iO.FALLBACK_ERROR,tA(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){i._sourceManager.resetFallback()})),this.emit(iO.FALLBACK,{from:{url:n},to:{url:r}}),this._switchUrl(r);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===AC?{xgCallback:t?function(e){t(tA(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=oO[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Mm(r=[n]).call(r,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(r=ny(ey().mark((function e(t){var n,r,i,o,a,s;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=QO(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(s=e.sent,this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(r=this._player)||void 0===r||null===(r=r.plugins)||void 0===r||r.definition.renderItemList(),(null==t||null===(i=t.source)||void 0===i?void 0:i.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(iO.SOURCE_CHANGE),null==s||!s.length){e.next=15;break}return this.emit(iO.DEFINITION_CHANGE),e.next=12,this._callBeforePlayerInitForUrl(s,t.url);case 12:this.emit(iO.AFTER_DEFINITION_CHANGE),e.next=16;break;case 15:this._player.changeDefinition(t,a);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_switchUrl",value:(n=ny(ey().mark((function e(t){var n,r,i,o=this;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(null==(n=e.sent)||!n.length){e.next=7;break}this._callBeforePlayerInitForUrl(n,t),e.next=14;break;case 7:if(r=this._player.switchURL(t,!1),i=this._player.currentTime,!r||!r.then){e.next=13;break}return e.abrupt("return",r);case 13:return e.abrupt("return",new Lw((function(e){var t=o._player.paused&&!o._player.isError,n=function(){o._player.currentTime=i,t&&o._player.once(MC,(function(){o._player.pause()})),e()};wC.os.isAndroid?o.once(RC,(function(){n()})):o.once(MC,(function(){n()})),o._player.play()})));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Dw(e).call(e,(function(e){return e.pluginName})),r=Dw(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:Nw(n).call(n,(function(e){return!ok(r).call(r,e)})),addedPlugins:Nw(t).call(t,(function(e){return!ok(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Lw((function(r){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(iO.CANPLAY,(function(){r(void 0)}))}))}}],[{key:"create",value:(t=ny(ey().mark((function t(){var n,r,i,o,a,s,l=arguments;return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.length>0&&void 0!==l[0]?l[0]:{},o=l.length>1?l[1]:void 0,a=new MO({sources:OO.normalize({url:i.url,fallbackUrls:i.fallbackUrls,sources:i.playlist}),url:i.url,defaultSource:i.defaultSource,defaultDefinition:i.defaultDefinition,maxFallbackRound:i.maxFallbackRound}),i.url=a.url,t.next=6,null==i||null===(n=i.preparePlugins)||void 0===n?void 0:n.call(i,null!==(r=i.url)&&void 0!==r?r:"");case 6:return s=t.sent,t.abrupt("return",new(null!=o?o:e)(Pm(Pm({},i),{},{prepareResult:s,sourceManager:a})));case 8:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function yD(e){var t=IO(e).call(e,(function(e,t){return e+t.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(e,r),r+=e.byteLength})),n}function mD(e,t){return fS(null==e?void 0:e.toFixed(t||4))}var _D,bD,wD=hE,kD=function(e,t,n){return function(e,t,n){t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},ED="ScriptData",TD="Sequence_Header",SD="RawData",CD=[5500,11e3,22e3,44e3],xD="aac",PD="pcma",AD="pcmu",ID="avc",RD="bytevc1",OD=function(){function e(t){var n=this;Sy(this,e),kD(this,"type",0),kD(this,"tagSize",0),kD(this,"timestamp",0),kD(this,"duration",0),kD(this,"header",null),kD(this,"body",null),kD(this,"bodyView",null),kD(this,"tailsize",null),sk(t).forEach((function(e){n[e]=t[e]}))}return Iy(e,[{key:"streamType",get:function(){switch(this.type){case 18:return"scriptData";case 9:return"video";case 8:return"audio"}}},{key:"packetType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType},set:function(e){this.bodyView.frameType=e}},{key:"dts",get:function(){return this.timestamp}},{key:"pts",get:function(){var e;return((null==(e=this.bodyView)?void 0:e.cts)||0)+this.timestamp}},{key:"ptsTime",get:function(){return this.pts?mD(this.pts/1e3):0}},{key:"dtsTime",get:function(){return this.dts?mD(this.dts/1e3):0}},{key:"sampleView",get:function(){var e,t,n;if("Sequence_Header"!==(null==(e=this.bodyView)?void 0:e.packetType)&&18!==this.type)return{dts:this.timestamp,pts:((null==(t=this.bodyView)?void 0:t.cts)||0)+this.timestamp,data:this._getSampleData(),units:null==(n=this.bodyView)?void 0:n.units}}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"data",get:function(){return this._getSampleData()}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Dw(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Dw(t).call(t,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isSample",get:function(){return"scriptData"!==this.streamType&&"Sequence_Header"!==this.packetType}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"isSqHeader",get:function(){return"Sequence_Header"===this.packetType}},{key:"timescale",get:function(){return 1e3}},{key:"isHevc",get:function(){var e;return"bytevc1"===(null==(e=this.bodyView)?void 0:e.codecType)}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.sample;var n=(null==(t=this.bodyView)?void 0:Nw(e=t.units).call(e,(function(e){return!e.isSei})))||[],r=IO(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),MD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"decode",value:function(t){for(var n=[],r=t,i=0,o=t.length;i<o;)if(r[i]<128)n.push(String.fromCharCode(r[i])),++i;else{if(r[i]<192);else if(r[i]<224){if(e._checkContinuation(r,i,1)){var a=(31&r[i])<<6|63&r[i+1];if(a>=128){n.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(r[i]<240){if(e._checkContinuation(r,i,2)){var s=(15&r[i])<<12|(63&r[i+1])<<6|63&r[i+2];if(s>=2048&&55296!=(63488&s)){n.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(r[i]<248&&e._checkContinuation(r,i,3)){var l=(7&r[i])<<18|(63&r[i+1])<<12|(63&r[i+2])<<6|63&r[i+3];if(l>65536&&l<1114112){l-=65536,n.push(String.fromCharCode(l>>>10|55296)),n.push(String.fromCharCode(1023&l|56320)),i+=4;continue}}n.push(String.fromCharCode(65533)),++i}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}}]),e}(),DD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var n={},r=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength));try{var i=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));n[r.data]=i.data}catch(sU){}return n}}},{key:"_parseValue",value:function(t){var n,r=t.byteLength,i=1,o=!1;switch(t.getUint8(0)){case 0:n=t.getFloat64(1),i+=8;break;case 1:n=!!t.getUint8(1),i+=1;break;case 2:var a=e._parseString(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i));n=a.data,i+=a.size;break;case 3:n={};var s=0;for(9==(16777215&t.getUint32(r-4))&&(s=3);i<r-4;){var l=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-s)),u=l.size,c=l.data;if(l.isEnd)break;n[c.name]=c.value,i+=u}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 8:n={},i+=4;var h=0;for(9==(16777215&t.getUint32(r-4))&&(h=3);i<r-8;){var d=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-h)),f=d.size,p=d.data;if(d.isEnd)break;n[p.name]=p.value,i+=f}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 9:n=void 0,i=1,o=!0;break;case 10:n=[];var v=t.getUint32(1);i+=4;for(var g=0;g<v;g++){var y=e._parseValue(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i)),m=y.data,_=y.size;n.push(m),i+=_}break;case 11:var b=t.getFloat64(i)+6e4*t.getInt16(i+8);n=new Date(b),i+=10;break;case 12:var w=t.getUint32(1);i+=4,n="",w>0&&(n=MD.decode(new Uint8Array(t.buffer,t.byteOffset+i,w))),i+=w;break;default:i=r}return{data:n,size:i,isEnd:o}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),n="";return t>0&&(n=MD.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:n,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var n=e._parseString(t),r=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return{data:{name:n.data,value:r.data},size:n.size+r.size,isEnd:r.isEnd}}}}]),e}(),LD="undefined"!=typeof window,ND=LD&&navigator.userAgent.toLocaleLowerCase(),FD=LD&&ok(ND).call(ND,"firefox"),UD=LD&&ok(ND).call(ND,"android"),BD=hE,VD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"parseADTS",value:function(t,n){for(var r=t.length,i=0;i+2<r&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=r)){var o=i,a=[],s=(60&t[i+2])>>>2,l=e.FREQ[s];if(!l)throw new Error("Invalid sampling index: ".concat(s));for(var u,c,h=1+((192&t[i+2])>>>6),d=(1&t[i+2])<<2|(192&t[i+3])>>>6,f=e._getConfig(s,d,h),p=f.config,v=f.codec,g=0,y=e.getFrameDuration(l);i+7<r;)if(255===t[i]&&240==(246&t[i+1])){if(r-i<(c=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5))break;u=2*(1&~t[i+1]);var m=mD(n+g*y);a.push({pts:m,dts:m,ptsTime:mD(m/9e4),dtsTime:mD(m/9e4),data:t.subarray(i+7+u,i+c)}),g++,i+=c}else i++;return{skip:o,remaining:i>=r?void 0:t.subarray(i),frames:a,nbFrame:a.length,samplingFrequencyIndex:s,sampleRate:l,objectType:h,channelCount:d,codec:v,config:p,originCodec:"mp4a.40.".concat(h)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var n=t[0]>>>3,r=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,o=e.FREQ[r];if(!o)throw new Error("Invalid sampling index: ".concat(r));var a=e._getConfig(r,i,n);return{samplingFrequencyIndex:r,sampleRate:o,objectType:n,channelCount:i,config:a.config,codec:a.codec,originCodec:"mp4a.40.".concat(n)}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,n){var r,i,o=[];return FD?e>=6?(r=5,i=e-3):(r=2,i=e):UD?(r=2,i=e):(r=n,i=e,e>=6?i=e-3:1===t&&(r=2,i=e)),o[0]=r<<3,o[0]|=(14&e)>>1,o[1]=(1&e)<<7,o[1]|=t<<3,5===r&&(o[1]|=(14&i)>>1,o[2]=(1&i)<<7,o[2]|=8,o[3]=0),{config:o,codec:"mp4a.40.".concat(r)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)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(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)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])}}}]),e}(),jD=VD;bD=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],function(e,t,n){t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(jD,"symbol"!==wc(_D="FREQ")?_D+"":_D,bD);var HD=hE,zD=function(e,t,n){return function(e,t,n){t in e?HD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},WD=function(){function e(t){if(Sy(this,e),zD(this,"_bytesAvailable"),zD(this,"_bitsAvailable",0),zD(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return Iy(e,[{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var n=new Uint8Array(4);n.set(this._data.subarray(e,e+t)),this._word=new DataView(n.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),n=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}},{key:"firstMbInSlice",value:function(){return this.readUByte(),this.readUEG()}}]),e}();function GD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var KD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"parseAnnexB",value:function(e){for(var t=e.length,n=2,r=0;null!==e[n]&&1!==e[n];)n++;if((r=++n+2)>=t)return[];for(var i=[];r<t;)switch(e[r]){case 0:if(0!==e[r-1]){r+=2;break}if(0!==e[r-2]){r++;break}n!==r-2&&i.push(e.subarray(n,r-2));do{r++}while(1!==e[r]&&r<t);r=(n=r+1)+2;break;case 1:if(0!==e[r-1]||0!==e[r-2]){r+=3;break}n!==r-2&&i.push(e.subarray(n,r-2)),r=(n=r+1)+2;break;default:r+=3}return n<t&&i.push(e.subarray(n)),i}},{key:"parseNalu",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var n,r=e.length,i=[],o=0;o+t<r;)if(n=GD(e,o),3===t&&(n>>>=8),o+=t,n){if(o+n>r)break;i.push(e.subarray(o,o+n)),o+=n}return i}}},{key:"parseNaluType",value:function(e,t){return null==e?void 0:Dw(e).call(e,(function(e){var n=t?e[0]>>>1&63:31&e[0],r=t&&(39===n||40===n),i={type:n,unit:e,isSei:r=r||!t&&6===n};switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!t&&5!==n||t&&5===n)break;i.frameType="I"}return t||1!==n||(i.frameType=function(e){var t=new WD(e).readSliceType();return 2===t||4===t||7===t||9===t?"I":0===t||3===t||5===t||8===t?"P":1===t||6===t?"B":void 0}(e)),!t||0!==n&&1!==n||(i.frameType="P"),!t&&n<=5&&(i.firstMbInSlice=new WD(e).firstMbInSlice()),t&&n<=21&&(i.firstMbInSlice=128==(128&e[2])),i}))}},{key:"parseSEI",value:function(e){for(var t=e.length,n=1,r=0,i=0,o="";255===e[n];)r+=255,n++;for(r+=e[n++];255===e[n];)i+=255,n++;if(i+=e[n++],5===r&&t>n+16)for(var a=0;a<16;a++)o+=e[n].toString(16),n++;return{payload:e.subarray(n),type:r,size:i,uuid:o}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(!n.length)return e;var i=t-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=e[a];return o}}]),e}(),YD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var n,r,i=1+(3&t[4]),o=[],a=[],s=6,l=31&t[5],u=0;u<l;u++)if(r=t[s]<<8|t[s+1],s+=2,r){var c=t.subarray(s,s+r);s+=r,o.push(c),n||(n=e.parseSPS(KD.removeEPB(c)))}var h,d=t[s];s++;for(var f=0;f<d;f++)h=t[s]<<8|t[s+1],s+=2,h&&(a.push(t.subarray(s,s+h)),s+=h);return{sps:n,spsArr:o,ppsArr:a,nalUnitSize:i}}}},{key:"parseSPS",value:function(e){var t=new WD(e);t.readUByte();var n=t.readUByte(),r=t.readUByte(),i=t.readUByte();t.skipUEG();var o=420;if(100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n){var a=t.readUEG();if(a<=3&&(o=[0,420,422,444][a]),3===a&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==a?8:12,l=0;l<s;l++)t.readBool()&&(l<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var u=t.readUEG();if(0===u)t.readUEG();else if(1===u){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var c=t.readUEG(),h=0;h<c;h++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var d=t.readUEG(),f=t.readUEG(),p=t.readBits(1);0===p&&t.skipBits(1),t.skipBits(1);var v,g,y,m,_,b=0,w=0,k=0,E=0;if(t.readBool()&&(b=t.readUEG(),w=t.readUEG(),k=t.readUEG(),E=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var T=t.readBits(32),S=t.readBits(32);g=t.readBool(),_=(y=S)/(m=2*T)}}for(var C=e.subarray(1,4),x="avc1.",P=0;P<3;P++){var A=C[P].toString(16);A.length<2&&(A="0".concat(A)),x+=A}return{codec:x,profileIdc:n,profileCompatibility:r,levelIdc:i,chromaFormat:o,width:Math.ceil(16*(d+1)-2*(b+w)),height:(2-p)*(f+1)*16-(p?2:4)*(k+E),sarRatio:v,fpsNum:y,fpsDen:m,fps:_,fixedFrame:g}}}]),e}(),XD=function(){function e(){Sy(this,e)}return Iy(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){if(!(t.length<23)){for(var n,r,i,o,a=1+(3&t[21]),s=[],l=[],u=[],c=23,h=t[22],d=0;d<h;d++){r=63&t[c],i=t[c+1]<<8|t[c+2],c+=3;for(var f=0;f<i;f++)if(o=t[c]<<8|t[c+1],c+=2,o){switch(r){case 32:u.push(t.subarray(c,c+o));break;case 33:var p=t.subarray(c,c+o);n||(n=e.parseSPS(KD.removeEPB(p))),s.push(p);break;case 34:l.push(t.subarray(c,c+o))}c+=o}}return{sps:n,spsArr:s,ppsArr:l,vpsArr:u,nalUnitSize:a}}}},{key:"parseSPS",value:function(e){var t=new WD(e);t.readUByte(),t.readUByte(),t.readBits(4);var n=t.readBits(3);t.readBits(1);var r=this._parseProfileTierLevel(t,n);t.readUEG();var i=t.readUEG(),o=420;i<=3&&(o=[0,420,422,444][i]);var a=0;3===i&&(a=t.readBits(1));var s,l,u,c,h=t.readUEG(),d=t.readUEG(),f=t.readBits(1);(1===f&&(s=t.readUEG(),l=t.readUEG(),u=t.readUEG(),c=t.readUEG()),1===f)&&(h-=(1!==i&&2!==i||0!==a?1:2)*(l+s),d-=(1===i&&0===a?2:1)*(c+u));return{codec:"hev1.1.6.L93.B0",width:h,height:d,chromaFormat:o,bitDepthLumaMinus8:t.readUEG(),bitDepthChromaMinus8:t.readUEG(),generalProfileSpace:r.generalProfileSpace,generalTierFlag:r.generalTierFlag,generalProfileIdc:r.generalProfileIdc,generalLevelIdc:r.generalLevelIdc}}},{key:"_parseProfileTierLevel",value:function(e,t){var n,r,i;(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)&&(n=e.readBits(2),r=e.readBits(1),i=e.readBits(5)),e.readBits(32),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(16),e.readBits(16),e.readBits(12);for(var o=e.readUByte(),a=[],s=[],l=0;l<t;l++)a[l]=e.readBits(1),s[l]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var u=0;u<t;u++)0!==a[u]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==s[u]&&e.readBits(8);return{generalProfileSpace:n,generalTierFlag:r,generalProfileIdc:i,generalLevelIdc:o}}}]),e}();function qD(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Nw(t=e.items).call(t,(function(e){return e.isSample&&e.isVideo}))[0],o=Nw(n=e.items).call(n,(function(e){return e.isSample&&e.isAudio}))[0],a=Math.min((null==o?void 0:o.dtsTime)||0,(null==i?void 0:i.dtsTime)||0);return a-=r,e.items.forEach((function(e){e.time=mD(e.dtsTime-a)})),e}function JD(e){var t,n=Nw(t=e.items).call(t,(function(e){return e.isVideo})),r=[],i=-1,o={},a={};return n.forEach((function(e,t){(e.keyframe||t===n.length-1)&&(i=-1===i?e.time:i,r.push({time:e.time,value:mD(e.time-i)}),i=e.time);var s=Math.ceil(e.time+1e-5);o[s]?o[s]++:o[s]=1,a[s]?a[s]+=8*e.size:a[s]=8*e.size})),{bitRates:QD(a),gops:Nw(r).call(r,(function(e){return e.value})),frameRates:QD(o)}}function QD(e){var t=sk(e);return Dw(t).call(t,(function(t){return{time:Number(t),value:e[t]}}))}function ZD(e){var t,n,r,i,o=IO(t=lk(n=aC(r=Nw(i=lk(e).call(e)).call(i,(function(e){return e.isSample}))).call(r,(function(e,t){return e.time>t.time?1:-1}))).call(n,0,3)).call(t,(function(e,t){return e+t.size}),0);return o>1e3?mD(o/1e3)+"KB":o+"B"}function $D(e){return IO(e).call(e,(function(e,t){return e+t.size}),0)/IO(e).call(e,(function(e,t){return e+t.duration}),0)*8e3}function eL(e){if(null==e?void 0:e.profileIdc)switch(e.profileIdc){case 66:return"66(Baseline)";case 77:return"77(Main)";case 100:return"100(High)"}}var tL=hE,nL=function(e,t,n){return function(e,t,n){t in e?tL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},rL=function(){function e(){Sy(this,e),nL(this,"_nalUnitSize",0),nL(this,"_lastAudio",null),nL(this,"_lastVideo",null),nL(this,"_videoStartDts",-1),nL(this,"_audioStartDts",-1)}return Iy(e,[{key:"parse",value:function(e){for(var t=e.byteLength,n=e.subarray(0,13),r=13,i=Pm(Pm({header:n},this._parseHeader(n)),{},{items:[]});r+11<t;){var o=e.subarray(r,r+11),a=o[1]<<16|o[2]<<8|o[3],s=r+11+a;if(s>t)break;var l=e.subarray(r+11,s),u=new OD(Pm({tagSize:11+a+4,header:o,body:l,tailsize:e.subarray(s,s+4)},this._parseTag(o,l)));u.isAudio&&(this._lastAudio&&(this._lastAudio.duration=u.dts-this._lastAudio.dts),this._lastAudio=u),u.isVideo&&(this._lastVideo&&(this._lastVideo.duration=u.dts-this._lastVideo.dts),this._lastVideo=u),i.items.push(u),r=s+4}var c=qD(i);return c.rates=JD(c),this._addMetadataToFirstKeyFrame(c),c}},{key:"getSnapshoot",value:function(t,n){var r,i,o,a,s=Nw(r=t.items).call(r,(function(e){return 8===e.type}))[0],l=Nw(i=t.items).call(i,(function(e){return 9===e.type}))[0],u=s&&s.bodyView||s,c=l&&l.bodyView||l,h=Nw(o=t.items).call(o,(function(e){return e.isVideo})).length,d=this._getNbFrame(t,"I"),f=this._getNbFrame(t,"P"),p=this._getNbFrame(t,"B"),v=0;if(null==n?void 0:n.gopCacheBuffer){var g,y=(new e).parse(n.gopCacheBuffer),m=Nw(g=y.items).call(g,(function(e){return e.isVideo})),_=null==(a=m[m.length-1])?void 0:a.time;_&&(v=_-n.take/1e3)}return{rates:t.rates,audio:u?DT({},u,this._getExt(t,"audio")):null,video:c?DT({},c,this._getExt(t,"video"),{topThreeFrameSize:ZD(t.items),gopCache:mD(v),profile:eL(c.sps),iFrames:d,pFrames:f,bFrames:p,iPercent:mD(d/h*100),pPercent:mD(f/h*100),bPercent:mD(p/h*100)}):null}}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t,n,r,i=Nw(t=e.items).call(t,(function(e){return 9===e.type}))[0];if(i&&(null==(r=i.bodyView)?void 0:r.sps)){var o=Nw(n=e.items).call(n,(function(e){return e.isVideo&&e.keyframe}))[0];o&&(o.bodyView.sps=i.bodyView.sps,o.bodyView.vpsArr=i.bodyView.vpsArr,o.bodyView.spsArr=i.bodyView.spsArr,o.bodyView.ppsArr=i.bodyView.ppsArr)}}},{key:"_getExt",value:function(e,t){var n,r,i,o=Nw(n=e.items).call(n,(function(e){return e.streamType===t&&e.isSample})),a=Nw(r=e.items).call(r,(function(e){var n;return e.streamType===t&&(null==(n=e.bodyView)?void 0:n.packetType)===TD}))[0];if(!o.length)return 0;var s=o[0],l=o[o.length-1],u=0;return"audio"===t&&(u=a&&1024/(null==(i=a.bodyView)?void 0:i.sampleRate)*1e3),"video"===t&&(u=s.duration),{avgBits:$D(o),startDts:o[0].dts,duration:(l.timestamp-s.timestamp)/1e3,refDuration:u,frameLength:o.length}}},{key:"_getNbFrame",value:function(e,t){var n;return Nw(n=e.items).call(n,(function(e){return e.isVideo&&e.frameType===t})).length}},{key:"_parseHeader",value:function(e){return{hasAudio:!!(e[4]>>2&1),hasVideo:!!(1&e[4])}}},{key:"_parseTag",value:function(e,t){var n,r=31&e[0],i=(e[7]<<24>>>0)+(e[4]<<16)+(e[5]<<8)+e[6];switch(r){case 18:n=DT({packetType:ED},DD.parse(t));break;case 9:n=this._parseVideo(t,i);break;case 8:n=this._parseAudio(t,i)}return{type:r,timestamp:i,bodyView:n}}},{key:"_parseAudio",value:function(e){if(e.length){var t=(240&e[0])>>>4;if(10===t||7===t||8===t){if(10!==t){var n=(12&e[0])>>2,r=(2&e[0])>>1,i=1&e[0];return Pm({format:t,sampleRate:CD[n],sampleSize:r?2:1,channelCount:i+1},this._parseG711(e))}return this._parseAac(e,t)}console.warn("Unsupported sound format: ".concat(t))}}},{key:"_parseG711",value:function(e,t){return{codecType:7===t?PD:AD,sampleRate:8e3,sample:e.subarray(1),packetType:SD}}},{key:"_parseAac",value:function(e,t){if(0===e[1]){var n=e.subarray(2);return Pm(Pm({},jD.parseAudioSpecificConfig(n)),{},{format:t,timescale:1e3,codecType:xD,packetType:TD,sequenceData:[n],frameType:"A"})}if(1===e[1])return{sample:e.subarray(2),format:t,codecType:xD,packetType:SD,frameType:"A"}}},{key:"_parseVideo",value:function(e,t){if(!(e.length<6)){var n=(240&e[0])>>>4,r=15&e[0];if(7===r||12===r){var i=12===r,o=e[1],a=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===o){var s=e.subarray(5),l=i?XD.parseHEVCDecoderConfigurationRecord(s):YD.parseAVCDecoderConfigurationRecord(s);return this._nalUnitSize=l.nalUnitSize,Pm({codecId:r,codecType:i?RD:ID,packetType:TD,timescale:1e3,sequenceData:[s]},l)}if(1===o){var u=KD.parseNalu(e.subarray(5),this._nalUnitSize);if(!u||!u.length)return;var c={dts:t,cts:a,units:u=KD.parseNaluType(u,i)};return 1===n&&(c.keyframe=!0),u.forEach((function(e){var t=e.type,n=e.unit,r=e.frameType;switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!i&&5!==t||i&&5===t)break;c.keyframe=!0,c.frameType="I";break;case 6:case 39:case 40:if(!i&&6!==t||i&&6===t)break;c.seis?c.seis.push(KD.parseSEI(KD.removeEPB(n))):c.seis=[KD.parseSEI(KD.removeEPB(n))];break;case 32:if(!i)break;c.vpsArr?c.vpsArr.push(n):c.vpsArr=[n];break;case 7:case 33:if(!i&&7!==t||i&&7===t)break;c.spsArr?c.spsArr.push(n):c.spsArr=[n];var o=KD.removeEPB(n);c.sps=i?XD.parseSPS(o):YD.parseSPS(o);break;case 8:case 34:if(!i&&8!==t||i&&8===t)break;c.ppsArr?c.ppsArr.push(n):c.ppsArr=[n];break;case 1:case 0:c.frameType=r}})),Pm({codecId:r,codecType:i?RD:ID,packetType:SD},c)}}else console.warn("Unsupported codecId: ".concat(r))}}}]),e}(),iL="FLV",oL="MPEG-TS",aL="MP4";function sL(e,t){var n;return Dw(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}var lL=hE,uL=function(e,t,n){return function(e,t,n){t in e?lL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},cL=Iy((function e(t){var n=t.startIndictor,r=t.packetType,i=t.pid,o=t.afc;Sy(this,e),uL(this,"startIndictor",0),uL(this,"pid",0),uL(this,"afc",0),uL(this,"eleInfo",null),uL(this,"packetType",""),this.startIndictor=n,this.packetType=r,this.pid=i,this.afc=o})),hL=function(){function e(t){var n=t.header,r=t.headerObject,i=t.body,o=t.eleInfo,a=t.bodyView,s=t.headerView;Sy(this,e),uL(this,"header",null),uL(this,"headerView",null),uL(this,"body",null),uL(this,"bodyView",null),uL(this,"eleInfo",null),uL(this,"duration",0),this.header=n,this.headerView=s||new cL(r),this.eleInfo=o,this.body=i,this.bodyView=a}return Iy(e,[{key:"type",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"streamType",get:function(){return this.eleInfo?this.eleInfo[this.headerView.pid]:""}},{key:"packetType",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType}},{key:"pts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.pts}},{key:"ptsTime",get:function(){return this.pts?mD(this.pts/9e4):0}},{key:"dtsTime",get:function(){return this.dts?mD(this.dts/9e4):0}},{key:"dts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.dts}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Dw(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Dw(t).call(t,(function(e){return e.unit.length}))}},{key:"isSample",get:function(){return"PES"===this.packetType}},{key:"timescale",get:function(){return 9e4}},{key:"isHevc",get:function(){var e,t;return"bytevc1"===(null==(t=null==(e=this.eleInfo)?void 0:e.video)?void 0:t.codecType)}},{key:"sampleView",get:function(){var e;if("PES"===this.type)return{dts:this.dts,pts:this.pts,units:null==(e=this.bodyView)?void 0:e.units,data:this._getSampleData()}}},{key:"data",get:function(){return this._getSampleData()}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.data;var n=(null==(t=this.bodyView)?void 0:Nw(e=t.units).call(e,(function(e){return!e.isSei&&!e.isDivision})))||[],r=IO(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),dL=function(){function e(){Sy(this,e)}return Iy(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=function(e){for(var t=Math.min(1e3,e.byteLength-564),n=0;n<t;n++)if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;return-1}(e);if(-1===n)throw new Error("invalid ts file");var r=e.byteLength;r-=(r-n)%188;for(var i,o=[],a=[],s=[],l=0,u=n;u<r;){var c=e.subarray(u,u+188),h=c.subarray(0,4),d=this._parseTsHeader(c.subarray(0,4));u+=188;var f=void 0,p=void 0,v=4,g="";switch((null==d?void 0:d.afc)>1&&(v+=1+Math.min(c[v],183)),d.pid){case 0:v+=1+c[v],f=c.subarray(v),g="PAT",p={pmtId:l=this._parsePAT(f)};break;default:if(d.pid===l){v+=1+c[v],f=c.subarray(v),p=i=this._parsePMT(f),g="PMT";break}if(!i||!i[d.pid])continue;f=c.subarray(v),g="PES"}if(d.packetType=g,"PES"===g){var y="video"===i[d.pid]?a:s;d.startIndictor&&y.length&&(o.push(new hL(Pm(Pm({},this._concatPesChunk(y)),{},{eleInfo:i}))),y="video"===i[d.pid]?a=[]:s=[]),y.push({header:h,headerObject:d,body:f})}else o.push(new hL({header:h,headerObject:d,body:f,eleInfo:i,bodyView:p}))}a.length&&(o.push(new hL(Pm(Pm({},this._concatPesChunk(a)),{},{eleInfo:i}))),a=[]),s.length&&(o.push(new hL(Pm(Pm({},this._concatPesChunk(s)),{},{eleInfo:i}))),s=[]);var m=qD({items:this._parsePES(o)},t);return m.rates=JD(m),m}},{key:"getSnapshoot",value:function(e){var t,n,r,i=e.items,o=e.rates,a=Nw(i).call(i,(function(e){return"video"===e.streamType})),s=Nw(i).call(i,(function(e){return"audio"===e.streamType})),l=Hm(i).call(i,(function(e){return"PMT"===e.type})),u=a[0],c=s[0],h=a.length,d=this._getNbFrame(a,"I"),f=this._getNbFrame(a,"P"),p=this._getNbFrame(a,"B"),v={rates:o,video:u?DT({},null==u?void 0:u.bodyView,{codecType:u.eleInfo.video.codecType,frameLength:h,topThreeFrameSize:ZD(i),avgBits:$D(a),profile:eL(null==(t=null==u?void 0:u.bodyView)?void 0:t.sps),iFrames:d,pFrames:f,bFrames:p,iPercent:mD(d/h*100),pPercent:mD(f/h*100),bPercent:mD(p/h*100),timescale:9e4},this._getDuration(a,"video")):null,audio:c?DT({},null==c?void 0:c.bodyView,{codecType:c.eleInfo.audio.codecType,frameLength:s.length,timescale:9e4,avgBits:$D(s)},this._getDuration(s,"audio")):null};return l&&(null==(n=l.bodyView)?void 0:n.noSupported)&&(v.noSupported=null==(r=l.bodyView)?void 0:r.noSupported),v}},{key:"getRates",value:function(e){return JD(e)}},{key:"_getDuration",value:function(e,t){var n,r=e[0],i=e[e.length-1],o=0;return"audio"===t&&(o=1024/(null==(n=r.bodyView)?void 0:n.sampleRate)*1e3),"video"===t&&(o=r.duration),{duration:(i.pts-r.pts)/9e4,refDuration:o}}},{key:"_getNbKeyFrame",value:function(e){return Nw(e).call(e,(function(e){var t;return null==(t=e.bodyView)?void 0:t.keyframe})).length}},{key:"_getNbFrame",value:function(e,t){return Nw(e).call(e,(function(e){return e.frameType===t})).length}},{key:"_parseTsHeader",value:function(e){if(71===e[0]){var t={};return t.startIndictor=(64&e[1])>>6,t.pid=((31&e[1])<<8)+e[2],t.afc=(48&e[3])>>4,t}return null}},{key:"_parsePAT",value:function(e){return(31&e[10])<<8|e[11]}},{key:"_parsePMT",value:function(e){var t=0,n=3+((15&e[1])<<8|e[2])-4;e[3],e[4],t=t+11+((15&e[10])<<8|e[11])+1;for(var r,i={video:null,audio:null,noSupported:0};t<n;){r=e[t];var o=(31&e[t+1])<<8|e[t+2];switch(r){case 27:case 36:i.video={elePid:o,streamType:r,codecType:27===r?"avc":"bytevc1"},i[o]="video";break;case 15:i.audio={elePid:o,streamType:r,codecType:"aac"},i[o]="audio";break;default:i.noSupported=r,console.warn("unsupported streamType,",r)}t+=5+((15&e[t+3])<<8|e[t+4])}return i}},{key:"_concatPesChunk",value:function(e){var t=IO(e).call(e,(function(e,t){return e+t.body.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){var t=e.body;n.set(t,r),r+=t.byteLength})),Pm(Pm({},e[0]),{},{body:n,packetType:"PES"})}},{key:"_parsePES",value:function(e){var t=this,n=[];return e.forEach((function(e,r){if(e.isSample){var i=e,o=t._parsePESInternal(i.body)||{},a=o.data,s=o.pts,l=o.dts;if(a){if(e.isVideo&&(i.bodyView=t._parseVideoFrame(a,s,l,"bytevc1"===i.eleInfo.video.codecType),t._lastVideo&&(t._lastVideo.duration=1e3*(e.dtsTime-t._lastVideo.dtsTime)),t._lastVideo=i),e.isAudio){var u=jD.parseADTS(a,s),c=u.frames;return delete u.frames,void(null==c||c.forEach((function(e){var r=new hL(DT({},i,{bodyView:Pm(Pm(Pm({},u),e),{},{frameType:"A"})}));n.push(r),t._lastAudio&&(t._lastAudio.duration=1e3*(r.dtsTime-t._lastAudio.dtsTime)),t._lastAudio=r})))}n.push(e)}}else n.push(e)})),n}},{key:"_parsePESInternal",value:function(e){var t=e[8];if(!(0===t||e.length<t+9)&&1===(e[0]<<16|e[1]<<8|e[2])){var n=(e[4]<<8)+e[5];if(!(n&&n>e.length-6)){var r,i,o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?r-(i=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(r=i):i=r),i=i||r,{data:e.subarray(9+t),pts:r,dts:i}}}}},{key:"_parseVideoFrame",value:function(e,t,n,r){var i=KD.parseAnnexB(e);if(i.length){var o={units:i=KD.parseNaluType(i,r),pts:t,dts:n};return i.forEach((function(e){var t=e.unit,n=e.type,i=e.frameType;switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!r&&5!==n||r&&5===n)break;o.keyframe=!0,o.frameType="I";break;case 6:case 39:case 40:if(!r&&6!==n||r&&6===n)break;o.seis?o.seis.push(KD.parseSEI(KD.removeEPB(t))):o.seis=[KD.parseSEI(KD.removeEPB(t))];break;case 32:if(!r)break;o.vpsArr?o.vpsArr.push(t):o.vpsArr=[t];break;case 7:case 33:if(!r&&7!==n||r&&7===n)break;o.spsArr?o.spsArr.push(t):o.spsArr=[t];var a=KD.removeEPB(t);o.sps=r?XD.parseSPS(a):YD.parseSPS(a);break;case 8:case 34:if(!r&&8!==n||r&&8===n)break;o.ppsArr?o.ppsArr.push(t):o.ppsArr=[t];break;case 9:case 35:break;case 0:case 1:o.frameType=i}})),o}}}]),e}(),fL=Hc("Array").entries,pL=tr,vL=Ze,gL=se,yL=fL,mL=Array.prototype,_L={DOMTokenList:!0,NodeList:!0},bL=n((function(e){var t=e.entries;return e===mL||gL(mL,e)&&t===mL.entries||vL(_L,pL(e))?yL:t})),wL=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Sy(this,e),this._offset=n,this._buffer=t,this._length=t.byteLength}return Iy(e,[{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e}},{key:"forward",value:function(e){this._offset+=e}},{key:"subarray",value:function(e){return e?this._buffer.subarray(this._offset,this._offset+e):this._buffer.subarray(this._offset,e)}},{key:"slice",value:function(e){for(var t=this._offset,n=this._buffer,r=[],i=0;i<e;i++)r.push(n[t+i]);return new Uint8Array(r)}},{key:"readU8",value:function(){return this._buffer[this._offset]}},{key:"readU16",value:function(){var e=this._offset,t=this._buffer;return t[e]<<8|t[e+1]}},{key:"readU24",value:function(){var e=this._offset,t=this._buffer;return t[e]<<16|t[e+1]<<8|t[e+12]}},{key:"readU32",value:function(){var e=this._offset,t=this._buffer;return t[e]*(1<<24)+65536*t[e+1]+256*t[e+2]+t[e+3]}},{key:"read32",value:function(){var e=this._offset,t=this._buffer;return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}}]),e}(),kL=hE,EL=function(e,t,n){return function(e,t,n){t in e?kL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},TL=function(){function e(t,n,r,i,o,a,s,l,u,c){Sy(this,e),EL(this,"dts",0),EL(this,"pts",0),EL(this,"units",null),EL(this,"timescale",0),EL(this,"offset",0),EL(this,"duration",0),EL(this,"data",null),EL(this,"size",0),EL(this,"streamType",""),EL(this,"_frameType",""),EL(this,"isHevc",!1),this.dts=t,this.pts=n,this.units=r,this.timescale=i,this.offset=o,this.data=a,this.size=s,this.duration=l,this.streamType=u,this.isHevc=c}return Iy(e,[{key:"isSample",get:function(){return!0}},{key:"dtsTime",get:function(){return this.dts/this.timescale}},{key:"ptsTime",get:function(){return this.pts/this.timescale}},{key:"frameType",get:function(){var e,t;return"audio"===this.streamType?"A":this._frameType||(null==(t=this.units)?void 0:Nw(e=Dw(t).call(t,(function(e){return e.frameType}))).call(e,Boolean)[0])},set:function(e){this._frameType=e}},{key:"nalTypes",get:function(){var e;return null==(e=this.units)?void 0:Dw(e).call(e,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e;return null==(e=this.units)?void 0:Dw(e).call(e,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isVideo",get:function(){return"video"===this.streamType}},{key:"isAudio",get:function(){return"audio"===this.streamType}}]),e}(),SL={ftyp:"file type and compatibility",free:"free box",moov:"container for all metadata",mvhd:"movie header,overall declarations",trak:"container for an individual track or stream",tkhd:"track header,overall information about the track",tref:"track reference container",mdia:"container for the media information in a track",mdhd:"media header,oervall information about the media",hdlr:"declares the media type",minf:"media information container",vmhd:"video media header",smhd:"sound media header",dinf:"data information box",stbl:"sample table box",stsd:"sample descriptions(codec types, etc)",stts:"decoding time to sample",ctts:"compostion time to sample",cslg:"compostion to decode timeline mapping",stsc:"sample to chunk",stsz:"sample size",stco:"chunk offset",stss:"sync sample table",sdtp:"independent abd disposable samples",sbgp:"sample to group",mvex:"movid extends box",moof:"movie fragment",mfhd:"movie fragment header",traf:"track fragment",tfhd:"track fragment header",trun:"track fragment run",tfdt:"track fragment decode time",mdat:"media data",meta:"metadata",avc1:"h264 codec info box",hev1:"hevc codec info box"};function CL(e,t){return{isLeading:(12&e[t])>>2,dependsOn:3&e[t],isDenpendedOn:(192&e[t+1])>>6,hasRedundancy:(48&e[t+1])>>4,padding:(14&e[t+1])>>1,nonSync:1&e[t+1],degradationPriority:e[t+2]<<8|e[t+3]}}function xL(e,t){var n;return Dw(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}function PL(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=0;r<e.byteLength;){var i,o=e[r]*(1<<24)+65536*e[r+1]+256*e[r+2]+e[r+3];if(1===o){var a=xL(e,r+4);if("mdat"===a){var s,l=new DataView(e.buffer),u=l.getUint32(r+8)*Math.pow(2,32)+l.getUint32(r+12);console.log(Mm(s="".concat(a,": largesize=")).call(s,u)),o=u}}if(o){var c=e.subarray(r,r+o),h=xL(c,4);n.push({size:o,length:c.byteLength,start:r+t,type:h,sizetypeRepresent:lk(i=c.subarray(0,8)).call(i),body:c.subarray(8),typeDes:SL[h]||""}),r+=o}else r+=4}return n}function AL(e,t,n){if(e)for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t){if(!n)return i;if(n(i))return i}if(i.bodyView instanceof Array){var o=AL(i.bodyView,t,n);if(o){if(!n)return o;if(n(o))return o}}}}function IL(e,t){return AL(e,"trak",(function(e){var n=AL(e.bodyView,"hdlr");return n&&n.bodyView.handlerType===t}))}function RL(e,t,n){var r,i,o,a,s,l,u,c,h,d,f,p,v,g,y,m,_,b,w,k=IL(e,t);if(!k)return null;var E=AL(k.bodyView,"stbl"),T=AL(k.bodyView,"mdhd")||{},S=(null==(c=null==(u=Nw(r=E.bodyView).call(r,(function(e){return"stts"===e.type}))[0])?void 0:u.bodyView)?void 0:bL(c))||[];null==(d=null==(h=Nw(i=E.bodyView).call(i,(function(e){return"stss"===e.type}))[0])?void 0:h.bodyView)||bL(d);var C=(null==(p=null==(f=Nw(o=E.bodyView).call(o,(function(e){return"ctts"===e.type}))[0])?void 0:f.bodyView)?void 0:bL(p))||[],x=(null==(g=null==(v=Nw(a=E.bodyView).call(a,(function(e){return"stsc"===e.type}))[0])?void 0:v.bodyView)?void 0:bL(g))||[],P=(null==(m=null==(y=Nw(s=E.bodyView).call(s,(function(e){return"stsz"===e.type}))[0])?void 0:y.bodyView)?void 0:bL(m))||[],A=(null==(b=null==(_=Nw(l=E.bodyView).call(l,(function(e){return"stco"===e.type}))[0])?void 0:_.bodyView)?void 0:bL(b))||[],I=!!AL(E.bodyView,"hvcC"),R="vide"===t;if(!x.length||!A.length||!P.length)return[];for(var O,M=T.bodyView,D=M.timescale,L=void 0===D?1:D,N=M.duration,F=P.length,U=A.length,B=1,V=0,j=[],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,i=0,o=0,a=0,s=0,l=[];t=Dw(t).call(t,(function(e){return Pm({},e)})),n=Dw(n).call(n,(function(e){return Pm({},e)}));for(;o<e;){var u=t[r],c=n[i];u.sampleCount&&(a+=u.sampleDelta),u.sampleCount--,u.sampleCount||r++,c&&(s=c.sampleOffset,c.sampleCount--,c.sampleCount||i++),l.push({dts:a,pts:a+s}),o++}return l}(F,S,C);B<=U;){var z=x[V];(null==z?void 0:z.firstChunk)!==B?(j.push(DT({},O,{firstChunk:B,offset:A[B-1]})),B++):(j.push(Pm(Pm({},z),{},{offset:A[B-1]})),O=z,B++,V++)}var W=Dw(P).call(P,(function(e,t){var r=j[0],i=r.offset;r.offset+=e,r.samplesPreChunk--,r.samplesPreChunk||j.shift();var o=H[t],a=n.subarray(i,i+e);if(R){var s=KD.parseNalu(a);return new TL(o.dts,o.pts,KD.parseNaluType(s,I),L,i,a,e,0,"video",I)}return new TL(o.dts,o.pts,null,L,i,a,e,0,"audio")}));IO(W).call(W,(function(e,t){return e?(e.duration=(t.dts-e.dts)/L*1e3,t):t}),null);var G=null==(w=AL(null==k?void 0:k.bodyView,"vide"===t?I?"hvcC":"avcC":"mp4a"))?void 0:w.bodyView;return Pm(Pm(Pm({samples:W,iFrames:Nw(W).call(W,(function(e){return"I"===e.frameType})).length,pFrames:Nw(W).call(W,(function(e){return"P"===e.frameType})).length,bFrames:Nw(W).call(W,(function(e){return"B"===e.frameType})).length},T.bodyView),{},{frameLength:F,duration:N/L,timescale:L},G),null==G?void 0:G.ests)}function OL(e,t){var n=function(e){var t,n,r,i,o=IL(e,"vide"),a=IL(e,"soun"),s=AL(null==o?void 0:o.bodyView,"tkhd"),l=AL(null==a?void 0:a.bodyView,"tkhd"),u=AL(null==o?void 0:o.bodyView,"mdhd"),c=AL(null==a?void 0:a.bodyView,"mdhd"),h=AL(null==o?void 0:o.bodyView,"avcC")||AL(null==o?void 0:o.bodyView,"hvcC"),d=AL(null==a?void 0:a.bodyView,"mp4a"),f=a?Pm(Pm(Pm({type:"audio",trackId:null==(n=l.bodyView)?void 0:n.trackId},c.bodyView),null==d?void 0:d.bodyView),null==(r=null==d?void 0:d.bodyView)?void 0:r.ests):null,p=o?Pm(Pm({type:"video",trackId:null==(i=s.bodyView)?void 0:i.trackId},null==u?void 0:u.bodyView),null==h?void 0:h.bodyView):null;return Ry(t={},(null==f?void 0:f.trackId)||0,f),Ry(t,(null==p?void 0:p.trackId)||0,p),t}(e),r=eI(e).call(e,(function(e){return"moof"===e.type}));if(-1===r)return!1;n.lastVdts=-1,n.lastAdts=-1;for(var i=r;i<e.length&&"moof"===e[i].type;i+=2){var o=e[i];e[i+1].bodyView=ML(o,t,n)}return!0}function ML(e,t,n){var r,i,o=Nw(r=e.bodyView).call(r,(function(e){return"traf"===e.type})),a=Nw(i=Dw(o).call(o,(function(e){var t=AL(e.bodyView,"tfhd"),r=AL(e.bodyView,"tfdt"),i=AL(e.bodyView,"trun");if(t&&i){var o=t.bodyView.trackId;return Pm({trackId:o,baseDataOffset:t.bodyView.baseDataOffset,defaultSampleDuration:t.bodyView.defaultSampleDuration,defaultSampleSize:t.bodyView.defaultSampleSize,baseMediaDecodeTime:r.bodyView.baseMediaDecodeTime,dataOffset:i.bodyView.dataOffset,samples:i.bodyView.samples,sampleCount:i.bodyView.sampleCount},n[o])}}))).call(i,Boolean);return Dw(a).call(a,(function(e){var n,r,i,o=e.baseDataOffset,a=e.defaultSampleDuration,s=void 0===a?0:a,l=e.defaultSampleSize,u=void 0===l?0:l,c=e.dataOffset,h=e.baseMediaDecodeTime,d=void 0===h?0:h,f=e.samples,p=e.sps,v=e.timescale,g=e.type,y=o+c,m=0;return e.samples=Dw(f).call(f,(function(e){var n=t.subarray(y,y+e.size);m+=e.duration||s;var r=d+m;if("video"===g){var i="hev1.1.6.L93.B0"===(null==p?void 0:p.codec),o=KD.parseNalu(n);return y+=e.size,new TL(r,r+(e.ctOffset||0),KD.parseNaluType(o,i),v,y,n,e.size||u,(e.duration||s)/v*1e3,"video",i)}return y+=e.size,new TL(r,r+(e.ctOffset||0),null,v,y,n,e.size||u,(e.duration||s)/v*1e3,"audio")})),e.frameLength=e.samples.length,e.duration=m/v,e.iFrames=Nw(n=e.samples).call(n,(function(e){return"I"===e.frameType})).length,e.pFrames=Nw(r=e.samples).call(r,(function(e){return"P"===e.frameType})).length,e.bFrames=Nw(i=e.samples).call(i,(function(e){return"B"===e.frameType})).length,e}))}var DL=Math.pow(2,32);var LL=nn,NL=O,FL=Ze,UL=se,BL=function(){var e=LL(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},VL=RegExp.prototype,jL=se,HL=function(e){var t=e.flags;return void 0!==t||"flags"in VL||FL(e,"flags")||!UL(VL,e)?t:NL(BL,e)},zL=RegExp.prototype,WL=n((function(e){return e===zL||jL(zL,e)?HL(e):e.flags})),GL=function(){var e=[];e[3]="ES_Descriptor",e[4]="DecoderConfigDescriptor",e[5]="DecoderSpecificInfo",e[6]="SLConfigDescriptor",this.getDescriptorName=function(t){return e[t]};var t=this,n={};return this.parseOneDescriptor=function(t){var r,i,o=0,a=t.readU8();for(t.forward(1),i=t.readU8(),t.forward(1);128&i;)o=(127&i)<<7,i=t.readU8(),t.forward(1);return o+=127&i,(r=e[a]?new n[e[a]](o):new n.Descriptor(o)).parse(t),r},n.Descriptor=function(e,t){this.tag=e,this.size=t,this.descs=[]},n.Descriptor.prototype.parse=function(e){this.data=lk(e).call(e,this.size),e.forward(this.size)},n.Descriptor.prototype.findDescriptor=function(e){for(var t=0;t<this.descs.length;t++)if(this.descs[t].tag===e)return this.descs[t];return null},n.Descriptor.prototype.parseRemainingDescriptors=function(e){for(var n=e.offset;e.offset<n+this.size;){var r=t.parseOneDescriptor(e);this.descs.push(r)}},n.ES_Descriptor=function(e){n.Descriptor.call(this,3,e)},n.ES_Descriptor.prototype=new n.Descriptor,n.ES_Descriptor.prototype.parse=function(e){if(this.ES_ID=e.readU16(),e.forward(2),this.flags=e.readU8(),e.forward(1),this.size-=3,128&WL(this)?(this.dependsOn_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.dependsOn_ES_ID=0,64&WL(this)){var t,n=e.readU8();e.forward(1),this.URL=Dw(t=tT(lk(e).call(e,n))).call(t,(function(e){return String.fromCharCode(e)})),e.forward(n),this.size-=n+1}else this.URL="";32&WL(this)?(this.OCR_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(e)},n.ES_Descriptor.prototype.getOTI=function(e){var t=this.findDescriptor(4);return t?t.oti:0},n.ES_Descriptor.prototype.getAudioConfig=function(e){var t=this.findDescriptor(4);if(!t)return null;var n=t.findDescriptor(5);if(n&&n.data){var r=(248&n.data[0])>>3;return 31===r&&n.data.length>=2&&(r=32+((7&n.data[0])<<3)+((224&n.data[1])>>5)),r}return null},n.DecoderConfigDescriptor=function(e){n.Descriptor.call(this,4,e)},n.DecoderConfigDescriptor.prototype=new n.Descriptor,n.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readU8(),e.forward(1),this.streamType=e.readU8(),e.forward(1),this.bufferSize=e.readU24(),e.forward(3),this.maxBitrate=e.readU32(),e.forward(4),this.avgBitrate=e.readU32(),e.forward(4),this.size-=13,this.parseRemainingDescriptors(e)},n.DecoderSpecificInfo=function(e){n.Descriptor.call(this,5,e)},n.DecoderSpecificInfo.prototype=new n.Descriptor,n.SLConfigDescriptor=function(e){n.Descriptor.call(this,6,e)},n.SLConfigDescriptor.prototype=new n.Descriptor,this};function KL(e){var t,n,r,i=Hm(t=e.descs).call(t,(function(e){return 4===e.tag}));i&&(n=Hm(r=i.descs).call(r,(function(e){return 5===e.tag})));var o=DT({},i);return delete o.descs,o.config=(null==n?void 0:n.data.length)?tT(null==n?void 0:n.data):[],o}function YL(e){return Dw(e).call(e,(function(e){return e.toString(16)})).join("")}function XL(e){var t=e.body,n={},r=t[0],i=new wL(t);if(i.forward(4),n.systemId=YL(lk(i).call(i,16)),i.forward(16),r>0){var o=i.readU32();n.kids=[];var a=0;for(i.forward(4);a<o;)n.kids.push(YL(lk(i).call(i,16))),i.forward(16),a++}var s,l=i.readU32();return i.forward(4),n.dataSize=l,n.data=lk(i).call(i,l),n.dataToBase64=btoa((s=n.data,Dw(s).call(s,(function(e){return String.fromCharCode(e)})).join(""))),n}var qL=Math.pow(2,32);var JL=Math.pow(2,32);function QL(e){var t=e.body,n={samples:[]},r=new wL(t);n.version=r.readU8(),r.forward(1),n.flags=lk(r).call(r,3);var i,o,a,s,l=(i=WL(n),o=sO(i,3),a=o[1],{dataOffsetPresent:!!(1&(s=o[2])),firstSampleFlagsPresent:!!(4&s),sampleDurationPresent:!!(1&a),sampleSizePresent:!!((2&a)>>1),sampleFlagsPresent:!!((4&a)>>2),sampleCompositionTimeOffsetPresent:!!((8&a)>>3)}),u=l.dataOffsetPresent,c=l.firstSampleFlagsPresent,h=l.sampleDurationPresent,d=l.sampleSizePresent,f=l.sampleFlagsPresent,p=l.sampleCompositionTimeOffsetPresent;n.trFlags=l,r.forward(3),n.sampleCount=r.readU32(),r.forward(4),u&&(n.dataOffset=r.readU32(),r.forward(4)),c&&(n.firstSampleFlags=CL(t,r.offset),r.forward(4));for(var v=0;v<n.sampleCount;){var g={};h&&(g.duration=r.readU32(),r.forward(4)),d&&(g.size=r.readU32(),r.forward(4)),f&&(g.flags=CL(t,r.offset),r.forward(4)),p&&(g.ctOffset=r.readU32(),r.forward(4)),n.samples.push(g),v++}return n}function ZL(e){var t=PL(e instanceof ArrayBuffer?new Uint8Array(e):e,0);if($L(t),!OL(t,e)){var n,r=AL(t,"mdat");if(r)r.bodyView=Nw(n=[Pm({type:"video"},RL(t,"vide",e)),Pm({type:"audio"},RL(t,"soun",e))]).call(n,(function(e){return!!e.samples}))}return t}function $L(e){var t=0;e.forEach((function(e){switch(e.type){case"ftyp":case"styp":e.bodyView=function(e){var t=e.body,n=e.length,r=new wL(t),i={compatible:[]};i.major=sL(t,0),r.forward(4),i.version=r.readU32(),r.forward(4);for(var o=r.offset;o<n-8;)i.compatible.push(sL(t,o)),o+=4;return i}(e);break;case"moov":case"trak":case"mvex":case"mdia":case"minf":case"dinf":case"moof":case"traf":case"stbl":e.bodyView=PL(e.body,e.start+8),$L(e.bodyView);break;case"stsd":var n=function(e){var t=e.body,n=e.start,r=new wL(t);r.forward(4);var i=r.readU32();return r.forward(4),{entryCount:i,childData:PL(r.subarray(),n+8+8)}}(e),r=n.entryCount,i=n.childData;e.entryCount=r,e.bodyView=i,$L(e.bodyView);break;case"mvhd":e.bodyView=(h=e.body,d=new wL(h),f={},d.forward(4),f.createTime=d.readU32(),d.forward(4),f.modifyTime=d.readU32(),d.forward(4),f.timescale=d.readU32(),d.forward(4),f.duration=d.readU32(),d.forward(4),f.rate=d.readU32(),d.forward(4),d.forward(2),d.forward(70),f.nextTrackId=d.readU32(),f);break;case"tkhd":e.bodyView=function(e){var t=e.body,n=new wL(t,4),r={},i=n.readU8();r.version=i,1===i?n.forward(16):n.forward(8),r.trackId=n.readU32(),n.forward(4),1===i?(r.duration=n.readU32()*JL,n.forward(4),r.duration+=n.readU32()):r.duration=n.readU32();var o=t.byteLength;return o-=8,n.offset=o,r.width=n.readU32()>>16,n.forward(4),r.height=n.readU32()>>16,r}(e);break;case"mehd":e.bodyView=function(e){var t,n=e.body,r=new wL(n);if(r.forward(4),1===n[0]){var i=r.readU32();r.forward(4),t=i*(1<<30)*2+r.readU32()}else t=r.readU32();return{fragDuration:t}}(e);break;case"mdhd":e.bodyView=function(e){var t=e.body,n={},r=new wL(t),i=t[0];return r.forward(4),1===i?(r.forward(16),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()*DL,r.forward(4),n.duration+=r.readU32()):(r.forward(8),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()),n}(e);break;case"hdlr":e.bodyView=function(e){return{handlerType:sL(e.body,8)}}(e);break;case"trex":e.bodyView=function(e){var t=e.body,n={},r=new wL(t);return r.forward(4),n.trackId=r.readU32(),r.forward(4),n.defaultSdescriptionIndex=r.readU32(),r.forward(4),n.defaultSampleDuration=r.readU32(),r.forward(4),n.defaultSampleSize=r.readU32(),r.forward(4),n.defaultSampleFlags=CL(t,r.offset),n}(e);break;case"trun":e.bodyView=QL(e),t=e.bodyView.samples.length;break;case"tfdt":e.bodyView=function(e){var t=e.body,n=new wL(t),r=0;return n.forward(4),1===t[0]?(r=n.readU32()*qL,n.forward(4),r+=n.readU32()):r=n.readU32(),{baseMediaDecodeTime:r}}(e);break;case"avc1":case"hvc1":case"hev1":e.bodyView=function(e){var t=e.body,n=e.start,r=new wL(t);return r.forward(78),PL(r.subarray(),n+78+8)}(e),$L(e.bodyView);break;case"mp4a":e.bodyView=function(e){var t=e.body,n=lk(t).call(t,28),r=(new GL).parseOneDescriptor(new wL(lk(n).call(n,12),0)),i=(null==r?void 0:r.getAudioConfig)&&r.getAudioConfig();return{channelCount:t[17],samplesize:t[19],sampleRate:t[24]<<8|t[25],objectType:i,codec:"mp4a.40."+i,ests:KL(r)}}(e),e.bodyView&&(e.bodyView.codecType="aac");break;case"avcC":e.bodyView=function(e){var t=e.body,n={spsArr:[],ppsArr:[]},r=new wL(t);n.configVersion=t[0],n.avcProfile=t[1],n.profileComptibility=t[2],n.avcLevel=t[3],r.forward(4),r.forward(1);var i=31&lk(r).call(r,1);r.forward(1);for(var o=0;o<i;o++){var a=r.readU16();r.forward(2),n.spsArr.push(r.subarray(a)),r.forward(a)}var s=lk(r).call(r,1);r.forward(1);for(var l=0;l<s;l++){var u=r.readU16();r.forward(2),n.ppsArr.push(r.subarray(u)),r.forward(u)}return n}(e);var o=e.bodyView;if(o.codecType="avc",!(null==o?void 0:o.sps)){var a=o.spsArr[0],s=KD.removeEPB(a);o.sps=YD.parseSPS(s)}break;case"hvcC":e.bodyView=function(e){var t=e.body;if(!(t.length<23)){t[21];for(var n,r,i,o=[],a=[],s=[],l=23,u=t[22],c=0;c<u;c++){n=63&t[l],r=t[l+1]<<8|t[l+2],l+=3;for(var h=0;h<r;h++)if(i=t[l]<<8|t[l+1],l+=2,i){switch(n){case 32:s.push(t.subarray(l,l+i));break;case 33:o.push(t.subarray(l,l+i));break;case 34:a.push(t.subarray(l,l+i))}l+=i}}return{spsArr:o,ppsArr:a,vpsArr:s}}}(e);var l=e.bodyView;if(l.codecType="bytevc1",!(null==l?void 0:l.sps)){var u=l.spsArr[0],c=KD.removeEPB(u);l.sps=XD.parseSPS(c)}break;case"btrt":e.bodyView=function(e){var t=e.body,n=new wL(t),r=n.readU32();n.forward(4);var i=n.readU32();return n.forward(4),{bufferSizeDB:r,maxBitrate:i,avgBitrate:n.readU32()}}(e);break;case"stts":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleDelta:s})}return{entries:i,count:i.length}}(e),bL(e.bodyView).length&&(t=bL(e.bodyView)[0].sampleCount);break;case"ctts":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleOffset:s})}return{entries:i,count:i.length}}(e);break;case"cslg":e.bodyView=function(e){var t,n,r,i,o=e.body,a=new wL(o);return a.forward(4),t=a.read32(),a.forward(4),n=a.read32(),a.forward(4),r=a.read32(),a.forward(4),i=a.read32(),a.forward(4),{compositionToDTSShift:t,leastDecodeToDisplayDelta:n,greatestDecodeToDisplayDelta:r,compositionStartTime:i,compositionEndTime:a.read32()}}(e);break;case"stss":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();r.push(a),n.forward(4)}return{entries:r,count:r.length}}(e);break;case"stsz":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);var o=n.readU32();if(n.forward(4),0===i)for(var a=0;a<o;a++){var s=n.readU32();r.push(s),n.forward(4)}else console.warn("parse stsz, sample size not equal 0");return{entries:r,count:r.length}}(e);break;case"stsc":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4);var l=n.readU32();n.forward(4),r.push({firstChunk:a,samplesPreChunk:s,sampleDesIndex:l})}return{entries:r,count:r.length}}(e);break;case"stco":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();i.push(a),n.forward(4)}return{entries:i,count:i.length}}(e);break;case"sdtp":e.bodyView=function(e,t){var n=e.body,r=new wL(n);r.forward(4);for(var i,o,a,s,l=[],u=0;u<t;u++){var c=r.readU8();i=(192&c)>>6,o=(48&c)>>4,a=(12&c)>>2,s=3&c,l.push({isLeading:i,dependsOn:o,isDenpendedOn:a,hasRedundancy:s}),r.forward(1)}return{entries:l}}(e,t);break;case"mfhd":e.bodyView=function(e){var t=e.body,n=new wL(t);return n.forward(4),{seqNumber:n.readU32()}}(e);break;case"tfhd":e.bodyView=function(e){var t=e.body,n=new wL(t);n.forward(1);var r=lk(n).call(n,3),i=r[0]<<16|r[1]<<8|r[2],o={flags:r},a={baseDataOffsetPresent:!!(1&i),sampleDescriptionIndexPresent:!!(2&i),defaultSampleDurationPresent:!!(8&i),defaultSampleSizePresent:!!(16&i),defaultSampleFlagsPresent:!!(32&i),durationIsEmpty:!!(65536&i),defaultBaseIsMoof:!!(131072&i)};if(o.tfFlags=a,n.forward(3),o.trackId=n.readU32(),a.baseDataOffsetPresent){n.forward(4);var s=n.readU32();n.forward(4);var l=n.readU32();o.baseDataOffset=s<<32|l}else o.baseDataOffset=0,console.warn("base data offset not detected in tfhd");return a.sampleDescriptionIndexPresent&&(n.forward(4),o.sampleDescriptionIndex=n.readU32()),a.defaultSampleDurationPresent&&(n.forward(4),o.defaultSampleDuration=n.readU32()),a.defaultSampleSizePresent&&(n.forward(4),o.defaultSampleSize=n.readU32()),a.defaultSampleFlagsPresent&&(n.forward(4),o.defaultSampleFlags=n.readU32()),o}(e);break;case"pssh":e.bodyView=XL(e)}var h,d,f}))}var eN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"parse",value:function(e){return ZL(e)}},{key:"parseV2",value:function(e,t){var n,r,i,o,a,s,l=Nw(e).call(e,(function(e){return"mdat"===e.type})),u=[],c=null==(r=null==(n=l[0])?void 0:n.bodyView)?void 0:Nw(r).call(r,(function(e){return"video"===e.type}))[0],h=null==(o=null==(i=l[0])?void 0:i.bodyView)?void 0:Nw(o).call(o,(function(e){return"audio"===e.type}))[0],d=Math.min((null==(a=null==h?void 0:h.samples[0])?void 0:a.dtsTime)||0,(null==(s=null==c?void 0:c.samples[0])?void 0:s.dtsTime)||0);l.forEach((function(e){e.bodyView.forEach((function(e){e.samples.forEach((function(e){e.time=mD(e.dtsTime-d),u.push(e)}))}))}));var f={items:aC(u).call(u,(function(e,t){return e.time>t.time?1:-1}))};return this._addMetadataToFirstKeyFrame(c),f.rates=JD(f),f}},{key:"getSnapshoot",value:function(e){return function(e){var t,n,r,i,o,a,s=Nw(e).call(e,(function(e){return"mdat"===e.type}));if(!s.length){var l=IL(e,"vide"),u=IL(e,"soun"),c=null==(n=AL(null==l?void 0:l.bodyView,"mdhd"))?void 0:n.bodyView,h=(null==(r=AL(null==l?void 0:l.bodyView,"avcC"))?void 0:r.bodyView)||(null==(i=AL(null==l?void 0:l.bodyView,"hvcC"))?void 0:i.bodyView),d=null==(o=AL(null==u?void 0:u.bodyView,"mdhd"))?void 0:o.bodyView,f=null==(a=AL(null==u?void 0:u.bodyView,"mp4a"))?void 0:a.bodyView;try{return{video:Pm(Pm({},c),{},{duration:(null==c?void 0:c.duration)/c.timescale},h),audio:Pm(Pm(Pm({},d),{},{duration:(null==d?void 0:d.duration)/d.timescale},f),f.ests)}}catch(sU){}return{}}var p=IO(t=Dw(s).call(s,(function(e){return e.bodyView}))).call(t,(function(e,t){return Mm(e).call(e,t)}),[]),v=IO(p).call(p,(function(e,t){var n,r=t.type,i=t.frameLength,o=t.iFrames,a=t.pFrames,s=t.bFrames,l=t.duration;return e[r]?(e[r].frameLength+=i,e[r].iFrames+=o,e[r].pFrames+=a,e[r].bFrames+=s,e[r].duration+=l,e):(e[r]=DT({},t),e[r].refDuration||(e[r].refDuration=null==(n=t.samples[0])?void 0:n.duration),e)}),{}),g=v.video;if(g){var y=g.frameLength,m=g.iFrames,_=g.pFrames,b=g.bFrames;g.iPercent=mD(m/y*100),g.pPercent=mD(_/y*100),g.bPercent=mD(b/y*100)}return v}(e)}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t;if(e){var n=Nw(t=e.samples).call(t,(function(e){return e.keyframe}))[0];n&&(n.sps=e.sps,n.vpsArr=e.vpsArr,n.spsArr=e.spsArr,n.ppsArr=e.ppsArr)}}}]),e}(),tN=.2,nN=40,rN=.3,iN=.5,oN=.1,aN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Hm(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Hm(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t&&n){var r,i,o,a=t.pts-n.pts,s=mD(a/t.timescale);if(a/t.timescale>=tN)return[{description:Mm(r=Mm(i=Mm(o="【音视频首帧gap差距过大】视频首帧pts: ".concat(t.pts,", 音频首帧pts: ")).call(o,n.pts,", delta: ")).call(i,a,"(")).call(r,s,"s)"),tips:"".concat(s>10?"可能造成无法起播问题":"")}]}}}]),e}(),sN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),r=!!e[0]&&e[0]instanceof OD;return[this._checkBreak(t,"video"),this._checkBreak(n,"audio"),r&&this._checkConsecutiveFrameBreak(null==e?void 0:Nw(e).call(e,(function(e){return e.isSample})))]}},{key:"_checkBreak",value:function(e,t){var n=e.length;if(n)for(var r=0;r<n-1;r++){var i,o,a,s;if(Math.abs(e[r].dtsTime-e[r+1].dtsTime)>iN)return{description:Mm(i=Mm(o=Mm(a=Mm(s="【".concat(t,"时间戳发生跳变】,当前帧dts: ")).call(s,e[r].dts,", time:")).call(a,e[r].time,", 后一帧dts: ")).call(o,e[r+1].dts,", time:")).call(i,e[r+1].time)}}}},{key:"_checkConsecutiveFrameBreak",value:function(e){var t=e.length;if(t)for(var n=0;n<t-1;n++)if(Math.abs(e[n].dtsTime-e[n+1].dtsTime)>oN){var r,i,o,a,s,l=e[n],u=e[n+1];return{description:Mm(r=Mm(i=Mm(o=Mm(a=Mm(s="【前后帧dts差距过大】,当前帧(".concat(l.streamType,")dts: ")).call(s,l.dts,", time:")).call(a,l.time,", 后一帧(")).call(o,u.streamType,")dts: ")).call(i,u.dts,", time:")).call(r,u.time),tips:"可能造成播放画面卡顿或者声音卡顿"}}}}]),e}(),lN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){return[this._checkKeyFrame(e),this._checkAudioFrameDataFull(e)]}},{key:"_checkKeyFrame",value:function(e){var t=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}))[0];if(t&&"I"!==t.frameType)return{description:"【视频首帧非关键帧】",tips:"可能播放花屏或者报解码错误"}}},{key:"_checkAudioFrameDataFull",value:function(e){var t=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),n=t.length;if(n)for(var r=0;r<n;r++){var i,o=t[r].data;if((null==o?void 0:o.length)<nN)return{description:Mm(i="【音频帧数据较少】 pts=".concat(t[r].pts,", time=")).call(i,t[r].time),tips:"可能由于音频数据原因导致解码报错"}}}}]),e}(),uN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e,t){return[this._hasVideoMetadata(e),this._hasAudioMetadata(e),this._checkRepeatedSps(e),this._metadataOnlyInSequeceHeader(e,t)]}},{key:"_hasVideoMetadata",value:function(e){var t,n=null==(t=null==e?void 0:Nw(e).call(e,(function(e){return"video"===e.streamType}))[0])?void 0:t.bodyView;if(n&&!n.sps)return{description:"【未检测到视频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_hasAudioMetadata",value:function(e){var t,n=null==(t=null==e?void 0:Nw(e).call(e,(function(e){return"audio"===e.streamType}))[0])?void 0:t.bodyView;if(n&&(!n.config||!n.sampleRate||!n.channelCount))return{description:"【未检测到音频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_checkRepeatedSps",value:function(e){var t,n=null==e?void 0:Nw(e).call(e,(function(e){return"video"===e.streamType}))[0],r=(null==(t=null==n?void 0:n.bodyView)?void 0:t.spsArr)||[];if(n&&r.length>1&&r[0].join(",")!==r[1].join(","))return{description:"【关键帧前包含多个sps信息】"}}},{key:"_metadataOnlyInSequeceHeader",value:function(e,t){var n;if("FLV"===t){var r=null==e?void 0:Hm(e).call(e,(function(e){return e.keyframe}));if(r){var i=r.isHevc;return-1===ak(n=r.nalTypes).call(n,i?33:7)?{description:"【sps、pps信息只存在于Sequence Header中】"}:void 0}}}}]),e}(),cN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Hm(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}));if(t)return t.isHevc?[{id:1,description:"【H265编码格式】",tips:"对于不支持H265解码的设备无法播放"}]:void 0}}]),e}(),hN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){if(null==e?void 0:Hm(e).call(e,(function(e){return e.isSample&&"B"===e.frameType})))return[{description:"【存在B帧】"}]}}]),e}(),dN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length&&n.length){var r,i,o=t[t.length-1].ptsTime-t[0].ptsTime,a=n[n.length-1].ptsTime-n[0].ptsTime;if(Math.abs(o-a)>=rN)return[{description:Mm(r=Mm(i="【音视频时长存在差距】, video=".concat(o,"s, audio=")).call(i,a,"s, delta=")).call(r,mD(o-a),"s"),tips:"可能造成播放画面卡顿或者声音卡顿"}]}}}]),e}(),fN=function(){function e(){Sy(this,e)}return Iy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Nw(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length||n.length)return t.length&&n.length?void 0:[{description:"【流开始只包含".concat(t.length?"音频":"视频","】"),tips:"可能播放没有声音或者没有画面"}]}}]),e}();function pN(e,t){var n,r,i;return Nw(n=IO(r=Dw(i=[new cN,new aN,new sN,new lN,new uN,new dN,new hN,new fN]).call(i,(function(n){return n.detect(e,t)}))).call(r,(function(e,t){return Mm(e).call(e,t)}),[])).call(n,Boolean)}var vN=hE,gN=function(e,t,n){return function(e,t,n){t in e?vN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==wc(t)?t+"":t,n),n},yN=function(){function e(t){var n=this;Sy(this,e),gN(this,"_opts",null),gN(this,"_controller",null),gN(this,"_reader",null),gN(this,"_loading",!1),gN(this,"_chunks",[]),gN(this,"_readStream",(function(e,t){var r=0;n._reader=e.getReader();var i=n._chunks;return function e(){var o;return null==(o=n._reader)?void 0:o.read().then((function(n){var o=n.value,a=n.done;return i.push(o),t(r,o),a?Lw.resolve(yD(Nw(i).call(i,Boolean))):(r+=o.byteLength,e())}))}()})),this._opts=t}return Iy(e,[{key:"request",value:function(){var e=this,t=this._opts,n=t.url,r=t.onProgress,i=t.contentType,o=void 0===i?"ArrayBuffer":i,a=t.loadTimeout,s=void 0===a?5e3:a,l=t.headers;return this._controller=new AbortController,Lw.race([fetch(n,{signal:this._controller.signal,headers:l}),new Lw((function(t,n){setTimeout((function(){var t;e._loading||(n({code:0,message:"timeout"}),null==(t=e._controller)||t.abort())}),s)}))]).then((function(t){return t.ok&&t.status>=200&&t.status<300?(e._loading=!0,t):Lw.reject({code:t.status,message:t.statusText})})).then((function(t){switch(o){case"TEXT":return t.text();case"JSON":return t.json();case"ArrayBuffer":return r?e._readStream(t.clone().body,r):t.arrayBuffer()}})).catch((function(t){if(e._loading=!1,"AbortError"!==t.name)return Lw.reject({code:t.code||0,message:t.message})}))}},{key:"cancel",value:function(){var e,t;try{null==(e=this._reader)||e.cancel(),null==(t=this._controller)||t.abort(),this._reader=null,this._controller=null}catch(sU){}}}]),e}(),mN=function(){function e(){Sy(this,e)}var t;return Iy(e,[{key:"parse",value:(t=ny(ey().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,d,f,p=this;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=[],this._loader=new yN(Pm(Pm({url:t},n),{},{onProgress:function(e,t){u.push(t),e>n.probeSize&&p._loader.cancel()}})),e.next=4,this._loader.request();case 4:return c=new rL,h=c.parse(yD(u)),d=c.getSnapshoot(h),f=null==(r=d.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=d.video)?void 0:i.codecType,codecStr:null==f?void 0:f.codec,width:null==f?void 0:f.width,height:null==f?void 0:f.height,vDration:null==(o=null==d?void 0:d.video)?void 0:o.duration,aDuration:null==(a=null==d?void 0:d.audio)?void 0:a.duration,sampleRate:null==(s=null==d?void 0:d.audio)?void 0:s.sampleRate,channelCount:null==(l=null==d?void 0:d.audio)?void 0:l.channelCount,views:h,snap:d});case 9:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),_N={exports:{}};_N.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||hE(e,t,{enumerable:!0,get:r})},n.r=function(e){void 0!==dE&&VR&&hE(e,VR,{value:"Module"}),hE(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==wc(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),hE(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){function r(e,t){var n=sk(e);if(sE){var r=sE(e);t&&(r=Nw(r).call(r,(function(t){return lE(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){return(i="function"==typeof dE&&"symbol"==wc(fE)?function(e){return wc(e)}:function(e){return e&&"function"==typeof dE&&e.constructor===dE&&e!==dE.prototype?"symbol":wc(e)})(e)}function o(e,t,n){return t in e?hE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,"m3u8Parser",(function(){return h})),n.d(t,"mpdParser",(function(){return g}));var a=/EXT(?:-X-)?([^:]+):?(.*)$/,s=/([^,="]+)((="[^"]+")|(=[^,]+))*/g;function l(e){var t;return IO(t=e.split("-")).call(t,(function(e,t){return e+(e?t.charAt(0)+lk(t).call(t,1).toLowerCase():t.toLowerCase())}),"")}function u(e){if(!/^#EXT/.test(e)&&/^\s*#/.test(e))return null;var t,n,u=a.exec(e);return u?(t=l(u[1]),n=function(e,t){if(!e)return null;var n=Dw(t=e.match(s)).call(t,(function(e){return function(e){var t=kS(e).call(e).replace("=","|").split("|");if(2==t.length)return o({},l(t[0]),t[1].replace(/("|')/g,""));var n=fS(t[0]);return Ik(n)?t[0]:n}(e)}));return 1===n.length?n[0]:0===Nw(n).call(n,(function(e){return"object"===i(e)})).length?n:IO(n).call(n,(function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):uE?cE(e,uE(n)):r(Object(n)).forEach((function(t){hE(e,t,lE(n,t))}))}return e}({},e,{},t)}),{})}(u[2])):(t="url",n=e),o({},t,n)}function c(e,t){if(/^https?/.test(e)||/^data:/.test(e)||/^sdk:/.test(e))return e;for(t=lk(n=t.split("/")).call(n,0,-1),e=e.split("/");e.length;){var n,r=e.shift();-1==ak(t).call(t,r)&&t.push(r)}return t.join("/")}var h=function(e,t,n){var r,i,o;if(!e||!t)return{error:1,msg:"invalid input"};var a,s=Nw(r=Dw(i=Nw(o=e.split("\n")).call(o,Boolean)).call(i,(function(e){return u(kS(e).call(e))}))).call(r,Boolean);if(!s.length)return{error:1,msg:"invalid m3u8"};a=0!==Nw(s).call(s,(function(e){return!!e.streamInf})).length?{master:!0,m3u8Url:t,levels:[],medias:[]}:{master:!1,m3u8Url:t,duration:0,startSN:0,endSN:0,segments:[],live:!0};try{a=function(e,t,n){for(var r=t.master,i=e.length,o=0,a=0,s=0,l=0,u=0,h=-1,d=0;d<i;d++){var f=e[d];for(var p in f){var v=f[p];switch(v&&v.uri&&(v.url=c(v.uri,t.m3u8Url)),p){case"inf":var g={start:a,end:a+(Array.isArray(v)?v[0]:v),cc:o,sn:s+l};h>=0&&(g.keyIndex=h),l++,a=g.end,t.segments.push(g);break;case"start":a=v;break;case"discontinuity":o++;break;case"mediaSequence":s=v;break;case"streamInf":u++,v.levelId=u,t.levels.push(v);break;case"media":t.medias.push(v);break;case"endlist":t.live=!1;break;case"key":h++,t.key?t.key.push(v):t.key=[v];break;case"url":var y=r?t.levels:t.segments;if(!y.length)throw new Error("invalid m3u8");r?y[u-1].url=c(v,t.m3u8Url):y[l-1].url=c(v,t.m3u8Url);break;default:v&&(t[p]=v)}}n&&(t=n(f,t))}return r||(t.startSN=s,t.endSN=s+l-1,t.duration=a),t}(s,a,n)}catch(l){return{error:1,msg:l.message}}return a},d=/\s*(<\/?[^>]+>)/,f=/\s*(?:<\/?([^\s>]+))?\s*([^>]+)*(?:\/?>)?/,p=/\s*([^=]+)="([^"]+)"/g;function v(e,t){for(var n,r,i,o=[],a=e.length,s=0;s<a;s++)if((n=e[s]).closed)if(r=o.pop(),"pureValue"!==n.tagName){if(r&&r.tagName===n.tagName?i=o.pop():(i=r,r=n),!i){o.push(r);break}var l=r,u=l.tagName,c=l.attrs,h=i.attrs[u];t&&(c=t(u,c)),i.attrs[u]=h?Array.isArray(h)?Mm(h).call(h,c):[h,c]:c,o.push(i)}else r.attrs?r.attrs.value=n.attrs.value:r.attrs=n.attrs,o.push(r);else o.push(n);var d,f,p,v=o[0];return v?"undefined"!=v.tagName?(d={},f=v.tagName,p=v.attrs,f in d?hE(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d):v.tagName:null}var g=function(e,t){if(!e)return{error:1,msg:"invalid input"};try{var n,r,i;return v(Nw(n=Dw(r=Nw(i=e.split(d)).call(i,Boolean)).call(r,(function(e){return function(e){var t,n,r=e.match(f),i={},o=(t=r&&r[1])?IO(n=t.split("_")).call(n,(function(e,t){return e?e+=t.charAt(0).toUpperCase()+lk(t).call(t,1):e=t.charAt(0).toLowerCase()+lk(t).call(t,1)}),""):"";if(r&&r[1]&&r[2]){for(var a,s={};null!=(a=p.exec(r[2]));)s[a[1]]=a[2];return"?xml"===o?null:(i.tagName=o,i.attrs=s,i.closed=/\/$/.test(r[2]),i)}return r?/^<\//.test(r[0])?(i.tagName=o,i.closed=!0,i):/^</.test(r[0])?(i.tagName=o,i.attrs={},i):(i.tagName="pureValue",i.attrs={value:r[2]},i.closed=!0,i):null}(e)}))).call(n,Boolean),t)}catch(o){return{error:1,msg:o.message}}}}]);var bN=_N.exports;function wN(e){return kN.apply(this,arguments)}function kN(){return kN=ny(ey().mark((function e(t){var n,r,i,o=arguments;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new yN(Pm(Pm({url:t},o.length>1&&void 0!==o[1]?o[1]:{}),{},{contentType:"TEXT"})),e.next=4,n.request();case 4:return r=e.sent,i=bN.m3u8Parser(r,t,(function(e,t){var n;if(!e.url||!/^\//.test(e.url))return t;var r=e.url,i=t.segments[t.segments.length-1];return i.url=lk(n=i.url.split("/")).call(n,0,3).join("/")+r,t})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)}))),kN.apply(this,arguments)}var EN=function(){function e(){Sy(this,e)}var t;return Iy(e,[{key:"parse",value:(t=ny(ey().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,d,f,p,v,g,y,m;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wN(t,n);case 2:if(!(u=e.sent).master){e.next=7;break}return e.next=6,wN(u.levels[0].url);case 6:u=e.sent;case 7:if(null==u?void 0:u.segments.length){e.next=9;break}throw new Error("invalid m3u8");case 9:c=[],h=n.nbSegment,d=0,f=ey().mark((function e(){var t;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new yN(Pm(Pm({url:u.segments[d].url},n),{},{onProgress:function(e,r){c.push(r),e>n.probeSize&&t.cancel()}})),e.next=3,t.request();case 3:h--,d++;case 5:case"end":return e.stop()}}),e)}));case 13:if(!h){e.next=17;break}return e.delegateYield(f(),"t0",15);case 15:e.next=13;break;case 17:return p=new Uint8Array(yD(Nw(c).call(c,Boolean))),v=new dL,g=v.parse(p),y=v.getSnapshoot(g),m=null==(r=y.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=y.video)?void 0:i.codecType,codecStr:null==m?void 0:m.codec,width:null==m?void 0:m.width,height:null==m?void 0:m.height,vDration:null==(o=null==y?void 0:y.video)?void 0:o.duration,aDuration:null==(a=null==y?void 0:y.audio)?void 0:a.duration,sampleRate:null==(s=null==y?void 0:y.audio)?void 0:s.sampleRate,channelCount:null==(l=null==y?void 0:y.audio)?void 0:l.channelCount,views:g,snap:y});case 23:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),TN=function(){function e(){Sy(this,e)}var t;return Iy(e,[{key:"parse",value:(t=ny(ey().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,d,f,p,v,g,y,m,_,b,w;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=new yN(Pm(Pm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:"bytes=0-1499"}})),h=[],e.next=4,c.request();case 4:return d=e.sent,f=new Uint8Array(d),p=(new eN).parse(f),v=Hm(p).call(p,(function(e){return"mdat"===e.type})),(g=Hm(p).call(p,(function(e){return"moov"===e.type})))?(h.push(g.start),h.push(g.start+g.size)):v&&h.push(v.start+v.size),c=new yN(Pm(Pm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:Mm(r="bytes=".concat(h[0],"-")).call(r,h[1]||"")}})),e.next=13,c.request();case 13:return y=e.sent,m=new eN,_=m.parse(y),b=m.getSnapshoot(_),w=null==(i=b.video)?void 0:i.sps,e.abrupt("return",{codec:null==(o=b.video)?void 0:o.codecType,codecStr:null==w?void 0:w.codec,width:null==w?void 0:w.width,height:null==w?void 0:w.height,vDration:null==(a=null==b?void 0:b.video)?void 0:a.duration,aDuration:null==(s=null==b?void 0:b.audio)?void 0:s.duration,sampleRate:null==(l=null==b?void 0:b.audio)?void 0:l.sampleRate,channelCount:null==(u=null==b?void 0:b.audio)?void 0:u.channelCount,views:m.parseV2(_,!0),snap:b});case 19:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),SN=function(){function e(){Sy(this,e)}var t;return Iy(e,[{key:"parseUrl",value:(t=ny(ey().mark((function e(t){var n,r,i,o,a=arguments;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=DT({timeout:5e3,probeSize:8e4,nbSegment:1},r=a.length>1&&void 0!==a[1]?a[1]:{}),!/flv/.test(t)){e.next=9;break}return e.next=5,(new mN).parse(t,r);case 5:i=e.sent,o=iL,e.next=20;break;case 9:if(!/m3u8?/.test(t)){e.next=16;break}return e.next=12,(new EN).parse(t,r);case 12:i=e.sent,o=oL,e.next=20;break;case 16:return e.next=18,(new TN).parse(t,r);case 18:i=e.sent,o=aL;case 20:return i.exceps=Nw(n=pN(i.views.items,o)).call(n,(function(e){return 1!==e.id})),e.abrupt("return",i);case 22:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),CN=function(){var e=ny(ey().mark((function e(t){var n,r,i,o,a,s,l,u,c,h,d,f;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ON(t);case 2:if("unknown"!==(l=e.sent)){e.next=7;break}e.t0=!1,e.next=10;break;case 7:return e.next=9,NN(Pm(Pm({},t),{},{codec:l}));case 9:e.t0=e.sent;case 10:if(e.t0&&(s=l===cD.H265?RN():IN(),a=PN(t)),IM("unknown"===l?cD.H264:l)&&(a=PN(t)),a||s){e.next=15;break}return e.abrupt("return",{});case 15:return e.next=17,Lw.all([(null===(n=a)||void 0===n?void 0:n.module)&&kM(a.module).catch((function(){})),(null===(r=s)||void 0===r?void 0:r.module)&&kM(s.module).catch((function(){}))]);case 17:return u=e.sent,c=sO(u,2),h=c[0],(d=c[1])&&(null===(i=s)||void 0===i||null===(o=i.afterLoad)||void 0===o||o.call(i,d)),f=UN([a,s]),e.abrupt("return",{options:f,plugins:h?[h]:[]});case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xN=function(){var e=ny(ey().mark((function e(t){var n,r,i,o,a,s,l,u,c,h,d,f,p;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ON(t);case 2:if("unknown"!==(u=e.sent)){e.next=7;break}e.t0=!1,e.next=10;break;case 7:return e.next=9,NN(Pm(Pm({},t),{},{codec:u}));case 9:e.t0=e.sent;case 10:if(e.t0&&(l=u===cD.H265?RN():IN(),s=AN(t)),("mobile"!==wC.device||null!=t&&null!==(n=t.hls)&&void 0!==n&&n.enableMSE)&&IM("unknown"===u?cD.H264:u)&&(s=AN(t)),s||l){e.next=15;break}return e.abrupt("return",{});case 15:return e.next=17,Lw.all([(null===(r=s)||void 0===r?void 0:r.module)&&kM(s.module).catch((function(){})),(null===(i=l)||void 0===i?void 0:i.module)&&kM(l.module).catch((function(){}))]);case 17:return c=e.sent,h=sO(c,2),d=h[0],(f=h[1])&&(null===(o=l)||void 0===o||null===(a=o.afterLoad)||void 0===a||a.call(o,f)),p=UN([s,l]),e.abrupt("return",{options:p,plugins:d?[d]:[]});case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),PN=function(e){var t;return{options:{flv:Pm({retryCount:0},null!==(t=null==e?void 0:e.flv)&&void 0!==t?t:{})},module:eM.PluginFlv}},AN=function(e){var t;return{options:{hls:Pm({retryCount:0},null!==(t=null==e?void 0:e.hls)&&void 0!==t?t:{})},module:eM.PluginHls}},IN=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:cD.H264},module:eM.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:cD.H264,wasmFallbackToAsm:!1,reuseWasmDecoder:!1,disabledWhenErrorOccur:!1})}}},RN=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:cD.H265},module:eM.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:cD.H265,wasmFallbackToAsm:!1,reuseWasmDecoder:!1})}}};function ON(e){return MN.apply(this,arguments)}function MN(){return(MN=ny(ey().mark((function e(t){return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.codec){e.next=2;break}return e.abrupt("return",t.codec);case 2:if(t.degradation!==hD.SoftFirst||!t.url){e.next=6;break}return e.next=5,DN(t.url);case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return","unknown");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function DN(e){return LN.apply(this,arguments)}function LN(){return(LN=ny(ey().mark((function e(t){var n,r;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(new SN).parseUrl(t);case 3:if(n=e.sent,"bytevc1"!==(r=n.codec)){e.next=9;break}return e.abrupt("return",cD.H265);case 9:if("avc"!==r){e.next=11;break}return e.abrupt("return",cD.H264);case 11:return e.abrupt("return","unknown");case 14:return e.prev=14,e.t0=e.catch(0),console.error("detect codec error: ",e.t0),e.abrupt("return","unknown");case 18:case"end":return e.stop()}}),e,null,[[0,14]])})))).apply(this,arguments)}function NN(e){return FN.apply(this,arguments)}function FN(){return(FN=ny(ey().mark((function e(t){return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.decodeType!==dD.Software){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,ON(t);case 4:if(e.sent!==cD.H265){e.next=10;break}if(!wC.isHevcSupported()){e.next=8;break}return e.abrupt("return",!1);case 8:if(t.degradation!==hD.SoftFirst){e.next=10;break}return e.abrupt("return",!0);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UN(e){return IO(e).call(e,(function(e,t){return DT(e,null==t?void 0:t.options)}),{})}var BN=$P,VN=function(e){return e[e.INVALID_PARAMETER=200]="INVALID_PARAMETER",e}(VN||{}),jN=Pm(Pm({},VN),JP),HN=Pm(Pm({},QP),{},Ry({},200,{messageTextKey:"INVALID_PARAMETER",level:qP.Fatal}));function zN(e,t){return new BN(HN[e],t)}var WN=["fallbackUrl"],GN={options:{},module:eM.PluginRtm},KN=function(){var e=ny(ey().mark((function e(t){var n,r,i,o,a,s,l,u,c,h,d;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.rtm||{},a=o.fallbackUrl,s=qy(o,WN),"flv"===(l=a&&OM.getStreamType(a))&&OM.isMseSupported(cD.H264)?i=PN(t):"hls"===l&&("mobile"!==wC.device||null!=t&&null!==(n=t.hls)&&void 0!==n&&n.enableMSE)&&OM.isMseSupported(cD.H264)&&(i=AN(t)),e.next=5,Lw.all([kM(GN.module).catch((function(){})),i&&kM(i.module).catch((function(){}))]);case 5:return u=e.sent,c=sO(u,2),h=c[0],d=c[1],e.abrupt("return",{options:Pm(Pm({},(null===(r=i)||void 0===r?void 0:r.options)||{}),{},{rts:Pm(Pm({retryCount:0},s),{},{backupURL:a,backupConstruct:d})}),plugins:h?[h]:[]});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),YN=function(e){return e.H264="h264",e}(YN||{}),XN=function(){var e=ny(ey().mark((function e(){var t;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kM(eM.PluginRtm);case 2:return t=e.sent,e.abrupt("return",t.isSupported());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qN=function(){var e=ny(ey().mark((function e(){var t,n,r,i=arguments;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:"h264",n=i.length>1?i[1]:void 0,e.next=4,kM(eM.PluginRtm);case 4:if(r=e.sent,"h264"!==t){e.next=7;break}return e.abrupt("return",r.isSupportedH264(null==n?void 0:n.targetProfileLevel));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),JN=function(){var e=ny(ey().mark((function e(t){var n;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t.url?OM.getStreamType(t.url):"")&&"unknown"!==n){e.next=3;break}return e.abrupt("return",{options:{},plugins:[]});case 3:if("rtm"!==n){e.next=7;break}return e.next=6,KN(t);case 6:case 10:case 14:return e.abrupt("return",e.sent);case 7:if("flv"!==n){e.next=11;break}return e.next=10,CN(t);case 11:if("hls"!==n){e.next=15;break}return e.next=14,xN(t);case 15:return e.abrupt("return",{options:{},plugins:[]});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),QN=NaN,ZN="[object Symbol]",$N=/^\s+|\s+$/g,eF=/^[-+]0x[0-9a-f]+$/i,tF=/^0b[01]+$/i,nF=/^0o[0-7]+$/i,rF=Zk,iF="object"==wc(t)&&t&&t.Object===Object&&t,oF="object"==("undefined"==typeof self?"undefined":wc(self))&&self&&self.Object===Object&&self,aF=iF||oF||Function("return this")(),sF=Object.prototype.toString,lF=Math.max,uF=Math.min,cF=function(){return aF.Date.now()};function hF(e){var t=wc(e);return!!e&&("object"==t||"function"==t)}function dF(e){return"symbol"==wc(e)||function(e){return!!e&&"object"==wc(e)}(e)&&sF.call(e)==ZN}function fF(e){if("number"==typeof e)return e;if(dF(e))return QN;if(hF(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=hF(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace($N,"");var n=tF.test(e);return n||nF.test(e)?rF(lk(e).call(e,2),n?2:8):eF.test(e)?QN:+e}var pF=function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function v(){var e=cF();if(p(e))return g(e);s=setTimeout(v,function(e){var n=t-(e-l);return h?uF(n,o-(e-u)):n}(e))}function g(e){return s=void 0,d&&r?f(e):(r=i=void 0,a)}function y(){var e=cF(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(v,t),c?f(e):a}(l);if(h)return s=setTimeout(v,t),f(l)}return void 0===s&&(s=setTimeout(v,t)),a}return t=fF(t)||0,hF(n)&&(c=!!n.leading,o=(h="maxWait"in n)?lF(fF(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:g(cF())},y},vF=n(pF),gF=Pm(Pm({},iO),{},{TIME_SHIFT_CHANGE:"time_shift_change",REFRESH_CLICK:"refresh_click"});function yF(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 2.488a7.48 7.48 0 00-4.154 1.253.908.908 0 101.005 1.512 5.695 5.695 0 018.844 4.746h-.908a.33.33 0 00-.264.528l1.816 2.422a.33.33 0 00.529 0l1.815-2.422A.33.33 0 0018.42 10h-.908A7.511 7.511 0 0010 2.49zM2.489 10a7.511 7.511 0 0011.665 6.26.908.908 0 00-1.005-1.513A5.695 5.695 0 014.305 10h.908a.33.33 0 00.264-.528L3.66 7.05a.33.33 0 00-.528 0L1.317 9.47a.33.33 0 00.264.53h.908z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var mF=jx.POSITIONS,_F=function(e){zP(n,e);var t=KP(n);function n(){return Sy(this,n),t.apply(this,arguments)}return Iy(n,[{key:"afterCreate",value:function(){this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.refresh),this._initEvents())}},{key:"registerIcons",value:function(){return{refresh:{icon:yF,class:"xgplayer-refresh-svg"}}}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this._handleRefresh)}},{key:"render",value:function(){var e=this.player.config.i18nManager;return'\n <xg-icon class="veplayer-refresh">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="refresh">'.concat(e.getText("REFRESH"),"</div>\n </xg-icon>\n ")}},{key:"_handleRefresh",value:function(e){var t=this.player;if(t){var n;if(e.preventDefault(),e.stopPropagation(),t.addClass("xgplayer-is-enter"),t.pause(),t)t.emit(gF.REFRESH_CLICK),null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.veplayer)||void 0===n||n.retry();t.once(MC,(function(){t.removeClass("xgplayer-is-enter")}))}}},{key:"_initEvents",value:function(){this._handleRefresh=vF(this._handleRefresh.bind(this),200);var e="mobile"===wC.device?"touchend":"click";this.bind(e,this._handleRefresh),this.show()}}],[{key:"pluginName",get:function(){return"refresh"}},{key:"defaultConfig",get:function(){return{position:mF.CONTROLS_LEFT,index:1,disable:!1}}}]),n}(jx),bF=n(te.URLSearchParams),wF=Qk;An({target:"Number",stat:!0,forced:Number.parseInt!=wF},{parseInt:wF});var kF=n(te.Number.parseInt),EF=dS;An({target:"Number",stat:!0,forced:Number.parseFloat!=EF},{parseFloat:EF});var TF=n(te.Number.parseFloat);function SF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),hE(e,r.key,r)}}function CF(e,t,n){return t&&SF(e.prototype,t),n&&SF(e,n),e}function xF(e,t,n){return t in e?hE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PF(e,t){var n=sk(e);if(sE){var r=sE(e);t&&(r=Nw(r).call(r,(function(t){return lE(e,t).enumerable}))),n.push.apply(n,r)}return n}function AF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PF(Object(n),!0).forEach((function(t){xF(e,t,n[t])})):uE?cE(e,uE(n)):PF(Object(n)).forEach((function(t){hE(e,t,lE(n,t))}))}return e}var IF="xgplayer_device_id",RF="xgplayer_user_id",OF=function(e){if(!document.cookie)return null;for(var t=document.cookie.split(";"),n=0,r=t.length;n<r;n++){var i,o=t[n];if(ak(i=t[n]).call(i,e)>=0)return o.split("=")[1]||null}},MF=function(e){return String(Math.floor(Math.random()*Math.pow(10,e)))},DF=function(){var e=OF(IF);if(e)return e;var t=MF(11);return document.cookie=IF+"="+t+";max-age=31536000;path=/",t},LF=function(){var e=OF(RF);if(e)return e;var t=MF(12);return document.cookie=RF+"="+t+";max-age=31536000;path=/",t};var NF={get device(){return NF.os.isPc?"pc":"mobile"},get browser(){var e=function(){var e=navigator.userAgent.toLowerCase(),t={},n={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:ak(e).call(e,"chrome")>-1&&ak(e).call(e,"safari")>-1,Firefox:ak(e).call(e,"firefox")>-1,Opera:ak(e).call(e,"opera")>-1,Safari:ak(e).call(e,"safari")>-1&&-1==ak(e).call(e,"chrome"),Edge:ak(e).call(e,"edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(var r in n)if(n[r]){var i="";if("IE"===r)i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if("Chrome"===r){for(var o in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[o].type&&(r="360");var a=e.match(/chrome\/([\d.]+)/);i=a?a[1]:"-1"}else if("Firefox"===r){var s=e.match(/firefox\/([\d.]+)/);i=s?s[1]:"-1"}else if("Opera"===r){var l=e.match(/opera\/([\d.]+)/);i=l?l[1]:"-1"}else if("Safari"===r){var u=e.match(/version\/([\d.]+)/);i=u?u[1]:"-1"}else if("Edge"===r){var c=e.match(/edge\/([\d.]+)/);i=c?c[1]:"-1"}else if("QQBrowser"===r){var h=e.match(/qqbrowser\/([\d.]+)/);i=h?h[1]:"-1"}t.type=r,t.versions=Zk(i)}return t}();return e.type+"_"+e.versions},get os(){var e=navigator.userAgent;navigator.platform.toLowerCase();var t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:r,isPc:!(a||r||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get operation_os(){for(var e=navigator.userAgent,t=[{s:"windows",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1|Windows 8.1|Windows NT 6.3|Windows 8|Windows NT 6.2|Windows 7|Windows NT 6.1)/},{s:"android",r:/Android/},{s:"linux",r:/(Linux|X11)/},{s:"ios",r:/(iPhone|iPad|iPod)/},{s:"mac",r:/Mac OS X/},{s:"mac",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],n=0;n<t.length;n++){var r=t[n];if(r.r.test(e))return r.s}return"unknown"}};function FF(){return Date.now()}function UF(e){var t="unknown";return"string"!=typeof e?t:ak(e).call(e,".flv")>-1?"flv":ak(e).call(e,".m3u8")>-1?"m3u8":ak(e).call(e,".mp4")>-1?"mp4":ak(e).call(e,".sdp")>-1?"rts":t}function BF(e){if(e.plugins){if(e.plugins.flv)return e.plugins.flv;if(e.plugins.hls)return e.plugins.hls;if(e.plugins.rts)return e.plugins.rts;if(e.plugins.flvlive)return e.plugins.flvlive;if(e.plugins.hlslive)return e.plugins.hlslive;if(e.plugins.hlsvod)return e.plugins.hlsvod;if(e.plugins.hlslivemobile)return e.plugins.hlslivemobile;if(e.plugins.flvlivemobile)return e.plugins.flvlivemobile}return e.newHls||e.newFlv||e.__core__||e.flv}var VF={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},jF=function(){function e(e){var t=e.Tea;if(!t)throw new Error("lack Tea option");t.event?this.Tea=t.event.bind(t):this.Tea=t,this.logOptions=e,this._player=e.player}CF(e,[{key:"videoSize",get:function(){return this._player&&this._player.video?{width:this._player.video.videoWidth,height:this._player.video.videoHeight}:{width:0,height:0}}}]);var t=e.prototype;return t.push=function(e){var t=this._player.config.url;this._player.video&&(e.play_current_time=this._player.currentTime),e.cdn_play_url=t&&nO(t).call(t,"//")?window.location.protocol+t:t,e.live_stream_session_id=function(e,t){return new bF(e.split("?")[1]).get(t)}(t,"session_id"),e.play_format=UF(t),e.timestamp=FF();var n=function(){var e={cpu_core_number:-1,memory_usage:-1,network_downlink:-1};try{e.cpu_core_number=navigator.hardwareConcurrency||-1,e.memory_usage=navigator.deviceMemory||-1,e.network_downlink=navigator.connection&&navigator.connection.downlink,null==e.network_downlink&&(e.network_downlink=-1)}catch($U){}return e}(),r=n.cpu_core_number,i=n.memory_usage,o=n.network_downlink;e.cpu_core_number=r,e.memory_usage=i,e.network_downlink=o,DT(e,AF({},this.videoSize)),this.send(e)},t.send=function(e){e.event_key&&(this.logOptions.onReport&&this.logOptions.onReport(e.event_key,e),this.Tea(e.event_key,AF({},e)))},e}(),HF=function(){return void 0!==navigator.onLine?navigator.onLine?(e=navigator.connection)&&(e.effectiveType||e.type)||NF.device:"none":"unknown";var e},zF=["play","playing","pause","ended","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","ratechange","volumechange","loadeddata"],WF=function(){function e(e){var t;this.options=e,this.logger=new GF(e),this.restart=this.restart.bind(this),this.bindUrlChange(),ok(t=NF.browser).call(t,"Chrome")}var t=e.prototype;return t.restart=function(e){this.destroy("string"!=typeof e&&Boolean(e)),this.logger=new GF(this.options),this.bindUrlChange(),this.logger.reportStartPlay(),this.logger.handlePlayerComlete()},t.bindUrlChange=function(){this.options&&this.options.player&&!this.options.manual_restart&&this.options.player.on("urlchange",this.restart)},t.setNTP=function(e){this.logger.setNTP(e)},t.updateExt=function(e){this.options.ext=DT(this.options.ext||{},e),this.logger&&this.logger.updateExt(e)},t.destroy=function(e){this.logger.destroy(e),this.logger=null,this.options&&this.options.player&&!this.options.manual_restart&&this.options.player.off("urlchange",this.restart)},e}(),GF=function(){function e(e){if(!e.player)throw new Error("option player is necessary");this.options=DT({},e,function(e){return{device_id:e.device_id||DF(),user_id:e.user_id||LF(),error_report_stop:!!e.error_report_stop,project_key:e.project_key||"live",product_line:e.product_line||"live",onReport:e.onReport||function(){}}}(e)),this._player=this.options.player,this._url=this._player.config.url,this.project_key=e.project_key||"live",this.product_line=e.product_line||"live",this.ntpDelta=this.options.ntp?Date.now()-this.options.ntp:0,this.inWaitingStart=0,this.errorNumber=0,this.tempDroppedFrameCount=0,this.tempTotalFrameCount=0,this._logmanager=new jF(this.options),this.init(),this.started=!1,this.destroyed=!1,this.completed=!1,this.firstFrameViewed=!1,this.cacheRtcStats={}}CF(e,[{key:"videoSize",get:function(){return this.player?{width:this.player.video.videoWidth,height:this.player.video.videoHeight}:{width:0,height:0}}},{key:"player",get:function(){return this._player}},{key:"logmanager",get:function(){return this._logmanager}},{key:"ntpTime",get:function(){return Date.now()-this.ntpDelta}}]);var t=e.prototype;return t.setNTP=function(e){this.options&&(this.options.ntp=e,this.ntpDelta=Date.now()-this.options.ntp)},t.init=function(){this.bindCtx(),this.initLog(),this.initEvt()},t.bindCtx=function(){this.handlePlayerComlete=this.handlePlayerComlete.bind(this),this.handlePlayerPlaying=this.handlePlayerPlaying.bind(this),this.destroyFunc=this.destroyFunc.bind(this),this.handleUserLeave=this.handleUserLeave.bind(this),this.handlePlayerError=this.handlePlayerError.bind(this),this.handlePlayerReady=this.handlePlayerReady.bind(this),this.handlePlayerWaiting=this.handlePlayerWaiting.bind(this),this.handleAVUnsync=this.handleAVUnsync.bind(this),this.handlePlayerPause=this.handlePlayerPause.bind(this),this.handleTTFB=this.handleTTFB.bind(this),this.handleUrlChange=this.handleUrlChange.bind(this),this.handleKeyframe=this.handleKeyframe.bind(this),this.handleSourceOpen=this.handleSourceOpen.bind(this),this.handleBufferAppend=this.handleBufferAppend.bind(this),this.handleCoreEvent=this.handleCoreEvent.bind(this),this.handleDegrade=this.handleDegrade.bind(this)},t.initLog=function(){var e=this,t=this.options,n=t.player,r=void 0!==n.hlsOps;this.commonParams=AF({os:NF.operation_os},function(e){var t,n=e.player,r=n.config.mediaType;return AF({project_key:e.project_key,live_sdk_version:BF(n)||n.hlsOps?"2":"-1",player_sdk_version:n.version,logger_version:"1.1.0-alpha.5",report_version:"5",product_line:e.product_line,user_id:e.user_id,device_id:e.device_id,logger_id:MF(12),app_name:e.app_name,cdn_ip:e.cdn_ip,is_wasm:+(!!r&&"video"!==r),review_is_live:n.config.isLive?2:1,aid:e.aid,live_id:e.live_id||e.aid+"-"+e.user_id+"-"+Date.now(),is_preview:e.is_preview?1:0,codec_type:e.codec_type||"h264",width:Math.floor(n.config.width),height:Math.floor(n.config.height),browser:NF.browser,ua:navigator.userAgent,href:window.location.href,timestamp:0,fps:-1,logger_init_time:Date.now(),play_current_time:0,cdn_play_url:n.config.url&&nO(t=n.config.url).call(t,"//")?window.location.protocol+n.config.url:n.config.url,play_format:UF(n.config.url),codec_support:-1},e.ext)}(t)),this.log=DT({},{start_play:{start_play_time:0,event_key:"start_play"},first_frame:{start:0,first_frame_view:0,event_key:"first_frame",first_sei_delay:0,ntp_sync:0,ntp_delta:0,ttfb:-1,ttdb:-1,ttfb_end:0},first_frame_failed:{code:void 0,msg:"",event_key:"first_frame_failed"},stall_start:{ready_state:-1,stall_start_time:0,event_key:"stall_start"},stalling:{event_key:"stalling"},stall:{reason:0,stall_start:0,stall_end:0,ready_state:0,event_key:"stall"},play_stop:{code:0,stop_time:0,drop_percent:0,is_stream_received:0,stall_count:0,stall_time:0,retry_count:0,duration:0,stall_count_per_100sec:0,stall_time_per_100sec:0,event_key:"play_stop",dns_parse_time:-1,redirect:-1,ttfb:-1,buffered:[],is_firstframe_received:0,meta:null},playing:{index:0,stall_count:0,stall_time:0,play_time:1e4,retry_count:0,is_last:0,video_buffer_time:0,audio_buffer_time:0,speed_switch_count:0,speed_switch_info:"none",download_speed:0,decode_fps:0,render_fps:0,drop_count:0,drop_percent:0,sei_source:"",sei_delay:0,ntp_sync:0,ntp_delta:0,event_key:"playing",stop_time:0,duration:0,stall_count_per_100sec:0,stall_time_per_100sec:0},play_error:{code:void 0,info:"",event_key:"play_error"},play_low_decode:{fps:-1,decode_fps:-1,bitrate:-1,url:-1,msg:"",event_key:"play_low_decode"},play_av_unsync:{aDts:-1,vDts:-1,frameLength:-1,currentTime:-1,duration:0,event_key:"play_av_unsync"},play_loadstream:{loadstream_url:"",event_key:"play_loadstream"},play_stream_loaded:{event_key:"play_stream_loaded"},play_metadata_loaded:{metadata_type:"",event_key:"play_metadata_loaded"},stream_exception:{event_key:"stream_exception"},pause:{event_key:"pause"},play_url_change:{event_key:"play_url_change"},source_opened:{event_key:"source_opened"},source_updateend:{event_key:"source_updateend"},play_result:{event_key:"play_result",result:0,threshold:15e3,is_threshold:0},degrade:{event_key:"degrade",payload:{}},rtcstatechange:{event_key:"rtcstatechange"}});var i=this;for(var o in this.log){var a=function(t){hE(e.log[o],t,{get:function(){return null==this["_"+t]?i.commonParams[t]:this["_"+t]},set:function(e){this["_"+t]=e},enumerable:!0})};for(var s in this.commonParams)a(s);r&&hE(this.log[o],"m3u8",{get:function(){if(n.__core__){var e=n.__core__.m3u8Text;return e?lk(e).call(e,0,25e4):""}return""},enumerable:!0}),hE(this.log[o],"volume",{get:function(){if(n&&n.video)return n.volume||0},enumerable:!0}),hE(this.log[o],"access",{get:function(){return HF()},enumerable:!0})}},t.updateExt=function(e){for(var t in this.log)for(var n in e)this.log[t][n]=e[n]},t.reportStartPlay=function(){this.started||(this.started=!0,this.log.start_play.start_play_time=this.log.start_play.timestamp=FF(),this.logmanager.push(this.log.start_play,!0))},t.initWindowListener=function(){"pc"===NF.device?window.addEventListener("beforeunload",this.handleUserLeave):"mobile"===NF.device&&(window.addEventListener("beforeunload",this.handleUserLeave),window.addEventListener("pagehide",this.handleUserLeave))},t.removeWindowListener=function(){"pc"===NF.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===NF.device&&(window.removeEventListener("beforeunload",this.handleUserLeave),window.removeEventListener("pagehide",this.handleUserLeave))},t.initEvt=function(){var e=this,t=this.player;zF.forEach((function(t){e["handleVideo"+t+"Evt"]=function(){e["handleVideo"+t]&&e["handleVideo"+t]()},e.initWindowListener(),e.bindVideoEvt(t,e["handleVideo"+t+"Evt"])})),t.once("error",this.handlePlayerError),t.once("complete",this.handlePlayerComlete),t.once("playing",this.handlePlayerPlaying),t.once("timeupdate",this.handlePlayerPlaying),t.once("destroy",this.destroyFunc),t.on("ready",this.handlePlayerReady),t.on("waiting",this.handlePlayerWaiting),t.on("pause",this.handlePlayerPause),t.on("urlchange",this.handleUrlChange),t.once("sourceopen",this.handleSourceOpen),t.once("bufferappend",this.handleBufferAppend),t.on("core_event",this.handleCoreEvent),t.on("degrade",this.handleDegrade),this.hiJackPlayerStart()},t.handleCoreEvent=function(e){var t=e.eventName,n=e.headers,r=e.pts,i=e.type,o=e.meta,a=e.sei,s=e.decodeFps,l=e.url,u=e.state;switch(t){case"core.ttfb":this.handleTTFB(e);break;case"core.loadresponseheaders":var c=n.get("X-Server-Ip");void 0!==this.player.hlsOps&&(this.log.play_stop.review_ts_count+=1),c&&(this.commonParams.cdn_ip=c);break;case"core.loadretry":this.log.play_stop.retry_count++;break;case"core.keyframe":this.handleKeyframe(r);break;case"core.metadataparsed":this.handleMetaDataLoaded(i,o);break;case"core.sei":this.handleSEIParsed(a);break;case"core.lowdecode":this.commonParams.is_wasm&&(DT(this.log.play_low_decode,e||{}),this.log.play_low_decode.decode_fps=s,this.log.play_low_decode.timestamp=FF(),this.logmanager.push(this.log.play_low_decode,!0),this.commonParams.is_wasm=0);break;case"core.largeavgap":this.handleAVUnsync(e);break;case"core.loadstart":this.handlePlayerLoadStream(e),this.reportStartPlay();break;case"core.loadcomplete":this.handlePlayerLoadedStream(e);break;case"core.streamexception":this.handleStreamException(e);break;case"core.rtcstatechange":this.logmanager.push(DT({url:l,state:u},this.log.rtcstatechange))}},t.handleDegrade=function(e){this.log.degrade.payload=e,this.logmanager.push(this.log.degrade,!0)},t.hiJackPlayerStart=function(){var e=arguments,t=this;this.player._start=this.player.start;var n=this.player;n.start=function(){try{if(n._start)return n._start.apply(n,lk(Array.prototype).call(e,0))}catch(sU){}t.destroyed||t.handlePlayerComlete()}},t.handleTTFB=function(e){var t=e||{},n=t.end,r=t.elapsed;this.log.first_frame.ttfb=r||-1,this.log.first_frame.ttfb_end=n||0},t.handleUrlChange=function(e){this.logmanager.push(DT(this.log.play_url_change,{url:e,timestamp:FF()}))},t.handleKeyframe=function(e){this.log.play_stop.is_firstframe_received=1,this.log.play_stop.firstframe_pts=e},t.handleSourceOpen=function(){this.log.source_opened.timestamp=FF(),this.logmanager.push(this.log.source_opened)},t.handleBufferAppend=function(){this.log.source_updateend.timestamp=FF(),this.logmanager.push(this.log.source_updateend)},t.handlePlayerPause=function(){this.log.pause.timestamp=FF(),this.logmanager.push(this.log.pause,!0),this.stallEnd()},t.handlePlayerError=function(e){this.errorNumber=1;var t=e.errorType,n=e.errorCode;DT(this.log.play_error,AF({timestamp:FF(),code:e.httpCode||n||("parse"===t?31:21),info:e.message,detail:BR(e)},this.videoSize)),this.logmanager.push(this.log.play_error,!0),this.destroyed||(0===this.log.first_frame.first_frame_view&&(DT(this.log.first_frame_failed,{code:n||("parse"===t?31:21),msg:e.message}),void 0!==this.log.first_frame_failed.timestamp&&(this.log.first_frame_failed.timestamp=FF()),this.logmanager.push(this.log.first_frame_failed,!0),this.log.play_result.is_threshold||(this.clearPlayResultTimer(),this.log.play_result.reason=e.message||"first frame failed",this.log.play_result.code=this.log.play_error.code,this.logmanager.push(this.log.play_result,!0))),this.options.error_report_stop?this.handleUserLeave():this.updatePlayStopParams())},t.handlePlayerLoadStream=function(e){var t=e.url,n=e.offersdp,r=e.sessionId;if("string"==typeof t){var i=this.log.play_loadstream;i.timestamp=FF(),i.loadstream_url=t,i.offersdp=n,i.sessionId=r,this.logmanager.push(i)}},t.handlePlayerLoadedStream=function(e){var t=this.log.play_stream_loaded;t.timestamp=FF(),DT(t,e),this.logmanager.push(t)},t.handleSEIParsed=function(e){var t=this.log,n=t.playing,r=t.first_frame;if(100===e.code){var i=function(e){var t,n,r,i,o,a;for(t="",r=e.length,n=0;n<r;)switch((i=e[n++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(i);break;case 12:case 13:o=e[n++],t+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=e[n++],a=e[n++],t+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&a)<<0)}return t}(e.content);i=lk(i).call(i,ak(i).call(i,"{"),mM(i).call(i,"}")+1);try{var o=JSON.parse(i),a=this.getPlayerBuffer()+this.ntpTime-o.ts;n.sei_delay=a,n.sei_source=o.source,n.ntp_sync=this.options.ntp?1:0,n.ntp_delta=this.ntp_delta,r.first_sei_delay=a,r.ntp_sync=this.options.ntp?1:0,r.ntp_delta=this.ntp_delta}catch(sU){}}},t.handleMetaDataLoaded=function(e,t){var n;this.log.play_stop.meta=this.log.play_stop.meta||{},e&&(this.log.play_stop.meta[e]=t),this.log.play_metadata_loaded.timestamp=FF(),this.log.play_metadata_loaded.metadata_type=e,t&&(this.log.play_metadata_loaded.meta=t,this.log.play_metadata_loaded.codec=t.codec,"video"===e&&(this.commonParams.codec_type=t.codec,this.commonParams.codec_support=(n=t.codec,"undefined"!=typeof MediaSource?+MediaSource.isTypeSupported("video/mp4; codecs="+n):0))),t||(this.log.play_metadata_loaded.meta=void 0,this.log.play_metadata_loaded.codec=void 0,"video"===e&&(this.commonParams.codec_type="unknown")),this.logmanager.push(this.log.play_metadata_loaded)},t.handleAVUnsync=function(e){DT(this.log.play_av_unsync,e||{}),this.log.play_av_unsync.timestamp=FF(),this.logmanager.push(this.log.play_av_unsync,!1)},t.handleStreamException=function(e){this.logmanager.push(DT({},this.log.stream_exception,e))},t.handlePlayerComlete=function(){this.completed||(this.completed=!0,this.core=BF(this.player),this.core&&(this.commonParams.live_sdk_version="2"),(this.player.config.autoplay||this.player.config.videoInit)&&this.reportStartPlay())},t.getPlayerBuffer=function(){var e=this.player.video.buffered;if(e){var t=Math.max(0,e.length-1);try{var n=kF(1e3*(e.end(t)-this.player.video.currentTime));return this.log.playing.audio_buffer_time=this.log.playing.video_buffer_time=n,n}catch(sU){return 0}}},t.getPlayerDownloadSpeed=function(){if(this.core&&this.core.core&&"function"==typeof this.core.core.speedInfo)return this.core.core.speedInfo().speed},t.getPlayerQuality=function(){var e=this.player.video;if(e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();this.log.playing.drop_count=t.droppedVideoFrames-this.tempDroppedFrameCount,this.log.playing.drop_percent=TF(this.tempTotalFrameCount/t.totalVideoFrames).toFixed(1),this.log.play_stop.drop_percent=TF(t.droppedVideoFrames/t.totalVideoFrames).toFixed(1),this.tempDroppedFrameCount=t.droppedVideoFrames,this.tempTotalFrameCount=t.totalVideoFrames}},t.getRtcStats=function(e,t){try{var n=this,r=n.player.plugins.rts||n.player.plugins.rtm,i=r&&r.pc,o={};return i?Lw.resolve(i.getStats()).then((function(t){return t.forEach((function(t){var r=t.type,i=t.mediaType,a=t.bytesReceived,s=t.packetsReceived,l=t.audioLevel,u=t.concealmentEvents,c=t.remoteTimestamp,h=t.timestamp,d=t.framesDropped,f=t.keyFramesDecoded,p=t.totalDecodeTime,v=t.framesDecoded,g=t.frameHeight,y=t.frameWidth,m=t.framesReceived,_=t.jitterBufferDelay,b=t.jitterBufferEmittedCount,w=t.jitter,k=t.nackCount,E=t.packetsLost,T=t.pliCount,S=t.totalSamplesReceived,C=t.concealedSamples,x=t.currentRoundTripTime,P=t.decoderImplementation,A=t.mimeType,I=t.freezeCount,R=t.totalFreezesDuration,O=t.totalPausesDuration;switch(r){case"inbound-rtp":"audio"===i?(o.audio_bytes_received=a-(n.cacheRtcStats.audioBytesReceived||0),n.cacheRtcStats.audioBytesReceived=a,o.audio_packets_lost=E-(n.cacheRtcStats.audioPacketsLost||0),o.audio_packets_received=s-(n.cacheRtcStats.audioPacketsReceived||0),n.cacheRtcStats.audioPacketsLost=E,n.cacheRtcStats.audioPacketsReceived=s,o.audio_level=l,o.concealment_event=u,o.audio_fraction_lost=o.audio_packets_lost/o.audio_packets_received,void 0!==n.cacheRtcStats.totalSamplesReceived&&(o.audio_rec_sample_rate=(S-n.cacheRtcStats.totalSamplesReceived)/e),n.cacheRtcStats.totalSamplesReceived=S,o.concealed_samples=C,o.total_samples_received=S):(o.frames_dropped=d,o.iframes_decoded=f,o.video_bytes_received=a-(n.cacheRtcStats.videoBytesReceived||0),n.cacheRtcStats.videoBytesReceived=a,o.video_dec_time=p,o.video_decoded_delay_ms=o.video_dec_elapse/v,o.video_frame_height=g,o.video_frame_width=y,void 0!==n.cacheRtcStats.framesDecoded&&(o.video_decode_framerate=(v-n.cacheRtcStats.framesDecoded)/e),n.cacheRtcStats.framesDecoded=v,void 0!==n.cacheRtcStats.framesReceived&&(o.video_recv_framerate=(m-n.cacheRtcStats.framesReceived)/e),void 0!==n.cacheRtcStats.freezeCount&&(o.freeze_count=I-n.cacheRtcStats.freezeCount,o.freeze_duration=R-n.cacheRtcStats.totalFreezesDuration),n.cacheRtcStats.freezeCount=I,n.cacheRtcStats.totalFreezesDuration=R,n.cacheRtcStats.framesReceived=m,o.total_pauses_duration=O,o.video_jb_delay=_/b*1e3,o.video_jitter=1e3*w,o.video_nack_count=k,o.video_packets_lost=E-(n.cacheRtcStats.videoPacketsLost||0),o.video_packets_received=s-(n.cacheRtcStats.videoPacketsReceived||0),o.video_fraction_lost=o.video_packets_lost/o.video_packets_received,n.cacheRtcStats.videoPacketsLost=E,n.cacheRtcStats.videoPacketsReceived=s,o.video_pli_count=T,o.decoder_name=P);break;case"remote-outbound-rtp":o.e2e_delay_ms=h-c;break;case"track":void 0!==y&&(o.video_frame_width=y,o.video_frame_height=g);break;case"candidate-pair":o.rtt=1e3*x;break;case"codec":ok(A).call(A,"video")?o.video_codec=A:o.audio_codec=i}o.total_delay=o.e2e_delay_ms+(o.video_decoded_delay_ms||0)+(o.video_jb_delay||0)})),DT(n.log.playing,{video_download_size:o.video_bytes_received,decode_fps:o.video_decode_framerate,sei_delay:o.total_delay,sei_network_delay:o.e2e_delay_ms,width:o.video_frame_width,height:o.video_frame_height,current_speed:(o.audio_bytes_received+o.video_bytes_received)/e}),o})):Lw.resolve(o)}catch(sU){return Lw.reject(sU)}},t.reportPlaying=function(e){try{var t=this;t.commonParams.is_wasm&&(t.commonParams.fps=t.player.video.fps,t.log.playing.render_fps=t.player.video.fps,t.log.playing.decode_fps=t.player.video.decodeFps),t.log.playing.index++;var n,r=t.log.playing.timestamp;t.inWaitingStart&&t.inWaitingStart<FF()&&(n=Math.min(t.options.playingInterval||t.log.playing.play_time,FF()-Math.max(t.inWaitingStart,r))),t.getPlayerQuality(),t.getPlayerBuffer(),t.options.downloadSpeedInterval||(t.log.playing.current_speed=t.getPlayerDownloadSpeed());var i=FF(),o=i-r,a=(n>200?n:0)+t.log.playing.stall_time,s=(n>200?1:0)+t.log.playing.stall_count;return t.options.aggregationDowngradeStallTime&&(t.log.playing.aggregation_downgrade_stall=(n>t.options.aggregationDowngradeStallTime?n:0)+(t.log.playing.aggregation_downgrade_stall||0)),DT(t.log.playing,AF({timestamp:i,stop_time:i,duration:e?0:o/1e3,stall_time_per_100sec:a/o*100,stall_count_per_100sec:1e3*s/o*100,stall_count:s,stall_time:a,play_current_time:t.player.currentTime},t.videoSize)),Lw.resolve(t.getRtcStats(o,e)).then((function(n){t.logmanager.push(DT({},t.log.playing,AF({play_time:e?0:o},n)),!0),t.log.playing.download_speed_array=[],t.log.playing.stall_time=0,t.log.playing.stall_count=0,t.options.aggregationDowngradeStallTime&&(t.log.playing.aggregation_downgrade_stall=0)}))}catch(sU){return Lw.reject(sU)}},t.handlePlayerPlaying=function(){try{var e=this;if(e.player&&e.player.video.readyState<3)return Lw.resolve();if(e.player.off("playing",e.handlePlayerPlaying),e.player.off("timeupdate",e.handlePlayerPlaying),e.core){var t=(e.core.getStats()||{}).fps;e.commonParams.fps=t}return Lw.resolve(e.reportPlaying(!0)).then((function(){e.clearPlayingInterval();var t=e.options.playingInterval||e.log.playing.play_time;e.intervalId=setInterval((function(){try{var n=function(){if(Math.abs(Date.now()-e.log.playing.timestamp-t)<100||Date.now()-e.log.playing.timestamp>=t){var n=function(){if(e.player.video){var t=function(){if(!e.player.paused)return Lw.resolve(e.reportPlaying()).then((function(){}));e.handleVideopause()}();if(t&&t.then)return t.then((function(){}))}else e.destroyFunc()}();if(n&&n.then)return n.then((function(){}))}}();return Lw.resolve(n&&n.then?n.then((function(){})):void 0)}catch(sU){return Lw.reject(sU)}}),1e3),e.clearStallTimer(),e.handleVideoplaying(),e.started||e.reportStartPlay(),e.saveBuffered()}))}catch(sU){return Lw.reject(sU)}},t.handlePlayerReady=function(){var e=this;this.log.start_play.start_play_time=FF(),this.player.config.autoplay&&this.reportStartPlay(),this.options.playResultThreshold&&(this.log.play_result.threshold=this.options.playResultThreshold),this.clearPlayResultTimer(),this.log.play_result.start=FF(),this.playResultTimer=setTimeout((function(){e.log.play_result.timestamp>=e.log.play_result.start||(e.log.play_result.is_threshold=1,e.logmanager.push(e.log.play_result,!0))}),this.log.play_result.threshold)},t.handlePlayerWaiting=function(){var e=this;!this.inWaitingStart&&this.log.first_frame.timestamp&&(this.log.stall.timestamp=this.inWaitingStart=this.log.stall.stall_start=FF(),this.log.stall_start.ready_state=this.log.stall.ready_state=this.player.video.readyState,this.log.stall_start.timestamp=FF(),this.log.stall_start.stall_start_time=FF(),this.log.stall_start.video_buffer_time=this.player.video.readyState,this.log.stall_start.play_current_time=this.player.currentTime,this.log.stall.play_current_time=this.player.currentTime,this.log.stall_start.buffered=this.getBuffered(),this.log.stall.buffered=this.log.stall_start.buffered,this.log.stall.current_speed=this.getPlayerDownloadSpeed(),DT(this.log.stall_start,this.videoSize),this.clearStallTimer(),this.stallStartTimer=setTimeout((function(){e.logmanager.push(e.log.stall_start,!0)}),205))},t.handleVideoseeking=function(){this.player&&this.player.video&&this.inWaitingStart&&this.player.video.duration<1/0&&(this.inWaitingStart=0,this.clearStallTimer())},t.handleVideoseeked=function(){this.player&&this.player.video&&this.inWaitingStart&&this.player.video.duration<1/0&&(this.inWaitingStart=0,this.log.play_stop.stall_count>0&&this.log.play_stop.stall_count--)},t.handleVideoplay=function(){this.reportStartPlay(),this.removeVideoEvt("play",this.handleVideoplay)},t.handleVideotimeupdate=function(){Math.abs(this.player.currentTime-this.log.stall_start.play_current_time)>.2&&this.stallEnd(),this.saveBuffered()},t.handleVideocanplay=function(){this.stallEnd(),this.reportFirstframe()},t.handleVideoplaying=function(){this.stallEnd(),this.log.play_stop.is_stream_received=1;var e=FF();this.reportStartPlay(),this.log.first_frame.start=e},t.stallEnd=function(){this.clearStallTimer();var e=FF();if(this.inWaitingStart){var t=e-this.inWaitingStart;t>200&&(this.log.play_stop.stall_count++,this.log.play_stop.stall_time+=e-this.inWaitingStart,this.log.playing.stall_time+=e-Math.max(this.inWaitingStart,this.log.playing.timestamp),this.log.stall.stall_end=e,this.log.stall.timestamp=FF(),this.log.playing.stall_count++,DT(this.log.stall,AF({},this.videoSize)),this.logmanager.push(this.log.stall,!0)),this.options.aggregationDowngradeStallTime&&t>this.options.aggregationDowngradeStallTime&&(this.log.playing.aggregation_downgrade_stall=(this.log.playing.aggregation_downgrade_stall||0)+(e-Math.max(this.inWaitingStart,this.log.playing.timestamp)))}this.inWaitingStart=0},t.handleVideoloadeddata=function(){this.reportFirstframe()},t.handleVideoratechange=function(){this.log.playing.speed_switch_count++,this.log.playing.speed_switch_info=this.player.video.playbackRate},t.handleVideoended=function(){this.clearPlayingInterval(),this.clearStallTimer(),DT(this.log.playing,AF({timestamp:FF(),is_last:1},this.videoSize)),this.logmanager.push(this.log.playing)},t.handleVideoerror=function(){var e=this;this.errorNumber=1;var t=this.player.video.error;DT(this.log.play_error,AF(AF({timestamp:FF()},this.videoSize),t&&{code:t.code,info:t.message})),this.logmanager.push(this.log.play_error,!0),0!==e.log.first_frame.first_frame_view||e.log.first_frame_failed.code||t&&(e.log.first_frame_failed.code=t.code,e.log.first_frame_failed.msg=VF[t.code],void 0!==e.log.first_frame_failed.timestamp&&(e.log.first_frame_failed.timestamp=FF()),e.logmanager.push(e.log.first_frame_failed,!0),e.log.play_result.is_threshold||(e.log.play_result.reason=VF[t.code]||"first frame failed",e.log.play_result.code=t.code,e.clearPlayResultTimer(),e.logmanager.push(e.log.play_result,!0))),e.options.error_report_stop?e.handleUserLeave():e.updatePlayStopParams()},t.handleVideopause=function(){this.stallEnd(),this.clearPlayingInterval(),this.clearStallTimer(),clearTimeout(this.collectDownloadSpeedTimer),this.player.once("playing",this.handlePlayerPlaying),this.player.once("timeupdate",this.handlePlayerPlaying)},t.destroyFunc=function(e){var t=this;this.destroyed||(e||this.handleUserLeave(),this.destroyed=!0,"pc"===NF.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===NF.device&&window.removeEventListener("pagehide",this.handleUserLeave),zF.forEach((function(e){t.removeVideoEvt(e,t["handleVideo"+e+"Evt"])})),this.player&&(this.player._start&&(this.player.start=this.player._start,delete this.player._start),this.player.off("destroy",this.destroyFunc),this.player.off("complete",this.handlePlayerComlete),this.player.off("playing",this.handlePlayerPlaying),this.player.off("timeupdate",this.handlePlayerPlaying),this.player.off("ready",this.handlePlayerReady),this.player.off("waiting",this.handlePlayerWaiting),this.player.off("largeavgap",this.handleAVUnsync),this.player.off("error",this.handlePlayerError),this.player.off("SEI_PARSED",this.handleSEIParsed),this.player.off("pause",this.handlePlayerPause),this.player.off("ttfb",this.handleTTFB),this.player.off("urlchange",this.handleUrlChange),this.player.off("isKeyframe",this.handleKeyframe),this.player.off("sourceopen",this.handleSourceOpen),this.player.off("bufferappend",this.handleBufferAppend),this.player.off("core_event",this.handleCoreEvent),this.player.off("degrade",this.handleDegrade),this.clearPlayingInterval(),this.clearStallTimer(),this.clearPlayResultTimer(),clearTimeout(this.collectDownloadSpeedTimer),this._player=null))},t.handleUserLeave=function(){!this.destroyed&&this.started&&(this.destroyed=!0,this.updatePlayStopParams(),this.reportPlayStop(),this.clearPlayingInterval(),this.clearStallTimer(),clearTimeout(this.collectDownloadSpeedTimer),this.removeWindowListener())},t.saveBuffered=function(){try{var e=this.getBuffered();e&&e.length&&(this.log.play_stop.buffered=e)}catch($U){}},t.getBuffered=function(){try{for(var e=[],t=this.player.video,n=0;n<t.buffered.length;n++)e.push([t.buffered.start(n),t.buffered.end(n)]);return e}catch($U){}},t.reportPlayStop=function(){this.log.play_stop.play_current_time=this.player.currentTime||this.log.playing.play_current_time,this.saveBuffered(),this.logmanager.push(this.log.play_stop,!0)},t.reportFirstframe=function(){if(!this.firstFrameViewed){if(this.core){var e=(this.core.getStats()||{}).fps;this.commonParams.fps=e}this.firstFrameViewed=!0;var t=FF();DT(this.log.first_frame,AF({first_frame_view:t-this.log.start_play.start_play_time||t,timestamp:t},this.videoSize)),this.log.first_frame.ttfb_end&&(this.log.first_frame.ttdb=t-this.log.first_frame.ttfb_end),this.logmanager.push(this.log.first_frame,!0),this.clearPlayResultTimer(),this.log.play_result.result=1,this.logmanager.push(this.log.play_result,!0),this.log.play_stop.is_stream_received=1}},t.updatePlayStopParams=function(){var e=function(e){var t,n=Nw(t=performance.getEntriesByType("resource")).call(t,(function(t){return t.name===e}));if(n.length){var r=n[0],i=n[n.length-1];return{dns_parse_time:kF(r.domainLookupEnd-r.domainLookupStart),redirect:kF(r.redirectEnd-r.redirectStart),ttfb:kF(i.responseStart-i.requestStart)}}return{dns_parse_time:-1,redirect:-1,ttfb:-1}}(this._url),t=FF();this.playedTime=t-this.log.start_play.start_play_time;var n=this.log.play_stop;DT(n,AF({},0===n.stall_count&&{stall_time:0})),this.inWaitingStart&&t-this.inWaitingStart>200&&(n.stall_time+=t-this.inWaitingStart),this.inWaitingStart=0,DT(n,AF({stall_time_per_100sec:n.stall_time/this.playedTime*100,stall_count_per_100sec:1e3*n.stall_count/this.playedTime*100},e)),0===this.log.play_stop.stall_count_per_100sec&&(this.log.play_stop.stall_time_per_100sec=0),this.log.play_stop.stall_time_per_100sec>100||this.log.play_stop.stall_time_per_100sec<0||(this.log.playing.index?(DT(this.log.playing,AF({timestamp:FF(),is_last:1},this.videoSize)),this.logmanager.push(this.log.playing,!0)):(this.log.play_stop.error_code=this.log.play_error.code,this.log.play_stop.error_info=this.log.play_error.info),t=FF(),DT(n,AF({timestamp:t,stop_time:t,duration:this.playedTime/1e3,play_time:this.playedTime/1e3},this.videoSize)),0===this.errorNumber&&(n.play_time_on_no_frame=n.stop_time-this.log.start_play.start_play_time))},t.clearPlayingInterval=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},t.clearStallTimer=function(){clearTimeout(this.stallStartTimer)},t.clearPlayResultTimer=function(){clearTimeout(this.playResultTimer)},t.destroy=function(e){this.destroyFunc(!e)},t.bindVideoEvt=function(e,t){this.player&&this.player.video.addEventListener(e,t,!1)},t.removeVideoEvt=function(e,t){this.player&&this.player.video&&this.player.video.removeEventListener(e,t,!1)},t.send=function(e,t){this.logmanager.send(e,t)},e}(),KF=An,YF=Qm,XF=o,qF=ee,JF=f_.onFreeze,QF=Object.freeze;KF({target:"Object",stat:!0,forced:XF((function(){QF(1)})),sham:!YF},{freeze:function(e){return QF&&qF(e)?QF(JF(e)):e}});var ZF,$F=n(te.Object.freeze),eU=function(){return eU=DT||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eU.apply(this,arguments)};function tU(e,t){var n="function"==typeof dE&&eT(e);if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function nU(){for(var e=[],t=0;t<arguments.length;t++)e=Mm(e).call(e,tU(arguments[t]));return e}var rU,iU,oU,aU,sU,lU=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var n=this;e&&t&&"function"==typeof t&&this.on(e,(function r(i){t(i),n.off(e,r)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,r,i=ak(n=this._hooks[e]).call(n,t);-1!==i&&Ak(r=this._hooks[e]).call(r,i,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var r;if(!e)return;-1!==ak(r=this._cache).call(r,n)?this._emit(e,t):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(e)||(this._hooksCache[n][e]=[]),this._hooksCache[n][e].push(t))}else this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&nU(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===ak(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),uU=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},cU=(rU=+Date.now()+Number(lk(ZF=""+Math.random()).call(ZF,2,8)),function(){return rU+=1}),hU=function(e){var t=document.createElement("a");return t.href=e,t},dU=function(){function e(e){this.appid=e,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion}return e.prototype.init=function(){var e=window.navigator.userAgent,t=window.navigator.language,n=document.referrer,r=n?hU(n).hostname:"";!function(e){var t={};try{var n=hU(e).search;(n=lk(n).call(n,1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(o){t[n]=r}}))}catch(r){}}(window.location.href);var i=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web",o=this.browser(),a=this.os();return{browser:o.browser,browser_version:o.browser_version,platform:i,os_name:a.os_name,os_version:a.os_version,userAgent:e,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(a.os_name),language:t,referrer:n,referrer_host:r}},e.prototype.browser=function(){var e,t,n="",r=""+fS(this.appVersion),i=this.userAgent;return-1!==ak(i).call(i,"Edge")||-1!==ak(i).call(i,"Edg")?(n="Microsoft Edge",-1!==ak(i).call(i,"Edge")?(e=ak(i).call(i,"Edge"),r=i.substring(e+5)):(e=ak(i).call(i,"Edg"),r=i.substring(e+4))):-1!==(e=ak(i).call(i,"MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=ak(i).call(i,"Lark"))?(n="Lark",r=i.substring(e+5,e+11)):-1!==(e=ak(i).call(i,"MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==ak(i).call(i,"MQQBrowser")||-1!==ak(i).call(i,"QQBrowser")?(n="qqbrowser",-1!==ak(i).call(i,"MQQBrowser")?(e=ak(i).call(i,"MQQBrowser"),r=i.substring(e+11,e+15)):-1!==ak(i).call(i,"QQBrowser")&&(e=ak(i).call(i,"QQBrowser"),r=i.substring(e+10,e+17))):-1!==ak(i).call(i,"Chrome")?-1!==(e=ak(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=ak(i).call(i,"360"))?(n="360browser",r=i.substring(ak(i).call(i,"Chrome")+7)):-1!==ak(i).call(i,"baidubrowser")||-1!==ak(i).call(i,"BIDUBrowser")?(-1!==ak(i).call(i,"baidubrowser")?(e=ak(i).call(i,"baidubrowser"),r=i.substring(e+13,e+16)):-1!==ak(i).call(i,"BIDUBrowser")&&(e=ak(i).call(i,"BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=ak(i).call(i,"xiaomi"))?-1!==ak(i).call(i,"openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=ak(i).call(i,"TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=ak(i).call(i,"Chrome"))||-1!==(e=ak(i).call(i,"Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==ak(i).call(i,"Safari")?-1!==(e=ak(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=ak(i).call(i,"Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=ak(i).call(i,"Version"))&&(r=i.substring(e+8))):-1!==(e=ak(i).call(i,"Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=ak(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=ak(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+3,e+8)):-1!==(e=ak(i).call(i,"Opera"))&&(n="Opera",r=i.substring(e+6),-1!==(e=ak(i).call(i,"Version"))&&(r=i.substring(e+8))),-1!==(t=ak(r).call(r,";"))&&(r=r.substring(0,t)),-1!==(t=ak(r).call(r," "))&&(r=r.substring(0,t)),-1!==(t=ak(r).call(r,")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},e.prototype.os=function(){for(var e="",t="",n=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Android",r:/Android/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],r=0;r<n.length;r++){var i=n[r];if(i.r.test(this.userAgent)){"Mac OS X"===(e=i.s)&&this.isNewIpad()&&(e="iOS");break}}var o,a,s=function(e,t){var n=e.exec(t);return n&&n[1]?n[1]:""},l=function(e,t){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t);return n?lk(n).call(n,1)[0]:""};switch(/Windows/.test(e)&&(t=s(/Windows (.*)/,e),e="windows"),e){case"Mac OS X":t=l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),e="mac";break;case"Android":(a=s(/Android ([\.\_\d]+)/,o=this.userAgent))||(a=s(/Android\/([\.\_\d]+)/,o)),t=a,e="android";break;case"iOS":t=this.isNewIpad()?l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(t=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?t[1]+"."+t[2]+"."+(0|t[3]):"",e="ios"}return{os_name:e,os_version:t}},e.prototype.getDeviceModel=function(e){var t="";try{if("android"===e)navigator.userAgent.split(";").forEach((function(e){ak(e).call(e,"Build/")>-1&&(t=lk(e).call(e,0,ak(e).call(e,"Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),r=ak(n).call(n,";");t=lk(n).call(n,0,r)}}catch(i){return kS(t).call(t)}return kS(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),fU=(iU=function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function i(t,i,o){if("undefined"!=typeof document){"number"==typeof(o=e({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=lk(o).call(o,1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(l){}}return e?r[e]:r}},remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:$F(r)},converter:{value:$F(n)}})}({read:function(e){return'"'===e[0]&&(e=lk(e).call(e,1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},iU(oU={exports:{}}),oU.exports),pU=fU,vU=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e){this.getItem(e)},e.prototype.setCookie=function(e,t){this.setItem(e,t)},e}(),gU={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:BR(t);localStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){try{return pU.get(e,{domain:t||document.domain})}catch(n){return""}},setCookie:function(e,t,n,r){try{var i=r||document.domain,o=+new Date+n;pU.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(a){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(sU){return!1}}()},yU={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:BR(t);sessionStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(t){}},getCookie:function(e){this.getItem(e)},setCookie:function(e,t){this.setItem(e,t)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(sU){return!1}}()},mU=function(){function e(e,t){this._storage=t&&"session"===t?yU:!e&&gU.isSupportLS?gU:new vU}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),_U={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},bU=void 0,wU=(new Date).getTimezoneOffset(),kU=Zk(""+-wU/60,10),EU=60*wU,TU=function(){function e(e,t){this.is_first_time=!0,this.initConfig=t,this.collect=e;var n=new dU(t.app_id).init(),r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new mU(!1,"session"),this.localStorage=new mU(!1,"local");var i=this.localStorage.getItem(r);i&&1==i?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:bU,user_type:bU,user_id:bU,user_is_auth:bU,user_is_login:bU,device_id:bU,web_id:bU,user_unique_id_type:bU},header:{app_id:bU,app_name:bU,app_install_id:bU,install_id:bU,app_package:bU,app_channel:bU,app_version:bU,ab_version:bU,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:bU,traffic_type:bU,client_ip:bU,device_brand:bU,os_api:bU,access:bU,language:n.language,region:bU,app_language:bU,app_region:bU,creative_id:bU,ad_id:bU,campaign_id:bU,log_type:bU,rnd:bU,platform:n.platform,sdk_version:"0.0.3-lite",sdk_lib:"js",province:bU,city:bU,timezone:kU,tz_offset:EU,tz_name:bU,sim_region:bU,carrier:bU,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:bU,utm_content:bU,utm_source:bU,utm_medium:bU,utm_campaign:bU,custom:{},wechat_unionid:bU,wechat_openid:bU}},this.evtParams={},this.reportErrorCallback=function(){},this.initDomain()}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof n){var r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=Zk(r[a],n);s=1*s^64;var l=String.fromCharCode(s);i.push(l)}return i.join("")}}(e,0,25)}(_U[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.initConfig.report_url||"/list";break;case"webid":t="/webid"}return""+this.getDomain()+t},e.prototype.set=function(e){var t=this;sk(e).forEach((function(n){var r;"evtParams"===n?t.evtParams=eU({},t.evtParams||{},e.evtParams||{}):"_staging_flag"===n?t.evtParams=eU({},t.evtParams||{},{_staging_flag:e._staging_flag}):"reportErrorCallback"===n&&"function"==typeof e[n]?t.reportErrorCallback=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?ak(r=["user_id","web_id","user_unique_id"]).call(r,n)>-1&&(t.envInfo.user[n]=e[n]?String(e[n]):e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(BR(this.envInfo[e])):JSON.parse(BR(this.envInfo))}catch(t){console.log("get config stringify error ")}},e}();(sU=aU||(aU={})).Init="init",sU.Config="config",sU.Start="start",sU.Ready="ready",sU.TokenComplete="token-complete",sU.TokenStorage="token-storage",sU.TokenFetch="token-fetch",sU.TokenError="token-error",sU.ConfigUuid="config-uuid",sU.TokenChange="token-change",sU.TokenReset="token-reset",sU.SessionReset="session-reset",sU.SessionResetTime="session-reset-time",sU.Event="event",sU.Events="events",sU.EventNow="event-now",sU.CleanEvents="clean-events",sU.BeconEvent="becon-event";var SU=aU;function CU(e,t,n,r,i,o,a,s,l){try{var u=new XMLHttpRequest,c=s||"POST";u.open(c,""+e,!0),u.setRequestHeader("Content-Type","application/json; charset=utf-8"),n&&(u.timeout=n,u.ontimeout=function(){o&&o(t,5005)}),u.onload=function(){if(i){var e=null;if(u.responseText){try{e=JSON.parse(u.responseText)}catch(n){e={}}i(e,t)}}},u.onerror=function(){u.abort(),o&&o(t,500)},l?u.send(t):u.send(BR(t))}catch(h){}}var xU=function(){function e(){this.eventLimit=50,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new mU(!0),this.localStorage=new mU(!1),this.maxReport=t.max_report||20,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.reportUrl=this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.collect.on(SU.Ready,(function(){n.reportAll(!1)})),this.collect.on(SU.Event,(function(e){n.event(e)})),this.collect.on(SU.BeconEvent,(function(e){n.beconEvent(e)})),this.linster()},e.prototype.linster=function(){var e,t=this;window.addEventListener("unload",(function(){t.reportAll(!0)}),!1),e=function(){t.reportAll(!0)},navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{var n=nU(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var r=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),r)}}catch(i){}},e.prototype.beconEvent=function(e){var t=nU(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.destroyInstance||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))},e.prototype.reportBecon=function(){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.report=function(e){if(!this.collect.destroyInstance&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=lk(e).call(e,n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else i=this.split(this.merge(e)),this.send(i,t)},e.prototype.merge=function(e){var t=this,n=this.configManager.get(),r=n.header,i=n.user;r.custom=BR(r.custom);var o=this.configManager.get("evtParams"),a=Dw(e).call(e,(function(e){try{return sk(o).length&&(e.params=eU({},o,e.params)),e.session_id=t.collect.sessionManager.getSessionId(),e.params=BR(e.params),e}catch(sU){return e}})),s=[];if(!sk(i).length)return console.warn("user info error,cant report"),s;var l=JSON.parse(BR({events:a,user:i,header:r}));return l.local_time=Math.floor(Date.now()/1e3),l.verbose=1,s.push(l),s},e.prototype.split=function(e){return Dw(e).call(e,(function(e){var t=[];return t.push(e),t}))},e.prototype.send=function(e,t){var n=this;e.length&&e.forEach((function(e){try{if(!e.length)return;r=n.reportUrl,i=e,o=n.timeout,a=function(e,t){},s=function(e,t){n.configManager.get("reportErrorCallback")(e,t)},!1,t&&window.navigator&&window.navigator.sendBeacon?window.navigator.sendBeacon(r,BR(i))||s(r,i):CU(r,i,o,0,a,s,0,"",false)}catch(l){console.warn("something error, "+BR(l.stack))}var r,i,o,a,s}))},e}(),PU=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},AU=function(){var e;return lk(e=PU().replace(/-/g,"")).call(e,0,19)},IU=function(){function e(){this.cacheToken={}}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new mU(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.collect.on(SU.ConfigUuid,(function(e){n.setUuid(e)})),this.checkStorage()},e.prototype.checkStorage=function(){this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.check()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.remoteWebid()},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""},r=AU();CU(t,n,3e5,0,(function(t){var n;t&&0===t.e?n=t.web_id:(n=r,e.collect.configManager.set({localWebId:r}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})}),(function(){e.complete({web_id:e.configManager.get("web_id")||r,user_unique_id:e.configManager.get("user_unique_id")||r}),e.collect.configManager.set({localWebId:r}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")}))},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;t||n?(e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(SU.TokenComplete)):console.warn("token error")},e.prototype.setUuid=function(e){var t;if(e&&-1===ak(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),r=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(n===r&&n===i)return;this.configManager.set({user_unique_id:n}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=n,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(SU.TokenReset))},e.prototype.setStorage=function(e){e._type_="default",this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e}(),RU=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},OU=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new mU(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(SU.SessionReset,(function(){n.resetSessionId()})),this.collect.on(SU.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:RU(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:RU(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:RU(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:RU(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),MU=function(){function e(e){this.disableAutoPageView=!1,this.staging=!1,this.sended=!1,this.started=!1,this.adapters={},this.sdkReady=!1,this.name=e,this.hook=new lU,this.Types=SU,this.adapters.fetch=CU,this.adapters.storage=mU}return e.prototype.init=function(e){var t,n,r=this;this.inited?console.log("init can be call only one time"):e&&uU(e)?e.app_id&&"number"==typeof(n=e.app_id)&&!isNaN(n)?e.app_key&&"string"!=typeof e.app_key?console.warn("app_key param is error, must be string, please check!"):(e.channel_domain||-1!==ak(t=["cn","sg","va"]).call(t,e.channel)||(console.warn("channel must be `cn`, `sg`,`va` !!!"),e.channel="cn"),this.inited=!0,this.configManager=new TU(this,e),this.initConfig=e,e.disable_auto_pv&&(this.disableAutoPageView=!0),this.configManager.set({app_id:e.app_id}),this.eventManager=new xU,this.tokenManager=new IU,this.sessionManager=new OU,Lw.all([new Lw((function(e){r.once(SU.TokenComplete,(function(){e(!0)}))})),new Lw((function(e){r.once(SU.Start,(function(){e(!0)}))}))]).then((function(){r.sdkReady=!0,r.emit(SU.Ready),console.info("appid: "+e.app_id+", userInfo:"+BR(r.configManager.get("user"))),console.info("appid: "+e.app_id+", sdk is ready, version is 0.0.3-lite, you can report now !!!"),r.pageView()})),this.tokenManager.apply(this,e),this.eventManager.apply(this,e),this.sessionManager.apply(this,e),this.emit(SU.Init)):console.warn("app_id param is error, must be number, please check!"):console.warn("init params error,please check")},e.prototype.config=function(e){if(this.inited)if(e&&uU(e)){e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=eU({},e);t.user_unique_id;var n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&ak(t).call(t,r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof sE){var i=0;for(r=sE(e);i<r.length;i++)ak(t).call(t,r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["user_unique_id"]);t.hasOwnProperty("user_unique_id")&&this.emit(SU.ConfigUuid,t.user_unique_id),this.configManager.set(n)}else console.warn("config params is error, please check");else console.warn("config must be use after function init")},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(SU.Start))},e.prototype.event=function(e,t){var n=this;try{var r=[];Array.isArray(e)?e.forEach((function(e){r.push(n.processEvent(e[0],e[1]||{}))})):r.push(this.processEvent(e,t)),r.length&&(this.emit(SU.Event,r),this.emit(SU.SessionResetTime))}catch(i){console.warn("something error, please check")}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[];n.push(this.processEvent(e,t||{})),n.length&&(this.emit(SU.BeconEvent,n),this.emit(SU.SessionResetTime))}},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var n=e;/^event\./.test(e)&&(n=lk(e).call(e,6));var r=t;"object"!=wc(r)&&(r={}),r.event_index=cU();var i=void 0;return r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i}}catch(o){return{event:e,params:t}}},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,n){this.hook.emit(e,t,n)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){void 0===e&&(e={});var t={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time)},n=eU({},t,e);this.event("predefine_pageview",n)},e}(),DU=new MU("default"),LU="veplayer_live_device_id",NU="veplayer_live_user_id",FU=function(e){return Math.floor((9*Math.random()+1)*Math.pow(10,e-1)).toString()},UU=function(e){zP(n,e);var t=KP(n);function n(){var e,r;Sy(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ry(MP(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_userId",void 0),Ry(MP(r),"_deviceId",void 0),Ry(MP(r),"_liveLogger",void 0),r}return Iy(n,[{key:"afterCreate",value:function(){var e,t,n,r;this.config.enable&&(this.config.appId?(this._userId=(null===(e=this.config)||void 0===e?void 0:e.userId)||((n=localStorage.getItem(NU))||(n=FU(12),localStorage.setItem(NU,n),n)),this._deviceId=(null===(t=this.config)||void 0===t?void 0:t.deviceId)||((r=localStorage.getItem(LU))||(r=FU(11),localStorage.setItem(LU,r),r)),this.open()):console.info("not found appId, please generate an appId"))}},{key:"destroy",value:function(){this.close()}},{key:"close",value:function(){var e;null===(e=this._liveLogger)||void 0===e||e.destroy(!1),this._liveLogger=void 0}},{key:"open",value:function(){this._liveLogger||(this._start(),this.config.showUserIdInErrorPanel&&this.player.plugins.error&&(this.player.plugins.error.config.extraTips=[{label:"userId",value:null==DU?void 0:DU.getConfig("user_unique_id")}]))}},{key:"_createTea",value:function(){DU.init({app_id:468759,channel:"cn",channel_domain:"//mcs.volceapplog.com"}),DU.start(),DU.config({user_unique_id:this._userId,device_id:this._deviceId})}},{key:"_start",value:function(){this._createTea(),this._liveLogger=new WF({Tea:DU,player:this.player,aid:this.config.appId,project_key:this.config.appId,app_name:this.config.appName||this.config.appId,user_id:this._userId,device_id:this._deviceId,ext:{veplayer_version:"2.0.0-rc.0",flv_version:"3.0.0-next.23",hls_version:"3.0.0-next.36-1",rts_version:"0.2.0-alpha.3"}})}}],[{key:"pluginName",get:function(){return"logger"}},{key:"defaultConfig",get:function(){return{appId:"",enable:!0,showUserIdInErrorPanel:!0}}}]),n}(jx);function BU(e,t){return"number"!=typeof e?"-":t?t(e):e.toString()}var VU,jU=function(e){zP(n,e);var t=KP(n);function n(){var e,r;Sy(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ry(MP(r=t.call.apply(t,Mm(e=[this]).call(e,o))),"_pollTimer",void 0),Ry(MP(r),"_visible",void 0),Ry(MP(r),"_playPlugin",void 0),r}return Iy(n,[{key:"_streamType",get:function(){return OM.getStreamType(this.player.config.url)}},{key:"afterCreate",value:function(){var e=this;this._playPlugin=this.player.plugins[this._streamType],this.player.on(gF.ERROR,(function(){return e.close()})),this.config.visible&&this.player.once(gF.LOADED_DATA,(function(){return e.open()}))}},{key:"open",value:function(){var e;this._visible||(ok(e=["flv","hls"]).call(e,this._streamType)?this.player.plugins[this._streamType]?(this.root.style.display="block",this._tick(),this._visible=!0):console.warn("不支持或未加载".concat(this._streamType,"插件")):console.warn("仅支持flv和hls格式的信息展示"))}},{key:"close",value:function(){this._visible&&(clearTimeout(this._pollTimer),this.root.innerHTML="",this.root.style.display="none",this._visible=!1)}},{key:"destroy",value:function(){var e=this;this.close(),this.player.off(gF.LOADED_DATA,(function(){return e.open()})),this.player.off(gF.ERROR,(function(){return e.close()}))}},{key:"render",value:function(){return'\n <xg-live-panel class="veplayer-live-panel">\n </xg-live-panel>\n '}},{key:"_tick",value:function(){var e=this;clearTimeout(this._pollTimer),this._renderPanel(),this._pollTimer=setTimeout((function(){e._tick()}),this.config.interval)}},{key:"_getStats",value:function(){var e;return null===(e=this._playPlugin)||void 0===e?void 0:e.getStats()}},{key:"_getPanelData",value:function(){var e,t,n,r,i=this._getStats()||{},o="".concat(this._streamType,"_live"),a=this._playPlugin.softDecode,s=[(e=Pm(Pm({},i),{},{format:o}),{rows:[{key:"format",labelTextKey:"FORMAT",value:null!==(t=null==e?void 0:e.format)&&void 0!==t?t:"-"},{key:"fps",labelTextKey:"FPS",value:BU(e.fps,(function(e){return"".concat(e," fps")}))},{key:"bitrate",labelTextKey:"BITRATE",value:BU(e.bitrate,(function(e){return"".concat(e/1e3," kbps")}))},{key:"gop",labelTextKey:"GOP",value:BU(e.gop,(function(e){return"".concat(e," frames")}))},{key:"resolution",labelTextKey:"RESOLUTION",value:Mm(n="".concat(BU(e.height)," * ")).call(n,BU(e.height))},{key:"encodeType",labelTextKey:"ENCODE_TYPE",value:null!==(r=e.encodeType)&&void 0!==r?r:"-"},{key:"bufferEnd",labelTextKey:"BUFFER_END",value:BU(e.bufferEnd)},{key:"currentTime",labelTextKey:"CURRENT_TIME",value:BU(e.currentTime,(function(e){return e.toFixed(6)+"s"}))}]})];return a&&s.push(function(e){return{titleTextKey:"DECODE_INFO",rows:[{key:"decodeEfficiency",labelTextKey:"DECODE_EFFICIENCY",value:BU(e.decodeFps,(function(e){return e+"frames/s"}))},{key:"decodeCost",labelTextKey:"DECODE_COST",value:BU(e.decodeFps,(function(e){return(e?(1e3/e).toFixed():0)+"ms"}))}]}}(i)),s}},{key:"_renderPanel",value:function(){var e=this,t=this._getPanelData(),n=this.root;n&&(n.innerHTML="",t.forEach((function(t){e._renderGroup(n,t)})))}},{key:"_renderGroup",value:function(e,t){var n=this,r=t.title,i=t.titleTextKey,o=t.rows,a=this.player.config.i18nManager;if(r||i){var s,l=this._genTitleDom(null!==(s=a.getText(i))&&void 0!==s?s:r);e.appendChild(l)}o.forEach((function(t){var r=n._genRowDom(t);e.appendChild(r)}))}},{key:"_genTitleDom",value:function(e){var t=pC.createDom("xg-live-panel","",void 0,"veplayer-live-panel-row"),n=pC.createDom("xg-live-panel",e,void 0,"veplayer-live-panel-row-title");return t.appendChild(n),t}},{key:"_genRowDom",value:function(e){var t=this.player.config.i18nManager,n=pC.createDom("veplayer-live-panel-row","",void 0,"veplayer-live-panel-row"),r=pC.createDom("xg-live-panel",t.getText(e.labelTextKey),void 0,"veplayer-live-panel-row-label");n.appendChild(r);var i=pC.createDom("xg-live-panel",e.value);return n.appendChild(i),n}}],[{key:"pluginName",get:function(){return"infoPanel"}},{key:"defaultConfig",get:function(){return{visible:!1,interval:500}}}]),n}(jx),HU=Pm(Pm({},aD),{},{INVALID_PARAMETER:"The imported parameter is empty, please pass in necessary parameters such as the stream address",FORMAT:"format",FPS:"fps",BITRATE:"bitrate",GOP:"gop",RESOLUTION:"resolution",ENCODE_TYPE:"encodeType",BUFFER_END:"bufferEnd",CURRENT_TIME:"currentTime",DECODE_EFFICIENCY:"efficiency",DECODE_COST:"cost",DECODE_INFO:"decodeInfo",REFRESH:"refresh"}),zU=Pm(Pm({},sD),{},{INVALID_PARAMETER:"入参为空,请传入流地址等必要参数",FORMAT:"格式",FPS:"帧率",BITRATE:"码率",GOP:"GOP",RESOLUTION:"视频分辨率",ENCODE_TYPE:"编码方式",BUFFER_END:"Buffer 水位",CURRENT_TIME:"播放进度",DECODE_EFFICIENCY:"解码效率",DECODE_COST:"解码消耗",DECODE_INFO:"软解信息",REFRESH:"刷新"});lD.extend([{LANG:"zh-cn",TEXT:zU},{LANG:"en",TEXT:HU}]);var WU={autoplay:{muted:!0}},GU=Mm(VU=[]).call(VU,Ty($M),[_F,UU,jU]),KU=function(e){zP(n,e);var t=KP(n);function n(){return Sy(this,n),t.apply(this,arguments)}return Iy(n,[{key:"openLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.open()}},{key:"closeLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.close()}},{key:"openInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.open()}},{key:"closeInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.close()}}]),n}(gD);function YU(e){return XU.apply(this,arguments)}function XU(){return(XU=ny(ey().mark((function e(t){var n,r,i,o,a;return ey().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(t.url||t.playlist)){e.next=2;break}throw zN(jN.INVALID_PARAMETER,new lD);case 2:return i=new lD({lang:null==t?void 0:t.lang,i18n:null==t?void 0:t.i18n}),o=Pm(Pm({},t),{},{plugins:Mm(n=[]).call(n,Ty(GU),Ty(null!==(r=t.plugins)&&void 0!==r?r:[]))}),e.next=6,gD.create(Pm(Pm(Pm({},WU),o),{},{isLive:!0,i18nManager:i,preparePlugins:function(e){return ny(ey().mark((function t(){return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",JN(Pm(Pm({},o),{},{url:e})));case 1:case"end":return t.stop()}}),t)})))()}}),KU);case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qU,JU=Object.freeze({__proto__:null,ErrorCode:jN,Events:gF});qU="umd",bM.setModuleSystem(qU);var QU=OM.isMseSupported,ZU=OM.isSoftDecodeSupported;void 0!==VePlayer.register?VePlayer.register(eM.BizLive,{createLivePlayer:YU}):wM(eM.BizLive,{createLivePlayer:YU}),e.Codec=cD,e.DecodeType=dD,e.Degradation=hD,e.DynamicModule=eM,e.EN=aD,e.POSITIONS=fD,e.Plugin=jx,e.RTMCodec=YN,e.Sniffer=wC,e.ZH_CN=sD,e.createLivePlayer=YU,e.isMseSupported=QU,e.isRTMSupportCodec=qN,e.isRTMSupported=XN,e.isSoftDecodeSupported=ZU,e.live=JU,e.load=kM,e.register=wM,e.util=OM}));