@volcengine/veplayer 2.1.0-rc.1 → 2.1.0-rc.3
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.
- package/esm/veplayer.biz.live.development.js +7 -5
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.development.js +10 -7
- package/esm/veplayer.live.development.js +10 -7
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.development.js +2 -1
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/veplayer.biz.live.development.js +7 -5
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.development.js +10 -7
- package/umd/veplayer.live.development.js +10 -7
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.development.js +2 -1
- package/umd/veplayer.vod.production.js +1 -1
|
@@ -1 +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 i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("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)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),k=function(e){return _(m(e),8,-1)},b=k,w=g,E=function(e){if("Function"===b(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},P={},A=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,R=O?I.bind(I):function(){return I.apply(I,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,U,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=k,V=Object,z=g("".split),K=j((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?z(e,""):V(e)}:V,G=function(e){return null==e},W=G,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=K,Z=X,$=function(e){return q(Z(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.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=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),ke=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,we=S,Ee=se,Ce=Object,xe=ke?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Pe=S,Ae=Se,Oe=TypeError,Ie=function(e){if(Pe(e))return e;throw Oe(Ae(e)+" is not a function")},Re=Ie,Me=G,Le=function(e,t){var n=e[t];return Me(n)?void 0:Re(n)},De=R,Ne=S,Fe=ee,Ue=TypeError,He={exports:{}},je=r,Be=Object.defineProperty,Ve=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},ze="__core-js_shared__",Ke=r[ze]||Ve(ze,{}),Ge=Ke;(He.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 We=He.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},Ze=qe,$e=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return $e(Ze(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=ke,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=R,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),kt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,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)},bt=xe,wt=function(e){var t=kt(e,"string");return bt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,Pt=!A&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),At=A,Ot=R,It=M,Rt=H,Mt=$,Lt=wt,Dt=Je,Nt=Pt,Ft=Object.getOwnPropertyDescriptor;P.f=At?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Rt(!Ot(It.f,e,t),e[t])};var Ut=o,Ht=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=zt[Vt(e)];return n==Gt||n!=Kt&&(Ht(t)?Ut(t):!!t)},Vt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},zt=Bt.data={},Kt=Bt.NATIVE="N",Gt=Bt.POLYFILL="P",Wt=Bt,Yt=Ie,Xt=a,qt=E(E.bind),Zt=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},$t={},Jt=A&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=A,on=Pt,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";$t.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 i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],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(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=$t,gn=H,yn=A?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,kn=E,bn=S,wn=P.f,En=Wt,Cn=te,xn=Zt,Tn=yn,Sn=Je,Pn=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},An=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?Pn(a):p&&bn(a)?kn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},On=k,In=Array.isArray||function(e){return"Array"==On(e)},Rn=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:Rn)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Un=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Hn=Un,jn=function(e){return Hn(e.length)},Bn=TypeError,Vn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},zn=wt,Kn=$t,Gn=H,Wn=function(e,t,n){var i=zn(t);i in e?Kn.f(e,i,Gn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,Zn=S,$n=k,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==$n(function(){return arguments}()),ti=qn?$n:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?$n(t):"Object"==(i=$n(t))&&Zn(t.callee)?"Arguments":i},ni=S,ii=Ke,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,ki=In,bi=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return ki(e)&&(t=e.constructor,(bi(t)&&(t===Ci||ki(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Pi=ve,Ai=ft("species"),Oi=function(e){return Pi>=51||!Si((function(){var t=[];return(t.constructor={})[Ai]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ii=An,Ri=o,Mi=In,Li=ee,Di=qe,Ni=jn,Fi=Vn,Ui=Wn,Hi=Ti,ji=Oi,Bi=ve,Vi=ft("isConcatSpreadable"),zi=Bi>=51||!Ri((function(){var e=[];return e[Vi]=!1,e.concat()[0]!==e})),Ki=function(e){if(!Li(e))return!1;var t=e[Vi];return void 0!==t?!!t:Mi(e)};Ii({target:"Array",proto:!0,arity:1,forced:!zi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Hi(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(Ki(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Ui(s,l,o[n]);else Fi(l+1),Ui(s,l++,o);return s.length=l,s}});var Gi=ti,Wi=String,Yi=function(e){if("Symbol"===Gi(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,Zi=Math.max,$i=Math.min,Ji=function(e,t){var n=qi(e);return n<0?Zi(n+t,0):$i(n,t)},Qi=$,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=$,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=A,gr=Jt,yr=$t,mr=nn,_r=$,kr=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=kr(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var br,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Pr=hr,Ar=rr,Or=wr,Ir=Tt,Rr="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ur=function(){try{br=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Ur="undefined"!=typeof document?document.domain&&br?Fr(br):(t=Ir("iframe"),n="java"+Mr+":",t.style.display="none",Or.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(br);for(var i=Pr.length;i--;)delete Ur[Rr][Pr[i]];return Ur()};Ar[Lr]=!0;var Hr=Object.create||function(e,t){var n;return null!==e?(Dr[Rr]=Tr(e),n=new Dr,Dr[Rr]=null,n[Lr]=e):n=Ur(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,Vr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,Vr)};var zr={},Kr=Ji,Gr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Gr(e),r=Kr(t,i),o=Kr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},Zr=k,$r=$,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];zr.f=function(e){return eo&&"Window"==Zr(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr($r(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=$t,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=$t.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=R,mo=ae,_o=ft,ko=io,bo=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&ko(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=$t.f,To=yn,So=Je,Po=Eo,Ao=ft("toStringTag"),Oo=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Ao)||xo(r,Ao,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Po)}},Io=S,Ro=r.WeakMap,Mo=Io(Ro)&&/native code/.test(String(Ro)),Lo=r,Do=ee,No=yn,Fo=Je,Uo=Ke,Ho=xr,jo=rr,Bo="Object already initialized",Vo=Lo.TypeError,zo=Lo.WeakMap;if(Mo||Uo.state){var Ko=Uo.state||(Uo.state=new zo);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,lo=function(e,t){if(Ko.has(e))throw Vo(Bo);return t.facade=e,Ko.set(e,t),t},uo=function(e){return Ko.get(e)||{}},co=function(e){return Ko.has(e)}}else{var Go=Ho("state");jo[Go]=!0,lo=function(e,t){if(Fo(e,Go))throw Vo(Bo);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 Wo={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(!Do(t)||(n=uo(t)).type!==e)throw Vo("Incompatible receiver, "+e+" required");return n}}},Yo=Zt,Xo=K,qo=qe,Zo=jn,$o=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=Zo(v),m=0,_=h||$o,k=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)k[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(k,f)}else switch(e){case 4:return!1;case 7:Jo(k,f)}return o?-1:i||r?r:k}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=An,na=r,ia=R,ra=g,oa=A,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=$,fa=wt,da=Yi,pa=H,va=Hr,ga=pr,ya=jr,ma=zr,_a=to,ka=P,ba=$t,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Pa=it,Aa=ft,Oa=ao,Ia=go,Ra=bo,Ma=Oo,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ua="prototype",Ha=La.set,ja=La.getterFor(Fa),Ba=Object[Ua],Va=na.Symbol,za=Va&&Va[Ua],Ka=na.TypeError,Ga=na.QObject,Wa=ka.f,Ya=ba.f,Xa=ma.f,qa=Ea.f,Za=ra([].push),$a=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("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 i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=$a[e]=va(za);return Ha(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la($a,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la($a,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la($a,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la($a,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la($a,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la($a,e)||la(Sa,e)||Za(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la($a,e)||t&&!la(Ba,e)||Za(i,$a[e])})),i};aa||(Va=function(){if(ua(za,this))throw Ka("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Pa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(za=Va[Ua],"toString",(function(){return ja(this).tag})),Ca(Va,"withoutSetter",(function(e){return ns(Pa(e),e)})),Ea.f=os,ba.f=is,wa.f=rs,ka.f=as,ya.f=ma.f=ss,_a.f=ls,Oa.f=function(e){return ns(Aa(e),e)},oa&&xa(za,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Va}),Da(ga(Qa),(function(e){Ia(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):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ra(),Ma(Va,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=An,hs=ae,fs=Je,ds=Yi,ps=We,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=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=An,_s=Je,ks=xe,bs=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!ks(e))throw TypeError(bs(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=In,Ts=S,Ss=k,Ps=Yi,As=g([].push),Os=An,Is=ae,Rs=h,Ms=R,Ls=g,Ds=o,Ns=S,Fs=xe,Us=Cs,Hs=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?As(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||As(n,Ps(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,Vs=Is("JSON","stringify"),zs=Ls(/./.exec),Ks=Ls("".charAt),Gs=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,Zs=/^[\uDC00-\uDFFF]$/,$s=!js||Ds((function(){var e=Is("Symbol")();return"[null]"!=Vs([e])||"{}"!=Vs({a:e})||"{}"!=Vs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),Qs=function(e,t){var n=Us(arguments),i=Hs(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Rs(Vs,null,n)},el=function(e,t,n){var i=Ks(n,t-1),r=Ks(n,t+1);return zs(qs,e)&&!zs(Zs,r)||zs(Zs,e)&&!zs(qs,i)?"\\u"+Ys(Gs(e,0),16):e};Vs&&Os({target:"JSON",stat:!0,arity:3,forced:$s||Js},{stringify:function(e,t,n){var i=Us(arguments),r=Rs($s?Qs:Vs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});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 il=bo;go("toPrimitive"),il();var rl=ae,ol=Oo;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Oo(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=A,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,kl=qe,bl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=bl?El.getPrototypeOf:function(e){var t=kl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Pl=ee,Al=Hr,Ol=xl,Il=io,Rl=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Pl(al)||Tl((function(){var e={};return al[Rl].call(e)!==e}));Sl((al=Ll?{}:Al(al))[Rl])||Il(al,Rl,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Hr,Ul=H,Hl=Oo,jl=cl,Bl=function(){return this},Vl=g,zl=Ie,Kl=S,Gl=String,Wl=TypeError,Yl=function(e,t,n){try{return Vl(zl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},Xl=nn,ql=function(e){if("object"==typeof e||Kl(e))return e;throw Wl("Can't set "+Gl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Yl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return Xl(n),ql(i),t?e(n,i):n.__proto__=i,n}}():void 0),$l=An,Jl=R,Ql=gl,eu=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Ul(+!i,n)}),Hl(e,r,!1,!0),jl[r]=Bl,e},tu=xl,nu=Oo,iu=io,ru=cl,ou=Dl,au=Ql.PROPER,su=ou.BUGGY_SAFARI_ITERATORS,lu=ft("iterator"),uu="keys",cu="values",hu="entries",fu=function(){return this},du=function(e,t,n,i,r,o,a){eu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!su&&e in d)return d[e];switch(e){case uu:case cu:case hu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[lu]||d["@@iterator"]||r&&d[r],v=!su&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=tu(g.call(new e)))!==Object.prototype&&s.next&&(nu(s,h,!0,!0),ru[h]=fu),au&&r==cu&&p&&p.name!==cu&&(f=!0,v=function(){return Jl(p,this)}),r)if(l={values:c(cu),keys:o?v:c(uu),entries:c(hu)},a)for(u in l)(su||f||!(u in d))&&iu(d,u,l[u]);else $l({target:t,proto:!0,forced:su||f},l);return a&&d[lu]!==v&&iu(d,lu,v,{name:r}),ru[t]=v,l},pu=function(e,t){return{value:e,done:t}},vu=$,gu=cl,yu=Wo;$t.f;var mu=du,_u=pu,ku="Array Iterator",bu=yu.set,wu=yu.getterFor(ku);mu(Array,"Array",(function(e,t){bu(this,{type:ku,target:vu(e),index:0,kind:t})}),(function(){var e=wu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,_u(void 0,!0)):_u("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),gu.Arguments=gu.Array;var Eu={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},Cu=r,xu=ti,Tu=yn,Su=cl,Pu=ft("toStringTag");for(var Au in Eu){var Ou=Cu[Au],Iu=Ou&&Ou.prototype;Iu&&xu(Iu)!==Pu&&Tu(Iu,Pu,Au),Su[Au]=Su.Array}var Ru=ul;go("dispose");var Mu=Ru;go("asyncDispose");var Lu=An,Du=g,Nu=ae("Symbol"),Fu=Nu.keyFor,Uu=Du(Nu.prototype.valueOf);Lu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Fu(Uu(e))}catch(t){return!1}}});for(var Hu=An,ju=We,Bu=ae,Vu=g,zu=xe,Ku=ft,Gu=Bu("Symbol"),Wu=Gu.isWellKnown,Yu=Bu("Object","getOwnPropertyNames"),Xu=Vu(Gu.prototype.valueOf),qu=ju("wks"),Zu=0,$u=Yu(Gu),Ju=$u.length;Zu<Ju;Zu++)try{var Qu=$u[Zu];zu(Gu[Qu])&&Ku(Qu)}catch(OR){}Hu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Wu&&Wu(e))return!0;try{for(var t=Xu(e),n=0,i=Yu(qu),r=i.length;n<r;n++)if(qu[i[n]]==t)return!0}catch(OR){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var ec=Mu,tc=n(ec),nc=g,ic=Dn,rc=Yi,oc=X,ac=nc("".charAt),sc=nc("".charCodeAt),lc=nc("".slice),uc=function(e){return function(t,n){var i,r,o=rc(oc(t)),a=ic(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=sc(o,a))<55296||i>56319||a+1===s||(r=sc(o,a+1))<56320||r>57343?e?ac(o,a):i:e?lc(o,a,a+2):r-56320+(i-55296<<10)+65536}},cc={codeAt:uc(!1),charAt:uc(!0)}.charAt,hc=Yi,fc=Wo,dc=du,pc=pu,vc="String Iterator",gc=fc.set,yc=fc.getterFor(vc);dc(String,"String",(function(e){gc(this,{type:vc,string:hc(e),index:0})}),(function(){var e,t=yc(this),n=t.string,i=t.index;return i>=n.length?pc(void 0,!0):(e=cc(n,i),t.index+=e.length,pc(e,!1))}));var mc=ao.f("iterator"),_c=n(mc);function kc(e){return(kc="function"==typeof tc&&"symbol"==typeof _c?function(e){return typeof e}:function(e){return e&&"function"==typeof tc&&e.constructor===tc&&e!==tc.prototype?"symbol":typeof e})(e)}var bc={exports:{}},wc=An,Ec=A,Cc=$t.f;wc({target:"Object",stat:!0,forced:Object.defineProperty!==Cc,sham:!Ec},{defineProperty:Cc});var xc=te.Object,Tc=bc.exports=function(e,t,n){return xc.defineProperty(e,t,n)};xc.defineProperty.sham&&(Tc.sham=!0);var Sc=bc.exports,Pc=n(Sc);An({target:"Object",stat:!0,sham:!A},{create:Hr});var Ac=te.Object,Oc=n((function(e,t){return Ac.create(e,t)})),Ic=qe,Rc=xl,Mc=yl;An({target:"Object",stat:!0,forced:o((function(){Rc(1)})),sham:!Mc},{getPrototypeOf:function(e){return Rc(Ic(e))}});var Lc=te.Object.getPrototypeOf,Dc=n(Lc),Nc=o,Fc=function(e,t){var n=[][e];return!!n&&Nc((function(){n.call(null,t||function(){return 1},1)}))},Uc=ea.forEach,Hc=Fc("forEach")?[].forEach:function(e){return Uc(this,e,arguments.length>1?arguments[1]:void 0)};An({target:"Array",proto:!0,forced:[].forEach!=Hc},{forEach:Hc});var jc=te,Bc=function(e){return jc[e+"Prototype"]},Vc=Bc("Array").forEach,zc=ti,Kc=Je,Gc=se,Wc=Vc,Yc=Array.prototype,Xc={DOMTokenList:!0,NodeList:!0},qc=n((function(e){var t=e.forEach;return e===Yc||Gc(Yc,e)&&t===Yc.forEach||Kc(Xc,zc(e))?Wc:t})),Zc=A,$c=In,Jc=TypeError,Qc=Object.getOwnPropertyDescriptor,eh=Zc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(OR){return OR instanceof TypeError}}()?function(e,t){if($c(e)&&!Qc(e,"length").writable)throw Jc("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},th=qe,nh=jn,ih=eh,rh=Vn;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(OR){return OR instanceof TypeError}}()},{push:function(e){var t=th(this),n=nh(t),i=arguments.length;rh(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return ih(t,n),n}});var oh=Bc("Array").push,ah=se,sh=oh,lh=Array.prototype,uh=n((function(e){var t=e.push;return e===lh||ah(lh,e)&&t===lh.push?sh:t}));An({target:"Object",stat:!0},{setPrototypeOf:Zl});var ch=te.Object.setPrototypeOf,hh=n(ch),fh=ae,dh=jr,ph=to,vh=nn,gh=g([].concat),yh=fh("Reflect","ownKeys")||function(e){var t=dh.f(vh(e)),n=ph.f;return n?gh(t,n(e)):t},mh=Je,_h=yh,kh=P,bh=$t,wh=ee,Eh=yn,Ch=Error,xh=g("".replace),Th=String(Ch("zxcasd").stack),Sh=/\n\s*at [^:]*:[^\n]*/,Ph=Sh.test(Th),Ah=H,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ah(1,7)),7!==e.stack)})),Ih=yn,Rh=function(e,t){if(Ph&&"string"==typeof e&&!Ch.prepareStackTrace)for(;t--;)e=xh(e,Sh,"");return e},Mh=Oh,Lh=Error.captureStackTrace,Dh=cl,Nh=ft("iterator"),Fh=Array.prototype,Uh=function(e){return void 0!==e&&(Dh.Array===e||Fh[Nh]===e)},Hh=ti,jh=Le,Bh=G,Vh=cl,zh=ft("iterator"),Kh=function(e){if(!Bh(e))return jh(e,zh)||jh(e,"@@iterator")||Vh[Hh(e)]},Gh=R,Wh=Ie,Yh=nn,Xh=Se,qh=Kh,Zh=TypeError,$h=function(e,t){var n=arguments.length<2?qh(e):t;if(Wh(n))return Yh(Gh(n,e));throw Zh(Xh(e)+" is not iterable")},Jh=R,Qh=nn,ef=Le,tf=function(e,t,n){var i,r;Qh(e);try{if(!(i=ef(e,"return"))){if("throw"===t)throw n;return n}i=Jh(i,e)}catch(OR){r=!0,i=OR}if("throw"===t)throw n;if(r)throw i;return Qh(i),n},nf=Zt,rf=R,of=nn,af=Se,sf=Uh,lf=jn,uf=se,cf=$h,hf=Kh,ff=tf,df=TypeError,pf=function(e,t){this.stopped=e,this.result=t},vf=pf.prototype,gf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=nf(t,c),g=function(e){return i&&ff(i,"normal",e),new pf(!0,e)},y=function(e){return h?(of(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=hf(e)))throw df(af(e)+" is not iterable");if(sf(r)){for(o=0,a=lf(e);a>o;o++)if((s=y(e[o]))&&uf(vf,s))return s;return new pf(!1)}i=cf(e,r)}for(l=f?e.next:i.next;!(u=rf(l,i)).done;){try{s=y(u.value)}catch(OR){ff(i,"throw",OR)}if("object"==typeof s&&s&&uf(vf,s))return s}return new pf(!1)},yf=Yi,mf=An,_f=se,kf=xl,bf=Zl,wf=function(e,t,n){for(var i=_h(t),r=bh.f,o=kh.f,a=0;a<i.length;a++){var s=i[a];mh(e,s)||n&&mh(n,s)||r(e,s,o(t,s))}},Ef=Hr,Cf=yn,xf=H,Tf=function(e,t){wh(t)&&"cause"in t&&Eh(e,"cause",t.cause)},Sf=function(e,t,n,i){Mh&&(Lh?Lh(e,t):Ih(e,"stack",Rh(n,i)))},Pf=gf,Af=function(e,t){return void 0===e?arguments.length<2?"":t:yf(e)},Of=ft("toStringTag"),If=Error,Rf=[].push,Mf=function(e,t){var n,i=_f(Lf,this);bf?n=bf(If(),i?kf(this):Lf):(n=i?this:Ef(Lf),Cf(n,Of,"Error")),void 0!==t&&Cf(n,"message",Af(t)),Sf(n,Mf,n.stack,1),arguments.length>2&&Tf(n,arguments[2]);var r=[];return Pf(e,Rf,{that:r}),Cf(n,"errors",r),n};bf?bf(Mf,If):wf(Mf,If,{name:!0});var Lf=Mf.prototype=Ef(If.prototype,{constructor:xf(1,Mf),message:xf(1,""),name:xf(1,"AggregateError")});mf({global:!0,constructor:!0,arity:2},{AggregateError:Mf});var Df,Nf,Ff,Uf,Hf="undefined"!=typeof process&&"process"==k(process),jf=ae,Bf=oo,Vf=A,zf=ft("species"),Kf=function(e){var t=jf(e);Vf&&t&&!t[zf]&&Bf(t,zf,{configurable:!0,get:function(){return this}})},Gf=se,Wf=TypeError,Yf=function(e,t){if(Gf(t,e))return e;throw Wf("Incorrect invocation")},Xf=_i,qf=Se,Zf=TypeError,$f=function(e){if(Xf(e))return e;throw Zf(qf(e)+" is not a constructor")},Jf=nn,Qf=$f,ed=G,td=ft("species"),nd=function(e,t){var n,i=Jf(e).constructor;return void 0===i||ed(n=Jf(i)[td])?t:Qf(n)},id=TypeError,rd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),od=r,ad=h,sd=Zt,ld=S,ud=Je,cd=o,hd=wr,fd=Cs,dd=Tt,pd=function(e,t){if(e<t)throw id("Not enough arguments");return e},vd=rd,gd=Hf,yd=od.setImmediate,md=od.clearImmediate,_d=od.process,kd=od.Dispatch,bd=od.Function,wd=od.MessageChannel,Ed=od.String,Cd=0,xd={},Td="onreadystatechange";cd((function(){Df=od.location}));var Sd=function(e){if(ud(xd,e)){var t=xd[e];delete xd[e],t()}},Pd=function(e){return function(){Sd(e)}},Ad=function(e){Sd(e.data)},Od=function(e){od.postMessage(Ed(e),Df.protocol+"//"+Df.host)};yd&&md||(yd=function(e){pd(arguments.length,1);var t=ld(e)?e:bd(e),n=fd(arguments,1);return xd[++Cd]=function(){ad(t,void 0,n)},Nf(Cd),Cd},md=function(e){delete xd[e]},gd?Nf=function(e){_d.nextTick(Pd(e))}:kd&&kd.now?Nf=function(e){kd.now(Pd(e))}:wd&&!vd?(Uf=(Ff=new wd).port2,Ff.port1.onmessage=Ad,Nf=sd(Uf.postMessage,Uf)):od.addEventListener&&ld(od.postMessage)&&!od.importScripts&&Df&&"file:"!==Df.protocol&&!cd(Od)?(Nf=Od,od.addEventListener("message",Ad,!1)):Nf=Td in dd("script")?function(e){hd.appendChild(dd("script"))[Td]=function(){hd.removeChild(this),Sd(e)}}:function(e){setTimeout(Pd(e),0)});var Id={set:yd,clear:md},Rd=function(){this.head=null,this.tail=null};Rd.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 Md,Ld,Dd,Nd,Fd,Ud=Rd,Hd=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,jd=/web0s(?!.*chrome)/i.test(le),Bd=r,Vd=Zt,zd=P.f,Kd=Id.set,Gd=Ud,Wd=rd,Yd=Hd,Xd=jd,qd=Hf,Zd=Bd.MutationObserver||Bd.WebKitMutationObserver,$d=Bd.document,Jd=Bd.process,Qd=Bd.Promise,ep=zd(Bd,"queueMicrotask"),tp=ep&&ep.value;if(!tp){var np=new Gd,ip=function(){var e,t;for(qd&&(e=Jd.domain)&&e.exit();t=np.get();)try{t()}catch(OR){throw np.head&&Md(),OR}e&&e.enter()};Wd||qd||Xd||!Zd||!$d?!Yd&&Qd&&Qd.resolve?((Nd=Qd.resolve(void 0)).constructor=Qd,Fd=Vd(Nd.then,Nd),Md=function(){Fd(ip)}):qd?Md=function(){Jd.nextTick(ip)}:(Kd=Vd(Kd,Bd),Md=function(){Kd(ip)}):(Ld=!0,Dd=$d.createTextNode(""),new Zd(ip).observe(Dd,{characterData:!0}),Md=function(){Dd.data=Ld=!Ld}),tp=function(e){np.head||Md(),np.add(e)}}var rp=tp,op=function(e){try{return{error:!1,value:e()}}catch(OR){return{error:!0,value:OR}}},ap=r.Promise,sp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,lp=!sp&&!Hf&&"object"==typeof window&&"object"==typeof document,up=r,cp=ap,hp=S,fp=Wt,dp=oi,pp=ft,vp=lp,gp=sp,yp=ve,mp=cp&&cp.prototype,_p=pp("species"),kp=!1,bp=hp(up.PromiseRejectionEvent),wp={CONSTRUCTOR:fp("Promise",(function(){var e=dp(cp),t=e!==String(cp);if(!t&&66===yp)return!0;if(!mp.catch||!mp.finally)return!0;if(!yp||yp<51||!/native code/.test(e)){var n=new cp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[_p]=i,!(kp=n.then((function(){}))instanceof i))return!0}return!t&&(vp||gp)&&!bp})),REJECTION_EVENT:bp,SUBCLASSING:kp},Ep={},Cp=Ie,xp=TypeError,Tp=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw xp("Bad Promise constructor");t=e,n=i})),this.resolve=Cp(t),this.reject=Cp(n)};Ep.f=function(e){return new Tp(e)};var Sp,Pp,Ap=An,Op=Hf,Ip=r,Rp=R,Mp=io,Lp=Oo,Dp=Kf,Np=Ie,Fp=S,Up=ee,Hp=Yf,jp=nd,Bp=Id.set,Vp=rp,zp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(OR){}},Kp=op,Gp=Ud,Wp=Wo,Yp=ap,Xp=wp,qp=Ep,Zp="Promise",$p=Xp.CONSTRUCTOR,Jp=Xp.REJECTION_EVENT,Qp=Wp.getterFor(Zp),ev=Wp.set,tv=Yp&&Yp.prototype,nv=Yp,iv=tv,rv=Ip.TypeError,ov=Ip.document,av=Ip.process,sv=qp.f,lv=sv,uv=!!(ov&&ov.createEvent&&Ip.dispatchEvent),cv="unhandledrejection",hv=function(e){var t;return!(!Up(e)||!Fp(t=e.then))&&t},fv=function(e,t){var n,i,r,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&&yv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(rv("Promise-chain cycle")):(i=hv(n))?Rp(i,n,l,u):l(n)):u(o)}catch(OR){c&&!r&&c.exit(),u(OR)}},dv=function(e,t){e.notified||(e.notified=!0,Vp((function(){for(var n,i=e.reactions;n=i.get();)fv(n,e);e.notified=!1,t&&!e.rejection&&vv(e)})))},pv=function(e,t,n){var i,r;uv?((i=ov.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Ip.dispatchEvent(i)):i={promise:t,reason:n},!Jp&&(r=Ip["on"+e])?r(i):e===cv&&zp("Unhandled promise rejection",n)},vv=function(e){Rp(Bp,Ip,(function(){var t,n=e.facade,i=e.value;if(gv(e)&&(t=Kp((function(){Op?av.emit("unhandledRejection",i,n):pv(cv,n,i)})),e.rejection=Op||gv(e)?2:1,t.error))throw t.value}))},gv=function(e){return 1!==e.rejection&&!e.parent},yv=function(e){Rp(Bp,Ip,(function(){var t=e.facade;Op?av.emit("rejectionHandled",t):pv("rejectionhandled",t,e.value)}))},mv=function(e,t,n){return function(i){e(t,i,n)}},_v=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,dv(e,!0))},kv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw rv("Promise can't be resolved itself");var i=hv(t);i?Vp((function(){var n={done:!1};try{Rp(i,t,mv(kv,n,e),mv(_v,n,e))}catch(OR){_v(n,OR,e)}})):(e.value=t,e.state=1,dv(e,!1))}catch(OR){_v({done:!1},OR,e)}}};$p&&(iv=(nv=function(e){Hp(this,iv),Np(e),Rp(Sp,this);var t=Qp(this);try{e(mv(kv,t),mv(_v,t))}catch(OR){_v(t,OR)}}).prototype,(Sp=function(e){ev(this,{type:Zp,done:!1,notified:!1,parent:!1,reactions:new Gp,rejection:!1,state:0,value:void 0})}).prototype=Mp(iv,"then",(function(e,t){var n=Qp(this),i=sv(jp(this,nv));return n.parent=!0,i.ok=!Fp(e)||e,i.fail=Fp(t)&&t,i.domain=Op?av.domain:void 0,0==n.state?n.reactions.add(i):Vp((function(){fv(i,n)})),i.promise})),Pp=function(){var e=new Sp,t=Qp(e);this.promise=e,this.resolve=mv(kv,t),this.reject=mv(_v,t)},qp.f=sv=function(e){return e===nv||undefined===e?new Pp(e):lv(e)}),Ap({global:!0,constructor:!0,wrap:!0,forced:$p},{Promise:nv}),Lp(nv,Zp,!1,!0),Dp(Zp);var bv=ft("iterator"),wv=!1;try{var Ev=0,Cv={next:function(){return{done:!!Ev++}},return:function(){wv=!0}};Cv[bv]=function(){return this},Array.from(Cv,(function(){throw 2}))}catch(OR){}var xv=function(e,t){if(!t&&!wv)return!1;var n=!1;try{var i={};i[bv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(OR){}return n},Tv=ap,Sv=wp.CONSTRUCTOR||!xv((function(e){Tv.all(e).then(void 0,(function(){}))})),Pv=R,Av=Ie,Ov=Ep,Iv=op,Rv=gf;An({target:"Promise",stat:!0,forced:Sv},{all:function(e){var t=this,n=Ov.f(t),i=n.resolve,r=n.reject,o=Iv((function(){var n=Av(t.resolve),o=[],a=0,s=1;Rv(e,(function(e){var l=a++,u=!1;s++,Pv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Mv=An,Lv=wp.CONSTRUCTOR;ap&&ap.prototype,Mv({target:"Promise",proto:!0,forced:Lv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Dv=R,Nv=Ie,Fv=Ep,Uv=op,Hv=gf;An({target:"Promise",stat:!0,forced:Sv},{race:function(e){var t=this,n=Fv.f(t),i=n.reject,r=Uv((function(){var r=Nv(t.resolve);Hv(e,(function(e){Dv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var jv=R,Bv=Ep;An({target:"Promise",stat:!0,forced:wp.CONSTRUCTOR},{reject:function(e){var t=Bv.f(this);return jv(t.reject,void 0,e),t.promise}});var Vv=nn,zv=ee,Kv=Ep,Gv=function(e,t){if(Vv(e),zv(t)&&t.constructor===e)return t;var n=Kv.f(e);return(0,n.resolve)(t),n.promise},Wv=An,Yv=ap,Xv=wp.CONSTRUCTOR,qv=Gv,Zv=ae("Promise"),$v=!Xv;Wv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return qv($v&&this===Zv?Yv:this,e)}});var Jv=R,Qv=Ie,eg=Ep,tg=op,ng=gf;An({target:"Promise",stat:!0,forced:Sv},{allSettled:function(e){var t=this,n=eg.f(t),i=n.resolve,r=n.reject,o=tg((function(){var n=Qv(t.resolve),r=[],o=0,a=1;ng(e,(function(e){var s=o++,l=!1;a++,Jv(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ig=R,rg=Ie,og=ae,ag=Ep,sg=op,lg=gf,ug="No one promise resolved";An({target:"Promise",stat:!0,forced:Sv},{any:function(e){var t=this,n=og("AggregateError"),i=ag.f(t),r=i.resolve,o=i.reject,a=sg((function(){var i=rg(t.resolve),a=[],s=0,l=1,u=!1;lg(e,(function(e){var c=s++,h=!1;l++,ig(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,ug)))}))})),--l||o(new n(a,ug))}));return a.error&&o(a.value),i.promise}});var cg=An,hg=ap,fg=o,dg=ae,pg=S,vg=nd,gg=Gv,yg=hg&&hg.prototype;cg({target:"Promise",proto:!0,real:!0,forced:!!hg&&fg((function(){yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=vg(this,dg("Promise")),n=pg(e);return this.then(n?function(n){return gg(t,e()).then((function(){return n}))}:e,n?function(n){return gg(t,e()).then((function(){throw n}))}:e)}});var mg=te.Promise,_g=Ep,kg=op;An({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=_g.f(this),n=kg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var bg=mg,wg=n(bg),Eg=An,Cg=In,xg=g([].reverse),Tg=[1,2];Eg({target:"Array",proto:!0,forced:String(Tg)===String(Tg.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}});var Sg=Bc("Array").reverse,Pg=se,Ag=Sg,Og=Array.prototype,Ig=n((function(e){var t=e.reverse;return e===Og||Pg(Og,e)&&t===Og.reverse?Ag:t})),Rg=An,Mg=In,Lg=_i,Dg=ee,Ng=Ji,Fg=jn,Ug=$,Hg=Wn,jg=ft,Bg=Cs,Vg=Oi("slice"),zg=jg("species"),Kg=Array,Gg=Math.max;Rg({target:"Array",proto:!0,forced:!Vg},{slice:function(e,t){var n,i,r,o=Ug(this),a=Fg(o),s=Ng(e,a),l=Ng(void 0===t?a:t,a);if(Mg(o)&&(n=o.constructor,(Lg(n)&&(n===Kg||Mg(n.prototype))||Dg(n)&&null===(n=n[zg]))&&(n=void 0),n===Kg||void 0===n))return Bg(o,s,l);for(i=new(void 0===n?Kg:n)(Gg(l-s,0)),r=0;s<l;s++,r++)s in o&&Hg(i,r,o[s]);return i.length=r,i}});var Wg=Bc("Array").slice,Yg=se,Xg=Wg,qg=Array.prototype,Zg=function(e){var t=e.slice;return e===qg||Yg(qg,e)&&t===qg.slice?Xg:t},$g=n(Zg);function Jg(){Jg=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Pc||function(e,t,n){e[t]=n.value},r="function"==typeof tc?tc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Pc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Dc&&Dc(Dc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;qc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==kc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=b(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"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function b(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.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 w(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]),uh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],qc(e).call(e,w,this),this.reset(!0)}function x(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 i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return hh?hh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=wg);var a=new _(u(t,n,i,r),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 i in t)uh(n).call(n,i);return Ig(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,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,qc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+$g(i).call(i,1))&&(this[i]=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 i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("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 i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;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 i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var Qg=qe,ey=pr;An({target:"Object",stat:!0,forced:o((function(){ey(1)}))},{keys:function(e){return ey(Qg(e))}});var ty=te.Object.keys,ny=n(ty),iy=te.Object.getOwnPropertySymbols,ry=n(iy),oy=ea.filter;An({target:"Array",proto:!0,forced:!Oi("filter")},{filter:function(e){return oy(this,e,arguments.length>1?arguments[1]:void 0)}});var ay=Bc("Array").filter,sy=se,ly=ay,uy=Array.prototype,cy=function(e){var t=e.filter;return e===uy||sy(uy,e)&&t===uy.filter?ly:t},hy=n(cy),fy={exports:{}},dy=An,py=o,vy=$,gy=P.f,yy=A;dy({target:"Object",stat:!0,forced:!yy||py((function(){gy(1)})),sham:!yy},{getOwnPropertyDescriptor:function(e,t){return gy(vy(e),t)}});var my=te.Object,_y=fy.exports=function(e,t){return my.getOwnPropertyDescriptor(e,t)};my.getOwnPropertyDescriptor.sham&&(_y.sham=!0);var ky=fy.exports,by=n(ky),wy=yh,Ey=$,Cy=P,xy=Wn;An({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ey(e),r=Cy.f,o=wy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&xy(a,t,n);return a}});var Ty=te.Object.getOwnPropertyDescriptors,Sy=n(Ty),Py={exports:{}},Ay=An,Oy=A,Iy=Xi.f;Ay({target:"Object",stat:!0,forced:Object.defineProperties!==Iy,sham:!Oy},{defineProperties:Iy});var Ry=te.Object,My=Py.exports=function(e,t){return Ry.defineProperties(e,t)};Ry.defineProperties.sham&&(My.sham=!0);var Ly=Py.exports,Dy=n(Ly),Ny=ao.f("toPrimitive"),Fy=n(Ny);function Uy(e){var t=function(e,t){if("object"!==kc(e)||null===e)return e;var n=e[Fy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==kc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kc(t)?t:String(t)}function Hy(e,t,n){return(t=Uy(t))in e?Pc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jy(e,t){var n=ny(e);if(ry){var i=ry(e);t&&(i=hy(i).call(i,(function(t){return by(e,t).enumerable}))),uh(n).apply(n,i)}return n}function By(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?qc(n=jy(Object(r),!0)).call(n,(function(t){Hy(e,t,r[t])})):Sy?Dy(e,Sy(r)):qc(i=jy(Object(r))).call(i,(function(t){Pc(e,t,by(r,t))}))}return e}function Vy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(OR){return void n(OR)}s.done?t(l):wg.resolve(l).then(i,r)}function zy(e){return function(){var t=this,n=arguments;return new wg((function(i,r){var o=e.apply(t,n);function a(e){Vy(o,i,r,a,s,"next",e)}function s(e){Vy(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Ky=function(e){return e.H265="h265",e.H264="h264",e}(Ky||{}),Gy=function(e){return e.Software="software",e.Hardware="hardware",e}(Gy||{});An({target:"Array",stat:!0},{isArray:In});var Wy=n(te.Array.isArray);function Yy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Xy=Kh,qy=n(Xy),Zy=nn,$y=tf,Jy=Zt,Qy=R,em=qe,tm=function(e,t,n,i){try{return i?t(Zy(n)[0],n[1]):t(n)}catch(OR){$y(e,"throw",OR)}},nm=Uh,im=_i,rm=jn,om=Wn,am=$h,sm=Kh,lm=Array,um=function(e){var t=em(e),n=im(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=Jy(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=sm(t),d=0;if(!f||this===lm&&nm(f))for(a=rm(t),s=n?new this(a):lm(a);a>d;d++)h=o?r(t[d],d):t[d],om(s,d,h);else for(c=(u=am(t,f)).next,s=n?new this:[];!(l=Qy(c,u)).done;d++)h=o?tm(u,r,[l.value,d],!0):l.value,om(s,d,h);return s.length=d,s};An({target:"Array",stat:!0,forced:!xv((function(e){Array.from(e)}))},{from:um});var cm=te.Array.from,hm=n(cm);function fm(e,t){var n;if(e){if("string"==typeof e)return Yy(e,t);var i=$g(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?hm(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yy(e,t):void 0}}function dm(e){return function(e){if(Wy(e))return Yy(e)}(e)||function(e){if(void 0!==tc&&null!=qy(e)||null!=e["@@iterator"])return hm(e)}(e)||fm(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 pm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Pc(e,Uy(i.key),i)}}function gm(e,t,n){return t&&vm(e.prototype,t),n&&vm(e,n),Pc(e,"prototype",{writable:!1}),e}var ym=An,mm=ir.indexOf,_m=Fc,km=E([].indexOf),bm=!!km&&1/km([1],1,-0)<0;ym({target:"Array",proto:!0,forced:bm||!_m("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return bm?km(this,e,t)||0:mm(this,e,t)}});var wm=Bc("Array").indexOf,Em=se,Cm=wm,xm=Array.prototype,Tm=function(e){var t=e.indexOf;return e===xm||Em(xm,e)&&t===xm.indexOf?Cm:t},Sm=n(Tm);function Pm(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=ny(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(ry){var o=ry(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Am=Bc("Array").concat,Om=se,Im=Am,Rm=Array.prototype,Mm=n((function(e){var t=e.concat;return e===Rm||Om(Rm,e)&&t===Rm.concat?Im:t})),Lm=An,Dm=ea.find,Nm="find",Fm=!0;Nm in[]&&Array(1)[Nm]((function(){Fm=!1})),Lm({target:"Array",proto:!0,forced:Fm},{find:function(e){return Dm(this,e,arguments.length>1?arguments[1]:void 0)}});var Um=Bc("Array").find,Hm=se,jm=Um,Bm=Array.prototype,Vm=n((function(e){var t=e.find;return e===Bm||Hm(Bm,e)&&t===Bm.find?jm:t})),zm={exports:{}},Km=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Gm=o,Wm=ee,Ym=k,Xm=Km,qm=Object.isExtensible,Zm=Gm((function(){qm(1)}))||Xm?function(e){return!!Wm(e)&&((!Xm||"ArrayBuffer"!=Ym(e))&&(!qm||qm(e)))}:qm,$m=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Jm=An,Qm=g,e_=rr,t_=ee,n_=Je,i_=$t.f,r_=jr,o_=zr,a_=Zm,s_=$m,l_=!1,u_=it("meta"),c_=0,h_=function(e){i_(e,u_,{value:{objectID:"O"+c_++,weakData:{}}})},f_=zm.exports={enable:function(){f_.enable=function(){},l_=!0;var e=r_.f,t=Qm([].splice),n={};n[u_]=1,e(n).length&&(r_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===u_){t(i,r,1);break}return i},Jm({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 d_=zm.exports,p_=An,v_=r,g_=d_,y_=o,m_=yn,__=gf,k_=Yf,b_=S,w_=ee,E_=Oo,C_=$t.f,x_=ea.forEach,T_=A,S_=Wo.set,P_=Wo.getterFor,A_=io,O_=Hr,I_=oo,R_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:A_(e,i,t[i],n);return e},M_=Zt,L_=Yf,D_=G,N_=gf,F_=du,U_=pu,H_=Kf,j_=A,B_=d_.fastKey,V_=Wo.set,z_=Wo.getterFor,K_={getConstructor:function(e,t,n,i){var r=e((function(e,r){L_(e,o),V_(e,{type:t,index:O_(null),first:void 0,last:void 0,size:0}),j_||(e.size=0),D_(r)||N_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=z_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=B_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),j_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=B_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return R_(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),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),j_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=M_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),R_(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_&&I_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=z_(t),o=z_(i);F_(e,t,(function(e,t){V_(this,{type:i,target:e,state:r(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)?U_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,U_(void 0,!0))}),n?"entries":"values",!n,!0),H_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=v_[e],l=s&&s.prototype,u={};if(T_&&b_(s)&&(o||l.forEach&&!y_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){S_(k_(t,c),{type:e,collection:new s}),null!=n&&__(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=P_(e);x_(["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,i){var r=h(this).collection;if(!t&&o&&!w_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||C_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),g_.enable();E_(i,e,!1,!0),u[e]=i,p_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),K_);var G_=te.Map,W_=Zt,Y_=R,X_=Ie,q_=$f,Z_=G,$_=gf,J_=[].push,Q_=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return q_(this),(t=void 0!==a)&&X_(a),Z_(e)?new this:(n=[],t?(i=0,r=W_(a,o>2?arguments[2]:void 0),$_(e,(function(e){Y_(J_,n,r(e,i++))}))):$_(e,J_,{that:n}),new this(n))};An({target:"Map",stat:!0,forced:!0},{from:Q_});var ek=Cs,tk=function(){return new this(ek(arguments))};An({target:"Map",stat:!0,forced:!0},{of:tk});var nk=Se,ik=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(nk(e)+" is not a map")},rk=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ok=ae("Map"),ak={Map:ok,set:rk("set",2),get:rk("get",1),has:rk("has",1),remove:rk("delete",1),proto:ok.prototype},sk=ik,lk=ak.remove;An({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=sk(this),n=!0,i=0,r=arguments.length;i<r;i++)e=lk(t,arguments[i]),n=n&&e;return!!n}});var uk=ik,ck=ak.get,hk=ak.has,fk=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=uk(this);return hk(r,e)?(n=ck(r,e),"update"in t&&(n=t.update(n,e,r),fk(r,e,n)),n):(i=t.insert(e,r),fk(r,e,i),i)}});var dk=R,pk=function(e,t,n){for(var i,r,o=n||e.next;!(i=dk(o,e)).done;)if(void 0!==(r=t(i.value)))return r},vk=function(e,t,n){return n?pk(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},gk=Zt,yk=ik,mk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=yk(this),n=gk(e,arguments.length>1?arguments[1]:void 0);return!1!==mk(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var _k=Zt,kk=ik,bk=vk,wk=ak.Map,Ek=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=kk(this),n=_k(e,arguments.length>1?arguments[1]:void 0),i=new wk;return bk(t,(function(e,r){n(e,r,t)&&Ek(i,r,e)})),i}});var Ck=Zt,xk=ik,Tk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=xk(this),n=Ck(e,arguments.length>1?arguments[1]:void 0),i=Tk(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var Sk=Zt,Pk=ik,Ak=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Pk(this),n=Sk(e,arguments.length>1?arguments[1]:void 0),i=Ak(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Ok=An,Ik=R,Rk=S,Mk=Ie,Lk=gf,Dk=ak.Map,Nk=g([].push);Ok({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Rk(this)?this:Dk);Mk(t);var i=Mk(n.has),r=Mk(n.get),o=Mk(n.set);return Lk(e,(function(e){var a=t(e);Ik(i,n,a)?Nk(Ik(r,n,a),e):Ik(o,n,a,[e])})),n}});var Fk=function(e,t){return e===t||e!=e&&t!=t},Uk=ik,Hk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Hk(Uk(this),(function(t){if(Fk(t,e))return!0}),!0)}});var jk=R,Bk=gf,Vk=S,zk=Ie,Kk=ak.Map;An({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Vk(this)?this:Kk);zk(t);var i=zk(n.set);return Bk(e,(function(e){jk(i,n,t(e),e)})),n}});var Gk=ik,Wk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Wk(Gk(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Yk=Zt,Xk=ik,qk=vk,Zk=ak.Map,$k=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Xk(this),n=Yk(e,arguments.length>1?arguments[1]:void 0),i=new Zk;return qk(t,(function(e,r){$k(i,n(e,r,t),e)})),i}});var Jk=Zt,Qk=ik,eb=vk,tb=ak.Map,nb=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Qk(this),n=Jk(e,arguments.length>1?arguments[1]:void 0),i=new tb;return eb(t,(function(e,r){nb(i,r,n(e,r,t))})),i}});var ib=ik,rb=gf,ob=ak.set;An({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=ib(this),n=arguments.length,i=0;i<n;)rb(arguments[i++],(function(e,n){ob(t,e,n)}),{AS_ENTRIES:!0});return t}});var ab=Ie,sb=ik,lb=vk,ub=TypeError;An({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=sb(this),n=arguments.length<2,i=n?void 0:arguments[1];if(ab(e),lb(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw ub("Reduce of empty map with no initial value");return i}});var cb=Zt,hb=ik,fb=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=hb(this),n=cb(e,arguments.length>1?arguments[1]:void 0);return!0===fb(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var db=Ie,pb=ik,vb=TypeError,gb=ak.get,yb=ak.has,mb=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=pb(this),i=arguments.length;db(t);var r=yb(n,e);if(!r&&i<3)throw vb("Updating absent value");var o=r?gb(n,e):db(i>2?arguments[2]:void 0)(e,n);return mb(n,e,t(o,e,n)),n}});var _b=R,kb=Ie,bb=S,wb=nn,Eb=TypeError,Cb=function(e,t){var n,i=wb(this),r=kb(i.get),o=kb(i.has),a=kb(i.set),s=arguments.length>2?arguments[2]:void 0;if(!bb(t)&&!bb(s))throw Eb("At least one callback required");return _b(o,i,e)?(n=_b(r,i,e),bb(t)&&(n=t(n),_b(a,i,e,n))):bb(s)&&(n=s(),_b(a,i,e,n)),n};An({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Cb}),An({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Cb});var xb=G_,Tb=n(xb),Sb=n(xb),Pb=ea.map;An({target:"Array",proto:!0,forced:!Oi("map")},{map:function(e){return Pb(this,e,arguments.length>1?arguments[1]:void 0)}});var Ab=Bc("Array").map,Ob=se,Ib=Ab,Rb=Array.prototype,Mb=n((function(e){var t=e.map;return e===Rb||Ob(Rb,e)&&t===Rb.map?Ib:t})),Lb=n(bg),Db=n(cy),Nb=ir.includes;An({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Nb(this,e,arguments.length>1?arguments[1]:void 0)}});var Fb=Bc("Array").includes,Ub=ee,Hb=k,jb=ft("match"),Bb=function(e){var t;return Ub(e)&&(void 0!==(t=e[jb])?!!t:"RegExp"==Hb(e))},Vb=TypeError,zb=ft("match"),Kb=An,Gb=function(e){if(Bb(e))throw Vb("The method doesn't accept regular expressions");return e},Wb=X,Yb=Yi,Xb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[zb]=!1,"/./"[e](t)}catch(OR){}}return!1},qb=g("".indexOf);Kb({target:"String",proto:!0,forced:!Xb("includes")},{includes:function(e){return!!~qb(Yb(Wb(this)),Yb(Gb(e)),arguments.length>1?arguments[1]:void 0)}});var Zb=Bc("String").includes,$b=se,Jb=Fb,Qb=Zb,ew=Array.prototype,tw=String.prototype,nw=n((function(e){var t=e.includes;return e===ew||$b(ew,e)&&t===ew.includes?Jb:"string"==typeof e||e===tw||$b(tw,e)&&t===tw.includes?Qb:t})),iw=n(Tm),rw=n(ty),ow=n(Zg),aw=Se,sw=TypeError,lw=function(e,t){if(!delete e[t])throw sw("Cannot delete property "+aw(t)+" of "+aw(e))},uw=An,cw=qe,hw=Ji,fw=Dn,dw=jn,pw=eh,vw=Vn,gw=Ti,yw=Wn,mw=lw,_w=Oi("splice"),kw=Math.max,bw=Math.min;uw({target:"Array",proto:!0,forced:!_w},{splice:function(e,t){var n,i,r,o,a,s,l=cw(this),u=dw(l),c=hw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=bw(kw(fw(t),0),u-c)),vw(u+n-i),r=gw(l,i),o=0;o<i;o++)(a=c+o)in l&&yw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:mw(l,s);for(o=u;o>u-i+n;o--)mw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:mw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return pw(l,u-i+n),r}});var ww=Bc("Array").splice,Ew=se,Cw=ww,xw=Array.prototype,Tw=n((function(e){var t=e.splice;return e===xw||Ew(xw,e)&&t===xw.splice?Cw:t}));An({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Sw=n(te.Number.isNaN),Pw="\t\n\v\f\r \u2028\u2029\ufeff",Aw=X,Ow=Yi,Iw=Pw,Rw=g("".replace),Mw=RegExp("^["+Iw+"]+"),Lw=RegExp("(^|[^"+Iw+"])["+Iw+"]+$"),Dw=function(e){return function(t){var n=Ow(Aw(t));return 1&e&&(n=Rw(n,Mw,"")),2&e&&(n=Rw(n,Lw,"$1")),n}},Nw={start:Dw(1),end:Dw(2),trim:Dw(3)},Fw=r,Uw=o,Hw=g,jw=Yi,Bw=Nw.trim,Vw=Pw,zw=Fw.parseInt,Kw=Fw.Symbol,Gw=Kw&&Kw.iterator,Ww=/^[+-]?0x/i,Yw=Hw(Ww.exec),Xw=8!==zw(Vw+"08")||22!==zw(Vw+"0x16")||Gw&&!Uw((function(){zw(Object(Gw))}))?function(e,t){var n=Bw(jw(e));return zw(n,t>>>0||(Yw(Ww,n)?16:10))}:zw;An({global:!0,forced:parseInt!=Xw},{parseInt:Xw});var qw=n(te.parseInt),Zw=Bc("Array").keys,$w=ti,Jw=Je,Qw=se,eE=Zw,tE=Array.prototype,nE={DOMTokenList:!0,NodeList:!0},iE=n((function(e){var t=e.keys;return e===tE||Qw(tE,e)&&t===tE.keys||Jw(nE,$w(e))?eE:t})),rE=n(iy),oE=n(ky),aE=n(Ty),sE=n(Ly),lE=n(Sc),uE=n(ec),cE=n(mc),hE=n(ch),fE=n(Lc),dE=g,pE=Ie,vE=ee,gE=Je,yE=Cs,mE=a,_E=Function,kE=dE([].concat),bE=dE([].join),wE={},EE=mE?_E.bind:function(e){var t=pE(this),n=t.prototype,i=yE(arguments,1),r=function(){var n=kE(i,yE(arguments));return this instanceof r?function(e,t,n){if(!gE(wE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";wE[t]=_E("C,a","return new C("+bE(i,",")+")")}return wE[t](e,n)}(t,n.length,n):t.apply(e,n)};return vE(n)&&(r.prototype=n),r},CE=An,xE=h,TE=EE,SE=$f,PE=nn,AE=ee,OE=Hr,IE=o,RE=ae("Reflect","construct"),ME=Object.prototype,LE=[].push,DE=IE((function(){function e(){}return!(RE((function(){}),[],e)instanceof e)})),NE=!IE((function(){RE((function(){}))})),FE=DE||NE;CE({target:"Reflect",stat:!0,forced:FE,sham:FE},{construct:function(e,t){SE(e),PE(t);var n=arguments.length<3?e:SE(arguments[2]);if(NE&&!DE)return RE(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 i=[null];return xE(LE,i,t),new(xE(TE,e,i))}var r=n.prototype,o=OE(AE(r)?r:ME),a=xE(e,o,t);return AE(a)?a:o}});var UE=te.Reflect.construct,HE=n(UE),jE=n(UE),BE=Je,VE=R,zE=ee,KE=nn,GE=function(e){return void 0!==e&&(BE(e,"value")||BE(e,"writable"))},WE=P,YE=xl;An({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return KE(t)===o?t[n]:(i=WE.f(t,n))?GE(i)?i.value:void 0===i.get?void 0:VE(i.get,o):zE(r=YE(t))?e(r,n,o):void 0}});var XE=te.Reflect.get,qE=n(XE),ZE=n(XE),$E=n(Xy),JE=n(cm),QE=n(Ny);function eC(e,t){var n=rw(e);if(rE){var i=rE(e);t&&(i=Db(i).call(i,(function(t){return oE(e,t).enumerable}))),n.push.apply(n,i)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eC(Object(n),!0).forEach((function(t){aC(e,t,n[t])})):aE?sE(e,aE(n)):eC(Object(n)).forEach((function(t){lE(e,t,oE(n,t))}))}return e}function nC(e){return(nC="function"==typeof uE&&"symbol"==typeof cE?function(e){return typeof e}:function(e){return e&&"function"==typeof uE&&e.constructor===uE&&e!==uE.prototype?"symbol":typeof e})(e)}function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),lE(e,gC(i.key),i)}}function oC(e,t,n){return t&&rC(e.prototype,t),n&&rC(e,n),lE(e,"prototype",{writable:!1}),e}function aC(e,t,n){return(t=gC(t))in e?lE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sC(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}}),lE(e,"prototype",{writable:!1}),t&&uC(e,t)}function lC(e){return(lC=hE?fE.bind():function(e){return e.__proto__||fE(e)})(e)}function uC(e,t){return(uC=hE?hE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hC(e,t){if(t&&("object"===kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cC(e)}function fC(e){var t=function(){if("undefined"==typeof Reflect||!jE)return!1;if(jE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jE(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=lC(e);if(t){var r=lC(this).constructor;n=jE(i,arguments,r)}else n=i.apply(this,arguments);return hC(this,n)}}function dC(){return dC="undefined"!=typeof Reflect&&ZE?ZE.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=lC(e)););return e}(e,t);if(i){var r=oE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},dC.apply(this,arguments)}function pC(e){return function(e){if(Array.isArray(e))return vC(e)}(e)||function(e){if(void 0!==uE&&null!=$E(e)||null!=e["@@iterator"])return JE(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return vC(e,t);var i=ow(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return JE(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return vC(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 vC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gC(e){var t=function(e,t){if("object"!==kc(e)||null===e)return e;var n=e[QE];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==kc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kc(t)?t:String(t)}var yC=A,mC=g,_C=R,kC=o,bC=pr,wC=to,EC=M,CC=qe,xC=K,TC=Object.assign,SC=Object.defineProperty,PC=mC([].concat),AC=!TC||kC((function(){if(yC&&1!==TC({b:1},TC(SC({},"a",{enumerable:!0,get:function(){SC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=TC({},e)[n]||bC(TC({},t)).join("")!=i}))?function(e,t){for(var n=CC(e),i=arguments.length,r=1,o=wC.f,a=EC.f;i>r;)for(var s,l=xC(arguments[r++]),u=o?PC(bC(l),o(l)):bC(l),c=u.length,h=0;c>h;)s=u[h++],yC&&!_C(a,l,s)||(n[s]=l[s]);return n}:TC,OC=AC;An({target:"Object",stat:!0,arity:2,forced:Object.assign!==OC},{assign:OC});var IC=n(te.Object.assign),RC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,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 i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?ow(i).call(i,1):i);return rE?Mm(r).call(r,rE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,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,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,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 f,d=c.length;for(u=0;u<d;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,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];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,i,r){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||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&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 i,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}(RC);var MC=n(RC.exports),LC=Dn,DC=Yi,NC=X,FC=RangeError,UC=function(e){var t=DC(NC(this)),n="",i=LC(e);if(i<0||i==1/0)throw FC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},HC=g,jC=Un,BC=Yi,VC=X,zC=HC(UC),KC=HC("".slice),GC=Math.ceil,WC=function(e){return function(t,n,i){var r,o,a=BC(VC(t)),s=jC(n),l=a.length,u=void 0===i?" ":BC(i);return s<=l||""==u?a:((o=zC(u,GC((r=s-l)/u.length))).length>r&&(o=KC(o,0,r)),e?a+o:o+a)}},YC={start:WC(!1),end:WC(!0)},XC=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),qC=YC.start;An({target:"String",proto:!0,forced:XC},{padStart:function(e){return qC(this,e,arguments.length>1?arguments[1]:void 0)}});var ZC=Bc("String").padStart,$C=se,JC=ZC,QC=String.prototype,ex=n((function(e){var t=e.padStart;return"string"==typeof e||e===QC||$C(QC,e)&&t===QC.padStart?JC:t})),tx=r,nx=o,ix=Yi,rx=Nw.trim,ox=Pw,ax=g("".charAt),sx=tx.parseFloat,lx=tx.Symbol,ux=lx&&lx.iterator,cx=1/sx(ox+"-0")!=-1/0||ux&&!nx((function(){sx(Object(ux))}))?function(e){var t=rx(ix(e)),n=sx(t);return 0===n&&"-"==ax(t,0)?-0:n}:sx;An({global:!0,forced:parseFloat!=cx},{parseFloat:cx});var hx=n(te.parseFloat),fx=gl.PROPER,dx=o,px=Pw,vx=Nw.trim;An({target:"String",proto:!0,forced:function(e){return dx((function(){return!!px[e]()||"
"!=="
"[e]()||fx&&px[e].name!==e}))}("trim")},{trim:function(){return vx(this)}});var gx=Bc("String").trim,yx=se,mx=gx,_x=String.prototype,kx=n((function(e){var t=e.trim;return"string"==typeof e||e===_x||yx(_x,e)&&t===_x.trim?mx:t})),bx=qr,wx=Math.floor,Ex=function(e,t){var n=e.length,i=wx(n/2);return n<8?Cx(e,t):xx(e,Ex(bx(e,0,i),t),Ex(bx(e,i),t),t)},Cx=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},xx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},Tx=Ex,Sx=le.match(/firefox\/(\d+)/i),Px=!!Sx&&+Sx[1],Ax=/MSIE|Trident/.test(le),Ox=le.match(/AppleWebKit\/(\d+)\./),Ix=!!Ox&&+Ox[1],Rx=An,Mx=g,Lx=Ie,Dx=qe,Nx=jn,Fx=lw,Ux=Yi,Hx=o,jx=Tx,Bx=Fc,Vx=Px,zx=Ax,Kx=ve,Gx=Ix,Wx=[],Yx=Mx(Wx.sort),Xx=Mx(Wx.push),qx=Hx((function(){Wx.sort(void 0)})),Zx=Hx((function(){Wx.sort(null)})),$x=Bx("sort"),Jx=!Hx((function(){if(Kx)return Kx<70;if(!(Vx&&Vx>3)){if(zx)return!0;if(Gx)return Gx<603;var e,t,n,i,r="";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(i=0;i<47;i++)Wx.push({k:t+i,v:n})}for(Wx.sort((function(e,t){return t.v-e.v})),i=0;i<Wx.length;i++)t=Wx[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));Rx({target:"Array",proto:!0,forced:qx||!Zx||!$x||!Jx},{sort:function(e){void 0!==e&&Lx(e);var t=Dx(this);if(Jx)return void 0===e?Yx(t):Yx(t,e);var n,i,r=[],o=Nx(t);for(i=0;i<o;i++)i in t&&Xx(r,t[i]);for(jx(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Ux(t)>Ux(n)?1:-1}}(e)),n=Nx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Fx(t,i++);return t}});var Qx,eT=Bc("Array").sort,tT=se,nT=eT,iT=Array.prototype,rT=n((function(e){var t=e.sort;return e===iT||tT(iT,e)&&t===iT.sort?nT:t})),oT="undefined"!=typeof window&&window.location&&iw(Qx=window.location.href).call(Qx,"xgplayerdebugger=1")>-1,aT="color: #525252; background-color: #90ee90;",sT="color: #525252; background-color: red;",lT="color: #525252; background-color: yellow; ",uT="%c[xgplayer]",cT={config:{debug:oT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Mm(t=[uT,aT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Mm(t=[uT,lT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Mm(t=[uT,sT,e]).call(t,o))}}};var hT=function(){function e(t){iC(this,e),this.bufferedList=t}return oC(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}(),fT={};function dT(e){var t=nC(e);return null!==e&&("object"===t||"function"===t)}function pT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(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,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=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,dT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function vT(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}fT.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]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,rw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},fT.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 i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&fT.addClass(r,n),t&&rw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return cT.logError("util.createDomFromHtml",o),null}},fT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===nC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},fT.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(n){fT.hasClass(e,t)||(e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},fT.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(n){fT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},fT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){fT.hasClass(e,t)?fT.removeClass(e,t):fT.addClass(e,t)}))},fT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===fT.typeOf(e[n]))t.push(e[n]);else if("Object"===fT.typeOf(e[n])){var i;Mb(i=rw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},fT.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(i){cT.logError("util.findDom",i),0===iw(n).call(n,"#")&&(e=t.getElementById(ow(n).call(n,1)))}return e},fT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},fT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},fT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=ex(fT).call(fT,Math.floor(e/3600),2,0),n=ex(fT).call(fT,Math.floor((e-3600*t)/60),2,0),i=ex(fT).call(fT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},fT.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},fT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},fT.deepCopy=function(e,t){if("Object"===fT.typeOf(t)&&"Object"===fT.typeOf(e))return rw(t).forEach((function(n){if("Object"!==fT.typeOf(t[n])||t[n]instanceof Node)if("Array"===fT.typeOf(t[n])){var i;e[n]="Array"===fT.typeOf(e[n])?Mm(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:fT.deepCopy(e[n],t[n])})),e},fT.deepMerge=function(e,t){var n;return Mb(n=rw(t)).call(n,(function(n){var i;"Array"===fT.typeOf(t[n])&&"Array"===fT.typeOf(e[n])?"Array"===fT.typeOf(e[n])&&(i=e[n]).push.apply(i,pC(t[n])):fT.typeOf(e[n])!==fT.typeOf(t[n])||null===e[n]||"Object"!==fT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):fT.deepMerge(e[n],t[n])})),e},fT.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},fT.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""},fT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},fT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},fT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),fT.clearTimeout(e,i)}),n);return e._timers.push(i),i},fT.clearTimeout=function(e,t){var n=e._timers;if("Array"===fT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Tw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},fT.clearAllTimers=function(e){var t=e._timers;"Array"===fT.typeOf(t)&&(Mb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},fT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=fT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(iw(n).call(n,e)>-1&&iw(i).call(i,e)>-1)||(u=hx(kx(t=ow(n).call(n,0,iw(n).call(n,e))).call(t)),c=hx(kx(r=ow(i).call(i,0,iw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Mm(r="".concat(u)).call(r,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(f=Mm(d=Mm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},fT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(qw(e,16))})),Mm(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},fT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},fT.checkIsFunction=function(e){return e&&"function"==typeof e},fT.checkIsObject=function(e){return null!==e&&"object"===nC(e)},fT.hide=function(e){e.style.display="none"},fT.show=function(e,t){e.style.display=t||"block"},fT.isUndefined=function(e){if(null==e)return!0},fT.isNotNull=function(e){return!(null==e)},fT.setStyleFromCsstext=function(e,t){if(t)if("String"===fT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Mb(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Mb(i=rw(t)).call(i,(function(n){e.style[n]=t[n]}))}},fT.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"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Mb(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(iw(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",""),Mb(t=rw(a)).call(t,(function(t){e.style[t]=a[t]})),o},fT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Mb(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},fT.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 i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},fT.stopPropagation=function(e){e&&e.stopPropagation()},fT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},fT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},fT.checkTouchSupport=function(){return"ontouchstart"in window},fT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});rT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new hT(r)},fT.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}},fT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},fT.getHostFromUrl=function(e){if("String"!==fT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},fT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},fT.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},fT.isBlob=function(e){return/^blob/.test(e)},fT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=qw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=qw(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)}))},fT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},fT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},fT.createPositionBar=function(e,t){var n=fT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},fT.getTransformStyle=function(){var e,t,n,i=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(i.scale||1,") translate(")).call(n,i.x||0,"%, ")).call(t,i.y||0,"%) rotate(")).call(e,i.rotate||0,"deg)")},fT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},fT.getIndexByTime=function(e,t){var n=t.length,i=-1;if(n<1)return i;if(e<=t[0].end||n<2)i=0;else if(e>t[n-1].end)i=n-1;else for(var r=1;r<n;r++)if(e>t[r-1].end&&e<=t[r].end){i=r;break}return i},fT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=-1;if((i=n>=0&&n<t.length?n:fT.getIndexByTime(e,t))<0)return-1;var r=t.length,o=t[i],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&i>=r-1?s:-1},fT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var i=0;i<t.length;i++)if(e<=t[i].duration){n=i;break}if(-1!==n){var r=t[n].start;return n-1<0?r+e:r+(e-t[n-1].duration)}return e};var gT=/(Android)\s([\d.]+)/,yT=/(Version)\/([\d.]+)/,mT=["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"],_T={get device(){return _T.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Mm(e=[]).call(e,Db(t=rw(i)).call(t,(function(e){return i[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,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o,s=!(a||i||n||o),l=/(?:iPad|PlayBook)/.test(e);return{isTablet:o,isPhone:a,isIpad:l,isIos:a||l,isAndroid:i,isPc:s,isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?yT:gT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?qw(i[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&&Mb(mT).call(mT,(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(OR){return this._logger.error(e,OR),!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 Lb.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Lb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Lb.resolve(t)}}},kT="3.0.10-alpha.4",bT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},wT={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},ET=oC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};iC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,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,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;wT[p]&&(p=wT[p]);var v={playerVersion:kT,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:fT.getHostFromUrl(u||c)};return n.ext&&Mb(r=rw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:kT,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=i?(i[arguments[0]]||{}).msg:"",g}})),CT="play",xT="ended",TT="pause",ST="error",PT="seeked",AT="timeupdate",OT="waiting",IT="canplay",RT="durationchange",MT="volumechange",LT="loadeddata",DT="emptied",NT="focus",FT="blur",UT="ready",HT="urlNull",jT="autoplay_started",BT="autoplay_was_prevented",VT="complete",zT="replay",KT="destroy",GT="urlchange",WT="download_speed_change",YT="fullscreen_change",XT="cssFullscreen_change",qT="mini_state_change",ZT="definition_change",$T="before_definition_change",JT="after_definition_change",QT="retry",eS="video_resize",tS="pip_change",nS="playnext",iS="shortcut",rS="user_action",oS="reset",aS="source_error",sS="source_success",lS=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],uS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:JT,AUTOPLAY_PREVENTED:BT,AUTOPLAY_STARTED:jT,BEFORE_DEFINITION_CHANGE:$T,BUFFER_CHANGE:"bufferedChange",CANPLAY:IT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:VT,CSS_FULLSCREEN_CHANGE:XT,DEFINITION_CHANGE:ZT,DESTROY:KT,DOWNLOAD_SPEED_CHANGE:WT,DURATION_CHANGE:RT,EMPTIED:DT,ENDED:xT,ERROR:ST,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:YT,LOADED_DATA:LT,LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",MINI_STATE_CHANGE:qT,PAUSE:TT,PIP_CHANGE:tS,PLAY:CT,PLAYER_BLUR:FT,PLAYER_FOCUS:NT,PLAYING:"playing",PLAYNEXT:nS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:UT,REPLAY:zT,RESET:oS,RETRY:QT,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:PT,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:iS,SOURCE_ERROR:aS,SOURCE_SUCCESS:sS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:AT,URL_CHANGE:GT,URL_NULL:HT,USER_ACTION:rS,VIDEO_EVENTS:lS,VIDEO_RESIZE:eS,VOLUME_CHANGE:MT,WAITING:OT,XGLOG:"xglog"});function cS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var hS=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=IC({},{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 r=e["x5-video-player-type"]||e.x5VideoPlayerType;return _T.isWeixin&&_T.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(i.mediaConfig,"muted")&&(i.mediaConfig.muted=!0),i.media=fT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===fT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return oC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Mb(t=rw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Mb(t=rw(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=Mb(lS).call(lS,(function(t){var n,i=Mm(n="on".concat(t.charAt(0).toUpperCase())).call(n,ow(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),aC({},t,function(e,t){return function(n,i){var r={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:fT.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&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=cS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw cS.call(t,e,r),s}}else cS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=rw(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=rw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=rw(t)[0],r=Mm(n="on".concat(i.charAt(0).toUpperCase())).call(n,ow(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){n.media.appendChild(fT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._videoSourceIndex=i.length,this._vLoadeddata=function(e){n.emit(sS,{src:e.target.currentSrc,host:fT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===rw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=qw(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var i={code:4,message:"sources_load_error"};r?r.error(e,i):n.errorHandler("error",i)}var o=bT[4];n.emit(aS,new ET(n,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[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,i=n.code?bT[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new ET(this,{errorType:i,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 i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);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?fT.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(GT,e),this.emit(OT),this._currentTime=0,this._duration=0,fT.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===fT.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 i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"emit",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"on",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"once",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"off",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){dC(lC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(MC),fS=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"}};iC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return oC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.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,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,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}(),dS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],pS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],vS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],gS="data-xgplayerid";function yS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Mm(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Mm(t=[e]).call(t,r))})):n.call.apply(n,Mm(s=[e]).call(s,o)))}function mS(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 i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Mm(a=[this]).call(a,ow(Array.prototype).call(arguments)))}catch(y){var l,u;throw y.message=Mm(l=Mm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,y.message),y}if(this.__hooks&&this.__hooks[e])try{var c,h,f,d=(h=this.__hooks[e]).call.apply(h,Mm(c=[this,this]).call(c,ow(Array.prototype).call(arguments)));if(d)if(d.then)d.then((function(e){var i;!1!==e&&yS.apply(void 0,Mm(i=[o,t,n.next]).call(i,pC(r)))})).catch((function(e){throw e}));else yS.apply(void 0,Mm(f=[this,t,n.next]).call(f,ow(Array.prototype).call(arguments)));else if(void 0===d){var p;yS.apply(void 0,Mm(p=[this,t,n.next]).call(p,ow(Array.prototype).call(arguments)))}}catch(y){var v,g;throw y.message=Mm(v=Mm(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(v,y.message),y}else yS.apply(void 0,Mm(i=[this,t,n.next]).call(i,ow(Array.prototype).call(arguments)))}.bind(this)}function _S(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 kS(e,t){var n=this.__hooks;n&&delete n[e]}function bS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function wS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function ES(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Mb(t).call(t,(function(t){e.__hooks[t]=null})),lE(e,"hooks",{get:function(){var t;return e.__hooks&&Mb(t=rw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function CS(e){e.__hooks=null}function xS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];var a;if(!e.__hooks||!e.__hooks[t])return n.call.apply(n,Mm(a=[e,e]).call(a,r));var s,l,u=(l=e.__hooks[t]).call.apply(l,Mm(s=[e,e]).call(s,r));if(u&&u.then)u.then((function(t){var i;return!1===t?null:n.call.apply(n,Mm(i=[e,e]).call(i,r))})).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,r))}}function TS(e,t){var n;cT.logError(Mm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var SS=function(){function e(t){iC(this,e),fT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),ES(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return oC(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=fT.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)})):TS(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(i){n.__onceEvents[i]=t,n.player.once(e,t)})):TS(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(i){delete n.__events[e],n.player.off(i,t)})):TS(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){rw(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 i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Mm(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=tC(tC({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return kS.call.apply(kS,Mm(n=[this]).call(n,ow(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,i=this.pluginName;this.offAll(),fT.clearAllTimers(this),fT.checkIsFunction(this.destroy)&&this.destroy(),Mb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),CS(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&lE(e,n,t[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var PS=Element.prototype;PS.matches=PS.matchesSelector||PS.mozMatchesSelector||PS.msMatchesSelector||PS.oMatchesSelector||PS.webkitMatchesSelector}var AS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function OS(e,t,n,i,r){var o=IS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function IS(e,t,n,i){return function(n){n.delegateTarget=AS(n.target,t),n.delegateTarget&&i.call(e,n)}}var RS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?OS.apply(null,arguments):"function"==typeof n?OS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Mb(Array.prototype).call(e,(function(e){return OS(e,t,n,i,r)})))},MS=n(RS),LS={CONTROLS:"controls",ROOT:"root"},DS={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 NS(e){return!!e&&(iw(e)&&/^(?:http|data:|\/)/.test(e))}function FS(e,t){var n,i,r=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 fT.addClass(e,r),Mb(i=rw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(NS(e)||NS(e.url))return o.src=NS(e)?e:e.url||"",s=fT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(fT.addClass(s,r),Mb(l=rw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(cT.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(c){return cT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?fT.createDomFromHtml(e,o,r):(cT.logWarn(Mm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function US(e,t){var n,i=t.config.icons||t.playerConfig.icons;Mb(n=rw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===nC(e)&&e.class&&"string"==typeof e.class?Mm(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===nC(e)&&e.attr&&"object"===nC(e.attr)&&Mb(n=rw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=FS(i[n],n,o,a,t.pluginName)),!s&&r&&(s=FS(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var HS=function(e){sC(n,e);var t=fC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iC(this,n),(e=t.call(this,i)).__delegates=[],e}return oC(n,[{key:"__init",value:function(e){if(dC(lC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,US(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Mb(a=rw(r=s)).call(a,(function(e){lE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw cT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Mm(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=fT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,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"===nC(n))if(rw(n).length>0)Mb(t=rw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===nC(a)&&"function"==typeof a.plugin&&(i=a.options?fT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];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||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{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]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{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,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);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 i,r=Mm(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Tw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===fT.typeOf(e)?this.root.style[e]=t:void("Object"===fT.typeOf(e)&&Mb(n=rw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===fT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===fT.typeOf(e)&&Mb(n=rw(e)).call(n,(function(t){i.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?Vm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return cT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Mb(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Mb(i=this._children).call(i,(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)),dC(lC(n.prototype),"__destroy",this).call(this),this.icons={},Mb(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(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,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=MS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=MS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return LS}},{key:"POSITIONS",get:function(){return DS}}]),n}(SS),jS=function(){function e(){var t=this;if(iC(this,e),aC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return dT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),pT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return oC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=e.getAttribute(gS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Mb(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{this.observer&&this.observer.unobserve(e)}catch(r){}this.observer&&this.observer.unobserve(e),i>-1&&Tw(n=this.__handlers).call(n,i,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(OR){console.error(OR)}return!0}return!1}}]),e}(),BS=null;var VS={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},BS||(BS=new jS),BS.addObserver(t,n)),0===rw(this.pluginGroup).length&&(e.isUserActive=!0),this.pluginGroup[i]={_player:e,_originalOptions:e.config||{},_plugins:{}}},checkPlayerRoot:function(e){if(this.pluginGroup){for(var t=rw(this.pluginGroup),n=0;n<t.length;n++){var i=this.pluginGroup[t[n]]._player;if(i.root===e)return i}return null}return null},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},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=rw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===fT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Lb.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Lb((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},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 i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=this.pluginGroup[i]._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=rw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===fT.typeOf(u)?n.config=IC({},n.config,o[s[l]]):"Boolean"===fT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&rw(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{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[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(r){var i;console.error(Mm(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},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 i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Lb((function(e){e()}))}return new Lb((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Lb.all(e._loadingPlugins):Lb.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];rw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Lb.all(Mm(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;rw(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 i=this.pluginGroup[n]._plugins;rw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(OR){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;rw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.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||{};rw(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=rw(this.pluginGroup),i=0;i<n.length;i++){var r=this.pluginGroup[n[i]];r&&r._player&&(this.pluginGroup[n[i]]._player.isUserActive=!1)}return this.pluginGroup[e]._player.isUserActive=t,e}},getCurrentUseActiveId:function(){if(this.pluginGroup){for(var e=rw(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,i;n=e.root,BS.unObserver(n,i);for(var r=this.pluginGroup[t]._plugins,o=0,a=rw(r);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=rw(this.pluginGroup);u.length>0&&this.setCurrentUserActive(u[u.length-1],!0)}}}},zS="xgplayer",KS="xgplayer-is-enter",GS="xgplayer-pause",WS="xgplayer-playing",YS="xgplayer-ended",XS="xgplayer-isloading",qS="xgplayer-is-error",ZS="xgplayer-replay",$S="xgplayer-nostart",JS="xgplayer-inactive",QS="xgplayer-is-fullscreen",eP="xgplayer-is-cssfullscreen",tP="xgplayer-rotate-fullscreen",nP="xgplayer-rotate-parent",iP="xgplayer-fullscreen-parent",rP="xgplayer-fullscreen-inner",oP="no-controls",aP="flex-controls",sP="controls-autohide",lP="top-bar-autohide",uP="not-allow-autoplay",cP="seeking";function hP(){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(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:vT(),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 fP=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=cC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),aC(cC(i),"onMouseLeave",(function(e){cC(i).player.focus()})),i}return oC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==_T.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(aP);var a={height:"".concat(r,"px")};Mb(e=rw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Vm(this).call(this,"xg-left-grid"),this.center=Vm(this).call(this,"xg-center-grid"),this.right=Vm(this).call(this,"xg-right-grid"),this.innerRoot=Vm(this).call(this,"xg-inner-controls"),this.on(qT,(function(e){e?fT.addClass(t.root,"mini-controls"):fT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==_T.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&&fT.addClass(this.root,sP)}},{key:"pauseAutoHide",value:function(){fT.removeClass(this.root,sP)}},{key:"show",value:function(){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case DS.CONTROLS_LEFT:t.root=this.left;break;case DS.CONTROLS_RIGHT:t.root=this.right;break;case DS.CONTROLS_CENTER:t.root=this.center;break;case DS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==_T.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,i=e.initShow;if(!e.disable){var r=fT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},aC({},sP,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" 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}(HS),dP={lang:{},langKeys:[],textKeys:[]};function pP(e,t){return rw(t).forEach((function(n){var i,r=fT.typeOf(t[n]),o=fT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,pC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),pP(e[n],t[n])):e[n]=t[n]})),e}function vP(){var e;Mb(e=rw(dP.lang.en)).call(e,(function(e){dP.textKeys[e]=e}))}function gP(e,t){var n=e.LANG;if(t||(t=dP),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?pP(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),vP()}}gP({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"}});var yP={get textKeys(){return dP.textKeys},get langKeys(){return dP.langKeys},get lang(){var e,t={};return Mb(e=dP.langKeys).call(e,(function(e){t[e]=dP.lang[e]})),dP.lang["zh-cn"]&&(t.zh=dP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=dP),t.lang){var i;if("Array"!==fT.typeOf(e))n=Mb(i=rw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Mb(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?pP(r[e.LANG]||{},e.TEXT||{}):gP(e,t)})),vP()}},use:gP,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return pP(n.lang,dP.lang),(t=n.langKeys).push.apply(t,pC(dP.langKeys)),pP(n.textKeys,dP.textKeys),n}},mP=1,_P=2,kP=3,bP=4,wP=5,EP=6,CP=7,xP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],TP=["play","pause","replay","retry"],SP=0,PP=0,AP=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n);var r,o=fT.deepMerge(hP(),e);aC(cC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.startTime,r=e.defaultPlaybackRate;cT.logInfo("player","canPlayFunc, startTime",n),n&&(i.currentTime=n>i.duration?i.duration:n,i.config.startTime=0),i.playbackRate=r,(t||i._useAutoplay)&&i.mediaPlay(),i.off(IT,i.canPlayFunc),i.removeClass(KS)}})),aC(cC(i),"onFullscreenChange",(function(e,t){var n=function(){fT.setTimeout(cC(i),(function(){i.resize()}),100)},r=fT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(rS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,gS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,QS),i.emit(YT,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=cC(i),s=a._fullScreenOffset;a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),fT.setTimeout(cC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen?i.removeClass(QS):i.recoverFullStyle(i.root,i._fullscreenEl,QS),i._fullscreenEl=null,i.emit(YT,!1)}})),aC(cC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),aC(cC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),ES(cC(i),TP),i.config=o,i._pluginInfoId=fT.generateSessionId(),(r=cC(i)).logInfo=cT.logInfo.bind(r),r.logWarn=cT.logWarn.bind(r),r.logError=cT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=iw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i._state=mP,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i.timeSegments=[],i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i.sizeInfo={width:0,height:0,left:0,top:0},i._accPlayed={t:0,acc:0,loopAcc:0},i._offsetInfo={currentTime:-1,duration:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=yP.init(i._pluginInfoId),_T.os.isAndroid&&_T.osVersion>0&&_T.osVersion<6&&(i.config.autoplay=!1),i.database=new fS,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,i.innerStates={isActiveLocked:!1},!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),hC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Vm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),VS.onPluginsReady(cC(i)),i.getInitDefinition(),i.setState(_P),fT.setTimeout(cC(i),(function(){i.emit(UT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<bP)&&i.start(),i}return oC(n,[{key:"_initDOM",value:function(){var e,t,n,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var r=this.config.el;if(!r||1!==r.nodeType)return this.emit(ST,new ET("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=r}var o=VS.checkPlayerRoot(this.root);o&&(cT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),o.destroy()),this.root.setAttribute(gS,this.playerId),VS.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(gS,this.playerId),this.config.controls){var u=this.config.controls.root||null,c=VS.register(this,fP,{root:u});this.controls=c}var h="mobile"===this.config.isMobileSimulateMode?"mobile":_T.device;if(this.addClass(Mm(e=Mm(t=Mm(n="".concat(zS," ")).call(n,JS," xgplayer-")).call(t,h," ")).call(e,this.config.controls?"":oP)),this.config.autoplay?this.addClass(KS):this.addClass($S),this.config.fluid){var f=this.config,d=f.width,p=f.height;"number"==typeof d&&"number"==typeof p||(d=600,p=337.5);var v={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*p/d,"%")};rw(v).forEach((function(e){i.root.style[e]=v[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));var g=this.root.getBoundingClientRect(),y=g.width,m=g.height,_=g.left,k=g.top;return this.sizeInfo.width=y,this.sizeInfo.height=m,this.sizeInfo.left=_,this.sizeInfo.top=k,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=fT.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()+ow(t).call(t,1)])})),dS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),_T.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(LT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(CT,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),dS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(CT,this.playFunc),this.off(IT,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"!==fT.typeOf(e)||0!==e.length)||(e="",this.emit(HT),cT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this._detachSourceEvents(this.media),"Array"===fT.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"===fT.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 i=this.media.readyState;cT.logInfo("_startInit readyState",i),this.config.autoplay&&(!fT.isMSE(this.media)&&this.load(),(_T.os.isIpad||_T.os.isPhone)&&this.mediaPlay()),i>=2?this.canPlayFunc():this.once(IT,this.canPlayFunc),(!this.hasStart||this.state<bP)&&VS.afterInit(this),this.hasStart=!0,this.setState(bP),fT.setTimeout(this,(function(){t.emit(VT)}),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||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&yP.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&iw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=VS.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Tw(t=e._loadingPlugins).call(t,iw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;cT.logError("_registerPlugins:loadingPlugin",t),Tw(n=e._loadingPlugins).call(n,iw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){cT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,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,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,pC(s)),(r=e.config.ignores).push.apply(r,pC(u)),Mb(n=rw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,pC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case DS.ROOT_RIGHT:this.rightBar||(this.rightBar=fT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case DS.ROOT_LEFT:this.leftBar||(this.leftBar=fT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case DS.ROOT_TOP:this.topBar||(this.topBar=fT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&fT.addClass(this.topBar,lP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=VS.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!VS.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=VS.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof s&&iw(s).call(s,"controls")>-1?this.controls&&this.controls.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(s)),VS.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?VS.unRegister(this,e):e instanceof SS&&VS.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 SS&&(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 i;Tw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return VS.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=VS.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(fT.hasClass(this.root,e)||fT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&fT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return fT.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>kP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(kP),this._registerPlugins(!1),VS.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var n=t.preProcessUrl(e);return t._startInit(n.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",cT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===fT.typeOf(e)&&(i=e.url),i=this.preProcessUrl(i).url;var r=this.currentTime,o=this.paused&&!this.isError;return this.src=i,new Lb((function(e,t){var a=function(e){n.off("timeupdate",s),n.off("canplay",s),t(e)},s=function(){n.currentTime=r,o&&n.pause(),n.off("error",a),e(!0)};n.once("error",a),i?(_T.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<bP)return this.removeClass($S),this.addClass(KS),this.start(),void(this._useAutoplay=!0);this.state<EP&&(this.removeClass($S),!this.isCanplay&&this.addClass(KS));var t=dC(lC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(uP),e.addClass(WS),e.state<EP&&(cT.logInfo(">>>>playPromise.then"),e.setState(EP),e.emit(jT))})).catch((function(t){if(cT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(KS);"NotAllowedError"===t.name&&(e._errorTimer=fT.setTimeout(e,(function(){e._errorTimer=null,e.emit(BT),e.addClass(uP),e.removeClass(KS),e.pause(),e.setState(wP)}),0))})):(cT.logWarn("video.play not return promise"),this.state<EP&&(this.setState(EP),this.removeClass(uP),this.removeClass($S),this.removeClass(KS),this.addClass(WS),this.emit(jT))),t}},{key:"mediaPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(GS),xS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;xS(this,"pause",(function(){dC(lC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Sw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?qw(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(PT,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(KS),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(PT,this._onceSeekCanplay),this.state<EP?(this.removeClass($S),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Mb(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.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=qw(e.bitrate,10)||0),this.emit(ZT,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,tC({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(JT,{from:t,to:e})})):this.emit(JT,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(LT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[uP,WS,$S,GS,ZS,KS,YS,qS,XS];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(KS),this.emit(oS)}},{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&&(Mb(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=hP();iE(i=rw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t=this,i=this.innerContainer,r=this.root,o=this.media;if(r&&o){if(this.hasStart=!1,this._useAutoplay=!1,r.removeAttribute(gS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),fT.clearAllTimers(this),this.emit(KT),VS.destroy(this),CS(this),dC(lC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var a=i.children,s=0;s<a.length;s++)i.removeChild(a[s]);!i&&o instanceof window.Node&&r.contains(o)&&r.removeChild(o),Mb(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){t[e]&&r.removeChild(t[e]),t[e]=null}));var l=r.className.split(" ");l.length>0?r.className=Db(l).call(l,(function(e){return iw(e).call(e,"xgplayer")<0})).join(" "):r.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(YS),this.currentTime=0,this.isSeeking=!1,xS(this,"replay",(function(){e.once(PT,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(zT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(qS),this.addClass(XS),xS(this,"retry",(function(){var t=e.currentTime,n=e.config.url,i=fT.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=i.url,!e.config.isLive&&(e.currentTime=t),e.once(IT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=iP),this._orgCss||(this._orgCss=fT.filterStyleFromText(e)),fT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=fT.filterStyleFromText(t),fT.addClass(t,i),t.setAttribute(gS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=iP),this._orgCss&&(fT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),fT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(fT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",fT.removeClass(t,i),t.removeAttribute(gS))}},{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:fT.scrollTop(),left:fT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",fT.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Lb.resolve();try{for(var i=0;i<pS.length;i++){var r=pS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Lb.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Lb.resolve()):Lb.reject(new Error("call getFullscreen fail"))}catch(a){return Lb.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||fT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<vS.length;n++){var i=vS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Lb.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Lb.resolve()):Lb.reject(new Error("call exitFullscreen fail"))}catch(o){return Lb.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(rP," ")).call(e,eP):eP;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(YT,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(XT,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Mm(e="".concat(rP," ")).call(e,eP):eP;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(YT,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(XT,!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(rP," ")).call(e,tP):tP;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,nP),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(YT,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Mm(t="".concat(rP," ")).call(t,tP):tP;this.recoverFullStyle(this.root,this._fullscreenEl,n,nP),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(YT,!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(NT,tC({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(FT,tC({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]:{autoHide:!0,delay:3e3},n=this.innerStates;if(this.isActive=!0,this.removeClass(JS),this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null);else{var i=t&&t.delay?t.delay:this.config.inactive;this.userTimer=fT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),i)}}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive&&!this.innerStates.isActiveLocked){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(JS)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(KS),this.removeClass(qS),this.removeClass(XS),this.isCanplay=!0,this.waitTimer&&fT.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(qS),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===CP&&this.setState(EP),this.removeClass(GS),this.ended&&this.removeClass(YS),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(GS),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(YS),this.setState(CP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(uP),this.removeClass($S),this.removeClass(KS),this.removeClass(XS),this.addClass(qS)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(cP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&fT.clearTimeout(this,this.waitTimer),this.removeClass(XS),this.removeClass(cP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&fT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=fT.setTimeout(this,(function(){e.addClass(XS),fT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[$S,GS,YS,qS,ZS,XS].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(XS))&&this.media.readyState>2&&(this.removeClass(XS),fT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state<EP&&this.duration&&(this.setState(EP),this.emit(jT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===fT.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 i="String"===fT.typeOf(e)?e:e.type||"";n.props&&"Array"!==fT.typeOf(n.props)&&(n.props=[n.props]),this.emit(rS,tC({eventType:i,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,i=t.length,r=0;r<i;r++)if(t.start(r)<=n&&t.end(r)>n)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,n=e.vy,i=e.vx,r=e.h,o=e.w;if(!(t<0)||n||i){var a=this.videoPos._pi;if(!a&&this.media.videoHeight&&(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),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=r>0?100/r:o>0?100/o:1,s.scale=c,l=n>0?(100-r)/2-n:0,s.y=2===h?0-l:l,u=i>0?(100-o)/2-i: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+i/2:l-i/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=fT.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&&Mb(t=rw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===fT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,xS(this,"playnext",(function(){t.start(),t.emit(nS,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.root.getBoundingClientRect();this.sizeInfo.width=t.width,this.sizeInfo.height=t.height,this.sizeInfo.left=t.left,this.sizeInfo.top=t.top;var n=this.media,i=n.videoWidth,r=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),r&&i){this._videoHeight=r,this._videoWidth=i;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,h=qw(i/r*1e3,10),f=qw(u/c*1e3,10),d=u,p=c,v={};"auto"===a&&f>h||"fixWidth"===a?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===a&&f<h||"fixHeight"===a)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||rw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&f<h||"fillWidth"===s&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(eS,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;cT.logInfo("setState",Mm(t="state from:".concat(xP[this.state]," to:")).call(t,xP[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config.preProcessUrl;return!fT.isBlob(e)&&n&&"function"==typeof n?n(e,t):{url: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(_P),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===EP||this._state===CP},set:function(e){e?this.setState(EP):this._state>=EP&&this.setState(bP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=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&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{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=qw(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Db(t=yP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,VS.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,yP.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 kT}},{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 dC(lC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=dC(lC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return dC(lC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,n=e.t;return n?(new Date).getTime()-n+t:t}},{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=fT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return PP},set:function(e){PP=e}},{key:"realTimeSpeed",get:function(){return SP},set:function(e){SP=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,t){var n;return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return kS.call.apply(kS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return bS.call.apply(bS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return wS.call.apply(wS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),this.muted=t),VS.setCurrentUserActive(this.playerId,e)}}],[{key:"debugger",get:function(){return cT.config.debug},set:function(e){cT.config.debug=e}},{key:"getCurrentUserActivePlayerId",value:function(){return VS.getCurrentUseActiveId()}},{key:"setCurrentUserActive",value:function(e,t){VS.setCurrentUserActive(e,t)}},{key:"isHevcSupported",value:function(){return _T.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return _T.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}(hS);aC(AP,"defaultPreset",null),aC(AP,"XgVideoProxy",null);function OP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var IP=EE;An({target:"Function",proto:!0,forced:Function.bind!==IP},{bind:IP});var RP,MP,LP=Bc("Function").bind,DP=se,NP=LP,FP=Function.prototype,UP=n((function(e){var t=e.bind;return e===FP||DP(FP,e)&&t===FP.bind?NP:t}));function HP(e,t){var n;return(HP=hh?UP(n=hh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function jP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Pc(e,"prototype",{writable:!1}),t&&HP(e,t)}function BP(e){var t;return(BP=hh?UP(t=Dc).call(t):function(e){return e.__proto__||Dc(e)})(e)}function VP(){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(e){return!1}}function zP(e){var t=VP();return function(){var n,i=BP(e);if(t){var r=BP(this).constructor;n=HE(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return OP(e)}(this,n)}}function KP(e,t,n){var i;VP()?KP=UP(i=HE).call(i):KP=function(e,t,n){var i=[null];uh(i).apply(i,t);var r=new(UP(Function).apply(e,i));return n&&HP(r,n.prototype),r};return KP.apply(null,arguments)}function GP(e){var t="function"==typeof Tb?new Tb:void 0;return GP=function(e){if(null===e||(n=e,-1===Sm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return KP(e,arguments,BP(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),HP(r,e)},GP(e)}var WP=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=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(WP||{}),YP=(Hy(RP={},2100,{messageTextKey:"NETWORK",level:"Error"}),Hy(RP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Hy(RP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Hy(RP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Hy(RP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Hy(RP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Hy(RP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Hy(RP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Hy(RP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Hy(RP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Hy(RP,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),RP),XP=(Hy(MP={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Hy(MP,"network",{messageTextKey:"NETWORK",level:"Error"}),Hy(MP,"demux",{messageTextKey:"DEMUX",level:"Error"}),Hy(MP,"remux",{messageTextKey:"REMUX",level:"Error"}),Hy(MP,"media",{messageTextKey:"MEDIA",level:"Error"}),Hy(MP,"drm",{messageTextKey:"DRM",level:"Error"}),Hy(MP,"other",{messageTextKey:"OTHER",level:"Error"}),Hy(MP,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),MP),qP=function(e){jP(n,e);var t=zP(n);function n(e,i){var r,o,a,s,l,u,c;pm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.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!==r?r:null==i?void 0:i.getText("UNKNOWN");return Hy(OP(c=t.call(this,f)),"errorCode",void 0),Hy(OP(c),"level",void 0),Hy(OP(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 gm(n)}(GP(Error));function ZP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new qP(By(By({errorCode:e},YP[e]),t),n)}function $P(e,t){var n,i,r=YP[e.errorCode]||XP[e.errorType],o=e.errorCode;return new qP({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var JP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){fT.addClass(this.root,"hide")}},{key:"show",value:function(){fT.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(xT,(function(){e.isEndedShow&&fT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(AT,(function(){e.onTimeUpdate()})),this.on(GT,(function(){fT.removeClass(e.root,"hide"),fT.addClass(e.root,"xg-showplay"),e.once(AT,(function(){e.onTimeUpdate()}))}))):this.on(CT,(function(){fT.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?fT.removeClass(this.root,"xg-showplay"):this.once(AT,(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,i=t.hideCanplay,r=n?"background-image:url(".concat(n,");"):"";return Mm(e='<xg-poster class="xgplayer-poster '.concat(i?"xg-showplay":"",'" style="')).call(e,r,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),n}(HS);function QP(){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 eA(){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 tA={};function nA(e){var t;e?window.clearTimeout(e):Mb(t=rw(tA)).call(t,(function(e){window.clearTimeout(tA[e].id),delete tA[e]}))}var iA=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),fT.removeClass(i.root,e),i.show()})),aC(cC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";fT.addClass(i.root,e),i.autoPlayStart=!0,i.onPlayPause("play")}})),i.autoPlayStart=!1,i}return oC(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.playerConfig;this.initIcons(),this.once(UT,(function(){n&&(n.lang&&"en"===n.lang?fT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&fT.addClass(t.root,"lang-is-jp"))})),this.on(jT,this.onAutoplayStart),n.autoplay||this.show(),this.on(BT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),fT.removeClass(e.root,t),e.show()})),this.on(CT,(function(){e.onPlayPause("play")})),this.on(TT,(function(){e.onPlayPause("pause")})),this.on(oS,(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:QP,class:"xg-icon-play"},startPause:{icon:eA,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(){fT.addClass(this.root,"hide")}},{key:"show",value:function(){fT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){fT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){fT.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 tA[e]&&window.clearTimeout(tA[e].id),tA[e]={},n.start&&n.start(),tA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(tA[e].id),delete tA[e]}),t),tA[e].id}("pauseplay",400,{start:function(){fT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){fT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){fT.removeClass(this.root,"interact"),nA(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<_P)||(this.player.paused||t.state!==EP?t.play():t.pause())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<EP)&&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),nA(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}(HS),rA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=fT.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="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></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}(HS);function oA(e,t,n){try{var i,r;return Mm(i=Mm(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var aA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(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:DS.CONTROLS_RIGHT,index:10}}}]),n}(HS);function sA(e){var t=hx(e);return-1===iw(e).call(e,"%")&&!Sw(t)&&t}var lA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],uA=lA.length;function cA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===nC(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<uA;t++)e[lA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<uA;r++){var o=lA[r],a=t[o],s=hx(a);n[o]=Sw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=sA(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=sA(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function hA(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var fA="dragStart",dA="dragMove",pA="dragEnded",vA={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},gA=function(e){sC(n,e);var t=fC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return iC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):hC(i)}return oC(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)]),Mb(e=vA[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=vA[this._startKey];Mb(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&&(Mb(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=hA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=hA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=hA(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=cA(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(fA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(pA)),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,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(dA,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=Sw(t)?0:t,this.position.y=Sw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===iw(t).call(t,"matrix")){var n=t.split(","),i=0===iw(t).call(t,"matrix3d")?12:4,r=qw(n[i],10),o=qw(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==iw(e).call(e,"%")){var n=cA(this._root.parentNode);return n?hx(e)/100*n[t]:0}return qw(e,10)}}]),n}(MC),yA=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),aC(cC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),aC(cC(i),"onCenterClick",(function(e){var t=cC(i).player;t.paused?t.play():t.pause()})),aC(cC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=qw(fT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=cC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return oC(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(TT,(function(){e.setAttr("data-state","pause")})),this.on(CT,(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(aA,n,aA.pluginName)}var i=fT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new gA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:QP,class:"xg-icon-play"},pause:{icon:eA,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,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},fT.addClass(n.root,"xgplayer-mini"),Mb(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(qT,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(fT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Mb(t=rw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(qT,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=fT.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(oA(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}(HS),mA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},_A=["videoClick","videoDbClick"],kA=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),aC(cC(i),"onMouseEnter",(function(e){var t=cC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus()})),aC(cC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur())})),aC(cC(i),"onVideoClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,xS(cC(i),_A[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),aC(cC(i),"onVideoDblClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),xS(cC(i),_A[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Mb(_A).call(_A,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===_T.device&&!_T.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Mb(e=rw(mA)).call(e,(function(e){r.addEventListener(e,t[mA[e]],!1)})),o&&i&&i.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,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Mb(e=rw(mA)).call(e,(function(e){r.removeEventListener(e,t[mA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(SS),bA="press",wA="pressend",EA="doubleclick",CA="click",xA="touchmove",TA="touchstart",SA="touchend",PA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},AA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function OA(e){return e&&e.length>0?e[e.length-1]:null}var IA=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};iC(this,e),aC(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,r=OA(e.touches);t.x=r?qw(r.pageX,10):e.pageX,t.y=r?qw(r.pageX,10):e.pageX,t.start=!0,i.__setPress(e),n.addEventListener(i.events.end,i.onTouchEnd),n.addEventListener(i.events.cancel,i.onTouchCancel),n.addEventListener(i.events.move,i.onTouchMove),i.trigger(TA,e)})),aC(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),aC(this,"onTouchEnd",(function(e){var t=i._pos,n=i.root;i.__clearPress(),n.removeEventListener(i.events.cancel,i.onTouchCancel),n.removeEventListener(i.events.end,i.onTouchEnd),n.removeEventListener(i.events.move,i.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&i.trigger(wA,e),i.trigger(SA,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),aC(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,r=OA(e.touches),o=r?qw(r.pageX,10):e.pageX,a=r?qw(r.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<n.miniStep&&Math.abs(s)<n.miniStep||(i.__clearPress(),t.press&&i.trigger(wA,e),t.press=!1,t.moving=!0,i.trigger(xA,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},Mb(n=rw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?AA:PA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return oC(e,[{key:"_initEvent",value:function(){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(bA,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(EA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(CA,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,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Tw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Mb(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(OR){console.error("trigger>>:".concat(e),OR)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};rw(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function RA(){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 MA="auto",LA="seeking",DA="playbackrate",NA=["videoClick","videoDbClick"],FA=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onTouchStart",(function(e){var t=cC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,fT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Vm(i).call(i,".xg-dur").innerHTML=fT.format(i.duration);var l=i.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=qw(s.pageX-o.left,10),c=qw(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),aC(cC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=cC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=qw(t.pageX-r.left,10),c=qw(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=qw(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;e.cancelable&&e.preventDefault(),i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),aC(cC(i),"onTouchEnd",(function(e){var t=cC(i),n=t.player,r=t.pos,o=t.playerConfig;if(r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?(i.endLastMove(r.scope),setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10)):r.time=0,r.scope=-1,i.resetPos(),fT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction(MA)}})),aC(cC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),aC(cC(i),"onRootTouchEnd",(function(e){i.pos.isStart&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.onTouchEnd(e))})),i.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},i.timer=null,i}return oC(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:RA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Mb(NA).call(NA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),fT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=fT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new IA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(RT,(function(){var e=t.player,n=t.config;1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([IT,xT],(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(Mb(e=rw(a)).call(e,(function(e){t.touch.on(e,(function(n){t[a[e]](n)}))})),!i.disableActive){var s=r.plugins.progress;s&&(s.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),s.addCallBack("dragend",(function(){t.changeAction(MA)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Vm(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&&(Vm(this).call(this,".xg-curbar").style.backgroundColor=t,Vm(this).call(this,".xg-cur").style.color=t);n&&(Vm(this).call(this,".xg-bar").style.backgroundColor=n,Vm(this).call(this,".time-preview").style.color=n);this.config.disableTimeProgress&&fT.addClass(Vm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Mb(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,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:_T.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(MA)}},{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,i=this.playerConfig;t.state<EP?i.closeVideoClick||(this.sendUseAction(fT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(fT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=EP&&(this.sendUseAction(fT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;xS(this,NA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;xS(this,NA[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,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(DA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction(MA))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=qw(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=qw(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=qw(10*t.volume,10)-qw(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,i=this.xgMask,r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(LA);var o=n.plugins.start;if(o&&o.focusHide(),Vm(this).call(this,".xg-dur").innerHTML=fT.format(this.duration),Vm(this).call(this,".xg-cur").innerHTML=fT.format(e),Vm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)fT.removeClass(Vm(this).call(this,".xg-seek-show"),"xg-back");else fT.addClass(Vm(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<bP)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,i="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(i,'"></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}(HS);An({target:"String",proto:!0},{repeat:UC});var UA=Bc("String").repeat,HA=se,jA=UA,BA=String.prototype,VA=n((function(e){var t=e.repeat;return"string"==typeof e||e===BA||HA(BA,e)&&t===BA.repeat?jA:t}));function zA(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var KA=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(i.player){var t=e||window.event,n=t.keyCode,r=cC(i),o=r._keyState,a=r.player,s=i.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||zA(t.target)||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(VA(e)||o.isKeyDown||((t.target===document.body||i.config.isGlobalTrigger&&!zA(t.target))&&i.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",i.onBodyKeyUp)),o.isBodyKeyDown&&i.handleKeyDown(t))}})),aC(cC(i),"onBodyKeyUp",(function(e){i.player&&(document.removeEventListener("keyup",i.onBodyKeyUp),i.handleKeyUp(e))})),aC(cC(i),"onKeydown",(function(e){if(i.player){var t=e||window.event,n=cC(i)._keyState;if(!VA(t)){if(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;if(!i.player.isUserActive&&!i.config.isIgnoreUserActive)return;!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el||(n.isKeyDown=!0),i.player.root.addEventListener("keyup",i.onKeyup)}n.isKeyDown&&i.handleKeyDown(t)}})),aC(cC(i),"onKeyup",(function(e){i.player&&(i.player.root.removeEventListener("keyup",i.onKeyup),i.handleKeyUp(e))})),i}return oC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Mb(e=rw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Mb(i=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):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,disablePress:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,disablePress:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,disablePress:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disablePress:!1,disable:!1},right:{keyCode:39,action:"seek",pressAction:"changePlaybackRate",disablePress:!1,disable:!1},esc:{keyCode:27,action:"exitFullscreen",disablePress:!0,disable:!1}},this.mergekeyCodeMap(),this._keyState={isKeyDown:!1,isBodyKeyDown:!1,isPress:!1,tt:0,playbackRate:0},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,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Mb(n=rw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=hx((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=hx((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.duration,o=t.offsetDuration,a=t.timeSegments,s=i>-1?i:n,l=o||r,u=VA(e)&&this.seekStep>=4?qw(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=fT.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.timeSegments,o=(i>-1?i:n)-(VA(e)?qw(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=fT.getCurrentTimeByOffset(o,r)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,i=this.player;0===t.playbackRate&&(t.playbackRate=i.playbackRate,i.playbackRate=n.playbackRate)}},{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,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(VA(e)){t.isPress=!0;var n=Date.now();if(n-t.tt<200)return;t.tt=n}!function(e){e.preventDefault(),e.returnValue=!1}(e),this.handleKeyCode(e.keyCode,e,t.isPress)}},{key:"handleKeyUp",value:function(e){var t=this._keyState;t.playbackRate>0&&(this.player.playbackRate=t.playbackRate,t.playbackRate=0),t.isKeyDown=!1,t.isPress=!1,t.tt=0}},{key:"handleKeyCode",value:function(e,t,n){for(var i=rw(this.keyCodeMap),r=0;r<i.length;r++){var o=this.keyCodeMap[i[r]],a=o.action,s=o.keyCode,l=o.disable,u=o.pressAction,c=o.disablePress;if(s===e){if(!(l||n&&c)){var h=n&&u||a;"function"==typeof h?a(t,this.player,n):"string"==typeof h&&"function"==typeof this[h]&&this[h](t,this.player,n),this.emit(iS,tC({key:i[r],target:t.target,isPress:n},this.keyCodeMap[i[r]]))}break}}}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown),this.player.root.removeEventListener("keyup",this.onKeyup),document.removeEventListener("keyup",this.onBodyKeyUp)}},{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:!1,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!1,keyCodeMap:{},disable:!1,playbackRate:2,isIgnoreUserActive:!1}}}]),n}(SS);function GA(){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 WA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"registerIcons",value:function(){return{loadingIcon:GA}}},{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:DS.ROOT}}}]),n}(HS),YA=An,XA=ea.findIndex,qA="findIndex",ZA=!0;qA in[]&&Array(1)[qA]((function(){ZA=!1})),YA({target:"Array",proto:!0,forced:ZA},{findIndex:function(e){return XA(this,e,arguments.length>1?arguments[1]:void 0)}});var $A=Bc("Array").findIndex,JA=se,QA=$A,eO=Array.prototype,tO=n((function(e){var t=e.findIndex;return e===eO||JA(eO,e)&&t===eO.findIndex?QA:t})),nO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return oC(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}(HS),iO=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(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([TT,ST,DT],(function(){e.animate(t.paused)})),this.on(CT,(function(){e.animate(t.paused)})),this.animate(!0))}},{key:"registerIcons",value:function(){return{play:{icon:QP,class:"xg-icon-play"},pause:{icon:eA,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=Vm(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(){dC(lC(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(oA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(nO);function rO(){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 oO=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(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:rO,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){fT.addClass(this.root,"show")}},{key:"hide",value:function(){fT.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:DS.ROOT_TOP,index:0}}}]),n}(HS);function aO(){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 sO(){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 lO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=fT.getFullScreenEl();i.fullscreenTarget===r&&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(YT,(function(t){var n=Vm(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:oO,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===_T.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:aO,class:"xg-get-fullscreen"},exitFullscreen:{icon:sO,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){dC(lC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===_T.device?"touchend":"click",this.handleFullscreen),"mobile"===_T.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(){dC(lC(n.prototype),"show",this).call(this)}},{key:"hide",value:function(){dC(lC(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(oA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(nO);function uO(){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 cO(){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 hO(){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 fO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=cC(i).player,n=Vm(i).call(i,".xgplayer-bar");fT.event(e);var r=n.getBoundingClientRect(),o=fT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),aC(cC(i),"onBarMouseMove",(function(e){var t=cC(i)._d;if(t.isStart){var n=cC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),fT.event(e);var a=fT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),aC(cC(i),"onBarMouseUp",(function(e){fT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=cC(i)._d;t.isStart=!1,t.isMoving=!1})),aC(cC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),aC(cC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(Vm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return oC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:cO,class:"xg-volume-small"},volumeLarge:{icon:uO,class:"xg-volume"},volumeMuted:{icon:hO,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,i=t.volume;if(n.volumeColor)Vm(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"!==_T.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(MT,this.onVolumeChange),this.once(LT,this.onVolumeChange),"Number"!==fT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=Vm(this).call(this,".xgplayer-drag"),r=Vm(this).call(this,".xgplayer-bar");if(r&&i){var o=qw(e/r.getBoundingClientRect().height*1e3,10);i.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,i=Vm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.ceil(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(fT.clearTimeout(this,this._timerId),this._timerId=null),fT.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],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(fT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=fT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),fT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),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&&(fT.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"===_T.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:DS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(HS);function dO(){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 pO(){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 vO,gO="picture-in-picture",yO="inline",mO="fullscreen",_O=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return oC(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()&&(dC(lC(n.prototype),"afterCreate",this).call(this),this.pMode=yO,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(VT,(function(){e.config.showIcon&&(fT.removeClass(Vm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:dO,class:"xg-get-pip"},pipIconExit:{icon:pO,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;fT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),t.emit(tS,!1)},this.enterPIPCallback=function(n){t.emit(tS,!0),e.pipWindow=n.pictureInPictureWindow,e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===mO&&i!==mO&&t.onFullscreenChange(null,!1),e.pMode=i,i===gO?e.enterPIPCallback(n):i===yO&&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 i=t.poster;return i&&(e.media.poster="String"===fT.typeOf(i)?i:i.poster),n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("picture-in-picture"):e.media.requestPictureInPicture(),!0}catch(r){return console.error("requestPiP",r),!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===gO}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return("Boolean"!==fT.typeOf(document.pictureInPictureEnabled)||document.pictureInPictureEnabled)&&("Boolean"===fT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===fT.typeOf(e.webkitSetPresentationMode))}},{key:"destroy",value:function(){dC(lC(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(oA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),n}(nO),kO=function(){function e(t){iC(this,e),this.config=t.config,this.parent=t.root,this.root=fT.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 i="mobile"===_T.device?"touchend":"click";this._delegates=HS.delegate.call(this,this.root,"li",i,this.onItemClick)}return oC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Mb(t=rw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=rw(e[0])),this.root.innerHTML="",Mb(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(fT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&fT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");fT.addClass(t,"selected"),i&&fT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Mb(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){fT.removeClass(this.root,"hide"),fT.addClass(this.root,"active")}},{key:"hide",value:function(){fT.removeClass(this.root,"active"),fT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;rw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Mb(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}(),bO={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"},wO=By(By({},uS),bO),EO=(Hy(vO={},bO.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Hy(vO,bO.AUTOPLAY_STARTED,{event:jT}),Hy(vO,bO.AUTOPLAY_PREVENTED,{event:BT}),Hy(vO,bO.FULLSCREEN_CHANGE,{event:YT}),Hy(vO,bO.CSS_FULLSCREEN_CHANGE,{event:XT}),Hy(vO,bO.MINI_STATE_CHANGE,{event:qT}),Hy(vO,bO.DEFINITION_CHANGE,{event:ZT}),Hy(vO,bO.BEFORE_DEFINITION_CHANGE,{event:$T}),Hy(vO,bO.AFTER_DEFINITION_CHANGE,{event:JT}),Hy(vO,bO.VIDEO_RESIZE,{event:eS}),Hy(vO,bO.PIP_CHANGE,{event:tS}),Hy(vO,bO.USER_ACTION,{event:rS}),Hy(vO,bO.DOWNLOAD_SPEED_CHANGE,{event:WT}),vO);var CO=/["'&<>]/;function xO(e,t){return function(e){if(Wy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==tc&&qy(e)||e["@@iterator"];if(null!=n){var i,r,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=(i=o.call(n)).done)&&(uh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||fm(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 TO=A,SO=g,PO=pr,AO=$,OO=SO(M.f),IO=SO([].push),RO=function(e){return function(t){for(var n,i=AO(t),r=PO(i),o=r.length,a=0,s=[];o>a;)n=r[a++],TO&&!OO(i,n)||IO(s,e?[n,i[n]]:i[n]);return s}},MO={entries:RO(!0),values:RO(!1)},LO=MO.entries;An({target:"Object",stat:!0},{entries:function(e){return LO(e)}});var DO=n(te.Object.entries);var NO=Ie,FO=qe,UO=K,HO=jn,jO=TypeError,BO=function(e){return function(t,n,i,r){NO(n);var o=FO(t),a=UO(o),s=HO(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw jO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},VO={left:BO(!1),right:BO(!0)}.left;An({target:"Array",proto:!0,forced:!Hf&&ve>79&&ve<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return VO(this,e,t,t>1?arguments[1]:void 0)}});var zO=Bc("Array").reduce,KO=se,GO=zO,WO=Array.prototype,YO=n((function(e){var t=e.reduce;return e===WO||KO(WO,e)&&t===WO.reduce?GO:t}));var XO=function(){function e(t){var n;pm(this,e),Hy(this,"definition",void 0),Hy(this,"source",void 0),Hy(this,"text",void 0),Hy(this,"fallbackUrl",void 0),Hy(this,"urls",void 0),Hy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Mm(n=[i]).call(n,dm(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,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return gm(e,[{key:"url",get:function(){return this._currentUrlRef.url},set:function(e){this._currentUrlRef.url=e}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),qO=function(){function e(t,n,i){var r=this;pm(this,e),Hy(this,"name",void 0),Hy(this,"text",void 0),Hy(this,"definitions",void 0),this.definitions=Mb(t).call(t,(function(e){return new XO(IC({},e,{source:r}))})),this.name=n,this.text=i}return gm(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,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Mb(r).call(r,(function(t){var n;return new e(Mb(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 i=new e([],"unknown");return i.add(new XO({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),ZO=function(){function e(t){var n,i,r,o;pm(this,e),Hy(this,"defaultSource",void 0),Hy(this,"defaultDefinition",void 0),Hy(this,"maxFallbackRound",void 0),Hy(this,"_currentDefinition",void 0),Hy(this,"_sources",void 0),Hy(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?Vm(this).call(this,a):null===(n=Vm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Vm(r=n.definitions).call(r,(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]}return gm(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},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var n,i,r,o,a,s=this;if("string"==typeof e)return Vm(o=YO(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=Vm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:Vm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.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,i,r,o,a;return this._sources=qO.normalize(e),this._currentDefinition=null!==(n=Vm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.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:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function $O(){var e;"undefined"!=typeof Reflect&&qE?$O=UP(e=qE).call(e):$O=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=BP(e)););return e}(e,t);if(i){var r=by(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return $O.apply(this,arguments)}function JO(){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 QO=function(e){jP(n,e);var t=zP(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_error",void 0),i}return gm(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Mm(t="".concat(r?"[".concat(r,"] "):"")).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"===_T.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:JO,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof qP?e:$P(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),$O(BP(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){$O(BP(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===_T.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(wO.FALLBACK_ERROR,this.showError.bind(this)),this.off(IT,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(wO.FALLBACK_ERROR,this.showError.bind(this)),this.on(IT,this.hideError.bind(this)),this.on(CT,this.hideError.bind(this)),this.on(QT,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Vm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Vm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=fT.createDom("div",Mm(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(wO.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=Vm(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:HS.POSITIONS.ROOT}}}]),n}(HS),eI=function(e){jP(n,e);var t=zP(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_toastNumber",0),Hy(OP(i),"_toastMap",{}),i}return gm(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.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 i=this,r=fT.createDom("div","",void 0,"veplayer-toast-container"),o=fT.checkIsObject(e)?e:fT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=fT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(HS);function tI(){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 nI=function(){function e(t){pm(this,e),Hy(this,"_root",void 0),Hy(this,"_config",void 0),Hy(this,"_parent",void 0),Hy(this,"_listDom",void 0),Hy(this,"_container",void 0),Hy(this,"_titleDom",void 0),Hy(this,"_player",void 0),Hy(this,"_delegates",void 0),Hy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return gm(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=fT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Mb(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=fT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.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!==iI.Inner)return this._titleDom||(this._titleDom=fT.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&&fT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&fT.addClass(this._root,"panel-".concat(e));var t="mobile"===_T.device?"touchend":"click";e===iI.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,i=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=fT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=fT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(fT.removeClass(this._root,"hide"),fT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(fT.removeClass(this._root,"active"),fT.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 i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{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(YT,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(YT,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=nw(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(iI.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===_T.device?"touchend":"click";this._listType===iI.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=HS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===_T.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)&&(Mb(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,i,r,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");fT.addClass(o,"selected"),l&&(fT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==kc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===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}(),iI=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(iI||{}),rI=function(e){return e.Icon="Icon",e.Text="Text",e}(rI||{}),oI="mobile"===_T.device,aI=["bottom","fullscreen","inner"],sI=["middle"],lI=["bottom","inner","fullscreen"],uI=["bottom","inner","fullscreen"],cI=function(e){jP(n,e);var t=zP(n);function n(e){var i;return pm(this,n),Hy(OP(i=t.call(this,e)),"optionsList",void 0),Hy(OP(i),"_isIcon",void 0),Hy(OP(i),"_isActive",void 0),Hy(OP(i),"_curIndex",void 0),Hy(OP(i),"activeEvent",void 0),Hy(OP(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),Hy(OP(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return gm(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&&fT.addClass(this.root,"portrait"),oI&&this.on(NT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=oI?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=rw(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 i=this.appendChild(".xgplayer-icon",fT.createDom("span","",{},"icon-text"));i&&fT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||fT.addClass(this.root,"show")}},{key:"hide",value:function(){fT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&nw(lI).call(lI,n)?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n&&nw(lI).call(lI,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 i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&nw(lI).call(lI,i))&&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 i,r=Vm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=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 nI&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&nw(uI).call(uI,o.listType)?new nI({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new kO({config:{data:e||[],onItemClick:function(e,t){r.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),oI||t&&nw(aI).call(aI,t)||(t="bottom"),oI||t&&nw(sI).call(sI,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:oI?CR.ROOT_TOP_RIGHT:CR.CONTROLS_RIGHT,listType:oI?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:oI?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(HS),hI=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(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(){$O(BP(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:tI}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Mb(t).call(t,(function(e){var t;return By(By({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=tO(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),$O(BP(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;$O(BP(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return By(By({},cI.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}(cI);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" 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 dI={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",k="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",O=/\w*$/,I=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[k]=M[a]=M[s]=M[b]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==kc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":kc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,U=F&&e&&!e.nodeType&&e,H=U&&U.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function V(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function G(e,t){return function(n){return e(t(n))}}function W(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,Z=Object.prototype,$=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec($&&iE($)&&iE($).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=Z.hasOwnProperty,te=Z.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=H?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=G(fE,Object),se=Object.create,le=Z.propertyIsEnumerable,ue=Tw(X),ce=rE,he=ie?ie.isBuffer:void 0,fe=G(rw,Object),de=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(de),ke=ze(pe),be=ze(ve),we=ze(ge),Ee=ze(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){this.__data__=new Se(e)}function Oe(e,t){var n=Ge(e)||function(e){return function(e){return function(e){return!!e&&"object"==kc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Ie(e,t,n){var i=e[t];ee.call(e,t)&&Ke(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Re(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var I;if(i&&(I=d?i(e,r,d,m):i(e)),void 0!==I)return I;if(!qe(e))return e;var R=Ge(e);if(R){if(I=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,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,I)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return ow(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(z(e))return d?e:{};if(I=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,He(e),t)}(e,function(e,t){return e&&Ne(t,Ze(t),e)}(I,e))}else{if(!M[L])return d?e:{};I=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case k:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case b:case w:case E:case C:case x:case T:case S:case P:case A:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(K(e),!0):K(e);return V(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return V(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Ae);var N=m.get(e);if(N)return N;if(m.set(e,I),!R)var F=n?function(e){return function(e,t,n){var i=t(e);return Ge(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,Ze,He)}(e):Ze(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Ie(I,o,Me(r,t,n,i,o,e,m))})),I}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||z(e)?ne:I).test(ze(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Ie(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=kc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Mb(r)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Re(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Re(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},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 Se},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 Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Pe(i)}return n.set(e,t),this};var He=ce?G(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function ze(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ke(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=k||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?ze(n):void 0;if(i)switch(i){case _e:return k;case ke:return c;case be:return d;case we:return v;case Ee:return m}return t});var Ge=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(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=kc(e);return!!e&&("object"==t||"function"==t)}function Ze(e){return We(e)?Oe(e):function(e){if(!Ve(e))return fe(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)}}(dI,dI.exports);var pI=n(dI.exports),vI=function(e){jP(i,e);var t,n=zP(i);function i(){var e,t;pm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(t=n.call.apply(n,Mm(e=[this]).call(e,o))),"_waitingStartTime",0),Hy(OP(t),"_timer",void 0),Hy(OP(t),"_toastId",void 0),t}return gm(i,[{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;$O(BP(i.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(wO.WAITING,this._waiting.bind(this)),this.on(wO.PLAYING,this._clearTimer.bind(this)),this.on(wO.PAUSE,this._clearTimer.bind(this)),this.on(wO.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:fI}}}},{key:"renderItemList",value:function(){var e,t,n,r=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=Mb(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=tO(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),$O(BP(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),$O(BP(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=zy(Jg().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=tO(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=pI(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.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(wO.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(wO.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 Lb((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=fT.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=fT.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),i(!0)}))}else i(!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 i=e+1,r=Vm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(wO.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=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!==(i=e.showText)&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(wO.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return By(By({},cI.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":"清晰度"}}}]),i}(cI),gI={"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]"},yI=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}(yI||{}),mI=function(){function e(t){var n=this;pm(this,e),Hy(this,"modules",{}),Hy(this,"mountPromiseMap",{}),Hy(this,"_baseUrl",void 0),Hy(this,"_moduleSystem",void 0),Hy(this,"load",function(){var e=zy(Jg().mark((function e(t,i){var r,o,a,s,l;return Jg().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(gI[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!==(r=o.default)&&void 0!==r?r: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,gI[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i: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)}}()),Hy(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 gm(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 Lb((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),_I=h,kI=$,bI=Dn,wI=jn,EI=Fc,CI=Math.min,xI=[].lastIndexOf,TI=!!xI&&1/[1].lastIndexOf(1,-0)<0,SI=EI("lastIndexOf"),PI=TI||!SI?function(e){if(TI)return _I(xI,this,arguments)||0;var t=kI(this),n=wI(t),i=n-1;for(arguments.length>1&&(i=CI(i,bI(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:xI;An({target:"Array",proto:!0,forced:PI!==[].lastIndexOf},{lastIndexOf:PI});var AI,OI,II=Bc("Array").lastIndexOf,RI=se,MI=II,LI=Array.prototype,DI=n((function(e){var t=e.lastIndexOf;return e===LI||RI(LI,e)&&t===LI.lastIndexOf?MI:t})),NI=null!==(AI=null===(OI=document.currentScript)||void 0===OI?void 0:OI.src)&&void 0!==AI?AI:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.1.0-rc.1","/object/umd/"),FI=new mI({baseUrl:ow(NI).call(NI,0,DI(NI).call(NI,"/"))}),UI=FI.register;function HI(e,t){return jI.apply(this,arguments)}function jI(){return(jI=zy(Jg().mark((function e(t,n){var i;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,FI.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),ZP(WP.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function BI(e){return function(t){var n;return null==t?void 0:nw(n=t.split("?")[0].toLowerCase()).call(n,e)}}var VI=BI(".m3u8"),zI=BI(".mp4"),KI=BI(".flv"),GI=BI(".sdp"),WI=BI(".mpd");function YI(){return(YI=zy(Jg().mark((function e(){var t;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,HI(yI.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)}By(By({},fT),{},{getStreamType:function(e){return VI(e)?"hls":KI(e)?"flv":GI(e)?"rtm":zI(e)?"mp4":WI(e)?"dash":"unknown"},isMseSupported:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ky.H264)===Ky.H265?_T.isHevcSupported():_T.isMSESupport()},isSoftDecodeSupported:function(){return YI.apply(this,arguments)}});var XI=_T.isWeixin,qI=_T.os,ZI=_T.device,$I=qI.isAndroid,JI=qI.isIos,QI="mobile"===ZI,eR=0,tR=!1,nR=function(e){jP(n,e);var t=zP(n);function n(e){var i;return pm(this,n),Hy(OP(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),Hy(OP(i),"_timer",void 0),Hy(OP(i),"_wxTimer",void 0),Hy(OP(i),"_state",{mode:0,showUnmuteBt:!1}),Hy(OP(i),"userClickPlay",(function(){if(!tR){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),tR=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),tR=!0)}})),i}return gm(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(BT,this.handleAutoplayPrevented.bind(this)),this.player.on(jT,this.handleAutoplayStart.bind(this)),this.player.on(MT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){XI&&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():$I?this.player.once(IT,this.wxCanPlayFn.bind(this)):JI&&this.player.once(VT,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(bO.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(bO.AUTOPLAY_FAIL,{mode:"unmute"}),$I&&XI?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(bO.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(bO.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(bO.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(bO.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(bO.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"),i=fT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),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-eR>200){eR=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(bO.AUTOPLAY_UNMUTE);var t="mobile"===_T.device,n=GI(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(BT,this.handleAutoplayPrevented.bind(this)),this.player.off(jT,this.handleAutoplayStart.bind(this)),this.player.off(MT,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=QI?"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:HS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(HS),iR=MO.values;An({target:"Object",stat:!0},{values:function(e){return iR(e)}});var rR=n(te.Object.values);function oR(){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 aR,sR,lR=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(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 i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=fT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{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:Mb(t).call(t,(function(t,i){var r,o=fT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=fT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(fT.createDom("span",s,{"plugin-index":i},"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&&fT.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&&fT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:oR}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return By(By({},cI.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:rI.Icon,panel:{className:"more-panel-content"}})}}]),n}(cI),uR=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(uR||{}),cR=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(n,[{key:"registerIcons",value:function(){return{more:{icon:oR,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[lR.pluginName]={plugin:lR,options:{root:this.root,plugins:i}}),r}},{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=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Mb(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&nw(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:HS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!nw(a=rR(uR)).call(a,s)}}]),n}(HS),hR=[iO,lO,fO,yA,_O,JP,iA,WA,rA,QO,eI,hI,vI,nR],fR=Mm(aR=[]).call(aR,hR,[KA,kA,cR]),dR=Mm(sR=[]).call(sR,hR,[FA,cR]),pR="pc"===_T.device?fR:dR;function vR(){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 gR(){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 yR,mR={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:gR,exitFullscreen:vR,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}},_R=By(By({},mR),{},{fullscreen:gR,exitFullscreen:vR}),kR=By(By({},mR),{},{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}}),bR="pc"===_T.device?_R:kR,wR=function(){function e(t){var n;if(pm(this,e),Hy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||vT()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Mb(i=DO(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=xO(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return gm(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,i;if(e){var r=null==yP?void 0:yP.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return yP.langKeys}},{key:"isLangValid",value:function(e){var t;return nw(t=yP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){yP.extend(e,t)}}]),e}(),ER=["autoplay"],CR=By(By({},HS.POSITIONS),uR),xR={id:"veplayer",width:"100%",height:"100%",decodeType:Gy.Hardware,fullscreen:{useCssFullscreen:!1}},TR=function(e){var t,n,i,r=e.autoplay,o=Pm(e,ER);(o.poster&&(o.poster=function(e){var t,n=""+e,i=CO.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}a!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=By(By({},bR),o.icons?(t=o.icons,n={},DO(null!=t?t:{}).forEach((function(e){var t=xO(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=By(By({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},SR=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pm(this,e),Hy(this,"_player",void 0),Hy(this,"_sourceManager",void 0),Hy(this,"_preparePlugins",void 0),Hy(this,"_previousPrepareResult",void 0),Hy(this,"_i18nManager",void 0),Hy(this,"_events",{}),Hy(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 wR({i18n:p.i18n});var v=TR(By(By({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Mm(i=[]).call(i,dm(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),dm(null!==(a=p.plugins)&&void 0!==a?a:pR)),y=[],m=[];g.forEach((function(e){cR.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new AP(By(By(By({},xR),v),{},{definition:By({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:By(By({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(wO.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(ST,this._errorCallback)}var t,n,i,r,o,a;return gm(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(wR.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=wR.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===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=zy(Jg().mark((function e(t,n){var i,r,o,a;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.length)){e.next=4;break}return e.next=3,this._switchUrl(t);case 3:return e.abrupt("return",this._sourceManager.definition);case 4:if(o=Vm(r=this._sourceManager).call(r,t,n)){e.next=7;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 7:return e.next=9,this._switch(o);case 9:return e.abrupt("return",o);case 10: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,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sb),this._events[e].set(t,r),this._player.once(o,r))}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;i&&(this._player.off(r,i),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sb),this._events[e].set(t,r),this._player.on(o,r))}},{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.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",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){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===CR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===CR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(ST,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return Jg().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!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],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",{plugins:Mb(u).call(u,(function(e){return c._player.registerPlugin(e)})),options:null==a?void 0:a.options});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=zy(Jg().mark((function e(t){var n,i,r=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(KS),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(KS),this.emit(wO.FALLBACK_ERROR,$P(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(wO.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===ST?{xgCallback:t?function(e){t($P(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=EO[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Mm(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=pI(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(s=e.t0,l=s.plugins,null!=(u=s.options)&&u.url&&(t.url=null==u?void 0:u.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(wO.SOURCE_CHANGE),null==l||!l.length){e.next=21;break}return this.emit(wO.DEFINITION_CHANGE),e.next=18,this._callBeforePlayerInitForUrl(l,t.url);case 18:this.emit(wO.AFTER_DEFINITION_CHANGE),e.next=22;break;case 21:this._player.changeDefinition(t,a);case 22:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0={};case 5:if(i=e.t0,r=i.plugins,o=i.options,a=null!==(n=null==o?void 0:o.url)&&void 0!==n?n:t,this._sourceManager.updateSources(a),null==r||!r.length){e.next=14;break}this._callBeforePlayerInitForUrl(r,a),e.next=21;break;case 14:if(s=this._player.switchURL(a,!1),l=this._player.currentTime,!s||!s.then){e.next=20;break}return e.abrupt("return",s);case 20:return e.abrupt("return",new Lb((function(e){var t=u._player.paused&&!u._player.isError,n=function(){u._player.currentTime=l,t&&u._player.once(IT,(function(){u._player.pause()})),e()};_T.os.isAndroid?u.once(AT,(function(){n()})):u.once(IT,(function(){n()})),u._player.play()})));case 21:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Mb(e).call(e,(function(e){return e.pluginName})),i=Mb(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:Db(n).call(n,(function(e){return!nw(i).call(i,e)})),addedPlugins:Db(t).call(t,(function(e){return!nw(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Lb((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(wO.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=zy(Jg().mark((function t(){var n,i,r,o,a,s,l,u,c=arguments;return Jg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,s=new ZO({sources:qO.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(i=s.url)&&void 0!==i?i:"");case 5:return null!=(l=t.sent)&&null!==(r=l.options)&&void 0!==r&&r.url&&(s.url=null==l||null===(u=l.options)||void 0===u?void 0:u.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(By(By({},o),{},{prepareResult:l,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function PR(e){return AR.apply(this,arguments)}function AR(){return(AR=zy(Jg().mark((function e(t){return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,SR.create(By({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}yR="umd",FI.setModuleSystem(yR),void 0!==VePlayer.register?VePlayer.register(yI.BizVod,{createVodPlayer:PR}):UI(yI.BizVod,{createVodPlayer:PR}),e.createVodPlayer=PR,e.load=HI,e.register=UI}));
|
|
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 i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("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)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),k=function(e){return _(m(e),8,-1)},b=k,w=g,E=function(e){if("Function"===b(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},P={},A=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,R=O?I.bind(I):function(){return I.apply(I,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,U,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=k,V=Object,z=g("".split),K=j((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?z(e,""):V(e)}:V,G=function(e){return null==e},W=G,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=K,Z=X,$=function(e){return q(Z(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.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=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),ke=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,we=S,Ee=se,Ce=Object,xe=ke?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Pe=S,Ae=Se,Oe=TypeError,Ie=function(e){if(Pe(e))return e;throw Oe(Ae(e)+" is not a function")},Re=Ie,Me=G,Le=function(e,t){var n=e[t];return Me(n)?void 0:Re(n)},De=R,Ne=S,Fe=ee,Ue=TypeError,He={exports:{}},je=r,Be=Object.defineProperty,Ve=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},ze="__core-js_shared__",Ke=r[ze]||Ve(ze,{}),Ge=Ke;(He.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 We=He.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},Ze=qe,$e=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return $e(Ze(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=ke,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=R,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),kt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,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)},bt=xe,wt=function(e){var t=kt(e,"string");return bt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,Pt=!A&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),At=A,Ot=R,It=M,Rt=H,Mt=$,Lt=wt,Dt=Je,Nt=Pt,Ft=Object.getOwnPropertyDescriptor;P.f=At?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Rt(!Ot(It.f,e,t),e[t])};var Ut=o,Ht=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=zt[Vt(e)];return n==Gt||n!=Kt&&(Ht(t)?Ut(t):!!t)},Vt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},zt=Bt.data={},Kt=Bt.NATIVE="N",Gt=Bt.POLYFILL="P",Wt=Bt,Yt=Ie,Xt=a,qt=E(E.bind),Zt=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},$t={},Jt=A&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=A,on=Pt,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";$t.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 i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],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(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=$t,gn=H,yn=A?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,kn=E,bn=S,wn=P.f,En=Wt,Cn=te,xn=Zt,Tn=yn,Sn=Je,Pn=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},An=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?Pn(a):p&&bn(a)?kn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},On=k,In=Array.isArray||function(e){return"Array"==On(e)},Rn=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:Rn)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Un=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Hn=Un,jn=function(e){return Hn(e.length)},Bn=TypeError,Vn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},zn=wt,Kn=$t,Gn=H,Wn=function(e,t,n){var i=zn(t);i in e?Kn.f(e,i,Gn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,Zn=S,$n=k,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==$n(function(){return arguments}()),ti=qn?$n:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?$n(t):"Object"==(i=$n(t))&&Zn(t.callee)?"Arguments":i},ni=S,ii=Ke,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,ki=In,bi=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return ki(e)&&(t=e.constructor,(bi(t)&&(t===Ci||ki(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Pi=ve,Ai=ft("species"),Oi=function(e){return Pi>=51||!Si((function(){var t=[];return(t.constructor={})[Ai]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ii=An,Ri=o,Mi=In,Li=ee,Di=qe,Ni=jn,Fi=Vn,Ui=Wn,Hi=Ti,ji=Oi,Bi=ve,Vi=ft("isConcatSpreadable"),zi=Bi>=51||!Ri((function(){var e=[];return e[Vi]=!1,e.concat()[0]!==e})),Ki=function(e){if(!Li(e))return!1;var t=e[Vi];return void 0!==t?!!t:Mi(e)};Ii({target:"Array",proto:!0,arity:1,forced:!zi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Hi(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(Ki(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Ui(s,l,o[n]);else Fi(l+1),Ui(s,l++,o);return s.length=l,s}});var Gi=ti,Wi=String,Yi=function(e){if("Symbol"===Gi(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,Zi=Math.max,$i=Math.min,Ji=function(e,t){var n=qi(e);return n<0?Zi(n+t,0):$i(n,t)},Qi=$,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=$,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=A,gr=Jt,yr=$t,mr=nn,_r=$,kr=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=kr(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var br,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Pr=hr,Ar=rr,Or=wr,Ir=Tt,Rr="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ur=function(){try{br=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Ur="undefined"!=typeof document?document.domain&&br?Fr(br):(t=Ir("iframe"),n="java"+Mr+":",t.style.display="none",Or.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(br);for(var i=Pr.length;i--;)delete Ur[Rr][Pr[i]];return Ur()};Ar[Lr]=!0;var Hr=Object.create||function(e,t){var n;return null!==e?(Dr[Rr]=Tr(e),n=new Dr,Dr[Rr]=null,n[Lr]=e):n=Ur(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,Vr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,Vr)};var zr={},Kr=Ji,Gr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Gr(e),r=Kr(t,i),o=Kr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},Zr=k,$r=$,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];zr.f=function(e){return eo&&"Window"==Zr(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr($r(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=$t,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=$t.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=R,mo=ae,_o=ft,ko=io,bo=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&ko(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=$t.f,To=yn,So=Je,Po=Eo,Ao=ft("toStringTag"),Oo=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Ao)||xo(r,Ao,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Po)}},Io=S,Ro=r.WeakMap,Mo=Io(Ro)&&/native code/.test(String(Ro)),Lo=r,Do=ee,No=yn,Fo=Je,Uo=Ke,Ho=xr,jo=rr,Bo="Object already initialized",Vo=Lo.TypeError,zo=Lo.WeakMap;if(Mo||Uo.state){var Ko=Uo.state||(Uo.state=new zo);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,lo=function(e,t){if(Ko.has(e))throw Vo(Bo);return t.facade=e,Ko.set(e,t),t},uo=function(e){return Ko.get(e)||{}},co=function(e){return Ko.has(e)}}else{var Go=Ho("state");jo[Go]=!0,lo=function(e,t){if(Fo(e,Go))throw Vo(Bo);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 Wo={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(!Do(t)||(n=uo(t)).type!==e)throw Vo("Incompatible receiver, "+e+" required");return n}}},Yo=Zt,Xo=K,qo=qe,Zo=jn,$o=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=Zo(v),m=0,_=h||$o,k=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)k[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(k,f)}else switch(e){case 4:return!1;case 7:Jo(k,f)}return o?-1:i||r?r:k}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=An,na=r,ia=R,ra=g,oa=A,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=$,fa=wt,da=Yi,pa=H,va=Hr,ga=pr,ya=jr,ma=zr,_a=to,ka=P,ba=$t,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Pa=it,Aa=ft,Oa=ao,Ia=go,Ra=bo,Ma=Oo,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ua="prototype",Ha=La.set,ja=La.getterFor(Fa),Ba=Object[Ua],Va=na.Symbol,za=Va&&Va[Ua],Ka=na.TypeError,Ga=na.QObject,Wa=ka.f,Ya=ba.f,Xa=ma.f,qa=Ea.f,Za=ra([].push),$a=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("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 i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=$a[e]=va(za);return Ha(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la($a,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la($a,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la($a,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la($a,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la($a,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la($a,e)||la(Sa,e)||Za(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la($a,e)||t&&!la(Ba,e)||Za(i,$a[e])})),i};aa||(Va=function(){if(ua(za,this))throw Ka("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Pa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(za=Va[Ua],"toString",(function(){return ja(this).tag})),Ca(Va,"withoutSetter",(function(e){return ns(Pa(e),e)})),Ea.f=os,ba.f=is,wa.f=rs,ka.f=as,ya.f=ma.f=ss,_a.f=ls,Oa.f=function(e){return ns(Aa(e),e)},oa&&xa(za,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Va}),Da(ga(Qa),(function(e){Ia(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):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ra(),Ma(Va,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=An,hs=ae,fs=Je,ds=Yi,ps=We,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=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=An,_s=Je,ks=xe,bs=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!ks(e))throw TypeError(bs(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=In,Ts=S,Ss=k,Ps=Yi,As=g([].push),Os=An,Is=ae,Rs=h,Ms=R,Ls=g,Ds=o,Ns=S,Fs=xe,Us=Cs,Hs=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?As(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||As(n,Ps(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,Vs=Is("JSON","stringify"),zs=Ls(/./.exec),Ks=Ls("".charAt),Gs=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,Zs=/^[\uDC00-\uDFFF]$/,$s=!js||Ds((function(){var e=Is("Symbol")();return"[null]"!=Vs([e])||"{}"!=Vs({a:e})||"{}"!=Vs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),Qs=function(e,t){var n=Us(arguments),i=Hs(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Rs(Vs,null,n)},el=function(e,t,n){var i=Ks(n,t-1),r=Ks(n,t+1);return zs(qs,e)&&!zs(Zs,r)||zs(Zs,e)&&!zs(qs,i)?"\\u"+Ys(Gs(e,0),16):e};Vs&&Os({target:"JSON",stat:!0,arity:3,forced:$s||Js},{stringify:function(e,t,n){var i=Us(arguments),r=Rs($s?Qs:Vs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});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 il=bo;go("toPrimitive"),il();var rl=ae,ol=Oo;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Oo(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=A,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,kl=qe,bl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=bl?El.getPrototypeOf:function(e){var t=kl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Pl=ee,Al=Hr,Ol=xl,Il=io,Rl=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Pl(al)||Tl((function(){var e={};return al[Rl].call(e)!==e}));Sl((al=Ll?{}:Al(al))[Rl])||Il(al,Rl,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Hr,Ul=H,Hl=Oo,jl=cl,Bl=function(){return this},Vl=g,zl=Ie,Kl=S,Gl=String,Wl=TypeError,Yl=function(e,t,n){try{return Vl(zl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},Xl=nn,ql=function(e){if("object"==typeof e||Kl(e))return e;throw Wl("Can't set "+Gl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Yl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return Xl(n),ql(i),t?e(n,i):n.__proto__=i,n}}():void 0),$l=An,Jl=R,Ql=gl,eu=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Ul(+!i,n)}),Hl(e,r,!1,!0),jl[r]=Bl,e},tu=xl,nu=Oo,iu=io,ru=cl,ou=Dl,au=Ql.PROPER,su=ou.BUGGY_SAFARI_ITERATORS,lu=ft("iterator"),uu="keys",cu="values",hu="entries",fu=function(){return this},du=function(e,t,n,i,r,o,a){eu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!su&&e in d)return d[e];switch(e){case uu:case cu:case hu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[lu]||d["@@iterator"]||r&&d[r],v=!su&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=tu(g.call(new e)))!==Object.prototype&&s.next&&(nu(s,h,!0,!0),ru[h]=fu),au&&r==cu&&p&&p.name!==cu&&(f=!0,v=function(){return Jl(p,this)}),r)if(l={values:c(cu),keys:o?v:c(uu),entries:c(hu)},a)for(u in l)(su||f||!(u in d))&&iu(d,u,l[u]);else $l({target:t,proto:!0,forced:su||f},l);return a&&d[lu]!==v&&iu(d,lu,v,{name:r}),ru[t]=v,l},pu=function(e,t){return{value:e,done:t}},vu=$,gu=cl,yu=Wo;$t.f;var mu=du,_u=pu,ku="Array Iterator",bu=yu.set,wu=yu.getterFor(ku);mu(Array,"Array",(function(e,t){bu(this,{type:ku,target:vu(e),index:0,kind:t})}),(function(){var e=wu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,_u(void 0,!0)):_u("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),gu.Arguments=gu.Array;var Eu={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},Cu=r,xu=ti,Tu=yn,Su=cl,Pu=ft("toStringTag");for(var Au in Eu){var Ou=Cu[Au],Iu=Ou&&Ou.prototype;Iu&&xu(Iu)!==Pu&&Tu(Iu,Pu,Au),Su[Au]=Su.Array}var Ru=ul;go("dispose");var Mu=Ru;go("asyncDispose");var Lu=An,Du=g,Nu=ae("Symbol"),Fu=Nu.keyFor,Uu=Du(Nu.prototype.valueOf);Lu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Fu(Uu(e))}catch(t){return!1}}});for(var Hu=An,ju=We,Bu=ae,Vu=g,zu=xe,Ku=ft,Gu=Bu("Symbol"),Wu=Gu.isWellKnown,Yu=Bu("Object","getOwnPropertyNames"),Xu=Vu(Gu.prototype.valueOf),qu=ju("wks"),Zu=0,$u=Yu(Gu),Ju=$u.length;Zu<Ju;Zu++)try{var Qu=$u[Zu];zu(Gu[Qu])&&Ku(Qu)}catch(OR){}Hu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Wu&&Wu(e))return!0;try{for(var t=Xu(e),n=0,i=Yu(qu),r=i.length;n<r;n++)if(qu[i[n]]==t)return!0}catch(OR){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var ec=Mu,tc=n(ec),nc=g,ic=Dn,rc=Yi,oc=X,ac=nc("".charAt),sc=nc("".charCodeAt),lc=nc("".slice),uc=function(e){return function(t,n){var i,r,o=rc(oc(t)),a=ic(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=sc(o,a))<55296||i>56319||a+1===s||(r=sc(o,a+1))<56320||r>57343?e?ac(o,a):i:e?lc(o,a,a+2):r-56320+(i-55296<<10)+65536}},cc={codeAt:uc(!1),charAt:uc(!0)}.charAt,hc=Yi,fc=Wo,dc=du,pc=pu,vc="String Iterator",gc=fc.set,yc=fc.getterFor(vc);dc(String,"String",(function(e){gc(this,{type:vc,string:hc(e),index:0})}),(function(){var e,t=yc(this),n=t.string,i=t.index;return i>=n.length?pc(void 0,!0):(e=cc(n,i),t.index+=e.length,pc(e,!1))}));var mc=ao.f("iterator"),_c=n(mc);function kc(e){return(kc="function"==typeof tc&&"symbol"==typeof _c?function(e){return typeof e}:function(e){return e&&"function"==typeof tc&&e.constructor===tc&&e!==tc.prototype?"symbol":typeof e})(e)}var bc={exports:{}},wc=An,Ec=A,Cc=$t.f;wc({target:"Object",stat:!0,forced:Object.defineProperty!==Cc,sham:!Ec},{defineProperty:Cc});var xc=te.Object,Tc=bc.exports=function(e,t,n){return xc.defineProperty(e,t,n)};xc.defineProperty.sham&&(Tc.sham=!0);var Sc=bc.exports,Pc=n(Sc);An({target:"Object",stat:!0,sham:!A},{create:Hr});var Ac=te.Object,Oc=n((function(e,t){return Ac.create(e,t)})),Ic=qe,Rc=xl,Mc=yl;An({target:"Object",stat:!0,forced:o((function(){Rc(1)})),sham:!Mc},{getPrototypeOf:function(e){return Rc(Ic(e))}});var Lc=te.Object.getPrototypeOf,Dc=n(Lc),Nc=o,Fc=function(e,t){var n=[][e];return!!n&&Nc((function(){n.call(null,t||function(){return 1},1)}))},Uc=ea.forEach,Hc=Fc("forEach")?[].forEach:function(e){return Uc(this,e,arguments.length>1?arguments[1]:void 0)};An({target:"Array",proto:!0,forced:[].forEach!=Hc},{forEach:Hc});var jc=te,Bc=function(e){return jc[e+"Prototype"]},Vc=Bc("Array").forEach,zc=ti,Kc=Je,Gc=se,Wc=Vc,Yc=Array.prototype,Xc={DOMTokenList:!0,NodeList:!0},qc=n((function(e){var t=e.forEach;return e===Yc||Gc(Yc,e)&&t===Yc.forEach||Kc(Xc,zc(e))?Wc:t})),Zc=A,$c=In,Jc=TypeError,Qc=Object.getOwnPropertyDescriptor,eh=Zc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(OR){return OR instanceof TypeError}}()?function(e,t){if($c(e)&&!Qc(e,"length").writable)throw Jc("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},th=qe,nh=jn,ih=eh,rh=Vn;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(OR){return OR instanceof TypeError}}()},{push:function(e){var t=th(this),n=nh(t),i=arguments.length;rh(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return ih(t,n),n}});var oh=Bc("Array").push,ah=se,sh=oh,lh=Array.prototype,uh=n((function(e){var t=e.push;return e===lh||ah(lh,e)&&t===lh.push?sh:t}));An({target:"Object",stat:!0},{setPrototypeOf:Zl});var ch=te.Object.setPrototypeOf,hh=n(ch),fh=ae,dh=jr,ph=to,vh=nn,gh=g([].concat),yh=fh("Reflect","ownKeys")||function(e){var t=dh.f(vh(e)),n=ph.f;return n?gh(t,n(e)):t},mh=Je,_h=yh,kh=P,bh=$t,wh=ee,Eh=yn,Ch=Error,xh=g("".replace),Th=String(Ch("zxcasd").stack),Sh=/\n\s*at [^:]*:[^\n]*/,Ph=Sh.test(Th),Ah=H,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ah(1,7)),7!==e.stack)})),Ih=yn,Rh=function(e,t){if(Ph&&"string"==typeof e&&!Ch.prepareStackTrace)for(;t--;)e=xh(e,Sh,"");return e},Mh=Oh,Lh=Error.captureStackTrace,Dh=cl,Nh=ft("iterator"),Fh=Array.prototype,Uh=function(e){return void 0!==e&&(Dh.Array===e||Fh[Nh]===e)},Hh=ti,jh=Le,Bh=G,Vh=cl,zh=ft("iterator"),Kh=function(e){if(!Bh(e))return jh(e,zh)||jh(e,"@@iterator")||Vh[Hh(e)]},Gh=R,Wh=Ie,Yh=nn,Xh=Se,qh=Kh,Zh=TypeError,$h=function(e,t){var n=arguments.length<2?qh(e):t;if(Wh(n))return Yh(Gh(n,e));throw Zh(Xh(e)+" is not iterable")},Jh=R,Qh=nn,ef=Le,tf=function(e,t,n){var i,r;Qh(e);try{if(!(i=ef(e,"return"))){if("throw"===t)throw n;return n}i=Jh(i,e)}catch(OR){r=!0,i=OR}if("throw"===t)throw n;if(r)throw i;return Qh(i),n},nf=Zt,rf=R,of=nn,af=Se,sf=Uh,lf=jn,uf=se,cf=$h,hf=Kh,ff=tf,df=TypeError,pf=function(e,t){this.stopped=e,this.result=t},vf=pf.prototype,gf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=nf(t,c),g=function(e){return i&&ff(i,"normal",e),new pf(!0,e)},y=function(e){return h?(of(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=hf(e)))throw df(af(e)+" is not iterable");if(sf(r)){for(o=0,a=lf(e);a>o;o++)if((s=y(e[o]))&&uf(vf,s))return s;return new pf(!1)}i=cf(e,r)}for(l=f?e.next:i.next;!(u=rf(l,i)).done;){try{s=y(u.value)}catch(OR){ff(i,"throw",OR)}if("object"==typeof s&&s&&uf(vf,s))return s}return new pf(!1)},yf=Yi,mf=An,_f=se,kf=xl,bf=Zl,wf=function(e,t,n){for(var i=_h(t),r=bh.f,o=kh.f,a=0;a<i.length;a++){var s=i[a];mh(e,s)||n&&mh(n,s)||r(e,s,o(t,s))}},Ef=Hr,Cf=yn,xf=H,Tf=function(e,t){wh(t)&&"cause"in t&&Eh(e,"cause",t.cause)},Sf=function(e,t,n,i){Mh&&(Lh?Lh(e,t):Ih(e,"stack",Rh(n,i)))},Pf=gf,Af=function(e,t){return void 0===e?arguments.length<2?"":t:yf(e)},Of=ft("toStringTag"),If=Error,Rf=[].push,Mf=function(e,t){var n,i=_f(Lf,this);bf?n=bf(If(),i?kf(this):Lf):(n=i?this:Ef(Lf),Cf(n,Of,"Error")),void 0!==t&&Cf(n,"message",Af(t)),Sf(n,Mf,n.stack,1),arguments.length>2&&Tf(n,arguments[2]);var r=[];return Pf(e,Rf,{that:r}),Cf(n,"errors",r),n};bf?bf(Mf,If):wf(Mf,If,{name:!0});var Lf=Mf.prototype=Ef(If.prototype,{constructor:xf(1,Mf),message:xf(1,""),name:xf(1,"AggregateError")});mf({global:!0,constructor:!0,arity:2},{AggregateError:Mf});var Df,Nf,Ff,Uf,Hf="undefined"!=typeof process&&"process"==k(process),jf=ae,Bf=oo,Vf=A,zf=ft("species"),Kf=function(e){var t=jf(e);Vf&&t&&!t[zf]&&Bf(t,zf,{configurable:!0,get:function(){return this}})},Gf=se,Wf=TypeError,Yf=function(e,t){if(Gf(t,e))return e;throw Wf("Incorrect invocation")},Xf=_i,qf=Se,Zf=TypeError,$f=function(e){if(Xf(e))return e;throw Zf(qf(e)+" is not a constructor")},Jf=nn,Qf=$f,ed=G,td=ft("species"),nd=function(e,t){var n,i=Jf(e).constructor;return void 0===i||ed(n=Jf(i)[td])?t:Qf(n)},id=TypeError,rd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),od=r,ad=h,sd=Zt,ld=S,ud=Je,cd=o,hd=wr,fd=Cs,dd=Tt,pd=function(e,t){if(e<t)throw id("Not enough arguments");return e},vd=rd,gd=Hf,yd=od.setImmediate,md=od.clearImmediate,_d=od.process,kd=od.Dispatch,bd=od.Function,wd=od.MessageChannel,Ed=od.String,Cd=0,xd={},Td="onreadystatechange";cd((function(){Df=od.location}));var Sd=function(e){if(ud(xd,e)){var t=xd[e];delete xd[e],t()}},Pd=function(e){return function(){Sd(e)}},Ad=function(e){Sd(e.data)},Od=function(e){od.postMessage(Ed(e),Df.protocol+"//"+Df.host)};yd&&md||(yd=function(e){pd(arguments.length,1);var t=ld(e)?e:bd(e),n=fd(arguments,1);return xd[++Cd]=function(){ad(t,void 0,n)},Nf(Cd),Cd},md=function(e){delete xd[e]},gd?Nf=function(e){_d.nextTick(Pd(e))}:kd&&kd.now?Nf=function(e){kd.now(Pd(e))}:wd&&!vd?(Uf=(Ff=new wd).port2,Ff.port1.onmessage=Ad,Nf=sd(Uf.postMessage,Uf)):od.addEventListener&&ld(od.postMessage)&&!od.importScripts&&Df&&"file:"!==Df.protocol&&!cd(Od)?(Nf=Od,od.addEventListener("message",Ad,!1)):Nf=Td in dd("script")?function(e){hd.appendChild(dd("script"))[Td]=function(){hd.removeChild(this),Sd(e)}}:function(e){setTimeout(Pd(e),0)});var Id={set:yd,clear:md},Rd=function(){this.head=null,this.tail=null};Rd.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 Md,Ld,Dd,Nd,Fd,Ud=Rd,Hd=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,jd=/web0s(?!.*chrome)/i.test(le),Bd=r,Vd=Zt,zd=P.f,Kd=Id.set,Gd=Ud,Wd=rd,Yd=Hd,Xd=jd,qd=Hf,Zd=Bd.MutationObserver||Bd.WebKitMutationObserver,$d=Bd.document,Jd=Bd.process,Qd=Bd.Promise,ep=zd(Bd,"queueMicrotask"),tp=ep&&ep.value;if(!tp){var np=new Gd,ip=function(){var e,t;for(qd&&(e=Jd.domain)&&e.exit();t=np.get();)try{t()}catch(OR){throw np.head&&Md(),OR}e&&e.enter()};Wd||qd||Xd||!Zd||!$d?!Yd&&Qd&&Qd.resolve?((Nd=Qd.resolve(void 0)).constructor=Qd,Fd=Vd(Nd.then,Nd),Md=function(){Fd(ip)}):qd?Md=function(){Jd.nextTick(ip)}:(Kd=Vd(Kd,Bd),Md=function(){Kd(ip)}):(Ld=!0,Dd=$d.createTextNode(""),new Zd(ip).observe(Dd,{characterData:!0}),Md=function(){Dd.data=Ld=!Ld}),tp=function(e){np.head||Md(),np.add(e)}}var rp=tp,op=function(e){try{return{error:!1,value:e()}}catch(OR){return{error:!0,value:OR}}},ap=r.Promise,sp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,lp=!sp&&!Hf&&"object"==typeof window&&"object"==typeof document,up=r,cp=ap,hp=S,fp=Wt,dp=oi,pp=ft,vp=lp,gp=sp,yp=ve,mp=cp&&cp.prototype,_p=pp("species"),kp=!1,bp=hp(up.PromiseRejectionEvent),wp={CONSTRUCTOR:fp("Promise",(function(){var e=dp(cp),t=e!==String(cp);if(!t&&66===yp)return!0;if(!mp.catch||!mp.finally)return!0;if(!yp||yp<51||!/native code/.test(e)){var n=new cp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[_p]=i,!(kp=n.then((function(){}))instanceof i))return!0}return!t&&(vp||gp)&&!bp})),REJECTION_EVENT:bp,SUBCLASSING:kp},Ep={},Cp=Ie,xp=TypeError,Tp=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw xp("Bad Promise constructor");t=e,n=i})),this.resolve=Cp(t),this.reject=Cp(n)};Ep.f=function(e){return new Tp(e)};var Sp,Pp,Ap=An,Op=Hf,Ip=r,Rp=R,Mp=io,Lp=Oo,Dp=Kf,Np=Ie,Fp=S,Up=ee,Hp=Yf,jp=nd,Bp=Id.set,Vp=rp,zp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(OR){}},Kp=op,Gp=Ud,Wp=Wo,Yp=ap,Xp=wp,qp=Ep,Zp="Promise",$p=Xp.CONSTRUCTOR,Jp=Xp.REJECTION_EVENT,Qp=Wp.getterFor(Zp),ev=Wp.set,tv=Yp&&Yp.prototype,nv=Yp,iv=tv,rv=Ip.TypeError,ov=Ip.document,av=Ip.process,sv=qp.f,lv=sv,uv=!!(ov&&ov.createEvent&&Ip.dispatchEvent),cv="unhandledrejection",hv=function(e){var t;return!(!Up(e)||!Fp(t=e.then))&&t},fv=function(e,t){var n,i,r,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&&yv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(rv("Promise-chain cycle")):(i=hv(n))?Rp(i,n,l,u):l(n)):u(o)}catch(OR){c&&!r&&c.exit(),u(OR)}},dv=function(e,t){e.notified||(e.notified=!0,Vp((function(){for(var n,i=e.reactions;n=i.get();)fv(n,e);e.notified=!1,t&&!e.rejection&&vv(e)})))},pv=function(e,t,n){var i,r;uv?((i=ov.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Ip.dispatchEvent(i)):i={promise:t,reason:n},!Jp&&(r=Ip["on"+e])?r(i):e===cv&&zp("Unhandled promise rejection",n)},vv=function(e){Rp(Bp,Ip,(function(){var t,n=e.facade,i=e.value;if(gv(e)&&(t=Kp((function(){Op?av.emit("unhandledRejection",i,n):pv(cv,n,i)})),e.rejection=Op||gv(e)?2:1,t.error))throw t.value}))},gv=function(e){return 1!==e.rejection&&!e.parent},yv=function(e){Rp(Bp,Ip,(function(){var t=e.facade;Op?av.emit("rejectionHandled",t):pv("rejectionhandled",t,e.value)}))},mv=function(e,t,n){return function(i){e(t,i,n)}},_v=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,dv(e,!0))},kv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw rv("Promise can't be resolved itself");var i=hv(t);i?Vp((function(){var n={done:!1};try{Rp(i,t,mv(kv,n,e),mv(_v,n,e))}catch(OR){_v(n,OR,e)}})):(e.value=t,e.state=1,dv(e,!1))}catch(OR){_v({done:!1},OR,e)}}};$p&&(iv=(nv=function(e){Hp(this,iv),Np(e),Rp(Sp,this);var t=Qp(this);try{e(mv(kv,t),mv(_v,t))}catch(OR){_v(t,OR)}}).prototype,(Sp=function(e){ev(this,{type:Zp,done:!1,notified:!1,parent:!1,reactions:new Gp,rejection:!1,state:0,value:void 0})}).prototype=Mp(iv,"then",(function(e,t){var n=Qp(this),i=sv(jp(this,nv));return n.parent=!0,i.ok=!Fp(e)||e,i.fail=Fp(t)&&t,i.domain=Op?av.domain:void 0,0==n.state?n.reactions.add(i):Vp((function(){fv(i,n)})),i.promise})),Pp=function(){var e=new Sp,t=Qp(e);this.promise=e,this.resolve=mv(kv,t),this.reject=mv(_v,t)},qp.f=sv=function(e){return e===nv||undefined===e?new Pp(e):lv(e)}),Ap({global:!0,constructor:!0,wrap:!0,forced:$p},{Promise:nv}),Lp(nv,Zp,!1,!0),Dp(Zp);var bv=ft("iterator"),wv=!1;try{var Ev=0,Cv={next:function(){return{done:!!Ev++}},return:function(){wv=!0}};Cv[bv]=function(){return this},Array.from(Cv,(function(){throw 2}))}catch(OR){}var xv=function(e,t){if(!t&&!wv)return!1;var n=!1;try{var i={};i[bv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(OR){}return n},Tv=ap,Sv=wp.CONSTRUCTOR||!xv((function(e){Tv.all(e).then(void 0,(function(){}))})),Pv=R,Av=Ie,Ov=Ep,Iv=op,Rv=gf;An({target:"Promise",stat:!0,forced:Sv},{all:function(e){var t=this,n=Ov.f(t),i=n.resolve,r=n.reject,o=Iv((function(){var n=Av(t.resolve),o=[],a=0,s=1;Rv(e,(function(e){var l=a++,u=!1;s++,Pv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Mv=An,Lv=wp.CONSTRUCTOR;ap&&ap.prototype,Mv({target:"Promise",proto:!0,forced:Lv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Dv=R,Nv=Ie,Fv=Ep,Uv=op,Hv=gf;An({target:"Promise",stat:!0,forced:Sv},{race:function(e){var t=this,n=Fv.f(t),i=n.reject,r=Uv((function(){var r=Nv(t.resolve);Hv(e,(function(e){Dv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var jv=R,Bv=Ep;An({target:"Promise",stat:!0,forced:wp.CONSTRUCTOR},{reject:function(e){var t=Bv.f(this);return jv(t.reject,void 0,e),t.promise}});var Vv=nn,zv=ee,Kv=Ep,Gv=function(e,t){if(Vv(e),zv(t)&&t.constructor===e)return t;var n=Kv.f(e);return(0,n.resolve)(t),n.promise},Wv=An,Yv=ap,Xv=wp.CONSTRUCTOR,qv=Gv,Zv=ae("Promise"),$v=!Xv;Wv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return qv($v&&this===Zv?Yv:this,e)}});var Jv=R,Qv=Ie,eg=Ep,tg=op,ng=gf;An({target:"Promise",stat:!0,forced:Sv},{allSettled:function(e){var t=this,n=eg.f(t),i=n.resolve,r=n.reject,o=tg((function(){var n=Qv(t.resolve),r=[],o=0,a=1;ng(e,(function(e){var s=o++,l=!1;a++,Jv(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ig=R,rg=Ie,og=ae,ag=Ep,sg=op,lg=gf,ug="No one promise resolved";An({target:"Promise",stat:!0,forced:Sv},{any:function(e){var t=this,n=og("AggregateError"),i=ag.f(t),r=i.resolve,o=i.reject,a=sg((function(){var i=rg(t.resolve),a=[],s=0,l=1,u=!1;lg(e,(function(e){var c=s++,h=!1;l++,ig(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,ug)))}))})),--l||o(new n(a,ug))}));return a.error&&o(a.value),i.promise}});var cg=An,hg=ap,fg=o,dg=ae,pg=S,vg=nd,gg=Gv,yg=hg&&hg.prototype;cg({target:"Promise",proto:!0,real:!0,forced:!!hg&&fg((function(){yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=vg(this,dg("Promise")),n=pg(e);return this.then(n?function(n){return gg(t,e()).then((function(){return n}))}:e,n?function(n){return gg(t,e()).then((function(){throw n}))}:e)}});var mg=te.Promise,_g=Ep,kg=op;An({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=_g.f(this),n=kg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var bg=mg,wg=n(bg),Eg=An,Cg=In,xg=g([].reverse),Tg=[1,2];Eg({target:"Array",proto:!0,forced:String(Tg)===String(Tg.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}});var Sg=Bc("Array").reverse,Pg=se,Ag=Sg,Og=Array.prototype,Ig=n((function(e){var t=e.reverse;return e===Og||Pg(Og,e)&&t===Og.reverse?Ag:t})),Rg=An,Mg=In,Lg=_i,Dg=ee,Ng=Ji,Fg=jn,Ug=$,Hg=Wn,jg=ft,Bg=Cs,Vg=Oi("slice"),zg=jg("species"),Kg=Array,Gg=Math.max;Rg({target:"Array",proto:!0,forced:!Vg},{slice:function(e,t){var n,i,r,o=Ug(this),a=Fg(o),s=Ng(e,a),l=Ng(void 0===t?a:t,a);if(Mg(o)&&(n=o.constructor,(Lg(n)&&(n===Kg||Mg(n.prototype))||Dg(n)&&null===(n=n[zg]))&&(n=void 0),n===Kg||void 0===n))return Bg(o,s,l);for(i=new(void 0===n?Kg:n)(Gg(l-s,0)),r=0;s<l;s++,r++)s in o&&Hg(i,r,o[s]);return i.length=r,i}});var Wg=Bc("Array").slice,Yg=se,Xg=Wg,qg=Array.prototype,Zg=function(e){var t=e.slice;return e===qg||Yg(qg,e)&&t===qg.slice?Xg:t},$g=n(Zg);function Jg(){Jg=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Pc||function(e,t,n){e[t]=n.value},r="function"==typeof tc?tc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Pc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Dc&&Dc(Dc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;qc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==kc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=b(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"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function b(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.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 w(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]),uh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],qc(e).call(e,w,this),this.reset(!0)}function x(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 i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return hh?hh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=wg);var a=new _(u(t,n,i,r),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 i in t)uh(n).call(n,i);return Ig(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,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,qc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+$g(i).call(i,1))&&(this[i]=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 i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("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 i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;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 i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var Qg=qe,ey=pr;An({target:"Object",stat:!0,forced:o((function(){ey(1)}))},{keys:function(e){return ey(Qg(e))}});var ty=te.Object.keys,ny=n(ty),iy=te.Object.getOwnPropertySymbols,ry=n(iy),oy=ea.filter;An({target:"Array",proto:!0,forced:!Oi("filter")},{filter:function(e){return oy(this,e,arguments.length>1?arguments[1]:void 0)}});var ay=Bc("Array").filter,sy=se,ly=ay,uy=Array.prototype,cy=function(e){var t=e.filter;return e===uy||sy(uy,e)&&t===uy.filter?ly:t},hy=n(cy),fy={exports:{}},dy=An,py=o,vy=$,gy=P.f,yy=A;dy({target:"Object",stat:!0,forced:!yy||py((function(){gy(1)})),sham:!yy},{getOwnPropertyDescriptor:function(e,t){return gy(vy(e),t)}});var my=te.Object,_y=fy.exports=function(e,t){return my.getOwnPropertyDescriptor(e,t)};my.getOwnPropertyDescriptor.sham&&(_y.sham=!0);var ky=fy.exports,by=n(ky),wy=yh,Ey=$,Cy=P,xy=Wn;An({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ey(e),r=Cy.f,o=wy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&xy(a,t,n);return a}});var Ty=te.Object.getOwnPropertyDescriptors,Sy=n(Ty),Py={exports:{}},Ay=An,Oy=A,Iy=Xi.f;Ay({target:"Object",stat:!0,forced:Object.defineProperties!==Iy,sham:!Oy},{defineProperties:Iy});var Ry=te.Object,My=Py.exports=function(e,t){return Ry.defineProperties(e,t)};Ry.defineProperties.sham&&(My.sham=!0);var Ly=Py.exports,Dy=n(Ly),Ny=ao.f("toPrimitive"),Fy=n(Ny);function Uy(e){var t=function(e,t){if("object"!==kc(e)||null===e)return e;var n=e[Fy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==kc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kc(t)?t:String(t)}function Hy(e,t,n){return(t=Uy(t))in e?Pc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jy(e,t){var n=ny(e);if(ry){var i=ry(e);t&&(i=hy(i).call(i,(function(t){return by(e,t).enumerable}))),uh(n).apply(n,i)}return n}function By(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?qc(n=jy(Object(r),!0)).call(n,(function(t){Hy(e,t,r[t])})):Sy?Dy(e,Sy(r)):qc(i=jy(Object(r))).call(i,(function(t){Pc(e,t,by(r,t))}))}return e}function Vy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(OR){return void n(OR)}s.done?t(l):wg.resolve(l).then(i,r)}function zy(e){return function(){var t=this,n=arguments;return new wg((function(i,r){var o=e.apply(t,n);function a(e){Vy(o,i,r,a,s,"next",e)}function s(e){Vy(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Ky=function(e){return e.H265="h265",e.H264="h264",e}(Ky||{}),Gy=function(e){return e.Software="software",e.Hardware="hardware",e}(Gy||{});An({target:"Array",stat:!0},{isArray:In});var Wy=n(te.Array.isArray);function Yy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Xy=Kh,qy=n(Xy),Zy=nn,$y=tf,Jy=Zt,Qy=R,em=qe,tm=function(e,t,n,i){try{return i?t(Zy(n)[0],n[1]):t(n)}catch(OR){$y(e,"throw",OR)}},nm=Uh,im=_i,rm=jn,om=Wn,am=$h,sm=Kh,lm=Array,um=function(e){var t=em(e),n=im(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=Jy(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=sm(t),d=0;if(!f||this===lm&&nm(f))for(a=rm(t),s=n?new this(a):lm(a);a>d;d++)h=o?r(t[d],d):t[d],om(s,d,h);else for(c=(u=am(t,f)).next,s=n?new this:[];!(l=Qy(c,u)).done;d++)h=o?tm(u,r,[l.value,d],!0):l.value,om(s,d,h);return s.length=d,s};An({target:"Array",stat:!0,forced:!xv((function(e){Array.from(e)}))},{from:um});var cm=te.Array.from,hm=n(cm);function fm(e,t){var n;if(e){if("string"==typeof e)return Yy(e,t);var i=$g(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?hm(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yy(e,t):void 0}}function dm(e){return function(e){if(Wy(e))return Yy(e)}(e)||function(e){if(void 0!==tc&&null!=qy(e)||null!=e["@@iterator"])return hm(e)}(e)||fm(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 pm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Pc(e,Uy(i.key),i)}}function gm(e,t,n){return t&&vm(e.prototype,t),n&&vm(e,n),Pc(e,"prototype",{writable:!1}),e}var ym=An,mm=ir.indexOf,_m=Fc,km=E([].indexOf),bm=!!km&&1/km([1],1,-0)<0;ym({target:"Array",proto:!0,forced:bm||!_m("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return bm?km(this,e,t)||0:mm(this,e,t)}});var wm=Bc("Array").indexOf,Em=se,Cm=wm,xm=Array.prototype,Tm=function(e){var t=e.indexOf;return e===xm||Em(xm,e)&&t===xm.indexOf?Cm:t},Sm=n(Tm);function Pm(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=ny(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(ry){var o=ry(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Am=Bc("Array").concat,Om=se,Im=Am,Rm=Array.prototype,Mm=n((function(e){var t=e.concat;return e===Rm||Om(Rm,e)&&t===Rm.concat?Im:t})),Lm=An,Dm=ea.find,Nm="find",Fm=!0;Nm in[]&&Array(1)[Nm]((function(){Fm=!1})),Lm({target:"Array",proto:!0,forced:Fm},{find:function(e){return Dm(this,e,arguments.length>1?arguments[1]:void 0)}});var Um=Bc("Array").find,Hm=se,jm=Um,Bm=Array.prototype,Vm=n((function(e){var t=e.find;return e===Bm||Hm(Bm,e)&&t===Bm.find?jm:t})),zm={exports:{}},Km=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Gm=o,Wm=ee,Ym=k,Xm=Km,qm=Object.isExtensible,Zm=Gm((function(){qm(1)}))||Xm?function(e){return!!Wm(e)&&((!Xm||"ArrayBuffer"!=Ym(e))&&(!qm||qm(e)))}:qm,$m=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Jm=An,Qm=g,e_=rr,t_=ee,n_=Je,i_=$t.f,r_=jr,o_=zr,a_=Zm,s_=$m,l_=!1,u_=it("meta"),c_=0,h_=function(e){i_(e,u_,{value:{objectID:"O"+c_++,weakData:{}}})},f_=zm.exports={enable:function(){f_.enable=function(){},l_=!0;var e=r_.f,t=Qm([].splice),n={};n[u_]=1,e(n).length&&(r_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===u_){t(i,r,1);break}return i},Jm({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 d_=zm.exports,p_=An,v_=r,g_=d_,y_=o,m_=yn,__=gf,k_=Yf,b_=S,w_=ee,E_=Oo,C_=$t.f,x_=ea.forEach,T_=A,S_=Wo.set,P_=Wo.getterFor,A_=io,O_=Hr,I_=oo,R_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:A_(e,i,t[i],n);return e},M_=Zt,L_=Yf,D_=G,N_=gf,F_=du,U_=pu,H_=Kf,j_=A,B_=d_.fastKey,V_=Wo.set,z_=Wo.getterFor,K_={getConstructor:function(e,t,n,i){var r=e((function(e,r){L_(e,o),V_(e,{type:t,index:O_(null),first:void 0,last:void 0,size:0}),j_||(e.size=0),D_(r)||N_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=z_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=B_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),j_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=B_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return R_(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),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),j_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=M_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),R_(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_&&I_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=z_(t),o=z_(i);F_(e,t,(function(e,t){V_(this,{type:i,target:e,state:r(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)?U_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,U_(void 0,!0))}),n?"entries":"values",!n,!0),H_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=v_[e],l=s&&s.prototype,u={};if(T_&&b_(s)&&(o||l.forEach&&!y_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){S_(k_(t,c),{type:e,collection:new s}),null!=n&&__(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=P_(e);x_(["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,i){var r=h(this).collection;if(!t&&o&&!w_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||C_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),g_.enable();E_(i,e,!1,!0),u[e]=i,p_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),K_);var G_=te.Map,W_=Zt,Y_=R,X_=Ie,q_=$f,Z_=G,$_=gf,J_=[].push,Q_=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return q_(this),(t=void 0!==a)&&X_(a),Z_(e)?new this:(n=[],t?(i=0,r=W_(a,o>2?arguments[2]:void 0),$_(e,(function(e){Y_(J_,n,r(e,i++))}))):$_(e,J_,{that:n}),new this(n))};An({target:"Map",stat:!0,forced:!0},{from:Q_});var ek=Cs,tk=function(){return new this(ek(arguments))};An({target:"Map",stat:!0,forced:!0},{of:tk});var nk=Se,ik=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(nk(e)+" is not a map")},rk=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ok=ae("Map"),ak={Map:ok,set:rk("set",2),get:rk("get",1),has:rk("has",1),remove:rk("delete",1),proto:ok.prototype},sk=ik,lk=ak.remove;An({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=sk(this),n=!0,i=0,r=arguments.length;i<r;i++)e=lk(t,arguments[i]),n=n&&e;return!!n}});var uk=ik,ck=ak.get,hk=ak.has,fk=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=uk(this);return hk(r,e)?(n=ck(r,e),"update"in t&&(n=t.update(n,e,r),fk(r,e,n)),n):(i=t.insert(e,r),fk(r,e,i),i)}});var dk=R,pk=function(e,t,n){for(var i,r,o=n||e.next;!(i=dk(o,e)).done;)if(void 0!==(r=t(i.value)))return r},vk=function(e,t,n){return n?pk(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},gk=Zt,yk=ik,mk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=yk(this),n=gk(e,arguments.length>1?arguments[1]:void 0);return!1!==mk(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var _k=Zt,kk=ik,bk=vk,wk=ak.Map,Ek=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=kk(this),n=_k(e,arguments.length>1?arguments[1]:void 0),i=new wk;return bk(t,(function(e,r){n(e,r,t)&&Ek(i,r,e)})),i}});var Ck=Zt,xk=ik,Tk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=xk(this),n=Ck(e,arguments.length>1?arguments[1]:void 0),i=Tk(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var Sk=Zt,Pk=ik,Ak=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Pk(this),n=Sk(e,arguments.length>1?arguments[1]:void 0),i=Ak(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Ok=An,Ik=R,Rk=S,Mk=Ie,Lk=gf,Dk=ak.Map,Nk=g([].push);Ok({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Rk(this)?this:Dk);Mk(t);var i=Mk(n.has),r=Mk(n.get),o=Mk(n.set);return Lk(e,(function(e){var a=t(e);Ik(i,n,a)?Nk(Ik(r,n,a),e):Ik(o,n,a,[e])})),n}});var Fk=function(e,t){return e===t||e!=e&&t!=t},Uk=ik,Hk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Hk(Uk(this),(function(t){if(Fk(t,e))return!0}),!0)}});var jk=R,Bk=gf,Vk=S,zk=Ie,Kk=ak.Map;An({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Vk(this)?this:Kk);zk(t);var i=zk(n.set);return Bk(e,(function(e){jk(i,n,t(e),e)})),n}});var Gk=ik,Wk=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Wk(Gk(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Yk=Zt,Xk=ik,qk=vk,Zk=ak.Map,$k=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Xk(this),n=Yk(e,arguments.length>1?arguments[1]:void 0),i=new Zk;return qk(t,(function(e,r){$k(i,n(e,r,t),e)})),i}});var Jk=Zt,Qk=ik,eb=vk,tb=ak.Map,nb=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Qk(this),n=Jk(e,arguments.length>1?arguments[1]:void 0),i=new tb;return eb(t,(function(e,r){nb(i,r,n(e,r,t))})),i}});var ib=ik,rb=gf,ob=ak.set;An({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=ib(this),n=arguments.length,i=0;i<n;)rb(arguments[i++],(function(e,n){ob(t,e,n)}),{AS_ENTRIES:!0});return t}});var ab=Ie,sb=ik,lb=vk,ub=TypeError;An({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=sb(this),n=arguments.length<2,i=n?void 0:arguments[1];if(ab(e),lb(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw ub("Reduce of empty map with no initial value");return i}});var cb=Zt,hb=ik,fb=vk;An({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=hb(this),n=cb(e,arguments.length>1?arguments[1]:void 0);return!0===fb(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var db=Ie,pb=ik,vb=TypeError,gb=ak.get,yb=ak.has,mb=ak.set;An({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=pb(this),i=arguments.length;db(t);var r=yb(n,e);if(!r&&i<3)throw vb("Updating absent value");var o=r?gb(n,e):db(i>2?arguments[2]:void 0)(e,n);return mb(n,e,t(o,e,n)),n}});var _b=R,kb=Ie,bb=S,wb=nn,Eb=TypeError,Cb=function(e,t){var n,i=wb(this),r=kb(i.get),o=kb(i.has),a=kb(i.set),s=arguments.length>2?arguments[2]:void 0;if(!bb(t)&&!bb(s))throw Eb("At least one callback required");return _b(o,i,e)?(n=_b(r,i,e),bb(t)&&(n=t(n),_b(a,i,e,n))):bb(s)&&(n=s(),_b(a,i,e,n)),n};An({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Cb}),An({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Cb});var xb=G_,Tb=n(xb),Sb=n(xb),Pb=ea.map;An({target:"Array",proto:!0,forced:!Oi("map")},{map:function(e){return Pb(this,e,arguments.length>1?arguments[1]:void 0)}});var Ab=Bc("Array").map,Ob=se,Ib=Ab,Rb=Array.prototype,Mb=n((function(e){var t=e.map;return e===Rb||Ob(Rb,e)&&t===Rb.map?Ib:t})),Lb=n(bg),Db=n(cy),Nb=ir.includes;An({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Nb(this,e,arguments.length>1?arguments[1]:void 0)}});var Fb=Bc("Array").includes,Ub=ee,Hb=k,jb=ft("match"),Bb=function(e){var t;return Ub(e)&&(void 0!==(t=e[jb])?!!t:"RegExp"==Hb(e))},Vb=TypeError,zb=ft("match"),Kb=An,Gb=function(e){if(Bb(e))throw Vb("The method doesn't accept regular expressions");return e},Wb=X,Yb=Yi,Xb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[zb]=!1,"/./"[e](t)}catch(OR){}}return!1},qb=g("".indexOf);Kb({target:"String",proto:!0,forced:!Xb("includes")},{includes:function(e){return!!~qb(Yb(Wb(this)),Yb(Gb(e)),arguments.length>1?arguments[1]:void 0)}});var Zb=Bc("String").includes,$b=se,Jb=Fb,Qb=Zb,ew=Array.prototype,tw=String.prototype,nw=n((function(e){var t=e.includes;return e===ew||$b(ew,e)&&t===ew.includes?Jb:"string"==typeof e||e===tw||$b(tw,e)&&t===tw.includes?Qb:t})),iw=n(Tm),rw=n(ty),ow=n(Zg),aw=Se,sw=TypeError,lw=function(e,t){if(!delete e[t])throw sw("Cannot delete property "+aw(t)+" of "+aw(e))},uw=An,cw=qe,hw=Ji,fw=Dn,dw=jn,pw=eh,vw=Vn,gw=Ti,yw=Wn,mw=lw,_w=Oi("splice"),kw=Math.max,bw=Math.min;uw({target:"Array",proto:!0,forced:!_w},{splice:function(e,t){var n,i,r,o,a,s,l=cw(this),u=dw(l),c=hw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=bw(kw(fw(t),0),u-c)),vw(u+n-i),r=gw(l,i),o=0;o<i;o++)(a=c+o)in l&&yw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:mw(l,s);for(o=u;o>u-i+n;o--)mw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:mw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return pw(l,u-i+n),r}});var ww=Bc("Array").splice,Ew=se,Cw=ww,xw=Array.prototype,Tw=n((function(e){var t=e.splice;return e===xw||Ew(xw,e)&&t===xw.splice?Cw:t}));An({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Sw=n(te.Number.isNaN),Pw="\t\n\v\f\r \u2028\u2029\ufeff",Aw=X,Ow=Yi,Iw=Pw,Rw=g("".replace),Mw=RegExp("^["+Iw+"]+"),Lw=RegExp("(^|[^"+Iw+"])["+Iw+"]+$"),Dw=function(e){return function(t){var n=Ow(Aw(t));return 1&e&&(n=Rw(n,Mw,"")),2&e&&(n=Rw(n,Lw,"$1")),n}},Nw={start:Dw(1),end:Dw(2),trim:Dw(3)},Fw=r,Uw=o,Hw=g,jw=Yi,Bw=Nw.trim,Vw=Pw,zw=Fw.parseInt,Kw=Fw.Symbol,Gw=Kw&&Kw.iterator,Ww=/^[+-]?0x/i,Yw=Hw(Ww.exec),Xw=8!==zw(Vw+"08")||22!==zw(Vw+"0x16")||Gw&&!Uw((function(){zw(Object(Gw))}))?function(e,t){var n=Bw(jw(e));return zw(n,t>>>0||(Yw(Ww,n)?16:10))}:zw;An({global:!0,forced:parseInt!=Xw},{parseInt:Xw});var qw=n(te.parseInt),Zw=Bc("Array").keys,$w=ti,Jw=Je,Qw=se,eE=Zw,tE=Array.prototype,nE={DOMTokenList:!0,NodeList:!0},iE=n((function(e){var t=e.keys;return e===tE||Qw(tE,e)&&t===tE.keys||Jw(nE,$w(e))?eE:t})),rE=n(iy),oE=n(ky),aE=n(Ty),sE=n(Ly),lE=n(Sc),uE=n(ec),cE=n(mc),hE=n(ch),fE=n(Lc),dE=g,pE=Ie,vE=ee,gE=Je,yE=Cs,mE=a,_E=Function,kE=dE([].concat),bE=dE([].join),wE={},EE=mE?_E.bind:function(e){var t=pE(this),n=t.prototype,i=yE(arguments,1),r=function(){var n=kE(i,yE(arguments));return this instanceof r?function(e,t,n){if(!gE(wE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";wE[t]=_E("C,a","return new C("+bE(i,",")+")")}return wE[t](e,n)}(t,n.length,n):t.apply(e,n)};return vE(n)&&(r.prototype=n),r},CE=An,xE=h,TE=EE,SE=$f,PE=nn,AE=ee,OE=Hr,IE=o,RE=ae("Reflect","construct"),ME=Object.prototype,LE=[].push,DE=IE((function(){function e(){}return!(RE((function(){}),[],e)instanceof e)})),NE=!IE((function(){RE((function(){}))})),FE=DE||NE;CE({target:"Reflect",stat:!0,forced:FE,sham:FE},{construct:function(e,t){SE(e),PE(t);var n=arguments.length<3?e:SE(arguments[2]);if(NE&&!DE)return RE(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 i=[null];return xE(LE,i,t),new(xE(TE,e,i))}var r=n.prototype,o=OE(AE(r)?r:ME),a=xE(e,o,t);return AE(a)?a:o}});var UE=te.Reflect.construct,HE=n(UE),jE=n(UE),BE=Je,VE=R,zE=ee,KE=nn,GE=function(e){return void 0!==e&&(BE(e,"value")||BE(e,"writable"))},WE=P,YE=xl;An({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return KE(t)===o?t[n]:(i=WE.f(t,n))?GE(i)?i.value:void 0===i.get?void 0:VE(i.get,o):zE(r=YE(t))?e(r,n,o):void 0}});var XE=te.Reflect.get,qE=n(XE),ZE=n(XE),$E=n(Xy),JE=n(cm),QE=n(Ny);function eC(e,t){var n=rw(e);if(rE){var i=rE(e);t&&(i=Db(i).call(i,(function(t){return oE(e,t).enumerable}))),n.push.apply(n,i)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eC(Object(n),!0).forEach((function(t){aC(e,t,n[t])})):aE?sE(e,aE(n)):eC(Object(n)).forEach((function(t){lE(e,t,oE(n,t))}))}return e}function nC(e){return(nC="function"==typeof uE&&"symbol"==typeof cE?function(e){return typeof e}:function(e){return e&&"function"==typeof uE&&e.constructor===uE&&e!==uE.prototype?"symbol":typeof e})(e)}function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),lE(e,gC(i.key),i)}}function oC(e,t,n){return t&&rC(e.prototype,t),n&&rC(e,n),lE(e,"prototype",{writable:!1}),e}function aC(e,t,n){return(t=gC(t))in e?lE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sC(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}}),lE(e,"prototype",{writable:!1}),t&&uC(e,t)}function lC(e){return(lC=hE?fE.bind():function(e){return e.__proto__||fE(e)})(e)}function uC(e,t){return(uC=hE?hE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hC(e,t){if(t&&("object"===kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cC(e)}function fC(e){var t=function(){if("undefined"==typeof Reflect||!jE)return!1;if(jE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jE(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=lC(e);if(t){var r=lC(this).constructor;n=jE(i,arguments,r)}else n=i.apply(this,arguments);return hC(this,n)}}function dC(){return dC="undefined"!=typeof Reflect&&ZE?ZE.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=lC(e)););return e}(e,t);if(i){var r=oE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},dC.apply(this,arguments)}function pC(e){return function(e){if(Array.isArray(e))return vC(e)}(e)||function(e){if(void 0!==uE&&null!=$E(e)||null!=e["@@iterator"])return JE(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return vC(e,t);var i=ow(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return JE(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return vC(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 vC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gC(e){var t=function(e,t){if("object"!==kc(e)||null===e)return e;var n=e[QE];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==kc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kc(t)?t:String(t)}var yC=A,mC=g,_C=R,kC=o,bC=pr,wC=to,EC=M,CC=qe,xC=K,TC=Object.assign,SC=Object.defineProperty,PC=mC([].concat),AC=!TC||kC((function(){if(yC&&1!==TC({b:1},TC(SC({},"a",{enumerable:!0,get:function(){SC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=TC({},e)[n]||bC(TC({},t)).join("")!=i}))?function(e,t){for(var n=CC(e),i=arguments.length,r=1,o=wC.f,a=EC.f;i>r;)for(var s,l=xC(arguments[r++]),u=o?PC(bC(l),o(l)):bC(l),c=u.length,h=0;c>h;)s=u[h++],yC&&!_C(a,l,s)||(n[s]=l[s]);return n}:TC,OC=AC;An({target:"Object",stat:!0,arity:2,forced:Object.assign!==OC},{assign:OC});var IC=n(te.Object.assign),RC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,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 i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?ow(i).call(i,1):i);return rE?Mm(r).call(r,rE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,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,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,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 f,d=c.length;for(u=0;u<d;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,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];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,i,r){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||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&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 i,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}(RC);var MC=n(RC.exports),LC=Dn,DC=Yi,NC=X,FC=RangeError,UC=function(e){var t=DC(NC(this)),n="",i=LC(e);if(i<0||i==1/0)throw FC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},HC=g,jC=Un,BC=Yi,VC=X,zC=HC(UC),KC=HC("".slice),GC=Math.ceil,WC=function(e){return function(t,n,i){var r,o,a=BC(VC(t)),s=jC(n),l=a.length,u=void 0===i?" ":BC(i);return s<=l||""==u?a:((o=zC(u,GC((r=s-l)/u.length))).length>r&&(o=KC(o,0,r)),e?a+o:o+a)}},YC={start:WC(!1),end:WC(!0)},XC=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),qC=YC.start;An({target:"String",proto:!0,forced:XC},{padStart:function(e){return qC(this,e,arguments.length>1?arguments[1]:void 0)}});var ZC=Bc("String").padStart,$C=se,JC=ZC,QC=String.prototype,ex=n((function(e){var t=e.padStart;return"string"==typeof e||e===QC||$C(QC,e)&&t===QC.padStart?JC:t})),tx=r,nx=o,ix=Yi,rx=Nw.trim,ox=Pw,ax=g("".charAt),sx=tx.parseFloat,lx=tx.Symbol,ux=lx&&lx.iterator,cx=1/sx(ox+"-0")!=-1/0||ux&&!nx((function(){sx(Object(ux))}))?function(e){var t=rx(ix(e)),n=sx(t);return 0===n&&"-"==ax(t,0)?-0:n}:sx;An({global:!0,forced:parseFloat!=cx},{parseFloat:cx});var hx=n(te.parseFloat),fx=gl.PROPER,dx=o,px=Pw,vx=Nw.trim;An({target:"String",proto:!0,forced:function(e){return dx((function(){return!!px[e]()||"
"!=="
"[e]()||fx&&px[e].name!==e}))}("trim")},{trim:function(){return vx(this)}});var gx=Bc("String").trim,yx=se,mx=gx,_x=String.prototype,kx=n((function(e){var t=e.trim;return"string"==typeof e||e===_x||yx(_x,e)&&t===_x.trim?mx:t})),bx=qr,wx=Math.floor,Ex=function(e,t){var n=e.length,i=wx(n/2);return n<8?Cx(e,t):xx(e,Ex(bx(e,0,i),t),Ex(bx(e,i),t),t)},Cx=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},xx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},Tx=Ex,Sx=le.match(/firefox\/(\d+)/i),Px=!!Sx&&+Sx[1],Ax=/MSIE|Trident/.test(le),Ox=le.match(/AppleWebKit\/(\d+)\./),Ix=!!Ox&&+Ox[1],Rx=An,Mx=g,Lx=Ie,Dx=qe,Nx=jn,Fx=lw,Ux=Yi,Hx=o,jx=Tx,Bx=Fc,Vx=Px,zx=Ax,Kx=ve,Gx=Ix,Wx=[],Yx=Mx(Wx.sort),Xx=Mx(Wx.push),qx=Hx((function(){Wx.sort(void 0)})),Zx=Hx((function(){Wx.sort(null)})),$x=Bx("sort"),Jx=!Hx((function(){if(Kx)return Kx<70;if(!(Vx&&Vx>3)){if(zx)return!0;if(Gx)return Gx<603;var e,t,n,i,r="";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(i=0;i<47;i++)Wx.push({k:t+i,v:n})}for(Wx.sort((function(e,t){return t.v-e.v})),i=0;i<Wx.length;i++)t=Wx[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));Rx({target:"Array",proto:!0,forced:qx||!Zx||!$x||!Jx},{sort:function(e){void 0!==e&&Lx(e);var t=Dx(this);if(Jx)return void 0===e?Yx(t):Yx(t,e);var n,i,r=[],o=Nx(t);for(i=0;i<o;i++)i in t&&Xx(r,t[i]);for(jx(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Ux(t)>Ux(n)?1:-1}}(e)),n=Nx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Fx(t,i++);return t}});var Qx,eT=Bc("Array").sort,tT=se,nT=eT,iT=Array.prototype,rT=n((function(e){var t=e.sort;return e===iT||tT(iT,e)&&t===iT.sort?nT:t})),oT="undefined"!=typeof window&&window.location&&iw(Qx=window.location.href).call(Qx,"xgplayerdebugger=1")>-1,aT="color: #525252; background-color: #90ee90;",sT="color: #525252; background-color: red;",lT="color: #525252; background-color: yellow; ",uT="%c[xgplayer]",cT={config:{debug:oT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Mm(t=[uT,aT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Mm(t=[uT,lT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Mm(t=[uT,sT,e]).call(t,o))}}};var hT=function(){function e(t){iC(this,e),this.bufferedList=t}return oC(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}(),fT={};function dT(e){var t=nC(e);return null!==e&&("object"===t||"function"===t)}function pT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(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,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=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,dT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function vT(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}fT.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]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,rw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},fT.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 i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&fT.addClass(r,n),t&&rw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return cT.logError("util.createDomFromHtml",o),null}},fT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===nC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},fT.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(n){fT.hasClass(e,t)||(e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},fT.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(n){fT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},fT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){fT.hasClass(e,t)?fT.removeClass(e,t):fT.addClass(e,t)}))},fT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===fT.typeOf(e[n]))t.push(e[n]);else if("Object"===fT.typeOf(e[n])){var i;Mb(i=rw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},fT.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(i){cT.logError("util.findDom",i),0===iw(n).call(n,"#")&&(e=t.getElementById(ow(n).call(n,1)))}return e},fT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},fT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},fT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=ex(fT).call(fT,Math.floor(e/3600),2,0),n=ex(fT).call(fT,Math.floor((e-3600*t)/60),2,0),i=ex(fT).call(fT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},fT.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},fT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},fT.deepCopy=function(e,t){if("Object"===fT.typeOf(t)&&"Object"===fT.typeOf(e))return rw(t).forEach((function(n){if("Object"!==fT.typeOf(t[n])||t[n]instanceof Node)if("Array"===fT.typeOf(t[n])){var i;e[n]="Array"===fT.typeOf(e[n])?Mm(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:fT.deepCopy(e[n],t[n])})),e},fT.deepMerge=function(e,t){var n;return Mb(n=rw(t)).call(n,(function(n){var i;"Array"===fT.typeOf(t[n])&&"Array"===fT.typeOf(e[n])?"Array"===fT.typeOf(e[n])&&(i=e[n]).push.apply(i,pC(t[n])):fT.typeOf(e[n])!==fT.typeOf(t[n])||null===e[n]||"Object"!==fT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):fT.deepMerge(e[n],t[n])})),e},fT.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},fT.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""},fT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},fT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},fT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),fT.clearTimeout(e,i)}),n);return e._timers.push(i),i},fT.clearTimeout=function(e,t){var n=e._timers;if("Array"===fT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Tw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},fT.clearAllTimers=function(e){var t=e._timers;"Array"===fT.typeOf(t)&&(Mb(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},fT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=fT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(iw(n).call(n,e)>-1&&iw(i).call(i,e)>-1)||(u=hx(kx(t=ow(n).call(n,0,iw(n).call(n,e))).call(t)),c=hx(kx(r=ow(i).call(i,0,iw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Mm(r="".concat(u)).call(r,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(f=Mm(d=Mm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},fT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(qw(e,16))})),Mm(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},fT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},fT.checkIsFunction=function(e){return e&&"function"==typeof e},fT.checkIsObject=function(e){return null!==e&&"object"===nC(e)},fT.hide=function(e){e.style.display="none"},fT.show=function(e,t){e.style.display=t||"block"},fT.isUndefined=function(e){if(null==e)return!0},fT.isNotNull=function(e){return!(null==e)},fT.setStyleFromCsstext=function(e,t){if(t)if("String"===fT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Mb(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Mb(i=rw(t)).call(i,(function(n){e.style[n]=t[n]}))}},fT.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"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Mb(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(iw(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",""),Mb(t=rw(a)).call(t,(function(t){e.style[t]=a[t]})),o},fT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Mb(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},fT.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 i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},fT.stopPropagation=function(e){e&&e.stopPropagation()},fT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},fT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},fT.checkTouchSupport=function(){return"ontouchstart"in window},fT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});rT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new hT(r)},fT.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}},fT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},fT.getHostFromUrl=function(e){if("String"!==fT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},fT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},fT.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},fT.isBlob=function(e){return/^blob/.test(e)},fT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=qw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=qw(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)}))},fT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},fT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},fT.createPositionBar=function(e,t){var n=fT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},fT.getTransformStyle=function(){var e,t,n,i=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(i.scale||1,") translate(")).call(n,i.x||0,"%, ")).call(t,i.y||0,"%) rotate(")).call(e,i.rotate||0,"deg)")},fT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},fT.getIndexByTime=function(e,t){var n=t.length,i=-1;if(n<1)return i;if(e<=t[0].end||n<2)i=0;else if(e>t[n-1].end)i=n-1;else for(var r=1;r<n;r++)if(e>t[r-1].end&&e<=t[r].end){i=r;break}return i},fT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=-1;if((i=n>=0&&n<t.length?n:fT.getIndexByTime(e,t))<0)return-1;var r=t.length,o=t[i],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&i>=r-1?s:-1},fT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var i=0;i<t.length;i++)if(e<=t[i].duration){n=i;break}if(-1!==n){var r=t[n].start;return n-1<0?r+e:r+(e-t[n-1].duration)}return e};var gT=/(Android)\s([\d.]+)/,yT=/(Version)\/([\d.]+)/,mT=["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"],_T={get device(){return _T.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Mm(e=[]).call(e,Db(t=rw(i)).call(t,(function(e){return i[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,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o,s=!(a||i||n||o),l=/(?:iPad|PlayBook)/.test(e);return{isTablet:o,isPhone:a,isIpad:l,isIos:a||l,isAndroid:i,isPc:s,isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?yT:gT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?qw(i[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&&Mb(mT).call(mT,(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(OR){return this._logger.error(e,OR),!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 Lb.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Lb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Lb.resolve(t)}}},kT="3.0.10-alpha.4",bT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},wT={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},ET=oC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};iC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,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,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;wT[p]&&(p=wT[p]);var v={playerVersion:kT,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:fT.getHostFromUrl(u||c)};return n.ext&&Mb(r=rw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:kT,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=i?(i[arguments[0]]||{}).msg:"",g}})),CT="play",xT="ended",TT="pause",ST="error",PT="seeked",AT="timeupdate",OT="waiting",IT="canplay",RT="durationchange",MT="volumechange",LT="loadeddata",DT="emptied",NT="focus",FT="blur",UT="ready",HT="urlNull",jT="autoplay_started",BT="autoplay_was_prevented",VT="complete",zT="replay",KT="destroy",GT="urlchange",WT="download_speed_change",YT="fullscreen_change",XT="cssFullscreen_change",qT="mini_state_change",ZT="definition_change",$T="before_definition_change",JT="after_definition_change",QT="retry",eS="video_resize",tS="pip_change",nS="playnext",iS="shortcut",rS="user_action",oS="reset",aS="source_error",sS="source_success",lS=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],uS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:JT,AUTOPLAY_PREVENTED:BT,AUTOPLAY_STARTED:jT,BEFORE_DEFINITION_CHANGE:$T,BUFFER_CHANGE:"bufferedChange",CANPLAY:IT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:VT,CSS_FULLSCREEN_CHANGE:XT,DEFINITION_CHANGE:ZT,DESTROY:KT,DOWNLOAD_SPEED_CHANGE:WT,DURATION_CHANGE:RT,EMPTIED:DT,ENDED:xT,ERROR:ST,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:YT,LOADED_DATA:LT,LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",MINI_STATE_CHANGE:qT,PAUSE:TT,PIP_CHANGE:tS,PLAY:CT,PLAYER_BLUR:FT,PLAYER_FOCUS:NT,PLAYING:"playing",PLAYNEXT:nS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:UT,REPLAY:zT,RESET:oS,RETRY:QT,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:PT,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:iS,SOURCE_ERROR:aS,SOURCE_SUCCESS:sS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:AT,URL_CHANGE:GT,URL_NULL:HT,USER_ACTION:rS,VIDEO_EVENTS:lS,VIDEO_RESIZE:eS,VOLUME_CHANGE:MT,WAITING:OT,XGLOG:"xglog"});function cS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var hS=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=IC({},{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 r=e["x5-video-player-type"]||e.x5VideoPlayerType;return _T.isWeixin&&_T.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(i.mediaConfig,"muted")&&(i.mediaConfig.muted=!0),i.media=fT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===fT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return oC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Mb(t=rw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Mb(t=rw(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=Mb(lS).call(lS,(function(t){var n,i=Mm(n="on".concat(t.charAt(0).toUpperCase())).call(n,ow(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),aC({},t,function(e,t){return function(n,i){var r={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:fT.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&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=cS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw cS.call(t,e,r),s}}else cS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=rw(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=rw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=rw(t)[0],r=Mm(n="on".concat(i.charAt(0).toUpperCase())).call(n,ow(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){n.media.appendChild(fT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._videoSourceIndex=i.length,this._vLoadeddata=function(e){n.emit(sS,{src:e.target.currentSrc,host:fT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===rw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=qw(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var i={code:4,message:"sources_load_error"};r?r.error(e,i):n.errorHandler("error",i)}var o=bT[4];n.emit(aS,new ET(n,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[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,i=n.code?bT[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new ET(this,{errorType:i,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 i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);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?fT.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(GT,e),this.emit(OT),this._currentTime=0,this._duration=0,fT.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===fT.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 i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"emit",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"on",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"once",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"off",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){dC(lC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(MC),fS=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"}};iC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return oC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.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,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,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}(),dS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],pS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],vS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],gS="data-xgplayerid";function yS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Mm(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Mm(t=[e]).call(t,r))})):n.call.apply(n,Mm(s=[e]).call(s,o)))}function mS(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 i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Mm(a=[this]).call(a,ow(Array.prototype).call(arguments)))}catch(y){var l,u;throw y.message=Mm(l=Mm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,y.message),y}if(this.__hooks&&this.__hooks[e])try{var c,h,f,d=(h=this.__hooks[e]).call.apply(h,Mm(c=[this,this]).call(c,ow(Array.prototype).call(arguments)));if(d)if(d.then)d.then((function(e){var i;!1!==e&&yS.apply(void 0,Mm(i=[o,t,n.next]).call(i,pC(r)))})).catch((function(e){throw e}));else yS.apply(void 0,Mm(f=[this,t,n.next]).call(f,ow(Array.prototype).call(arguments)));else if(void 0===d){var p;yS.apply(void 0,Mm(p=[this,t,n.next]).call(p,ow(Array.prototype).call(arguments)))}}catch(y){var v,g;throw y.message=Mm(v=Mm(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(v,y.message),y}else yS.apply(void 0,Mm(i=[this,t,n.next]).call(i,ow(Array.prototype).call(arguments)))}.bind(this)}function _S(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 kS(e,t){var n=this.__hooks;n&&delete n[e]}function bS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function wS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function ES(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Mb(t).call(t,(function(t){e.__hooks[t]=null})),lE(e,"hooks",{get:function(){var t;return e.__hooks&&Mb(t=rw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function CS(e){e.__hooks=null}function xS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];var a;if(!e.__hooks||!e.__hooks[t])return n.call.apply(n,Mm(a=[e,e]).call(a,r));var s,l,u=(l=e.__hooks[t]).call.apply(l,Mm(s=[e,e]).call(s,r));if(u&&u.then)u.then((function(t){var i;return!1===t?null:n.call.apply(n,Mm(i=[e,e]).call(i,r))})).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,r))}}function TS(e,t){var n;cT.logError(Mm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var SS=function(){function e(t){iC(this,e),fT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),ES(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return oC(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=fT.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)})):TS(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(i){n.__onceEvents[i]=t,n.player.once(e,t)})):TS(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(i){delete n.__events[e],n.player.off(i,t)})):TS(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){rw(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 i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Mm(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=tC(tC({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return kS.call.apply(kS,Mm(n=[this]).call(n,ow(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,i=this.pluginName;this.offAll(),fT.clearAllTimers(this),fT.checkIsFunction(this.destroy)&&this.destroy(),Mb(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),CS(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&lE(e,n,t[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var PS=Element.prototype;PS.matches=PS.matchesSelector||PS.mozMatchesSelector||PS.msMatchesSelector||PS.oMatchesSelector||PS.webkitMatchesSelector}var AS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function OS(e,t,n,i,r){var o=IS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function IS(e,t,n,i){return function(n){n.delegateTarget=AS(n.target,t),n.delegateTarget&&i.call(e,n)}}var RS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?OS.apply(null,arguments):"function"==typeof n?OS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Mb(Array.prototype).call(e,(function(e){return OS(e,t,n,i,r)})))},MS=n(RS),LS={CONTROLS:"controls",ROOT:"root"},DS={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 NS(e){return!!e&&(iw(e)&&/^(?:http|data:|\/)/.test(e))}function FS(e,t){var n,i,r=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 fT.addClass(e,r),Mb(i=rw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(NS(e)||NS(e.url))return o.src=NS(e)?e:e.url||"",s=fT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(fT.addClass(s,r),Mb(l=rw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(cT.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(c){return cT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?fT.createDomFromHtml(e,o,r):(cT.logWarn(Mm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function US(e,t){var n,i=t.config.icons||t.playerConfig.icons;Mb(n=rw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===nC(e)&&e.class&&"string"==typeof e.class?Mm(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===nC(e)&&e.attr&&"object"===nC(e.attr)&&Mb(n=rw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=FS(i[n],n,o,a,t.pluginName)),!s&&r&&(s=FS(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var HS=function(e){sC(n,e);var t=fC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iC(this,n),(e=t.call(this,i)).__delegates=[],e}return oC(n,[{key:"__init",value:function(e){if(dC(lC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,US(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Mb(a=rw(r=s)).call(a,(function(e){lE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw cT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Mm(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=fT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,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"===nC(n))if(rw(n).length>0)Mb(t=rw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===nC(a)&&"function"==typeof a.plugin&&(i=a.options?fT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];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||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{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]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{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,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);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 i,r=Mm(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Tw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===fT.typeOf(e)?this.root.style[e]=t:void("Object"===fT.typeOf(e)&&Mb(n=rw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===fT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===fT.typeOf(e)&&Mb(n=rw(e)).call(n,(function(t){i.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?Vm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return cT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Mb(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Mb(i=this._children).call(i,(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)),dC(lC(n.prototype),"__destroy",this).call(this),this.icons={},Mb(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(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,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=MS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=MS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return LS}},{key:"POSITIONS",get:function(){return DS}}]),n}(SS),jS=function(){function e(){var t=this;if(iC(this,e),aC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return dT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),pT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return oC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=e.getAttribute(gS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Mb(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{this.observer&&this.observer.unobserve(e)}catch(r){}this.observer&&this.observer.unobserve(e),i>-1&&Tw(n=this.__handlers).call(n,i,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(OR){console.error(OR)}return!0}return!1}}]),e}(),BS=null;var VS={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},BS||(BS=new jS),BS.addObserver(t,n)),0===rw(this.pluginGroup).length&&(e.isUserActive=!0),this.pluginGroup[i]={_player:e,_originalOptions:e.config||{},_plugins:{}}},checkPlayerRoot:function(e){if(this.pluginGroup){for(var t=rw(this.pluginGroup),n=0;n<t.length;n++){var i=this.pluginGroup[t[n]]._player;if(i.root===e)return i}return null}return null},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},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=rw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===fT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Lb.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Lb((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},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 i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=this.pluginGroup[i]._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=rw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===fT.typeOf(u)?n.config=IC({},n.config,o[s[l]]):"Boolean"===fT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&rw(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{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[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(r){var i;console.error(Mm(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},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 i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Lb((function(e){e()}))}return new Lb((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Lb.all(e._loadingPlugins):Lb.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];rw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Lb.all(Mm(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;rw(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 i=this.pluginGroup[n]._plugins;rw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(OR){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;rw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.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||{};rw(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=rw(this.pluginGroup),i=0;i<n.length;i++){var r=this.pluginGroup[n[i]];r&&r._player&&(this.pluginGroup[n[i]]._player.isUserActive=!1)}return this.pluginGroup[e]._player.isUserActive=t,e}},getCurrentUseActiveId:function(){if(this.pluginGroup){for(var e=rw(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,i;n=e.root,BS.unObserver(n,i);for(var r=this.pluginGroup[t]._plugins,o=0,a=rw(r);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=rw(this.pluginGroup);u.length>0&&this.setCurrentUserActive(u[u.length-1],!0)}}}},zS="xgplayer",KS="xgplayer-is-enter",GS="xgplayer-pause",WS="xgplayer-playing",YS="xgplayer-ended",XS="xgplayer-isloading",qS="xgplayer-is-error",ZS="xgplayer-replay",$S="xgplayer-nostart",JS="xgplayer-inactive",QS="xgplayer-is-fullscreen",eP="xgplayer-is-cssfullscreen",tP="xgplayer-rotate-fullscreen",nP="xgplayer-rotate-parent",iP="xgplayer-fullscreen-parent",rP="xgplayer-fullscreen-inner",oP="no-controls",aP="flex-controls",sP="controls-autohide",lP="top-bar-autohide",uP="not-allow-autoplay",cP="seeking";function hP(){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(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:vT(),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 fP=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=cC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),aC(cC(i),"onMouseLeave",(function(e){cC(i).player.focus()})),i}return oC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==_T.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(aP);var a={height:"".concat(r,"px")};Mb(e=rw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Vm(this).call(this,"xg-left-grid"),this.center=Vm(this).call(this,"xg-center-grid"),this.right=Vm(this).call(this,"xg-right-grid"),this.innerRoot=Vm(this).call(this,"xg-inner-controls"),this.on(qT,(function(e){e?fT.addClass(t.root,"mini-controls"):fT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==_T.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&&fT.addClass(this.root,sP)}},{key:"pauseAutoHide",value:function(){fT.removeClass(this.root,sP)}},{key:"show",value:function(){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case DS.CONTROLS_LEFT:t.root=this.left;break;case DS.CONTROLS_RIGHT:t.root=this.right;break;case DS.CONTROLS_CENTER:t.root=this.center;break;case DS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==_T.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,i=e.initShow;if(!e.disable){var r=fT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},aC({},sP,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" 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}(HS),dP={lang:{},langKeys:[],textKeys:[]};function pP(e,t){return rw(t).forEach((function(n){var i,r=fT.typeOf(t[n]),o=fT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,pC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),pP(e[n],t[n])):e[n]=t[n]})),e}function vP(){var e;Mb(e=rw(dP.lang.en)).call(e,(function(e){dP.textKeys[e]=e}))}function gP(e,t){var n=e.LANG;if(t||(t=dP),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?pP(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),vP()}}gP({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"}});var yP={get textKeys(){return dP.textKeys},get langKeys(){return dP.langKeys},get lang(){var e,t={};return Mb(e=dP.langKeys).call(e,(function(e){t[e]=dP.lang[e]})),dP.lang["zh-cn"]&&(t.zh=dP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=dP),t.lang){var i;if("Array"!==fT.typeOf(e))n=Mb(i=rw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Mb(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?pP(r[e.LANG]||{},e.TEXT||{}):gP(e,t)})),vP()}},use:gP,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return pP(n.lang,dP.lang),(t=n.langKeys).push.apply(t,pC(dP.langKeys)),pP(n.textKeys,dP.textKeys),n}},mP=1,_P=2,kP=3,bP=4,wP=5,EP=6,CP=7,xP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],TP=["play","pause","replay","retry"],SP=0,PP=0,AP=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n);var r,o=fT.deepMerge(hP(),e);aC(cC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.startTime,r=e.defaultPlaybackRate;cT.logInfo("player","canPlayFunc, startTime",n),n&&(i.currentTime=n>i.duration?i.duration:n,i.config.startTime=0),i.playbackRate=r,(t||i._useAutoplay)&&i.mediaPlay(),i.off(IT,i.canPlayFunc),i.removeClass(KS)}})),aC(cC(i),"onFullscreenChange",(function(e,t){var n=function(){fT.setTimeout(cC(i),(function(){i.resize()}),100)},r=fT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(rS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,gS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,QS),i.emit(YT,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=cC(i),s=a._fullScreenOffset;a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),fT.setTimeout(cC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen?i.removeClass(QS):i.recoverFullStyle(i.root,i._fullscreenEl,QS),i._fullscreenEl=null,i.emit(YT,!1)}})),aC(cC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),aC(cC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),ES(cC(i),TP),i.config=o,i._pluginInfoId=fT.generateSessionId(),(r=cC(i)).logInfo=cT.logInfo.bind(r),r.logWarn=cT.logWarn.bind(r),r.logError=cT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=iw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i._state=mP,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i.timeSegments=[],i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i.sizeInfo={width:0,height:0,left:0,top:0},i._accPlayed={t:0,acc:0,loopAcc:0},i._offsetInfo={currentTime:-1,duration:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=yP.init(i._pluginInfoId),_T.os.isAndroid&&_T.osVersion>0&&_T.osVersion<6&&(i.config.autoplay=!1),i.database=new fS,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,i.innerStates={isActiveLocked:!1},!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),hC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Vm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),VS.onPluginsReady(cC(i)),i.getInitDefinition(),i.setState(_P),fT.setTimeout(cC(i),(function(){i.emit(UT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<bP)&&i.start(),i}return oC(n,[{key:"_initDOM",value:function(){var e,t,n,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var r=this.config.el;if(!r||1!==r.nodeType)return this.emit(ST,new ET("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=r}var o=VS.checkPlayerRoot(this.root);o&&(cT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),o.destroy()),this.root.setAttribute(gS,this.playerId),VS.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(gS,this.playerId),this.config.controls){var u=this.config.controls.root||null,c=VS.register(this,fP,{root:u});this.controls=c}var h="mobile"===this.config.isMobileSimulateMode?"mobile":_T.device;if(this.addClass(Mm(e=Mm(t=Mm(n="".concat(zS," ")).call(n,JS," xgplayer-")).call(t,h," ")).call(e,this.config.controls?"":oP)),this.config.autoplay?this.addClass(KS):this.addClass($S),this.config.fluid){var f=this.config,d=f.width,p=f.height;"number"==typeof d&&"number"==typeof p||(d=600,p=337.5);var v={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*p/d,"%")};rw(v).forEach((function(e){i.root.style[e]=v[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));var g=this.root.getBoundingClientRect(),y=g.width,m=g.height,_=g.left,k=g.top;return this.sizeInfo.width=y,this.sizeInfo.height=m,this.sizeInfo.left=_,this.sizeInfo.top=k,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=fT.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()+ow(t).call(t,1)])})),dS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),_T.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(LT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(CT,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),dS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(CT,this.playFunc),this.off(IT,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"!==fT.typeOf(e)||0!==e.length)||(e="",this.emit(HT),cT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this._detachSourceEvents(this.media),"Array"===fT.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"===fT.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 i=this.media.readyState;cT.logInfo("_startInit readyState",i),this.config.autoplay&&(!fT.isMSE(this.media)&&this.load(),(_T.os.isIpad||_T.os.isPhone)&&this.mediaPlay()),i>=2?this.canPlayFunc():this.once(IT,this.canPlayFunc),(!this.hasStart||this.state<bP)&&VS.afterInit(this),this.hasStart=!0,this.setState(bP),fT.setTimeout(this,(function(){t.emit(VT)}),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||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&yP.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&iw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=VS.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Tw(t=e._loadingPlugins).call(t,iw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;cT.logError("_registerPlugins:loadingPlugin",t),Tw(n=e._loadingPlugins).call(n,iw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){cT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,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,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,pC(s)),(r=e.config.ignores).push.apply(r,pC(u)),Mb(n=rw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,pC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case DS.ROOT_RIGHT:this.rightBar||(this.rightBar=fT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case DS.ROOT_LEFT:this.leftBar||(this.leftBar=fT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case DS.ROOT_TOP:this.topBar||(this.topBar=fT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&fT.addClass(this.topBar,lP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=VS.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!VS.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=VS.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof s&&iw(s).call(s,"controls")>-1?this.controls&&this.controls.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(s)),VS.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?VS.unRegister(this,e):e instanceof SS&&VS.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 SS&&(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 i;Tw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return VS.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=VS.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(fT.hasClass(this.root,e)||fT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&fT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return fT.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>kP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(kP),this._registerPlugins(!1),VS.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var n=t.preProcessUrl(e);return t._startInit(n.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",cT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===fT.typeOf(e)&&(i=e.url),i=this.preProcessUrl(i).url;var r=this.currentTime,o=this.paused&&!this.isError;return this.src=i,new Lb((function(e,t){var a=function(e){n.off("timeupdate",s),n.off("canplay",s),t(e)},s=function(){n.currentTime=r,o&&n.pause(),n.off("error",a),e(!0)};n.once("error",a),i?(_T.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<bP)return this.removeClass($S),this.addClass(KS),this.start(),void(this._useAutoplay=!0);this.state<EP&&(this.removeClass($S),!this.isCanplay&&this.addClass(KS));var t=dC(lC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(uP),e.addClass(WS),e.state<EP&&(cT.logInfo(">>>>playPromise.then"),e.setState(EP),e.emit(jT))})).catch((function(t){if(cT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(KS);"NotAllowedError"===t.name&&(e._errorTimer=fT.setTimeout(e,(function(){e._errorTimer=null,e.emit(BT),e.addClass(uP),e.removeClass(KS),e.pause(),e.setState(wP)}),0))})):(cT.logWarn("video.play not return promise"),this.state<EP&&(this.setState(EP),this.removeClass(uP),this.removeClass($S),this.removeClass(KS),this.addClass(WS),this.emit(jT))),t}},{key:"mediaPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(GS),xS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;xS(this,"pause",(function(){dC(lC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Sw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?qw(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(PT,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(KS),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(PT,this._onceSeekCanplay),this.state<EP?(this.removeClass($S),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Mb(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.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=qw(e.bitrate,10)||0),this.emit(ZT,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,tC({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(JT,{from:t,to:e})})):this.emit(JT,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(LT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[uP,WS,$S,GS,ZS,KS,YS,qS,XS];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(KS),this.emit(oS)}},{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&&(Mb(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=hP();iE(i=rw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t=this,i=this.innerContainer,r=this.root,o=this.media;if(r&&o){if(this.hasStart=!1,this._useAutoplay=!1,r.removeAttribute(gS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),fT.clearAllTimers(this),this.emit(KT),VS.destroy(this),CS(this),dC(lC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var a=i.children,s=0;s<a.length;s++)i.removeChild(a[s]);!i&&o instanceof window.Node&&r.contains(o)&&r.removeChild(o),Mb(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){t[e]&&r.removeChild(t[e]),t[e]=null}));var l=r.className.split(" ");l.length>0?r.className=Db(l).call(l,(function(e){return iw(e).call(e,"xgplayer")<0})).join(" "):r.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(YS),this.currentTime=0,this.isSeeking=!1,xS(this,"replay",(function(){e.once(PT,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(zT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(qS),this.addClass(XS),xS(this,"retry",(function(){var t=e.currentTime,n=e.config.url,i=fT.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=i.url,!e.config.isLive&&(e.currentTime=t),e.once(IT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=iP),this._orgCss||(this._orgCss=fT.filterStyleFromText(e)),fT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=fT.filterStyleFromText(t),fT.addClass(t,i),t.setAttribute(gS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=iP),this._orgCss&&(fT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),fT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(fT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",fT.removeClass(t,i),t.removeAttribute(gS))}},{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:fT.scrollTop(),left:fT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",fT.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Lb.resolve();try{for(var i=0;i<pS.length;i++){var r=pS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Lb.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Lb.resolve()):Lb.reject(new Error("call getFullscreen fail"))}catch(a){return Lb.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||fT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<vS.length;n++){var i=vS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Lb.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Lb.resolve()):Lb.reject(new Error("call exitFullscreen fail"))}catch(o){return Lb.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(rP," ")).call(e,eP):eP;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(YT,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(XT,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Mm(e="".concat(rP," ")).call(e,eP):eP;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(YT,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(XT,!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(rP," ")).call(e,tP):tP;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,nP),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(YT,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Mm(t="".concat(rP," ")).call(t,tP):tP;this.recoverFullStyle(this.root,this._fullscreenEl,n,nP),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(YT,!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(NT,tC({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(FT,tC({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]:{autoHide:!0,delay:3e3},n=this.innerStates;if(this.isActive=!0,this.removeClass(JS),this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null);else{var i=t&&t.delay?t.delay:this.config.inactive;this.userTimer=fT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),i)}}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive&&!this.innerStates.isActiveLocked){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(JS)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(KS),this.removeClass(qS),this.removeClass(XS),this.isCanplay=!0,this.waitTimer&&fT.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(qS),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===CP&&this.setState(EP),this.removeClass(GS),this.ended&&this.removeClass(YS),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(GS),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(fT.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(YS),this.setState(CP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(uP),this.removeClass($S),this.removeClass(KS),this.removeClass(XS),this.addClass(qS)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(cP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&fT.clearTimeout(this,this.waitTimer),this.removeClass(XS),this.removeClass(cP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&fT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=fT.setTimeout(this,(function(){e.addClass(XS),fT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[$S,GS,YS,qS,ZS,XS].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(XS))&&this.media.readyState>2&&(this.removeClass(XS),fT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state<EP&&this.duration&&(this.setState(EP),this.emit(jT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===fT.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 i="String"===fT.typeOf(e)?e:e.type||"";n.props&&"Array"!==fT.typeOf(n.props)&&(n.props=[n.props]),this.emit(rS,tC({eventType:i,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,i=t.length,r=0;r<i;r++)if(t.start(r)<=n&&t.end(r)>n)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,n=e.vy,i=e.vx,r=e.h,o=e.w;if(!(t<0)||n||i){var a=this.videoPos._pi;if(!a&&this.media.videoHeight&&(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),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=r>0?100/r:o>0?100/o:1,s.scale=c,l=n>0?(100-r)/2-n:0,s.y=2===h?0-l:l,u=i>0?(100-o)/2-i: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+i/2:l-i/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=fT.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&&Mb(t=rw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===fT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,xS(this,"playnext",(function(){t.start(),t.emit(nS,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.root.getBoundingClientRect();this.sizeInfo.width=t.width,this.sizeInfo.height=t.height,this.sizeInfo.left=t.left,this.sizeInfo.top=t.top;var n=this.media,i=n.videoWidth,r=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),r&&i){this._videoHeight=r,this._videoWidth=i;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,h=qw(i/r*1e3,10),f=qw(u/c*1e3,10),d=u,p=c,v={};"auto"===a&&f>h||"fixWidth"===a?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===a&&f<h||"fixHeight"===a)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||rw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&f<h||"fillWidth"===s&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(eS,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;cT.logInfo("setState",Mm(t="state from:".concat(xP[this.state]," to:")).call(t,xP[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config.preProcessUrl;return!fT.isBlob(e)&&n&&"function"==typeof n?n(e,t):{url: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(_P),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===EP||this._state===CP},set:function(e){e?this.setState(EP):this._state>=EP&&this.setState(bP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=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&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{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=qw(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Db(t=yP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,VS.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,yP.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 kT}},{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 dC(lC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=dC(lC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return dC(lC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,n=e.t;return n?(new Date).getTime()-n+t:t}},{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=fT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return PP},set:function(e){PP=e}},{key:"realTimeSpeed",get:function(){return SP},set:function(e){SP=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,t){var n;return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return kS.call.apply(kS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return bS.call.apply(bS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return wS.call.apply(wS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),this.muted=t),VS.setCurrentUserActive(this.playerId,e)}}],[{key:"debugger",get:function(){return cT.config.debug},set:function(e){cT.config.debug=e}},{key:"getCurrentUserActivePlayerId",value:function(){return VS.getCurrentUseActiveId()}},{key:"setCurrentUserActive",value:function(e,t){VS.setCurrentUserActive(e,t)}},{key:"isHevcSupported",value:function(){return _T.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return _T.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}(hS);aC(AP,"defaultPreset",null),aC(AP,"XgVideoProxy",null);function OP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var IP=EE;An({target:"Function",proto:!0,forced:Function.bind!==IP},{bind:IP});var RP,MP,LP=Bc("Function").bind,DP=se,NP=LP,FP=Function.prototype,UP=n((function(e){var t=e.bind;return e===FP||DP(FP,e)&&t===FP.bind?NP:t}));function HP(e,t){var n;return(HP=hh?UP(n=hh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function jP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Pc(e,"prototype",{writable:!1}),t&&HP(e,t)}function BP(e){var t;return(BP=hh?UP(t=Dc).call(t):function(e){return e.__proto__||Dc(e)})(e)}function VP(){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(e){return!1}}function zP(e){var t=VP();return function(){var n,i=BP(e);if(t){var r=BP(this).constructor;n=HE(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===kc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return OP(e)}(this,n)}}function KP(e,t,n){var i;VP()?KP=UP(i=HE).call(i):KP=function(e,t,n){var i=[null];uh(i).apply(i,t);var r=new(UP(Function).apply(e,i));return n&&HP(r,n.prototype),r};return KP.apply(null,arguments)}function GP(e){var t="function"==typeof Tb?new Tb:void 0;return GP=function(e){if(null===e||(n=e,-1===Sm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return KP(e,arguments,BP(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),HP(r,e)},GP(e)}var WP=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=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(WP||{}),YP=(Hy(RP={},2100,{messageTextKey:"NETWORK",level:"Error"}),Hy(RP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Hy(RP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Hy(RP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Hy(RP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Hy(RP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Hy(RP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Hy(RP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Hy(RP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Hy(RP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Hy(RP,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),RP),XP=(Hy(MP={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Hy(MP,"network",{messageTextKey:"NETWORK",level:"Error"}),Hy(MP,"demux",{messageTextKey:"DEMUX",level:"Error"}),Hy(MP,"remux",{messageTextKey:"REMUX",level:"Error"}),Hy(MP,"media",{messageTextKey:"MEDIA",level:"Error"}),Hy(MP,"drm",{messageTextKey:"DRM",level:"Error"}),Hy(MP,"other",{messageTextKey:"OTHER",level:"Error"}),Hy(MP,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),MP),qP=function(e){jP(n,e);var t=zP(n);function n(e,i){var r,o,a,s,l,u,c;pm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.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!==r?r:null==i?void 0:i.getText("UNKNOWN");return Hy(OP(c=t.call(this,f)),"errorCode",void 0),Hy(OP(c),"level",void 0),Hy(OP(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 gm(n)}(GP(Error));function ZP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new qP(By(By({errorCode:e},YP[e]),t),n)}function $P(e,t){var n,i,r=YP[e.errorCode]||XP[e.errorType],o=e.errorCode;return new qP({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var JP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){fT.addClass(this.root,"hide")}},{key:"show",value:function(){fT.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(xT,(function(){e.isEndedShow&&fT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(AT,(function(){e.onTimeUpdate()})),this.on(GT,(function(){fT.removeClass(e.root,"hide"),fT.addClass(e.root,"xg-showplay"),e.once(AT,(function(){e.onTimeUpdate()}))}))):this.on(CT,(function(){fT.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?fT.removeClass(this.root,"xg-showplay"):this.once(AT,(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,i=t.hideCanplay,r=n?"background-image:url(".concat(n,");"):"";return Mm(e='<xg-poster class="xgplayer-poster '.concat(i?"xg-showplay":"",'" style="')).call(e,r,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),n}(HS);function QP(){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 eA(){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 tA={};function nA(e){var t;e?window.clearTimeout(e):Mb(t=rw(tA)).call(t,(function(e){window.clearTimeout(tA[e].id),delete tA[e]}))}var iA=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),fT.removeClass(i.root,e),i.show()})),aC(cC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";fT.addClass(i.root,e),i.autoPlayStart=!0,i.onPlayPause("play")}})),i.autoPlayStart=!1,i}return oC(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.playerConfig;this.initIcons(),this.once(UT,(function(){n&&(n.lang&&"en"===n.lang?fT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&fT.addClass(t.root,"lang-is-jp"))})),this.on(jT,this.onAutoplayStart),n.autoplay||this.show(),this.on(BT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),fT.removeClass(e.root,t),e.show()})),this.on(CT,(function(){e.onPlayPause("play")})),this.on(TT,(function(){e.onPlayPause("pause")})),this.on(oS,(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:QP,class:"xg-icon-play"},startPause:{icon:eA,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(){fT.addClass(this.root,"hide")}},{key:"show",value:function(){fT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){fT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){fT.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 tA[e]&&window.clearTimeout(tA[e].id),tA[e]={},n.start&&n.start(),tA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(tA[e].id),delete tA[e]}),t),tA[e].id}("pauseplay",400,{start:function(){fT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){fT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){fT.removeClass(this.root,"interact"),nA(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<_P)||(this.player.paused||t.state!==EP?t.play():t.pause())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<EP)&&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),nA(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}(HS),rA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=fT.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="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></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}(HS);function oA(e,t,n){try{var i,r;return Mm(i=Mm(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var aA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(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:DS.CONTROLS_RIGHT,index:10}}}]),n}(HS);function sA(e){var t=hx(e);return-1===iw(e).call(e,"%")&&!Sw(t)&&t}var lA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],uA=lA.length;function cA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===nC(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<uA;t++)e[lA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<uA;r++){var o=lA[r],a=t[o],s=hx(a);n[o]=Sw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=sA(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=sA(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function hA(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var fA="dragStart",dA="dragMove",pA="dragEnded",vA={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},gA=function(e){sC(n,e);var t=fC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return iC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):hC(i)}return oC(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)]),Mb(e=vA[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=vA[this._startKey];Mb(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&&(Mb(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=hA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=hA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=hA(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=cA(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(fA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(pA)),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,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(dA,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=Sw(t)?0:t,this.position.y=Sw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===iw(t).call(t,"matrix")){var n=t.split(","),i=0===iw(t).call(t,"matrix3d")?12:4,r=qw(n[i],10),o=qw(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==iw(e).call(e,"%")){var n=cA(this._root.parentNode);return n?hx(e)/100*n[t]:0}return qw(e,10)}}]),n}(MC),yA=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),aC(cC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),aC(cC(i),"onCenterClick",(function(e){var t=cC(i).player;t.paused?t.play():t.pause()})),aC(cC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=qw(fT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=cC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return oC(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(TT,(function(){e.setAttr("data-state","pause")})),this.on(CT,(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(aA,n,aA.pluginName)}var i=fT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new gA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:QP,class:"xg-icon-play"},pause:{icon:eA,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,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},fT.addClass(n.root,"xgplayer-mini"),Mb(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(qT,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(fT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Mb(t=rw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(qT,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=fT.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(oA(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}(HS),mA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},_A=["videoClick","videoDbClick"],kA=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),aC(cC(i),"onMouseEnter",(function(e){var t=cC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus()})),aC(cC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur())})),aC(cC(i),"onVideoClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,xS(cC(i),_A[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),aC(cC(i),"onVideoDblClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),xS(cC(i),_A[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Mb(_A).call(_A,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===_T.device&&!_T.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Mb(e=rw(mA)).call(e,(function(e){r.addEventListener(e,t[mA[e]],!1)})),o&&i&&i.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,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Mb(e=rw(mA)).call(e,(function(e){r.removeEventListener(e,t[mA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(SS),bA="press",wA="pressend",EA="doubleclick",CA="click",xA="touchmove",TA="touchstart",SA="touchend",PA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},AA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function OA(e){return e&&e.length>0?e[e.length-1]:null}var IA=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};iC(this,e),aC(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,r=OA(e.touches);t.x=r?qw(r.pageX,10):e.pageX,t.y=r?qw(r.pageX,10):e.pageX,t.start=!0,i.__setPress(e),n.addEventListener(i.events.end,i.onTouchEnd),n.addEventListener(i.events.cancel,i.onTouchCancel),n.addEventListener(i.events.move,i.onTouchMove),i.trigger(TA,e)})),aC(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),aC(this,"onTouchEnd",(function(e){var t=i._pos,n=i.root;i.__clearPress(),n.removeEventListener(i.events.cancel,i.onTouchCancel),n.removeEventListener(i.events.end,i.onTouchEnd),n.removeEventListener(i.events.move,i.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&i.trigger(wA,e),i.trigger(SA,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),aC(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,r=OA(e.touches),o=r?qw(r.pageX,10):e.pageX,a=r?qw(r.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<n.miniStep&&Math.abs(s)<n.miniStep||(i.__clearPress(),t.press&&i.trigger(wA,e),t.press=!1,t.moving=!0,i.trigger(xA,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},Mb(n=rw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?AA:PA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return oC(e,[{key:"_initEvent",value:function(){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(bA,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(EA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(CA,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,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Tw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Mb(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(OR){console.error("trigger>>:".concat(e),OR)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};rw(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function RA(){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 MA="auto",LA="seeking",DA="playbackrate",NA=["videoClick","videoDbClick"],FA=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onTouchStart",(function(e){var t=cC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,fT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Vm(i).call(i,".xg-dur").innerHTML=fT.format(i.duration);var l=i.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=qw(s.pageX-o.left,10),c=qw(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),aC(cC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=cC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=qw(t.pageX-r.left,10),c=qw(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=qw(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;e.cancelable&&e.preventDefault(),i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),aC(cC(i),"onTouchEnd",(function(e){var t=cC(i),n=t.player,r=t.pos,o=t.playerConfig;if(r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?(i.endLastMove(r.scope),setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10)):r.time=0,r.scope=-1,i.resetPos(),fT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction(MA)}})),aC(cC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),aC(cC(i),"onRootTouchEnd",(function(e){i.pos.isStart&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.onTouchEnd(e))})),i.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},i.timer=null,i}return oC(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:RA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Mb(NA).call(NA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),fT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=fT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new IA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(RT,(function(){var e=t.player,n=t.config;1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([IT,xT],(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(Mb(e=rw(a)).call(e,(function(e){t.touch.on(e,(function(n){t[a[e]](n)}))})),!i.disableActive){var s=r.plugins.progress;s&&(s.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),s.addCallBack("dragend",(function(){t.changeAction(MA)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Vm(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&&(Vm(this).call(this,".xg-curbar").style.backgroundColor=t,Vm(this).call(this,".xg-cur").style.color=t);n&&(Vm(this).call(this,".xg-bar").style.backgroundColor=n,Vm(this).call(this,".time-preview").style.color=n);this.config.disableTimeProgress&&fT.addClass(Vm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Mb(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,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:_T.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(MA)}},{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,i=this.playerConfig;t.state<EP?i.closeVideoClick||(this.sendUseAction(fT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(fT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=EP&&(this.sendUseAction(fT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;xS(this,NA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;xS(this,NA[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,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(DA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction(MA))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=qw(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=qw(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=qw(10*t.volume,10)-qw(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,i=this.xgMask,r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(LA);var o=n.plugins.start;if(o&&o.focusHide(),Vm(this).call(this,".xg-dur").innerHTML=fT.format(this.duration),Vm(this).call(this,".xg-cur").innerHTML=fT.format(e),Vm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)fT.removeClass(Vm(this).call(this,".xg-seek-show"),"xg-back");else fT.addClass(Vm(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<bP)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,i="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(i,'"></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}(HS);An({target:"String",proto:!0},{repeat:UC});var UA=Bc("String").repeat,HA=se,jA=UA,BA=String.prototype,VA=n((function(e){var t=e.repeat;return"string"==typeof e||e===BA||HA(BA,e)&&t===BA.repeat?jA:t}));function zA(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var KA=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(i.player){var t=e||window.event,n=t.keyCode,r=cC(i),o=r._keyState,a=r.player,s=i.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||zA(t.target)||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(VA(e)||o.isKeyDown||((t.target===document.body||i.config.isGlobalTrigger&&!zA(t.target))&&i.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",i.onBodyKeyUp)),o.isBodyKeyDown&&i.handleKeyDown(t))}})),aC(cC(i),"onBodyKeyUp",(function(e){i.player&&(document.removeEventListener("keyup",i.onBodyKeyUp),i.handleKeyUp(e))})),aC(cC(i),"onKeydown",(function(e){if(i.player){var t=e||window.event,n=cC(i)._keyState;if(!VA(t)){if(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;if(!i.player.isUserActive&&!i.config.isIgnoreUserActive)return;!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el||(n.isKeyDown=!0),i.player.root.addEventListener("keyup",i.onKeyup)}n.isKeyDown&&i.handleKeyDown(t)}})),aC(cC(i),"onKeyup",(function(e){i.player&&(i.player.root.removeEventListener("keyup",i.onKeyup),i.handleKeyUp(e))})),i}return oC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Mb(e=rw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Mb(i=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):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,disablePress:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,disablePress:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,disablePress:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disablePress:!1,disable:!1},right:{keyCode:39,action:"seek",pressAction:"changePlaybackRate",disablePress:!1,disable:!1},esc:{keyCode:27,action:"exitFullscreen",disablePress:!0,disable:!1}},this.mergekeyCodeMap(),this._keyState={isKeyDown:!1,isBodyKeyDown:!1,isPress:!1,tt:0,playbackRate:0},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,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Mb(n=rw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=hx((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=hx((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.duration,o=t.offsetDuration,a=t.timeSegments,s=i>-1?i:n,l=o||r,u=VA(e)&&this.seekStep>=4?qw(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=fT.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.timeSegments,o=(i>-1?i:n)-(VA(e)?qw(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=fT.getCurrentTimeByOffset(o,r)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,i=this.player;0===t.playbackRate&&(t.playbackRate=i.playbackRate,i.playbackRate=n.playbackRate)}},{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,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(VA(e)){t.isPress=!0;var n=Date.now();if(n-t.tt<200)return;t.tt=n}!function(e){e.preventDefault(),e.returnValue=!1}(e),this.handleKeyCode(e.keyCode,e,t.isPress)}},{key:"handleKeyUp",value:function(e){var t=this._keyState;t.playbackRate>0&&(this.player.playbackRate=t.playbackRate,t.playbackRate=0),t.isKeyDown=!1,t.isPress=!1,t.tt=0}},{key:"handleKeyCode",value:function(e,t,n){for(var i=rw(this.keyCodeMap),r=0;r<i.length;r++){var o=this.keyCodeMap[i[r]],a=o.action,s=o.keyCode,l=o.disable,u=o.pressAction,c=o.disablePress;if(s===e){if(!(l||n&&c)){var h=n&&u||a;"function"==typeof h?a(t,this.player,n):"string"==typeof h&&"function"==typeof this[h]&&this[h](t,this.player,n),this.emit(iS,tC({key:i[r],target:t.target,isPress:n},this.keyCodeMap[i[r]]))}break}}}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown),this.player.root.removeEventListener("keyup",this.onKeyup),document.removeEventListener("keyup",this.onBodyKeyUp)}},{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:!1,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!1,keyCodeMap:{},disable:!1,playbackRate:2,isIgnoreUserActive:!1}}}]),n}(SS);function GA(){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 WA=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"registerIcons",value:function(){return{loadingIcon:GA}}},{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:DS.ROOT}}}]),n}(HS),YA=An,XA=ea.findIndex,qA="findIndex",ZA=!0;qA in[]&&Array(1)[qA]((function(){ZA=!1})),YA({target:"Array",proto:!0,forced:ZA},{findIndex:function(e){return XA(this,e,arguments.length>1?arguments[1]:void 0)}});var $A=Bc("Array").findIndex,JA=se,QA=$A,eO=Array.prototype,tO=n((function(e){var t=e.findIndex;return e===eO||JA(eO,e)&&t===eO.findIndex?QA:t})),nO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return oC(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}(HS),iO=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(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([TT,ST,DT],(function(){e.animate(t.paused)})),this.on(CT,(function(){e.animate(t.paused)})),this.animate(!0))}},{key:"registerIcons",value:function(){return{play:{icon:QP,class:"xg-icon-play"},pause:{icon:eA,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=Vm(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(){dC(lC(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(oA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(nO);function rO(){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 oO=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(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:rO,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){fT.addClass(this.root,"show")}},{key:"hide",value:function(){fT.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:DS.ROOT_TOP,index:0}}}]),n}(HS);function aO(){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 sO(){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 lO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=fT.getFullScreenEl();i.fullscreenTarget===r&&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(YT,(function(t){var n=Vm(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:oO,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===_T.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:aO,class:"xg-get-fullscreen"},exitFullscreen:{icon:sO,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){dC(lC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===_T.device?"touchend":"click",this.handleFullscreen),"mobile"===_T.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(){dC(lC(n.prototype),"show",this).call(this)}},{key:"hide",value:function(){dC(lC(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(oA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(nO);function uO(){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 cO(){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 hO(){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 fO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=cC(i).player,n=Vm(i).call(i,".xgplayer-bar");fT.event(e);var r=n.getBoundingClientRect(),o=fT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),aC(cC(i),"onBarMouseMove",(function(e){var t=cC(i)._d;if(t.isStart){var n=cC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),fT.event(e);var a=fT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),aC(cC(i),"onBarMouseUp",(function(e){fT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=cC(i)._d;t.isStart=!1,t.isMoving=!1})),aC(cC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),aC(cC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(Vm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return oC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:cO,class:"xg-volume-small"},volumeLarge:{icon:uO,class:"xg-volume"},volumeMuted:{icon:hO,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,i=t.volume;if(n.volumeColor)Vm(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"!==_T.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(MT,this.onVolumeChange),this.once(LT,this.onVolumeChange),"Number"!==fT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=Vm(this).call(this,".xgplayer-drag"),r=Vm(this).call(this,".xgplayer-bar");if(r&&i){var o=qw(e/r.getBoundingClientRect().height*1e3,10);i.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,i=Vm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.ceil(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(fT.clearTimeout(this,this._timerId),this._timerId=null),fT.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],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(fT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=fT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),fT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),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&&(fT.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"===_T.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:DS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(HS);function dO(){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 pO(){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 vO,gO="picture-in-picture",yO="inline",mO="fullscreen",_O=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return oC(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()&&(dC(lC(n.prototype),"afterCreate",this).call(this),this.pMode=yO,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(VT,(function(){e.config.showIcon&&(fT.removeClass(Vm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:dO,class:"xg-get-pip"},pipIconExit:{icon:pO,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;fT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),t.emit(tS,!1)},this.enterPIPCallback=function(n){t.emit(tS,!0),e.pipWindow=n.pictureInPictureWindow,e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===mO&&i!==mO&&t.onFullscreenChange(null,!1),e.pMode=i,i===gO?e.enterPIPCallback(n):i===yO&&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 i=t.poster;return i&&(e.media.poster="String"===fT.typeOf(i)?i:i.poster),n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("picture-in-picture"):e.media.requestPictureInPicture(),!0}catch(r){return console.error("requestPiP",r),!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===gO}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return("Boolean"!==fT.typeOf(document.pictureInPictureEnabled)||document.pictureInPictureEnabled)&&("Boolean"===fT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===fT.typeOf(e.webkitSetPresentationMode))}},{key:"destroy",value:function(){dC(lC(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(oA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:DS.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),n}(nO),kO=function(){function e(t){iC(this,e),this.config=t.config,this.parent=t.root,this.root=fT.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 i="mobile"===_T.device?"touchend":"click";this._delegates=HS.delegate.call(this,this.root,"li",i,this.onItemClick)}return oC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Mb(t=rw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=rw(e[0])),this.root.innerHTML="",Mb(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(fT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&fT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");fT.addClass(t,"selected"),i&&fT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Mb(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){fT.removeClass(this.root,"hide"),fT.addClass(this.root,"active")}},{key:"hide",value:function(){fT.removeClass(this.root,"active"),fT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;rw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Mb(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}(),bO={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"},wO=By(By({},uS),bO),EO=(Hy(vO={},bO.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Hy(vO,bO.AUTOPLAY_STARTED,{event:jT}),Hy(vO,bO.AUTOPLAY_PREVENTED,{event:BT}),Hy(vO,bO.FULLSCREEN_CHANGE,{event:YT}),Hy(vO,bO.CSS_FULLSCREEN_CHANGE,{event:XT}),Hy(vO,bO.MINI_STATE_CHANGE,{event:qT}),Hy(vO,bO.DEFINITION_CHANGE,{event:ZT}),Hy(vO,bO.BEFORE_DEFINITION_CHANGE,{event:$T}),Hy(vO,bO.AFTER_DEFINITION_CHANGE,{event:JT}),Hy(vO,bO.VIDEO_RESIZE,{event:eS}),Hy(vO,bO.PIP_CHANGE,{event:tS}),Hy(vO,bO.USER_ACTION,{event:rS}),Hy(vO,bO.DOWNLOAD_SPEED_CHANGE,{event:WT}),vO);var CO=/["'&<>]/;function xO(e,t){return function(e){if(Wy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==tc&&qy(e)||e["@@iterator"];if(null!=n){var i,r,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=(i=o.call(n)).done)&&(uh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||fm(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 TO=A,SO=g,PO=pr,AO=$,OO=SO(M.f),IO=SO([].push),RO=function(e){return function(t){for(var n,i=AO(t),r=PO(i),o=r.length,a=0,s=[];o>a;)n=r[a++],TO&&!OO(i,n)||IO(s,e?[n,i[n]]:i[n]);return s}},MO={entries:RO(!0),values:RO(!1)},LO=MO.entries;An({target:"Object",stat:!0},{entries:function(e){return LO(e)}});var DO=n(te.Object.entries);var NO=Ie,FO=qe,UO=K,HO=jn,jO=TypeError,BO=function(e){return function(t,n,i,r){NO(n);var o=FO(t),a=UO(o),s=HO(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw jO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},VO={left:BO(!1),right:BO(!0)}.left;An({target:"Array",proto:!0,forced:!Hf&&ve>79&&ve<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return VO(this,e,t,t>1?arguments[1]:void 0)}});var zO=Bc("Array").reduce,KO=se,GO=zO,WO=Array.prototype,YO=n((function(e){var t=e.reduce;return e===WO||KO(WO,e)&&t===WO.reduce?GO:t}));var XO=function(){function e(t){var n;pm(this,e),Hy(this,"definition",void 0),Hy(this,"source",void 0),Hy(this,"text",void 0),Hy(this,"fallbackUrl",void 0),Hy(this,"urls",void 0),Hy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Mm(n=[i]).call(n,dm(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,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return gm(e,[{key:"url",get:function(){return this._currentUrlRef.url},set:function(e){this._currentUrlRef.url=e}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),qO=function(){function e(t,n,i){var r=this;pm(this,e),Hy(this,"name",void 0),Hy(this,"text",void 0),Hy(this,"definitions",void 0),this.definitions=Mb(t).call(t,(function(e){return new XO(IC({},e,{source:r}))})),this.name=n,this.text=i}return gm(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,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Mb(r).call(r,(function(t){var n;return new e(Mb(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 i=new e([],"unknown");return i.add(new XO({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),ZO=function(){function e(t){var n,i,r,o;pm(this,e),Hy(this,"defaultSource",void 0),Hy(this,"defaultDefinition",void 0),Hy(this,"maxFallbackRound",void 0),Hy(this,"_currentDefinition",void 0),Hy(this,"_sources",void 0),Hy(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?Vm(this).call(this,a):null===(n=Vm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Vm(r=n.definitions).call(r,(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]}return gm(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},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var n,i,r,o,a,s=this;if("string"==typeof e)return Vm(o=YO(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=Vm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:Vm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.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,i,r,o,a;return this._sources=qO.normalize(e),this._currentDefinition=null!==(n=Vm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.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:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function $O(){var e;"undefined"!=typeof Reflect&&qE?$O=UP(e=qE).call(e):$O=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=BP(e)););return e}(e,t);if(i){var r=by(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return $O.apply(this,arguments)}function JO(){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 QO=function(e){jP(n,e);var t=zP(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_error",void 0),i}return gm(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Mm(t="".concat(r?"[".concat(r,"] "):"")).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"===_T.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:JO,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof qP?e:$P(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),$O(BP(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){$O(BP(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===_T.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(wO.FALLBACK_ERROR,this.showError.bind(this)),this.off(IT,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(wO.FALLBACK_ERROR,this.showError.bind(this)),this.on(IT,this.hideError.bind(this)),this.on(CT,this.hideError.bind(this)),this.on(QT,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Vm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Vm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=fT.createDom("div",Mm(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(wO.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=Vm(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:HS.POSITIONS.ROOT}}}]),n}(HS),eI=function(e){jP(n,e);var t=zP(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_toastNumber",0),Hy(OP(i),"_toastMap",{}),i}return gm(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.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 i=this,r=fT.createDom("div","",void 0,"veplayer-toast-container"),o=fT.checkIsObject(e)?e:fT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=fT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(HS);function tI(){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 nI=function(){function e(t){pm(this,e),Hy(this,"_root",void 0),Hy(this,"_config",void 0),Hy(this,"_parent",void 0),Hy(this,"_listDom",void 0),Hy(this,"_container",void 0),Hy(this,"_titleDom",void 0),Hy(this,"_player",void 0),Hy(this,"_delegates",void 0),Hy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return gm(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=fT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Mb(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=fT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.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!==iI.Inner)return this._titleDom||(this._titleDom=fT.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&&fT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&fT.addClass(this._root,"panel-".concat(e));var t="mobile"===_T.device?"touchend":"click";e===iI.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,i=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=fT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=fT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(fT.removeClass(this._root,"hide"),fT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(fT.removeClass(this._root,"active"),fT.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 i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{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(YT,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(YT,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=nw(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(iI.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===_T.device?"touchend":"click";this._listType===iI.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=HS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===_T.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)&&(Mb(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,i,r,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");fT.addClass(o,"selected"),l&&(fT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==kc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===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}(),iI=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(iI||{}),rI=function(e){return e.Icon="Icon",e.Text="Text",e}(rI||{}),oI="mobile"===_T.device,aI=["bottom","fullscreen","inner"],sI=["middle"],lI=["bottom","inner","fullscreen"],uI=["bottom","inner","fullscreen"],cI=function(e){jP(n,e);var t=zP(n);function n(e){var i;return pm(this,n),Hy(OP(i=t.call(this,e)),"optionsList",void 0),Hy(OP(i),"_isIcon",void 0),Hy(OP(i),"_isActive",void 0),Hy(OP(i),"_curIndex",void 0),Hy(OP(i),"activeEvent",void 0),Hy(OP(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),Hy(OP(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return gm(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&&fT.addClass(this.root,"portrait"),oI&&this.on(NT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=oI?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=rw(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 i=this.appendChild(".xgplayer-icon",fT.createDom("span","",{},"icon-text"));i&&fT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||fT.addClass(this.root,"show")}},{key:"hide",value:function(){fT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&nw(lI).call(lI,n)?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n&&nw(lI).call(lI,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 i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&nw(lI).call(lI,i))&&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 i,r=Vm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=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 nI&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&nw(uI).call(uI,o.listType)?new nI({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new kO({config:{data:e||[],onItemClick:function(e,t){r.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),oI||t&&nw(aI).call(aI,t)||(t="bottom"),oI||t&&nw(sI).call(sI,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:oI?CR.ROOT_TOP_RIGHT:CR.CONTROLS_RIGHT,listType:oI?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:oI?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(HS),hI=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(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(){$O(BP(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:tI}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Mb(t).call(t,(function(e){var t;return By(By({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=tO(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),$O(BP(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;$O(BP(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return By(By({},cI.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}(cI);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" 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 dI={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",k="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",O=/\w*$/,I=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[k]=M[a]=M[s]=M[b]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==kc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":kc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,U=F&&e&&!e.nodeType&&e,H=U&&U.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function V(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function G(e,t){return function(n){return e(t(n))}}function W(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,Z=Object.prototype,$=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec($&&iE($)&&iE($).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=Z.hasOwnProperty,te=Z.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=H?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=G(fE,Object),se=Object.create,le=Z.propertyIsEnumerable,ue=Tw(X),ce=rE,he=ie?ie.isBuffer:void 0,fe=G(rw,Object),de=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(de),ke=ze(pe),be=ze(ve),we=ze(ge),Ee=ze(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){this.__data__=new Se(e)}function Oe(e,t){var n=Ge(e)||function(e){return function(e){return function(e){return!!e&&"object"==kc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Ie(e,t,n){var i=e[t];ee.call(e,t)&&Ke(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Re(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var I;if(i&&(I=d?i(e,r,d,m):i(e)),void 0!==I)return I;if(!qe(e))return e;var R=Ge(e);if(R){if(I=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,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,I)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return ow(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(z(e))return d?e:{};if(I=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,He(e),t)}(e,function(e,t){return e&&Ne(t,Ze(t),e)}(I,e))}else{if(!M[L])return d?e:{};I=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case k:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case b:case w:case E:case C:case x:case T:case S:case P:case A:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(K(e),!0):K(e);return V(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return V(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Ae);var N=m.get(e);if(N)return N;if(m.set(e,I),!R)var F=n?function(e){return function(e,t,n){var i=t(e);return Ge(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,Ze,He)}(e):Ze(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Ie(I,o,Me(r,t,n,i,o,e,m))})),I}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||z(e)?ne:I).test(ze(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Ie(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=kc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Mb(r)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Re(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Re(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},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 Se},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 Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Pe(i)}return n.set(e,t),this};var He=ce?G(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function ze(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ke(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=k||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?ze(n):void 0;if(i)switch(i){case _e:return k;case ke:return c;case be:return d;case we:return v;case Ee:return m}return t});var Ge=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(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=kc(e);return!!e&&("object"==t||"function"==t)}function Ze(e){return We(e)?Oe(e):function(e){if(!Ve(e))return fe(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)}}(dI,dI.exports);var pI=n(dI.exports),vI=function(e){jP(i,e);var t,n=zP(i);function i(){var e,t;pm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Hy(OP(t=n.call.apply(n,Mm(e=[this]).call(e,o))),"_waitingStartTime",0),Hy(OP(t),"_timer",void 0),Hy(OP(t),"_toastId",void 0),t}return gm(i,[{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;$O(BP(i.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(wO.WAITING,this._waiting.bind(this)),this.on(wO.PLAYING,this._clearTimer.bind(this)),this.on(wO.PAUSE,this._clearTimer.bind(this)),this.on(wO.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:fI}}}},{key:"renderItemList",value:function(){var e,t,n,r=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=Mb(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=tO(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),$O(BP(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),$O(BP(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=zy(Jg().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=tO(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=pI(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.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(wO.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(wO.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 Lb((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=fT.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=fT.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),i(!0)}))}else i(!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 i=e+1,r=Vm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(wO.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=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!==(i=e.showText)&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(wO.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return By(By({},cI.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":"清晰度"}}}]),i}(cI),gI={"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]"},yI=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}(yI||{}),mI=function(){function e(t){var n=this;pm(this,e),Hy(this,"modules",{}),Hy(this,"mountPromiseMap",{}),Hy(this,"_baseUrl",void 0),Hy(this,"_moduleSystem",void 0),Hy(this,"load",function(){var e=zy(Jg().mark((function e(t,i){var r,o,a,s,l;return Jg().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(gI[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!==(r=o.default)&&void 0!==r?r: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,gI[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i: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)}}()),Hy(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 gm(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 Lb((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),_I=h,kI=$,bI=Dn,wI=jn,EI=Fc,CI=Math.min,xI=[].lastIndexOf,TI=!!xI&&1/[1].lastIndexOf(1,-0)<0,SI=EI("lastIndexOf"),PI=TI||!SI?function(e){if(TI)return _I(xI,this,arguments)||0;var t=kI(this),n=wI(t),i=n-1;for(arguments.length>1&&(i=CI(i,bI(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:xI;An({target:"Array",proto:!0,forced:PI!==[].lastIndexOf},{lastIndexOf:PI});var AI,OI,II=Bc("Array").lastIndexOf,RI=se,MI=II,LI=Array.prototype,DI=n((function(e){var t=e.lastIndexOf;return e===LI||RI(LI,e)&&t===LI.lastIndexOf?MI:t})),NI=null!==(AI=null===(OI=document.currentScript)||void 0===OI?void 0:OI.src)&&void 0!==AI?AI:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.1.0-rc.3","/object/umd/"),FI=new mI({baseUrl:ow(NI).call(NI,0,DI(NI).call(NI,"/"))}),UI=FI.register;function HI(e,t){return jI.apply(this,arguments)}function jI(){return(jI=zy(Jg().mark((function e(t,n){var i;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,FI.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),ZP(WP.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function BI(e){return function(t){var n;return null==t?void 0:nw(n=t.split("?")[0].toLowerCase()).call(n,e)}}var VI=BI(".m3u8"),zI=BI(".mp4"),KI=BI(".flv"),GI=BI(".sdp"),WI=BI(".mpd");function YI(){return(YI=zy(Jg().mark((function e(){var t;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,HI(yI.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)}By(By({},fT),{},{getStreamType:function(e){return VI(e)?"hls":KI(e)?"flv":GI(e)?"rtm":zI(e)?"mp4":WI(e)?"dash":"unknown"},isMseSupported:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ky.H264)===Ky.H265?_T.isHevcSupported():_T.isMSESupport()},isSoftDecodeSupported:function(){return YI.apply(this,arguments)}});var XI=_T.isWeixin,qI=_T.os,ZI=_T.device,$I=qI.isAndroid,JI=qI.isIos,QI="mobile"===ZI,eR=0,tR=!1,nR=function(e){jP(n,e);var t=zP(n);function n(e){var i;return pm(this,n),Hy(OP(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),Hy(OP(i),"_timer",void 0),Hy(OP(i),"_wxTimer",void 0),Hy(OP(i),"_state",{mode:0,showUnmuteBt:!1}),Hy(OP(i),"userClickPlay",(function(){if(!tR){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),tR=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),tR=!0)}})),i}return gm(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(BT,this.handleAutoplayPrevented.bind(this)),this.player.on(jT,this.handleAutoplayStart.bind(this)),this.player.on(MT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){XI&&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():$I?this.player.once(IT,this.wxCanPlayFn.bind(this)):JI&&this.player.once(VT,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(bO.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(bO.AUTOPLAY_FAIL,{mode:"unmute"}),$I&&XI?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(bO.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(bO.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(bO.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(bO.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(bO.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"),i=fT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),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-eR>200){eR=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(bO.AUTOPLAY_UNMUTE);var t="mobile"===_T.device,n=GI(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(BT,this.handleAutoplayPrevented.bind(this)),this.player.off(jT,this.handleAutoplayStart.bind(this)),this.player.off(MT,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=QI?"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:HS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(HS),iR=MO.values;An({target:"Object",stat:!0},{values:function(e){return iR(e)}});var rR=n(te.Object.values);function oR(){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 aR,sR,lR=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(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 i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=fT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{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:Mb(t).call(t,(function(t,i){var r,o=fT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=fT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(fT.createDom("span",s,{"plugin-index":i},"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&&fT.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&&fT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:oR}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return By(By({},cI.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:rI.Icon,panel:{className:"more-panel-content"}})}}]),n}(cI),uR=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(uR||{}),cR=function(e){jP(n,e);var t=zP(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(n,[{key:"registerIcons",value:function(){return{more:{icon:oR,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[lR.pluginName]={plugin:lR,options:{root:this.root,plugins:i}}),r}},{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=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Mb(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&nw(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:HS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!nw(a=rR(uR)).call(a,s)}}]),n}(HS),hR=[iO,lO,fO,yA,_O,JP,iA,WA,rA,QO,eI,hI,vI,nR],fR=Mm(aR=[]).call(aR,hR,[KA,kA,cR]),dR=Mm(sR=[]).call(sR,hR,[FA,cR]),pR="pc"===_T.device?fR:dR;function vR(){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 gR(){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 yR,mR={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:gR,exitFullscreen:vR,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}},_R=By(By({},mR),{},{fullscreen:gR,exitFullscreen:vR}),kR=By(By({},mR),{},{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}}),bR="pc"===_T.device?_R:kR,wR=function(){function e(t){var n;if(pm(this,e),Hy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||vT()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Mb(i=DO(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=xO(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return gm(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,i;if(e){var r=null==yP?void 0:yP.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return yP.langKeys}},{key:"isLangValid",value:function(e){var t;return nw(t=yP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){yP.extend(e,t)}}]),e}(),ER=["autoplay"],CR=By(By({},HS.POSITIONS),uR),xR={id:"veplayer",width:"100%",height:"100%",decodeType:Gy.Hardware,fullscreen:{useCssFullscreen:!1}},TR=function(e){var t,n,i,r=e.autoplay,o=Pm(e,ER);(o.poster&&(o.poster=function(e){var t,n=""+e,i=CO.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}a!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=By(By({},bR),o.icons?(t=o.icons,n={},DO(null!=t?t:{}).forEach((function(e){var t=xO(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=By(By({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},SR=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pm(this,e),Hy(this,"_player",void 0),Hy(this,"_sourceManager",void 0),Hy(this,"_preparePlugins",void 0),Hy(this,"_previousPrepareResult",void 0),Hy(this,"_i18nManager",void 0),Hy(this,"_events",{}),Hy(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 wR({i18n:p.i18n});var v=TR(By(By({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Mm(i=[]).call(i,dm(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),dm(null!==(a=p.plugins)&&void 0!==a?a:pR)),y=[],m=[];g.forEach((function(e){cR.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new AP(By(By(By({},xR),v),{},{definition:By({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:By(By({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(wO.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(ST,this._errorCallback)}var t,n,i,r,o,a;return gm(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(wR.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=wR.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===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=zy(Jg().mark((function e(t,n){var i,r,o,a;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.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=Vm(r=this._sourceManager).call(r,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,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sb),this._events[e].set(t,r),this._player.once(o,r))}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;i&&(this._player.off(r,i),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sb),this._events[e].set(t,r),this._player.on(o,r))}},{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.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",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){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===CR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===CR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(ST,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return Jg().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!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],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",{plugins:Mb(u).call(u,(function(e){return c._player.registerPlugin(e)})),options:null==a?void 0:a.options});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=zy(Jg().mark((function e(t){var n,i,r=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(KS),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(KS),this.emit(wO.FALLBACK_ERROR,$P(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(wO.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===ST?{xgCallback:t?function(e){t($P(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=EO[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Mm(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=pI(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(s=e.t0,l=s.plugins,null!=(u=s.options)&&u.url&&(t.url=null==u?void 0:u.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(wO.SOURCE_CHANGE),null==l||!l.length){e.next=21;break}return this.emit(wO.DEFINITION_CHANGE),e.next=18,this._callBeforePlayerInitForUrl(l,t.url);case 18:this.emit(wO.AFTER_DEFINITION_CHANGE),e.next=22;break;case 21:this._player.changeDefinition(t,a);case 22:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=zy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0={};case 5:if(i=e.t0,r=i.plugins,o=i.options,a=null!==(n=null==o?void 0:o.url)&&void 0!==n?n:t,this._sourceManager.url=a,null==r||!r.length){e.next=14;break}this._callBeforePlayerInitForUrl(r,a),e.next=21;break;case 14:if(s=this._player.switchURL(a,!1),l=this._player.currentTime,!s||!s.then){e.next=20;break}return e.abrupt("return",s);case 20:return e.abrupt("return",new Lb((function(e){var t=u._player.paused&&!u._player.isError,n=function(){u._player.currentTime=l,t&&u._player.once(IT,(function(){u._player.pause()})),e()};_T.os.isAndroid?u.once(AT,(function(){n()})):u.once(IT,(function(){n()})),u._player.play()})));case 21:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Mb(e).call(e,(function(e){return e.pluginName})),i=Mb(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:Db(n).call(n,(function(e){return!nw(i).call(i,e)})),addedPlugins:Db(t).call(t,(function(e){return!nw(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Lb((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(wO.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=zy(Jg().mark((function t(){var n,i,r,o,a,s,l,u,c=arguments;return Jg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,s=new ZO({sources:qO.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(i=s.url)&&void 0!==i?i:"");case 5:return null!=(l=t.sent)&&null!==(r=l.options)&&void 0!==r&&r.url&&(s.url=null==l||null===(u=l.options)||void 0===u?void 0:u.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(By(By({},o),{},{prepareResult:l,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function PR(e){return AR.apply(this,arguments)}function AR(){return(AR=zy(Jg().mark((function e(t){return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,SR.create(By({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}yR="umd",FI.setModuleSystem(yR),void 0!==VePlayer.register?VePlayer.register(yI.BizVod,{createVodPlayer:PR}):UI(yI.BizVod,{createVodPlayer:PR}),e.createVodPlayer=PR,e.load=HI,e.register=UI}));
|