@byteplus/veplayer-plugin 2.6.0-rc.4 → 2.6.0-rc.6

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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VePlayerAd=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}},i=function(t){return t&&t.Math==Math&&t},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(t){try{return!!t()}catch(e){return!0}},s=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=s,l=Function.prototype,c=l.apply,f=l.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(c):function(){return f.apply(c,arguments)}),p=s,d=Function.prototype,v=d.call,g=p&&d.bind.bind(v,v),y=p?g:function(t){return function(){return v.apply(t,arguments)}},m=y,b=m({}.toString),w=m("".slice),k=function(t){return w(b(t),8,-1)},_=k,A=y,E=function(t){if("Function"===_(t))return A(t)},T="object"==typeof document&&document.all,C={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=C.all,x=C.IS_HTMLDDA?function(t){return"function"==typeof t||t===S}:function(t){return"function"==typeof t},M={},L=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=s,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},R={},B={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,D=U&&!B.call({1:2},1);R.f=D?function(t){var e=U(this,t);return!!e&&e.enumerable}:B;var j,F,N=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},H=a,z=k,V=Object,q=y("".split),G=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==z(t)?q(t,""):V(t)}:V,Y=function(t){return null==t},W=Y,K=TypeError,X=function(t){if(W(t))throw K("Can't call method on "+t);return t},$=G,J=X,Q=function(t){return $(J(t))},Z=x,tt=C.all,et=C.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Z(t)||t===tt}:function(t){return"object"==typeof t?null!==t:Z(t)},nt={},rt=nt,it=o,ot=x,at=function(t){return ot(t)?t:void 0},st=function(t,e){return arguments.length<2?at(rt[t])||at(it[t]):rt[t]&&rt[t][e]||it[t]&&it[t][e]},ut=y({}.isPrototypeOf),lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ct=o,ft=lt,ht=ct.process,pt=ct.Deno,dt=ht&&ht.versions||pt&&pt.version,vt=dt&&dt.v8;vt&&(F=(j=vt.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&ft&&(!(j=ft.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ft.match(/Chrome\/(\d+)/))&&(F=+j[1]);var gt=F,yt=gt,mt=a,bt=o.String,wt=!!Object.getOwnPropertySymbols&&!mt((function(){var t=Symbol();return!bt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&yt&&yt<41})),kt=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_t=st,At=x,Et=ut,Tt=Object,Ct=kt?function(t){return"symbol"==typeof t}:function(t){var e=_t("Symbol");return At(e)&&Et(e.prototype,Tt(t))},St=String,xt=function(t){try{return St(t)}catch(e){return"Object"}},Mt=x,Lt=xt,Ot=TypeError,It=function(t){if(Mt(t))return t;throw Ot(Lt(t)+" is not a function")},Pt=It,Rt=Y,Bt=function(t,e){var n=t[e];return Rt(n)?void 0:Pt(n)},Ut=P,Dt=x,jt=et,Ft=TypeError,Nt={exports:{}},Ht=o,zt=Object.defineProperty,Vt=function(t,e){try{zt(Ht,t,{value:e,configurable:!0,writable:!0})}catch(n){Ht[t]=e}return e},qt="__core-js_shared__",Gt=o[qt]||Vt(qt,{}),Yt=Gt;(Nt.exports=function(t,e){return Yt[t]||(Yt[t]=void 0!==e?e:{})})("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 Wt=Nt.exports,Kt=X,Xt=Object,$t=function(t){return Xt(Kt(t))},Jt=$t,Qt=y({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Qt(Jt(t),e)},te=y,ee=0,ne=Math.random(),re=te(1..toString),ie=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ee+ne,36)},oe=Wt,ae=Zt,se=ie,ue=wt,le=kt,ce=o.Symbol,fe=oe("wks"),he=le?ce.for||ce:ce&&ce.withoutSetter||se,pe=function(t){return ae(fe,t)||(fe[t]=ue&&ae(ce,t)?ce[t]:he("Symbol."+t)),fe[t]},de=P,ve=et,ge=Ct,ye=Bt,me=function(t,e){var n,r;if("string"===e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;if(Dt(n=t.valueOf)&&!jt(r=Ut(n,t)))return r;if("string"!==e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;throw Ft("Can't convert object to primitive value")},be=TypeError,we=pe("toPrimitive"),ke=function(t,e){if(!ve(t)||ge(t))return t;var n,r=ye(t,we);if(r){if(void 0===e&&(e="default"),n=de(r,t,e),!ve(n)||ge(n))return n;throw be("Can't convert object to primitive value")}return void 0===e&&(e="number"),me(t,e)},_e=Ct,Ae=function(t){var e=ke(t,"string");return _e(e)?e:e+""},Ee=et,Te=o.document,Ce=Ee(Te)&&Ee(Te.createElement),Se=function(t){return Ce?Te.createElement(t):{}},xe=Se,Me=!L&&!a((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Le=L,Oe=P,Ie=R,Pe=N,Re=Q,Be=Ae,Ue=Zt,De=Me,je=Object.getOwnPropertyDescriptor;M.f=Le?je:function(t,e){if(t=Re(t),e=Be(e),De)try{return je(t,e)}catch(n){}if(Ue(t,e))return Pe(!Oe(Ie.f,t,e),t[e])};var Fe=a,Ne=x,He=/#|\.prototype\./,ze=function(t,e){var n=qe[Ve(t)];return n==Ye||n!=Ge&&(Ne(e)?Fe(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(He,".").toLowerCase()},qe=ze.data={},Ge=ze.NATIVE="N",Ye=ze.POLYFILL="P",We=ze,Ke=It,Xe=s,$e=E(E.bind),Je=function(t,e){return Ke(t),void 0===e?t:Xe?$e(t,e):function(){return t.apply(e,arguments)}},Qe={},Ze=L&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tn=et,en=String,nn=TypeError,rn=function(t){if(tn(t))return t;throw nn(en(t)+" is not an object")},on=L,an=Me,sn=Ze,un=rn,ln=Ae,cn=TypeError,fn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,pn="enumerable",dn="configurable",vn="writable";Qe.f=on?sn?function(t,e,n){if(un(t),e=ln(e),un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&vn in n&&!n[vn]){var r=hn(t,e);r&&r[vn]&&(t[e]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:pn in n?n[pn]:r[pn],writable:!1})}return fn(t,e,n)}:fn:function(t,e,n){if(un(t),e=ln(e),un(n),an)try{return fn(t,e,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var gn=Qe,yn=N,mn=L?function(t,e,n){return gn.f(t,e,yn(1,n))}:function(t,e,n){return t[e]=n,t},bn=o,wn=h,kn=E,_n=x,An=M.f,En=We,Tn=nt,Cn=Je,Sn=mn,xn=Zt,Mn=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return wn(t,this,arguments)};return e.prototype=t.prototype,e},Ln=function(t,e){var n,r,i,o,a,s,u,l,c,f=t.target,h=t.global,p=t.stat,d=t.proto,v=h?bn:p?bn[f]:(bn[f]||{}).prototype,g=h?Tn:Tn[f]||Sn(Tn,f,{})[f],y=g.prototype;for(o in e)r=!(n=En(h?o:f+(p?".":"#")+o,t.forced))&&v&&xn(v,o),s=g[o],r&&(u=t.dontCallGetSet?(c=An(v,o))&&c.value:v[o]),a=r&&u?u:e[o],r&&typeof s==typeof a||(l=t.bind&&r?Cn(a,bn):t.wrap&&r?Mn(a):d&&_n(a)?kn(a):a,(t.sham||a&&a.sham||s&&s.sham)&&Sn(l,"sham",!0),Sn(g,o,l),d&&(xn(Tn,i=f+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),t.real&&y&&(n||!y[o])&&Sn(y,o,a)))},On=Ln,In=L,Pn=Qe.f;On({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!In},{defineProperty:Pn});var Rn=nt.Object,Bn=r.exports=function(t,e,n){return Rn.defineProperty(t,e,n)};Rn.defineProperty.sham&&(Bn.sham=!0);var Un=r.exports,Dn=n(Un),jn=k,Fn=Array.isArray||function(t){return"Array"==jn(t)},Nn=Math.ceil,Hn=Math.floor,zn=Math.trunc||function(t){var e=+t;return(e>0?Hn:Nn)(e)},Vn=function(t){var e=+t;return e!=e||0===e?0:zn(e)},qn=Vn,Gn=Math.min,Yn=function(t){return t>0?Gn(qn(t),9007199254740991):0},Wn=Yn,Kn=function(t){return Wn(t.length)},Xn=TypeError,$n=function(t){if(t>9007199254740991)throw Xn("Maximum allowed index exceeded");return t},Jn=Ae,Qn=Qe,Zn=N,tr=function(t,e,n){var r=Jn(e);r in t?Qn.f(t,r,Zn(0,n)):t[r]=n},er={};er[pe("toStringTag")]="z";var nr="[object z]"===String(er),rr=nr,ir=x,or=k,ar=pe("toStringTag"),sr=Object,ur="Arguments"==or(function(){return arguments}()),lr=rr?or:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=sr(t),ar))?n:ur?or(e):"Object"==(r=or(e))&&ir(e.callee)?"Arguments":r},cr=x,fr=Gt,hr=y(Function.toString);cr(fr.inspectSource)||(fr.inspectSource=function(t){return hr(t)});var pr=fr.inspectSource,dr=y,vr=a,gr=x,yr=lr,mr=pr,br=function(){},wr=[],kr=st("Reflect","construct"),_r=/^\s*(?:class|function)\b/,Ar=dr(_r.exec),Er=!_r.exec(br),Tr=function(t){if(!gr(t))return!1;try{return kr(br,wr,t),!0}catch(e){return!1}},Cr=function(t){if(!gr(t))return!1;switch(yr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Er||!!Ar(_r,mr(t))}catch(e){return!0}};Cr.sham=!0;var Sr=!kr||vr((function(){var t;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){t=!0}))||t}))?Cr:Tr,xr=Fn,Mr=Sr,Lr=et,Or=pe("species"),Ir=Array,Pr=function(t){var e;return xr(t)&&(e=t.constructor,(Mr(e)&&(e===Ir||xr(e.prototype))||Lr(e)&&null===(e=e[Or]))&&(e=void 0)),void 0===e?Ir:e},Rr=function(t,e){return new(Pr(t))(0===e?0:e)},Br=a,Ur=gt,Dr=pe("species"),jr=function(t){return Ur>=51||!Br((function(){var e=[];return(e.constructor={})[Dr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Fr=Ln,Nr=a,Hr=Fn,zr=et,Vr=$t,qr=Kn,Gr=$n,Yr=tr,Wr=Rr,Kr=jr,Xr=gt,$r=pe("isConcatSpreadable"),Jr=Xr>=51||!Nr((function(){var t=[];return t[$r]=!1,t.concat()[0]!==t})),Qr=function(t){if(!zr(t))return!1;var e=t[$r];return void 0!==e?!!e:Hr(t)};Fr({target:"Array",proto:!0,arity:1,forced:!Jr||!Kr("concat")},{concat:function(t){var e,n,r,i,o,a=Vr(this),s=Wr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Qr(o=-1===e?a:arguments[e]))for(i=qr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Yr(s,u,o[n]);else Gr(u+1),Yr(s,u++,o);return s.length=u,s}});var Zr=lr,ti=String,ei=function(t){if("Symbol"===Zr(t))throw TypeError("Cannot convert a Symbol value to a string");return ti(t)},ni={},ri=Vn,ii=Math.max,oi=Math.min,ai=function(t,e){var n=ri(t);return n<0?ii(n+e,0):oi(n,e)},si=Q,ui=ai,li=Kn,ci=function(t){return function(e,n,r){var i,o=si(e),a=li(o),s=ui(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},fi={includes:ci(!0),indexOf:ci(!1)},hi={},pi=Zt,di=Q,vi=fi.indexOf,gi=hi,yi=y([].push),mi=function(t,e){var n,r=di(t),i=0,o=[];for(n in r)!pi(gi,n)&&pi(r,n)&&yi(o,n);for(;e.length>i;)pi(r,n=e[i++])&&(~vi(o,n)||yi(o,n));return o},bi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wi=mi,ki=bi,_i=Object.keys||function(t){return wi(t,ki)},Ai=L,Ei=Ze,Ti=Qe,Ci=rn,Si=Q,xi=_i;ni.f=Ai&&!Ei?Object.defineProperties:function(t,e){Ci(t);for(var n,r=Si(e),i=xi(e),o=i.length,a=0;o>a;)Ti.f(t,n=i[a++],r[n]);return t};var Mi,Li=st("document","documentElement"),Oi=ie,Ii=Wt("keys"),Pi=function(t){return Ii[t]||(Ii[t]=Oi(t))},Ri=rn,Bi=ni,Ui=bi,Di=hi,ji=Li,Fi=Se,Ni="prototype",Hi="script",zi=Pi("IE_PROTO"),Vi=function(){},qi=function(t){return"<"+Hi+">"+t+"</"+Hi+">"},Gi=function(t){t.write(qi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yi=function(){try{Mi=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;Yi="undefined"!=typeof document?document.domain&&Mi?Gi(Mi):(e=Fi("iframe"),n="java"+Hi+":",e.style.display="none",ji.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qi("document.F=Object")),t.close(),t.F):Gi(Mi);for(var r=Ui.length;r--;)delete Yi[Ni][Ui[r]];return Yi()};Di[zi]=!0;var Wi=Object.create||function(t,e){var n;return null!==t?(Vi[Ni]=Ri(t),n=new Vi,Vi[Ni]=null,n[zi]=t):n=Yi(),void 0===e?n:Bi.f(n,e)},Ki={},Xi=mi,$i=bi.concat("length","prototype");Ki.f=Object.getOwnPropertyNames||function(t){return Xi(t,$i)};var Ji={},Qi=ai,Zi=Kn,to=tr,eo=Array,no=Math.max,ro=function(t,e,n){for(var r=Zi(t),i=Qi(e,r),o=Qi(void 0===n?r:n,r),a=eo(no(o-i,0)),s=0;i<o;i++,s++)to(a,s,t[i]);return a.length=s,a},io=k,oo=Q,ao=Ki.f,so=ro,uo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ji.f=function(t){return uo&&"Window"==io(t)?function(t){try{return ao(t)}catch(e){return so(uo)}}(t):ao(oo(t))};var lo={};lo.f=Object.getOwnPropertySymbols;var co=mn,fo=function(t,e,n,r){return r&&r.enumerable?t[e]=n:co(t,e,n),t},ho=Qe,po=function(t,e,n){return ho.f(t,e,n)},vo={},go=pe;vo.f=go;var yo,mo,bo,wo=nt,ko=Zt,_o=vo,Ao=Qe.f,Eo=function(t){var e=wo.Symbol||(wo.Symbol={});ko(e,t)||Ao(e,t,{value:_o.f(t)})},To=P,Co=st,So=pe,xo=fo,Mo=function(){var t=Co("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=So("toPrimitive");e&&!e[r]&&xo(e,r,(function(t){return To(n,this)}),{arity:1})},Lo=lr,Oo=nr?{}.toString:function(){return"[object "+Lo(this)+"]"},Io=nr,Po=Qe.f,Ro=mn,Bo=Zt,Uo=Oo,Do=pe("toStringTag"),jo=function(t,e,n,r){if(t){var i=n?t:t.prototype;Bo(i,Do)||Po(i,Do,{configurable:!0,value:e}),r&&!Io&&Ro(i,"toString",Uo)}},Fo=x,No=o.WeakMap,Ho=Fo(No)&&/native code/.test(String(No)),zo=o,Vo=et,qo=mn,Go=Zt,Yo=Gt,Wo=Pi,Ko=hi,Xo="Object already initialized",$o=zo.TypeError,Jo=zo.WeakMap;if(Ho||Yo.state){var Qo=Yo.state||(Yo.state=new Jo);Qo.get=Qo.get,Qo.has=Qo.has,Qo.set=Qo.set,yo=function(t,e){if(Qo.has(t))throw $o(Xo);return e.facade=t,Qo.set(t,e),e},mo=function(t){return Qo.get(t)||{}},bo=function(t){return Qo.has(t)}}else{var Zo=Wo("state");Ko[Zo]=!0,yo=function(t,e){if(Go(t,Zo))throw $o(Xo);return e.facade=t,qo(t,Zo,e),e},mo=function(t){return Go(t,Zo)?t[Zo]:{}},bo=function(t){return Go(t,Zo)}}var ta={set:yo,get:mo,has:bo,enforce:function(t){return bo(t)?mo(t):yo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=mo(e)).type!==t)throw $o("Incompatible receiver, "+t+" required");return n}}},ea=Je,na=G,ra=$t,ia=Kn,oa=Rr,aa=y([].push),sa=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=7==t,s=5==t||o;return function(u,l,c,f){for(var h,p,d=ra(u),v=na(d),g=ea(l,c),y=ia(v),m=0,b=f||oa,w=e?b(u,y):n||a?b(u,0):void 0;y>m;m++)if((s||m in v)&&(p=g(h=v[m],m,d),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:aa(w,h)}else switch(t){case 4:return!1;case 7:aa(w,h)}return o?-1:r||i?i:w}},ua={forEach:sa(0),map:sa(1),filter:sa(2),some:sa(3),every:sa(4),find:sa(5),findIndex:sa(6),filterReject:sa(7)},la=Ln,ca=o,fa=P,ha=y,pa=L,da=wt,va=a,ga=Zt,ya=ut,ma=rn,ba=Q,wa=Ae,ka=ei,_a=N,Aa=Wi,Ea=_i,Ta=Ki,Ca=Ji,Sa=lo,xa=M,Ma=Qe,La=ni,Oa=R,Ia=fo,Pa=po,Ra=Wt,Ba=hi,Ua=ie,Da=pe,ja=vo,Fa=Eo,Na=Mo,Ha=jo,za=ta,Va=ua.forEach,qa=Pi("hidden"),Ga="Symbol",Ya="prototype",Wa=za.set,Ka=za.getterFor(Ga),Xa=Object[Ya],$a=ca.Symbol,Ja=$a&&$a[Ya],Qa=ca.TypeError,Za=ca.QObject,ts=xa.f,es=Ma.f,ns=Ca.f,rs=Oa.f,is=ha([].push),os=Ra("symbols"),as=Ra("op-symbols"),ss=Ra("wks"),us=!Za||!Za[Ya]||!Za[Ya].findChild,ls=pa&&va((function(){return 7!=Aa(es({},"a",{get:function(){return es(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=ts(Xa,e);r&&delete Xa[e],es(t,e,n),r&&t!==Xa&&es(Xa,e,r)}:es,cs=function(t,e){var n=os[t]=Aa(Ja);return Wa(n,{type:Ga,tag:t,description:e}),pa||(n.description=e),n},fs=function(t,e,n){t===Xa&&fs(as,e,n),ma(t);var r=wa(e);return ma(n),ga(os,r)?(n.enumerable?(ga(t,qa)&&t[qa][r]&&(t[qa][r]=!1),n=Aa(n,{enumerable:_a(0,!1)})):(ga(t,qa)||es(t,qa,_a(1,{})),t[qa][r]=!0),ls(t,r,n)):es(t,r,n)},hs=function(t,e){ma(t);var n=ba(e),r=Ea(n).concat(gs(n));return Va(r,(function(e){pa&&!fa(ps,n,e)||fs(t,e,n[e])})),t},ps=function(t){var e=wa(t),n=fa(rs,this,e);return!(this===Xa&&ga(os,e)&&!ga(as,e))&&(!(n||!ga(this,e)||!ga(os,e)||ga(this,qa)&&this[qa][e])||n)},ds=function(t,e){var n=ba(t),r=wa(e);if(n!==Xa||!ga(os,r)||ga(as,r)){var i=ts(n,r);return!i||!ga(os,r)||ga(n,qa)&&n[qa][r]||(i.enumerable=!0),i}},vs=function(t){var e=ns(ba(t)),n=[];return Va(e,(function(t){ga(os,t)||ga(Ba,t)||is(n,t)})),n},gs=function(t){var e=t===Xa,n=ns(e?as:ba(t)),r=[];return Va(n,(function(t){!ga(os,t)||e&&!ga(Xa,t)||is(r,os[t])})),r};da||($a=function(){if(ya(Ja,this))throw Qa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ka(arguments[0]):void 0,e=Ua(t),n=function(t){this===Xa&&fa(n,as,t),ga(this,qa)&&ga(this[qa],e)&&(this[qa][e]=!1),ls(this,e,_a(1,t))};return pa&&us&&ls(Xa,e,{configurable:!0,set:n}),cs(e,t)},Ia(Ja=$a[Ya],"toString",(function(){return Ka(this).tag})),Ia($a,"withoutSetter",(function(t){return cs(Ua(t),t)})),Oa.f=ps,Ma.f=fs,La.f=hs,xa.f=ds,Ta.f=Ca.f=vs,Sa.f=gs,ja.f=function(t){return cs(Da(t),t)},pa&&Pa(Ja,"description",{configurable:!0,get:function(){return Ka(this).description}})),la({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:$a}),Va(Ea(ss),(function(t){Fa(t)})),la({target:Ga,stat:!0,forced:!da},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),la({target:"Object",stat:!0,forced:!da,sham:!pa},{create:function(t,e){return void 0===e?Aa(t):hs(Aa(t),e)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ds}),la({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:vs}),Na(),Ha($a,Ga),Ba[qa]=!0;var ys=wt&&!!Symbol.for&&!!Symbol.keyFor,ms=Ln,bs=st,ws=Zt,ks=ei,_s=Wt,As=ys,Es=_s("string-to-symbol-registry"),Ts=_s("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!As},{for:function(t){var e=ks(t);if(ws(Es,e))return Es[e];var n=bs("Symbol")(e);return Es[e]=n,Ts[n]=e,n}});var Cs=Ln,Ss=Zt,xs=Ct,Ms=xt,Ls=ys,Os=Wt("symbol-to-string-registry");Cs({target:"Symbol",stat:!0,forced:!Ls},{keyFor:function(t){if(!xs(t))throw TypeError(Ms(t)+" is not a symbol");if(Ss(Os,t))return Os[t]}});var Is=y([].slice),Ps=Fn,Rs=x,Bs=k,Us=ei,Ds=y([].push),js=Ln,Fs=st,Ns=h,Hs=P,zs=y,Vs=a,qs=x,Gs=Ct,Ys=Is,Ws=function(t){if(Rs(t))return t;if(Ps(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Bs(i)&&"String"!=Bs(i)||Ds(n,Us(i))}var o=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Ps(this))return e;for(var r=0;r<o;r++)if(n[r]===t)return e}}},Ks=wt,Xs=String,$s=Fs("JSON","stringify"),Js=zs(/./.exec),Qs=zs("".charAt),Zs=zs("".charCodeAt),tu=zs("".replace),eu=zs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,ou=!Ks||Vs((function(){var t=Fs("Symbol")();return"[null]"!=$s([t])||"{}"!=$s({a:t})||"{}"!=$s(Object(t))})),au=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(t,e){var n=Ys(arguments),r=Ws(e);if(qs(r)||void 0!==t&&!Gs(t))return n[1]=function(t,e){if(qs(r)&&(e=Hs(r,this,Xs(t),e)),!Gs(e))return e},Ns($s,null,n)},uu=function(t,e,n){var r=Qs(n,e-1),i=Qs(n,e+1);return Js(ru,t)&&!Js(iu,i)||Js(iu,t)&&!Js(ru,r)?"\\u"+eu(Zs(t,0),16):t};$s&&js({target:"JSON",stat:!0,arity:3,forced:ou||au},{stringify:function(t,e,n){var r=Ys(arguments),i=Ns(ou?su:$s,null,r);return au&&"string"==typeof i?tu(i,nu,uu):i}});var lu=lo,cu=$t;Ln({target:"Object",stat:!0,forced:!wt||a((function(){lu.f(1)}))},{getOwnPropertySymbols:function(t){var e=lu.f;return e?e(cu(t)):[]}}),Eo("asyncIterator"),Eo("hasInstance"),Eo("isConcatSpreadable"),Eo("iterator"),Eo("match"),Eo("matchAll"),Eo("replace"),Eo("search"),Eo("species"),Eo("split");var fu=Mo;Eo("toPrimitive"),fu();var hu=st,pu=jo;Eo("toStringTag"),pu(hu("Symbol"),"Symbol"),Eo("unscopables"),jo(o.JSON,"JSON",!0);var du,vu,gu,yu=nt.Symbol,mu={},bu=L,wu=Zt,ku=Function.prototype,_u=bu&&Object.getOwnPropertyDescriptor,Au=wu(ku,"name"),Eu={EXISTS:Au,PROPER:Au&&"something"===function(){}.name,CONFIGURABLE:Au&&(!bu||bu&&_u(ku,"name").configurable)},Tu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cu=Zt,Su=x,xu=$t,Mu=Tu,Lu=Pi("IE_PROTO"),Ou=Object,Iu=Ou.prototype,Pu=Mu?Ou.getPrototypeOf:function(t){var e=xu(t);if(Cu(e,Lu))return e[Lu];var n=e.constructor;return Su(n)&&e instanceof n?n.prototype:e instanceof Ou?Iu:null},Ru=a,Bu=x,Uu=et,Du=Wi,ju=Pu,Fu=fo,Nu=pe("iterator"),Hu=!1;[].keys&&("next"in(gu=[].keys())?(vu=ju(ju(gu)))!==Object.prototype&&(du=vu):Hu=!0);var zu=!Uu(du)||Ru((function(){var t={};return du[Nu].call(t)!==t}));Bu((du=zu?{}:Du(du))[Nu])||Fu(du,Nu,(function(){return this}));var Vu={IteratorPrototype:du,BUGGY_SAFARI_ITERATORS:Hu},qu=Vu.IteratorPrototype,Gu=Wi,Yu=N,Wu=jo,Ku=mu,Xu=function(){return this},$u=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Gu(qu,{next:Yu(+!r,n)}),Wu(t,i,!1,!0),Ku[i]=Xu,t},Ju=y,Qu=It,Zu=x,tl=String,el=TypeError,nl=function(t,e,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}},rl=rn,il=function(t){if("object"==typeof t||Zu(t))return t;throw el("Can't set "+tl(t)+" as a prototype")},ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=nl(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return rl(n),il(r),e?t(n,r):n.__proto__=r,n}}():void 0),al=Ln,sl=P,ul=Eu,ll=$u,cl=Pu,fl=jo,hl=fo,pl=mu,dl=Vu,vl=ul.PROPER,gl=dl.BUGGY_SAFARI_ITERATORS,yl=pe("iterator"),ml="keys",bl="values",wl="entries",kl=function(){return this},_l=function(t,e,n,r,i,o,a){ll(n,e,r);var s,u,l,c=function(t){if(t===i&&v)return v;if(!gl&&t in p)return p[t];switch(t){case ml:case bl:case wl:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[yl]||p["@@iterator"]||i&&p[i],v=!gl&&d||c(i),g="Array"==e&&p.entries||d;if(g&&(s=cl(g.call(new t)))!==Object.prototype&&s.next&&(fl(s,f,!0,!0),pl[f]=kl),vl&&i==bl&&d&&d.name!==bl&&(h=!0,v=function(){return sl(d,this)}),i)if(u={values:c(bl),keys:o?v:c(ml),entries:c(wl)},a)for(l in u)(gl||h||!(l in p))&&hl(p,l,u[l]);else al({target:e,proto:!0,forced:gl||h},u);return a&&p[yl]!==v&&hl(p,yl,v,{name:i}),pl[e]=v,u},Al=function(t,e){return{value:t,done:e}},El=Q,Tl=mu,Cl=ta;Qe.f;var Sl=_l,xl=Al,Ml="Array Iterator",Ll=Cl.set,Ol=Cl.getterFor(Ml);Sl(Array,"Array",(function(t,e){Ll(this,{type:Ml,target:El(t),index:0,kind:e})}),(function(){var t=Ol(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,xl(void 0,!0)):xl("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Tl.Arguments=Tl.Array;var Il={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},Pl=o,Rl=lr,Bl=mn,Ul=mu,Dl=pe("toStringTag");for(var jl in Il){var Fl=Pl[jl],Nl=Fl&&Fl.prototype;Nl&&Rl(Nl)!==Dl&&Bl(Nl,Dl,jl),Ul[jl]=Ul.Array}var Hl=yu;Eo("dispose");var zl=Hl;Eo("asyncDispose");var Vl=Ln,ql=y,Gl=st("Symbol"),Yl=Gl.keyFor,Wl=ql(Gl.prototype.valueOf);Vl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Yl(Wl(t))}catch(e){return!1}}});for(var Kl=Ln,Xl=Wt,$l=st,Jl=y,Ql=Ct,Zl=pe,tc=$l("Symbol"),ec=tc.isWellKnown,nc=$l("Object","getOwnPropertyNames"),rc=Jl(tc.prototype.valueOf),ic=Xl("wks"),oc=0,ac=nc(tc),sc=ac.length;oc<sc;oc++)try{var uc=ac[oc];Ql(tc[uc])&&Zl(uc)}catch(aR){}Kl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(ec&&ec(t))return!0;try{for(var e=rc(t),n=0,r=nc(ic),i=r.length;n<i;n++)if(ic[r[n]]==e)return!0}catch(aR){}return!1}}),Eo("matcher"),Eo("metadataKey"),Eo("observable"),Eo("metadata"),Eo("patternMatch"),Eo("replaceAll");var lc=zl,cc=n(lc),fc=y,hc=Vn,pc=ei,dc=X,vc=fc("".charAt),gc=fc("".charCodeAt),yc=fc("".slice),mc=function(t){return function(e,n){var r,i,o=pc(dc(e)),a=hc(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=gc(o,a))<55296||r>56319||a+1===s||(i=gc(o,a+1))<56320||i>57343?t?vc(o,a):r:t?yc(o,a,a+2):i-56320+(r-55296<<10)+65536}},bc={codeAt:mc(!1),charAt:mc(!0)},wc=bc.charAt,kc=ei,_c=ta,Ac=_l,Ec=Al,Tc="String Iterator",Cc=_c.set,Sc=_c.getterFor(Tc);Ac(String,"String",(function(t){Cc(this,{type:Tc,string:kc(t),index:0})}),(function(){var t,e=Sc(this),n=e.string,r=e.index;return r>=n.length?Ec(void 0,!0):(t=wc(n,r),e.index+=t.length,Ec(t,!1))}));var xc=vo.f("iterator"),Mc=n(xc);function Lc(t){return(Lc="function"==typeof cc&&"symbol"==typeof Mc?function(t){return typeof t}:function(t){return t&&"function"==typeof cc&&t.constructor===cc&&t!==cc.prototype?"symbol":typeof t})(t)}var Oc=vo.f("toPrimitive"),Ic=n(Oc);function Pc(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[Ic];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}function Rc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(t,Pc(r.key),r)}}function Bc(t,e,n){return e&&Rc(t.prototype,e),n&&Rc(t,n),Dn(t,"prototype",{writable:!1}),t}function Uc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Dc=Zt,jc=P,Fc=et,Nc=rn,Hc=function(t){return void 0!==t&&(Dc(t,"value")||Dc(t,"writable"))},zc=M,Vc=Pu;Ln({target:"Reflect",stat:!0},{get:function t(e,n){var r,i,o=arguments.length<3?e:arguments[2];return Nc(e)===o?e[n]:(r=zc.f(e,n))?Hc(r)?r.value:void 0===r.get?void 0:jc(r.get,o):Fc(i=Vc(e))?t(i,n,o):void 0}});var qc=nt.Reflect.get,Gc=n(qc),Yc=y,Wc=It,Kc=et,Xc=Zt,$c=Is,Jc=s,Qc=Function,Zc=Yc([].concat),tf=Yc([].join),ef={},nf=Jc?Qc.bind:function(t){var e=Wc(this),n=e.prototype,r=$c(arguments,1),i=function(){var n=Zc(r,$c(arguments));return this instanceof i?function(t,e,n){if(!Xc(ef,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";ef[e]=Qc("C,a","return new C("+tf(r,",")+")")}return ef[e](t,n)}(e,n.length,n):e.apply(t,n)};return Kc(n)&&(i.prototype=n),i},rf=nf;Ln({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var of=nt,af=function(t){return of[t+"Prototype"]},sf=af("Function").bind,uf=ut,lf=sf,cf=Function.prototype,ff=function(t){var e=t.bind;return t===cf||uf(cf,t)&&e===cf.bind?lf:e},hf=n(ff),pf={exports:{}},df=Ln,vf=a,gf=Q,yf=M.f,mf=L;df({target:"Object",stat:!0,forced:!mf||vf((function(){yf(1)})),sham:!mf},{getOwnPropertyDescriptor:function(t,e){return yf(gf(t),e)}});var bf=nt.Object,wf=pf.exports=function(t,e){return bf.getOwnPropertyDescriptor(t,e)};bf.getOwnPropertyDescriptor.sham&&(wf.sham=!0);var kf=pf.exports,_f=n(kf);Ln({target:"Object",stat:!0},{setPrototypeOf:ol});var Af=nt.Object.setPrototypeOf,Ef=n(Af),Tf=$t,Cf=Pu,Sf=Tu;Ln({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Sf},{getPrototypeOf:function(t){return Cf(Tf(t))}});var xf=nt.Object.getPrototypeOf,Mf=n(xf);function Lf(t){var e;return(Lf=Ef?hf(e=Mf).call(e):function(t){return t.__proto__||Mf(t)})(t)}function Of(){var t;"undefined"!=typeof Reflect&&Gc?Of=hf(t=Gc).call(t):Of=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lf(t)););return t}(t,e);if(r){var i=_f(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Of.apply(this,arguments)}Ln({target:"Object",stat:!0,sham:!L},{create:Wi});var If=nt.Object,Pf=function(t,e){return If.create(t,e)},Rf=n(Pf);function Bf(t,e){var n;return(Bf=Ef?hf(n=Ef).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Uf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Rf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dn(t,"prototype",{writable:!1}),e&&Bf(t,e)}var Df=Sr,jf=xt,Ff=TypeError,Nf=function(t){if(Df(t))return t;throw Ff(jf(t)+" is not a constructor")},Hf=Ln,zf=h,Vf=nf,qf=Nf,Gf=rn,Yf=et,Wf=Wi,Kf=a,Xf=st("Reflect","construct"),$f=Object.prototype,Jf=[].push,Qf=Kf((function(){function t(){}return!(Xf((function(){}),[],t)instanceof t)})),Zf=!Kf((function(){Xf((function(){}))})),th=Qf||Zf;Hf({target:"Reflect",stat:!0,forced:th,sham:th},{construct:function(t,e){qf(t),Gf(e);var n=arguments.length<3?t:qf(arguments[2]);if(Zf&&!Qf)return Xf(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return zf(Jf,r,e),new(zf(Vf,t,r))}var i=n.prototype,o=Wf(Yf(i)?i:$f),a=zf(t,o,e);return Yf(a)?a:o}});var eh=nt.Reflect.construct,nh=n(eh);function rh(t){var e=function(){if("undefined"==typeof Reflect||!nh)return!1;if(nh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(nh(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Lf(t);if(e){var i=Lf(this).constructor;n=nh(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Uc(t)}(this,n)}}function ih(t,e,n){return(e=Pc(e))in t?Dn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oh=af("Array").concat,ah=ut,sh=oh,uh=Array.prototype,lh=n((function(t){var e=t.concat;return t===uh||ah(uh,t)&&e===uh.concat?sh:e})),ch="ad_start",fh="ad_play",hh="ad_pause",ph="ad_time_update",dh="ad_skipped",vh="ad_error",gh="ad_complete",yh="ad_all_completed",mh="ima_sdk_load_start",bh="ima_sdk_load_success",wh="ima_sdk_load_error",kh="ima_ad_manager_ready",_h="ima_ad_complete",Ah="ima_ad_error",Eh="ima_ad_loaded",Th="ima_content_pause_requested",Ch="ima_content_resume_requested",Sh="ima_ready_to_play",xh=nt,Mh=h;xh.JSON||(xh.JSON={stringify:JSON.stringify});var Lh=function(t,e,n){return Mh(xh.JSON.stringify,null,arguments)},Oh=n(Lh),Ih=n(lc),Ph=lr,Rh=Bt,Bh=Y,Uh=mu,Dh=pe("iterator"),jh=function(t){if(!Bh(t))return Rh(t,Dh)||Rh(t,"@@iterator")||Uh[Ph(t)]},Fh=jh,Nh=n(Fh),Hh=n(Fh),zh=$t,Vh=_i;Ln({target:"Object",stat:!0,forced:a((function(){Vh(1)}))},{keys:function(t){return Vh(zh(t))}});var qh=n(nt.Object.keys),Gh=n(nt.Object.getOwnPropertySymbols),Yh=ua.filter;Ln({target:"Array",proto:!0,forced:!jr("filter")},{filter:function(t){return Yh(this,t,arguments.length>1?arguments[1]:void 0)}});var Wh=af("Array").filter,Kh=ut,Xh=Wh,$h=Array.prototype,Jh=n((function(t){var e=t.filter;return t===$h||Kh($h,t)&&e===$h.filter?Xh:e})),Qh=n(kf),Zh=a,tp=function(t,e){var n=[][t];return!!n&&Zh((function(){n.call(null,e||function(){return 1},1)}))},ep=ua.forEach,np=tp("forEach")?[].forEach:function(t){return ep(this,t,arguments.length>1?arguments[1]:void 0)};Ln({target:"Array",proto:!0,forced:[].forEach!=np},{forEach:np});var rp=af("Array").forEach,ip=lr,op=Zt,ap=ut,sp=rp,up=Array.prototype,lp={DOMTokenList:!0,NodeList:!0},cp=n((function(t){var e=t.forEach;return t===up||ap(up,t)&&e===up.forEach||op(lp,ip(t))?sp:e})),fp=st,hp=Ki,pp=lo,dp=rn,vp=y([].concat),gp=fp("Reflect","ownKeys")||function(t){var e=hp.f(dp(t)),n=pp.f;return n?vp(e,n(t)):e},yp=gp,mp=Q,bp=M,wp=tr;Ln({target:"Object",stat:!0,sham:!L},{getOwnPropertyDescriptors:function(t){for(var e,n,r=mp(t),i=bp.f,o=yp(r),a={},s=0;o.length>s;)void 0!==(n=i(r,e=o[s++]))&&wp(a,e,n);return a}});var kp=n(nt.Object.getOwnPropertyDescriptors),_p={exports:{}},Ap=Ln,Ep=L,Tp=ni.f;Ap({target:"Object",stat:!0,forced:Object.defineProperties!==Tp,sham:!Ep},{defineProperties:Tp});var Cp=nt.Object,Sp=_p.exports=function(t,e){return Cp.defineProperties(t,e)};Cp.defineProperties.sham&&(Sp.sham=!0);var xp=n(_p.exports),Mp=n(Un),Lp=n(Pf),Op=n(xf),Ip=n(Af),Pp=Zt,Rp=gp,Bp=M,Up=Qe,Dp=et,jp=mn,Fp=Error,Np=y("".replace),Hp=String(Fp("zxcasd").stack),zp=/\n\s*at [^:]*:[^\n]*/,Vp=zp.test(Hp),qp=N,Gp=!a((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",qp(1,7)),7!==t.stack)})),Yp=mn,Wp=function(t,e){if(Vp&&"string"==typeof t&&!Fp.prepareStackTrace)for(;e--;)t=Np(t,zp,"");return t},Kp=Gp,Xp=Error.captureStackTrace,$p=mu,Jp=pe("iterator"),Qp=Array.prototype,Zp=function(t){return void 0!==t&&($p.Array===t||Qp[Jp]===t)},td=P,ed=It,nd=rn,rd=xt,id=jh,od=TypeError,ad=function(t,e){var n=arguments.length<2?id(t):e;if(ed(n))return nd(td(n,t));throw od(rd(t)+" is not iterable")},sd=P,ud=rn,ld=Bt,cd=function(t,e,n){var r,i;ud(t);try{if(!(r=ld(t,"return"))){if("throw"===e)throw n;return n}r=sd(r,t)}catch(aR){i=!0,r=aR}if("throw"===e)throw n;if(i)throw r;return ud(r),n},fd=Je,hd=P,pd=rn,dd=xt,vd=Zp,gd=Kn,yd=ut,md=ad,bd=jh,wd=cd,kd=TypeError,_d=function(t,e){this.stopped=t,this.result=e},Ad=_d.prototype,Ed=function(t,e,n){var r,i,o,a,s,u,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),v=fd(e,c),g=function(t){return r&&wd(r,"normal",t),new _d(!0,t)},y=function(t){return f?(pd(t),d?v(t[0],t[1],g):v(t[0],t[1])):d?v(t,g):v(t)};if(h)r=t.iterator;else if(p)r=t;else{if(!(i=bd(t)))throw kd(dd(t)+" is not iterable");if(vd(i)){for(o=0,a=gd(t);a>o;o++)if((s=y(t[o]))&&yd(Ad,s))return s;return new _d(!1)}r=md(t,i)}for(u=h?t.next:r.next;!(l=hd(u,r)).done;){try{s=y(l.value)}catch(aR){wd(r,"throw",aR)}if("object"==typeof s&&s&&yd(Ad,s))return s}return new _d(!1)},Td=ei,Cd=Ln,Sd=ut,xd=Pu,Md=ol,Ld=function(t,e,n){for(var r=Rp(e),i=Up.f,o=Bp.f,a=0;a<r.length;a++){var s=r[a];Pp(t,s)||n&&Pp(n,s)||i(t,s,o(e,s))}},Od=Wi,Id=mn,Pd=N,Rd=function(t,e){Dp(e)&&"cause"in e&&jp(t,"cause",e.cause)},Bd=function(t,e,n,r){Kp&&(Xp?Xp(t,e):Yp(t,"stack",Wp(n,r)))},Ud=Ed,Dd=function(t,e){return void 0===t?arguments.length<2?"":e:Td(t)},jd=pe("toStringTag"),Fd=Error,Nd=[].push,Hd=function(t,e){var n,r=Sd(zd,this);Md?n=Md(Fd(),r?xd(this):zd):(n=r?this:Od(zd),Id(n,jd,"Error")),void 0!==e&&Id(n,"message",Dd(e)),Bd(n,Hd,n.stack,1),arguments.length>2&&Rd(n,arguments[2]);var i=[];return Ud(t,Nd,{that:i}),Id(n,"errors",i),n};Md?Md(Hd,Fd):Ld(Hd,Fd,{name:!0});var zd=Hd.prototype=Od(Fd.prototype,{constructor:Pd(1,Hd),message:Pd(1,""),name:Pd(1,"AggregateError")});Cd({global:!0,constructor:!0,arity:2},{AggregateError:Hd});var Vd,qd,Gd,Yd,Wd="undefined"!=typeof process&&"process"==k(process),Kd=st,Xd=po,$d=L,Jd=pe("species"),Qd=function(t){var e=Kd(t);$d&&e&&!e[Jd]&&Xd(e,Jd,{configurable:!0,get:function(){return this}})},Zd=ut,tv=TypeError,ev=function(t,e){if(Zd(e,t))return t;throw tv("Incorrect invocation")},nv=rn,rv=Nf,iv=Y,ov=pe("species"),av=function(t,e){var n,r=nv(t).constructor;return void 0===r||iv(n=nv(r)[ov])?e:rv(n)},sv=TypeError,uv=function(t,e){if(t<e)throw sv("Not enough arguments");return t},lv=/(?:ipad|iphone|ipod).*applewebkit/i.test(lt),cv=o,fv=h,hv=Je,pv=x,dv=Zt,vv=a,gv=Li,yv=Is,mv=Se,bv=uv,wv=lv,kv=Wd,_v=cv.setImmediate,Av=cv.clearImmediate,Ev=cv.process,Tv=cv.Dispatch,Cv=cv.Function,Sv=cv.MessageChannel,xv=cv.String,Mv=0,Lv={},Ov="onreadystatechange";vv((function(){Vd=cv.location}));var Iv=function(t){if(dv(Lv,t)){var e=Lv[t];delete Lv[t],e()}},Pv=function(t){return function(){Iv(t)}},Rv=function(t){Iv(t.data)},Bv=function(t){cv.postMessage(xv(t),Vd.protocol+"//"+Vd.host)};_v&&Av||(_v=function(t){bv(arguments.length,1);var e=pv(t)?t:Cv(t),n=yv(arguments,1);return Lv[++Mv]=function(){fv(e,void 0,n)},qd(Mv),Mv},Av=function(t){delete Lv[t]},kv?qd=function(t){Ev.nextTick(Pv(t))}:Tv&&Tv.now?qd=function(t){Tv.now(Pv(t))}:Sv&&!wv?(Yd=(Gd=new Sv).port2,Gd.port1.onmessage=Rv,qd=hv(Yd.postMessage,Yd)):cv.addEventListener&&pv(cv.postMessage)&&!cv.importScripts&&Vd&&"file:"!==Vd.protocol&&!vv(Bv)?(qd=Bv,cv.addEventListener("message",Rv,!1)):qd=Ov in mv("script")?function(t){gv.appendChild(mv("script"))[Ov]=function(){gv.removeChild(this),Iv(t)}}:function(t){setTimeout(Pv(t),0)});var Uv={set:_v,clear:Av},Dv=function(){this.head=null,this.tail=null};Dv.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var jv,Fv,Nv,Hv,zv,Vv=Dv,qv=/ipad|iphone|ipod/i.test(lt)&&"undefined"!=typeof Pebble,Gv=/web0s(?!.*chrome)/i.test(lt),Yv=o,Wv=Je,Kv=M.f,Xv=Uv.set,$v=Vv,Jv=lv,Qv=qv,Zv=Gv,tg=Wd,eg=Yv.MutationObserver||Yv.WebKitMutationObserver,ng=Yv.document,rg=Yv.process,ig=Yv.Promise,og=Kv(Yv,"queueMicrotask"),ag=og&&og.value;if(!ag){var sg=new $v,ug=function(){var t,e;for(tg&&(t=rg.domain)&&t.exit();e=sg.get();)try{e()}catch(aR){throw sg.head&&jv(),aR}t&&t.enter()};Jv||tg||Zv||!eg||!ng?!Qv&&ig&&ig.resolve?((Hv=ig.resolve(void 0)).constructor=ig,zv=Wv(Hv.then,Hv),jv=function(){zv(ug)}):tg?jv=function(){rg.nextTick(ug)}:(Xv=Wv(Xv,Yv),jv=function(){Xv(ug)}):(Fv=!0,Nv=ng.createTextNode(""),new eg(ug).observe(Nv,{characterData:!0}),jv=function(){Nv.data=Fv=!Fv}),ag=function(t){sg.head||jv(),sg.add(t)}}var lg=ag,cg=function(t){try{return{error:!1,value:t()}}catch(aR){return{error:!0,value:aR}}},fg=o.Promise,hg="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pg=!hg&&!Wd&&"object"==typeof window&&"object"==typeof document,dg=o,vg=fg,gg=x,yg=We,mg=pr,bg=pe,wg=pg,kg=hg,_g=gt,Ag=vg&&vg.prototype,Eg=bg("species"),Tg=!1,Cg=gg(dg.PromiseRejectionEvent),Sg={CONSTRUCTOR:yg("Promise",(function(){var t=mg(vg),e=t!==String(vg);if(!e&&66===_g)return!0;if(!Ag.catch||!Ag.finally)return!0;if(!_g||_g<51||!/native code/.test(t)){var n=new vg((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Eg]=r,!(Tg=n.then((function(){}))instanceof r))return!0}return!e&&(wg||kg)&&!Cg})),REJECTION_EVENT:Cg,SUBCLASSING:Tg},xg={},Mg=It,Lg=TypeError,Og=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Lg("Bad Promise constructor");e=t,n=r})),this.resolve=Mg(e),this.reject=Mg(n)};xg.f=function(t){return new Og(t)};var Ig,Pg,Rg=Ln,Bg=Wd,Ug=o,Dg=P,jg=fo,Fg=jo,Ng=Qd,Hg=It,zg=x,Vg=et,qg=ev,Gg=av,Yg=Uv.set,Wg=lg,Kg=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(aR){}},Xg=cg,$g=Vv,Jg=ta,Qg=fg,Zg=Sg,ty=xg,ey="Promise",ny=Zg.CONSTRUCTOR,ry=Zg.REJECTION_EVENT,iy=Jg.getterFor(ey),oy=Jg.set,ay=Qg&&Qg.prototype,sy=Qg,uy=ay,ly=Ug.TypeError,cy=Ug.document,fy=Ug.process,hy=ty.f,py=hy,dy=!!(cy&&cy.createEvent&&Ug.dispatchEvent),vy="unhandledrejection",gy=function(t){var e;return!(!Vg(t)||!zg(e=t.then))&&e},yy=function(t,e){var n,r,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(a||(2===e.rejection&&_y(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(ly("Promise-chain cycle")):(r=gy(n))?Dg(r,n,u,l):u(n)):l(o)}catch(aR){c&&!i&&c.exit(),l(aR)}},my=function(t,e){t.notified||(t.notified=!0,Wg((function(){for(var n,r=t.reactions;n=r.get();)yy(n,t);t.notified=!1,e&&!t.rejection&&wy(t)})))},by=function(t,e,n){var r,i;dy?((r=cy.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Ug.dispatchEvent(r)):r={promise:e,reason:n},!ry&&(i=Ug["on"+t])?i(r):t===vy&&Kg("Unhandled promise rejection",n)},wy=function(t){Dg(Yg,Ug,(function(){var e,n=t.facade,r=t.value;if(ky(t)&&(e=Xg((function(){Bg?fy.emit("unhandledRejection",r,n):by(vy,n,r)})),t.rejection=Bg||ky(t)?2:1,e.error))throw e.value}))},ky=function(t){return 1!==t.rejection&&!t.parent},_y=function(t){Dg(Yg,Ug,(function(){var e=t.facade;Bg?fy.emit("rejectionHandled",e):by("rejectionhandled",e,t.value)}))},Ay=function(t,e,n){return function(r){t(e,r,n)}},Ey=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,my(t,!0))},Ty=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw ly("Promise can't be resolved itself");var r=gy(e);r?Wg((function(){var n={done:!1};try{Dg(r,e,Ay(Ty,n,t),Ay(Ey,n,t))}catch(aR){Ey(n,aR,t)}})):(t.value=e,t.state=1,my(t,!1))}catch(aR){Ey({done:!1},aR,t)}}};ny&&(uy=(sy=function(t){qg(this,uy),Hg(t),Dg(Ig,this);var e=iy(this);try{t(Ay(Ty,e),Ay(Ey,e))}catch(aR){Ey(e,aR)}}).prototype,(Ig=function(t){oy(this,{type:ey,done:!1,notified:!1,parent:!1,reactions:new $g,rejection:!1,state:0,value:void 0})}).prototype=jg(uy,"then",(function(t,e){var n=iy(this),r=hy(Gg(this,sy));return n.parent=!0,r.ok=!zg(t)||t,r.fail=zg(e)&&e,r.domain=Bg?fy.domain:void 0,0==n.state?n.reactions.add(r):Wg((function(){yy(r,n)})),r.promise})),Pg=function(){var t=new Ig,e=iy(t);this.promise=t,this.resolve=Ay(Ty,e),this.reject=Ay(Ey,e)},ty.f=hy=function(t){return t===sy||undefined===t?new Pg(t):py(t)}),Rg({global:!0,constructor:!0,wrap:!0,forced:ny},{Promise:sy}),Fg(sy,ey,!1,!0),Ng(ey);var Cy=pe("iterator"),Sy=!1;try{var xy=0,My={next:function(){return{done:!!xy++}},return:function(){Sy=!0}};My[Cy]=function(){return this},Array.from(My,(function(){throw 2}))}catch(aR){}var Ly=function(t,e){if(!e&&!Sy)return!1;var n=!1;try{var r={};r[Cy]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(aR){}return n},Oy=fg,Iy=Sg.CONSTRUCTOR||!Ly((function(t){Oy.all(t).then(void 0,(function(){}))})),Py=P,Ry=It,By=xg,Uy=cg,Dy=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{all:function(t){var e=this,n=By.f(e),r=n.resolve,i=n.reject,o=Uy((function(){var n=Ry(e.resolve),o=[],a=0,s=1;Dy(t,(function(t){var u=a++,l=!1;s++,Py(n,e,t).then((function(t){l||(l=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var jy=Ln,Fy=Sg.CONSTRUCTOR;fg&&fg.prototype,jy({target:"Promise",proto:!0,forced:Fy,real:!0},{catch:function(t){return this.then(void 0,t)}});var Ny=P,Hy=It,zy=xg,Vy=cg,qy=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{race:function(t){var e=this,n=zy.f(e),r=n.reject,i=Vy((function(){var i=Hy(e.resolve);qy(t,(function(t){Ny(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Gy=P,Yy=xg;Ln({target:"Promise",stat:!0,forced:Sg.CONSTRUCTOR},{reject:function(t){var e=Yy.f(this);return Gy(e.reject,void 0,t),e.promise}});var Wy=rn,Ky=et,Xy=xg,$y=function(t,e){if(Wy(t),Ky(e)&&e.constructor===t)return e;var n=Xy.f(t);return(0,n.resolve)(e),n.promise},Jy=Ln,Qy=fg,Zy=Sg.CONSTRUCTOR,tm=$y,em=st("Promise"),nm=!Zy;Jy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return tm(nm&&this===em?Qy:this,t)}});var rm=P,im=It,om=xg,am=cg,sm=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{allSettled:function(t){var e=this,n=om.f(e),r=n.resolve,i=n.reject,o=am((function(){var n=im(e.resolve),i=[],o=0,a=1;sm(t,(function(t){var s=o++,u=!1;a++,rm(n,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||r(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var um=P,lm=It,cm=st,fm=xg,hm=cg,pm=Ed,dm="No one promise resolved";Ln({target:"Promise",stat:!0,forced:Iy},{any:function(t){var e=this,n=cm("AggregateError"),r=fm.f(e),i=r.resolve,o=r.reject,a=hm((function(){var r=lm(e.resolve),a=[],s=0,u=1,l=!1;pm(t,(function(t){var c=s++,f=!1;u++,um(r,e,t).then((function(t){f||l||(l=!0,i(t))}),(function(t){f||l||(f=!0,a[c]=t,--u||o(new n(a,dm)))}))})),--u||o(new n(a,dm))}));return a.error&&o(a.value),r.promise}});var vm=Ln,gm=fg,ym=a,mm=st,bm=x,wm=av,km=$y,_m=gm&&gm.prototype;vm({target:"Promise",proto:!0,real:!0,forced:!!gm&&ym((function(){_m.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=wm(this,mm("Promise")),n=bm(t);return this.then(n?function(n){return km(e,t()).then((function(){return n}))}:t,n?function(n){return km(e,t()).then((function(){throw n}))}:t)}});var Am=nt.Promise,Em=xg,Tm=cg;Ln({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Em.f(this),n=Tm(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var Cm=n(Am),Sm=Ln,xm=Fn,Mm=y([].reverse),Lm=[1,2];Sm({target:"Array",proto:!0,forced:String(Lm)===String(Lm.reverse())},{reverse:function(){return xm(this)&&(this.length=this.length),Mm(this)}});var Om=af("Array").reverse,Im=ut,Pm=Om,Rm=Array.prototype,Bm=n((function(t){var e=t.reverse;return t===Rm||Im(Rm,t)&&e===Rm.reverse?Pm:e})),Um=Ln,Dm=Fn,jm=Sr,Fm=et,Nm=ai,Hm=Kn,zm=Q,Vm=tr,qm=pe,Gm=Is,Ym=jr("slice"),Wm=qm("species"),Km=Array,Xm=Math.max;Um({target:"Array",proto:!0,forced:!Ym},{slice:function(t,e){var n,r,i,o=zm(this),a=Hm(o),s=Nm(t,a),u=Nm(void 0===e?a:e,a);if(Dm(o)&&(n=o.constructor,(jm(n)&&(n===Km||Dm(n.prototype))||Fm(n)&&null===(n=n[Wm]))&&(n=void 0),n===Km||void 0===n))return Gm(o,s,u);for(r=new(void 0===n?Km:n)(Xm(u-s,0)),i=0;s<u;s++,i++)s in o&&Vm(r,i,o[s]);return r.length=i,r}});var $m=af("Array").slice,Jm=ut,Qm=$m,Zm=Array.prototype,tb=function(t){var e=t.slice;return t===Zm||Jm(Zm,t)&&e===Zm.slice?Qm:e},eb=n(tb),nb=n(tb),rb=n(xc),ib=n(ff),ob=n(eh),ab=n(qc);Ln({target:"Array",stat:!0},{isArray:Fn});var sb=nt.Array.isArray,ub=n(sb),lb=n(sb),cb=rn,fb=cd,hb=Je,pb=P,db=$t,vb=function(t,e,n,r){try{return r?e(cb(n)[0],n[1]):e(n)}catch(aR){fb(t,"throw",aR)}},gb=Zp,yb=Sr,mb=Kn,bb=tr,wb=ad,kb=jh,_b=Array,Ab=function(t){var e=db(t),n=yb(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=hb(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=kb(e),p=0;if(!h||this===_b&&gb(h))for(a=mb(e),s=n?new this(a):_b(a);a>p;p++)f=o?i(e[p],p):e[p],bb(s,p,f);else for(c=(l=wb(e,h)).next,s=n?new this:[];!(u=pb(c,l)).done;p++)f=o?vb(l,i,[u.value,p],!0):u.value,bb(s,p,f);return s.length=p,s},Eb=Ab;Ln({target:"Array",stat:!0,forced:!Ly((function(t){Array.from(t)}))},{from:Eb});var Tb=nt.Array.from,Cb=n(Tb),Sb=n(Tb),xb=n(Oc);function Mb(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function Lb(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?cp(n=Mb(Object(i),!0)).call(n,(function(e){jb(t,e,i[e])})):kp?xp(t,kp(i)):cp(r=Mb(Object(i))).call(r,(function(e){Mp(t,e,Qh(i,e))}))}return t}function Ob(){Ob=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Mp||function(t,e,n){t[e]=n.value},i="function"==typeof Ih?Ih:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(S){u=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Lp(o.prototype),s=new E(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var v={};u(v,o,(function(){return this}));var g=Op&&Op(Op(T([])));g&&g!==e&&n.call(g,o)&&(v=g);var y=d.prototype=h.prototype=Lp(v);function m(t){var e;cp(e=["next","throw","return"]).call(e,(function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Lc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],cp(t).call(t,_,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Ip?Ip(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Lp(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Cm);var a=new b(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return Bm(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,E.prototype={constructor:E,reset:function(t){var e;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,cp(e=this.tryEntries).call(e,A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+nb(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ib(t){return(Ib="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function Pb(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(aR){return void n(aR)}s.done?e(u):Cm.resolve(u).then(r,i)}function Rb(t){return function(){var e=this,n=arguments;return new Cm((function(r,i){var o=t.apply(e,n);function a(t){Pb(o,r,i,a,s,"next",t)}function s(t){Pb(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ub(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,Wb(r.key),r)}}function Db(t,e,n){return e&&Ub(t.prototype,e),n&&Ub(t,n),Mp(t,"prototype",{writable:!1}),t}function jb(t,e,n){return(e=Wb(e))in t?Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fb(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Mp(t,"prototype",{writable:!1}),e&&Hb(t,e)}function Nb(t){var e;return(Nb=Ip?ib(e=Op).call(e):function(t){return t.__proto__||Op(t)})(t)}function Hb(t,e){var n;return(Hb=Ip?ib(n=Ip).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function zb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vb(t){var e=function(){if("undefined"==typeof Reflect||!ob)return!1;if(ob.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ob(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Nb(t);if(e){var i=Nb(this).constructor;n=ob(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zb(t)}(this,n)}}function qb(){var t;"undefined"!=typeof Reflect&&ab?qb=ib(t=ab).call(t):qb=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nb(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return qb.apply(this,arguments)}function Gb(t,e){return function(t){if(lb(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==Ih&&Hh(t)||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){var n;if(!t)return;if("string"==typeof t)return Yb(t,e);var r=nb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Sb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yb(t,e)}(t,e)||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.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wb(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var Kb=Ln,Xb=fi.indexOf,$b=tp,Jb=E([].indexOf),Qb=!!Jb&&1/Jb([1],1,-0)<0;Kb({target:"Array",proto:!0,forced:Qb||!$b("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Qb?Jb(this,t,e)||0:Xb(this,t,e)}});var Zb=af("Array").indexOf,tw=ut,ew=Zb,nw=Array.prototype,rw=n((function(t){var e=t.indexOf;return t===nw||tw(nw,t)&&e===nw.indexOf?ew:e})),iw=Ln,ow=ua.find,aw="find",sw=!0;aw in[]&&Array(1)[aw]((function(){sw=!1})),iw({target:"Array",proto:!0,forced:sw},{find:function(t){return ow(this,t,arguments.length>1?arguments[1]:void 0)}});var uw=af("Array").find,lw=ut,cw=uw,fw=Array.prototype,hw=n((function(t){var e=t.find;return t===fw||lw(fw,t)&&e===fw.find?cw:e})),pw=L,dw=Fn,vw=TypeError,gw=Object.getOwnPropertyDescriptor,yw=pw&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(aR){return aR instanceof TypeError}}(),mw=xt,bw=TypeError,ww=function(t,e){if(!delete t[e])throw bw("Cannot delete property "+mw(e)+" of "+mw(t))},kw=Ln,_w=$t,Aw=ai,Ew=Vn,Tw=Kn,Cw=yw?function(t,e){if(dw(t)&&!gw(t,"length").writable)throw vw("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Sw=$n,xw=Rr,Mw=tr,Lw=ww,Ow=jr("splice"),Iw=Math.max,Pw=Math.min;kw({target:"Array",proto:!0,forced:!Ow},{splice:function(t,e){var n,r,i,o,a,s,u=_w(this),l=Tw(u),c=Aw(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Pw(Iw(Ew(e),0),l-c)),Sw(l+n-r),i=xw(u,r),o=0;o<r;o++)(a=c+o)in u&&Mw(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:Lw(u,s);for(o=l;o>l-r+n;o--)Lw(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:Lw(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Cw(u,l-r+n),i}});var Rw=af("Array").splice,Bw=ut,Uw=Rw,Dw=Array.prototype,jw=n((function(t){var e=t.splice;return t===Dw||Bw(Dw,t)&&e===Dw.splice?Uw:e})),Fw="\t\n\v\f\r                 \u2028\u2029\ufeff",Nw=X,Hw=ei,zw=Fw,Vw=y("".replace),qw=RegExp("^["+zw+"]+"),Gw=RegExp("(^|[^"+zw+"])["+zw+"]+$"),Yw=function(t){return function(e){var n=Hw(Nw(e));return 1&t&&(n=Vw(n,qw,"")),2&t&&(n=Vw(n,Gw,"$1")),n}},Ww={start:Yw(1),end:Yw(2),trim:Yw(3)},Kw=o,Xw=a,$w=y,Jw=ei,Qw=Ww.trim,Zw=Fw,tk=Kw.parseInt,ek=Kw.Symbol,nk=ek&&ek.iterator,rk=/^[+-]?0x/i,ik=$w(rk.exec),ok=8!==tk(Zw+"08")||22!==tk(Zw+"0x16")||nk&&!Xw((function(){tk(Object(nk))}))?function(t,e){var n=Qw(Jw(t));return tk(n,e>>>0||(ik(rk,n)?16:10))}:tk;Ln({global:!0,forced:parseInt!=ok},{parseInt:ok});var ak=n(nt.parseInt),sk=ua.map;Ln({target:"Array",proto:!0,forced:!jr("map")},{map:function(t){return sk(this,t,arguments.length>1?arguments[1]:void 0)}});var uk=af("Array").map,lk=ut,ck=uk,fk=Array.prototype,hk=n((function(t){var e=t.map;return t===fk||lk(fk,t)&&e===fk.map?ck:e})),pk=L,dk=y,vk=P,gk=a,yk=_i,mk=lo,bk=R,wk=$t,kk=G,_k=Object.assign,Ak=Object.defineProperty,Ek=dk([].concat),Tk=!_k||gk((function(){if(pk&&1!==_k({b:1},_k(Ak({},"a",{enumerable:!0,get:function(){Ak(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=_k({},t)[n]||yk(_k({},e)).join("")!=r}))?function(t,e){for(var n=wk(t),r=arguments.length,i=1,o=mk.f,a=bk.f;r>i;)for(var s,u=kk(arguments[i++]),l=o?Ek(yk(u),o(u)):yk(u),c=l.length,f=0;c>f;)s=l[f++],pk&&!vk(a,u,s)||(n[s]=u[s]);return n}:_k,Ck=Tk;Ln({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ck},{assign:Ck});var Sk=n(nt.Object.assign);function xk(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mk(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?cp(n=xk(Object(i),!0)).call(n,(function(e){Rk(t,e,i[e])})):kp?xp(t,kp(i)):cp(r=xk(Object(i))).call(r,(function(e){Mp(t,e,Qh(i,e))}))}return t}function Lk(t){return(Lk="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function Ok(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ik(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,Vk(r.key),r)}}function Pk(t,e,n){return e&&Ik(t.prototype,e),n&&Ik(t,n),Mp(t,"prototype",{writable:!1}),t}function Rk(t,e,n){return(e=Vk(e))in t?Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bk(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Mp(t,"prototype",{writable:!1}),e&&Dk(t,e)}function Uk(t){var e;return(Uk=Ip?ib(e=Op).call(e):function(t){return t.__proto__||Op(t)})(t)}function Dk(t,e){var n;return(Dk=Ip?ib(n=Ip).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function jk(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fk(t){var e=function(){if("undefined"==typeof Reflect||!ob)return!1;if(ob.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ob(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Uk(t);if(e){var i=Uk(this).constructor;n=ob(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return jk(t)}(this,n)}}function Nk(){var t;"undefined"!=typeof Reflect&&ab?Nk=ib(t=ab).call(t):Nk=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Uk(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Nk.apply(this,arguments)}function Hk(t){return function(t){if(lb(t))return zk(t)}(t)||function(t){if(void 0!==Ih&&null!=Hh(t)||null!=t["@@iterator"])return Sb(t)}(t)||function(t,e){var n;if(!t)return;if("string"==typeof t)return zk(t,e);var r=nb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Sb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zk(t,e)}(t)||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 zk(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vk(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var qk={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Lp&&(r.prototype=Lp(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?nb(r).call(r,1):r);return Gh?lh(i).call(i,Gh(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}(qk);var Gk=qk.exports,Yk=ua.some;Ln({target:"Array",proto:!0,forced:!tp("some")},{some:function(t){return Yk(this,t,arguments.length>1?arguments[1]:void 0)}});var Wk=af("Array").some,Kk=ut,Xk=Wk,$k=Array.prototype,Jk=n((function(t){var e=t.some;return t===$k||Kk($k,t)&&e===$k.some?Xk:e})),Qk=Vn,Zk=ei,t_=X,e_=RangeError,n_=y,r_=Yn,i_=ei,o_=X,a_=n_((function(t){var e=Zk(t_(this)),n="",r=Qk(t);if(r<0||r==1/0)throw e_("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n})),s_=n_("".slice),u_=Math.ceil,l_=function(t){return function(e,n,r){var i,o,a=i_(o_(e)),s=r_(n),u=a.length,l=void 0===r?" ":i_(r);return s<=u||""==l?a:((o=a_(l,u_((i=s-u)/l.length))).length>i&&(o=s_(o,0,i)),t?a+o:o+a)}},c_={start:l_(!1),end:l_(!0)},f_=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(lt),h_=c_.start;Ln({target:"String",proto:!0,forced:f_},{padStart:function(t){return h_(this,t,arguments.length>1?arguments[1]:void 0)}});var p_,d_=af("String").padStart,v_=ut,g_=d_,y_=String.prototype,m_=n((function(t){var e=t.padStart;return"string"==typeof t||t===y_||v_(y_,t)&&e===y_.padStart?g_:e})),b_="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,w_=o,k_=h,__=x,A_=b_,E_=lt,T_=Is,C_=uv,S_=w_.Function,x_=/MSIE .\./.test(E_)||A_&&((p_=w_.Bun.version.split(".")).length<3||0==p_[0]&&(p_[1]<3||3==p_[1]&&0==p_[2])),M_=function(t,e){var n=e?2:1;return x_?function(r,i){var o=C_(arguments.length,1)>n,a=__(r)?r:S_(r),s=o?T_(arguments,n):[],u=o?function(){k_(a,this,s)}:a;return e?t(u,i):t(u)}:t},L_=Ln,O_=o,I_=M_(O_.setInterval,!0);L_({global:!0,bind:!0,forced:O_.setInterval!==I_},{setInterval:I_});var P_=Ln,R_=o,B_=M_(R_.setTimeout,!0);P_({global:!0,bind:!0,forced:R_.setTimeout!==B_},{setTimeout:B_});var U_=n(nt.setInterval),D_=n(nt.setTimeout),j_=ua.every;Ln({target:"Array",proto:!0,forced:!tp("every")},{every:function(t){return j_(this,t,arguments.length>1?arguments[1]:void 0)}});var F_=af("Array").every,N_=ut,H_=F_,z_=Array.prototype,V_=n((function(t){var e=t.every;return t===z_||N_(z_,t)&&e===z_.every?H_:e})),q_=o,G_=a,Y_=ei,W_=Ww.trim,K_=Fw,X_=y("".charAt),$_=q_.parseFloat,J_=q_.Symbol,Q_=J_&&J_.iterator,Z_=1/$_(K_+"-0")!=-1/0||Q_&&!G_((function(){$_(Object(Q_))}))?function(t){var e=W_(Y_(t)),n=$_(e);return 0===n&&"-"==X_(e,0)?-0:n}:$_;Ln({global:!0,forced:parseFloat!=Z_},{parseFloat:Z_});var tA=n(nt.parseFloat),eA=Eu.PROPER,nA=a,rA=Fw,iA=Ww.trim;Ln({target:"String",proto:!0,forced:function(t){return nA((function(){return!!rA[t]()||"​…᠎"!=="​…᠎"[t]()||eA&&rA[t].name!==t}))}("trim")},{trim:function(){return iA(this)}});var oA=af("String").trim,aA=ut,sA=oA,uA=String.prototype,lA=n((function(t){var e=t.trim;return"string"==typeof t||t===uA||aA(uA,t)&&e===uA.trim?sA:e})),cA=ro,fA=Math.floor,hA=function(t,e){var n=t.length,r=fA(n/2);return n<8?pA(t,e):dA(t,hA(cA(t,0,r),e),hA(cA(t,r),e),e)},pA=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},dA=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t},vA=hA,gA=lt.match(/firefox\/(\d+)/i),yA=!!gA&&+gA[1],mA=/MSIE|Trident/.test(lt),bA=lt.match(/AppleWebKit\/(\d+)\./),wA=!!bA&&+bA[1],kA=Ln,_A=y,AA=It,EA=$t,TA=Kn,CA=ww,SA=ei,xA=a,MA=vA,LA=tp,OA=yA,IA=mA,PA=gt,RA=wA,BA=[],UA=_A(BA.sort),DA=_A(BA.push),jA=xA((function(){BA.sort(void 0)})),FA=xA((function(){BA.sort(null)})),NA=LA("sort"),HA=!xA((function(){if(PA)return PA<70;if(!(OA&&OA>3)){if(IA)return!0;if(RA)return RA<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)BA.push({k:e+r,v:n})}for(BA.sort((function(t,e){return e.v-t.v})),r=0;r<BA.length;r++)e=BA[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));kA({target:"Array",proto:!0,forced:jA||!FA||!NA||!HA},{sort:function(t){void 0!==t&&AA(t);var e=EA(this);if(HA)return void 0===t?UA(e):UA(e,t);var n,r,i=[],o=TA(e);for(r=0;r<o;r++)r in e&&DA(i,e[r]);for(MA(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:SA(e)>SA(n)?1:-1}}(t)),n=TA(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)CA(e,r++);return e}});var zA,VA=af("Array").sort,qA=ut,GA=VA,YA=Array.prototype,WA=n((function(t){var e=t.sort;return t===YA||qA(YA,t)&&e===YA.sort?GA:e})),KA="undefined"!=typeof window&&window.location&&rw(zA=window.location.href).call(zA,"xgplayerdebugger=1")>-1,XA="color: #525252; background-color: #90ee90;",$A="color: #525252; background-color: red;",JA="color: #525252; background-color: yellow; ",QA="%c[xgplayer]",ZA={config:{debug:KA?3:0},logInfo:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,lh(e=[QA,XA,t]).call(e,i))},logWarn:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,lh(e=[QA,JA,t]).call(e,i))},logError:function(t){var e,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,lh(e=[QA,$A,t]).call(e,o))}}},tE=function(){function t(e){Ok(this,t),this.bufferedList=e}return Pk(t,[{key:"start",value:function(t){return this.bufferedList[t].start}},{key:"end",value:function(t){return this.bufferedList[t].end}},{key:"length",get:function(){return this.bufferedList.length}}]),t}(),eE={};eE.createDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=n,cp(t=qh(r)).call(t,(function(t){var n=t,i=r[t];"video"===e||"audio"===e||"live-video"===e?i&&o.setAttribute(n,i):o.setAttribute(n,i)})),o},eE.createDomFromHtml=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=t;var i=r.children;if(r=null,i.length>0){var o;if(i=i[0],n&&eE.addClass(i,n),e)cp(o=qh(e)).call(o,(function(t){i.setAttribute(t,e[t])}));return i}return null}catch(a){return ZA.logError("util.createDomFromHtml",a),null}},eE.hasClass=function(t,e){if(!t||!e)return!1;try{return Jk(Array.prototype).call(t.classList,(function(t){return t===e}))}catch(r){var n=t.className&&"object"===Lk(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}},eE.addClass=function(t,e){if(t&&e)try{var n;cp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.add(e)}))}catch(r){eE.hasClass(t,e)||(t.className&&"object"===Lk(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e)}},eE.removeClass=function(t,e){if(t&&e)try{var n;cp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.remove(e)}))}catch(i){var r;if(eE.hasClass(t,e))cp(r=e.split(/\s+/g)).call(r,(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===Lk(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}},eE.toggleClass=function(t,e){var n;t&&cp(n=e.split(/\s+/g)).call(n,(function(e){eE.hasClass(t,e)?eE.removeClass(t,e):eE.addClass(t,e)}))},eE.classNames=function(){for(var t=arguments,e=[],n=function(n){if("String"===eE.typeOf(t[n]))e.push(t[n]);else if("Object"===eE.typeOf(t[n])){var r;hk(r=qh(t[n])).call(r,(function(r){t[n][r]&&e.push(r)}))}},r=0;r<arguments.length;r++)n(r);return e.join(" ")},eE.findDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{t=e.querySelector(n)}catch(r){ZA.logError("util.findDom",r),0===rw(n).call(n,"#")&&(t=e.getElementById(nb(n).call(n,1)))}return t},eE.getCss=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},eE.padStart=function(t,e,n){for(var r=String(n),i=e>>0,o=Math.ceil(i/r.length),a=[],s=String(t);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},eE.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var e=m_(eE).call(eE,Math.floor(t/3600),2,0),n=m_(eE).call(eE,Math.floor((t-3600*e)/60),2,0),r=m_(eE).call(eE,Math.floor(t-3600*e-60*n),2,0);return("00"===e?[n,r]:[e,n,r]).join(":")},eE.event=function(t){if(t.touches){var e=t.touches[0]||t.changedTouches[0];t.clientX=e.clientX||0,t.clientY=e.clientY||0,t.offsetX=e.pageX-e.target.offsetLeft,t.offsetY=e.pageY-e.target.offsetTop}t._target=t.target||t.srcElement},eE.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},eE.deepCopy=function(t,e){var n;if("Object"===eE.typeOf(e)&&"Object"===eE.typeOf(t))return cp(n=qh(e)).call(n,(function(n){if("Object"!==eE.typeOf(e[n])||e[n]instanceof Node)if("Array"===eE.typeOf(e[n])){var r;t[n]="Array"===eE.typeOf(t[n])?lh(r=t[n]).call(r,e[n]):e[n]}else t[n]=e[n];else void 0===t[n]||void 0===t[n]?t[n]=e[n]:eE.deepCopy(t[n],e[n])})),t},eE.deepMerge=function(t,e){var n;return hk(n=qh(e)).call(n,(function(n){var r;"Array"===eE.typeOf(e[n])&&"Array"===eE.typeOf(t[n])?"Array"===eE.typeOf(t[n])&&(r=t[n]).push.apply(r,Hk(e[n])):eE.typeOf(t[n])!==eE.typeOf(e[n])||null===t[n]||"Object"!==eE.typeOf(t[n])||e[n]instanceof window.Node?null!==e[n]&&(t[n]=e[n]):eE.deepMerge(t[n],e[n])})),t},eE.getBgImage=function(t){var e=(t.currentStyle||window.getComputedStyle(t,null)).backgroundImage;if(!e||"none"===e)return"";var n=document.createElement("a");return n.href=e.replace(/url\("|"\)/g,""),n.href},eE.copyDom=function(t){if(t&&1===t.nodeType){var e=document.createElement(t.tagName);return cp(Array.prototype).call(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),t.innerHTML&&(e.innerHTML=t.innerHTML),e}return""},eE.setInterval=function(t,e,n,r){t._interval[e]||(t._interval[e]=U_(ib(n).call(n,t),r))},eE.clearInterval=function(t,e){clearInterval(t._interval[e]),t._interval[e]=null},eE.setTimeout=function(t,e,n){t._timers||(t._timers=[]);var r=D_((function(){e(),eE.clearTimeout(t,r)}),n);return t._timers.push(r),r},eE.clearTimeout=function(t,e){var n=t._timers;if("Array"===eE.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===e){jw(n).call(n,r,1),clearTimeout(e);break}}else clearTimeout(e)},eE.clearAllTimers=function(t){var e=t._timers;"Array"===eE.typeOf(e)&&(hk(e).call(e,(function(t){clearTimeout(t)})),t._timerIds=[])},eE.createImgBtn=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,v,g=eE.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));(g.style.backgroundImage='url("'.concat(e,'")'),n&&r)&&(V_(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(t){var e,i;return!(rw(n).call(n,t)>-1&&rw(r).call(r,t)>-1)||(c=tA(lA(e=nb(n).call(n,0,rw(n).call(n,t))).call(e)),f=tA(lA(i=nb(r).call(r,0,rw(r).call(r,t))).call(i)),h=t,!1)})),g.style.width=lh(o="".concat(c)).call(o,h),g.style.height=lh(a="".concat(f)).call(a,h),g.style.backgroundSize=lh(s=lh(u=lh(l="".concat(c)).call(l,h," ")).call(u,f)).call(s,h),g.style.margin="start"===t?lh(p=lh(d=lh(v="-".concat(f/2)).call(v,h," auto auto -")).call(d,c/2)).call(p,h):"auto 5px auto 5px");return g},eE.Hex2RGBA=function(t,e){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(t)){var i="#";t.replace(/[0-9A-F]/gi,(function(t){i+=t+t})),t=i}return/^#[0-9A-F]{6}$/i.test(t)?(t.replace(/[0-9A-F]{2}/gi,(function(t){r.push(ak(t,16))})),lh(n="rgba(".concat(r.join(","),", ")).call(n,e,")")):"rgba(255, 255, 255, 0.1)"},eE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},eE.checkIsFunction=function(t){return t&&"function"==typeof t},eE.checkIsObject=function(t){return null!==t&&"object"===Lk(t)},eE.hide=function(t){t.style.display="none"},eE.show=function(t,e){t.style.display=e||"block"},eE.isUndefined=function(t){if(null==t)return!0},eE.isNotNull=function(t){return!(null==t)},eE.setStyleFromCsstext=function(t,e){if(e)if("String"===eE.typeOf(e)){var n=e.replace(/\s+/g,"").split(";");hk(n).call(n,(function(e){if(e){var n=e.split(":");n.length>1&&(t.style[n[0]]=n[1])}}))}else{var r;hk(r=qh(e)).call(r,(function(n){t.style[n]=e[n]}))}},eE.filterStyleFromText=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=t.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return hk(i).call(i,(function(t){if(t){var e=t.split(":");e.length>1&&(!function(t,e){for(var n=0,r=e.length;n<r;n++)if(rw(t).call(t,e[n])>-1)return!0;return!1}(e[0],n)?a[e[0]]=e[1]:o[e[0]]=e[1])}})),t.setAttribute("style",""),hk(e=qh(a)).call(e,(function(e){t.style[e]=a[e]})),o},eE.getStyleFromCsstext=function(t){var e=t.style.cssText;if(!e)return{};var n=e.replace(/\s+/g,"").split(";"),r={};return hk(n).call(n,(function(t){if(t){var e=t.split(":");e.length>1&&(r[e[0]]=e[1])}})),r},eE.preloadImg=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){var r=new window.Image;r.onload=function(t){r=null,e&&e(t)},r.onerror=function(t){r=null,n&&n(t)},r.src=t}},eE.stopPropagation=function(t){t&&t.stopPropagation()},eE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},eE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},eE.checkTouchSupport=function(){return"ontouchstart"in window},eE.getBuffered2=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<t.length;r++)n.push({start:t.start(r)<.5?0:t.start(r),end:t.end(r)});WA(n).call(n,(function(t,e){var n=t.start-e.start;return n||e.end-t.end}));var i=[];if(e)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<e?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new tE(i)},eE.getEventPos=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.touches&&t.touches.length>0&&(t=t.touches[0]),{x:t.x/e,y:t.y/e,clientX:t.clientX/e,clientY:t.clientY/e,offsetX:t.offsetX/e,offsetY:t.offsetY/e,pageX:t.pageX/e,pageY:t.pageY/e}},eE.requestAnimationFrame=function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(e)return e(t)},eE.getHostFromUrl=function(t){if("String"!==eE.typeOf(t))return"";var e=t.split("/"),n="";return e.length>3&&e[2]&&(n=e[2]),n},eE.cancelAnimationFrame=function(t){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;e&&e(t)},eE.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},eE.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},eE.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=(new Date).getTime();try{t=ak(t)}catch(n){t=0}return e+=t,window.performance&&"function"==typeof window.performance.now&&(e+=ak(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},eE.createEvent=function(t){var e;return"function"==typeof window.Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},eE.adjustTimeByDuration=function(t,e,n){return e&&t&&(t>e||n&&t<e)?e:t},eE.createPositionBar=function(t,e){var n=eE.createDom("xg-bar","",{"data-index":-1},t);return e.appendChild(n),n},eE.getTransformStyle=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(e.scale||1),translate:lh(t="".concat(e.x||0,"%, ")).call(t,e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")},i=qh(r);return cp(i).call(i,(function(t){var e,i=new RegExp("".concat(t,"\\([^\\(]+\\)"),"g"),o=lh(e="".concat(t,"(")).call(e,r[t],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},eE.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},eE.getIndexByTime=function(t,e){var n=e.length,r=-1;if(n<1)return r;if(t<=e[0].end||n<2)r=0;else if(t>e[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(t>e[i-1].end&&t<=e[i].end){r=i;break}return r},eE.getOffsetCurrentTime=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<e.length?n:eE.getIndexByTime(t,e))<0)return-1;var i=e.length,o=e[r],a=o.start,s=o.end,u=o.cTime,l=o.offset;return t<a?u:t>=a&&t<=s?t-l:t>s&&r>=i-1?s:-1},eE.getCurrentTimeByOffset=function(t,e){var n=-1;if(!e||e.length<0)return t;for(var r=0;r<e.length;r++)if(t<=e[r].duration){n=r;break}if(-1!==n){var i=e[n].start;return n-1<0?i+t:i+(t-e[n-1].duration)}return t};var nE=/(Android)\s([\d.]+)/,rE=/(Version)\/([\d.]+)/,iE=["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","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],oE={get device(){return oE.os.isPc?"pc":"mobile"},get browser(){var t,e;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return lh(t=[]).call(t,Jh(e=qh(r)).call(e,(function(t){return r[t].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var t=navigator.userAgent,e=/(?:Windows Phone)/.test(t),n=/(?:SymbianOS)/.test(t)||e,r=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),o=/(?:iPad|PlayBook)/.test(t)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),s=/(?:iPhone)/.test(t)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:e,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var t=navigator.userAgent,e="",n=(e=/(?:iPhone)|(?:iPad|PlayBook)/.test(t)?rE:nE)?e.exec(t):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?ak(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var t={isSupport:!1,mime:""};if("undefined"==typeof document)return t;if(this.supportResult)return this.supportResult;var e=document.createElement("video");return"function"==typeof e.canPlayType&&hk(iE).call(iE,(function(n){"probably"===e.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(t.isSupport=!0,t.mime+="||".concat(n))})),this.supportResult=t,e=null,t},isMSESupport:function(){var t=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(t)}catch(aR){return this._logger.error(t,aR),!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(t){var e={supported:!1,smooth:!1,powerEfficient:!1};if(!t||"undefined"==typeof navigator)return Cm.resolve(e);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(t);var n=t.video||{},r=t.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Cm.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Cm.resolve(e)}}},aE="play",sE="ended",uE="pause",lE="seeked",cE="timeupdate",fE="durationchange",hE="volumechange",pE="emptied",dE="autoplay_started",vE="video_resize";function gE(t,e,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=e.call.apply(e,lh(r=[t]).call(r,o));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,lh(e=[t]).call(e,i))})):n.call.apply(n,lh(s=[t]).call(s,o)))}function yE(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[t]&&(this.__hooks[t]=null),ib(n=function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,lh(a=[this]).call(a,nb(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=lh(u=lh(l="[pluginName: ".concat(this.pluginName,":")).call(l,t,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[t])try{var c,f=function(t,e,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(t.__hooks&&lb(t.__hooks[e])){var a,s=t.__hooks[e],u=-1,l=function t(e,n,r){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return r.call.apply(r,lh(o=[e,e]).call(o,l));var f,h=s[u],p=h.call.apply(h,lh(i=[e,e]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:t.apply(void 0,lh(o=[e,n,r]).call(o,l))})).catch((function(t){console.warn("[runHooks]".concat(n," reject"),t.message)})):!1!==p?t.apply(void 0,lh(f=[e,n,r]).call(f,l)):void 0};return l.apply(void 0,lh(a=[t,e,n]).call(a,i))}var c;return n.call.apply(n,lh(c=[t,t]).call(c,i))}(this,t,e);if(f)if(f.then)f.then((function(t){var n;!1!==t&&gE.apply(void 0,lh(n=[o,e,r.next]).call(n,Hk(i)))})).catch((function(t){throw t}));else gE.apply(void 0,lh(c=[this,e,r.next]).call(c,nb(Array.prototype).call(arguments)));else if(void 0===f){var h;gE.apply(void 0,lh(h=[this,e,r.next]).call(h,nb(Array.prototype).call(arguments)))}}catch(v){var p,d;throw v.message=lh(p=lh(d="[pluginName: ".concat(this.pluginName,":")).call(d,t,"] >> ")).call(p,v.message),v}else gE.apply(void 0,lh(n=[this,e,r.next]).call(n,nb(Array.prototype).call(arguments)))}).call(n,this)}function mE(t,e){var n=this.__hooks;if(!n||!lb(n[t]))return-1;for(var r=n[t],i=0;i<r.length;i++)if(r[i]===e)return i;return-1}function bE(t,e){var n=this.__hooks;if(n)return n.hasOwnProperty(t)?(lb(n[t])||(n[t]=[]),-1===mE.call(this,t,e)&&n[t].push(e),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function wE(t,e){var n=this.__hooks;if(n){if(lb(n[t])){var r=n[t],i=mE.call(this,t,e);-1!==i&&jw(r).call(r,i,1)}delete n[t]}}function kE(t,e){var n;ZA.logError(lh(n="[".concat(t,"] event or callback cant be undefined or null when call ")).call(n,e))}var _E=function(){function t(e){Ok(this,t),eE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(e),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&hk(e).call(e,(function(e){t.__hooks[e]=null})),Mp(t,"hooks",{get:function(){var e;return t.__hooks&&hk(e=qh(t.__hooks)).call(e,(function(e){if(t.__hooks[e])return e}))}})}(this),this.__args=e,this.__events={},this.__onceEvents={},this.config=e.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(e)}return Pk(t,[{key:"beforeCreate",value:function(t){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){this.player=t.player,this.playerConfig=t.player&&t.player.config,this.pluginName=t.pluginName?t.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=t.player&&t.player.logger}},{key:"updateLang",value:function(t){t||(t=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 t=eE.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(t=this.playerConfig.domEventType),t}},{key:"on",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__events[t]=e,this.player.on(t,e)):lb(t)&&cp(t).call(t,(function(t){n.__events[t]=e,n.player.on(t,e)})):kE(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__onceEvents[t]=e,this.player.once(t,e)):lb(t)&&cp(t).call(t,(function(r){n.__onceEvents[r]=e,n.player.once(t,e)})):kE(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(delete this.__events[t],this.player.off(t,e)):lb(t)&&cp(t).call(t,(function(r){delete n.__events[t],n.player.off(r,e)})):kE(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var t,e=this;cp(t=["__events","__onceEvents"]).call(t,(function(t){var n;cp(n=qh(e[t])).call(n,(function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(t){var e,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,lh(e=[t]).call(e,i))}}},{key:"emitUserAction",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=Mk(Mk({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(t,e,r)}}},{key:"hook",value:function(t,e){var n;return yE.call.apply(yE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return bE.call.apply(bE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return wE.call.apply(wE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(e.pluginName=n),this.player.registerPlugin({plugin:t,options:e})}},{key:"getPlugin",value:function(t){return this.player?this.player.getPlugin(t):null}},{key:"__destroy",value:function(){var t,e=this,n=this.player,r=this.pluginName;this.offAll(),eE.clearAllTimers(this),eE.checkIsFunction(this.destroy)&&this.destroy(),hk(t=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(t,(function(t){e[t]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&Mp(t,n,e[n])}},{key:"defineMethod",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&"function"==typeof e[n]&&Mp(t,n,{configurable:!0,value:e[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}();if("undefined"!=typeof Element&&!Element.prototype.matches){var AE=Element.prototype;AE.matches=AE.matchesSelector||AE.mozMatchesSelector||AE.msMatchesSelector||AE.oMatchesSelector||AE.webkitMatchesSelector}var EE=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}};function TE(t,e,n,r,i){var o=CE.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function CE(t,e,n,r){return function(n){n.delegateTarget=EE(n.target,e),n.delegateTarget&&r.call(t,n)}}var SE=function(t,e,n,r,i){return"function"==typeof t.addEventListener?TE.apply(null,arguments):"function"==typeof n?ib(TE).call(TE,null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),hk(Array.prototype).call(t,(function(t){return TE(t,e,n,r,i)})))},xE=n(SE),ME={CONTROLS:"controls",ROOT:"root"},LE={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"},OE="xg-icon-disable";function IE(t){return!!t&&(rw(t)&&/^(?:http|data:|\/)/.test(t))}function PE(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(t instanceof window.Element)return eE.addClass(t,i),hk(r=qh(o)).call(r,(function(e){t.setAttribute(e,o[e])})),t;if(IE(t)||IE(t.url))return o.src=IE(t)?t:t.url||"",s=eE.createDom(t.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof t)try{var u,l;return(s=t())instanceof window.Element?(eE.addClass(s,i),hk(u=qh(o)).call(u,(function(t){s.setAttribute(t,o[t])})),s):(ZA.logWarn(lh(l="warn>>icons.".concat(e," in config of plugin named [")).call(l,a,"] is a function mast return an Element Object")),null)}catch(c){return ZA.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof t?eE.createDomFromHtml(t,o,i):(ZA.logWarn(lh(n="warn>>icons.".concat(e," in config of plugin named [")).call(n,a,"] is invalid")),null)}function RE(t,e){var n,r=e.config.icons||e.playerConfig.icons;hk(n=qh(t)).call(n,(function(n){var i=t[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(t,e){var n;return"object"===Lk(t)&&t.class&&"string"==typeof t.class?lh(n="".concat(e," ")).call(n,t.class):e}(r[n],o),a=function(t,e){var n;return"object"===Lk(t)&&t.attr&&"object"===Lk(t.attr)&&hk(n=qh(t.attr)).call(n,(function(n){e[n]=t.attr[n]})),e}(r[n],a),s=PE(r[n],n,o,a,e.pluginName)),!s&&i&&(s=PE(i.icon?i.icon:i,a,o,{},e.pluginName)),e.icons[n]=s}))}var BE=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ok(this,n),(t=e.call(this,r)).__delegates=[],t}return Pk(n,[{key:"__init",value:function(t){if(Nk(Uk(n.prototype),"__init",this).call(this,t),t.root){var e=t.root,r=null;this.icons={},this.root=null,this.parent=null,RE(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,hk(a=qh(i=s)).call(a,(function(t){Mp(o.langText,t,{get:function(){var e=o.lang,n=o.i18n;return n[t]?n[t]:i[t]&&i[t][e]||""}})}));var u="";try{u=this.render()}catch(h){var l;throw ZA.logError("Plugin:".concat(this.pluginName,":render"),h),new Error(lh(l="Plugin:".concat(this.pluginName,":render:")).call(l,h.message))}if(u)(r=n.insert(u,e,t.index)).setAttribute("data-index",t.index);else{if(!t.tag)return;(r=eE.createDom(t.tag,"",t.attr,t.name)).setAttribute("data-index",t.index),e.appendChild(r)}this.root=r,this.parent=e;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var t=this;if(this.root){this._children=[];var e,n=this.children();if(n&&"object"===Lk(n))if(qh(n).length>0)hk(e=qh(n)).call(e,(function(e){var r,i,o=e,a=n[o],s={root:t.root};"function"==typeof a?(r=t.config[o]||{},i=a):"object"===Lk(a)&&"function"==typeof a.plugin&&(r=a.options?eE.deepCopy(t.config[o]||{},a.options):t.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),t.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(t){t||(t=this.lang);var e=this.root,n=this.i18n,r=this.langText;e&&function t(e,n){for(var r=0;r<e.children.length;r++)e.children[r].children.length>0?t(e.children[r],n):n(e.children[r])}(e,(function(e){var i=e.getAttribute&&e.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(e.innerHTML="function"==typeof o?o(t):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;t.setAttribute&&t.setAttribute("lang-key",e);var i=n[e]||r[e]||"";i&&(t.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,eE.addClass(hw(this).call(this,".xgplayer-icon"),OE)}},{key:"enable",value:function(){this.config.disable=!1,eE.removeClass(hw(this).call(this,".xgplayer-icon"),OE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.root=e.root||this.root;var i=Nk(Uk(n.prototype),"registerPlugin",this).call(this,t,e,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(t){if(this.root)return this.root.querySelector(t)}},{key:"bind",value:function(t,e,r){var i=this;if(arguments.length<3&&"function"==typeof e)lb(t)?cp(t).call(t,(function(t){i.bindEL(t,e)})):this.bindEL(t,e);else{var o,a=n.delegate.call(this,this.root,t,e,r);this.__delegates=lh(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(t,e){var n=this;if(arguments.length<3&&"function"==typeof e)lb(t)?cp(t).call(t,(function(t){n.unbindEL(t,e)})):this.unbindEL(t,e);else for(var r,i=lh(r="".concat(t,"_")).call(r,e),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),jw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(t,e){var n,r=this;if(this.root)return"String"===eE.typeOf(t)?this.root.style[t]=e:void("Object"===eE.typeOf(t)&&hk(n=qh(t)).call(n,(function(e){r.root.style[e]=t[e]})))}},{key:"setAttr",value:function(t,e){var n,r=this;if(this.root)return"String"===eE.typeOf(t)?this.root.setAttribute(t,e):void("Object"===eE.typeOf(t)&&hk(n=qh(t)).call(n,(function(e){r.root.setAttribute(e,t[e])})))}},{key:"setHtml",value:function(t,e){this.root&&(this.root.innerHTML=t,"function"==typeof e&&e())}},{key:"bindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.addEventListener(t,e,n)}},{key:"unbindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.removeEventListener(t,e,n)}},{key:"show",value:function(t){if(this.root)return this.root.style.display=void 0!==t?t:"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(t,e){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(e&&e instanceof window.Element))return null;try{return"string"==typeof t?hw(this).call(this,t).appendChild(e):t.appendChild(e)}catch(n){return ZA.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var t,e,r,i=this,o=this.player;(hk(t=this.__delegates).call(t,(function(t){t.destroy()})),this.__delegates=[],this._children instanceof Array)&&(hk(r=this._children).call(r,(function(t){o.unRegisterPlugin(t.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),Nk(Uk(n.prototype),"__destroy",this).call(this),this.icons={},hk(e=["root","parent"]).call(e,(function(t){i[t]=null}))}}],[{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.children.length,i=Number(n),o=t instanceof window.Node;if(r){for(var a=0,s=null,u="";a<r;a++){s=e.children[a];var l=Number(s.getAttribute("data-index"));if(l>=i){u="beforebegin";break}l<i&&(u="afterend")}return o?"afterend"===u?e.appendChild(t):e.insertBefore(t,s):s.insertAdjacentHTML(u,t),"afterend"===u?e.children[e.children.length-1]:e.children[a]}return o?e.appendChild(t):e.insertAdjacentHTML("beforeend",t),e.children[e.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(t instanceof window.Node&&"function"==typeof r)if(lb(n))cp(n).call(n,(function(n){var a,s=xE(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}));else{var a,s=xE(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return ME}},{key:"POSITIONS",get:function(){return LE}}]),n}(_E),UE="xgplayer-is-enter",DE="xgplayer-pause",jE="xgplayer-playing",FE="xgplayer-ended",NE="xgplayer-isloading",HE="xgplayer-is-error",zE="xgplayer-replay",VE="xgplayer-nostart",qE="not-allow-autoplay",GE=6;function YE(){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 WE(){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}function KE(t,e,n){try{var r,i;return lh(r=lh(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,t.i18nKeys[e],'">\n ')).call(r,t.i18n[e],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var XE=Ln,$E=ua.findIndex,JE="findIndex",QE=!0;JE in[]&&Array(1)[JE]((function(){QE=!1})),XE({target:"Array",proto:!0,forced:QE},{findIndex:function(t){return $E(this,t,arguments.length>1?arguments[1]:void 0)}});var ZE=af("Array").findIndex,tT=ut,eT=ZE,nT=Array.prototype,rT=n((function(t){var e=t.findIndex;return t===nT||tT(nT,t)&&e===nT.findIndex?eT:e})),iT=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],oT=function(){function t(e){Ok(this,t),this.fragments=e.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=e.actionCallback,this.fragConfig={fragFocusClass:e.fragFocusClass||"inner-focus-point",fragAutoFocus:!!e.fragAutoFocus,fragClass:e.fragClass||""},this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return Pk(t,[{key:"updateDuration",value:function(t){var e=this;this.duration=t;var n=0,r=this.fragments;this.fragments=hk(r).call(r,(function(t){return t.start=ak(n,10),t.end=ak(n+t.percent*e.duration,10),t.duration=ak(t.percent*e.duration,10),n+=t.percent*e.duration,t}))}},{key:"updateProgress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=e.newIndex,o=e.curIndex,a=e.millisecond;i!==o&&hk(n).call(n,(function(e,n){n<i?e[t].style.width="100%":n>i&&(e[t].style.width=0)}));var s=r[i],u=0===a?0:(a-s.start)/s.duration;n[i][t].style.width=u<0?0:"".concat(100*u,"%")}}},{key:"updateFocus",value:function(t){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(t){var e=rT(this).call(this,1e3*t.currentTime,this.focusIndex);if(e>=0&&e!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(e);var n={index:e,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=e,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},e=arguments.length>1?arguments[1]:void 0;if(!this.duration||ak(1e3*e,10)!==this.duration){if(!e&&0!==e)return;this.updateDuration(ak(1e3*e,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==eE.typeOf(t.played)){var i=rT(this).call(this,1e3*t.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:ak(1e3*t.played,10)}),this.playedIndex=i}if("Undefined"!==eE.typeOf(t.cached)){var o=rT(this).call(this,1e3*t.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:ak(1e3*t.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(t,e){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(e>-1&&e<n.length&&t>n[e].start&&t<n[e].end)return e;if(t>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(t>n[r].start&&t<=n[r].end){e=r;break}return e}},{key:"findHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)if(eE.hasClass(t[e],this.fragConfig.fragFocusClass))return{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"findFragment",value:function(t){var e=this.root.children;return t<0||t>=e.length?null:{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)eE.removeClass(t[e],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(t){var e=this.root.children;if(t<e.length)return eE.addClass(e[t],this.fragConfig.fragFocusClass),{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(t){var e,n=this;if(cp(e=qh(this.fragConfig)).call(e,(function(e){void 0!==t[e]&&(n.fragConfig[e]=t[e])})),t.fragments){if(this.fragments=0===t.fragments.length?[{percent:1}]:t.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var r=this.root.children;r.length>0;)this.root.removeChild(r[0]);this.render()}}},{key:"render",value:function(){var t=this,e=this.style.progressColor;if(this.root||(this.root=eE.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=hk(n=this.fragments).call(n,(function(n){var r,a,s=eE.createDom("xg-inner","",{style:e?lh(r="background:".concat(e,"; flex: ")).call(r,n.percent):"flex: ".concat(n.percent)},lh(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,i));return t.root.appendChild(s),cp(iT).call(iT,(function(e){s.appendChild(eE.createDom(e.tag,"",{style:e.styleKey?"background: ".concat(t.style[e.styleKey],"; width:0;"):"width:0;"},e.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),t}(),aT={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},sT=function(t){Bk(n,t);var e=Fk(n);function n(t){var r;return Ok(this,n),Rk(jk(r=e.call(this,t)),"onMoveOnly",(function(t,e){var n=jk(r),i=n.pos,o=n.config,a=n.player,s=e;if(t){eE.event(t);var u=eE.getEventPos(t,a.zoom),l=90===a.rotateDeg?u.clientY:u.clientX;if(i.moving&&Math.abs(i.x-l)<o.miniMoveStep)return;i.moving=!0,i.x=l,s=r.computeTime(t,l)}r.triggerCallbacks("dragmove",s,t),r._updateInnerFocus(s)})),Rk(jk(r),"onBodyClick",(function(t){r.pos.isLocked&&(r.pos.isLocked=!1,t.preventDefault(),t.stopPropagation())})),Rk(jk(r),"_mouseDownHandler",(function(t,e){r._state.time=e.currentTime,r.updateWidth(e.currentTime,e.seekTime,e.percent,0),r._updateInnerFocus(e)})),Rk(jk(r),"_mouseUpHandler",(function(t,e){jk(r).pos.moving&&r.updateWidth(e.currentTime,e.seekTime,e.percent,2)})),Rk(jk(r),"_mouseMoveHandler",(function(t,e){var n=jk(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<e.currentTime?e.forward=!0:e.forward=!1,i.time=e.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",e,t),r.emitUserAction("drag","dragstart",e)),r.updateWidth(e.currentTime,e.seekTime,e.percent,1),r.triggerCallbacks("dragmove",e,t),r._updateInnerFocus(e)})),Rk(jk(r),"onMouseDown",(function(t){var e=jk(r),n=e._state,i=e.player,o=e.pos,a=e.config,s=e.playerConfig,u=eE.getEventPos(t,i.zoom),l=90===i.rotateDeg?u.clientY:u.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){t.stopPropagation(),r.focus(),eE.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),eE.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),eE.event(t),o.x=l,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,eE.addClass(r.progressBtn,"active");var c=r.computeTime(t,l);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(t,c),"touchstart"===t.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}})),Rk(jk(r),"onMouseUp",(function(t){var e=jk(r),n=e.player,i=e.config,o=e.pos,a=e.playerConfig,s=e._state;t.stopPropagation(),t.preventDefault(),eE.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),eE.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),eE.event(t),eE.removeClass(r.progressBtn,"active");var u=r.computeTime(t,o.x);u.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",u,t),r.emitUserAction("drag","dragend",u)):(r.triggerCallbacks("click",u,t),r.emitUserAction("click","click",u)),r._mouseUpHandlerHook(t,u),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var l=t.type;"touchend"===l||"touchcancel"===l?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&ib(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(t)),eE.setTimeout(jk(r),(function(){r.resetSeekState()}),1),n.focus()})),Rk(jk(r),"onMouseMove",(function(t){var e=jk(r),n=e._state,i=e.pos,o=e.player,a=e.config;eE.checkTouchSupport()&&t.preventDefault(),eE.event(t);var s=eE.getEventPos(t,o.zoom),u=90===o.rotateDeg?s.clientY:s.clientX,l=Math.abs(i.x-u);if(!(i.moving&&l<a.miniMoveStep||!i.moving&&l<a.miniStartStep)){i.x=u;var c=r.computeTime(t,u);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(t,c)}})),Rk(jk(r),"onMouseOut",(function(t){r.triggerCallbacks("mouseout",null,t)})),Rk(jk(r),"onMouseOver",(function(t){r.triggerCallbacks("mouseover",null,t)})),Rk(jk(r),"onMouseEnter",(function(t){var e=jk(r),n=e.player,i=e.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,ib(r).call(r,"mousemove",r.onMoveOnly),ib(r).call(r,"mouseleave",r.onMouseLeave),eE.event(t);var o=eE.getEventPos(t,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(t,a);r.triggerCallbacks("mouseenter",s,t),r.focus()}})),Rk(jk(r),"onMouseLeave",(function(t){r.triggerCallbacks("mouseleave",null,t),r.unlock(),r._updateInnerFocus(null)})),Rk(jk(r),"onVideoResize",(function(){var t=r.pos,e=t.x,n=t.isDown;if(t.isEnter&&!n){var i=r.computeTime(null,e);r.onMoveOnly(null,i)}})),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return Pk(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n+this.timeOffset}},{key:"changeState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=t}},{key:"show",value:function(t){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&0!==e.length||(e=[{percent:1}]);var r,i=Mk(Mk({fragments:e},n),{},{actionCallback:function(e){t.emitUserAction("fragment_focus","fragment_focus",e)}});this.innerList?this.innerList.reset(i):(this.innerList=new oT(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),hk(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(e){var n;t[e]=ib(n=t.innerList[e]).call(n,t.innerList)})))}},{key:"_updateInnerFocus",value:function(t){this.innerList&&this.innerList.updateFocus(t)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=hw(this).call(this,"xg-outer");var t=this.config,e=t.fragFocusClass,n=t.fragAutoFocus,r=t.fragClass;this._initInner(this.config.fragments,{fragFocusClass:e,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===oE.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=hw(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var t=this;this.on(fE,(function(){t.onMouseLeave()})),this.on(cE,(function(){t.onTimeupdate()})),this.on(lE,(function(){t.onTimeupdate(),t.onCacheUpdate()})),this.on("progress",(function(){t.onCacheUpdate()})),this.on(sE,(function(){t.onCacheUpdate(!0),t.onTimeupdate(!0),t._state.now=0})),this.on(pE,(function(){t.onReset()})),this.on(vE,(function(){t.onVideoResize()}))}},{key:"setConfig",value:function(t){var e,n=this,r=null;cp(e=qh(t)).call(e,(function(e){n.config[e]=t[e],"fragments"===e&&(r=t[e])})),r&&this._initInner(r,t)}},{key:"initCustomStyle",value:function(){var t=(this.playerConfig||{}).commonStyle.sliderBtnStyle,e=this.progressBtn;if(t)if("string"==typeof t)e.style.boxShadow=t;else if("object"===Lk(t)){var n;hk(n=qh(t)).call(n,(function(n){e.style[n]=t[n]}))}}},{key:"triggerCallbacks",value:function(t,e,n){var r;this.__dragCallBacks.length>0&&hk(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===t)try{r.handler(e,n)}catch(aR){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),aR)}}))}},{key:"addCallBack",value:function(t,e){e&&"function"==typeof e&&this.__dragCallBacks.push({type:t,handler:e})}},{key:"removeCallBack",value:function(t,e){var n=this.__dragCallBacks,r=-1;hk(n).call(n,(function(n,i){n&&n.type===t&&n.handler===e&&(r=i)})),r>-1&&jw(n).call(n,r,1)}},{key:"unlock",value:function(){var t=this.player,e=this.pos;e.isEnter=!1,e.isLocked=!1,t.isMini||(this.unbind("mousemove",this.onMoveOnly),e.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var t=this.player.config;(this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"===this.domEventType||"compatible"===this.domEventType)&&(ib(this).call(this,"mousedown",this.onMouseDown),"mobile"!==t.isMobileSimulateMode&&ib(this).call(this,"mouseenter",this.onMouseEnter),ib(this).call(this,"mouseover",this.onMouseOver),ib(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),eE.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),eE.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(t,e,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=e=e>=o.duration?o.duration-i.endedDiff:Number(e).toFixed(1);this.updatePercent(n),this.updateTime(t),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(t,e){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,u=o.top,l=o.left,c=e;90===i.rotateDeg?(n=s,r=u):(n=a,r=l);var f=c-r,h=(f=f>n?n:f<0?0:f)/n,p=ak((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:p,seekTime:eE.getCurrentTimeByOffset(p,i.timeSegments),offset:f,width:n,left:r,e:t}}},{key:"updateTime",value:function(t){var e=this.player,n=this.duration;t>n?t=n:t<0&&(t=0);var r=e.plugins.time;r&&r.updateTime(t)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var t=this.player.plugins.time;t&&t.resetActive()}},{key:"updatePercent",value:function(t,e){if(this.isProgressMoving=!0,!this.config.disable){t=t>1?1:t<0?0:t,this.progressBtn.style.left="".concat(100*t,"%"),this.innerList.update({played:t*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:t*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(t){var e=this.player,n=this._state,r=this.offsetDuration;if(!(e.isSeeking&&e.media.seeking||this.isProgressMoving)&&e.hasStart){if(n.now>-1){var i=ak(1e3*n.now,10)-ak(1e3*e.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=eE.adjustTimeByDuration(o,r,t),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(t){var e=this.player,n=this.duration;if(e){var r=e.bufferedPoint.end;r=eE.adjustTimeByDuration(r,n,t),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var t=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var e=this.domEventType;"touch"!==e&&"compatible"!==e||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==e&&"compatible"!==e||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),t.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var t=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===t?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:aT.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return aT}}]),n}(BE),uT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onMouseenter",(function(t){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),Rk(jk(r),"_onMouseLeave",(function(t){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return Pk(n,[{key:"afterCreate",value:function(){ib(this).call(this,"mouseenter",this._onMouseenter),ib(this).call(this,"mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(BE),lT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=jk(r).player;return r.emitUserAction(t,"switch_play_pause",{prop:"paused",from:e.paused,to:!e.paused}),e.ended?e.replay():e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Pk(n,[{key:"afterCreate",value:function(){Nk(Uk(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),ib(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var t=this,e=this.player;this.on([aE,uE,"error",pE],(function(){t.animate(e.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:YE,class:"xg-icon-play"},pause:{icon:WE,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.play),this.appendChild(".xgplayer-icon",t.pause)}},{key:"animate",value:function(t){if(this.player){var e=this.i18nKeys,n=hw(this).call(this,".xg-tips");t?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,e.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,e.PAUSE_TIPS))}}},{key:"destroy",value:function(){Nk(Uk(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(KE(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(uT);function cT(){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 fT=function(t){Bk(n,t);var e=Fk(n);function n(){return Ok(this,n),e.apply(this,arguments)}return Pk(n,[{key:"afterCreate",value:function(){var t=this;this.initIcons(),this.onClick=function(e){e.preventDefault(),e.stopPropagation(),t.config.onClick(e)},ib(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:cT,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(this.root,t.screenBack)}},{key:"show",value:function(){eE.addClass(this.root,"show")}},{key:"hide",value:function(){eE.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:LE.ROOT_TOP,index:0}}}]),n}(BE);function hT(){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 pT(){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 dT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onOrientationChange",(function(t){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return Pk(n,[{key:"afterCreate",value:function(){var t=this;Nk(Uk(n.prototype),"afterCreate",this).call(this);var e=this.config,r=this.playerConfig;if(!e.disable){e.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=eE.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(t){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(e){var n=t.player.fullscreen;t.emitUserAction(e,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),ib(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(e){var n=hw(t).call(t,".xg-tips");n&&t.changeLangTextKey(n,e?t.i18nKeys.EXITFULLSCREEN_TIPS:t.i18nKeys.FULLSCREEN_TIPS),t.animate(e)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:fT,options:{config:{onClick:function(e){t.handleFullscreen(e)}}}})),"mobile"===oE.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:hT,class:"xg-get-fullscreen"},exitFullscreen:{icon:pT,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){Nk(Uk(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===oE.device?"touchend":"click",this.handleFullscreen),"mobile"===oE.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.fullscreen),this.appendChild(".xgplayer-icon",t.exitFullscreen)}},{key:"toggleFullScreen",value:function(t){t instanceof Event&&(t.preventDefault(),t.stopPropagation());var e=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(e.fullscreen?e.exitCssFullscreen():e.getCssFullscreen(),this.animate(e.fullscreen)):n.rotateFullscreen?(e.fullscreen?e.exitRotateFullscreen():e.getRotateFullscreen(),this.animate(e.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(e.fullscreen):e.fullscreen?(e.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(e.getFullscreen().catch((function(t){})),n.useScreenOrientation&&e.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(t){t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(t?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(KE(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(t){try{screen.orientation.lock(t).catch((function(t){}))}catch(e){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(t){}))}catch(t){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(uT),vT=function(t){Bk(n,t);var e=Fk(n);function n(t){var r;return Ok(this,n),(r=e.call(this,t)).isActiving=!1,r}return Pk(n,[{key:"duration",get:function(){var t=this.player,e=t.offsetDuration,n=t.duration;return this.playerConfig.customDuration||e||n}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var t=this.player.controls.config.mode;this.mode="flex"===t?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=hw(this).call(this,".time-duration"),this.timeDom=hw(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var t=this;this.on([fE,lE,cE],(function(e){"durationchange"===e.eventName&&(t.isActiving=!1),t.onTimeUpdate()})),this.on(sE,(function(){t.onTimeUpdate(!0)})),this.on(pE,(function(){t.onReset()}))}},{key:"show",value:function(t){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(t){var e=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&e.hasStart){var i=this.currentTime+this.timeOffset;i=eE.adjustTimeByDuration(i,r,t),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(eE.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=eE.format(r))):(this.timeDom.innerHTML=this.minWidthTime(eE.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=eE.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(eE.format(0)),this.centerDurDom.innerHTML=eE.format(0)):(this.timeDom.innerHTML=this.minWidthTime(eE.format(0)),this.durationDom.innerHTML=eE.format(0))}},{key:"createCenterTime",value:function(){var t=this.player;if(t.controls&&t.controls.center){var e=t.controls.center;this.centerCurDom=eE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=eE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),e.children.length>0?e.insertBefore(this.centerCurDom,e.children[0]):e.appendChild(this.centerCurDom),e.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var t=this.config;this.duration===1/0||this.playerConfig.isLive?(eE.hide(this.durationDom),eE.hide(this.timeDom),eE.hide(hw(this).call(this,".time-separator")),eE.show(hw(this).call(this,".time-live-tag"))):eE.hide(hw(this).call(this,".time-live-tag"));t.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(t){t?(eE.hide(this.durationDom),eE.hide(this.timeDom),eE.hide(hw(this).call(this,".time-separator")),eE.show(hw(this).call(this,".time-live-tag"))):(eE.hide(hw(this).call(this,".time-live-tag")),eE.show(hw(this).call(this,".time-separator")),eE.show(this.durationDom),eE.show(this.timeDom))}},{key:"updateTime",value:function(t){this.isActiving=!0,!t&&0!==t||t>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(eE.format(t)):this.centerCurDom.innerHTML=this.minWidthTime(eE.format(t)))}},{key:"minWidthTime",value:function(t){var e;return hk(e=t.split(":")).call(e,(function(t){return'<span class="time-min-width">'.concat(t,"</span>")})).join(":")}},{key:"resetActive",value:function(){var t=this,e=this.player,n=function(){t.isActiving=!1};this.off(lE,n),e.isSeeking&&e.media.seeking?this.once(lE,n):this.isActiving=!1}},{key:"destroy",value:function(){var t=this.player.controls.center;this.centerCurDom&&t.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&t.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(BE);function gT(){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 yT(){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 mT(){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 bT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"onBarMousedown",(function(t){var e=jk(r).player,n=hw(r).call(r,".xgplayer-bar");eE.event(t);var i=n.getBoundingClientRect(),o=eE.getEventPos(t,e.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,t),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),Rk(jk(r),"onBarMouseMove",(function(t){var e=jk(r)._d;if(e.isStart){var n=jk(r),i=n.pos,o=n.player;t.preventDefault(),t.stopPropagation(),eE.event(t);var a=eE.getEventPos(t,o.zoom);e.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,t)}})),Rk(jk(r),"onBarMouseUp",(function(t){eE.event(t),document.removeEventListener("mouseup",r.onBarMouseUp);var e=jk(r)._d;e.isStart=!1,e.isMoving=!1})),Rk(jk(r),"onMouseenter",(function(t){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),Rk(jk(r),"onMouseleave",(function(t){r._d.isActive=!1,r.unFocus(100,!1,t),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),Rk(jk(r),"onVolumeChange",(function(t){if(r.player){var e=r.player,n=e.muted,i=e.volume;r._d.isMoving||(hw(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return Pk(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:yT,class:"xg-volume-small"},volumeLarge:{icon:gT,class:"xg-volume"},volumeMuted:{icon:mT,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var t=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var e=this.playerConfig,n=e.commonStyle,r=e.volume;if(n.volumeColor)hw(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;if(this.changeMutedHandler=this.hook("mutedChange",(function(e){t.changeMuted(e)}),{pre:function(t){t.preventDefault(),t.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==oE.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)ib(this).call(this,"mouseenter",this._onMouseenterHandler),ib(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),ib(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),ib(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),ib(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);ib(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(hE,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==eE.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(t,e){var n=this.player,r=hw(this).call(this,".xgplayer-drag"),i=hw(this).call(this,".xgplayer-bar");if(i&&r){var o=ak(t/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(t,"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(e,"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 t=this.player,e=t.volume,n=t.muted,r=hw(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(e,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(eE.clearTimeout(this,this._timerId),this._timerId=null),eE.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(eE.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=eE.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),eE.removeClass(t.root,"slide-show"),i.isStart&&t.onBarMouseUp(r)),t._timerId=null}),e))}},{key:"changeMuted",value:function(t){t&&t.stopPropagation();var e=this.player;this._d.isStart&&this.onBarMouseUp(t),this.emitUserAction(t,"change_muted",{muted:e.muted,volume:e.volume,props:{muted:{from:e.muted,to:!e.muted}}}),e.volume>0&&(e.muted=!e.muted),e.volume<.01&&(e.volume=this.config.miniVolume)}},{key:"animate",value:function(t,e){t||0===e?this.setAttr("data-state","mute"):e<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.volumeSmall),this.appendChild(".xgplayer-icon",t.volumeLarge),this.appendChild(".xgplayer-icon",t.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(eE.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"===oE.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var t;if(!this.config.disable){var e=this.config.default||this.player.volume,n=this.config.showValueLabel;return lh(t='\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*e,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(t,100*e,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(BE),wT=a,kT=pe("iterator"),_T=!wT((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),!t.toJSON||!e.size&&true||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[kT]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),AT=y,ET=2147483647,TT=/[^\0-\u007E]/,CT=/[.\u3002\uFF0E\uFF61]/g,ST="Overflow: input needs wider integers to process",xT=RangeError,MT=AT(CT.exec),LT=Math.floor,OT=String.fromCharCode,IT=AT("".charCodeAt),PT=AT([].join),RT=AT([].push),BT=AT("".replace),UT=AT("".split),DT=AT("".toLowerCase),jT=function(t){return t+22+75*(t<26)},FT=function(t,e,n){var r=0;for(t=n?LT(t/700):t>>1,t+=LT(t/e);t>455;)t=LT(t/35),r+=36;return LT(r+36*t/(t+38))},NT=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=IT(t,n++);if(i>=55296&&i<=56319&&n<r){var o=IT(t,n++);56320==(64512&o)?RT(e,((1023&i)<<10)+(1023&o)+65536):(RT(e,i),n--)}else RT(e,i)}return e}(t);var n,r,i=t.length,o=128,a=0,s=72;for(n=0;n<t.length;n++)(r=t[n])<128&&RT(e,OT(r));var u=e.length,l=u;for(u&&RT(e,"-");l<i;){var c=ET;for(n=0;n<t.length;n++)(r=t[n])>=o&&r<c&&(c=r);var f=l+1;if(c-o>LT((ET-a)/f))throw xT(ST);for(a+=(c-o)*f,o=c,n=0;n<t.length;n++){if((r=t[n])<o&&++a>ET)throw xT(ST);if(r==o){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var v=h-d,g=36-d;RT(e,OT(jT(d+v%g))),h=LT(v/g),p+=36}RT(e,OT(jT(h))),s=FT(a,f,l==u),a=0,l++}}a++,o++}return PT(e,"")},HT=fo,zT=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:HT(t,r,e[r],n);return t},VT=Ln,qT=o,GT=P,YT=y,WT=L,KT=_T,XT=fo,$T=po,JT=zT,QT=jo,ZT=$u,tC=ta,eC=ev,nC=x,rC=Zt,iC=Je,oC=lr,aC=rn,sC=et,uC=ei,lC=Wi,cC=N,fC=ad,hC=jh,pC=uv,dC=vA,vC=pe("iterator"),gC="URLSearchParams",yC=gC+"Iterator",mC=tC.set,bC=tC.getterFor(gC),wC=tC.getterFor(yC),kC=Object.getOwnPropertyDescriptor,_C=function(t){if(!WT)return qT[t];var e=kC(qT,t);return e&&e.value},AC=_C("fetch"),EC=_C("Request"),TC=_C("Headers"),CC=EC&&EC.prototype,SC=TC&&TC.prototype,xC=qT.RegExp,MC=qT.TypeError,LC=qT.decodeURIComponent,OC=qT.encodeURIComponent,IC=YT("".charAt),PC=YT([].join),RC=YT([].push),BC=YT("".replace),UC=YT([].shift),DC=YT([].splice),jC=YT("".split),FC=YT("".slice),NC=/\+/g,HC=Array(4),zC=function(t){return HC[t-1]||(HC[t-1]=xC("((?:%[\\da-f]{2}){"+t+"})","gi"))},VC=function(t){try{return LC(t)}catch(aR){return t}},qC=function(t){var e=BC(t,NC," "),n=4;try{return LC(e)}catch(aR){for(;n;)e=BC(e,zC(n--),VC);return e}},GC=/[!'()~]|%20/g,YC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},WC=function(t){return YC[t]},KC=function(t){return BC(OC(t),GC,WC)},XC=ZT((function(t,e){mC(this,{type:yC,iterator:fC(bC(t).entries),kind:e})}),"Iterator",(function(){var t=wC(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),$C=function(t){this.entries=[],this.url=null,void 0!==t&&(sC(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===IC(t,0)?FC(t,1):t:uC(t)))};$C.prototype={type:gC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,s,u=hC(t);if(u)for(n=(e=fC(t,u)).next;!(r=GT(n,e)).done;){if(o=(i=fC(aC(r.value))).next,(a=GT(o,i)).done||(s=GT(o,i)).done||!GT(o,i).done)throw MC("Expected sequence with length 2");RC(this.entries,{key:uC(a.value),value:uC(s.value)})}else for(var l in t)rC(t,l)&&RC(this.entries,{key:l,value:uC(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=jC(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=jC(e,"="),RC(this.entries,{key:qC(UC(n)),value:qC(PC(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],RC(n,KC(t.key)+"="+KC(t.value));return PC(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var JC=function(){eC(this,QC);var t=mC(this,new $C(arguments.length>0?arguments[0]:void 0));WT||(this.length=t.entries.length)},QC=JC.prototype;if(JT(QC,{append:function(t,e){pC(arguments.length,2);var n=bC(this);RC(n.entries,{key:uC(t),value:uC(e)}),WT||this.length++,n.updateURL()},delete:function(t){pC(arguments.length,1);for(var e=bC(this),n=e.entries,r=uC(t),i=0;i<n.length;)n[i].key===r?DC(n,i,1):i++;WT||(this.length=n.length),e.updateURL()},get:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=[],i=0;i<e.length;i++)e[i].key===n&&RC(r,e[i].value);return r},has:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){pC(arguments.length,1);for(var n,r=bC(this),i=r.entries,o=!1,a=uC(t),s=uC(e),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?DC(i,u--,1):(o=!0,n.value=s));o||RC(i,{key:a,value:s}),WT||(this.length=i.length),r.updateURL()},sort:function(){var t=bC(this);dC(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=bC(this).entries,r=iC(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new XC(this,"keys")},values:function(){return new XC(this,"values")},entries:function(){return new XC(this,"entries")}},{enumerable:!0}),XT(QC,vC,QC.entries,{name:"entries"}),XT(QC,"toString",(function(){return bC(this).serialize()}),{enumerable:!0}),WT&&$T(QC,"size",{get:function(){return bC(this).entries.length},configurable:!0,enumerable:!0}),QT(JC,gC),VT({global:!0,constructor:!0,forced:!KT},{URLSearchParams:JC}),!KT&&nC(TC)){var ZC=YT(SC.has),tS=YT(SC.set),eS=function(t){if(sC(t)){var e,n=t.body;if(oC(n)===gC)return e=t.headers?new TC(t.headers):new TC,ZC(e,"content-type")||tS(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),lC(t,{body:cC(0,uC(n)),headers:cC(0,e)})}return t};if(nC(AC)&&VT({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return AC(t,arguments.length>1?eS(arguments[1]):{})}}),nC(EC)){var nS=function(t){return eC(this,CC),new EC(t,arguments.length>1?eS(arguments[1]):{})};CC.constructor=nS,nS.prototype=CC,VT({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:nS})}}var rS,iS=Ln,oS=L,aS=_T,sS=o,uS=Je,lS=y,cS=fo,fS=po,hS=ev,pS=Zt,dS=Tk,vS=Ab,gS=ro,yS=bc.codeAt,mS=function(t){var e,n,r=[],i=UT(BT(DT(t),CT,"."),".");for(e=0;e<i.length;e++)n=i[e],RT(r,MT(TT,n)?"xn--"+NT(n):n);return PT(r,".")},bS=ei,wS=jo,kS=uv,_S={URLSearchParams:JC,getState:bC},AS=ta,ES=AS.set,TS=AS.getterFor("URL"),CS=_S.URLSearchParams,SS=_S.getState,xS=sS.URL,MS=sS.TypeError,LS=sS.parseInt,OS=Math.floor,IS=Math.pow,PS=lS("".charAt),RS=lS(/./.exec),BS=lS([].join),US=lS(1..toString),DS=lS([].pop),jS=lS([].push),FS=lS("".replace),NS=lS([].shift),HS=lS("".split),zS=lS("".slice),VS=lS("".toLowerCase),qS=lS([].unshift),GS="Invalid scheme",YS="Invalid host",WS="Invalid port",KS=/[a-z]/i,XS=/[\d+-.a-z]/i,$S=/\d/,JS=/^0x/i,QS=/^[0-7]+$/,ZS=/^\d+$/,tx=/^[\da-f]+$/i,ex=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nx=/[\0\t\n\r #/:<>?@[\\\]^|]/,rx=/^[\u0000-\u0020]+/,ix=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ox=/[\t\n\r]/g,ax=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)qS(e,t%256),t=OS(t/256);return BS(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=US(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},sx={},ux=dS({},sx,{" ":1,'"':1,"<":1,">":1,"`":1}),lx=dS({},ux,{"#":1,"?":1,"{":1,"}":1}),cx=dS({},lx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),fx=function(t,e){var n=yS(t,0);return n>32&&n<127&&!pS(e,t)?t:encodeURIComponent(t)},hx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},px=function(t,e){var n;return 2==t.length&&RS(KS,PS(t,0))&&(":"==(n=PS(t,1))||!e&&"|"==n)},dx=function(t){var e;return t.length>1&&px(zS(t,0,2))&&(2==t.length||"/"===(e=PS(t,2))||"\\"===e||"?"===e||"#"===e)},vx=function(t){return"."===t||"%2e"===VS(t)},gx={},yx={},mx={},bx={},wx={},kx={},_x={},Ax={},Ex={},Tx={},Cx={},Sx={},xx={},Mx={},Lx={},Ox={},Ix={},Px={},Rx={},Bx={},Ux={},Dx=function(t,e,n){var r,i,o,a=bS(t);if(e){if(i=this.parse(a))throw MS(i);this.searchParams=null}else{if(void 0!==n&&(r=new Dx(n,!0)),i=this.parse(a,null,r))throw MS(i);(o=SS(new CS)).bindURL(this),this.searchParams=o}};Dx.prototype={type:"URL",parse:function(t,e,n){var r,i,o,a,s,u=this,l=e||gx,c=0,f="",h=!1,p=!1,d=!1;for(t=bS(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=FS(t,rx,""),t=FS(t,ix,"$1")),t=FS(t,ox,""),r=vS(t);c<=r.length;){switch(i=r[c],l){case gx:if(!i||!RS(KS,i)){if(e)return GS;l=mx;continue}f+=VS(i),l=yx;break;case yx:if(i&&(RS(XS,i)||"+"==i||"-"==i||"."==i))f+=VS(i);else{if(":"!=i){if(e)return GS;f="",l=mx,c=0;continue}if(e&&(u.isSpecial()!=pS(hx,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&hx[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=Mx:u.isSpecial()&&n&&n.scheme==u.scheme?l=bx:u.isSpecial()?l=Ax:"/"==r[c+1]?(l=wx,c++):(u.cannotBeABaseURL=!0,jS(u.path,""),l=Rx)}break;case mx:if(!n||n.cannotBeABaseURL&&"#"!=i)return GS;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=gS(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Ux;break}l="file"==n.scheme?Mx:kx;continue;case bx:if("/"!=i||"/"!=r[c+1]){l=kx;continue}l=Ex,c++;break;case wx:if("/"==i){l=Tx;break}l=Px;continue;case kx:if(u.scheme=n.scheme,i==rS)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())l=_x;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query="",l=Bx;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.path.length--,l=Px;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}break;case _x:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Px;continue}l=Tx}else l=Ex;break;case Ax:if(l=Ex,"/"!=i||"/"!=PS(f,c+1))continue;c++;break;case Ex:if("/"!=i&&"\\"!=i){l=Tx;continue}break;case Tx:if("@"==i){h&&(f="%40"+f),h=!0,o=vS(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||d){var y=fx(g,cx);d?u.password+=y:u.username+=y}else d=!0}f=""}else if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";c-=vS(f).length+1,f="",l=Cx}else f+=i;break;case Cx:case Sx:if(e&&"file"==u.scheme){l=Ox;continue}if(":"!=i||p){if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return YS;if(e&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=Ix,e)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return YS;if(a=u.parseHost(f))return a;if(f="",l=xx,e==Sx)return}break;case xx:if(!RS($S,i)){if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=f){var m=LS(f,10);if(m>65535)return WS;u.port=u.isSpecial()&&m===hx[u.scheme]?null:m,f=""}if(e)return;l=Ix;continue}return WS}f+=i;break;case Mx:if(u.scheme="file","/"==i||"\\"==i)l=Lx;else{if(!n||"file"!=n.scheme){l=Px;continue}if(i==rS)u.host=n.host,u.path=gS(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=gS(n.path),u.query="",l=Bx;else{if("#"!=i){dx(BS(gS(r,c),""))||(u.host=n.host,u.path=gS(n.path),u.shortenPath()),l=Px;continue}u.host=n.host,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}}break;case Lx:if("/"==i||"\\"==i){l=Ox;break}n&&"file"==n.scheme&&!dx(BS(gS(r,c),""))&&(px(n.path[0],!0)?jS(u.path,n.path[0]):u.host=n.host),l=Px;continue;case Ox:if(i==rS||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&px(f))l=Px;else if(""==f){if(u.host="",e)return;l=Ix}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),e)return;f="",l=Ix}continue}f+=i;break;case Ix:if(u.isSpecial()){if(l=Px,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=rS&&(l=Px,"/"!=i))continue}else u.fragment="",l=Ux;else u.query="",l=Bx;break;case Px:if(i==rS||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=VS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||jS(u.path,"")):vx(f)?"/"==i||"\\"==i&&u.isSpecial()||jS(u.path,""):("file"==u.scheme&&!u.path.length&&px(f)&&(u.host&&(u.host=""),f=PS(f,0)+":"),jS(u.path,f)),f="","file"==u.scheme&&(i==rS||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)NS(u.path);"?"==i?(u.query="",l=Bx):"#"==i&&(u.fragment="",l=Ux)}else f+=fx(i,lx);break;case Rx:"?"==i?(u.query="",l=Bx):"#"==i?(u.fragment="",l=Ux):i!=rS&&(u.path[0]+=fx(i,sx));break;case Bx:e||"#"!=i?i!=rS&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":fx(i,sx)):(u.fragment="",l=Ux);break;case Ux:i!=rS&&(u.fragment+=fx(i,ux))}c++}},parseHost:function(t){var e,n,r;if("["==PS(t,0)){if("]"!=PS(t,t.length-1))return YS;if(e=function(t){var e,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,h=function(){return PS(t,f)};if(":"==h()){if(":"!=PS(t,1))return;f+=2,c=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&RS(tx,h());)e=16*e+LS(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!RS($S,h()))return;for(;RS($S,h());){if(o=LS(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[l++]=e}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(zS(t,1,-1)),!e)return YS;this.host=e}else if(this.isSpecial()){if(t=mS(t),RS(ex,t))return YS;if(e=function(t){var e,n,r,i,o,a,s,u=HS(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(o=10,i.length>1&&"0"==PS(i,0)&&(o=RS(JS,i)?16:8,i=zS(i,8==o?1:2)),""===i)a=0;else{if(!RS(10==o?ZS:8==o?QS:tx,i))return t;a=LS(i,o)}jS(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=IS(256,5-e))return null}else if(a>255)return null;for(s=DS(n),r=0;r<n.length;r++)s+=n[r]*IS(256,3-r);return s}(t),null===e)return YS;this.host=e}else{if(RS(nx,t))return YS;for(e="",n=vS(t),r=0;r<n.length;r++)e+=fx(n[r],sx);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return pS(hx,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&px(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,l=e+":";return null!==i?(l+="//",t.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ax(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?a[0]:a.length?"/"+BS(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(t){var e=this.parse(t);if(e)throw MS(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new jx(t.path[0]).origin}catch(aR){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ax(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(bS(t)+":",gx)},getUsername:function(){return this.username},setUsername:function(t){var e=vS(bS(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=fx(e[n],cx)}},getPassword:function(){return this.password},setPassword:function(t){var e=vS(bS(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=fx(e[n],cx)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ax(t):ax(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Cx)},getHostname:function(){var t=this.host;return null===t?"":ax(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Sx)},getPort:function(){var t=this.port;return null===t?"":bS(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=bS(t))?this.port=null:this.parse(t,xx))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+BS(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Ix))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=bS(t))?this.query=null:("?"==PS(t,0)&&(t=zS(t,1)),this.query="",this.parse(t,Bx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=bS(t))?("#"==PS(t,0)&&(t=zS(t,1)),this.fragment="",this.parse(t,Ux)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var jx=function(t){var e=hS(this,Fx),n=kS(arguments.length,1)>1?arguments[1]:void 0,r=ES(e,new Dx(t,!1,n));oS||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Fx=jx.prototype,Nx=function(t,e){return{get:function(){return TS(this)[t]()},set:e&&function(t){return TS(this)[e](t)},configurable:!0,enumerable:!0}};if(oS&&(fS(Fx,"href",Nx("serialize","setHref")),fS(Fx,"origin",Nx("getOrigin")),fS(Fx,"protocol",Nx("getProtocol","setProtocol")),fS(Fx,"username",Nx("getUsername","setUsername")),fS(Fx,"password",Nx("getPassword","setPassword")),fS(Fx,"host",Nx("getHost","setHost")),fS(Fx,"hostname",Nx("getHostname","setHostname")),fS(Fx,"port",Nx("getPort","setPort")),fS(Fx,"pathname",Nx("getPathname","setPathname")),fS(Fx,"search",Nx("getSearch","setSearch")),fS(Fx,"searchParams",Nx("getSearchParams")),fS(Fx,"hash",Nx("getHash","setHash"))),cS(Fx,"toJSON",(function(){return TS(this).serialize()}),{enumerable:!0}),cS(Fx,"toString",(function(){return TS(this).serialize()}),{enumerable:!0}),xS){var Hx=xS.createObjectURL,zx=xS.revokeObjectURL;Hx&&cS(jx,"createObjectURL",uS(Hx,xS)),zx&&cS(jx,"revokeObjectURL",uS(zx,xS))}wS(jx,"URL"),iS({global:!0,constructor:!0,forced:!aS,sham:!oS},{URL:jx});var Vx=Ln,qx=a,Gx=uv,Yx=ei,Wx=_T,Kx=st("URL");Vx({target:"URL",stat:!0,forced:!(Wx&&qx((function(){Kx.canParse()})))},{canParse:function(t){var e=Gx(arguments.length,1),n=Yx(t),r=e<2||void 0===arguments[1]?void 0:Yx(arguments[1]);try{return!!new Kx(n,r)}catch(aR){return!1}}});var Xx=n(nt.URL);function $x(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function Jx(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Qx=function(t){Bk(n,t);var e=Fk(n);function n(){return Ok(this,n),e.apply(this,arguments)}return Pk(n,[{key:"beforeCreate",value:function(t){"boolean"==typeof t.player.config.cssFullscreen&&(t.config.disable=!t.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var t,e=this;Nk(Uk(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on("cssFullscreen_change",(function(t){e.animate(t)})),this.btnClick=ib(t=this.btnClick).call(t,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(t){t.preventDefault(),t.stopPropagation()}}),ib(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var t=this.icons,e=hw(this).call(this,".xgplayer-icon");e.appendChild(t.cssFullscreen),e.appendChild(t.exitCssFullscreen)}},{key:"btnClick",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.player.isCssfullScreen;this.emitUserAction(t,"switch_cssfullscreen",{cssfullscreen:e}),e?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(t){this.root&&(t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(t))}},{key:"switchTips",value:function(t){var e=this.i18nKeys,n=hw(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,t?e.EXITCSSFULLSCREEN_TIPS:e.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:$x,class:"xg-get-cssfull"},exitCssFullscreen:{icon:Jx,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){Nk(Uk(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(KE(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(uT),Zx=et,tM=k,eM=pe("match"),nM=function(t){var e;return Zx(t)&&(void 0!==(e=t[eM])?!!e:"RegExp"==tM(t))},rM=TypeError,iM=pe("match"),oM=et,aM=Math.floor;Ln({target:"Number",stat:!0},{isInteger:Number.isInteger||function(t){return!oM(t)&&isFinite(t)&&aM(t)===t}});var sM=n(nt.Number.isInteger),uM=fi.includes;Ln({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return uM(this,t,arguments.length>1?arguments[1]:void 0)}});var lM=af("Array").includes,cM=Ln,fM=function(t){if(nM(t))throw rM("The method doesn't accept regular expressions");return t},hM=X,pM=ei,dM=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[iM]=!1,"/./"[t](e)}catch(r){}}return!1},vM=y("".indexOf);cM({target:"String",proto:!0,forced:!dM("includes")},{includes:function(t){return!!~vM(pM(hM(this)),pM(fM(t)),arguments.length>1?arguments[1]:void 0)}});var gM=af("String").includes,yM=ut,mM=lM,bM=gM,wM=Array.prototype,kM=String.prototype,_M=n((function(t){var e=t.includes;return t===wM||yM(wM,t)&&e===wM.includes?mM:"string"==typeof t||t===kM||yM(kM,t)&&e===kM.includes?bM:e})),AM=$t,EM=ai,TM=Kn,CM=function(t){for(var e=AM(this),n=TM(e),r=arguments.length,i=EM(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:EM(o,n);a>i;)e[i++]=t;return e};Ln({target:"Array",proto:!0},{fill:CM});var SM=af("Array").fill,xM=ut,MM=SM,LM=Array.prototype,OM=n((function(t){var e=t.fill;return t===LM||xM(LM,t)&&e===LM.fill?MM:e})),IM={exports:{}},PM=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),RM=a,BM=et,UM=k,DM=PM,jM=Object.isExtensible,FM=RM((function(){jM(1)}))||DM?function(t){return!!BM(t)&&((!DM||"ArrayBuffer"!=UM(t))&&(!jM||jM(t)))}:jM,NM=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),HM=Ln,zM=y,VM=hi,qM=et,GM=Zt,YM=Qe.f,WM=Ki,KM=Ji,XM=FM,$M=NM,JM=!1,QM=ie("meta"),ZM=0,tL=function(t){YM(t,QM,{value:{objectID:"O"+ZM++,weakData:{}}})},eL=IM.exports={enable:function(){eL.enable=function(){},JM=!0;var t=WM.f,e=zM([].splice),n={};n[QM]=1,t(n).length&&(WM.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===QM){e(r,i,1);break}return r},HM({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:KM.f}))},fastKey:function(t,e){if(!qM(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!GM(t,QM)){if(!XM(t))return"F";if(!e)return"E";tL(t)}return t[QM].objectID},getWeakData:function(t,e){if(!GM(t,QM)){if(!XM(t))return!0;if(!e)return!1;tL(t)}return t[QM].weakData},onFreeze:function(t){return $M&&JM&&XM(t)&&!GM(t,QM)&&tL(t),t}};VM[QM]=!0;var nL=IM.exports,rL=Ln,iL=o,oL=nL,aL=a,sL=mn,uL=Ed,lL=ev,cL=x,fL=et,hL=jo,pL=Qe.f,dL=ua.forEach,vL=L,gL=ta.set,yL=ta.getterFor,mL=Wi,bL=po,wL=zT,kL=Je,_L=ev,AL=Y,EL=Ed,TL=_l,CL=Al,SL=Qd,xL=L,ML=nL.fastKey,LL=ta.set,OL=ta.getterFor,IL={getConstructor:function(t,e,n,r){var i=t((function(t,i){_L(t,o),LL(t,{type:e,index:mL(null),first:void 0,last:void 0,size:0}),xL||(t.size=0),AL(i)||EL(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,a=OL(e),s=function(t,e,n){var r,i,o=a(t),s=u(t,e);return s?s.value=n:(o.last=s={index:i=ML(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),xL?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},u=function(t,e){var n,r=a(t),i=ML(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return wL(o,{clear:function(){for(var t=a(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,xL?t.size=0:this.size=0},delete:function(t){var e=this,n=a(e),r=u(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),xL?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=a(this),r=kL(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),wL(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),xL&&bL(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=OL(e),o=OL(r);TL(t,e,(function(t,e){LL(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?CL("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,CL(void 0,!0))}),n?"entries":"values",!n,!0),SL(e)}};(function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),a=i?"set":"add",s=iL[t],u=s&&s.prototype,l={};if(vL&&cL(s)&&(o||u.forEach&&!aL((function(){(new s).entries().next()})))){var c=(r=e((function(e,n){gL(lL(e,c),{type:t,collection:new s}),null!=n&&uL(n,e[a],{that:e,AS_ENTRIES:i})}))).prototype,f=yL(t);dL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in u)||o&&"clear"==t||sL(c,t,(function(n,r){var i=f(this).collection;if(!e&&o&&!fL(n))return"get"==t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),o||pL(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(e,t,i,a),oL.enable();hL(r,t,!1,!0),l[t]=r,rL({global:!0,forced:!0},l),o||n.setStrong(r,t,i)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),IL);var PL=nt.Map,RL=Je,BL=P,UL=It,DL=Nf,jL=Y,FL=Ed,NL=[].push,HL=function(t){var e,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return DL(this),(e=void 0!==a)&&UL(a),jL(t)?new this:(n=[],e?(r=0,i=RL(a,o>2?arguments[2]:void 0),FL(t,(function(t){BL(NL,n,i(t,r++))}))):FL(t,NL,{that:n}),new this(n))};Ln({target:"Map",stat:!0,forced:!0},{from:HL});var zL=Is,VL=function(){return new this(zL(arguments))};Ln({target:"Map",stat:!0,forced:!0},{of:VL});var qL=xt,GL=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"get"in t&&"set"in t&&"delete"in t&&"entries"in t)return t;throw TypeError(qL(t)+" is not a map")},YL=function(t,e){return 1==e?function(e,n){return e[t](n)}:function(e,n,r){return e[t](n,r)}},WL=st("Map"),KL={Map:WL,set:YL("set",2),get:YL("get",1),has:YL("has",1),remove:YL("delete",1),proto:WL.prototype},XL=GL,$L=KL.remove;Ln({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=XL(this),n=!0,r=0,i=arguments.length;r<i;r++)t=$L(e,arguments[r]),n=n&&t;return!!n}});var JL=GL,QL=KL.get,ZL=KL.has,tO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,i=JL(this);return ZL(i,t)?(n=QL(i,t),"update"in e&&(n=e.update(n,t,i),tO(i,t,n)),n):(r=e.insert(t,i),tO(i,t,r),r)}});var eO=P,nO=function(t,e,n){for(var r,i,o=n||t.next;!(r=eO(o,t)).done;)if(void 0!==(i=e(r.value)))return i},rO=function(t,e,n){return n?nO(t.entries(),(function(t){return e(t[1],t[0])})):t.forEach(e)},iO=Je,oO=GL,aO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=oO(this),n=iO(t,arguments.length>1?arguments[1]:void 0);return!1!==aO(e,(function(t,r){if(!n(t,r,e))return!1}),!0)}});var sO=Je,uO=GL,lO=rO,cO=KL.Map,fO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=uO(this),n=sO(t,arguments.length>1?arguments[1]:void 0),r=new cO;return lO(e,(function(t,i){n(t,i,e)&&fO(r,i,t)})),r}});var hO=Je,pO=GL,dO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=pO(this),n=hO(t,arguments.length>1?arguments[1]:void 0),r=dO(e,(function(t,r){if(n(t,r,e))return{value:t}}),!0);return r&&r.value}});var vO=Je,gO=GL,yO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=gO(this),n=vO(t,arguments.length>1?arguments[1]:void 0),r=yO(e,(function(t,r){if(n(t,r,e))return{key:r}}),!0);return r&&r.key}});var mO=Ln,bO=P,wO=x,kO=It,_O=Ed,AO=KL.Map,EO=y([].push);mO({target:"Map",stat:!0,forced:!0},{groupBy:function(t,e){var n=new(wO(this)?this:AO);kO(e);var r=kO(n.has),i=kO(n.get),o=kO(n.set);return _O(t,(function(t){var a=e(t);bO(r,n,a)?EO(bO(i,n,a),t):bO(o,n,a,[t])})),n}});var TO=function(t,e){return t===e||t!=t&&e!=e},CO=GL,SO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===SO(CO(this),(function(e){if(TO(e,t))return!0}),!0)}});var xO=P,MO=Ed,LO=x,OO=It,IO=KL.Map;Ln({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var n=new(LO(this)?this:IO);OO(e);var r=OO(n.set);return MO(t,(function(t){xO(r,n,e(t),t)})),n}});var PO=GL,RO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=RO(PO(this),(function(e,n){if(e===t)return{key:n}}),!0);return e&&e.key}});var BO=Je,UO=GL,DO=rO,jO=KL.Map,FO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=UO(this),n=BO(t,arguments.length>1?arguments[1]:void 0),r=new jO;return DO(e,(function(t,i){FO(r,n(t,i,e),t)})),r}});var NO=Je,HO=GL,zO=rO,VO=KL.Map,qO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=HO(this),n=NO(t,arguments.length>1?arguments[1]:void 0),r=new VO;return zO(e,(function(t,i){qO(r,i,n(t,i,e))})),r}});var GO=GL,YO=Ed,WO=KL.set;Ln({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=GO(this),n=arguments.length,r=0;r<n;)YO(arguments[r++],(function(t,n){WO(e,t,n)}),{AS_ENTRIES:!0});return e}});var KO=It,XO=GL,$O=rO,JO=TypeError;Ln({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=XO(this),n=arguments.length<2,r=n?void 0:arguments[1];if(KO(t),$O(e,(function(i,o){n?(n=!1,r=i):r=t(r,i,o,e)})),n)throw JO("Reduce of empty map with no initial value");return r}});var QO=Je,ZO=GL,tI=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=ZO(this),n=QO(t,arguments.length>1?arguments[1]:void 0);return!0===tI(e,(function(t,r){if(n(t,r,e))return!0}),!0)}});var eI=It,nI=GL,rI=TypeError,iI=KL.get,oI=KL.has,aI=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=nI(this),r=arguments.length;eI(e);var i=oI(n,t);if(!i&&r<3)throw rI("Updating absent value");var o=i?iI(n,t):eI(r>2?arguments[2]:void 0)(t,n);return aI(n,t,e(o,t,n)),n}});var sI=P,uI=It,lI=x,cI=rn,fI=TypeError,hI=function(t,e){var n,r=cI(this),i=uI(r.get),o=uI(r.has),a=uI(r.set),s=arguments.length>2?arguments[2]:void 0;if(!lI(e)&&!lI(s))throw fI("At least one callback required");return sI(o,r,t)?(n=sI(i,r,t),lI(e)&&(n=e(n),sI(a,r,t,n))):lI(s)&&(n=s(),sI(a,r,t,n)),n};Ln({target:"Map",proto:!0,real:!0,forced:!0},{upsert:hI}),Ln({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:hI});var pI=n(PL);function dI(t){return(dI="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function vI(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,gI(r.key),r)}}function gI(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var yI=It,mI=$t,bI=G,wI=Kn,kI=TypeError,_I=function(t){return function(e,n,r,i){yI(n);var o=mI(e),a=bI(o),s=wI(o),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw kI("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},AI={left:_I(!1),right:_I(!0)}.left;Ln({target:"Array",proto:!0,forced:!Wd&&gt>79&&gt<83||!tp("reduce")},{reduce:function(t){var e=arguments.length;return AI(this,t,e,e>1?arguments[1]:void 0)}});var EI,TI,CI,SI=af("Array").reduce,xI=ut,MI=SI,LI=Array.prototype,OI=n((function(t){var e=t.reduce;return t===LI||xI(LI,t)&&e===LI.reduce?MI:e})),II=1,PI=2,RI=3,BI=4,UI=["Boolean","Number","String","Undefined","Null","Date","Object"],DI=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}var e,n,r;return e=t,n=[{key:"debug",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[II]).call(e,o)),t.disabled||(r=console).debug.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"log",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[PI]).call(e,o)),t.disabled||(r=console).log.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"warn",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[RI]).call(e,o)),t.disabled||(r=console).warn.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"error",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[BI]).call(e,o)),t.disabled||(r=console).error.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"logCache",value:function(t){if(!(t<this.logCacheLevel)){var e="";try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=hk(r).call(r,(function(t){return NI(t)}));e=this._prefix+jI()+Oh(o)}catch(s){return}if(t>=this.logCacheLevel&&(this.logSize+=e.length,this.logTextArray.push(e)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var t=this.logTextArray.join("\n");return this.reset(),t}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var e;t.disabled||(console.group(this._prefix),(e=console).table.apply(e,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(t){this.logCacheLevel=t}}],r=[{key:"enable",value:function(){t.disabled=!1}},{key:"disable",value:function(){t.disabled=!0}}],n&&vI(e.prototype,n),r&&vI(e,r),Mp(e,"prototype",{writable:!1}),t}();function jI(){return(new Date).toLocaleString()}function FI(t){var e;if("object"!==dI(t))return t;var n=nb(e=Object.prototype.toString.call(t)).call(e,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+t.length+"]";case"Object":return"{}";default:return n}}function NI(t,e,n){var r;n||(n=1),e||(e=2);var i={};if(!t||"object"!==dI(t))return t;var o=nb(r=Object.prototype.toString.call(t)).call(r,8,-1);if(!_M(UI).call(UI,o))return o;if(!(n>e)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n===e?i[a]=FI(t[a]):"object"===dI(t[a])?i[a]=NI(t[a],e,n+1):i[a]=t[a]);return i}}EI=DI,CI=!0,(TI=gI(TI="disabled"))in EI?Mp(EI,TI,{value:CI,enumerable:!0,configurable:!0,writable:!0}):EI[TI]=CI;var HI=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),zI=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function VI(t){return Sk({muted:!1,timeout:250,inline:!1},t)}function qI(t,e){var n=t.muted,r=t.timeout,i=t.inline,o=e(),a=o.element,s=o.source,u=void 0,l=void 0,c=void 0;return a.muted=n,!0===n&&a.setAttribute("muted","muted"),!0===i&&a.setAttribute("playsinline","playsinline"),a.src=s,new Cm((function(t){u=a.play(),l=D_((function(){c(!1,new Error("Timeout "+r+" ms has been reached"))}),r),c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(l),t({result:e,error:n})},void 0!==u?u.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var GI={audio:function(t){return qI(t=VI(t),(function(){return{element:document.createElement("audio"),source:Xx.createObjectURL(HI)}}))},video:function(t){return qI(t=VI(t),(function(){return{element:document.createElement("video"),source:Xx.createObjectURL(zI)}}))}},YI=new DI("AdsPluginBaseAdManager"),WI=function(t){Fb(n,t);var e=Vb(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bb(this,n),(t=e.call(this)).options=r,t.config=r.config||{},t.plugin=r.plugin,t.player=r.plugin.player,t.mediaElement=t.player.media||t.player.video,t.isLinearAdRunning=!1,t._shouldBlockVideoContent=!1,t._isAdPaused=!0,t._isMediaEnded=!1,t.context={currentTime:0,duration:0},t}return Db(n,[{key:"currentTime",get:function(){return this.context.currentTime}},{key:"duration",get:function(){return this.context.duration}},{key:"paused",get:function(){return this._isAdPaused}},{key:"shouldBlockVideoContent",get:function(){return this.isLinearAdRunning||this._shouldBlockVideoContent},set:function(t){this._shouldBlockVideoContent=t}},{key:"updateConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t?this.config=Lb(Lb({},this.config),t):YI.warn("config is empty")}},{key:"isFullScreen",value:function(){return!!this.player.fullscreen}},{key:"destroy",value:function(){this.removeAllListeners()}},{key:"tryContentPlay",value:function(){var t=this.player,e=t.play();void 0!==e&&e&&e.then?e.then((function(){YI.log("content play"),t.removeClass(qE),t.addClass(jE),t.state<GE&&(t.setState(GE),t.emit(dE))})).catch((function(e){if(YI.error("content play error",e),t.media&&t.media.error)return t.onError(),void t.removeClass(UE)})):t.state<GE&&(t.setState(GE),t.removeClass(qE),t.removeClass(VE),t.removeClass(UE),t.addClass(jE),t.emit(dE))}}]),n}(Gk.EventEmitter),KI=new DI("AdsPluginImaAdManager"),XI="xgplayer-ads-playing",$I=function(t){Fb(o,t);var e,n,r,i=Vb(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bb(this,o),jb(zb(t=i.call(this,e)),"_onMediaEnded",(function(){var e;t.isLinearAdRunning||(t._isMediaEnded=!0,null===(e=t.adsLoader)||void 0===e||e.contentComplete())})),jb(zb(t),"_onMediaResize",(function(){var e,n=zb(t).player,r=t.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(e=t.adsManager)||void 0===e||e.resize(n.sizeInfo.width,n.sizeInfo.height,r)})),jb(zb(t),"_onMediaPlay",(function(){t._mediaPlayed=!0})),jb(zb(t),"_onMediaPause",(function(){t._mediaPlayed=!1})),jb(zb(t),"_onMediaVolumeChange",(function(){var e;null===(e=t.adsManager)||void 0===e||e.setVolume(t.player.muted?0:t.player.volume)})),jb(zb(t),"_onAdsManagerLoaded",(function(e){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0;var r=t.adsManager=e.getAdsManager(t.mediaElement,n);KI.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&KI.log("cuePoints",i),t._initAdsManagerEventListeners(),t.player.emit(kh,{adsManager:r})})),jb(zb(t),"_onAdsManagerAdError",(function(e){t._handleAdError(e.getError()),t._resumeContent()})),jb(zb(t),"_onAdsLoaderAdError",(function(e){t._handleAdError(e.getError())})),jb(zb(t),"_handleAdError",(function(e){var n,r,i;KI.log("AdError",e),t.shouldBlockVideoContent=!1,t.isLinearAdRunning=!1,null===(n=t.adsManager)||void 0===n||n.destroy(),null===(r=t.plugin)||void 0===r||r.emit(Ah,e),null===(i=t.plugin)||void 0===i||i.emit(vh,e)})),jb(zb(t),"onAdEvent",(function(e){var n,r=zb(t).player,i=null==e?void 0:e.getAd(),o=(null==e?void 0:e.getAdData())||(null==i?void 0:i.data),a=!1;switch(null==e?void 0:e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:t.player.emit("ima_ad_break_ready",{ad:i});break;case google.ima.AdEvent.Type.LOADED:var s=(o||{}).adPodInfo,u=0===(null==s?void 0:s.podIndex);a=!0,u&&(i.isLinear()?t.shouldBlockVideoContent=!0:(t.shouldBlockVideoContent=!1,t.tryContentPlay())),t.emit(Eh,{ad:i,isPreroll:u}),t.plugin.emit(Eh,{ad:i,isPreroll:u});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:t._resumeContent(),t.emit(Ch,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:t.isLinearAdRunning=!0,t.shouldBlockVideoContent=!0,eE.addClass(t.player.root,XI),null==r||r.pause(),t.emit(Th,{ad:i});break;case google.ima.AdEvent.Type.STARTED:t.plugin.emit(ch,{ad:i}),i.isLinear()&&(t._isAdPaused=!1,t.plugin.emit(fh,{ad:i}),n=U_((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:t._isAdPaused=!1,t.plugin.emit(fh,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:t._isAdPaused=!0,t.plugin.emit(hh,{ad:i});break;case google.ima.AdEvent.Type.SKIPPED:t.plugin.emit(dh,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var l=e.getAdData(),c=l.currentTime,f=l.duration;Sk(t.context,{currentTime:c,duration:f}),t.plugin.emit(ph,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:var h=(o||{}).adPodInfo,p=!1;null!=i&&i.isLinear()&&(h&&(p=h.adPosition<h.totalAds),clearInterval(n)),t.plugin.emit(_h,{ad:i,hasNextInPod:p}),t.plugin.emit(gh,{ad:i,hasNextInPod:p});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=i&&i.isLinear()&&clearInterval(n),t.plugin.emit("ima_all_ads_completed",{ad:i}),t.player.emit(yh,{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}KI.log("AdEvent",null==e?void 0:e.type,a?Oh((null==e?void 0:e.getAdData())||{}):null==e?void 0:e.getAd())})),t.displayContainer=null,t.adsLoader=null,t.adsManager=null,t}return Db(o,[{key:"init",value:(r=Rb(Ob().mark((function t(){return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.shouldBlockVideoContent=!!(this.config.adTagUrl||this.config.adsResponse||this.config.adsRequest),t.prev=1,this.emit(mh),t.next=5,this._loadIMASdk();case 5:this.emit(bh),t.next=14;break;case 8:return t.prev=8,t.t0=t.catch(1),KI.error("google.ima sdk is not loaded, due to error",(null===t.t0||void 0===t.t0?void 0:t.t0.message)||t.t0),this.emit(wh),this.shouldBlockVideoContent=!1,t.abrupt("return");case 14:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 19:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){qb(Nb(o.prototype),"destroy",this).call(this),this.reset(),this._removeMediaEvents(),this._destroyLoader()}},{key:"_initConfig",value:function(){var t=this.config.locale;t&&google.ima.settings.setLocale(t)}},{key:"_loadIMASdk",value:function(){var t=this;return new Cm((function(e,n){if("undefined"!=typeof google&&google.ima)e();else{var r=document.createElement("script"),i=D_((function(){n(new Error("google.ima sdk load timeout"))}),t.config.loadSdkTimeout||3e3);r.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(t.config.debug?"_debug":"",".js"),r.onload=function(){clearTimeout(i),e()},r.onerror=function(t){clearTimeout(i),n(null==t?void 0:t.message)},document.head.appendChild(r)}}))}},{key:"_initMediaEvents",value:function(){var t=this.player;t.on(vE,this._onMediaResize),t.on(sE,this._onMediaEnded),t.on(aE,this._onMediaPlay),t.on(uE,this._onMediaPause),t.on(hE,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var t=this.player;t.off(vE,this._onMediaResize),t.off(sE,this._onMediaEnded),t.off(aE,this._onMediaPlay),t.off(uE,this._onMediaPause),t.off(hE,this._onMediaVolumeChange)}},{key:"_initContainer",value:function(){var t=this.options.displayContainer;this.displayContainer=new google.ima.AdDisplayContainer(t,this.mediaElement)}},{key:"_initLoader",value:function(){var t=this.adsLoader=new google.ima.AdsLoader(this.displayContainer);t.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1),this.player.emit("ima_ad_loader_ready",{adsLoader:t})}},{key:"_destroyLoader",value:function(){var t=this.adsLoader;t||(t.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1))}},{key:"_initAdsRequest",value:(n=Rb(Ob().mark((function t(){var e,n,r,i,o=this;return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,!(n||r||i)){t.next=9;break}return t.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(kh,(function(){o.autoplayAllowed?o.playAds():o.player.useHooks("play",(function t(){return o.playAds(),o.player.removeHooks("play",t),!1})),o.emit(Sh)})),this.player.once(Ah,(function(){o.emit(Sh)})),t.next=10;break;case 9:this.emit(Sh);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"playAds",value:function(){try{this._onMediaVolumeChange(),this.displayContainerInitialized||(this.displayContainer.initialize(),this.displayContainerInitialized=!0);var t=this.player,e=this.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.adsManager.init(t.sizeInfo.width,t.sizeInfo.height,e),this.adsManager.start()}catch(n){this._handleAdError(n),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var t=this,e=this.adsManager;e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var n=["LOADED","STARTED","RESUMED","PAUSED","COMPLETE","ALL_ADS_COMPLETED","CONTENT_PAUSE_REQUESTED","CONTENT_RESUME_REQUESTED","VOLUME_CHANGED","VOLUME_MUTED","AD_METADATA","AD_CAN_PLAY","AD_PROGRESS","AD_BUFFERING","CLICK","VIDEO_CLICKED","VIDEO_ICON_CLICKED","FIRST_QUARTILE","MIDPOINT","THIRD_QUARTILE","SKIPPED","USER_CLOSE","AD_BREAK_READY","AD_BREAK_FETCH_ERROR"];cp(n).call(n,(function(n){e.addEventListener(google.ima.AdEvent.Type[n],t.onAdEvent)}))}},{key:"_resumeContent",value:function(){var t;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,eE.removeClass(this.player.root,XI),this._isMediaEnded)||(null===(t=this.player)||void 0===t||t.play())}},{key:"reset",value:function(){var t,e;this.isLinearAdRunning=!1,null===(t=this.adsManager)||void 0===t||t.destroy(),this.adsManager=null,null===(e=this.adsLoader)||void 0===e||e.contentComplete(),eE.removeClass(this.player.root,XI)}},{key:"requestAds",value:function(){var t,e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,o=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=o.sizeInfo.width,a.linearAdSlotHeight=o.sizeInfo.height,a.nonLinearAdSlotWidth=o.sizeInfo.width,a.nonLinearAdSlotHeight=o.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),i)a.adTagUrl=i;else if(r)a.adsResponse=r;else if(n&&"object"===Ib(n)){var s;cp(s=qh(n)).call(s,(function(t){a[t]=n[t]}))}KI.log("requestAds",Oh(a)),null===(t=this.adsLoader)||void 0===t||t.requestAds(a)}},{key:"pause",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.pause()}},{key:"play",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.resume()}},{key:"skip",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.skip()}},{key:"updateConfig",value:function(t){qb(Nb(o.prototype),"updateConfig",this).call(this,t),this._initConfig()}},{key:"_checkAutoplaySupport",value:(e=Rb(Ob().mark((function t(){var e,n,r,i,o;return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.config.autoplay,t.next=4,Cm.all([e?GI.video({timeout:800}).then((function(t){return t.result})):Cm.resolve(!1),e&&this.player.config.autoplayMuted?GI.video({timeout:800,muted:!0}).then((function(t){return t.result})):Cm.resolve(!1)]);case 4:n=t.sent,r=Gb(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,KI.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(WI),JI="xgplayer-ad-start",QI="xgplayer-ad-show-ui",ZI=function(t){Fb(n,t);var e=Vb(n);function n(){var t,r;Bb(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return jb(zb(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=r.getAdPlugin();return e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var t=this;this.on([hh],(function(){t.animate(!0)})),this.on(fh,(function(){t.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(lT),tP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"offsetDuration",get:function(){return this.duration}},{key:"timeOffset",get:function(){return 0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"afterCreate",value:function(){Sk(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),qb(Nb(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var t=this;this.on(ph,(function(){t.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}(sT),eP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"listenEvents",value:function(){var t=this;this.on([ph],(function(e){t.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(vT),nP=function(){function t(e,n){Bb(this,t);var r=n.player,i=n.plugin;this.player=r,this.config=e,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[lT,ZI],[vT,eP],[sT,tP],[bT,null],[Qx,null],[dT,null]],this.init(),this.initEvents()}return Db(t,[{key:"init",value:function(){var t=this.player,e=this.adUIPlugins,n=this.fragment,r=this.decoratedAdPluginList;cp(r).call(r,(function(r){var i=Gb(r,2),o=i[0],a=i[1],s=t.getPlugin(o.pluginName);if(s){var u=null;a&&!t.getPlugin(a.pluginName)&&(t.registerPlugin(a),u=t.getPlugin(a.pluginName),n.appendChild(u.root)),e.push([s,u])}}))}},{key:"destroy",value:function(){this.fragment=null,this.adUIPlugins=[],this.decoratedAdPluginList=[],this.adPlugin=null,this.player=null}},{key:"initEvents",value:function(){var t=this,e=this.adPlugin,n=this.player;e.on(fh,(function(){var t=[VE,DE,FE,HE,zE,NE];cp(t).call(t,(function(t){n.removeClass(t)}))})),e.on(ch,(function(){t.showAdContainer()})),e.on(gh,(function(e){e.hasNextInPod||t.hideAdContainer()})),e.on(dh,(function(){t.hideAdContainer()})),e.on(vh,(function(){t.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var t=this.player;eE.hasClass(t.root,JI)||eE.addClass(t.root,JI)}},{key:"hideAdContainer",value:function(){var t=this.player;eE.hasClass(t.root,JI)&&eE.removeClass(t.root,JI)}},{key:"showAdUI",value:function(){var t,e=this.player,n=this.config,r=this.adUIPlugins,i=this.fragment;cp(r).call(r,(function(t){var e=Gb(t,2),n=e[0],r=e[1];if(r){var o=r.root,a=n.root;i.contains(o)&&i.removeChild(o),a.parentNode.insertBefore(o,a),i.appendChild(a)}}));var o=this._getNonAdPlugin();cp(t=Jh(o).call(o,(function(t){return!!t.root}))).call(t,(function(t){var e=t.root;t.__adStub__||(t.__adStub__=eE.createDom("xg-ad-stub","",{})),e.parentNode.insertBefore(t.__adStub__,e),i.appendChild(e)}));var a=e.getPlugin("start");a&&a.hide(),!1===n.controls&&e.controls&&this.hideControls(),this.showAdContainer(),e.addClass(QI)}},{key:"hideAdUI",value:function(){var t,e,n=this.player,r=this.config,i=this.adUIPlugins,o=this.fragment;cp(i).call(i,(function(t){var e=Gb(t,2),n=e[0],r=e[1];if(r){var i=r.root,a=n.root;o.contains(a)&&o.removeChild(a),o.contains(i)||(i.parentNode.insertBefore(a,i),o.appendChild(i))}}));var a=this._getNonAdPlugin();cp(t=Jh(a).call(a,(function(t){return!!t.root}))).call(t,(function(t){var e,n,r=t.root;o.contains(r)&&o.removeChild(r),null===(e=t.__adStub__)||void 0===e||null===(n=e.parentNode)||void 0===n||n.insertBefore(r,t.__adStub__)})),!1===r.controls&&o.contains(null===(e=n.controls)||void 0===e?void 0:e.root)&&this.showControls();var s=n.getPlugin("start");if(s){var u=s.config.disableAnimate,l=s.config.isShowPause;u||(s.config.disableAnimate=!0,s.config.isShowPause=!1),n.once("play",(function(){D_((function(){s.config.disableAnimate=u,s.config.disableAnimate=l}),10)}))}n.removeClass(QI)}},{key:"hideControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){var r=t.controls.root,i=r.parentElement,o=r.previousSibling,a=r.nextSibling;this.controlsPos={parentNode:i,previousSibling:o,nextSibling:a},n.appendChild(t.controls.root)}}},{key:"showControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){if(!this.controlsPos)return;var r=t.controls.root;n.contains(r)&&n.removeChild(r);var i=this.controlsPos,o=i.parentNode,a=i.previousSibling,s=i.nextSibling;o&&(s?o.insertBefore(r,s):a?o.insertBefore(r,a.nextSibling):o.appendChild(r)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var t,e=this.player,n=this.decoratedAdPluginList,r=[];cp(n).call(n,(function(t){var e=Gb(t,2),n=e[0],i=e[1];r.push(n.pluginName.toLowerCase()),i&&r.push(i.pluginName.toLowerCase())}));var i=(null===(t=e.controls)||void 0===t?void 0:t.plugins())||[];return Jh(i).call(i,(function(t){return-1===rw(r).call(r,t.pluginName.toLowerCase())}))}}]),t}(),rP=new DI("AdsPlugin"),iP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"version",get:function(){return"3.0.20-alpha.8"}},{key:"paused",get:function(){var t,e;return!(null===(t=this.csManager)||void 0===t||!t.isLinearAdRunning||null===(e=this.csManager)||void 0===e||!e.paused)}},{key:"currentTime",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.currentTime)||0}},{key:"duration",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.duration)||0}},{key:"afterCreate",value:function(){var t=this.config;rP.log("plugin afterCreate, config: ".concat(Oh(t||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var t,e,n;switch(rP.log("plugin beforePlayerInit"),this.initPromise=((n=new Cm((function(n,r){t=n,e=r}))).used=!1,n.resolve=function(){return n.used=!0,t.apply(void 0,arguments)},n.reject=function(){return n.used=!0,e.apply(void 0,arguments)},n),this.uiManager=new nP(this.config,{plugin:this,player:this.player}),this.config.adType){case"ima":case"google-ima":this._initClientSideAd()}return this.initPromise}},{key:"render",value:function(){return eE.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:function(){var t=this;this.csManager=new $I({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(mh,(function(){t.uiManager.showAdContainer()})),this.csManager.on(wh,(function(){t.uiManager.hideAdContainer()})),this.csManager.once(Eh,(function(e){e.isPreroll||t.uiManager.hideAdContainer()})),this.csManager.once(Sh,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(Th,(function(){t.uiManager.showAdUI()})),this.csManager.on(Ch,(function(){t.uiManager.hideAdUI()})),this.csManager.init()}},{key:"requestAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.requestAds()}},{key:"playAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.playAds()}},{key:"pause",value:function(){var t;null===(t=this.csManager)||void 0===t||t.pause()}},{key:"play",value:function(){var t;null===(t=this.csManager)||void 0===t||t.play()}},{key:"destroy",value:function(){var t,e;this.offAll(),null===(t=this.csManager)||void 0===t||t.destroy(),null===(e=this.uiManager)||void 0===e||e.destroy()}},{key:"reset",value:function(){var t;null===(t=this.csManager)||void 0===t||t.reset()}},{key:"updateConfig",value:function(t){var e;null===(e=this.csManager)||void 0===e||e.updateConfig(t)}},{key:"_blockContentPlay",value:function(){var t=this,e=this.player;e.on("play",(function(){var n;null!==(n=t.csManager)&&void 0!==n&&n.shouldBlockVideoContent&&(rP.log("block content play"),e.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(BE);function oP(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function aP(t,e){var n=void 0!==cc&&Nh(t)||t["@@iterator"];if(!n){if(ub(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return oP(t,e);var r=eb(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Cb(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oP(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var sP={},uP={},lP={};!function(t){Mp(t,"__esModule",{value:!0}),t.shiftThirtyTwoBits=t.THIRTY_TWO_BIT_MULTIPLIER=t.bytesToUUID=void 0;t.bytesToUUID=function(t){if(16!==t.length)throw new Error("scte35-js Uint8Array uuid bad size: ".concat(t.length));return hk([]).call(t,(function(t,e){var n=(t<=15?"0":"")+t.toString(16);return e>=4&&e<=10&&e%2==0?"-"+n:n})).join("")},t.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);t.shiftThirtyTwoBits=function(e){return e*t.THIRTY_TWO_BIT_MULTIPLIER}}(lP),Mp(uP,"__esModule",{value:!0}),uP.parseDescriptor=uP.SegmentationMessage=void 0;var cP,fP,hP=lP;(fP=cP||(uP.SegmentationMessage=cP={}))[fP.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",fP[fP.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",fP[fP.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",fP[fP.NONE=3]="NONE";uP.parseDescriptor=function(t){var e,n=function(t){var e={},n=0;for(e.spliceDescriptorTag=t.getUint8(n++),e.descriptorLength=t.getUint8(n++),e.identifier="";e.identifier.length<4;)e.identifier+=String.fromCharCode(t.getUint8(n++));return e}(t),r=6;if(0===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===n.spliceDescriptorTag){var i=n;if(i.segmentationEventId=t.getUint32(r),r+=4,i.segmentationEventCancelIndicator=!!(128&t.getUint8(r++)),!i.segmentationEventCancelIndicator){var o=t.getUint8(r++);i.programSegmentationFlag=!!(128&o),i.segmentationDurationFlag=!!(64&o),i.deliveryNotRestrictedFlag=!!(32&o),i.deliveryNotRestrictedFlag||(i.webDeliveryAllowedFlag=!!(16&o),i.noRegionalBlackoutFlag=!!(8&o),i.archiveAllowedFlag=!!(4&o),i.deviceRestrictions=3&o),i.programSegmentationFlag||(i.componentCount=t.getUint8(r++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+i.componentCount),r+=6*i.componentCount),i.segmentationDurationFlag&&(i.segmentationDuration=hP.shiftThirtyTwoBits(t.getUint8(r++)),i.segmentationDuration+=t.getUint32(r),r+=4),i.segmentationUpidType=t.getUint8(r++),i.segmentationUpidLength=t.getUint8(r++);var a=i.segmentationUpidLength;for(i.segmentationUpid=new Uint8Array(a);a>=0;)a--,i.segmentationUpid[a]=t.getUint8(r+a);r+=i.segmentationUpidLength,i.segmentationTypeId=t.getUint8(r++),i.segmentNum=t.getUint8(r++),i.segmentsExpected=t.getUint8(r++),r<n.descriptorLength+2&&(52===i.segmentationTypeId||54===i.segmentationTypeId)&&(i.subSegmentNum=t.getUint8(r++),i.subSegmentsExpected=t.getUint8(r++))}}else 3===n.spliceDescriptorTag?(r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(n.spliceDescriptorTag)),r=n.descriptorLength+2);r!==n.descriptorLength+2&&console.error(lh(e="scte35-js Error reading descriptor offset @".concat(r," of ")).call(e,n.descriptorLength+2));return n};var pP=n(nt.Symbol.for),dP=h,vP=Q,gP=Vn,yP=Kn,mP=tp,bP=Math.min,wP=[].lastIndexOf,kP=!!wP&&1/[1].lastIndexOf(1,-0)<0,_P=mP("lastIndexOf"),AP=kP||!_P?function(t){if(kP)return dP(wP,this,arguments)||0;var e=vP(this),n=yP(e),r=n-1;for(arguments.length>1&&(r=bP(r,gP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:wP;Ln({target:"Array",proto:!0,forced:AP!==[].lastIndexOf},{lastIndexOf:AP});var EP=af("Array").lastIndexOf,TP=ut,CP=EP,SP=Array.prototype,xP=n((function(t){var e=t.lastIndexOf;return t===SP||TP(SP,t)&&e===SP.lastIndexOf?CP:e})),MP=$t,LP=ai,OP=Kn,IP=ww,PP=Math.min,RP=[].copyWithin||function(t,e){var n=MP(this),r=OP(n),i=LP(t,r),o=LP(e,r),a=arguments.length>2?arguments[2]:void 0,s=PP((void 0===a?r:LP(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:IP(n,i),i+=u,o+=u;return n};Ln({target:"Array",proto:!0},{copyWithin:RP});for(var BP=af("Array").copyWithin,UP=ut,DP=BP,jP=Array.prototype,FP=n((function(t){var e=t.copyWithin;return t===jP||UP(jP,t)&&e===jP.copyWithin?DP:e})),NP={},HP={byteLength:function(t){var e=WP(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=WP(t),i=r[0],o=r[1],a=new qP(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=VP[t.charCodeAt(n)]<<18|VP[t.charCodeAt(n+1)]<<12|VP[t.charCodeAt(n+2)]<<6|VP[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=VP[t.charCodeAt(n)]<<2|VP[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=VP[t.charCodeAt(n)]<<10|VP[t.charCodeAt(n+1)]<<4|VP[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(KP(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(zP[e>>2]+zP[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(zP[e>>10]+zP[e>>4&63]+zP[e<<2&63]+"="));return i.join("")}},zP=[],VP=[],qP="undefined"!=typeof Uint8Array?Uint8Array:Array,GP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",YP=0;YP<64;++YP)zP[YP]=GP[YP],VP[GP.charCodeAt(YP)]=YP;function WP(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=rw(t).call(t,"=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function KP(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(zP[(i=r)>>18&63]+zP[i>>12&63]+zP[i>>6&63]+zP[63&i]);return o.join("")}VP["-".charCodeAt(0)]=62,VP["_".charCodeAt(0)]=63;var XP={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*v}};(function(e){var n=HP,r=XP,i="function"==typeof Ih&&"function"==typeof pP?pP("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Ip(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|d(t,e),r=a(n),i=r.write(t,e);i!==n&&(r=nb(r).call(r,0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Lc(t));if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return h(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return h(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);var i=function(t){if(s.isBuffer(t)){var e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):f(t);if("Buffer"===t.type&&lb(t.data))return f(t.data)}(t);if(i)return i;if(void 0!==Ih&&null!=xb&&"function"==typeof t[xb])return s.from(t[xb]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Lc(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return l(t),a(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),n=a(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Ip(r,s.prototype),r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+Lc(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof rw(Uint8Array.prototype)?i?rw(Uint8Array.prototype).call(t,e,n):xP(Uint8Array.prototype).call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=e.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=ak(e.substr(2*o,2),16);if(X(s))return o;t[n+o]=s}return o}function w(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function k(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function _(t,e,n,r){return W(Y(e),t,n,r)}function A(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(nb(t).call(t,e,r))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],l=t[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,nb(t).call(t,r,r+=C));return n}(r)}e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Ip(e,Uint8Array.prototype),Ip(t,e),42===t.foo()}catch(n){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Mp(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Mp(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Ip(s.prototype,Uint8Array.prototype),Ip(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?OM(r=a(t)).call(r,e,n):OM(i=a(t)).call(i,e):a(t);var r,i}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!lb(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(K(o,Uint8Array))i+o.length>r.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):v.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t,n="",r=e.INSPECT_MAX_BYTES;return n=lA(t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(t),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+Lc(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),l=nb(this).call(this,r,i),c=nb(t).call(t,e,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==rw(this).call(this,t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return k(this,t,e,n);case"base64":return _(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:nb(Array.prototype).call(this._arr||this,0)}};var C=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function M(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function L(t,e,n){for(var r=nb(t).call(t,e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Ip(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),s.prototype.readBigInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;this===t&&"function"==typeof FP(Uint8Array.prototype)?FP(this).call(this,e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:s.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var j={};function F(e,n,r){j[e]=function(r){Uf(o,r);var i=rh(o);function o(){var r,a;return t(this,o),a=i.call(this),Mp(Uc(a),"message",{value:n.apply(Uc(a),arguments),writable:!0,configurable:!0}),a.name=lh(r="".concat(a.name," [")).call(r,e,"]"),a.stack,delete a.name,a}return Bc(o,[{key:"code",get:function(){return e},set:function(t){Mp(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){var t,n;return lh(t=lh(n="".concat(this.name," [")).call(n,e,"]: ")).call(t,this.message)}}]),o}(r)}function N(t){for(var e,n="",r=t.length,i="-"===t[0]?1:0;r>=i+4;r-=3){var o;n=lh(o="_".concat(nb(t).call(t,r-3,r))).call(o,n)}return lh(e="".concat(nb(t).call(t,0,r))).call(e,n)}function H(t,e,n,r,i,o){if(t>n||t<e){var a,s,u,l,c,f,h,p,d,v,g="bigint"==typeof e?"n":"";if(o>3)if(0===e||e===BigInt(0))a=lh(s=lh(u=lh(l=">= 0".concat(g," and < 2")).call(l,g," ** ")).call(u,8*(o+1))).call(s,g);else a=lh(c=lh(f=">= -(2".concat(g," ** ")).call(f,8*(o+1)-1)).call(c,g,") and < 2 ** ")+lh(h="".concat(8*(o+1)-1)).call(h,g);else a=lh(p=lh(d=lh(v=">= ".concat(e)).call(v,g," and <= ")).call(d,n)).call(p,g);throw new j.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){var r;if(Math.floor(t)!==t)throw z(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",lh(r=">= ".concat(n?1:0," and <= ")).call(r,e),t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){var n;return lh(n='The "'.concat(t,'" argument must be of type number. Received type ')).call(n,Lc(e))}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,n){var r,i='The value of "'.concat(t,'" is out of range.'),o=n;return sM(n)&&Math.abs(n)>Math.pow(2,32)?o=N(String(n)):"bigint"==typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=N(o)),o+="n"),i+=lh(r=" It must be ".concat(e,". Received ")).call(r,o)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function G(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return n.toByteArray(function(t){if(t=t.split("=")[0],(t=lA(t).call(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){var i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}})(NP),Mp(sP,"__esModule",{value:!0});var $P=sP.SCTE35=void 0,JP=uP,QP=lP,ZP=NP,tR=function(){function e(){t(this,e),this.buffer=ZP.Buffer}return Bc(e,[{key:"parseFromB64",value:function(t){var e,n=Uint8Array.from(hk(e=this.parseBase64(t).split("")).call(e,(function(t){return t.charCodeAt(0)})));return this.parseSCTE35Data(n)}},{key:"parseFromHex",value:function(t){var e=t.match(/[a-f\d]{2}/gi)||[],n=Uint8Array.from(hk(e).call(e,(function(t){return ak(t,16)})));return this.parseSCTE35Data(n)}},{key:"parseBase64",value:function(t){return this.buffer.from(t,"base64").toString("binary")}},{key:"spliceEvent",value:function(t,e,n){var r=0;if(t.spliceEventId=e.getUint32(r),r+=4,t.spliceEventCancelIndicator=!!(128&e.getUint8(r++)),t.spliceEventCancelIndicator)return r;var i=e.getUint8(r++);if(t.outOfNetworkIndicator=!!(128&i),t.programSpliceFlag=!!(64&i),t.durationFlag=!!(32&i),5===n&&(t.spliceImmediateFlag=!!(16&i)),t.programSpliceFlag)if(5!==n||t.spliceImmediateFlag)4===n&&(t.utcSpliceTime=e.getUint32(r),r+=4);else{var o=this.timeSignal(new DataView(e.buffer,e.byteOffset+r,5));t.spliceTime=o,r++,o.specified&&(r+=4)}else if(t.componentCount=e.getUint8(r++),4===n){for(var a=[];a.length!==t.componentCount;)a.push({componentTag:e.getUint8(r++),utcSpliceTime:e.getUint32(r)}),r+=4;t.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return t.durationFlag&&(i=e.getUint8(r++),t.breakDuration={autoReturn:!!(128&i),duration:(1&i?QP.THIRTY_TWO_BIT_MULTIPLIER:0)+e.getUint32(r)},r+=4),t.uniqueProgramId=e.getUint16(r),r+=2,t.available=e.getUint8(r++),t.expected=e.getUint8(r++),r}},{key:"spliceSchedule",value:function(t){var e={};e.spliceCount=t.getUint8(0),e.spliceEvents=[];for(var n,r=1;e.spliceEvents.length!==e.spliceCount;){var i={};r+=this.spliceEvent(i,new DataView(t.buffer,t.byteOffset+r),4),e.spliceEvents.push(i)}r!==t.byteLength&&console.error(lh(n="scte35-js Bad read splice_schedule actual: ".concat(r," expected: ")).call(n,t.byteLength));return e}},{key:"spliceInsert",value:function(t){var e,n={},r=this.spliceEvent(n,t,5);r!==t.byteLength&&console.error(lh(e="scte35-js Bad read splice_insert actual: ".concat(r," expected: ")).call(e,t.byteLength));return n}},{key:"timeSignal",value:function(t){var e={},n=t.getUint8(0);return e.specified=!!(128&n),e.specified&&(e.pts=1&n?QP.THIRTY_TWO_BIT_MULTIPLIER:0,e.pts+=t.getUint32(1)),e}},{key:"privateCommand",value:function(t){var e={},n=t.getUint32(0),r=new Uint8Array(t.buffer,t.byteOffset+4,t.byteLength-4);return e.identifier=n,e.identifier&&(e.rawData=r),e}},{key:"parseSCTE35Data",value:function(t){var e={},n=new DataView(t.buffer),r=0;e.tableId=n.getUint8(r++);var i,o=n.getUint8(r++);if(e.selectionSyntaxIndicator=!!(128&o),e.privateIndicator=!!(64&o),e.sectionLength=((15&o)<<8)+n.getUint8(r++),e.sectionLength+3!==t.byteLength)throw new Error(lh(i="Binary read error sectionLength: ".concat(e.sectionLength," + 3 !== data.length: ")).call(i,t.byteLength));if(e.protocolVersion=n.getUint8(r++),o=n.getUint8(r++),e.encryptedPacket=!!(128&o),e.encryptedAlgorithm=(126&o)>>1,e.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(e.encryptedAlgorithm," not supported")),e.ptsAdjustment=1&o?QP.THIRTY_TWO_BIT_MULTIPLIER:0,e.ptsAdjustment+=n.getUint32(r),r+=4,e.cwIndex=n.getUint8(r++),e.tier=n.getUint8(r++)<<4,o=n.getUint8(r++),e.tier+=(240&o)>>4,e.spliceCommandLength=((15&o)<<8)+n.getUint8(r++),e.spliceCommandType=n.getUint8(r++),4095===e.spliceCommandLength)if(6===e.spliceCommandType){var a=128&n.getUint8(r);e.spliceCommandLength=a?5:1}else if(0===e.spliceCommandType)e.spliceCommandLength=0;else if(5===e.spliceCommandType){var s=r;if(s+=4,!(128&n.getUint8(s++))){var u=n.getUint8(s++),l=16&u,c=32&u,f=64&u;if(f&&!l&&(s+=5),!f){var h=n.getUint8(s++);s+=h,s+=l?0:5*h}c&&(s+=5),s+=4,e.spliceCommandLength=s-r}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==e.spliceCommandType){var p=new DataView(t.buffer,r,e.spliceCommandLength);4===e.spliceCommandType?e.spliceCommand=this.spliceSchedule(p):5===e.spliceCommandType?e.spliceCommand=this.spliceInsert(p):6===e.spliceCommandType?e.spliceCommand=this.timeSignal(p):255===e.spliceCommandType&&(e.spliceCommand=this.privateCommand(p))}if(r+=e.spliceCommandLength,e.descriptorLoopLength=n.getUint16(r),r+=2,e.descriptorLoopLength){var d=e.descriptorLoopLength;e.descriptors=[];try{for(;d;){var v=new DataView(t.buffer,r,d),g=JP.parseDescriptor(v);d-=g.descriptorLength+2,r+=g.descriptorLength+2,e.descriptors.push(g)}}catch(aR){var y;console.error(lh(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,d," in loop.")),console.error(aR),r+=d,d=0}}return e.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(nb(t).call(t,r).join(", "))),e}}]),e}();$P=sP.SCTE35=tR;var eR="SCTE35-OUT",nR="START-DATE",rR="PLANNED-DURATION";var iR=function(){function e(n){var r=this;t(this,e),ih(this,"_options",void 0),ih(this,"_track",void 0),ih(this,"_startTime",void 0),ih(this,"_adBreakCues",void 0),ih(this,"_activeAdBreak",null),ih(this,"_activeAdBreakStatus","WAITING_PREROLL"),ih(this,"_scte35",new $P),ih(this,"_scte35ResultMap",new pI),ih(this,"_handleTimeUpdate",(function(){var t,e,n,i,o;if(null!==(t=r._adBreakCues)&&void 0!==t&&t.length)for(var a=0;a<r._adBreakCues.length;a++){var s=r._adBreakCues[a];if(s.startTime>=r._player.currentTime){n=s;break}}if(n&&(null===(e=r._activeAdBreak)||void 0===e?void 0:e.id)===n.id)if((null===(i=r._activeAdBreak)||void 0===i?void 0:i.startDate)!==n.startDate)switch(r._activeAdBreakStatus){case"REQUESTED":r._changeActiveAdBreakStatus("REQUESTED",n);break;case"ERROR":case"COMPLETE":r._changeActiveAdBreakStatus("READY",null)}else(null===(o=r._activeAdBreak)||void 0===o?void 0:o.startTime)!==n.startTime&&r._changeActiveAdBreakStatus(r._activeAdBreakStatus,n);r._tryToPlayAd(),r._tryToRequestAd(n)})),ih(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY",null),r._player.off(vh,r._onReady),r._player.off(yh,r._onReady),r._player.on(cE,r._handleTimeUpdate),r._player.on(yh,r._onAdComplete),r._player.on(vh,r._onAdError),r._handleTimeUpdate()})),ih(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE",r._activeAdBreak)})),ih(this,"_onAdError",(function(){r._changeActiveAdBreakStatus("ERROR",r._activeAdBreak)})),ih(this,"_handleHlsCoreEvent",(function(t){var e=t.eventName,n=t.playlist;if("core.hlslevelloaded"===e){var i;if(null!=n&&null!==(i=n.segments)&&void 0!==i&&i.length&&0===r._player.currentTime){var o,a=aP(n.segments);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(u){a.e(u)}finally{a.f()}}null!=n&&n.dateRanges&&r._startTime&&r._updateAdBreakCues(n.dateRanges)}})),ih(this,"_onAddTrack",(function(t){var e=t.track;"metadata"===(null==e?void 0:e.kind)&&(e.mode="hidden",r._track=e,r._track.addEventListener("cuechange",r._onCuechange))})),ih(this,"_onCuechange",(function(){for(var t,e={},n=(null===(t=r._track)||void 0===t?void 0:t.cues)||[],i=0;i<n.length;){var o,a=n[i];if((null===(o=a.value)||void 0===o?void 0:o.key)===rR){var s,u=i+1<n.length?n[i+1]:null;if((null==u||null===(s=u.value)||void 0===s?void 0:s.key)===eR&&(null==u?void 0:u.startTime)===a.startTime){var l,c,f=r._getScte35Result(null===(l=u.value)||void 0===l?void 0:l.data),h=String((null==f?void 0:f.spliceCommand).spliceEventId);e[h]=ih({ID:h,startTime:u.startTime,message:f},rR,null===(c=a.value)||void 0===c?void 0:c.data),i+=2}else i++}else i++}r._updateAdBreakCues(e)})),this._options=n,this._init()}return Bc(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adManager",get:function(){return this._options.adManager}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var t,e;null===(t=this._track)||void 0===t||t.removeEventListener("cuechange",this._onCuechange),this._track=void 0,null===(e=this._mediaElement)||void 0===e||null===(e=e.textTracks)||void 0===e||e.removeEventListener("addtrack",this._onAddTrack),this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(cE,this._handleTimeUpdate),this._player.off(_h,this._onAdComplete),this._player.off(Ah,this._onAdError)}},{key:"_init",value:function(){var t;null===(t=this._mediaElement)||void 0===t||null===(t=t.textTracks)||void 0===t||t.addEventListener("addtrack",this._onAddTrack),this._player.on("core_event",this._handleHlsCoreEvent);var e=this._adManager.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl;n||r||i?(this._player.once(vh,this._onReady),this._player.once(yh,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(t,e){var n,r;this._activeAdBreakStatus=t,this._activeAdBreak=e,console.log(lh(n=lh(r="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(r,this._startTime,", player current time: ")).call(n,this._player.currentTime),this._activeAdBreak)}},{key:"_tryToRequestAd",value:function(t){var e;t&&"WAITING_PREROLL"!==this._activeAdBreakStatus&&"STARTED"!==this._activeAdBreakStatus&&t.id!==(null===(e=this._activeAdBreak)||void 0===e?void 0:e.id)&&(this._changeActiveAdBreakStatus("REQUESTED",t),this._adManager.reset(),this._adManager.updateConfig({adTagUrl:this._adTagUrl}),this._adManager.requestAds())}},{key:"_tryToPlayAd",value:function(){!this._activeAdBreak||this._activeAdBreak.startTime>this._player.currentTime||("ERROR"!==this._activeAdBreakStatus?"REQUESTED"===this._activeAdBreakStatus&&(this._changeActiveAdBreakStatus("STARTED",this._activeAdBreak),this._adManager.playAds()):this._changeActiveAdBreakStatus("READY",null))}},{key:"_getScte35Result",value:function(t){if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromHex(t))}catch(e){}if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromB64(t))}catch(e){}return this._scte35ResultMap.get(t)}},{key:"_updateAdBreakCues",value:function(t){var e,n,r=this;this._adBreakCues=WA(e=OI(n=qh(t)).call(n,(function(e,n){var i=t[n];if(function(t){return!(!t[rR]||!t.message&&!t[eR]||void 0===t.startTime&&!t[nR])}(i)){var o=i.message||r._getScte35Result(i[eR]);5===(null==o?void 0:o.spliceCommandType)&&e.push({data:o,id:i.ID,startTime:i.startTime||(new Date(i[nR]).getTime()-r._startTime)/1e3,duration:tA(i[rR]||"0"),startDate:i[nR]})}return e}),[])).call(e,(function(t,e){return t.startTime-e.startTime}))}}]),e}();var oR=function(e){Uf(r,e);var n=rh(r);function r(){var e,i;t(this,r);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return ih(Uc(i=n.call.apply(n,lh(e=[this]).call(e,a))),"_scte35Manager",void 0),ih(Uc(i),"_handlePrerollMuted",(function(t){var e,n;(function(t){var e;return 0===(null==t||null===(e=t.getAdPodInfo())||void 0===e?void 0:e.getTimeOffset())})(t.ad)&&(null===(e=i.player.plugins.autoplayplugin)||void 0===e||null===(n=e.handleAutoplayStart)||void 0===n||n.call(e),i.player.once(hE,(function(){var t,e;null===(t=i.player.plugins.autoplayplugin)||void 0===t||null===(e=t.initState)||void 0===e||e.call(t)})))})),i}return Bc(r,[{key:"afterCreate",value:function(){Of(Lf(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var t,e,n=Of(Lf(r.prototype),"beforePlayerInit",this).call(this);return null===(t=this.csManager)||void 0===t||t.once(bh,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(e=this.config.ima)&&void 0!==e&&e.adTagUrlForSCTE35&&(this._scte35Manager=new iR({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager})),n}},{key:"destroy",value:function(){var t;Of(Lf(r.prototype),"destroy",this).call(this),null===(t=this._scte35Manager)||void 0===t||t.destroy(),this._scte35Manager=void 0}},{key:"_init",value:function(){var t,e;null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrl||null===(e=this.config.ima)||void 0===e||null===(e=e.schedule)||void 0===e||!e.length||(this.config.ima.adsResponse=function(t){var e,n;if(t&&t.length){var r=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),i=r.getElementsByTagName("vmap:VMAP");i[0].setAttribute("version","1.0");var o,a=0,s=0;return cp(e=WA(n=Jh(t).call(t,(function(t){var e=t.offset;return"pre"===e||"post"===e||/^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(e)}))).call(n,(function(t,e){return"pre"===t.offset||"post"===e.offset?-1:"post"===t.offset||"pre"===e.offset?1:Date.parse("2024-01-01T".concat(t.offset))<Date.parse("2024-01-01T".concat(e.offset))?-1:1}))).call(e,(function(t){var e,n,u,l=t.offset,c=t.type,f=t.tag;switch(l){case"pre":n="start",u="preroll";break;case"post":n="end",u="postroll";break;default:n=l,o!==l?(o=l,s=1,u="midroll-".concat(++a)):(s++,u="midroll-".concat(a))}var h=r.createElement("vmap:AdBreak");h.setAttribute("timeOffset",n),h.setAttribute("breakId",u),h.setAttribute("breakType",c||"linear"),i[0].appendChild(h);var p=r.createElement("vmap:AdSource");p.setAttribute("id",lh(e="".concat(u,"-ad-")).call(e,s)),p.setAttribute("allowMultipleAds","true"),p.setAttribute("followRedirects","true"),h.appendChild(p);var d=r.createElement("vmap:AdTagURI");d.setAttribute("templateType","vast3"),p.appendChild(d),d.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(r)}}(this.config.ima.schedule)),this.player.once(fh,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(iP);return oR}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VePlayerAd=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),i=function(e){try{return!!e()}catch(t){return!0}},o=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),a=o,s=Function.prototype,l=s.apply,u=s.call,c="object"==typeof Reflect&&Reflect.apply||(a?u.bind(l):function(){return u.apply(l,arguments)}),f=o,h=Function.prototype,d=h.call,p=f&&h.bind.bind(d,d),v=f?p:function(e){return function(){return d.apply(e,arguments)}},g=v,y=g({}.toString),m=g("".slice),k=function(e){return m(y(e),8,-1)},b=k,w=v,T=function(e){if("Function"===b(e))return w(e)},A="object"==typeof document&&document.all,_={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},E=_.all,C=_.IS_HTMLDDA?function(e){return"function"==typeof e||e===E}:function(e){return"function"==typeof e},R={},S=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),L=o,x=Function.prototype.call,I=L?x.bind(x):function(){return x.apply(x,arguments)},M={},O={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,P=U&&!O.call({1:2},1);M.f=P?function(e){var t=U(this,e);return!!t&&t.enumerable}:O;var D,N,B=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},F=i,j=k,V=Object,H=v("".split),z=F((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==j(e)?H(e,""):V(e)}:V,q=function(e){return null==e},W=q,K=TypeError,G=function(e){if(W(e))throw K("Can't call method on "+e);return e},Y=z,Q=G,X=function(e){return Y(Q(e))},$=C,J=_.all,Z=_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:$(e)||e===J}:function(e){return"object"==typeof e?null!==e:$(e)},ee={},te=ee,ne=r,re=C,ie=function(e){return re(e)?e:void 0},oe=function(e,t){return arguments.length<2?ie(te[e])||ie(ne[e]):te[e]&&te[e][t]||ne[e]&&ne[e][t]},ae=v({}.isPrototypeOf),se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=r,ue=se,ce=le.process,fe=le.Deno,he=ce&&ce.versions||fe&&fe.version,de=he&&he.v8;de&&(N=(D=de.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!N&&ue&&(!(D=ue.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=ue.match(/Chrome\/(\d+)/))&&(N=+D[1]);var pe=N,ve=pe,ge=i,ye=r.String,me=!!Object.getOwnPropertySymbols&&!ge((function(){var e=Symbol();return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})),ke=me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=oe,we=C,Te=ae,Ae=Object,_e=ke?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return we(t)&&Te(t.prototype,Ae(e))},Ee=String,Ce=function(e){try{return Ee(e)}catch(t){return"Object"}},Re=C,Se=Ce,Le=TypeError,xe=function(e){if(Re(e))return e;throw Le(Se(e)+" is not a function")},Ie=xe,Me=q,Oe=function(e,t){var n=e[t];return Me(n)?void 0:Ie(n)},Ue=I,Pe=C,De=Z,Ne=TypeError,Be={exports:{}},Fe=r,je=Object.defineProperty,Ve=function(e,t){try{je(Fe,e,{value:t,configurable:!0,writable:!0})}catch(n){Fe[e]=t}return t},He="__core-js_shared__",ze=r[He]||Ve(He,{}),qe=ze;(Be.exports=function(e,t){return qe[e]||(qe[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=Be.exports,Ke=G,Ge=Object,Ye=function(e){return Ge(Ke(e))},Qe=Ye,Xe=v({}.hasOwnProperty),$e=Object.hasOwn||function(e,t){return Xe(Qe(e),t)},Je=v,Ze=0,et=Math.random(),tt=Je(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+tt(++Ze+et,36)},rt=We,it=$e,ot=nt,at=me,st=ke,lt=r.Symbol,ut=rt("wks"),ct=st?lt.for||lt:lt&&lt.withoutSetter||ot,ft=function(e){return it(ut,e)||(ut[e]=at&&it(lt,e)?lt[e]:ct("Symbol."+e)),ut[e]},ht=I,dt=Z,pt=_e,vt=Oe,gt=function(e,t){var n,r;if("string"===t&&Pe(n=e.toString)&&!De(r=Ue(n,e)))return r;if(Pe(n=e.valueOf)&&!De(r=Ue(n,e)))return r;if("string"!==t&&Pe(n=e.toString)&&!De(r=Ue(n,e)))return r;throw Ne("Can't convert object to primitive value")},yt=TypeError,mt=ft("toPrimitive"),kt=function(e,t){if(!dt(e)||pt(e))return e;var n,r=vt(e,mt);if(r){if(void 0===t&&(t="default"),n=ht(r,e,t),!dt(n)||pt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),gt(e,t)},bt=_e,wt=function(e){var t=kt(e,"string");return bt(t)?t:t+""},Tt=Z,At=r.document,_t=Tt(At)&&Tt(At.createElement),Et=function(e){return _t?At.createElement(e):{}},Ct=Et,Rt=!S&&!i((function(){return 7!=Object.defineProperty(Ct("div"),"a",{get:function(){return 7}}).a})),St=S,Lt=I,xt=M,It=B,Mt=X,Ot=wt,Ut=$e,Pt=Rt,Dt=Object.getOwnPropertyDescriptor;R.f=St?Dt:function(e,t){if(e=Mt(e),t=Ot(t),Pt)try{return Dt(e,t)}catch(n){}if(Ut(e,t))return It(!Lt(xt.f,e,t),e[t])};var Nt=i,Bt=C,Ft=/#|\.prototype\./,jt=function(e,t){var n=Ht[Vt(e)];return n==qt||n!=zt&&(Bt(t)?Nt(t):!!t)},Vt=jt.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Ht=jt.data={},zt=jt.NATIVE="N",qt=jt.POLYFILL="P",Wt=jt,Kt=xe,Gt=o,Yt=T(T.bind),Qt=function(e,t){return Kt(e),void 0===t?e:Gt?Yt(e,t):function(){return e.apply(t,arguments)}},Xt={},$t=S&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Jt=Z,Zt=String,en=TypeError,tn=function(e){if(Jt(e))return e;throw en(Zt(e)+" is not an object")},nn=S,rn=Rt,on=$t,an=tn,sn=wt,ln=TypeError,un=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,fn="enumerable",hn="configurable",dn="writable";Xt.f=nn?on?function(e,t,n){if(an(e),t=sn(t),an(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=cn(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:hn in n?n[hn]:r[hn],enumerable:fn in n?n[fn]:r[fn],writable:!1})}return un(e,t,n)}:un:function(e,t,n){if(an(e),t=sn(t),an(n),rn)try{return un(e,t,n)}catch(r){}if("get"in n||"set"in n)throw ln("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pn=Xt,vn=B,gn=S?function(e,t,n){return pn.f(e,t,vn(1,n))}:function(e,t,n){return e[t]=n,e},yn=r,mn=c,kn=T,bn=C,wn=R.f,Tn=Wt,An=ee,_n=Qt,En=gn,Cn=$e,Rn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return mn(e,this,arguments)};return t.prototype=e.prototype,t},Sn=function(e,t){var n,r,i,o,a,s,l,u,c,f=e.target,h=e.global,d=e.stat,p=e.proto,v=h?yn:d?yn[f]:(yn[f]||{}).prototype,g=h?An:An[f]||En(An,f,{})[f],y=g.prototype;for(o in t)r=!(n=Tn(h?o:f+(d?".":"#")+o,e.forced))&&v&&Cn(v,o),s=g[o],r&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=r&&l?l:t[o],r&&typeof s==typeof a||(u=e.bind&&r?_n(a,yn):e.wrap&&r?Rn(a):p&&bn(a)?kn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&En(u,"sham",!0),En(g,o,u),p&&(Cn(An,i=f+"Prototype")||En(An,i,{}),En(An[i],o,a),e.real&&y&&(n||!y[o])&&En(y,o,a)))},Ln=k,xn=Array.isArray||function(e){return"Array"==Ln(e)},In=Math.ceil,Mn=Math.floor,On=Math.trunc||function(e){var t=+e;return(t>0?Mn:In)(t)},Un=function(e){var t=+e;return t!=t||0===t?0:On(t)},Pn=Un,Dn=Math.min,Nn=function(e){return e>0?Dn(Pn(e),9007199254740991):0},Bn=Nn,Fn=function(e){return Bn(e.length)},jn=TypeError,Vn=function(e){if(e>9007199254740991)throw jn("Maximum allowed index exceeded");return e},Hn=wt,zn=Xt,qn=B,Wn=function(e,t,n){var r=Hn(t);r in e?zn.f(e,r,qn(0,n)):e[r]=n},Kn={};Kn[ft("toStringTag")]="z";var Gn="[object z]"===String(Kn),Yn=Gn,Qn=C,Xn=k,$n=ft("toStringTag"),Jn=Object,Zn="Arguments"==Xn(function(){return arguments}()),er=Yn?Xn:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Jn(e),$n))?n:Zn?Xn(t):"Object"==(r=Xn(t))&&Qn(t.callee)?"Arguments":r},tr=C,nr=ze,rr=v(Function.toString);tr(nr.inspectSource)||(nr.inspectSource=function(e){return rr(e)});var ir=nr.inspectSource,or=v,ar=i,sr=C,lr=er,ur=ir,cr=function(){},fr=[],hr=oe("Reflect","construct"),dr=/^\s*(?:class|function)\b/,pr=or(dr.exec),vr=!dr.exec(cr),gr=function(e){if(!sr(e))return!1;try{return hr(cr,fr,e),!0}catch(t){return!1}},yr=function(e){if(!sr(e))return!1;switch(lr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vr||!!pr(dr,ur(e))}catch(t){return!0}};yr.sham=!0;var mr=!hr||ar((function(){var e;return gr(gr.call)||!gr(Object)||!gr((function(){e=!0}))||e}))?yr:gr,kr=xn,br=mr,wr=Z,Tr=ft("species"),Ar=Array,_r=function(e){var t;return kr(e)&&(t=e.constructor,(br(t)&&(t===Ar||kr(t.prototype))||wr(t)&&null===(t=t[Tr]))&&(t=void 0)),void 0===t?Ar:t},Er=function(e,t){return new(_r(e))(0===t?0:t)},Cr=i,Rr=pe,Sr=ft("species"),Lr=function(e){return Rr>=51||!Cr((function(){var t=[];return(t.constructor={})[Sr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},xr=Sn,Ir=i,Mr=xn,Or=Z,Ur=Ye,Pr=Fn,Dr=Vn,Nr=Wn,Br=Er,Fr=Lr,jr=pe,Vr=ft("isConcatSpreadable"),Hr=jr>=51||!Ir((function(){var e=[];return e[Vr]=!1,e.concat()[0]!==e})),zr=function(e){if(!Or(e))return!1;var t=e[Vr];return void 0!==t?!!t:Mr(e)};xr({target:"Array",proto:!0,arity:1,forced:!Hr||!Fr("concat")},{concat:function(e){var t,n,r,i,o,a=Ur(this),s=Br(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(zr(o=-1===t?a:arguments[t]))for(i=Pr(o),Dr(l+i),n=0;n<i;n++,l++)n in o&&Nr(s,l,o[n]);else Dr(l+1),Nr(s,l++,o);return s.length=l,s}});var qr=er,Wr=String,Kr=function(e){if("Symbol"===qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Wr(e)},Gr={},Yr=Un,Qr=Math.max,Xr=Math.min,$r=function(e,t){var n=Yr(e);return n<0?Qr(n+t,0):Xr(n,t)},Jr=X,Zr=$r,ei=Fn,ti=function(e){return function(t,n,r){var i,o=Jr(t),a=ei(o),s=Zr(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ni={includes:ti(!0),indexOf:ti(!1)},ri={},ii=$e,oi=X,ai=ni.indexOf,si=ri,li=v([].push),ui=function(e,t){var n,r=oi(e),i=0,o=[];for(n in r)!ii(si,n)&&ii(r,n)&&li(o,n);for(;t.length>i;)ii(r,n=t[i++])&&(~ai(o,n)||li(o,n));return o},ci=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fi=ui,hi=ci,di=Object.keys||function(e){return fi(e,hi)},pi=S,vi=$t,gi=Xt,yi=tn,mi=X,ki=di;Gr.f=pi&&!vi?Object.defineProperties:function(e,t){yi(e);for(var n,r=mi(t),i=ki(t),o=i.length,a=0;o>a;)gi.f(e,n=i[a++],r[n]);return e};var bi,wi=oe("document","documentElement"),Ti=nt,Ai=We("keys"),_i=function(e){return Ai[e]||(Ai[e]=Ti(e))},Ei=tn,Ci=Gr,Ri=ci,Si=ri,Li=wi,xi=Et,Ii="prototype",Mi="script",Oi=_i("IE_PROTO"),Ui=function(){},Pi=function(e){return"<"+Mi+">"+e+"</"+Mi+">"},Di=function(e){e.write(Pi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ni=function(){try{bi=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Ni="undefined"!=typeof document?document.domain&&bi?Di(bi):(t=xi("iframe"),n="java"+Mi+":",t.style.display="none",Li.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Pi("document.F=Object")),e.close(),e.F):Di(bi);for(var r=Ri.length;r--;)delete Ni[Ii][Ri[r]];return Ni()};Si[Oi]=!0;var Bi=Object.create||function(e,t){var n;return null!==e?(Ui[Ii]=Ei(e),n=new Ui,Ui[Ii]=null,n[Oi]=e):n=Ni(),void 0===t?n:Ci.f(n,t)},Fi={},ji=ui,Vi=ci.concat("length","prototype");Fi.f=Object.getOwnPropertyNames||function(e){return ji(e,Vi)};var Hi={},zi=$r,qi=Fn,Wi=Wn,Ki=Array,Gi=Math.max,Yi=function(e,t,n){for(var r=qi(e),i=zi(t,r),o=zi(void 0===n?r:n,r),a=Ki(Gi(o-i,0)),s=0;i<o;i++,s++)Wi(a,s,e[i]);return a.length=s,a},Qi=k,Xi=X,$i=Fi.f,Ji=Yi,Zi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Hi.f=function(e){return Zi&&"Window"==Qi(e)?function(e){try{return $i(e)}catch(t){return Ji(Zi)}}(e):$i(Xi(e))};var eo={};eo.f=Object.getOwnPropertySymbols;var to=gn,no=function(e,t,n,r){return r&&r.enumerable?e[t]=n:to(e,t,n),e},ro=Xt,io=function(e,t,n){return ro.f(e,t,n)},oo={},ao=ft;oo.f=ao;var so,lo,uo,co=ee,fo=$e,ho=oo,po=Xt.f,vo=function(e){var t=co.Symbol||(co.Symbol={});fo(t,e)||po(t,e,{value:ho.f(e)})},go=I,yo=oe,mo=ft,ko=no,bo=function(){var e=yo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mo("toPrimitive");t&&!t[r]&&ko(t,r,(function(e){return go(n,this)}),{arity:1})},wo=er,To=Gn?{}.toString:function(){return"[object "+wo(this)+"]"},Ao=Gn,_o=Xt.f,Eo=gn,Co=$e,Ro=To,So=ft("toStringTag"),Lo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Co(i,So)||_o(i,So,{configurable:!0,value:t}),r&&!Ao&&Eo(i,"toString",Ro)}},xo=C,Io=r.WeakMap,Mo=xo(Io)&&/native code/.test(String(Io)),Oo=r,Uo=Z,Po=gn,Do=$e,No=ze,Bo=_i,Fo=ri,jo="Object already initialized",Vo=Oo.TypeError,Ho=Oo.WeakMap;if(Mo||No.state){var zo=No.state||(No.state=new Ho);zo.get=zo.get,zo.has=zo.has,zo.set=zo.set,so=function(e,t){if(zo.has(e))throw Vo(jo);return t.facade=e,zo.set(e,t),t},lo=function(e){return zo.get(e)||{}},uo=function(e){return zo.has(e)}}else{var qo=Bo("state");Fo[qo]=!0,so=function(e,t){if(Do(e,qo))throw Vo(jo);return t.facade=e,Po(e,qo,t),t},lo=function(e){return Do(e,qo)?e[qo]:{}},uo=function(e){return Do(e,qo)}}var Wo={set:so,get:lo,has:uo,enforce:function(e){return uo(e)?lo(e):so(e,{})},getterFor:function(e){return function(t){var n;if(!Uo(t)||(n=lo(t)).type!==e)throw Vo("Incompatible receiver, "+e+" required");return n}}},Ko=Qt,Go=z,Yo=Ye,Qo=Fn,Xo=Er,$o=v([].push),Jo=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var h,d,p=Yo(l),v=Go(p),g=Ko(u,c),y=Qo(v),m=0,k=f||Xo,b=t?k(l,y):n||a?k(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(h=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:$o(b,h)}else switch(e){case 4:return!1;case 7:$o(b,h)}return o?-1:r||i?i:b}},Zo={forEach:Jo(0),map:Jo(1),filter:Jo(2),some:Jo(3),every:Jo(4),find:Jo(5),findIndex:Jo(6),filterReject:Jo(7)},ea=Sn,ta=r,na=I,ra=v,ia=S,oa=me,aa=i,sa=$e,la=ae,ua=tn,ca=X,fa=wt,ha=Kr,da=B,pa=Bi,va=di,ga=Fi,ya=Hi,ma=eo,ka=R,ba=Xt,wa=Gr,Ta=M,Aa=no,_a=io,Ea=We,Ca=ri,Ra=nt,Sa=ft,La=oo,xa=vo,Ia=bo,Ma=Lo,Oa=Wo,Ua=Zo.forEach,Pa=_i("hidden"),Da="Symbol",Na="prototype",Ba=Oa.set,Fa=Oa.getterFor(Da),ja=Object[Na],Va=ta.Symbol,Ha=Va&&Va[Na],za=ta.TypeError,qa=ta.QObject,Wa=ka.f,Ka=ba.f,Ga=ya.f,Ya=Ta.f,Qa=ra([].push),Xa=Ea("symbols"),$a=Ea("op-symbols"),Ja=Ea("wks"),Za=!qa||!qa[Na]||!qa[Na].findChild,es=ia&&aa((function(){return 7!=pa(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Wa(ja,t);r&&delete ja[t],Ka(e,t,n),r&&e!==ja&&Ka(ja,t,r)}:Ka,ts=function(e,t){var n=Xa[e]=pa(Ha);return Ba(n,{type:Da,tag:e,description:t}),ia||(n.description=t),n},ns=function(e,t,n){e===ja&&ns($a,t,n),ua(e);var r=fa(t);return ua(n),sa(Xa,r)?(n.enumerable?(sa(e,Pa)&&e[Pa][r]&&(e[Pa][r]=!1),n=pa(n,{enumerable:da(0,!1)})):(sa(e,Pa)||Ka(e,Pa,da(1,{})),e[Pa][r]=!0),es(e,r,n)):Ka(e,r,n)},rs=function(e,t){ua(e);var n=ca(t),r=va(n).concat(ss(n));return Ua(r,(function(t){ia&&!na(is,n,t)||ns(e,t,n[t])})),e},is=function(e){var t=fa(e),n=na(Ya,this,t);return!(this===ja&&sa(Xa,t)&&!sa($a,t))&&(!(n||!sa(this,t)||!sa(Xa,t)||sa(this,Pa)&&this[Pa][t])||n)},os=function(e,t){var n=ca(e),r=fa(t);if(n!==ja||!sa(Xa,r)||sa($a,r)){var i=Wa(n,r);return!i||!sa(Xa,r)||sa(n,Pa)&&n[Pa][r]||(i.enumerable=!0),i}},as=function(e){var t=Ga(ca(e)),n=[];return Ua(t,(function(e){sa(Xa,e)||sa(Ca,e)||Qa(n,e)})),n},ss=function(e){var t=e===ja,n=Ga(t?$a:ca(e)),r=[];return Ua(n,(function(e){!sa(Xa,e)||t&&!sa(ja,e)||Qa(r,Xa[e])})),r};oa||(Va=function(){if(la(Ha,this))throw za("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=Ra(e),n=function(e){this===ja&&na(n,$a,e),sa(this,Pa)&&sa(this[Pa],t)&&(this[Pa][t]=!1),es(this,t,da(1,e))};return ia&&Za&&es(ja,t,{configurable:!0,set:n}),ts(t,e)},Aa(Ha=Va[Na],"toString",(function(){return Fa(this).tag})),Aa(Va,"withoutSetter",(function(e){return ts(Ra(e),e)})),Ta.f=is,ba.f=ns,wa.f=rs,ka.f=os,ga.f=ya.f=as,ma.f=ss,La.f=function(e){return ts(Sa(e),e)},ia&&_a(Ha,"description",{configurable:!0,get:function(){return Fa(this).description}})),ea({global:!0,constructor:!0,wrap:!0,forced:!oa,sham:!oa},{Symbol:Va}),Ua(va(Ja),(function(e){xa(e)})),ea({target:Da,stat:!0,forced:!oa},{useSetter:function(){Za=!0},useSimple:function(){Za=!1}}),ea({target:"Object",stat:!0,forced:!oa,sham:!ia},{create:function(e,t){return void 0===t?pa(e):rs(pa(e),t)},defineProperty:ns,defineProperties:rs,getOwnPropertyDescriptor:os}),ea({target:"Object",stat:!0,forced:!oa},{getOwnPropertyNames:as}),Ia(),Ma(Va,Da),Ca[Pa]=!0;var ls=me&&!!Symbol.for&&!!Symbol.keyFor,us=Sn,cs=oe,fs=$e,hs=Kr,ds=We,ps=ls,vs=ds("string-to-symbol-registry"),gs=ds("symbol-to-string-registry");us({target:"Symbol",stat:!0,forced:!ps},{for:function(e){var t=hs(e);if(fs(vs,t))return vs[t];var n=cs("Symbol")(t);return vs[t]=n,gs[n]=t,n}});var ys=Sn,ms=$e,ks=_e,bs=Ce,ws=ls,Ts=We("symbol-to-string-registry");ys({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!ks(e))throw TypeError(bs(e)+" is not a symbol");if(ms(Ts,e))return Ts[e]}});var As=v([].slice),_s=xn,Es=C,Cs=k,Rs=Kr,Ss=v([].push),Ls=Sn,xs=oe,Is=c,Ms=I,Os=v,Us=i,Ps=C,Ds=_e,Ns=As,Bs=function(e){if(Es(e))return e;if(_s(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ss(n,i):"number"!=typeof i&&"Number"!=Cs(i)&&"String"!=Cs(i)||Ss(n,Rs(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(_s(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Fs=me,js=String,Vs=xs("JSON","stringify"),Hs=Os(/./.exec),zs=Os("".charAt),qs=Os("".charCodeAt),Ws=Os("".replace),Ks=Os(1..toString),Gs=/[\uD800-\uDFFF]/g,Ys=/^[\uD800-\uDBFF]$/,Qs=/^[\uDC00-\uDFFF]$/,Xs=!Fs||Us((function(){var e=xs("Symbol")();return"[null]"!=Vs([e])||"{}"!=Vs({a:e})||"{}"!=Vs(Object(e))})),$s=Us((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),Js=function(e,t){var n=Ns(arguments),r=Bs(t);if(Ps(r)||void 0!==e&&!Ds(e))return n[1]=function(e,t){if(Ps(r)&&(t=Ms(r,this,js(e),t)),!Ds(t))return t},Is(Vs,null,n)},Zs=function(e,t,n){var r=zs(n,t-1),i=zs(n,t+1);return Hs(Ys,e)&&!Hs(Qs,i)||Hs(Qs,e)&&!Hs(Ys,r)?"\\u"+Ks(qs(e,0),16):e};Vs&&Ls({target:"JSON",stat:!0,arity:3,forced:Xs||$s},{stringify:function(e,t,n){var r=Ns(arguments),i=Is(Xs?Js:Vs,null,r);return $s&&"string"==typeof i?Ws(i,Gs,Zs):i}});var el=eo,tl=Ye;Sn({target:"Object",stat:!0,forced:!me||i((function(){el.f(1)}))},{getOwnPropertySymbols:function(e){var t=el.f;return t?t(tl(e)):[]}}),vo("asyncIterator"),vo("hasInstance"),vo("isConcatSpreadable"),vo("iterator"),vo("match"),vo("matchAll"),vo("replace"),vo("search"),vo("species"),vo("split");var nl=bo;vo("toPrimitive"),nl();var rl=oe,il=Lo;vo("toStringTag"),il(rl("Symbol"),"Symbol"),vo("unscopables"),Lo(r.JSON,"JSON",!0);var ol,al,sl,ll=ee.Symbol,ul={},cl=S,fl=$e,hl=Function.prototype,dl=cl&&Object.getOwnPropertyDescriptor,pl=fl(hl,"name"),vl={EXISTS:pl,PROPER:pl&&"something"===function(){}.name,CONFIGURABLE:pl&&(!cl||cl&&dl(hl,"name").configurable)},gl=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),yl=$e,ml=C,kl=Ye,bl=gl,wl=_i("IE_PROTO"),Tl=Object,Al=Tl.prototype,_l=bl?Tl.getPrototypeOf:function(e){var t=kl(e);if(yl(t,wl))return t[wl];var n=t.constructor;return ml(n)&&t instanceof n?n.prototype:t instanceof Tl?Al:null},El=i,Cl=C,Rl=Z,Sl=Bi,Ll=_l,xl=no,Il=ft("iterator"),Ml=!1;[].keys&&("next"in(sl=[].keys())?(al=Ll(Ll(sl)))!==Object.prototype&&(ol=al):Ml=!0);var Ol=!Rl(ol)||El((function(){var e={};return ol[Il].call(e)!==e}));Cl((ol=Ol?{}:Sl(ol))[Il])||xl(ol,Il,(function(){return this}));var Ul={IteratorPrototype:ol,BUGGY_SAFARI_ITERATORS:Ml},Pl=Ul.IteratorPrototype,Dl=Bi,Nl=B,Bl=Lo,Fl=ul,jl=function(){return this},Vl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Dl(Pl,{next:Nl(+!r,n)}),Bl(e,i,!1,!0),Fl[i]=jl,e},Hl=v,zl=xe,ql=C,Wl=String,Kl=TypeError,Gl=function(e,t,n){try{return Hl(zl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},Yl=tn,Ql=function(e){if("object"==typeof e||ql(e))return e;throw Kl("Can't set "+Wl(e)+" as a prototype")},Xl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Gl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Yl(n),Ql(r),t?e(n,r):n.__proto__=r,n}}():void 0),$l=Sn,Jl=I,Zl=vl,eu=Vl,tu=_l,nu=Lo,ru=no,iu=ul,ou=Ul,au=Zl.PROPER,su=ou.BUGGY_SAFARI_ITERATORS,lu=ft("iterator"),uu="keys",cu="values",fu="entries",hu=function(){return this},du=function(e,t,n,r,i,o,a){eu(n,t,r);var s,l,u,c=function(e){if(e===i&&v)return v;if(!su&&e in d)return d[e];switch(e){case uu:case cu:case fu:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[lu]||d["@@iterator"]||i&&d[i],v=!su&&p||c(i),g="Array"==t&&d.entries||p;if(g&&(s=tu(g.call(new e)))!==Object.prototype&&s.next&&(nu(s,f,!0,!0),iu[f]=hu),au&&i==cu&&p&&p.name!==cu&&(h=!0,v=function(){return Jl(p,this)}),i)if(l={values:c(cu),keys:o?v:c(uu),entries:c(fu)},a)for(u in l)(su||h||!(u in d))&&ru(d,u,l[u]);else $l({target:t,proto:!0,forced:su||h},l);return a&&d[lu]!==v&&ru(d,lu,v,{name:i}),iu[t]=v,l},pu=function(e,t){return{value:e,done:t}},vu=X,gu=ul,yu=Wo;Xt.f;var mu=du,ku=pu,bu="Array Iterator",wu=yu.set,Tu=yu.getterFor(bu);mu(Array,"Array",(function(e,t){wu(this,{type:bu,target:vu(e),index:0,kind:t})}),(function(){var e=Tu(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,ku(void 0,!0)):ku("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),gu.Arguments=gu.Array;var Au={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},_u=r,Eu=er,Cu=gn,Ru=ul,Su=ft("toStringTag");for(var Lu in Au){var xu=_u[Lu],Iu=xu&&xu.prototype;Iu&&Eu(Iu)!==Su&&Cu(Iu,Su,Lu),Ru[Lu]=Ru.Array}var Mu=ll;vo("dispose");var Ou=Mu;vo("asyncDispose");var Uu=Sn,Pu=v,Du=oe("Symbol"),Nu=Du.keyFor,Bu=Pu(Du.prototype.valueOf);Uu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Nu(Bu(e))}catch(t){return!1}}});for(var Fu=Sn,ju=We,Vu=oe,Hu=v,zu=_e,qu=ft,Wu=Vu("Symbol"),Ku=Wu.isWellKnown,Gu=Vu("Object","getOwnPropertyNames"),Yu=Hu(Wu.prototype.valueOf),Qu=ju("wks"),Xu=0,$u=Gu(Wu),Ju=$u.length;Xu<Ju;Xu++)try{var Zu=$u[Xu];zu(Wu[Zu])&&qu(Zu)}catch(UD){}Fu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Ku&&Ku(e))return!0;try{for(var t=Yu(e),n=0,r=Gu(Qu),i=r.length;n<i;n++)if(Qu[r[n]]==t)return!0}catch(UD){}return!1}}),vo("matcher"),vo("metadataKey"),vo("observable"),vo("metadata"),vo("patternMatch"),vo("replaceAll");var ec=Ou,tc=t(ec),nc=v,rc=Un,ic=Kr,oc=G,ac=nc("".charAt),sc=nc("".charCodeAt),lc=nc("".slice),uc=function(e){return function(t,n){var r,i,o=ic(oc(t)),a=rc(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=sc(o,a))<55296||r>56319||a+1===s||(i=sc(o,a+1))<56320||i>57343?e?ac(o,a):r:e?lc(o,a,a+2):i-56320+(r-55296<<10)+65536}},cc={codeAt:uc(!1),charAt:uc(!0)},fc=cc.charAt,hc=Kr,dc=Wo,pc=du,vc=pu,gc="String Iterator",yc=dc.set,mc=dc.getterFor(gc);pc(String,"String",(function(e){yc(this,{type:gc,string:hc(e),index:0})}),(function(){var e,t=mc(this),n=t.string,r=t.index;return r>=n.length?vc(void 0,!0):(e=fc(n,r),t.index+=e.length,vc(e,!1))}));var kc=oo.f("iterator"),bc=t(kc);function wc(e){return(wc="function"==typeof tc&&"symbol"==typeof bc?function(e){return typeof e}:function(e){return e&&"function"==typeof tc&&e.constructor===tc&&e!==tc.prototype?"symbol":typeof e})(e)}var Tc={exports:{}},Ac=Sn,_c=S,Ec=Xt.f;Ac({target:"Object",stat:!0,forced:Object.defineProperty!==Ec,sham:!_c},{defineProperty:Ec});var Cc=ee.Object,Rc=Tc.exports=function(e,t,n){return Cc.defineProperty(e,t,n)};Cc.defineProperty.sham&&(Rc.sham=!0);var Sc=Tc.exports,Lc=t(Sc);Sn({target:"Object",stat:!0,sham:!S},{create:Bi});var xc=ee.Object,Ic=function(e,t){return xc.create(e,t)},Mc=t(Ic),Oc=Ye,Uc=_l,Pc=gl;Sn({target:"Object",stat:!0,forced:i((function(){Uc(1)})),sham:!Pc},{getPrototypeOf:function(e){return Uc(Oc(e))}});var Dc=ee.Object.getPrototypeOf,Nc=t(Dc),Bc=i,Fc=function(e,t){var n=[][e];return!!n&&Bc((function(){n.call(null,t||function(){return 1},1)}))},jc=Zo.forEach,Vc=Fc("forEach")?[].forEach:function(e){return jc(this,e,arguments.length>1?arguments[1]:void 0)};Sn({target:"Array",proto:!0,forced:[].forEach!=Vc},{forEach:Vc});var Hc=ee,zc=function(e){return Hc[e+"Prototype"]},qc=zc("Array").forEach,Wc=er,Kc=$e,Gc=ae,Yc=qc,Qc=Array.prototype,Xc={DOMTokenList:!0,NodeList:!0},$c=function(e){var t=e.forEach;return e===Qc||Gc(Qc,e)&&t===Qc.forEach||Kc(Xc,Wc(e))?Yc:t},Jc=t($c),Zc=S,ef=xn,tf=TypeError,nf=Object.getOwnPropertyDescriptor,rf=Zc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(UD){return UD instanceof TypeError}}()?function(e,t){if(ef(e)&&!nf(e,"length").writable)throw tf("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},of=Ye,af=Fn,sf=rf,lf=Vn;Sn({target:"Array",proto:!0,arity:1,forced:i((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(UD){return UD instanceof TypeError}}()},{push:function(e){var t=of(this),n=af(t),r=arguments.length;lf(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return sf(t,n),n}});var uf=zc("Array").push,cf=ae,ff=uf,hf=Array.prototype,df=t((function(e){var t=e.push;return e===hf||cf(hf,e)&&t===hf.push?ff:t}));Sn({target:"Object",stat:!0},{setPrototypeOf:Xl});var pf=ee.Object.setPrototypeOf,vf=t(pf),gf=oe,yf=Fi,mf=eo,kf=tn,bf=v([].concat),wf=gf("Reflect","ownKeys")||function(e){var t=yf.f(kf(e)),n=mf.f;return n?bf(t,n(e)):t},Tf=$e,Af=wf,_f=R,Ef=Xt,Cf=Z,Rf=gn,Sf=Error,Lf=v("".replace),xf=String(Sf("zxcasd").stack),If=/\n\s*at [^:]*:[^\n]*/,Mf=If.test(xf),Of=B,Uf=!i((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Of(1,7)),7!==e.stack)})),Pf=gn,Df=function(e,t){if(Mf&&"string"==typeof e&&!Sf.prepareStackTrace)for(;t--;)e=Lf(e,If,"");return e},Nf=Uf,Bf=Error.captureStackTrace,Ff=ul,jf=ft("iterator"),Vf=Array.prototype,Hf=function(e){return void 0!==e&&(Ff.Array===e||Vf[jf]===e)},zf=er,qf=Oe,Wf=q,Kf=ul,Gf=ft("iterator"),Yf=function(e){if(!Wf(e))return qf(e,Gf)||qf(e,"@@iterator")||Kf[zf(e)]},Qf=I,Xf=xe,$f=tn,Jf=Ce,Zf=Yf,eh=TypeError,th=function(e,t){var n=arguments.length<2?Zf(e):t;if(Xf(n))return $f(Qf(n,e));throw eh(Jf(e)+" is not iterable")},nh=I,rh=tn,ih=Oe,oh=function(e,t,n){var r,i;rh(e);try{if(!(r=ih(e,"return"))){if("throw"===t)throw n;return n}r=nh(r,e)}catch(UD){i=!0,r=UD}if("throw"===t)throw n;if(i)throw r;return rh(r),n},ah=Qt,sh=I,lh=tn,uh=Ce,ch=Hf,fh=Fn,hh=ae,dh=th,ph=Yf,vh=oh,gh=TypeError,yh=function(e,t){this.stopped=e,this.result=t},mh=yh.prototype,kh=function(e,t,n){var r,i,o,a,s,l,u,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=ah(t,c),g=function(e){return r&&vh(r,"normal",e),new yh(!0,e)},y=function(e){return f?(lh(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(h)r=e.iterator;else if(d)r=e;else{if(!(i=ph(e)))throw gh(uh(e)+" is not iterable");if(ch(i)){for(o=0,a=fh(e);a>o;o++)if((s=y(e[o]))&&hh(mh,s))return s;return new yh(!1)}r=dh(e,i)}for(l=h?e.next:r.next;!(u=sh(l,r)).done;){try{s=y(u.value)}catch(UD){vh(r,"throw",UD)}if("object"==typeof s&&s&&hh(mh,s))return s}return new yh(!1)},bh=Kr,wh=Sn,Th=ae,Ah=_l,_h=Xl,Eh=function(e,t,n){for(var r=Af(t),i=Ef.f,o=_f.f,a=0;a<r.length;a++){var s=r[a];Tf(e,s)||n&&Tf(n,s)||i(e,s,o(t,s))}},Ch=Bi,Rh=gn,Sh=B,Lh=function(e,t){Cf(t)&&"cause"in t&&Rf(e,"cause",t.cause)},xh=function(e,t,n,r){Nf&&(Bf?Bf(e,t):Pf(e,"stack",Df(n,r)))},Ih=kh,Mh=function(e,t){return void 0===e?arguments.length<2?"":t:bh(e)},Oh=ft("toStringTag"),Uh=Error,Ph=[].push,Dh=function(e,t){var n,r=Th(Nh,this);_h?n=_h(Uh(),r?Ah(this):Nh):(n=r?this:Ch(Nh),Rh(n,Oh,"Error")),void 0!==t&&Rh(n,"message",Mh(t)),xh(n,Dh,n.stack,1),arguments.length>2&&Lh(n,arguments[2]);var i=[];return Ih(e,Ph,{that:i}),Rh(n,"errors",i),n};_h?_h(Dh,Uh):Eh(Dh,Uh,{name:!0});var Nh=Dh.prototype=Ch(Uh.prototype,{constructor:Sh(1,Dh),message:Sh(1,""),name:Sh(1,"AggregateError")});wh({global:!0,constructor:!0,arity:2},{AggregateError:Dh});var Bh,Fh,jh,Vh,Hh="undefined"!=typeof process&&"process"==k(process),zh=oe,qh=io,Wh=S,Kh=ft("species"),Gh=function(e){var t=zh(e);Wh&&t&&!t[Kh]&&qh(t,Kh,{configurable:!0,get:function(){return this}})},Yh=ae,Qh=TypeError,Xh=function(e,t){if(Yh(t,e))return e;throw Qh("Incorrect invocation")},$h=mr,Jh=Ce,Zh=TypeError,ed=function(e){if($h(e))return e;throw Zh(Jh(e)+" is not a constructor")},td=tn,nd=ed,rd=q,id=ft("species"),od=function(e,t){var n,r=td(e).constructor;return void 0===r||rd(n=td(r)[id])?t:nd(n)},ad=TypeError,sd=function(e,t){if(e<t)throw ad("Not enough arguments");return e},ld=/(?:ipad|iphone|ipod).*applewebkit/i.test(se),ud=r,cd=c,fd=Qt,hd=C,dd=$e,pd=i,vd=wi,gd=As,yd=Et,md=sd,kd=ld,bd=Hh,wd=ud.setImmediate,Td=ud.clearImmediate,Ad=ud.process,_d=ud.Dispatch,Ed=ud.Function,Cd=ud.MessageChannel,Rd=ud.String,Sd=0,Ld={},xd="onreadystatechange";pd((function(){Bh=ud.location}));var Id=function(e){if(dd(Ld,e)){var t=Ld[e];delete Ld[e],t()}},Md=function(e){return function(){Id(e)}},Od=function(e){Id(e.data)},Ud=function(e){ud.postMessage(Rd(e),Bh.protocol+"//"+Bh.host)};wd&&Td||(wd=function(e){md(arguments.length,1);var t=hd(e)?e:Ed(e),n=gd(arguments,1);return Ld[++Sd]=function(){cd(t,void 0,n)},Fh(Sd),Sd},Td=function(e){delete Ld[e]},bd?Fh=function(e){Ad.nextTick(Md(e))}:_d&&_d.now?Fh=function(e){_d.now(Md(e))}:Cd&&!kd?(Vh=(jh=new Cd).port2,jh.port1.onmessage=Od,Fh=fd(Vh.postMessage,Vh)):ud.addEventListener&&hd(ud.postMessage)&&!ud.importScripts&&Bh&&"file:"!==Bh.protocol&&!pd(Ud)?(Fh=Ud,ud.addEventListener("message",Od,!1)):Fh=xd in yd("script")?function(e){vd.appendChild(yd("script"))[xd]=function(){vd.removeChild(this),Id(e)}}:function(e){setTimeout(Md(e),0)});var Pd={set:wd,clear:Td},Dd=function(){this.head=null,this.tail=null};Dd.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 Nd,Bd,Fd,jd,Vd,Hd=Dd,zd=/ipad|iphone|ipod/i.test(se)&&"undefined"!=typeof Pebble,qd=/web0s(?!.*chrome)/i.test(se),Wd=r,Kd=Qt,Gd=R.f,Yd=Pd.set,Qd=Hd,Xd=ld,$d=zd,Jd=qd,Zd=Hh,ep=Wd.MutationObserver||Wd.WebKitMutationObserver,tp=Wd.document,np=Wd.process,rp=Wd.Promise,ip=Gd(Wd,"queueMicrotask"),op=ip&&ip.value;if(!op){var ap=new Qd,sp=function(){var e,t;for(Zd&&(e=np.domain)&&e.exit();t=ap.get();)try{t()}catch(UD){throw ap.head&&Nd(),UD}e&&e.enter()};Xd||Zd||Jd||!ep||!tp?!$d&&rp&&rp.resolve?((jd=rp.resolve(void 0)).constructor=rp,Vd=Kd(jd.then,jd),Nd=function(){Vd(sp)}):Zd?Nd=function(){np.nextTick(sp)}:(Yd=Kd(Yd,Wd),Nd=function(){Yd(sp)}):(Bd=!0,Fd=tp.createTextNode(""),new ep(sp).observe(Fd,{characterData:!0}),Nd=function(){Fd.data=Bd=!Bd}),op=function(e){ap.head||Nd(),ap.add(e)}}var lp=op,up=function(e){try{return{error:!1,value:e()}}catch(UD){return{error:!0,value:UD}}},cp=r.Promise,fp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hp=!fp&&!Hh&&"object"==typeof window&&"object"==typeof document,dp=r,pp=cp,vp=C,gp=Wt,yp=ir,mp=ft,kp=hp,bp=fp,wp=pe,Tp=pp&&pp.prototype,Ap=mp("species"),_p=!1,Ep=vp(dp.PromiseRejectionEvent),Cp={CONSTRUCTOR:gp("Promise",(function(){var e=yp(pp),t=e!==String(pp);if(!t&&66===wp)return!0;if(!Tp.catch||!Tp.finally)return!0;if(!wp||wp<51||!/native code/.test(e)){var n=new pp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Ap]=r,!(_p=n.then((function(){}))instanceof r))return!0}return!t&&(kp||bp)&&!Ep})),REJECTION_EVENT:Ep,SUBCLASSING:_p},Rp={},Sp=xe,Lp=TypeError,xp=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Lp("Bad Promise constructor");t=e,n=r})),this.resolve=Sp(t),this.reject=Sp(n)};Rp.f=function(e){return new xp(e)};var Ip,Mp,Op=Sn,Up=Hh,Pp=r,Dp=I,Np=no,Bp=Lo,Fp=Gh,jp=xe,Vp=C,Hp=Z,zp=Xh,qp=od,Wp=Pd.set,Kp=lp,Gp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(UD){}},Yp=up,Qp=Hd,Xp=Wo,$p=cp,Jp=Cp,Zp=Rp,ev="Promise",tv=Jp.CONSTRUCTOR,nv=Jp.REJECTION_EVENT,rv=Xp.getterFor(ev),iv=Xp.set,ov=$p&&$p.prototype,av=$p,sv=ov,lv=Pp.TypeError,uv=Pp.document,cv=Pp.process,fv=Zp.f,hv=fv,dv=!!(uv&&uv.createEvent&&Pp.dispatchEvent),pv="unhandledrejection",vv=function(e){var t;return!(!Hp(e)||!Vp(t=e.then))&&t},gv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&wv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?u(lv("Promise-chain cycle")):(r=vv(n))?Dp(r,n,l,u):l(n)):u(o)}catch(UD){c&&!i&&c.exit(),u(UD)}},yv=function(e,t){e.notified||(e.notified=!0,Kp((function(){for(var n,r=e.reactions;n=r.get();)gv(n,e);e.notified=!1,t&&!e.rejection&&kv(e)})))},mv=function(e,t,n){var r,i;dv?((r=uv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Pp.dispatchEvent(r)):r={promise:t,reason:n},!nv&&(i=Pp["on"+e])?i(r):e===pv&&Gp("Unhandled promise rejection",n)},kv=function(e){Dp(Wp,Pp,(function(){var t,n=e.facade,r=e.value;if(bv(e)&&(t=Yp((function(){Up?cv.emit("unhandledRejection",r,n):mv(pv,n,r)})),e.rejection=Up||bv(e)?2:1,t.error))throw t.value}))},bv=function(e){return 1!==e.rejection&&!e.parent},wv=function(e){Dp(Wp,Pp,(function(){var t=e.facade;Up?cv.emit("rejectionHandled",t):mv("rejectionhandled",t,e.value)}))},Tv=function(e,t,n){return function(r){e(t,r,n)}},Av=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,yv(e,!0))},_v=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw lv("Promise can't be resolved itself");var r=vv(t);r?Kp((function(){var n={done:!1};try{Dp(r,t,Tv(_v,n,e),Tv(Av,n,e))}catch(UD){Av(n,UD,e)}})):(e.value=t,e.state=1,yv(e,!1))}catch(UD){Av({done:!1},UD,e)}}};tv&&(sv=(av=function(e){zp(this,sv),jp(e),Dp(Ip,this);var t=rv(this);try{e(Tv(_v,t),Tv(Av,t))}catch(UD){Av(t,UD)}}).prototype,(Ip=function(e){iv(this,{type:ev,done:!1,notified:!1,parent:!1,reactions:new Qp,rejection:!1,state:0,value:void 0})}).prototype=Np(sv,"then",(function(e,t){var n=rv(this),r=fv(qp(this,av));return n.parent=!0,r.ok=!Vp(e)||e,r.fail=Vp(t)&&t,r.domain=Up?cv.domain:void 0,0==n.state?n.reactions.add(r):Kp((function(){gv(r,n)})),r.promise})),Mp=function(){var e=new Ip,t=rv(e);this.promise=e,this.resolve=Tv(_v,t),this.reject=Tv(Av,t)},Zp.f=fv=function(e){return e===av||undefined===e?new Mp(e):hv(e)}),Op({global:!0,constructor:!0,wrap:!0,forced:tv},{Promise:av}),Bp(av,ev,!1,!0),Fp(ev);var Ev=ft("iterator"),Cv=!1;try{var Rv=0,Sv={next:function(){return{done:!!Rv++}},return:function(){Cv=!0}};Sv[Ev]=function(){return this},Array.from(Sv,(function(){throw 2}))}catch(UD){}var Lv=function(e,t){if(!t&&!Cv)return!1;var n=!1;try{var r={};r[Ev]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(UD){}return n},xv=cp,Iv=Cp.CONSTRUCTOR||!Lv((function(e){xv.all(e).then(void 0,(function(){}))})),Mv=I,Ov=xe,Uv=Rp,Pv=up,Dv=kh;Sn({target:"Promise",stat:!0,forced:Iv},{all:function(e){var t=this,n=Uv.f(t),r=n.resolve,i=n.reject,o=Pv((function(){var n=Ov(t.resolve),o=[],a=0,s=1;Dv(e,(function(e){var l=a++,u=!1;s++,Mv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Nv=Sn,Bv=Cp.CONSTRUCTOR;cp&&cp.prototype,Nv({target:"Promise",proto:!0,forced:Bv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Fv=I,jv=xe,Vv=Rp,Hv=up,zv=kh;Sn({target:"Promise",stat:!0,forced:Iv},{race:function(e){var t=this,n=Vv.f(t),r=n.reject,i=Hv((function(){var i=jv(t.resolve);zv(e,(function(e){Fv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var qv=I,Wv=Rp;Sn({target:"Promise",stat:!0,forced:Cp.CONSTRUCTOR},{reject:function(e){var t=Wv.f(this);return qv(t.reject,void 0,e),t.promise}});var Kv=tn,Gv=Z,Yv=Rp,Qv=function(e,t){if(Kv(e),Gv(t)&&t.constructor===e)return t;var n=Yv.f(e);return(0,n.resolve)(t),n.promise},Xv=Sn,$v=cp,Jv=Cp.CONSTRUCTOR,Zv=Qv,eg=oe("Promise"),tg=!Jv;Xv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Zv(tg&&this===eg?$v:this,e)}});var ng=I,rg=xe,ig=Rp,og=up,ag=kh;Sn({target:"Promise",stat:!0,forced:Iv},{allSettled:function(e){var t=this,n=ig.f(t),r=n.resolve,i=n.reject,o=og((function(){var n=rg(t.resolve),i=[],o=0,a=1;ag(e,(function(e){var s=o++,l=!1;a++,ng(n,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var sg=I,lg=xe,ug=oe,cg=Rp,fg=up,hg=kh,dg="No one promise resolved";Sn({target:"Promise",stat:!0,forced:Iv},{any:function(e){var t=this,n=ug("AggregateError"),r=cg.f(t),i=r.resolve,o=r.reject,a=fg((function(){var r=lg(t.resolve),a=[],s=0,l=1,u=!1;hg(e,(function(e){var c=s++,f=!1;l++,sg(r,t,e).then((function(e){f||u||(u=!0,i(e))}),(function(e){f||u||(f=!0,a[c]=e,--l||o(new n(a,dg)))}))})),--l||o(new n(a,dg))}));return a.error&&o(a.value),r.promise}});var pg=Sn,vg=cp,gg=i,yg=oe,mg=C,kg=od,bg=Qv,wg=vg&&vg.prototype;pg({target:"Promise",proto:!0,real:!0,forced:!!vg&&gg((function(){wg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=kg(this,yg("Promise")),n=mg(e);return this.then(n?function(n){return bg(t,e()).then((function(){return n}))}:e,n?function(n){return bg(t,e()).then((function(){throw n}))}:e)}});var Tg=ee.Promise,Ag=Rp,_g=up;Sn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Ag.f(this),n=_g(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Eg=Tg,Cg=t(Eg),Rg=Sn,Sg=xn,Lg=v([].reverse),xg=[1,2];Rg({target:"Array",proto:!0,forced:String(xg)===String(xg.reverse())},{reverse:function(){return Sg(this)&&(this.length=this.length),Lg(this)}});var Ig=zc("Array").reverse,Mg=ae,Og=Ig,Ug=Array.prototype,Pg=function(e){var t=e.reverse;return e===Ug||Mg(Ug,e)&&t===Ug.reverse?Og:t},Dg=t(Pg),Ng=Sn,Bg=xn,Fg=mr,jg=Z,Vg=$r,Hg=Fn,zg=X,qg=Wn,Wg=ft,Kg=As,Gg=Lr("slice"),Yg=Wg("species"),Qg=Array,Xg=Math.max;Ng({target:"Array",proto:!0,forced:!Gg},{slice:function(e,t){var n,r,i,o=zg(this),a=Hg(o),s=Vg(e,a),l=Vg(void 0===t?a:t,a);if(Bg(o)&&(n=o.constructor,(Fg(n)&&(n===Qg||Bg(n.prototype))||jg(n)&&null===(n=n[Yg]))&&(n=void 0),n===Qg||void 0===n))return Kg(o,s,l);for(r=new(void 0===n?Qg:n)(Xg(l-s,0)),i=0;s<l;s++,i++)s in o&&qg(r,i,o[s]);return r.length=i,r}});var $g=zc("Array").slice,Jg=ae,Zg=$g,ey=Array.prototype,ty=function(e){var t=e.slice;return e===ey||Jg(ey,e)&&t===ey.slice?Zg:t},ny=t(ty);function ry(){ry=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Lc||function(e,t,n){e[t]=n.value},i="function"==typeof tc?tc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Lc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(R){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=Mc(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(R){return{type:"throw",arg:R}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Nc&&Nc(Nc(E([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=h.prototype=Mc(v);function m(e){var t;Jc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(r,o,a,s){var l=c(e[r],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==wc(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function T(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]),df(t=this.tryEntries).call(t,n)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],Jc(e).call(e,T,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(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 vf?vf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Mc(y),e},e.awrap=function(e){return{__await:e}},m(k.prototype),l(k.prototype,a,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Cg);var a=new k(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)df(n).call(n,r);return Dg(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=E,_.prototype={constructor:_,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,Jc(t=this.tryEntries).call(t,A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+ny(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):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),f},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),A(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function iy(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(UD){return void n(UD)}s.done?t(l):Cg.resolve(l).then(r,i)}function oy(e){return function(){var t=this,n=arguments;return new Cg((function(r,i){var o=e.apply(t,n);function a(e){iy(o,r,i,a,s,"next",e)}function s(e){iy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ay(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var sy=oo.f("toPrimitive"),ly=t(sy);function uy(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[ly];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}function cy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Lc(e,uy(r.key),r)}}function fy(e,t,n){return t&&cy(e.prototype,t),n&&cy(e,n),Lc(e,"prototype",{writable:!1}),e}function hy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var dy=$e,py=I,vy=Z,gy=tn,yy=function(e){return void 0!==e&&(dy(e,"value")||dy(e,"writable"))},my=R,ky=_l;Sn({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return gy(t)===o?t[n]:(r=my.f(t,n))?yy(r)?r.value:void 0===r.get?void 0:py(r.get,o):vy(i=ky(t))?e(i,n,o):void 0}});var by=ee.Reflect.get,wy=t(by),Ty=v,Ay=xe,_y=Z,Ey=$e,Cy=As,Ry=o,Sy=Function,Ly=Ty([].concat),xy=Ty([].join),Iy={},My=Ry?Sy.bind:function(e){var t=Ay(this),n=t.prototype,r=Cy(arguments,1),i=function(){var n=Ly(r,Cy(arguments));return this instanceof i?function(e,t,n){if(!Ey(Iy,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Iy[t]=Sy("C,a","return new C("+xy(r,",")+")")}return Iy[t](e,n)}(t,n.length,n):t.apply(e,n)};return _y(n)&&(i.prototype=n),i},Oy=My;Sn({target:"Function",proto:!0,forced:Function.bind!==Oy},{bind:Oy});var Uy=zc("Function").bind,Py=ae,Dy=Uy,Ny=Function.prototype,By=function(e){var t=e.bind;return e===Ny||Py(Ny,e)&&t===Ny.bind?Dy:t},Fy=t(By),jy={exports:{}},Vy=Sn,Hy=i,zy=X,qy=R.f,Wy=S;Vy({target:"Object",stat:!0,forced:!Wy||Hy((function(){qy(1)})),sham:!Wy},{getOwnPropertyDescriptor:function(e,t){return qy(zy(e),t)}});var Ky=ee.Object,Gy=jy.exports=function(e,t){return Ky.getOwnPropertyDescriptor(e,t)};Ky.getOwnPropertyDescriptor.sham&&(Gy.sham=!0);var Yy=jy.exports,Qy=t(Yy);function Xy(e){var t;return(Xy=vf?Fy(t=Nc).call(t):function(e){return e.__proto__||Nc(e)})(e)}function $y(){var e;"undefined"!=typeof Reflect&&wy?$y=Fy(e=wy).call(e):$y=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xy(e)););return e}(e,t);if(r){var i=Qy(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return $y.apply(this,arguments)}function Jy(e,t){var n;return(Jy=vf?Fy(n=vf).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function Zy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Mc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Lc(e,"prototype",{writable:!1}),t&&Jy(e,t)}var em=Sn,tm=c,nm=My,rm=ed,im=tn,om=Z,am=Bi,sm=i,lm=oe("Reflect","construct"),um=Object.prototype,cm=[].push,fm=sm((function(){function e(){}return!(lm((function(){}),[],e)instanceof e)})),hm=!sm((function(){lm((function(){}))})),dm=fm||hm;em({target:"Reflect",stat:!0,forced:dm,sham:dm},{construct:function(e,t){rm(e),im(t);var n=arguments.length<3?e:rm(arguments[2]);if(hm&&!fm)return lm(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return tm(cm,r,t),new(tm(nm,e,r))}var i=n.prototype,o=am(om(i)?i:um),a=tm(e,o,t);return om(a)?a:o}});var pm=ee.Reflect.construct,vm=t(pm);function gm(e){var t=function(){if("undefined"==typeof Reflect||!vm)return!1;if(vm.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(vm(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xy(e);if(t){var i=Xy(this).constructor;n=vm(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hy(e)}(this,n)}}function ym(e,t,n){return(t=uy(t))in e?Lc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mm=zc("Array").concat,km=ae,bm=mm,wm=Array.prototype,Tm=t((function(e){var t=e.concat;return e===wm||km(wm,e)&&t===wm.concat?bm:t})),Am="ad_start",_m="ad_play",Em="ad_pause",Cm="ad_time_update",Rm="ad_skipped",Sm="ad_error",Lm="ad_complete",xm="ad_all_completed",Im="ima_sdk_load_start",Mm="ima_sdk_load_success",Om="ima_sdk_load_error",Um="ima_ad_loader_ready",Pm="ima_ad_manager_ready",Dm="ima_ad_complete",Nm="ima_all_ads_completed",Bm="ima_ad_error",Fm="ima_ad_loaded",jm="ima_ad_break_ready",Vm="ima_content_pause_requested",Hm="ima_content_resume_requested",zm="ima_ready_to_play",qm=Object.freeze({__proto__:null,AD_ALL_COMPLETED:xm,AD_COMPLETE:Lm,AD_ERROR:Sm,AD_PAUSE:Em,AD_PLAY:_m,AD_SKIPPED:Rm,AD_START:Am,AD_TIME_UPDATE:Cm,IMA_AD_BREAK_READY:jm,IMA_AD_COMPLETE:Dm,IMA_AD_ENDED:"ima_ad_ended",IMA_AD_ERROR:Bm,IMA_AD_LOADED:Fm,IMA_AD_LOADER_READY:Um,IMA_AD_MANAGER_READY:Pm,IMA_AD_SEEKED:"ima_ad_seeked",IMA_AD_SEEKING:"ima_ad_seeking",IMA_AD_SKIPPED:"ima_ad_skipped",IMA_ALL_ADS_COMPLETED:Nm,IMA_CONTENT_PAUSE_REQUESTED:Vm,IMA_CONTENT_RESUME_REQUESTED:Hm,IMA_READY_TO_PLAY:zm,IMA_SDK_LOAD_ERROR:Om,IMA_SDK_LOAD_START:Im,IMA_SDK_LOAD_SUCCESS:Mm}),Wm=ee,Km=c;Wm.JSON||(Wm.JSON={stringify:JSON.stringify});var Gm=function(e,t,n){return Km(Wm.JSON.stringify,null,arguments)},Ym=t(Gm),Qm=t(ec),Xm=Yf,$m=t(Xm),Jm=t(Xm),Zm=Ye,ek=di;Sn({target:"Object",stat:!0,forced:i((function(){ek(1)}))},{keys:function(e){return ek(Zm(e))}});var tk=ee.Object.keys,nk=t(tk),rk=t(tk),ik=ee.Object.getOwnPropertySymbols,ok=t(ik),ak=t(ik),sk=Zo.filter;Sn({target:"Array",proto:!0,forced:!Lr("filter")},{filter:function(e){return sk(this,e,arguments.length>1?arguments[1]:void 0)}});var lk=zc("Array").filter,uk=ae,ck=lk,fk=Array.prototype,hk=function(e){var t=e.filter;return e===fk||uk(fk,e)&&t===fk.filter?ck:t},dk=t(hk),pk=t(hk),vk=t(Yy),gk=t($c),yk=wf,mk=X,kk=R,bk=Wn;Sn({target:"Object",stat:!0,sham:!S},{getOwnPropertyDescriptors:function(e){for(var t,n,r=mk(e),i=kk.f,o=yk(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&bk(a,t,n);return a}});var wk=ee.Object.getOwnPropertyDescriptors,Tk=t(wk),Ak=t(wk),_k={exports:{}},Ek=Sn,Ck=S,Rk=Gr.f;Ek({target:"Object",stat:!0,forced:Object.defineProperties!==Rk,sham:!Ck},{defineProperties:Rk});var Sk=ee.Object,Lk=_k.exports=function(e,t){return Sk.defineProperties(e,t)};Sk.defineProperties.sham&&(Lk.sham=!0);var xk=_k.exports,Ik=t(xk),Mk=t(xk),Ok=t(Sc),Uk=t(Ic),Pk=t(Dc),Dk=t(pf),Nk=t(Eg),Bk=t(Pg),Fk=t(ty),jk=t(kc),Vk=t(By),Hk=t(pm),zk=t(by);Sn({target:"Array",stat:!0},{isArray:xn});var qk=ee.Array.isArray,Wk=t(qk),Kk=t(qk),Gk=tn,Yk=oh,Qk=Qt,Xk=I,$k=Ye,Jk=function(e,t,n,r){try{return r?t(Gk(n)[0],n[1]):t(n)}catch(UD){Yk(e,"throw",UD)}},Zk=Hf,eb=mr,tb=Fn,nb=Wn,rb=th,ib=Yf,ob=Array,ab=function(e){var t=$k(e),n=eb(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=Qk(i,r>2?arguments[2]:void 0));var a,s,l,u,c,f,h=ib(t),d=0;if(!h||this===ob&&Zk(h))for(a=tb(t),s=n?new this(a):ob(a);a>d;d++)f=o?i(t[d],d):t[d],nb(s,d,f);else for(c=(u=rb(t,h)).next,s=n?new this:[];!(l=Xk(c,u)).done;d++)f=o?Jk(u,i,[l.value,d],!0):l.value,nb(s,d,f);return s.length=d,s},sb=ab;Sn({target:"Array",stat:!0,forced:!Lv((function(e){Array.from(e)}))},{from:sb});var lb=ee.Array.from,ub=t(lb),cb=t(lb),fb=t(sy);function hb(e,t){var n=rk(e);if(ak){var r=ak(e);t&&(r=pk(r).call(r,(function(t){return vk(e,t).enumerable}))),n.push.apply(n,r)}return n}function db(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?gk(n=hb(Object(i),!0)).call(n,(function(t){wb(e,t,i[t])})):Ak?Mk(e,Ak(i)):gk(r=hb(Object(i))).call(r,(function(t){Ok(e,t,vk(i,t))}))}return e}function pb(){pb=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Ok||function(e,t,n){e[t]=n.value},i="function"==typeof Qm?Qm:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Ok(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(R){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=Uk(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(R){return{type:"throw",arg:R}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Pk&&Pk(Pk(E([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=h.prototype=Uk(v);function m(e){var t;gk(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(r,o,a,s){var l=c(e[r],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==wc(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],gk(e).call(e,T,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(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 Dk?Dk(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Uk(y),e},e.awrap=function(e){return{__await:e}},m(k.prototype),l(k.prototype,a,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Nk);var a=new k(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return Bk(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=E,_.prototype={constructor:_,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,gk(t=this.tryEntries).call(t,A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+Fk(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):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),f},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),A(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function vb(e){return(vb="function"==typeof Qm&&"symbol"==typeof jk?function(e){return typeof e}:function(e){return e&&"function"==typeof Qm&&e.constructor===Qm&&e!==Qm.prototype?"symbol":typeof e})(e)}function gb(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(UD){return void n(UD)}s.done?t(l):Nk.resolve(l).then(r,i)}function yb(e){return function(){var t=this,n=arguments;return new Nk((function(r,i){var o=e.apply(t,n);function a(e){gb(o,r,i,a,s,"next",e)}function s(e){gb(o,r,i,a,s,"throw",e)}a(void 0)}))}}function mb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ok(e,xb(r.key),r)}}function bb(e,t,n){return t&&kb(e.prototype,t),n&&kb(e,n),Ok(e,"prototype",{writable:!1}),e}function wb(e,t,n){return(t=xb(t))in e?Ok(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Uk(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ok(e,"prototype",{writable:!1}),t&&_b(e,t)}function Ab(e){var t;return(Ab=Dk?Vk(t=Pk).call(t):function(e){return e.__proto__||Pk(e)})(e)}function _b(e,t){var n;return(_b=Dk?Vk(n=Dk).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function Eb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cb(e){var t=function(){if("undefined"==typeof Reflect||!Hk)return!1;if(Hk.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Hk(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ab(e);if(t){var i=Ab(this).constructor;n=Hk(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Eb(e)}(this,n)}}function Rb(){var e;"undefined"!=typeof Reflect&&zk?Rb=Vk(e=zk).call(e):Rb=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ab(e)););return e}(e,t);if(r){var i=vk(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return Rb.apply(this,arguments)}function Sb(e,t){return function(e){if(Kk(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Qm&&Jm(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){var n;if(!e)return;if("string"==typeof e)return Lb(e,t);var r=Fk(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return cb(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lb(e,t)}(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.")}()}function Lb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xb(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[fb];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var Ib=Sn,Mb=ni.indexOf,Ob=Fc,Ub=T([].indexOf),Pb=!!Ub&&1/Ub([1],1,-0)<0;Ib({target:"Array",proto:!0,forced:Pb||!Ob("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Pb?Ub(this,e,t)||0:Mb(this,e,t)}});var Db=zc("Array").indexOf,Nb=ae,Bb=Db,Fb=Array.prototype,jb=t((function(e){var t=e.indexOf;return e===Fb||Nb(Fb,e)&&t===Fb.indexOf?Bb:t})),Vb=Sn,Hb=Zo.find,zb="find",qb=!0;zb in[]&&Array(1)[zb]((function(){qb=!1})),Vb({target:"Array",proto:!0,forced:qb},{find:function(e){return Hb(this,e,arguments.length>1?arguments[1]:void 0)}});var Wb=zc("Array").find,Kb=ae,Gb=Wb,Yb=Array.prototype,Qb=t((function(e){var t=e.find;return e===Yb||Kb(Yb,e)&&t===Yb.find?Gb:t})),Xb=Ce,$b=TypeError,Jb=function(e,t){if(!delete e[t])throw $b("Cannot delete property "+Xb(t)+" of "+Xb(e))},Zb=Sn,ew=Ye,tw=$r,nw=Un,rw=Fn,iw=rf,ow=Vn,aw=Er,sw=Wn,lw=Jb,uw=Lr("splice"),cw=Math.max,fw=Math.min;Zb({target:"Array",proto:!0,forced:!uw},{splice:function(e,t){var n,r,i,o,a,s,l=ew(this),u=rw(l),c=tw(e,u),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=u-c):(n=f-2,r=fw(cw(nw(t),0),u-c)),ow(u+n-r),i=aw(l,r),o=0;o<r;o++)(a=c+o)in l&&sw(i,o,l[a]);if(i.length=r,n<r){for(o=c;o<u-r;o++)s=o+n,(a=o+r)in l?l[s]=l[a]:lw(l,s);for(o=u;o>u-r+n;o--)lw(l,o-1)}else if(n>r)for(o=u-r;o>c;o--)s=o+n-1,(a=o+r-1)in l?l[s]=l[a]:lw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return iw(l,u-r+n),i}});var hw=zc("Array").splice,dw=ae,pw=hw,vw=Array.prototype,gw=t((function(e){var t=e.splice;return e===vw||dw(vw,e)&&t===vw.splice?pw:t})),yw="\t\n\v\f\r                 \u2028\u2029\ufeff",mw=G,kw=Kr,bw=yw,ww=v("".replace),Tw=RegExp("^["+bw+"]+"),Aw=RegExp("(^|[^"+bw+"])["+bw+"]+$"),_w=function(e){return function(t){var n=kw(mw(t));return 1&e&&(n=ww(n,Tw,"")),2&e&&(n=ww(n,Aw,"$1")),n}},Ew={start:_w(1),end:_w(2),trim:_w(3)},Cw=r,Rw=i,Sw=v,Lw=Kr,xw=Ew.trim,Iw=yw,Mw=Cw.parseInt,Ow=Cw.Symbol,Uw=Ow&&Ow.iterator,Pw=/^[+-]?0x/i,Dw=Sw(Pw.exec),Nw=8!==Mw(Iw+"08")||22!==Mw(Iw+"0x16")||Uw&&!Rw((function(){Mw(Object(Uw))}))?function(e,t){var n=xw(Lw(e));return Mw(n,t>>>0||(Dw(Pw,n)?16:10))}:Mw;Sn({global:!0,forced:parseInt!=Nw},{parseInt:Nw});var Bw=t(ee.parseInt),Fw=Zo.map;Sn({target:"Array",proto:!0,forced:!Lr("map")},{map:function(e){return Fw(this,e,arguments.length>1?arguments[1]:void 0)}});var jw=zc("Array").map,Vw=ae,Hw=jw,zw=Array.prototype,qw=t((function(e){var t=e.map;return e===zw||Vw(zw,e)&&t===zw.map?Hw:t})),Ww=S,Kw=v,Gw=I,Yw=i,Qw=di,Xw=eo,$w=M,Jw=Ye,Zw=z,eT=Object.assign,tT=Object.defineProperty,nT=Kw([].concat),rT=!eT||Yw((function(){if(Ww&&1!==eT({b:1},eT(tT({},"a",{enumerable:!0,get:function(){tT(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=eT({},e)[n]||Qw(eT({},t)).join("")!=r}))?function(e,t){for(var n=Jw(e),r=arguments.length,i=1,o=Xw.f,a=$w.f;r>i;)for(var s,l=Zw(arguments[i++]),u=o?nT(Qw(l),o(l)):Qw(l),c=u.length,f=0;c>f;)s=u[f++],Ww&&!Gw(a,l,s)||(n[s]=l[s]);return n}:eT,iT=rT;Sn({target:"Object",stat:!0,arity:2,forced:Object.assign!==iT},{assign:iT});var oT=t(ee.Object.assign);function aT(e,t){var n=rk(e);if(ak){var r=ak(e);t&&(r=pk(r).call(r,(function(t){return vk(e,t).enumerable}))),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?gk(n=aT(Object(i),!0)).call(n,(function(t){hT(e,t,i[t])})):Ak?Mk(e,Ak(i)):gk(r=aT(Object(i))).call(r,(function(t){Ok(e,t,vk(i,t))}))}return e}function lT(e){return(lT="function"==typeof Qm&&"symbol"==typeof jk?function(e){return typeof e}:function(e){return e&&"function"==typeof Qm&&e.constructor===Qm&&e!==Qm.prototype?"symbol":typeof e})(e)}function uT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ok(e,wT(r.key),r)}}function fT(e,t,n){return t&&cT(e.prototype,t),n&&cT(e,n),Ok(e,"prototype",{writable:!1}),e}function hT(e,t,n){return(t=wT(t))in e?Ok(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dT(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Uk(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ok(e,"prototype",{writable:!1}),t&&vT(e,t)}function pT(e){var t;return(pT=Dk?Vk(t=Pk).call(t):function(e){return e.__proto__||Pk(e)})(e)}function vT(e,t){var n;return(vT=Dk?Vk(n=Dk).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function gT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yT(e){var t=function(){if("undefined"==typeof Reflect||!Hk)return!1;if(Hk.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Hk(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pT(e);if(t){var i=pT(this).constructor;n=Hk(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gT(e)}(this,n)}}function mT(){var e;"undefined"!=typeof Reflect&&zk?mT=Vk(e=zk).call(e):mT=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pT(e)););return e}(e,t);if(r){var i=vk(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return mT.apply(this,arguments)}function kT(e){return function(e){if(Kk(e))return bT(e)}(e)||function(e){if(void 0!==Qm&&null!=Jm(e)||null!=e["@@iterator"])return cb(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return bT(e,t);var r=Fk(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return cb(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bT(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 bT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wT(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[fb];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var TT={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Uk&&(r.prototype=Uk(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?Fk(r).call(r,1):r);return ak?Tm(i).call(i,ak(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(f-1);u<f;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(f-1);h<f;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(TT);var AT=TT.exports,_T=Zo.some;Sn({target:"Array",proto:!0,forced:!Fc("some")},{some:function(e){return _T(this,e,arguments.length>1?arguments[1]:void 0)}});var ET=zc("Array").some,CT=ae,RT=ET,ST=Array.prototype,LT=t((function(e){var t=e.some;return e===ST||CT(ST,e)&&t===ST.some?RT:t})),xT=Un,IT=Kr,MT=G,OT=RangeError,UT=v,PT=Nn,DT=Kr,NT=G,BT=UT((function(e){var t=IT(MT(this)),n="",r=xT(e);if(r<0||r==1/0)throw OT("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n})),FT=UT("".slice),jT=Math.ceil,VT=function(e){return function(t,n,r){var i,o,a=DT(NT(t)),s=PT(n),l=a.length,u=void 0===r?" ":DT(r);return s<=l||""==u?a:((o=BT(u,jT((i=s-l)/u.length))).length>i&&(o=FT(o,0,i)),e?a+o:o+a)}},HT={start:VT(!1),end:VT(!0)},zT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(se),qT=HT.start;Sn({target:"String",proto:!0,forced:zT},{padStart:function(e){return qT(this,e,arguments.length>1?arguments[1]:void 0)}});var WT,KT=zc("String").padStart,GT=ae,YT=KT,QT=String.prototype,XT=t((function(e){var t=e.padStart;return"string"==typeof e||e===QT||GT(QT,e)&&t===QT.padStart?YT:t})),$T="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,JT=r,ZT=c,eA=C,tA=$T,nA=se,rA=As,iA=sd,oA=JT.Function,aA=/MSIE .\./.test(nA)||tA&&((WT=JT.Bun.version.split(".")).length<3||0==WT[0]&&(WT[1]<3||3==WT[1]&&0==WT[2])),sA=function(e,t){var n=t?2:1;return aA?function(r,i){var o=iA(arguments.length,1)>n,a=eA(r)?r:oA(r),s=o?rA(arguments,n):[],l=o?function(){ZT(a,this,s)}:a;return t?e(l,i):e(l)}:e},lA=Sn,uA=r,cA=sA(uA.setInterval,!0);lA({global:!0,bind:!0,forced:uA.setInterval!==cA},{setInterval:cA});var fA=Sn,hA=r,dA=sA(hA.setTimeout,!0);fA({global:!0,bind:!0,forced:hA.setTimeout!==dA},{setTimeout:dA});var pA=t(ee.setInterval),vA=t(ee.setTimeout),gA=Zo.every;Sn({target:"Array",proto:!0,forced:!Fc("every")},{every:function(e){return gA(this,e,arguments.length>1?arguments[1]:void 0)}});var yA=zc("Array").every,mA=ae,kA=yA,bA=Array.prototype,wA=t((function(e){var t=e.every;return e===bA||mA(bA,e)&&t===bA.every?kA:t})),TA=r,AA=i,_A=Kr,EA=Ew.trim,CA=yw,RA=v("".charAt),SA=TA.parseFloat,LA=TA.Symbol,xA=LA&&LA.iterator,IA=1/SA(CA+"-0")!=-1/0||xA&&!AA((function(){SA(Object(xA))}))?function(e){var t=EA(_A(e)),n=SA(t);return 0===n&&"-"==RA(t,0)?-0:n}:SA;Sn({global:!0,forced:parseFloat!=IA},{parseFloat:IA});var MA=t(ee.parseFloat),OA=vl.PROPER,UA=i,PA=yw,DA=Ew.trim;Sn({target:"String",proto:!0,forced:function(e){return UA((function(){return!!PA[e]()||"​…᠎"!=="​…᠎"[e]()||OA&&PA[e].name!==e}))}("trim")},{trim:function(){return DA(this)}});var NA=zc("String").trim,BA=ae,FA=NA,jA=String.prototype,VA=t((function(e){var t=e.trim;return"string"==typeof e||e===jA||BA(jA,e)&&t===jA.trim?FA:t})),HA=Yi,zA=Math.floor,qA=function(e,t){var n=e.length,r=zA(n/2);return n<8?WA(e,t):KA(e,qA(HA(e,0,r),t),qA(HA(e,r),t),t)},WA=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},KA=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},GA=qA,YA=se.match(/firefox\/(\d+)/i),QA=!!YA&&+YA[1],XA=/MSIE|Trident/.test(se),$A=se.match(/AppleWebKit\/(\d+)\./),JA=!!$A&&+$A[1],ZA=Sn,e_=v,t_=xe,n_=Ye,r_=Fn,i_=Jb,o_=Kr,a_=i,s_=GA,l_=Fc,u_=QA,c_=XA,f_=pe,h_=JA,d_=[],p_=e_(d_.sort),v_=e_(d_.push),g_=a_((function(){d_.sort(void 0)})),y_=a_((function(){d_.sort(null)})),m_=l_("sort"),k_=!a_((function(){if(f_)return f_<70;if(!(u_&&u_>3)){if(c_)return!0;if(h_)return h_<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)d_.push({k:t+r,v:n})}for(d_.sort((function(e,t){return t.v-e.v})),r=0;r<d_.length;r++)t=d_[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));ZA({target:"Array",proto:!0,forced:g_||!y_||!m_||!k_},{sort:function(e){void 0!==e&&t_(e);var t=n_(this);if(k_)return void 0===e?p_(t):p_(t,e);var n,r,i=[],o=r_(t);for(r=0;r<o;r++)r in t&&v_(i,t[r]);for(s_(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:o_(t)>o_(n)?1:-1}}(e)),n=r_(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)i_(t,r++);return t}});var b_=zc("Array").sort,w_=ae,T_=b_,A_=Array.prototype,__=t((function(e){var t=e.sort;return e===A_||w_(A_,e)&&t===A_.sort?T_:t})),E_=Sn,C_=Date,R_=v(C_.prototype.getTime);E_({target:"Date",stat:!0},{now:function(){return R_(new C_)}});var S_,L_=t(ee.Date.now),x_="undefined"!=typeof window&&window.location&&jb(S_=window.location.href).call(S_,"xgplayerdebugger=1")>-1,I_="color: #525252; background-color: #90ee90;",M_="color: #525252; background-color: red;",O_="color: #525252; background-color: yellow; ",U_="%c[xgplayer]",P_={config:{debug:x_?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Tm(t=[U_,I_,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Tm(t=[U_,O_,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,Tm(t=[U_,M_,e]).call(t,o))}}},D_=function(){function e(t){uT(this,e),this.bufferedList=t}return fT(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}(),N_={};N_.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=n,gk(e=rk(r)).call(e,(function(e){var n=e,i=r[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(n,i):o.setAttribute(n,i)})),o},N_.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var i=r.children;if(r=null,i.length>0){var o;if(i=i[0],n&&N_.addClass(i,n),t)gk(o=rk(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return P_.logError("util.createDomFromHtml",a),null}},N_.hasClass=function(e,t){if(!e||!t)return!1;try{return LT(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(r){var n=e.className&&"object"===lT(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},N_.addClass=function(e,t){if(e&&t)try{var n;gk(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.add(t)}))}catch(r){N_.hasClass(e,t)||(e.className&&"object"===lT(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},N_.removeClass=function(e,t){if(e&&t)try{var n;gk(n=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(t){t&&e.classList.remove(t)}))}catch(i){var r;if(N_.hasClass(e,t))gk(r=t.split(/\s+/g)).call(r,(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===lT(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},N_.toggleClass=function(e,t){var n;e&&gk(n=t.split(/\s+/g)).call(n,(function(t){N_.hasClass(e,t)?N_.removeClass(e,t):N_.addClass(e,t)}))},N_.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===N_.typeOf(e[n]))t.push(e[n]);else if("Object"===N_.typeOf(e[n])){var r;qw(r=rk(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},N_.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(r){P_.logError("util.findDom",r),0===jb(n).call(n,"#")&&(e=t.getElementById(Fk(n).call(n,1)))}return e},N_.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},N_.padStart=function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},N_.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=XT(N_).call(N_,Math.floor(e/3600),2,0),n=XT(N_).call(N_,Math.floor((e-3600*t)/60),2,0),r=XT(N_).call(N_,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},N_.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},N_.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},N_.deepCopy=function(e,t){var n;if("Object"===N_.typeOf(t)&&"Object"===N_.typeOf(e))return gk(n=rk(t)).call(n,(function(n){if("Object"!==N_.typeOf(t[n])||t[n]instanceof Node)if("Array"===N_.typeOf(t[n])){var r;e[n]="Array"===N_.typeOf(e[n])?Tm(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:N_.deepCopy(e[n],t[n])})),e},N_.deepMerge=function(e,t){var n;return qw(n=rk(t)).call(n,(function(n){var r;"Array"===N_.typeOf(t[n])&&"Array"===N_.typeOf(e[n])?"Array"===N_.typeOf(e[n])&&(r=e[n]).push.apply(r,kT(t[n])):N_.typeOf(e[n])!==N_.typeOf(t[n])||null===e[n]||"Object"!==N_.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):N_.deepMerge(e[n],t[n])})),e},N_.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},N_.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return gk(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},N_.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=pA(Vk(n).call(n,e),r))},N_.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},N_.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=vA((function(){t(),N_.clearTimeout(e,r)}),n);return e._timers.push(r),r},N_.clearTimeout=function(e,t){var n=e._timers;if("Array"===N_.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){gw(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},N_.clearAllTimers=function(e){var t=e._timers;"Array"===N_.typeOf(t)&&(qw(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},N_.createImgBtn=function(e,t,n,r){var i,o,a,s,l,u,c,f,h,d,p,v,g=N_.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(g.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(wA(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(jb(n).call(n,e)>-1&&jb(r).call(r,e)>-1)||(c=MA(VA(t=Fk(n).call(n,0,jb(n).call(n,e))).call(t)),f=MA(VA(i=Fk(r).call(r,0,jb(r).call(r,e))).call(i)),h=e,!1)})),g.style.width=Tm(o="".concat(c)).call(o,h),g.style.height=Tm(a="".concat(f)).call(a,h),g.style.backgroundSize=Tm(s=Tm(l=Tm(u="".concat(c)).call(u,h," ")).call(l,f)).call(s,h),g.style.margin="start"===e?Tm(d=Tm(p=Tm(v="-".concat(f/2)).call(v,h," auto auto -")).call(p,c/2)).call(d,h):"auto 5px auto 5px");return g},N_.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Bw(e,16))})),Tm(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},N_.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},N_.checkIsFunction=function(e){return e&&"function"==typeof e},N_.checkIsObject=function(e){return null!==e&&"object"===lT(e)},N_.hide=function(e){e.style.display="none"},N_.show=function(e,t){e.style.display=t||"block"},N_.isUndefined=function(e){if(null==e)return!0},N_.isNotNull=function(e){return!(null==e)},N_.setStyleFromCsstext=function(e,t){if(t)if("String"===N_.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");qw(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;qw(r=rk(t)).call(r,(function(n){e.style[n]=t[n]}))}},N_.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return qw(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(jb(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",""),qw(t=rk(a)).call(t,(function(t){e.style[t]=a[t]})),o},N_.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return qw(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},N_.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},N_.stopPropagation=function(e){e&&e.stopPropagation()},N_.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},N_.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},N_.checkTouchSupport=function(){return"ontouchstart"in window},N_.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});__(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<t?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new D_(i)},N_.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}},N_.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},N_.getHostFromUrl=function(e){if("String"!==N_.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},N_.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},N_.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},N_.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},N_.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Bw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Bw(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)}))},N_.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},N_.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},N_.createPositionBar=function(e,t){var n=N_.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},N_.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(t.scale||1),translate:Tm(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=rk(r);return gk(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Tm(t="".concat(e,"(")).call(t,r[e],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},N_.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},N_.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},N_.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<t.length?n:N_.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[r],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&r>=i-1?s:-1},N_.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var B_=/(Android)\s([\d.]+)/,F_=/(Version)\/([\d.]+)/,j_=["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","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],V_={get device(){return V_.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Tm(e=[]).call(e,pk(t=rk(r)).call(t,(function(e){return r[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?F_:B_)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Bw(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&qw(j_).call(j_,(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(UD){return this._logger.error(e,UD),!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 Nk.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Nk.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Nk.resolve(t)}}},H_="play",z_="ended",q_="pause",W_="error",K_="seeked",G_="timeupdate",Y_="durationchange",Q_="volumechange",X_="emptied",$_="autoplay_started",J_="video_resize";function Z_(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Tm(r=[e]).call(r,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,Tm(t=[e]).call(t,i))})):n.call.apply(n,Tm(s=[e]).call(s,o)))}function eE(e,t){var n,r=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),Vk(n=function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,Tm(a=[this]).call(a,Fk(Array.prototype).call(arguments)))}catch(v){var l,u;throw v.message=Tm(l=Tm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,f=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(e.__hooks&&Kk(e.__hooks[t])){var a,s=e.__hooks[t],l=-1,u=function e(t,n,r){for(var i,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return r.call.apply(r,Tm(o=[t,t]).call(o,u));var f,h=s[l],d=h.call.apply(h,Tm(i=[t,t]).call(i,u));return d&&d.then?d.then((function(i){var o;return!1===i?null:e.apply(void 0,Tm(o=[t,n,r]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,Tm(f=[t,n,r]).call(f,u)):void 0};return u.apply(void 0,Tm(a=[e,t,n]).call(a,i))}var c;return n.call.apply(n,Tm(c=[e,e]).call(c,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var n;!1!==e&&Z_.apply(void 0,Tm(n=[o,t,r.next]).call(n,kT(i)))})).catch((function(e){throw e}));else Z_.apply(void 0,Tm(c=[this,t,r.next]).call(c,Fk(Array.prototype).call(arguments)));else if(void 0===f){var h;Z_.apply(void 0,Tm(h=[this,t,r.next]).call(h,Fk(Array.prototype).call(arguments)))}}catch(v){var d,p;throw v.message=Tm(d=Tm(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,v.message),v}else Z_.apply(void 0,Tm(n=[this,t,r.next]).call(n,Fk(Array.prototype).call(arguments)))}).call(n,this)}function tE(e,t){var n=this.__hooks;if(!n||!Kk(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function nE(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Kk(n[e])||(n[e]=[]),-1===tE.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function rE(e,t){var n=this.__hooks;if(n){if(Kk(n[e])){var r=n[e],i=tE.call(this,e,t);-1!==i&&gw(r).call(r,i,1)}delete n[e]}}function iE(e,t){var n;P_.logError(Tm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var oE=function(){function e(t){uT(this,e),N_.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&qw(t).call(t,(function(t){e.__hooks[t]=null})),Ok(e,"hooks",{get:function(){var t;return e.__hooks&&qw(t=rk(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return fT(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=N_.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)):Kk(e)&&gk(e).call(e,(function(e){n.__events[e]=t,n.player.on(e,t)})):iE(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)):Kk(e)&&gk(e).call(e,(function(r){n.__onceEvents[r]=t,n.player.once(e,t)})):iE(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)):Kk(e)&&gk(e).call(e,(function(r){delete n.__events[e],n.player.off(r,t)})):iE(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;gk(e=["__events","__onceEvents"]).call(e,(function(e){var n;gk(n=rk(t[e])).call(n,(function(n){t[e][n]&&t.off(n,t[e][n]),n&&delete t[e][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,Tm(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=sT(sT({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return eE.call.apply(eE,Tm(n=[this]).call(n,Fk(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return nE.call.apply(nE,Tm(n=[this]).call(n,Fk(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return rE.call.apply(rE,Tm(n=[this]).call(n,Fk(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,r=this.pluginName;this.offAll(),N_.clearAllTimers(this),N_.checkIsFunction(this.destroy)&&this.destroy(),qw(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Ok(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&Ok(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var aE=Element.prototype;aE.matches=aE.matchesSelector||aE.mozMatchesSelector||aE.msMatchesSelector||aE.oMatchesSelector||aE.webkitMatchesSelector}var sE=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function lE(e,t,n,r,i){var o=uE.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function uE(e,t,n,r){return function(n){n.delegateTarget=sE(n.target,t),n.delegateTarget&&r.call(e,n)}}var cE=function(e,t,n,r,i){return"function"==typeof e.addEventListener?lE.apply(null,arguments):"function"==typeof n?Vk(lE).call(lE,null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),qw(Array.prototype).call(e,(function(e){return lE(e,t,n,r,i)})))},fE=t(cE),hE={CONTROLS:"controls",ROOT:"root"},dE={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"},pE="xg-icon-disable";function vE(e){return!!e&&(jb(e)&&/^(?:http|data:|\/)/.test(e))}function gE(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(e instanceof window.Element)return N_.addClass(e,i),qw(r=rk(o)).call(r,(function(t){e.setAttribute(t,o[t])})),e;if(vE(e)||vE(e.url))return o.src=vE(e)?e:e.url||"",s=N_.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(N_.addClass(s,i),qw(l=rk(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(P_.logWarn(Tm(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 P_.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?N_.createDomFromHtml(e,o,i):(P_.logWarn(Tm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function yE(e,t){var n,r=t.config.icons||t.playerConfig.icons;qw(n=rk(e)).call(n,(function(n){var i=e[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(e,t){var n;return"object"===lT(e)&&e.class&&"string"==typeof e.class?Tm(n="".concat(t," ")).call(n,e.class):t}(r[n],o),a=function(e,t){var n;return"object"===lT(e)&&e.attr&&"object"===lT(e.attr)&&qw(n=rk(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(r[n],a),s=gE(r[n],n,o,a,t.pluginName)),!s&&i&&(s=gE(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[n]=s}))}var mE=function(e){dT(n,e);var t=yT(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return uT(this,n),(e=t.call(this,r)).__delegates=[],e}return fT(n,[{key:"__init",value:function(e){if(mT(pT(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,r=null;this.icons={},this.root=null,this.parent=null,yE(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,qw(a=rk(i=s)).call(a,(function(e){Ok(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:i[e]&&i[e][t]||""}})}));var l="";try{l=this.render()}catch(h){var u;throw P_.logError("Plugin:".concat(this.pluginName,":render"),h),new Error(Tm(u="Plugin:".concat(this.pluginName,":render:")).call(u,h.message))}if(l)(r=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=N_.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(r)}this.root=r,this.parent=t;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),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"===lT(n))if(rk(n).length>0)qw(t=rk(n)).call(t,(function(t){var r,i,o=t,a=n[o],s={root:e.root};"function"==typeof a?(r=e.config[o]||{},i=a):"object"===lT(a)&&"function"==typeof a.plugin&&(r=a.options?N_.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),e.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r<t.children.length;r++)t.children[r].children.length>0?e(t.children[r],n):n(t.children[r])}(t,(function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=n[t]||r[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,N_.addClass(Qb(this).call(this,".xgplayer-icon"),pE)}},{key:"enable",value:function(){this.config.disable=!1,N_.removeClass(Qb(this).call(this,".xgplayer-icon"),pE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var i=mT(pT(n.prototype),"registerPlugin",this).call(this,e,t,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,r){var i=this;if(arguments.length<3&&"function"==typeof t)Kk(e)?gk(e).call(e,(function(e){i.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,r);this.__delegates=Tm(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Kk(e)?gk(e).call(e,(function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var r,i=Tm(r="".concat(e,"_")).call(r,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),gw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,r=this;if(this.root)return"String"===N_.typeOf(e)?this.root.style[e]=t:void("Object"===N_.typeOf(e)&&qw(n=rk(e)).call(n,(function(t){r.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,r=this;if(this.root)return"String"===N_.typeOf(e)?this.root.setAttribute(e,t):void("Object"===N_.typeOf(e)&&qw(n=rk(e)).call(n,(function(t){r.root.setAttribute(t,e[t])})))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?Qb(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return P_.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,r,i=this,o=this.player;(qw(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(qw(r=this._children).call(r,(function(e){o.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),mT(pT(n.prototype),"__destroy",this).call(this),this.icons={},qw(t=["root","parent"]).call(t,(function(e){i[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,i=Number(n),o=e instanceof window.Node;if(r){for(var a=0,s=null,l="";a<r;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=i){l="beforebegin";break}u<i&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof r)if(Kk(n))gk(n).call(n,(function(n){var a,s=fE(e,t,n,r,i);s.key=Tm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=fE(e,t,n,r,i);s.key=Tm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return hE}},{key:"POSITIONS",get:function(){return dE}}]),n}(oE),kE="xgplayer-is-enter",bE="xgplayer-pause",wE="xgplayer-playing",TE="xgplayer-ended",AE="xgplayer-isloading",_E="xgplayer-is-error",EE="xgplayer-replay",CE="xgplayer-nostart",RE="not-allow-autoplay",SE=6;function LE(){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 xE(){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}function IE(e,t,n){try{var r,i;return Tm(r=Tm(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,e.i18nKeys[t],'">\n ')).call(r,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var ME=Sn,OE=Zo.findIndex,UE="findIndex",PE=!0;UE in[]&&Array(1)[UE]((function(){PE=!1})),ME({target:"Array",proto:!0,forced:PE},{findIndex:function(e){return OE(this,e,arguments.length>1?arguments[1]:void 0)}});var DE=zc("Array").findIndex,NE=ae,BE=DE,FE=Array.prototype,jE=t((function(e){var t=e.findIndex;return e===FE||NE(FE,e)&&t===FE.findIndex?BE:t})),VE=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],HE=function(){function e(t){uT(this,e),this.fragments=t.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=t.actionCallback,this.fragConfig={fragFocusClass:t.fragFocusClass||"inner-focus-point",fragAutoFocus:!!t.fragAutoFocus,fragClass:t.fragClass||""},this.style=t.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return fT(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var n=0,r=this.fragments;this.fragments=qw(r).call(r,(function(e){return e.start=Bw(n,10),e.end=Bw(n+e.percent*t.duration,10),e.duration=Bw(e.percent*t.duration,10),n+=e.percent*t.duration,e}))}},{key:"updateProgress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=t.newIndex,o=t.curIndex,a=t.millisecond;i!==o&&qw(n).call(n,(function(t,n){n<i?t[e].style.width="100%":n>i&&(t[e].style.width=0)}));var s=r[i],l=0===a?0:(a-s.start)/s.duration;n[i][e].style.width=l<0?0:"".concat(100*l,"%")}}},{key:"updateFocus",value:function(e){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(e){var t=jE(this).call(this,1e3*e.currentTime,this.focusIndex);if(t>=0&&t!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(t);var n={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||Bw(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(Bw(1e3*t,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==N_.typeOf(e.played)){var i=jE(this).call(this,1e3*e.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:Bw(1e3*e.played,10)}),this.playedIndex=i}if("Undefined"!==N_.typeOf(e.cached)){var o=jE(this).call(this,1e3*e.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:Bw(1e3*e.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(e,t){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(t>-1&&t<n.length&&e>n[t].start&&e<n[t].end)return t;if(e>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(e>n[r].start&&e<=n[r].end){t=r;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)if(N_.hasClass(e[t],this.fragConfig.fragFocusClass))return{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"findFragment",value:function(e){var t=this.root.children;return e<0||e>=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)N_.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return N_.addClass(t[e],this.fragConfig.fragFocusClass),{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(e){var t,n=this;if(gk(t=rk(this.fragConfig)).call(t,(function(t){void 0!==e[t]&&(n.fragConfig[t]=e[t])})),e.fragments){if(this.fragments=0===e.fragments.length?[{percent:1}]:e.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var r=this.root.children;r.length>0;)this.root.removeChild(r[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=N_.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=qw(n=this.fragments).call(n,(function(n){var r,a,s=N_.createDom("xg-inner","",{style:t?Tm(r="background:".concat(t,"; flex: ")).call(r,n.percent):"flex: ".concat(n.percent)},Tm(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,i));return e.root.appendChild(s),gk(VE).call(VE,(function(t){s.appendChild(N_.createDom(t.tag,"",{style:t.styleKey?"background: ".concat(e.style[t.styleKey],"; width:0;"):"width:0;"},t.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),e}(),zE={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},qE=function(e){dT(n,e);var t=yT(n);function n(e){var r;return uT(this,n),hT(gT(r=t.call(this,e)),"onMoveOnly",(function(e,t){var n=gT(r),i=n.pos,o=n.config,a=n.player,s=t;if(e){N_.event(e);var l=N_.getEventPos(e,a.zoom),u=90===a.rotateDeg?l.clientY:l.clientX;if(i.moving&&Math.abs(i.x-u)<o.miniMoveStep)return;i.moving=!0,i.x=u,s=r.computeTime(e,u)}r.triggerCallbacks("dragmove",s,e),r._updateInnerFocus(s)})),hT(gT(r),"onBodyClick",(function(e){r.pos.isLocked&&(r.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())})),hT(gT(r),"_mouseDownHandler",(function(e,t){r._state.time=t.currentTime,r.updateWidth(t.currentTime,t.seekTime,t.percent,0),r._updateInnerFocus(t)})),hT(gT(r),"_mouseUpHandler",(function(e,t){gT(r).pos.moving&&r.updateWidth(t.currentTime,t.seekTime,t.percent,2)})),hT(gT(r),"_mouseMoveHandler",(function(e,t){var n=gT(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<t.currentTime?t.forward=!0:t.forward=!1,i.time=t.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",t,e),r.emitUserAction("drag","dragstart",t)),r.updateWidth(t.currentTime,t.seekTime,t.percent,1),r.triggerCallbacks("dragmove",t,e),r._updateInnerFocus(t)})),hT(gT(r),"onMouseDown",(function(e){var t=gT(r),n=t._state,i=t.player,o=t.pos,a=t.config,s=t.playerConfig,l=N_.getEventPos(e,i.zoom),u=90===i.rotateDeg?l.clientY:l.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){e.stopPropagation(),r.focus(),N_.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),N_.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),N_.event(e),o.x=u,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,N_.addClass(r.progressBtn,"active");var c=r.computeTime(e,u);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(e,c),"touchstart"===e.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}})),hT(gT(r),"onMouseUp",(function(e){var t=gT(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=t._state;e.stopPropagation(),e.preventDefault(),N_.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),N_.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),N_.event(e),N_.removeClass(r.progressBtn,"active");var l=r.computeTime(e,o.x);l.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",l,e),r.emitUserAction("drag","dragend",l)):(r.triggerCallbacks("click",l,e),r.emitUserAction("click","click",l)),r._mouseUpHandlerHook(e,l),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var u=e.type;"touchend"===u||"touchcancel"===u?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&Vk(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(e)),N_.setTimeout(gT(r),(function(){r.resetSeekState()}),1),n.focus()})),hT(gT(r),"onMouseMove",(function(e){var t=gT(r),n=t._state,i=t.pos,o=t.player,a=t.config;N_.checkTouchSupport()&&e.preventDefault(),N_.event(e);var s=N_.getEventPos(e,o.zoom),l=90===o.rotateDeg?s.clientY:s.clientX,u=Math.abs(i.x-l);if(!(i.moving&&u<a.miniMoveStep||!i.moving&&u<a.miniStartStep)){i.x=l;var c=r.computeTime(e,l);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(e,c)}})),hT(gT(r),"onMouseOut",(function(e){r.triggerCallbacks("mouseout",null,e)})),hT(gT(r),"onMouseOver",(function(e){r.triggerCallbacks("mouseover",null,e)})),hT(gT(r),"onMouseEnter",(function(e){var t=gT(r),n=t.player,i=t.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,Vk(r).call(r,"mousemove",r.onMoveOnly),Vk(r).call(r,"mouseleave",r.onMouseLeave),N_.event(e);var o=N_.getEventPos(e,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(e,a);r.triggerCallbacks("mouseenter",s,e),r.focus()}})),hT(gT(r),"onMouseLeave",(function(e){r.triggerCallbacks("mouseleave",null,e),r.unlock(),r._updateInnerFocus(null)})),hT(gT(r),"onVideoResize",(function(){var e=r.pos,t=e.x,n=e.isDown;if(e.isEnter&&!n){var i=r.computeTime(null,t);r.onMoveOnly(null,i)}})),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return fT(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n+this.timeOffset}},{key:"changeState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=e}},{key:"show",value:function(e){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&0!==t.length||(t=[{percent:1}]);var r,i=sT(sT({fragments:t},n),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(i):(this.innerList=new HE(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),qw(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(t){var n;e[t]=Vk(n=e.innerList[t]).call(n,e.innerList)})))}},{key:"_updateInnerFocus",value:function(e){this.innerList&&this.innerList.updateFocus(e)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=Qb(this).call(this,"xg-outer");var e=this.config,t=e.fragFocusClass,n=e.fragAutoFocus,r=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:t,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===V_.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=Qb(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(Y_,(function(){e.onMouseLeave()})),this.on(G_,(function(){e.onTimeupdate()})),this.on(K_,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on("progress",(function(){e.onCacheUpdate()})),this.on(z_,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on(X_,(function(){e.onReset()})),this.on(J_,(function(){e.onVideoResize()}))}},{key:"setConfig",value:function(e){var t,n=this,r=null;gk(t=rk(e)).call(t,(function(t){n.config[t]=e[t],"fragments"===t&&(r=e[t])})),r&&this._initInner(r,e)}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle.sliderBtnStyle,t=this.progressBtn;if(e)if("string"==typeof e)t.style.boxShadow=e;else if("object"===lT(e)){var n;qw(n=rk(e)).call(n,(function(n){t.style[n]=e[n]}))}}},{key:"triggerCallbacks",value:function(e,t,n){var r;this.__dragCallBacks.length>0&&qw(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===e)try{r.handler(t,n)}catch(UD){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),UD)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var n=this.__dragCallBacks,r=-1;qw(n).call(n,(function(n,i){n&&n.type===e&&n.handler===t&&(r=i)})),r>-1&&gw(n).call(n,r,1)}},{key:"unlock",value:function(){var e=this.player,t=this.pos;t.isEnter=!1,t.isLocked=!1,e.isMini||(this.unbind("mousemove",this.onMoveOnly),t.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var e=this.player.config;(this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"===this.domEventType||"compatible"===this.domEventType)&&(Vk(this).call(this,"mousedown",this.onMouseDown),"mobile"!==e.isMobileSimulateMode&&Vk(this).call(this,"mouseenter",this.onMouseEnter),Vk(this).call(this,"mouseover",this.onMouseOver),Vk(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),N_.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),N_.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=t=t>=o.duration?o.duration-i.endedDiff:Number(t).toFixed(1);this.updatePercent(n),this.updateTime(e),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(e,t){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,l=o.top,u=o.left,c=t;90===i.rotateDeg?(n=s,r=l):(n=a,r=u);var f=c-r,h=(f=f>n?n:f<0?0:f)/n,d=Bw((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:d,seekTime:N_.getCurrentTimeByOffset(d,i.timeSegments),offset:f,width:n,left:r,e:e}}},{key:"updateTime",value:function(e){var t=this.player,n=this.duration;e>n?e=n:e<0&&(e=0);var r=t.plugins.time;r&&r.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,t){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left="".concat(100*e,"%"),this.innerList.update({played:e*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,n=this._state,r=this.offsetDuration;if(!(t.isSeeking&&t.media.seeking||this.isProgressMoving)&&t.hasStart){if(n.now>-1){var i=Bw(1e3*n.now,10)-Bw(1e3*t.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=N_.adjustTimeByDuration(o,r,e),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(e){var t=this.player,n=this.duration;if(t){var r=t.bufferedPoint.end;r=N_.adjustTimeByDuration(r,n,e),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var e=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var t=this.domEventType;"touch"!==t&&"compatible"!==t||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==t&&"compatible"!==t||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var e=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===e?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:dE.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:zE.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return zE}}]),n}(mE),WE=function(e){dT(n,e);var t=yT(n);function n(){var e,r;uT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return hT(gT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"_onMouseenter",(function(e){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),hT(gT(r),"_onMouseLeave",(function(e){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return fT(n,[{key:"afterCreate",value:function(){Vk(this).call(this,"mouseenter",this._onMouseenter),Vk(this).call(this,"mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(mE),KE=function(e){dT(n,e);var t=yT(n);function n(){var e,r;uT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return hT(gT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=gT(r).player;return r.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),r.animate(!1)):(t.pause(),r.animate(!0)),!1})),r}return fT(n,[{key:"afterCreate",value:function(){mT(pT(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),Vk(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,t=this.player;this.on([H_,q_,W_,X_],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:LE,class:"xg-icon-play"},pause:{icon:xE,class:"xg-icon-pause"}}}},{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=Qb(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(){mT(pT(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(IE(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:dE.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(WE);function GE(){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 YE=function(e){dT(n,e);var t=yT(n);function n(){return uT(this,n),t.apply(this,arguments)}return fT(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},Vk(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:GE,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){N_.addClass(this.root,"show")}},{key:"hide",value:function(){N_.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:dE.ROOT_TOP,index:0}}}]),n}(mE);function QE(){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 XE(){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 $E=function(e){dT(n,e);var t=yT(n);function n(){var e,r;uT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return hT(gT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return fT(n,[{key:"afterCreate",value:function(){var e=this;mT(pT(n.prototype),"afterCreate",this).call(this);var t=this.config,r=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=N_.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),Vk(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(t){var n=Qb(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:YE,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===V_.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:QE,class:"xg-get-fullscreen"},exitFullscreen:{icon:XE,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){mT(pT(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===V_.device?"touchend":"click",this.handleFullscreen),"mobile"===V_.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 instanceof Event&&(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(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{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:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(IE(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(t){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(e){}))}catch(e){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:dE.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(WE),JE=function(e){dT(n,e);var t=yT(n);function n(e){var r;return uT(this,n),(r=t.call(this,e)).isActiving=!1,r}return fT(n,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,n=e.duration;return this.playerConfig.customDuration||t||n}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var e=this.player.controls.config.mode;this.mode="flex"===e?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=Qb(this).call(this,".time-duration"),this.timeDom=Qb(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([Y_,K_,G_],(function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()})),this.on(z_,(function(){e.onTimeUpdate(!0)})),this.on(X_,(function(){e.onReset()}))}},{key:"show",value:function(e){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(e){var t=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&t.hasStart){var i=this.currentTime+this.timeOffset;i=N_.adjustTimeByDuration(i,r,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(N_.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=N_.format(r))):(this.timeDom.innerHTML=this.minWidthTime(N_.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=N_.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(N_.format(0)),this.centerDurDom.innerHTML=N_.format(0)):(this.timeDom.innerHTML=this.minWidthTime(N_.format(0)),this.durationDom.innerHTML=N_.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=N_.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=N_.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(N_.hide(this.durationDom),N_.hide(this.timeDom),N_.hide(Qb(this).call(this,".time-separator")),N_.show(Qb(this).call(this,".time-live-tag"))):N_.hide(Qb(this).call(this,".time-live-tag"));e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(N_.hide(this.durationDom),N_.hide(this.timeDom),N_.hide(Qb(this).call(this,".time-separator")),N_.show(Qb(this).call(this,".time-live-tag"))):(N_.hide(Qb(this).call(this,".time-live-tag")),N_.show(Qb(this).call(this,".time-separator")),N_.show(this.durationDom),N_.show(this.timeDom))}},{key:"updateTime",value:function(e){this.isActiving=!0,!e&&0!==e||e>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(N_.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(N_.format(e)))}},{key:"minWidthTime",value:function(e){var t;return qw(t=e.split(":")).call(t,(function(e){return'<span class="time-min-width">'.concat(e,"</span>")})).join(":")}},{key:"resetActive",value:function(){var e=this,t=this.player,n=function(){e.isActiving=!1};this.off(K_,n),t.isSeeking&&t.media.seeking?this.once(K_,n):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:dE.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(mE);function ZE(){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 eC(){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 tC(){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 nC=function(e){dT(n,e);var t=yT(n);function n(){var e,r;uT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return hT(gT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=gT(r).player,n=Qb(r).call(r,".xgplayer-bar");N_.event(e);var i=n.getBoundingClientRect(),o=N_.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,e),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),hT(gT(r),"onBarMouseMove",(function(e){var t=gT(r)._d;if(t.isStart){var n=gT(r),i=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),N_.event(e);var a=N_.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,e)}})),hT(gT(r),"onBarMouseUp",(function(e){N_.event(e),document.removeEventListener("mouseup",r.onBarMouseUp);var t=gT(r)._d;t.isStart=!1,t.isMoving=!1})),hT(gT(r),"onMouseenter",(function(e){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),hT(gT(r),"onMouseleave",(function(e){r._d.isActive=!1,r.unFocus(100,!1,e),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),hT(gT(r),"onVolumeChange",(function(e){if(r.player){var t=r.player,n=t.muted,i=t.volume;r._d.isMoving||(Qb(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return fT(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:eC,class:"xg-volume-small"},volumeLarge:{icon:ZE,class:"xg-volume"},volumeMuted:{icon:tC,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,n=t.commonStyle,r=t.volume;if(n.volumeColor)Qb(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;if(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"!==V_.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)Vk(this).call(this,"mouseenter",this._onMouseenterHandler),Vk(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),Vk(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),Vk(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),Vk(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);Vk(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(Q_,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==N_.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,r=Qb(this).call(this,".xgplayer-drag"),i=Qb(this).call(this,".xgplayer-bar");if(i&&r){var o=Bw(e/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,n=e.muted,r=Qb(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(N_.clearTimeout(this,this._timerId),this._timerId=null),N_.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(N_.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=N_.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),N_.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(r)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(N_.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"===V_.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 Tm(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:dE.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(mE),rC=i,iC=ft("iterator"),oC=!rC((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[iC]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),aC=v,sC=2147483647,lC=/[^\0-\u007E]/,uC=/[.\u3002\uFF0E\uFF61]/g,cC="Overflow: input needs wider integers to process",fC=RangeError,hC=aC(uC.exec),dC=Math.floor,pC=String.fromCharCode,vC=aC("".charCodeAt),gC=aC([].join),yC=aC([].push),mC=aC("".replace),kC=aC("".split),bC=aC("".toLowerCase),wC=function(e){return e+22+75*(e<26)},TC=function(e,t,n){var r=0;for(e=n?dC(e/700):e>>1,e+=dC(e/t);e>455;)e=dC(e/35),r+=36;return dC(r+36*e/(e+38))},AC=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=vC(e,n++);if(i>=55296&&i<=56319&&n<r){var o=vC(e,n++);56320==(64512&o)?yC(t,((1023&i)<<10)+(1023&o)+65536):(yC(t,i),n--)}else yC(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&yC(t,pC(r));var l=t.length,u=l;for(l&&yC(t,"-");u<i;){var c=sC;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<c&&(c=r);var f=u+1;if(c-o>dC((sC-a)/f))throw fC(cC);for(a+=(c-o)*f,o=c,n=0;n<e.length;n++){if((r=e[n])<o&&++a>sC)throw fC(cC);if(r==o){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,g=36-p;yC(t,pC(wC(p+v%g))),h=dC(v/g),d+=36}yC(t,pC(wC(h))),s=TC(a,f,u==l),a=0,u++}}a++,o++}return gC(t,"")},_C=no,EC=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:_C(e,r,t[r],n);return e},CC=Sn,RC=r,SC=I,LC=v,xC=S,IC=oC,MC=no,OC=io,UC=EC,PC=Lo,DC=Vl,NC=Wo,BC=Xh,FC=C,jC=$e,VC=Qt,HC=er,zC=tn,qC=Z,WC=Kr,KC=Bi,GC=B,YC=th,QC=Yf,XC=sd,$C=GA,JC=ft("iterator"),ZC="URLSearchParams",eR=ZC+"Iterator",tR=NC.set,nR=NC.getterFor(ZC),rR=NC.getterFor(eR),iR=Object.getOwnPropertyDescriptor,oR=function(e){if(!xC)return RC[e];var t=iR(RC,e);return t&&t.value},aR=oR("fetch"),sR=oR("Request"),lR=oR("Headers"),uR=sR&&sR.prototype,cR=lR&&lR.prototype,fR=RC.RegExp,hR=RC.TypeError,dR=RC.decodeURIComponent,pR=RC.encodeURIComponent,vR=LC("".charAt),gR=LC([].join),yR=LC([].push),mR=LC("".replace),kR=LC([].shift),bR=LC([].splice),wR=LC("".split),TR=LC("".slice),AR=/\+/g,_R=Array(4),ER=function(e){return _R[e-1]||(_R[e-1]=fR("((?:%[\\da-f]{2}){"+e+"})","gi"))},CR=function(e){try{return dR(e)}catch(UD){return e}},RR=function(e){var t=mR(e,AR," "),n=4;try{return dR(t)}catch(UD){for(;n;)t=mR(t,ER(n--),CR);return t}},SR=/[!'()~]|%20/g,LR={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},xR=function(e){return LR[e]},IR=function(e){return mR(pR(e),SR,xR)},MR=DC((function(e,t){tR(this,{type:eR,iterator:YC(nR(e).entries),kind:t})}),"Iterator",(function(){var e=rR(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),OR=function(e){this.entries=[],this.url=null,void 0!==e&&(qC(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===vR(e,0)?TR(e,1):e:WC(e)))};OR.prototype={type:ZC,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,l=QC(e);if(l)for(n=(t=YC(e,l)).next;!(r=SC(n,t)).done;){if(o=(i=YC(zC(r.value))).next,(a=SC(o,i)).done||(s=SC(o,i)).done||!SC(o,i).done)throw hR("Expected sequence with length 2");yR(this.entries,{key:WC(a.value),value:WC(s.value)})}else for(var u in e)jC(e,u)&&yR(this.entries,{key:u,value:WC(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=wR(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=wR(t,"="),yR(this.entries,{key:RR(kR(n)),value:RR(gR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],yR(n,IR(e.key)+"="+IR(e.value));return gR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var UR=function(){BC(this,PR);var e=tR(this,new OR(arguments.length>0?arguments[0]:void 0));xC||(this.length=e.entries.length)},PR=UR.prototype;if(UC(PR,{append:function(e,t){XC(arguments.length,2);var n=nR(this);yR(n.entries,{key:WC(e),value:WC(t)}),xC||this.length++,n.updateURL()},delete:function(e){XC(arguments.length,1);for(var t=nR(this),n=t.entries,r=WC(e),i=0;i<n.length;)n[i].key===r?bR(n,i,1):i++;xC||(this.length=n.length),t.updateURL()},get:function(e){XC(arguments.length,1);for(var t=nR(this).entries,n=WC(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){XC(arguments.length,1);for(var t=nR(this).entries,n=WC(e),r=[],i=0;i<t.length;i++)t[i].key===n&&yR(r,t[i].value);return r},has:function(e){XC(arguments.length,1);for(var t=nR(this).entries,n=WC(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){XC(arguments.length,1);for(var n,r=nR(this),i=r.entries,o=!1,a=WC(e),s=WC(t),l=0;l<i.length;l++)(n=i[l]).key===a&&(o?bR(i,l--,1):(o=!0,n.value=s));o||yR(i,{key:a,value:s}),xC||(this.length=i.length),r.updateURL()},sort:function(){var e=nR(this);$C(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=nR(this).entries,r=VC(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new MR(this,"keys")},values:function(){return new MR(this,"values")},entries:function(){return new MR(this,"entries")}},{enumerable:!0}),MC(PR,JC,PR.entries,{name:"entries"}),MC(PR,"toString",(function(){return nR(this).serialize()}),{enumerable:!0}),xC&&OC(PR,"size",{get:function(){return nR(this).entries.length},configurable:!0,enumerable:!0}),PC(UR,ZC),CC({global:!0,constructor:!0,forced:!IC},{URLSearchParams:UR}),!IC&&FC(lR)){var DR=LC(cR.has),NR=LC(cR.set),BR=function(e){if(qC(e)){var t,n=e.body;if(HC(n)===ZC)return t=e.headers?new lR(e.headers):new lR,DR(t,"content-type")||NR(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),KC(e,{body:GC(0,WC(n)),headers:GC(0,t)})}return e};if(FC(aR)&&CC({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return aR(e,arguments.length>1?BR(arguments[1]):{})}}),FC(sR)){var FR=function(e){return BC(this,uR),new sR(e,arguments.length>1?BR(arguments[1]):{})};uR.constructor=FR,FR.prototype=uR,CC({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:FR})}}var jR,VR=Sn,HR=S,zR=oC,qR=r,WR=Qt,KR=v,GR=no,YR=io,QR=Xh,XR=$e,$R=rT,JR=ab,ZR=Yi,eS=cc.codeAt,tS=function(e){var t,n,r=[],i=kC(mC(bC(e),uC,"."),".");for(t=0;t<i.length;t++)n=i[t],yC(r,hC(lC,n)?"xn--"+AC(n):n);return gC(r,".")},nS=Kr,rS=Lo,iS=sd,oS={URLSearchParams:UR,getState:nR},aS=Wo,sS=aS.set,lS=aS.getterFor("URL"),uS=oS.URLSearchParams,cS=oS.getState,fS=qR.URL,hS=qR.TypeError,dS=qR.parseInt,pS=Math.floor,vS=Math.pow,gS=KR("".charAt),yS=KR(/./.exec),mS=KR([].join),kS=KR(1..toString),bS=KR([].pop),wS=KR([].push),TS=KR("".replace),AS=KR([].shift),_S=KR("".split),ES=KR("".slice),CS=KR("".toLowerCase),RS=KR([].unshift),SS="Invalid scheme",LS="Invalid host",xS="Invalid port",IS=/[a-z]/i,MS=/[\d+-.a-z]/i,OS=/\d/,US=/^0x/i,PS=/^[0-7]+$/,DS=/^\d+$/,NS=/^[\da-f]+$/i,BS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FS=/[\0\t\n\r #/:<>?@[\\\]^|]/,jS=/^[\u0000-\u0020]+/,VS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,HS=/[\t\n\r]/g,zS=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)RS(t,e%256),e=pS(e/256);return mS(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=kS(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},qS={},WS=$R({},qS,{" ":1,'"':1,"<":1,">":1,"`":1}),KS=$R({},WS,{"#":1,"?":1,"{":1,"}":1}),GS=$R({},KS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),YS=function(e,t){var n=eS(e,0);return n>32&&n<127&&!XR(t,e)?e:encodeURIComponent(e)},QS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},XS=function(e,t){var n;return 2==e.length&&yS(IS,gS(e,0))&&(":"==(n=gS(e,1))||!t&&"|"==n)},$S=function(e){var t;return e.length>1&&XS(ES(e,0,2))&&(2==e.length||"/"===(t=gS(e,2))||"\\"===t||"?"===t||"#"===t)},JS=function(e){return"."===e||"%2e"===CS(e)},ZS={},eL={},tL={},nL={},rL={},iL={},oL={},aL={},sL={},lL={},uL={},cL={},fL={},hL={},dL={},pL={},vL={},gL={},yL={},mL={},kL={},bL=function(e,t,n){var r,i,o,a=nS(e);if(t){if(i=this.parse(a))throw hS(i);this.searchParams=null}else{if(void 0!==n&&(r=new bL(n,!0)),i=this.parse(a,null,r))throw hS(i);(o=cS(new uS)).bindURL(this),this.searchParams=o}};bL.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,l=this,u=t||ZS,c=0,f="",h=!1,d=!1,p=!1;for(e=nS(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=TS(e,jS,""),e=TS(e,VS,"$1")),e=TS(e,HS,""),r=JR(e);c<=r.length;){switch(i=r[c],u){case ZS:if(!i||!yS(IS,i)){if(t)return SS;u=tL;continue}f+=CS(i),u=eL;break;case eL:if(i&&(yS(MS,i)||"+"==i||"-"==i||"."==i))f+=CS(i);else{if(":"!=i){if(t)return SS;f="",u=tL,c=0;continue}if(t&&(l.isSpecial()!=XR(QS,f)||"file"==f&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=f,t)return void(l.isSpecial()&&QS[l.scheme]==l.port&&(l.port=null));f="","file"==l.scheme?u=hL:l.isSpecial()&&n&&n.scheme==l.scheme?u=nL:l.isSpecial()?u=aL:"/"==r[c+1]?(u=rL,c++):(l.cannotBeABaseURL=!0,wS(l.path,""),u=yL)}break;case tL:if(!n||n.cannotBeABaseURL&&"#"!=i)return SS;if(n.cannotBeABaseURL&&"#"==i){l.scheme=n.scheme,l.path=ZR(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,u=kL;break}u="file"==n.scheme?hL:iL;continue;case nL:if("/"!=i||"/"!=r[c+1]){u=iL;continue}u=sL,c++;break;case rL:if("/"==i){u=lL;break}u=gL;continue;case iL:if(l.scheme=n.scheme,i==jR)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=ZR(n.path),l.query=n.query;else if("/"==i||"\\"==i&&l.isSpecial())u=oL;else if("?"==i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=ZR(n.path),l.query="",u=mL;else{if("#"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=ZR(n.path),l.path.length--,u=gL;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=ZR(n.path),l.query=n.query,l.fragment="",u=kL}break;case oL:if(!l.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,u=gL;continue}u=lL}else u=sL;break;case aL:if(u=sL,"/"!=i||"/"!=gS(f,c+1))continue;c++;break;case sL:if("/"!=i&&"\\"!=i){u=lL;continue}break;case lL:if("@"==i){h&&(f="%40"+f),h=!0,o=JR(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=YS(g,GS);p?l.password+=y:l.username+=y}else p=!0}f=""}else if(i==jR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(h&&""==f)return"Invalid authority";c-=JR(f).length+1,f="",u=uL}else f+=i;break;case uL:case cL:if(t&&"file"==l.scheme){u=pL;continue}if(":"!=i||d){if(i==jR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(l.isSpecial()&&""==f)return LS;if(t&&""==f&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(f))return a;if(f="",u=vL,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return LS;if(a=l.parseHost(f))return a;if(f="",u=fL,t==cL)return}break;case fL:if(!yS(OS,i)){if(i==jR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()||t){if(""!=f){var m=dS(f,10);if(m>65535)return xS;l.port=l.isSpecial()&&m===QS[l.scheme]?null:m,f=""}if(t)return;u=vL;continue}return xS}f+=i;break;case hL:if(l.scheme="file","/"==i||"\\"==i)u=dL;else{if(!n||"file"!=n.scheme){u=gL;continue}if(i==jR)l.host=n.host,l.path=ZR(n.path),l.query=n.query;else if("?"==i)l.host=n.host,l.path=ZR(n.path),l.query="",u=mL;else{if("#"!=i){$S(mS(ZR(r,c),""))||(l.host=n.host,l.path=ZR(n.path),l.shortenPath()),u=gL;continue}l.host=n.host,l.path=ZR(n.path),l.query=n.query,l.fragment="",u=kL}}break;case dL:if("/"==i||"\\"==i){u=pL;break}n&&"file"==n.scheme&&!$S(mS(ZR(r,c),""))&&(XS(n.path[0],!0)?wS(l.path,n.path[0]):l.host=n.host),u=gL;continue;case pL:if(i==jR||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&XS(f))u=gL;else if(""==f){if(l.host="",t)return;u=vL}else{if(a=l.parseHost(f))return a;if("localhost"==l.host&&(l.host=""),t)return;f="",u=vL}continue}f+=i;break;case vL:if(l.isSpecial()){if(u=gL,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=jR&&(u=gL,"/"!=i))continue}else l.fragment="",u=kL;else l.query="",u=mL;break;case gL:if(i==jR||"/"==i||"\\"==i&&l.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=CS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==i||"\\"==i&&l.isSpecial()||wS(l.path,"")):JS(f)?"/"==i||"\\"==i&&l.isSpecial()||wS(l.path,""):("file"==l.scheme&&!l.path.length&&XS(f)&&(l.host&&(l.host=""),f=gS(f,0)+":"),wS(l.path,f)),f="","file"==l.scheme&&(i==jR||"?"==i||"#"==i))for(;l.path.length>1&&""===l.path[0];)AS(l.path);"?"==i?(l.query="",u=mL):"#"==i&&(l.fragment="",u=kL)}else f+=YS(i,KS);break;case yL:"?"==i?(l.query="",u=mL):"#"==i?(l.fragment="",u=kL):i!=jR&&(l.path[0]+=YS(i,qS));break;case mL:t||"#"!=i?i!=jR&&("'"==i&&l.isSpecial()?l.query+="%27":l.query+="#"==i?"%23":YS(i,qS)):(l.fragment="",u=kL);break;case kL:i!=jR&&(l.fragment+=YS(i,WS))}c++}},parseHost:function(e){var t,n,r;if("["==gS(e,0)){if("]"!=gS(e,e.length-1))return LS;if(t=function(e){var t,n,r,i,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,f=0,h=function(){return gS(e,f)};if(":"==h()){if(":"!=gS(e,1))return;f+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&yS(NS,h());)t=16*t+dS(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!yS(OS,h()))return;for(;yS(OS,h());){if(o=dS(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}l[u]=256*l[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;l[u++]=t}else{if(null!==c)return;f++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(ES(e,1,-1)),!t)return LS;this.host=t}else if(this.isSpecial()){if(e=tS(e),yS(BS,e))return LS;if(t=function(e){var t,n,r,i,o,a,s,l=_S(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=l[r]))return e;if(o=10,i.length>1&&"0"==gS(i,0)&&(o=yS(US,i)?16:8,i=ES(i,8==o?1:2)),""===i)a=0;else{if(!yS(10==o?DS:8==o?PS:NS,i))return e;a=dS(i,o)}wS(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=vS(256,5-t))return null}else if(a>255)return null;for(s=bS(n),r=0;r<n.length;r++)s+=n[r]*vS(256,3-r);return s}(e),null===t)return LS;this.host=t}else{if(yS(FS,e))return LS;for(t="",n=JR(e),r=0;r<n.length;r++)t+=YS(n[r],qS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return XR(QS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&XS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=zS(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+mS(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw hS(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new wL(e.path[0]).origin}catch(UD){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+zS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(nS(e)+":",ZS)},getUsername:function(){return this.username},setUsername:function(e){var t=JR(nS(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=YS(t[n],GS)}},getPassword:function(){return this.password},setPassword:function(e){var t=JR(nS(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=YS(t[n],GS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?zS(e):zS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,uL)},getHostname:function(){var e=this.host;return null===e?"":zS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,cL)},getPort:function(){var e=this.port;return null===e?"":nS(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=nS(e))?this.port=null:this.parse(e,fL))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+mS(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,vL))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=nS(e))?this.query=null:("?"==gS(e,0)&&(e=ES(e,1)),this.query="",this.parse(e,mL)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=nS(e))?("#"==gS(e,0)&&(e=ES(e,1)),this.fragment="",this.parse(e,kL)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var wL=function(e){var t=QR(this,TL),n=iS(arguments.length,1)>1?arguments[1]:void 0,r=sS(t,new bL(e,!1,n));HR||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},TL=wL.prototype,AL=function(e,t){return{get:function(){return lS(this)[e]()},set:t&&function(e){return lS(this)[t](e)},configurable:!0,enumerable:!0}};if(HR&&(YR(TL,"href",AL("serialize","setHref")),YR(TL,"origin",AL("getOrigin")),YR(TL,"protocol",AL("getProtocol","setProtocol")),YR(TL,"username",AL("getUsername","setUsername")),YR(TL,"password",AL("getPassword","setPassword")),YR(TL,"host",AL("getHost","setHost")),YR(TL,"hostname",AL("getHostname","setHostname")),YR(TL,"port",AL("getPort","setPort")),YR(TL,"pathname",AL("getPathname","setPathname")),YR(TL,"search",AL("getSearch","setSearch")),YR(TL,"searchParams",AL("getSearchParams")),YR(TL,"hash",AL("getHash","setHash"))),GR(TL,"toJSON",(function(){return lS(this).serialize()}),{enumerable:!0}),GR(TL,"toString",(function(){return lS(this).serialize()}),{enumerable:!0}),fS){var _L=fS.createObjectURL,EL=fS.revokeObjectURL;_L&&GR(wL,"createObjectURL",WR(_L,fS)),EL&&GR(wL,"revokeObjectURL",WR(EL,fS))}rS(wL,"URL"),VR({global:!0,constructor:!0,forced:!zR,sham:!HR},{URL:wL});var CL=Sn,RL=i,SL=sd,LL=Kr,xL=oC,IL=oe("URL");CL({target:"URL",stat:!0,forced:!(xL&&RL((function(){IL.canParse()})))},{canParse:function(e){var t=SL(arguments.length,1),n=LL(e),r=t<2||void 0===arguments[1]?void 0:LL(arguments[1]);try{return!!new IL(n,r)}catch(UD){return!1}}});var ML=t(ee.URL);function OL(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function UL(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var PL=function(e){dT(n,e);var t=yT(n);function n(){return uT(this,n),t.apply(this,arguments)}return fT(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.cssFullscreen&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var e,t=this;mT(pT(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on("cssFullscreen_change",(function(e){t.animate(e)})),this.btnClick=Vk(e=this.btnClick).call(e,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),Vk(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=Qb(this).call(this,".xgplayer-icon");t.appendChild(e.cssFullscreen),t.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:t}),t?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var t=this.i18nKeys,n=Qb(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:OL,class:"xg-get-cssfull"},exitCssFullscreen:{icon:UL,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){mT(pT(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(IE(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:dE.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(WE),DL=Z,NL=k,BL=ft("match"),FL=function(e){var t;return DL(e)&&(void 0!==(t=e[BL])?!!t:"RegExp"==NL(e))},jL=TypeError,VL=function(e){if(FL(e))throw jL("The method doesn't accept regular expressions");return e},HL=ft("match"),zL=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[HL]=!1,"/./"[e](t)}catch(r){}}return!1},qL=Sn,WL=T;R.f;var KL=Nn,GL=Kr,YL=VL,QL=G,XL=zL,$L=WL("".startsWith),JL=WL("".slice),ZL=Math.min;qL({target:"String",proto:!0,forced:!XL("startsWith")},{startsWith:function(e){var t=GL(QL(this));YL(e);var n=KL(ZL(arguments.length>1?arguments[1]:void 0,t.length)),r=GL(e);return $L?$L(t,r,n):JL(t,n,n+r.length)===r}});var ex=zc("String").startsWith,tx=ae,nx=ex,rx=String.prototype,ix=t((function(e){var t=e.startsWith;return"string"==typeof e||e===rx||tx(rx,e)&&t===rx.startsWith?nx:t})),ox=Z,ax=Math.floor;Sn({target:"Number",stat:!0},{isInteger:Number.isInteger||function(e){return!ox(e)&&isFinite(e)&&ax(e)===e}});var sx=t(ee.Number.isInteger),lx=ni.includes;Sn({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return lx(this,e,arguments.length>1?arguments[1]:void 0)}});var ux=zc("Array").includes,cx=Sn,fx=VL,hx=G,dx=Kr,px=zL,vx=v("".indexOf);cx({target:"String",proto:!0,forced:!px("includes")},{includes:function(e){return!!~vx(dx(hx(this)),dx(fx(e)),arguments.length>1?arguments[1]:void 0)}});var gx=zc("String").includes,yx=ae,mx=ux,kx=gx,bx=Array.prototype,wx=String.prototype,Tx=t((function(e){var t=e.includes;return e===bx||yx(bx,e)&&t===bx.includes?mx:"string"==typeof e||e===wx||yx(wx,e)&&t===wx.includes?kx:t})),Ax=Ye,_x=$r,Ex=Fn,Cx=function(e){for(var t=Ax(this),n=Ex(t),r=arguments.length,i=_x(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:_x(o,n);a>i;)t[i++]=e;return t};Sn({target:"Array",proto:!0},{fill:Cx});var Rx=zc("Array").fill,Sx=ae,Lx=Rx,xx=Array.prototype,Ix=t((function(e){var t=e.fill;return e===xx||Sx(xx,e)&&t===xx.fill?Lx:t})),Mx={exports:{}},Ox=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Ux=i,Px=Z,Dx=k,Nx=Ox,Bx=Object.isExtensible,Fx=Ux((function(){Bx(1)}))||Nx?function(e){return!!Px(e)&&((!Nx||"ArrayBuffer"!=Dx(e))&&(!Bx||Bx(e)))}:Bx,jx=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),Vx=Sn,Hx=v,zx=ri,qx=Z,Wx=$e,Kx=Xt.f,Gx=Fi,Yx=Hi,Qx=Fx,Xx=jx,$x=!1,Jx=nt("meta"),Zx=0,eI=function(e){Kx(e,Jx,{value:{objectID:"O"+Zx++,weakData:{}}})},tI=Mx.exports={enable:function(){tI.enable=function(){},$x=!0;var e=Gx.f,t=Hx([].splice),n={};n[Jx]=1,e(n).length&&(Gx.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===Jx){t(r,i,1);break}return r},Vx({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Yx.f}))},fastKey:function(e,t){if(!qx(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Wx(e,Jx)){if(!Qx(e))return"F";if(!t)return"E";eI(e)}return e[Jx].objectID},getWeakData:function(e,t){if(!Wx(e,Jx)){if(!Qx(e))return!0;if(!t)return!1;eI(e)}return e[Jx].weakData},onFreeze:function(e){return Xx&&$x&&Qx(e)&&!Wx(e,Jx)&&eI(e),e}};zx[Jx]=!0;var nI=Mx.exports,rI=Sn,iI=r,oI=nI,aI=i,sI=gn,lI=kh,uI=Xh,cI=C,fI=Z,hI=Lo,dI=Xt.f,pI=Zo.forEach,vI=S,gI=Wo.set,yI=Wo.getterFor,mI=Bi,kI=io,bI=EC,wI=Qt,TI=Xh,AI=q,_I=kh,EI=du,CI=pu,RI=Gh,SI=S,LI=nI.fastKey,xI=Wo.set,II=Wo.getterFor,MI={getConstructor:function(e,t,n,r){var i=e((function(e,i){TI(e,o),xI(e,{type:t,index:mI(null),first:void 0,last:void 0,size:0}),SI||(e.size=0),AI(i)||_I(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=II(t),s=function(e,t,n){var r,i,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:i=LI(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),SI?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var n,r=a(e),i=LI(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return bI(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,SI?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=l(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),SI?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=wI(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),bI(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)}}),SI&&kI(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=II(t),o=II(r);EI(e,t,(function(e,t){xI(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?CI("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,CI(void 0,!0))}),n?"entries":"values",!n,!0),RI(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=iI[e],l=s&&s.prototype,u={};if(vI&&cI(s)&&(o||l.forEach&&!aI((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){gI(uI(t,c),{type:e,collection:new s}),null!=n&&lI(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,f=yI(e);pI(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||sI(c,e,(function(n,r){var i=f(this).collection;if(!t&&o&&!fI(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||dI(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(t,e,i,a),oI.enable();hI(r,e,!1,!0),u[e]=r,rI({global:!0,forced:!0},u),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),MI);var OI=ee.Map,UI=Qt,PI=I,DI=xe,NI=ed,BI=q,FI=kh,jI=[].push,VI=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return NI(this),(t=void 0!==a)&&DI(a),BI(e)?new this:(n=[],t?(r=0,i=UI(a,o>2?arguments[2]:void 0),FI(e,(function(e){PI(jI,n,i(e,r++))}))):FI(e,jI,{that:n}),new this(n))};Sn({target:"Map",stat:!0,forced:!0},{from:VI});var HI=As,zI=function(){return new this(HI(arguments))};Sn({target:"Map",stat:!0,forced:!0},{of:zI});var qI=Ce,WI=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(qI(e)+" is not a map")},KI=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},GI=oe("Map"),YI={Map:GI,set:KI("set",2),get:KI("get",1),has:KI("has",1),remove:KI("delete",1),proto:GI.prototype},QI=WI,XI=YI.remove;Sn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=QI(this),n=!0,r=0,i=arguments.length;r<i;r++)e=XI(t,arguments[r]),n=n&&e;return!!n}});var $I=WI,JI=YI.get,ZI=YI.has,eM=YI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=$I(this);return ZI(i,e)?(n=JI(i,e),"update"in t&&(n=t.update(n,e,i),eM(i,e,n)),n):(r=t.insert(e,i),eM(i,e,r),r)}});var tM=I,nM=function(e,t,n){for(var r,i,o=n||e.next;!(r=tM(o,e)).done;)if(void 0!==(i=t(r.value)))return i},rM=function(e,t,n){return n?nM(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},iM=Qt,oM=WI,aM=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=oM(this),n=iM(e,arguments.length>1?arguments[1]:void 0);return!1!==aM(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var sM=Qt,lM=WI,uM=rM,cM=YI.Map,fM=YI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=lM(this),n=sM(e,arguments.length>1?arguments[1]:void 0),r=new cM;return uM(t,(function(e,i){n(e,i,t)&&fM(r,i,e)})),r}});var hM=Qt,dM=WI,pM=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=dM(this),n=hM(e,arguments.length>1?arguments[1]:void 0),r=pM(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var vM=Qt,gM=WI,yM=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=gM(this),n=vM(e,arguments.length>1?arguments[1]:void 0),r=yM(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var mM=Sn,kM=I,bM=C,wM=xe,TM=kh,AM=YI.Map,_M=v([].push);mM({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(bM(this)?this:AM);wM(t);var r=wM(n.has),i=wM(n.get),o=wM(n.set);return TM(e,(function(e){var a=t(e);kM(r,n,a)?_M(kM(i,n,a),e):kM(o,n,a,[e])})),n}});var EM=function(e,t){return e===t||e!=e&&t!=t},CM=WI,RM=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===RM(CM(this),(function(t){if(EM(t,e))return!0}),!0)}});var SM=I,LM=kh,xM=C,IM=xe,MM=YI.Map;Sn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(xM(this)?this:MM);IM(t);var r=IM(n.set);return LM(e,(function(e){SM(r,n,t(e),e)})),n}});var OM=WI,UM=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=UM(OM(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var PM=Qt,DM=WI,NM=rM,BM=YI.Map,FM=YI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=DM(this),n=PM(e,arguments.length>1?arguments[1]:void 0),r=new BM;return NM(t,(function(e,i){FM(r,n(e,i,t),e)})),r}});var jM=Qt,VM=WI,HM=rM,zM=YI.Map,qM=YI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=VM(this),n=jM(e,arguments.length>1?arguments[1]:void 0),r=new zM;return HM(t,(function(e,i){qM(r,i,n(e,i,t))})),r}});var WM=WI,KM=kh,GM=YI.set;Sn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=WM(this),n=arguments.length,r=0;r<n;)KM(arguments[r++],(function(e,n){GM(t,e,n)}),{AS_ENTRIES:!0});return t}});var YM=xe,QM=WI,XM=rM,$M=TypeError;Sn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=QM(this),n=arguments.length<2,r=n?void 0:arguments[1];if(YM(e),XM(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw $M("Reduce of empty map with no initial value");return r}});var JM=Qt,ZM=WI,eO=rM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=ZM(this),n=JM(e,arguments.length>1?arguments[1]:void 0);return!0===eO(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var tO=xe,nO=WI,rO=TypeError,iO=YI.get,oO=YI.has,aO=YI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=nO(this),r=arguments.length;tO(t);var i=oO(n,e);if(!i&&r<3)throw rO("Updating absent value");var o=i?iO(n,e):tO(r>2?arguments[2]:void 0)(e,n);return aO(n,e,t(o,e,n)),n}});var sO=I,lO=xe,uO=C,cO=tn,fO=TypeError,hO=function(e,t){var n,r=cO(this),i=lO(r.get),o=lO(r.has),a=lO(r.set),s=arguments.length>2?arguments[2]:void 0;if(!uO(t)&&!uO(s))throw fO("At least one callback required");return sO(o,r,e)?(n=sO(i,r,e),uO(t)&&(n=t(n),sO(a,r,e,n))):uO(s)&&(n=s(),sO(a,r,e,n)),n};Sn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:hO}),Sn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:hO});var dO=t(OI);function pO(e){return(pO="function"==typeof Qm&&"symbol"==typeof jk?function(e){return typeof e}:function(e){return e&&"function"==typeof Qm&&e.constructor===Qm&&e!==Qm.prototype?"symbol":typeof e})(e)}function vO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ok(e,gO(r.key),r)}}function gO(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[fb];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var yO=xe,mO=Ye,kO=z,bO=Fn,wO=TypeError,TO=function(e){return function(t,n,r,i){yO(n);var o=mO(t),a=kO(o),s=bO(o),l=e?s-1:0,u=e?-1:1;if(r<2)for(;;){if(l in a){i=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw wO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(i=n(i,a[l],l,o));return i}},AO={left:TO(!1),right:TO(!0)}.left;Sn({target:"Array",proto:!0,forced:!Hh&&pe>79&&pe<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return AO(this,e,t,t>1?arguments[1]:void 0)}});var _O,EO,CO,RO=zc("Array").reduce,SO=ae,LO=RO,xO=Array.prototype,IO=t((function(e){var t=e.reduce;return e===xO||SO(xO,e)&&t===xO.reduce?LO:t})),MO=1,OO=2,UO=3,PO=4,DO=["Boolean","Number","String","Undefined","Null","Date","Object"],NO=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}var t,n,r;return t=e,n=[{key:"debug",value:function(){for(var t,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Tm(t=[MO]).call(t,o)),e.disabled||(r=console).debug.apply(r,Tm(n=["[".concat(BO(),"]"),this._prefix]).call(n,o))}},{key:"log",value:function(){for(var t,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Tm(t=[OO]).call(t,o)),e.disabled||(r=console).log.apply(r,Tm(n=["[".concat(BO(),"]"),this._prefix]).call(n,o))}},{key:"warn",value:function(){for(var t,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Tm(t=[UO]).call(t,o)),e.disabled||(r=console).warn.apply(r,Tm(n=["[".concat(BO(),"]"),this._prefix]).call(n,o))}},{key:"error",value:function(){for(var t,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Tm(t=[PO]).call(t,o)),e.disabled||(r=console).error.apply(r,Tm(n=["[".concat(BO(),"]"),this._prefix]).call(n,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=qw(r).call(r,(function(e){return jO(e)}));t="[".concat(BO(),"]")+this._prefix+Ym(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],r=[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}],n&&vO(t.prototype,n),r&&vO(t,r),Ok(t,"prototype",{writable:!1}),e}();function BO(){return(new Date).toLocaleString()}function FO(e){var t;if("object"!==pO(e))return e;var n=Fk(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+e.length+"]";case"Object":return"{}";default:return n}}function jO(e,t,n){var r;n||(n=1),t||(t=2);var i={};if(!e||"object"!==pO(e))return e;var o=Fk(r=Object.prototype.toString.call(e)).call(r,8,-1);if(!Tx(DO).call(DO,o))return o;if(!(n>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n===t?i[a]=FO(e[a]):"object"===pO(e[a])?i[a]=jO(e[a],t,n+1):i[a]=e[a]);return i}}_O=NO,CO=!0,(EO=gO(EO="disabled"))in _O?Ok(_O,EO,{value:CO,enumerable:!0,configurable:!0,writable:!0}):_O[EO]=CO;var VO=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),HO=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function zO(e){return oT({muted:!1,timeout:250,inline:!1},e)}function qO(e,t){var n=e.muted,r=e.timeout,i=e.inline,o=t(),a=o.element,s=o.source,l=void 0,u=void 0,c=void 0;return a.muted=n,!0===n&&a.setAttribute("muted","muted"),!0===i&&a.setAttribute("playsinline","playsinline"),a.src=s,new Nk((function(e){l=a.play(),u=vA((function(){c(!1,new Error("Timeout "+r+" ms has been reached"))}),r),c=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(u),e({result:t,error:n})},void 0!==l?l.then((function(){return c(!0)})).catch((function(e){return c(!1,e)})):c(!0)}))}var WO={audio:function(e){return qO(e=zO(e),(function(){return{element:document.createElement("audio"),source:ML.createObjectURL(VO)}}))},video:function(e){return qO(e=zO(e),(function(){return{element:document.createElement("video"),source:ML.createObjectURL(HO)}}))}},KO=new NO("AdsPluginBaseAdManager"),GO=function(e){Tb(n,e);var t=Cb(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return mb(this,n),(e=t.call(this)).options=r,e.config=r.config||{},e.plugin=r.plugin,e.player=r.plugin.player,e.mediaElement=e.player.media||e.player.video,e.isLinearAdRunning=!1,e._shouldBlockVideoContent=!1,e._isAdPaused=!0,e._isMediaEnded=!1,e.context={currentTime:0,duration:0},e}return bb(n,[{key:"currentTime",get:function(){return this.context.currentTime}},{key:"duration",get:function(){return this.context.duration}},{key:"paused",get:function(){return this._isAdPaused}},{key:"shouldBlockVideoContent",get:function(){return this.isLinearAdRunning||this._shouldBlockVideoContent},set:function(e){this._shouldBlockVideoContent=e}},{key:"updateConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e?this.config=db(db({},this.config),e):KO.warn("config is empty")}},{key:"isFullScreen",value:function(){return!!this.player.fullscreen}},{key:"destroy",value:function(){this.removeAllListeners()}},{key:"tryContentPlay",value:function(){var e=this.player,t=e.play();void 0!==t&&t&&t.then?t.then((function(){KO.log("content play"),e.removeClass(RE),e.addClass(wE),e.state<SE&&(e.setState(SE),e.emit($_))})).catch((function(t){if(KO.error("content play error",t),e.media&&e.media.error)return e.onError(),void e.removeClass(kE)})):e.state<SE&&(e.setState(SE),e.removeClass(RE),e.removeClass(CE),e.removeClass(kE),e.addClass(wE),e.emit($_))}}]),n}(AT.EventEmitter),YO=new NO("AdsPluginImaAdManager"),QO="xgplayer-ads-playing",XO=function(e){Tb(o,e);var t,n,r,i=Cb(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return mb(this,o),wb(Eb(e=i.call(this,t)),"_onMediaEnded",(function(){var t;e.isLinearAdRunning||(e._isMediaEnded=!0,null===(t=e.adsLoader)||void 0===t||t.contentComplete())})),wb(Eb(e),"_onMediaResize",(function(){var t,n=Eb(e).player,r=e.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(t=e.adsManager)||void 0===t||t.resize(n.sizeInfo.width,n.sizeInfo.height,r)})),wb(Eb(e),"_onMediaPlay",(function(){e._mediaPlayed=!0})),wb(Eb(e),"_onMediaPause",(function(){e._mediaPlayed=!1})),wb(Eb(e),"_onMediaVolumeChange",(function(){var t;null===(t=e.adsManager)||void 0===t||t.setVolume(e.player.muted?0:e.player.volume)})),wb(Eb(e),"_onAdsManagerLoaded",(function(t){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0;var r=e.adsManager=t.getAdsManager(e.mediaElement,n);YO.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&YO.log("cuePoints",i),e._initAdsManagerEventListeners(),e.player.emit(Pm,{adsManager:r})})),wb(Eb(e),"_onAdsManagerAdError",(function(t){e._handleAdError(t.getError()),e._resumeContent()})),wb(Eb(e),"_onAdsLoaderAdError",(function(t){e._handleAdError(t.getError())})),wb(Eb(e),"_handleAdError",(function(t){var n,r,i;YO.log("AdError",t),e.shouldBlockVideoContent=!1,e.isLinearAdRunning=!1,null===(n=e.adsManager)||void 0===n||n.destroy(),null===(r=e.plugin)||void 0===r||r.emit(Bm,t),null===(i=e.plugin)||void 0===i||i.emit(Sm,t)})),wb(Eb(e),"onAdEvent",(function(t){var n,r=Eb(e).player,i=null==t?void 0:t.getAd(),o=(null==t?void 0:t.getAdData())||(null==i?void 0:i.data),a=!1;switch(null==t?void 0:t.type){case google.ima.AdEvent.Type.AD_BREAK_READY:e.player.emit(jm,{ad:i});break;case google.ima.AdEvent.Type.LOADED:var s=(o||{}).adPodInfo,l=0===(null==s?void 0:s.podIndex);a=!0,l&&(i.isLinear()?e.shouldBlockVideoContent=!0:(e.shouldBlockVideoContent=!1,e.tryContentPlay())),e.emit(Fm,{ad:i,isPreroll:l}),e.plugin.emit(Fm,{ad:i,isPreroll:l});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:if(e._resumeCallback)if(!e._resumeCallback().canResume)break;e._resumeContent(),e.emit(Hm,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.isLinearAdRunning=!0,e.shouldBlockVideoContent=!0,N_.addClass(e.player.root,QO),null==r||r.pause(),e.emit(Vm,{ad:i});break;case google.ima.AdEvent.Type.STARTED:e.plugin.emit(Am,{ad:i}),i.isLinear()&&(e._isAdPaused=!1,e.plugin.emit(_m,{ad:i}),n=pA((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:e._isAdPaused=!1,e.plugin.emit(_m,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:e._isAdPaused=!0,e.plugin.emit(Em,{ad:i});break;case google.ima.AdEvent.Type.SKIPPED:e.plugin.emit(Rm,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var u=t.getAdData(),c=u.currentTime,f=u.duration;oT(e.context,{currentTime:c,duration:f}),e.plugin.emit(Cm,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:var h=(o||{}).adPodInfo,d=!1;null!=i&&i.isLinear()&&(h&&(d=h.adPosition<h.totalAds),clearInterval(n)),e.plugin.emit(Dm,{ad:i,hasNextInPod:d}),e.plugin.emit(Lm,{ad:i,hasNextInPod:d});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=i&&i.isLinear()&&clearInterval(n),e.plugin.emit(Nm,{ad:i}),e.player.emit(xm,{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}YO.log("AdEvent",null==t?void 0:t.type,a?Ym((null==t?void 0:t.getAdData())||{}):null==t?void 0:t.getAd())})),e.displayContainer=null,e.adsLoader=null,e.adsManager=null,e._resumeCallback=null,e}return bb(o,[{key:"init",value:(r=yb(pb().mark((function e(){return pb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.shouldBlockVideoContent=!!(this.config.adTagUrl||this.config.adsResponse||this.config.adsRequest),e.prev=1,this.emit(Im),e.next=5,this._loadIMASdk();case 5:this.emit(Mm),e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(1),YO.error("google.ima sdk is not loaded, due to error",(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0),this.emit(Om),this.shouldBlockVideoContent=!1,e.abrupt("return");case 14:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 19:case"end":return e.stop()}}),e,this,[[1,8]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){Rb(Ab(o.prototype),"destroy",this).call(this),this.reset(),this.displayContainer.destroy(),this._removeMediaEvents(),this._destroyLoader()}},{key:"resumeCallback",set:function(e){this._resumeCallback=e}},{key:"_initConfig",value:function(){var e=this.config.locale;e&&google.ima.settings.setLocale(e)}},{key:"_loadIMASdk",value:function(){var e=this;return new Nk((function(t,n){if("undefined"!=typeof google&&google.ima)t();else{var r=document.createElement("script"),i=vA((function(){n(new Error("google.ima sdk load timeout"))}),e.config.loadSdkTimeout||3e3);r.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(e.config.debug?"_debug":"",".js"),r.onload=function(){clearTimeout(i),t()},r.onerror=function(e){clearTimeout(i),n(null==e?void 0:e.message)},document.head.appendChild(r)}}))}},{key:"_initMediaEvents",value:function(){var e=this.player;e.on(J_,this._onMediaResize),e.on(z_,this._onMediaEnded),e.on(H_,this._onMediaPlay),e.on(q_,this._onMediaPause),e.on(Q_,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var e=this.player;e.off(J_,this._onMediaResize),e.off(z_,this._onMediaEnded),e.off(H_,this._onMediaPlay),e.off(q_,this._onMediaPause),e.off(Q_,this._onMediaVolumeChange)}},{key:"_initContainer",value:function(){var e=this.options.displayContainer;this.displayContainer=new google.ima.AdDisplayContainer(e,this.mediaElement)}},{key:"_initLoader",value:function(){var e=this.adsLoader=new google.ima.AdsLoader(this.displayContainer);e.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1),this.player.emit(Um,{adsLoader:e})}},{key:"_destroyLoader",value:function(){var e=this.adsLoader;e||(e.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),e.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1))}},{key:"_initAdsRequest",value:(n=yb(pb().mark((function e(){var t,n,r,i,o=this;return pb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,n=t.adsRequest,r=t.adsResponse,i=t.adTagUrl,!(n||r||i)){e.next=9;break}return e.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(Pm,(function(){o.autoplayAllowed?o.playAds():o.player.useHooks("play",(function e(){return o.playAds(),o.player.removeHooks("play",e),!1})),o.emit(zm)})),this.player.once(Bm,(function(){o.emit(zm)})),e.next=10;break;case 9:this.emit(zm);case 10:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"playAds",value:function(){try{this._onMediaVolumeChange(),this.displayContainerInitialized||(this.displayContainer.initialize(),this.displayContainerInitialized=!0);var e=this.player,t=this.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.adsManager.init(e.sizeInfo.width,e.sizeInfo.height,t),this.adsManager.start()}catch(n){this._handleAdError(n),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var e=this,t=this.adsManager;t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var n=["LOADED","STARTED","RESUMED","PAUSED","COMPLETE","ALL_ADS_COMPLETED","CONTENT_PAUSE_REQUESTED","CONTENT_RESUME_REQUESTED","VOLUME_CHANGED","VOLUME_MUTED","AD_METADATA","AD_CAN_PLAY","AD_PROGRESS","AD_BUFFERING","CLICK","VIDEO_CLICKED","VIDEO_ICON_CLICKED","FIRST_QUARTILE","MIDPOINT","THIRD_QUARTILE","SKIPPED","USER_CLOSE","AD_BREAK_READY","AD_BREAK_FETCH_ERROR"];gk(n).call(n,(function(n){t.addEventListener(google.ima.AdEvent.Type[n],e.onAdEvent)}))}},{key:"_resumeContent",value:function(){var e;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,N_.removeClass(this.player.root,QO),this._isMediaEnded)||(null===(e=this.player)||void 0===e||e.play())}},{key:"reset",value:function(){var e,t;this.isLinearAdRunning=!1,null===(e=this.adsManager)||void 0===e||e.destroy(),this.adsManager=null,null===(t=this.adsLoader)||void 0===t||t.contentComplete(),N_.removeClass(this.player.root,QO)}},{key:"requestAds",value:function(){var e,t=this.config,n=t.adsRequest,r=t.adsResponse,i=t.adTagUrl,o=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=o.sizeInfo.width,a.linearAdSlotHeight=o.sizeInfo.height,a.nonLinearAdSlotWidth=o.sizeInfo.width,a.nonLinearAdSlotHeight=o.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),i)a.adTagUrl=i;else if(r)a.adsResponse=r;else if(n&&"object"===vb(n)){var s;gk(s=rk(n)).call(s,(function(e){a[e]=n[e]}))}YO.log("requestAds",Ym(a)),null===(e=this.adsLoader)||void 0===e||e.requestAds(a)}},{key:"pause",value:function(){var e;return null===(e=this.adsManager)||void 0===e?void 0:e.pause()}},{key:"play",value:function(){var e;return null===(e=this.adsManager)||void 0===e?void 0:e.resume()}},{key:"skip",value:function(){var e;return null===(e=this.adsManager)||void 0===e?void 0:e.skip()}},{key:"updateConfig",value:function(e){Rb(Ab(o.prototype),"updateConfig",this).call(this,e),this._initConfig()}},{key:"_checkAutoplaySupport",value:(t=yb(pb().mark((function e(){var t,n,r,i,o;return pb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player.config.autoplay,e.next=4,Nk.all([t?WO.video({timeout:800}).then((function(e){return e.result})):Nk.resolve(!1),t&&this.player.config.autoplayMuted?WO.video({timeout:800,muted:!0}).then((function(e){return e.result})):Nk.resolve(!1)]);case 4:n=e.sent,r=Sb(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,YO.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),o}(GO),$O="xgplayer-ad-start",JO="xgplayer-ad-show-ui",ZO=function(e){Tb(n,e);var t=Cb(n);function n(){var e,r;mb(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return wb(Eb(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=r.getAdPlugin();return t.paused?(t.play(),r.animate(!1)):(t.pause(),r.animate(!0)),!1})),r}return bb(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var e=this;this.on([Em],(function(){e.animate(!0)})),this.on(_m,(function(){e.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(KE),eU=function(e){Tb(n,e);var t=Cb(n);function n(){return mb(this,n),t.apply(this,arguments)}return bb(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var e=this.getAdPlugin();return(null==e?void 0:e.duration)||0}},{key:"offsetDuration",get:function(){return this.duration}},{key:"timeOffset",get:function(){return 0}},{key:"currentTime",get:function(){var e=this.getAdPlugin();return(null==e?void 0:e.currentTime)||0}},{key:"afterCreate",value:function(){oT(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),Rb(Ab(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var e=this;this.on(Cm,(function(){e.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}(qE),tU=function(e){Tb(n,e);var t=Cb(n);function n(){return mb(this,n),t.apply(this,arguments)}return bb(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var e=this.getAdPlugin();return(null==e?void 0:e.duration)||0}},{key:"currentTime",get:function(){var e=this.getAdPlugin();return(null==e?void 0:e.currentTime)||0}},{key:"listenEvents",value:function(){var e=this;this.on([Cm],(function(t){e.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(JE),nU=function(){function e(t,n){mb(this,e);var r=n.player,i=n.plugin;this.player=r,this.config=t,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[KE,ZO],[JE,tU],[qE,eU],[nC,null],[PL,null],[$E,null]],this.init(),this.initEvents()}return bb(e,[{key:"init",value:function(){var e=this.player,t=this.adUIPlugins,n=this.fragment,r=this.decoratedAdPluginList;gk(r).call(r,(function(r){var i=Sb(r,2),o=i[0],a=i[1],s=e.getPlugin(o.pluginName);if(s){var l=null;a&&!e.getPlugin(a.pluginName)&&(e.registerPlugin(a),l=e.getPlugin(a.pluginName),n.appendChild(l.root)),t.push([s,l])}}))}},{key:"destroy",value:function(){this.fragment=null,this.adUIPlugins=[],this.decoratedAdPluginList=[],this.adPlugin=null,this.player=null}},{key:"initEvents",value:function(){var e=this,t=this.adPlugin,n=this.player;t.on(_m,(function(){var e=[CE,bE,TE,_E,EE,AE];gk(e).call(e,(function(e){n.removeClass(e)}))})),t.on(Am,(function(){e.showAdContainer()})),t.on(Lm,(function(t){t.hasNextInPod||e.hideAdContainer()})),t.on(Rm,(function(){e.hideAdContainer()})),t.on(Sm,(function(){e.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var e=this.player;N_.hasClass(e.root,$O)||N_.addClass(e.root,$O)}},{key:"hideAdContainer",value:function(){var e=this.player;N_.hasClass(e.root,$O)&&N_.removeClass(e.root,$O)}},{key:"showAdUI",value:function(){var e,t=this.player,n=this.config,r=this.adUIPlugins,i=this.fragment;gk(r).call(r,(function(e){var t=Sb(e,2),n=t[0],r=t[1];if(r){var o=r.root,a=n.root;i.contains(o)&&i.removeChild(o),a.parentNode.insertBefore(o,a),i.appendChild(a)}}));var o=this._getNonAdPlugin();gk(e=pk(o).call(o,(function(e){return!!e.root}))).call(e,(function(e){var t=e.root;e.__adStub__||(e.__adStub__=N_.createDom("xg-ad-stub","",{})),t.parentNode.insertBefore(e.__adStub__,t),i.appendChild(t)}));var a=t.getPlugin("start");a&&a.hide(),!1===n.controls&&t.controls&&this.hideControls(),this.showAdContainer(),t.addClass(JO)}},{key:"hideAdUI",value:function(){var e,t,n=this.player,r=this.config,i=this.adUIPlugins,o=this.fragment;gk(i).call(i,(function(e){var t=Sb(e,2),n=t[0],r=t[1];if(r){var i=r.root,a=n.root;o.contains(a)&&o.removeChild(a),o.contains(i)||(i.parentNode.insertBefore(a,i),o.appendChild(i))}}));var a=this._getNonAdPlugin();gk(e=pk(a).call(a,(function(e){return!!e.root}))).call(e,(function(e){var t,n,r=e.root;o.contains(r)&&o.removeChild(r),null===(t=e.__adStub__)||void 0===t||null===(n=t.parentNode)||void 0===n||n.insertBefore(r,e.__adStub__)})),!1===r.controls&&o.contains(null===(t=n.controls)||void 0===t?void 0:t.root)&&this.showControls();var s=n.getPlugin("start");if(s){var l=s.config.disableAnimate,u=s.config.isShowPause;l||(s.config.disableAnimate=!0,s.config.isShowPause=!1),n.once("play",(function(){vA((function(){s.config.disableAnimate=l,s.config.disableAnimate=u}),10)}))}n.removeClass(JO)}},{key:"hideControls",value:function(){var e=this.player,t=this.config,n=this.fragment;if(!1===t.controls&&e.controls){var r=e.controls.root,i=r.parentElement,o=r.previousSibling,a=r.nextSibling;this.controlsPos={parentNode:i,previousSibling:o,nextSibling:a},n.appendChild(e.controls.root)}}},{key:"showControls",value:function(){var e=this.player,t=this.config,n=this.fragment;if(!1===t.controls&&e.controls){if(!this.controlsPos)return;var r=e.controls.root;n.contains(r)&&n.removeChild(r);var i=this.controlsPos,o=i.parentNode,a=i.previousSibling,s=i.nextSibling;o&&(s?o.insertBefore(r,s):a?o.insertBefore(r,a.nextSibling):o.appendChild(r)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var e,t=this.player,n=this.decoratedAdPluginList,r=[];gk(n).call(n,(function(e){var t=Sb(e,2),n=t[0],i=t[1];r.push(n.pluginName.toLowerCase()),i&&r.push(i.pluginName.toLowerCase())}));var i=(null===(e=t.controls)||void 0===e?void 0:e.plugins())||[];return pk(i).call(i,(function(e){return-1===jb(r).call(r,e.pluginName.toLowerCase())}))}}]),e}(),rU=new NO("AdsPlugin"),iU=function(e){Tb(r,e);var t,n=Cb(r);function r(){return mb(this,r),n.apply(this,arguments)}return bb(r,[{key:"version",get:function(){return"3.0.21-rc.4"}},{key:"paused",get:function(){var e,t;return!(null===(e=this.csManager)||void 0===e||!e.isLinearAdRunning||null===(t=this.csManager)||void 0===t||!t.paused)}},{key:"currentTime",get:function(){var e;return(null===(e=this.csManager)||void 0===e?void 0:e.currentTime)||0}},{key:"duration",get:function(){var e;return(null===(e=this.csManager)||void 0===e?void 0:e.duration)||0}},{key:"afterCreate",value:function(){var e=this.config;rU.log("plugin afterCreate, config: ".concat(Ym(e||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var e,t,n;switch(rU.log("plugin beforePlayerInit"),this.initPromise=((n=new Nk((function(n,r){e=n,t=r}))).used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n),this.uiManager=new nU(this.config,{plugin:this,player:this.player}),this.config.adType){case"ima":case"google-ima":this._initClientSideAd()}return this.initPromise}},{key:"render",value:function(){return N_.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:(t=yb(pb().mark((function e(){var t=this;return pb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.csManager=new XO({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(Im,(function(){t.uiManager.showAdContainer()})),this.csManager.on(Om,(function(){t.uiManager.hideAdContainer()})),this.csManager.once(Fm,(function(e){e.isPreroll||t.uiManager.hideAdContainer()})),this.csManager.once(zm,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(Vm,(function(){t.uiManager.showAdUI()})),this.csManager.on(Hm,(function(){t.uiManager.hideAdUI()})),e.next=9,this.csManager.init();case 9:return e.abrupt("return",this.csManager);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"requestAds",value:function(){var e;null===(e=this.csManager)||void 0===e||e.requestAds()}},{key:"playAds",value:function(){var e;null===(e=this.csManager)||void 0===e||e.playAds()}},{key:"pause",value:function(){var e;null===(e=this.csManager)||void 0===e||e.pause()}},{key:"play",value:function(){var e;null===(e=this.csManager)||void 0===e||e.play()}},{key:"destroy",value:function(){var e,t;this.offAll(),null===(e=this.csManager)||void 0===e||e.destroy(),null===(t=this.uiManager)||void 0===t||t.destroy()}},{key:"reset",value:function(){var e;null===(e=this.csManager)||void 0===e||e.reset()}},{key:"updateConfig",value:function(e){var t;null===(t=this.csManager)||void 0===t||t.updateConfig(e)}},{key:"_blockContentPlay",value:function(){var e=this,t=this.player;t.on("play",(function(){var n;null!==(n=e.csManager)&&void 0!==n&&n.shouldBlockVideoContent&&(rU.log("block content play"),t.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(mE);function oU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aU(e,t){var n;if(e){if("string"==typeof e)return oU(e,t);var r=ny(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?ub(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oU(e,t):void 0}}function sU(e,t){var n=void 0!==tc&&$m(e)||e["@@iterator"];if(!n){if(Wk(e)||(n=aU(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var lU={},uU={},cU={};!function(e){Ok(e,"__esModule",{value:!0}),e.shiftThirtyTwoBits=e.THIRTY_TWO_BIT_MULTIPLIER=e.bytesToUUID=void 0;e.bytesToUUID=function(e){if(16!==e.length)throw new Error("scte35-js Uint8Array uuid bad size: ".concat(e.length));return qw([]).call(e,(function(e,t){var n=(e<=15?"0":"")+e.toString(16);return t>=4&&t<=10&&t%2==0?"-"+n:n})).join("")},e.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);e.shiftThirtyTwoBits=function(t){return t*e.THIRTY_TWO_BIT_MULTIPLIER}}(cU),Ok(uU,"__esModule",{value:!0}),uU.parseDescriptor=uU.SegmentationMessage=void 0;var fU,hU,dU=cU;(hU=fU||(uU.SegmentationMessage=fU={}))[hU.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",hU[hU.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",hU[hU.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",hU[hU.NONE=3]="NONE";uU.parseDescriptor=function(e){var t,n=function(e){var t={},n=0;for(t.spliceDescriptorTag=e.getUint8(n++),t.descriptorLength=e.getUint8(n++),t.identifier="";t.identifier.length<4;)t.identifier+=String.fromCharCode(e.getUint8(n++));return t}(e),r=6;if(0===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===n.spliceDescriptorTag){var i=n;if(i.segmentationEventId=e.getUint32(r),r+=4,i.segmentationEventCancelIndicator=!!(128&e.getUint8(r++)),!i.segmentationEventCancelIndicator){var o=e.getUint8(r++);i.programSegmentationFlag=!!(128&o),i.segmentationDurationFlag=!!(64&o),i.deliveryNotRestrictedFlag=!!(32&o),i.deliveryNotRestrictedFlag||(i.webDeliveryAllowedFlag=!!(16&o),i.noRegionalBlackoutFlag=!!(8&o),i.archiveAllowedFlag=!!(4&o),i.deviceRestrictions=3&o),i.programSegmentationFlag||(i.componentCount=e.getUint8(r++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+i.componentCount),r+=6*i.componentCount),i.segmentationDurationFlag&&(i.segmentationDuration=dU.shiftThirtyTwoBits(e.getUint8(r++)),i.segmentationDuration+=e.getUint32(r),r+=4),i.segmentationUpidType=e.getUint8(r++),i.segmentationUpidLength=e.getUint8(r++);var a=i.segmentationUpidLength;for(i.segmentationUpid=new Uint8Array(a);a>=0;)a--,i.segmentationUpid[a]=e.getUint8(r+a);r+=i.segmentationUpidLength,i.segmentationTypeId=e.getUint8(r++),i.segmentNum=e.getUint8(r++),i.segmentsExpected=e.getUint8(r++),r<n.descriptorLength+2&&(52===i.segmentationTypeId||54===i.segmentationTypeId)&&(i.subSegmentNum=e.getUint8(r++),i.subSegmentsExpected=e.getUint8(r++))}}else 3===n.spliceDescriptorTag?(r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(n.spliceDescriptorTag)),r=n.descriptorLength+2);r!==n.descriptorLength+2&&console.error(Tm(t="scte35-js Error reading descriptor offset @".concat(r," of ")).call(t,n.descriptorLength+2));return n};var pU=t(ee.Symbol.for),vU=c,gU=X,yU=Un,mU=Fn,kU=Fc,bU=Math.min,wU=[].lastIndexOf,TU=!!wU&&1/[1].lastIndexOf(1,-0)<0,AU=kU("lastIndexOf"),_U=TU||!AU?function(e){if(TU)return vU(wU,this,arguments)||0;var t=gU(this),n=mU(t),r=n-1;for(arguments.length>1&&(r=bU(r,yU(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:wU;Sn({target:"Array",proto:!0,forced:_U!==[].lastIndexOf},{lastIndexOf:_U});var EU=zc("Array").lastIndexOf,CU=ae,RU=EU,SU=Array.prototype,LU=t((function(e){var t=e.lastIndexOf;return e===SU||CU(SU,e)&&t===SU.lastIndexOf?RU:t})),xU=Ye,IU=$r,MU=Fn,OU=Jb,UU=Math.min,PU=[].copyWithin||function(e,t){var n=xU(this),r=MU(n),i=IU(e,r),o=IU(t,r),a=arguments.length>2?arguments[2]:void 0,s=UU((void 0===a?r:IU(a,r))-o,r-i),l=1;for(o<i&&i<o+s&&(l=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:OU(n,i),i+=l,o+=l;return n};Sn({target:"Array",proto:!0},{copyWithin:PU});for(var DU=zc("Array").copyWithin,NU=ae,BU=DU,FU=Array.prototype,jU=t((function(e){var t=e.copyWithin;return e===FU||NU(FU,e)&&t===FU.copyWithin?BU:t})),VU={},HU={byteLength:function(e){var t=YU(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=YU(e),i=r[0],o=r[1],a=new WU(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),s=0,l=o>0?i-4:i;for(n=0;n<l;n+=4)t=qU[e.charCodeAt(n)]<<18|qU[e.charCodeAt(n+1)]<<12|qU[e.charCodeAt(n+2)]<<6|qU[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===o&&(t=qU[e.charCodeAt(n)]<<2|qU[e.charCodeAt(n+1)]>>4,a[s++]=255&t);1===o&&(t=qU[e.charCodeAt(n)]<<10|qU[e.charCodeAt(n+1)]<<4|qU[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},fromByteArray:function(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(QU(e,a,a+o>s?s:a+o));1===r?(t=e[n-1],i.push(zU[t>>2]+zU[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(zU[t>>10]+zU[t>>4&63]+zU[t<<2&63]+"="));return i.join("")}},zU=[],qU=[],WU="undefined"!=typeof Uint8Array?Uint8Array:Array,KU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",GU=0;GU<64;++GU)zU[GU]=KU[GU],qU[KU.charCodeAt(GU)]=GU;function YU(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=jb(e).call(e,"=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function QU(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(zU[(i=r)>>18&63]+zU[i>>12&63]+zU[i>>6&63]+zU[63&i]);return o.join("")}qU["-".charCodeAt(0)]=62,qU["_".charCodeAt(0)]=63;var XU={read:function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},write:function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+d]=255&a,d+=p,a/=256,u-=8);e[n+d-p]|=128*v}};(function(e){var t=HU,n=XU,r="function"==typeof Qm&&"function"==typeof pU?pU("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Dk(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=Fk(r).call(r,0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+wc(e));if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?o(0):c(e);if("Buffer"===e.type&&Kk(e.data))return c(e.data)}(e);if(i)return i;if(void 0!==Qm&&null!=fb&&"function"==typeof e[fb])return a.from(e[fb]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+wc(e))}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),o(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Dk(r,a.prototype),r}function h(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+wc(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof jb(Uint8Array.prototype)?i?jb(Uint8Array.prototype).call(e,t,n):LU(Uint8Array.prototype).call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var f=!0,h=0;h<l;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function m(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=t.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=Bw(t.substr(2*o,2),16);if(Y(s))return o;e[n+o]=s}return o}function k(e,t,n,r){return K(q(t,e.length-n),e,n,r)}function b(e,t,n,r){return K(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return K(W(t),e,n,r)}function T(e,t,n,r){return K(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(Fk(e).call(e,n,r))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(l=e[i+1]))&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],u=e[i+2],128==(192&l)&&128==(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,Fk(e).call(e,r,r+=E));return n}(r)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Dk(t,Uint8Array.prototype),Dk(e,t),42===e.foo()}catch(n){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Ok(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Ok(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Dk(a.prototype,Uint8Array.prototype),Dk(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?Ix(r=o(e)).call(r,t,n):Ix(i=o(e)).call(i,t):o(e);var r,i}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Kk(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(G(o,Uint8Array))i+o.length>r.length?(a.isBuffer(o)||(o=a.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var t,n="",r=e.INSPECT_MAX_BYTES;return n=VA(t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(t),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+wc(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),u=Fk(this).call(this,r,i),c=Fk(e).call(e,t,n),f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==jb(this).call(this,e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Fk(Array.prototype).call(this._arr||this,0)}};var E=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=Q[e[o]];return i}function L(e,t,n){for(var r=Fk(e).call(e,t,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function x(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i){j(t,r,i,e,n,7);var o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function O(e,t,n,r,i){j(t,r,i,e,n,7);var o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,r,i,o){return t=+t,r>>>=0,o||U(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function D(e,t,r,i,o){return t=+t,r>>>=0,o||U(e,0,r,8),n.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Dk(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=X((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),a.prototype.readBigUInt64BE=X((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=X((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24))})),a.prototype.readBigInt64BE=X((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=X((function(e){return M(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=X((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=X((function(e){return M(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=X((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;this===e&&"function"==typeof jU(Uint8Array.prototype)?jU(this).call(this,t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,r),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var N={};function B(e,t,n){N[e]=function(n){Zy(i,n);var r=gm(i);function i(){var n,o;return ay(this,i),o=r.call(this),Ok(hy(o),"message",{value:t.apply(hy(o),arguments),writable:!0,configurable:!0}),o.name=Tm(n="".concat(o.name," [")).call(n,e,"]"),o.stack,delete o.name,o}return fy(i,[{key:"code",get:function(){return e},set:function(e){Ok(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){var t,n;return Tm(t=Tm(n="".concat(this.name," [")).call(n,e,"]: ")).call(t,this.message)}}]),i}(n)}function F(e){for(var t,n="",r=e.length,i="-"===e[0]?1:0;r>=i+4;r-=3){var o;n=Tm(o="_".concat(Fk(e).call(e,r-3,r))).call(o,n)}return Tm(t="".concat(Fk(e).call(e,0,r))).call(t,n)}function j(e,t,n,r,i,o){if(e>n||e<t){var a,s,l,u,c,f,h,d,p,v,g="bigint"==typeof t?"n":"";if(o>3)if(0===t||t===BigInt(0))a=Tm(s=Tm(l=Tm(u=">= 0".concat(g," and < 2")).call(u,g," ** ")).call(l,8*(o+1))).call(s,g);else a=Tm(c=Tm(f=">= -(2".concat(g," ** ")).call(f,8*(o+1)-1)).call(c,g,") and < 2 ** ")+Tm(h="".concat(8*(o+1)-1)).call(h,g);else a=Tm(d=Tm(p=Tm(v=">= ".concat(t)).call(v,g," and <= ")).call(p,n)).call(d,g);throw new N.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,o)}function V(e,t){if("number"!=typeof e)throw new N.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){var r;if(Math.floor(e)!==e)throw V(e,n),new N.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(n||"offset",Tm(r=">= ".concat(n?1:0," and <= ")).call(r,t),e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){var n;return Tm(n='The "'.concat(e,'" argument must be of type number. Received type ')).call(n,wc(t))}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,n){var r,i='The value of "'.concat(e,'" is out of range.'),o=n;return sx(n)&&Math.abs(n)>Math.pow(2,32)?o=F(String(n)):"bigint"==typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=F(o)),o+="n"),i+=Tm(r=" It must be ".concat(t,". Received ")).call(r,o)}),RangeError);var z=/[^+/0-9A-Za-z-_]/g;function q(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return t.toByteArray(function(e){if(e=e.split("=")[0],(e=VA(e).call(e).replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){var i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}var Q=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}})(VU),Ok(lU,"__esModule",{value:!0});var $U=lU.SCTE35=void 0,JU=uU,ZU=cU,eP=VU,tP=function(){function e(){ay(this,e),this.buffer=eP.Buffer}return fy(e,[{key:"parseFromB64",value:function(e){var t,n=Uint8Array.from(qw(t=this.parseBase64(e).split("")).call(t,(function(e){return e.charCodeAt(0)})));return this.parseSCTE35Data(n)}},{key:"parseFromHex",value:function(e){var t=e.match(/[a-f\d]{2}/gi)||[],n=Uint8Array.from(qw(t).call(t,(function(e){return Bw(e,16)})));return this.parseSCTE35Data(n)}},{key:"parseBase64",value:function(e){return this.buffer.from(e,"base64").toString("binary")}},{key:"spliceEvent",value:function(e,t,n){var r=0;if(e.spliceEventId=t.getUint32(r),r+=4,e.spliceEventCancelIndicator=!!(128&t.getUint8(r++)),e.spliceEventCancelIndicator)return r;var i=t.getUint8(r++);if(e.outOfNetworkIndicator=!!(128&i),e.programSpliceFlag=!!(64&i),e.durationFlag=!!(32&i),5===n&&(e.spliceImmediateFlag=!!(16&i)),e.programSpliceFlag)if(5!==n||e.spliceImmediateFlag)4===n&&(e.utcSpliceTime=t.getUint32(r),r+=4);else{var o=this.timeSignal(new DataView(t.buffer,t.byteOffset+r,5));e.spliceTime=o,r++,o.specified&&(r+=4)}else if(e.componentCount=t.getUint8(r++),4===n){for(var a=[];a.length!==e.componentCount;)a.push({componentTag:t.getUint8(r++),utcSpliceTime:t.getUint32(r)}),r+=4;e.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return e.durationFlag&&(i=t.getUint8(r++),e.breakDuration={autoReturn:!!(128&i),duration:(1&i?ZU.THIRTY_TWO_BIT_MULTIPLIER:0)+t.getUint32(r)},r+=4),e.uniqueProgramId=t.getUint16(r),r+=2,e.available=t.getUint8(r++),e.expected=t.getUint8(r++),r}},{key:"spliceSchedule",value:function(e){var t={};t.spliceCount=e.getUint8(0),t.spliceEvents=[];for(var n,r=1;t.spliceEvents.length!==t.spliceCount;){var i={};r+=this.spliceEvent(i,new DataView(e.buffer,e.byteOffset+r),4),t.spliceEvents.push(i)}r!==e.byteLength&&console.error(Tm(n="scte35-js Bad read splice_schedule actual: ".concat(r," expected: ")).call(n,e.byteLength));return t}},{key:"spliceInsert",value:function(e){var t,n={},r=this.spliceEvent(n,e,5);r!==e.byteLength&&console.error(Tm(t="scte35-js Bad read splice_insert actual: ".concat(r," expected: ")).call(t,e.byteLength));return n}},{key:"timeSignal",value:function(e){var t={},n=e.getUint8(0);return t.specified=!!(128&n),t.specified&&(t.pts=1&n?ZU.THIRTY_TWO_BIT_MULTIPLIER:0,t.pts+=e.getUint32(1)),t}},{key:"privateCommand",value:function(e){var t={},n=e.getUint32(0),r=new Uint8Array(e.buffer,e.byteOffset+4,e.byteLength-4);return t.identifier=n,t.identifier&&(t.rawData=r),t}},{key:"parseSCTE35Data",value:function(e){var t={},n=new DataView(e.buffer),r=0;t.tableId=n.getUint8(r++);var i,o=n.getUint8(r++);if(t.selectionSyntaxIndicator=!!(128&o),t.privateIndicator=!!(64&o),t.sectionLength=((15&o)<<8)+n.getUint8(r++),t.sectionLength+3!==e.byteLength)throw new Error(Tm(i="Binary read error sectionLength: ".concat(t.sectionLength," + 3 !== data.length: ")).call(i,e.byteLength));if(t.protocolVersion=n.getUint8(r++),o=n.getUint8(r++),t.encryptedPacket=!!(128&o),t.encryptedAlgorithm=(126&o)>>1,t.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(t.encryptedAlgorithm," not supported")),t.ptsAdjustment=1&o?ZU.THIRTY_TWO_BIT_MULTIPLIER:0,t.ptsAdjustment+=n.getUint32(r),r+=4,t.cwIndex=n.getUint8(r++),t.tier=n.getUint8(r++)<<4,o=n.getUint8(r++),t.tier+=(240&o)>>4,t.spliceCommandLength=((15&o)<<8)+n.getUint8(r++),t.spliceCommandType=n.getUint8(r++),4095===t.spliceCommandLength)if(6===t.spliceCommandType){var a=128&n.getUint8(r);t.spliceCommandLength=a?5:1}else if(0===t.spliceCommandType)t.spliceCommandLength=0;else if(5===t.spliceCommandType){var s=r;if(s+=4,!(128&n.getUint8(s++))){var l=n.getUint8(s++),u=16&l,c=32&l,f=64&l;if(f&&!u&&(s+=5),!f){var h=n.getUint8(s++);s+=h,s+=u?0:5*h}c&&(s+=5),s+=4,t.spliceCommandLength=s-r}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==t.spliceCommandType){var d=new DataView(e.buffer,r,t.spliceCommandLength);4===t.spliceCommandType?t.spliceCommand=this.spliceSchedule(d):5===t.spliceCommandType?t.spliceCommand=this.spliceInsert(d):6===t.spliceCommandType?t.spliceCommand=this.timeSignal(d):255===t.spliceCommandType&&(t.spliceCommand=this.privateCommand(d))}if(r+=t.spliceCommandLength,t.descriptorLoopLength=n.getUint16(r),r+=2,t.descriptorLoopLength){var p=t.descriptorLoopLength;t.descriptors=[];try{for(;p;){var v=new DataView(e.buffer,r,p),g=JU.parseDescriptor(v);p-=g.descriptorLength+2,r+=g.descriptorLength+2,t.descriptors.push(g)}}catch(UD){var y;console.error(Tm(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,p," in loop.")),console.error(UD),r+=p,p=0}}return t.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(Fk(e).call(e,r).join(", "))),t}}]),e}();$U=lU.SCTE35=tP;var nP="SCTE35-OUT",rP="START-DATE",iP="PLANNED-DURATION";var oP=function(){function e(t){var n=this;ay(this,e),ym(this,"_options",void 0),ym(this,"_track",void 0),ym(this,"_startTime",void 0),ym(this,"_adBreakCues",void 0),ym(this,"_activeAdBreak",null),ym(this,"_activeAdBreakStatus","WAITING_PREROLL"),ym(this,"_scte35",new $U),ym(this,"_scte35ResultMap",new dO),ym(this,"_adManager",void 0),ym(this,"_timer",void 0),ym(this,"_handleTimeUpdate",(function(){var e,t,r,i,o;if(null!==(e=n._adBreakCues)&&void 0!==e&&e.length)for(var a=0;a<n._adBreakCues.length;a++){var s=n._adBreakCues[a];if(s.startTime>=n._player.currentTime){r=s;break}}if(r&&(null===(t=n._activeAdBreak)||void 0===t?void 0:t.id)===r.id)if((null===(i=n._activeAdBreak)||void 0===i?void 0:i.startDate)!==r.startDate)switch(n._activeAdBreakStatus){case"REQUESTED":n._changeActiveAdBreakStatus("REQUESTED",r);break;case"ERROR":case"COMPLETE":n._changeActiveAdBreakStatus("READY",null)}else(null===(o=n._activeAdBreak)||void 0===o?void 0:o.startTime)!==r.startTime&&n._changeActiveAdBreakStatus(n._activeAdBreakStatus,r);n._tryToPlayAd(),n._tryToRequestAd(r)})),ym(this,"_onReady",(function(){n._changeActiveAdBreakStatus("READY",null),n._player.off(Sm,n._onReady),n._player.off(xm,n._onReady),n._player.on(G_,n._handleTimeUpdate),n._player.on(xm,n._onAdComplete),n._player.on(Sm,n._onAdError),n._handleTimeUpdate()})),ym(this,"_onAdComplete",(function(){n._changeActiveAdBreakStatus("COMPLETE",n._activeAdBreak)})),ym(this,"_onAdError",(function(){var e,t;null===(e=n._player)||void 0===e||null===(e=e.media)||void 0===e||null===(e=e.style)||void 0===e||e.setProperty("visibility",""),null===(t=n._adManager)||void 0===t||t.destroy(),n._adManager=null,n._changeActiveAdBreakStatus("ERROR",n._activeAdBreak)})),ym(this,"_handleHlsCoreEvent",(function(e){var t=e.eventName,r=e.playlist;if("core.hlslevelloaded"===t){var i;if(null!=r&&null!==(i=r.segments)&&void 0!==i&&i.length&&0===n._player.currentTime){var o,a=sU(r.segments);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(0===s.start){n._startTime=new Date(s.dataTime).getTime();break}}}catch(l){a.e(l)}finally{a.f()}}null!=r&&r.dateRanges&&n._startTime&&n._updateAdBreakCues(r.dateRanges)}})),ym(this,"_onAddTrack",(function(e){var t=e.track;"metadata"===(null==t?void 0:t.kind)&&(t.mode="hidden",n._track=t,V_.os.isIos?n.loopCues():(n._onCuechange(),n._track.addEventListener("cuechange",n._onCuechange)))})),ym(this,"loopCues",(function(){n._onCuechange(),n._timer=vA(n.loopCues,2e3)})),ym(this,"_onCuechange",(function(){for(var e,t={},r=(null===(e=n._track)||void 0===e?void 0:e.cues)||[],i=0;i<r.length;){var o,a=r[i];if((null===(o=a.value)||void 0===o?void 0:o.key)===iP){var s,l=i+1<r.length?r[i+1]:null;if((null==l||null===(s=l.value)||void 0===s?void 0:s.key)===nP&&(null==l?void 0:l.startTime)===a.startTime){var u,c,f=n._getScte35Result(null===(u=l.value)||void 0===u?void 0:u.data),h=String((null==f?void 0:f.spliceCommand).spliceEventId);t[h]=ym({ID:h,startTime:l.startTime,message:f},iP,null===(c=a.value)||void 0===c?void 0:c.data),i+=2}else i++}else i++}n._updateAdBreakCues(t)})),this._options=t,this._adManager=this._options.adManager,this._init()}var t,n,r;return fy(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var e,t;null===(e=this._track)||void 0===e||e.removeEventListener("cuechange",this._onCuechange),this._track=void 0,clearTimeout(this._timer),this._timer=null,null===(t=this._mediaElement)||void 0===t||null===(t=t.textTracks)||void 0===t||t.removeEventListener("addtrack",this._onAddTrack),this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(G_,this._handleTimeUpdate),this._player.off(Dm,this._onAdComplete),this._player.off(Bm,this._onAdError)}},{key:"_init",value:function(){var e;null===(e=this._mediaElement)||void 0===e||null===(e=e.textTracks)||void 0===e||e.addEventListener("addtrack",this._onAddTrack),this._player.on("core_event",this._handleHlsCoreEvent);var t=this._adManager.config,n=t.adsRequest,r=t.adsResponse,i=t.adTagUrl;n||r||i?(this._player.once(Sm,this._onReady),this._player.once(xm,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(e,t){this._activeAdBreakStatus=e,this._activeAdBreak=t}},{key:"_tryToRequestAd",value:(r=oy(ry().mark((function e(t){var n;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if("WAITING_PREROLL"!==this._activeAdBreakStatus){e.next=4;break}return e.abrupt("return");case 4:if("STARTED"!==this._activeAdBreakStatus){e.next=6;break}return e.abrupt("return");case 6:if(t.id!==(null===(n=this._activeAdBreak)||void 0===n?void 0:n.id)){e.next=8;break}return e.abrupt("return");case 8:return this._changeActiveAdBreakStatus("REQUESTED",t),e.next=11,this._generateOrUpdateManager(this._adManager);case 11:this._adManager=e.sent;case 12:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_tryToPlayAd",value:function(){!this._activeAdBreak||this._activeAdBreak.startTime>this._player.currentTime||("ERROR"!==this._activeAdBreakStatus?"REQUESTED"===this._activeAdBreakStatus&&(this._changeActiveAdBreakStatus("STARTED",this._activeAdBreak),this._playLoopAds(this._adManager,this._activeAdBreak.duration)):this._changeActiveAdBreakStatus("READY",null))}},{key:"_generateOrUpdateManager",value:(n=oy(ry().mark((function e(t){var n;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=6;break}return e.next=3,this._player.plugins.ad._initImaAd();case 3:n=e.sent,e.next=8;break;case 6:(n=t).reset();case 8:return n.updateConfig({adTagUrl:this._adTagUrl}),n.requestAds(),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_playLoopAds",value:(t=oy(ry().mark((function e(t,n){var r,i=this,o=arguments;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.length>2&&void 0!==o[2]&&o[2],t.playAds(),t.once(Hm,(function(){i._player.media.style.setProperty("visibility","")})),t.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,(function(e){var i,o=null==e||null===(i=e.getAd().data)||void 0===i?void 0:i.duration;r&&n&&n<o&&vA((function(){var e;null===(e=t)||void 0===e||null===(e=e.adsManager)||void 0===e||e.stop()}),1e3*n)})),t.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,function(){var e=oy(ry().mark((function e(r){var o,a,s,l,u,c,f;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=null==r||null===(o=r.getAd().data)||void 0===o?void 0:o.duration,c=n-u,!(u&&null!==(a=i._options.replayForSCTE35)&&void 0!==a&&a.enable&&c>0&&c>(null!==(s=null===(l=i._options.replayForSCTE35)||void 0===l?void 0:l.minDurationOffset)&&void 0!==s?s:5))){e.next=8;break}return e.next=5,i._generateOrUpdateManager();case 5:return(f=e.sent)&&(t.resumeCallback=function(){var e;return i._player.plugins.ad.uiManager.hideAdUI(),i._player.media.style.setProperty("visibility","hidden"),null===(e=t)||void 0===e||e.destroy(),t=null,i._playLoopAds(f,c,!0),{canResume:!1}}),e.abrupt("return");case 8:i._adManager=t;case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 5:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"_getScte35Result",value:function(e){if(!this._scte35ResultMap.has(e))try{this._scte35ResultMap.set(e,this._scte35.parseFromHex(e))}catch(t){}if(!this._scte35ResultMap.has(e))try{this._scte35ResultMap.set(e,this._scte35.parseFromB64(e))}catch(t){}return this._scte35ResultMap.get(e)}},{key:"_updateAdBreakCues",value:function(e){var t,n,r=this;this._adBreakCues=__(t=IO(n=rk(e)).call(n,(function(t,n){var i=e[n];if(function(e){return!(!e[iP]||!e.message&&!e[nP]||void 0===e.startTime&&!e[rP])}(i)){var o=i.message||r._getScte35Result(i[nP]);5===(null==o?void 0:o.spliceCommandType)&&t.push({data:o,id:i.ID,startTime:i.startTime||(new Date(i[rP]).getTime()-r._startTime)/1e3,duration:MA(i[iP]||"0"),startDate:i[rP]})}return t}),[])).call(t,(function(e,t){return e.startTime-t.startTime}))}}]),e}();var aP=S,sP=v,lP=di,uP=X,cP=sP(M.f),fP=sP([].push),hP=function(e){return function(t){for(var n,r=uP(t),i=lP(r),o=i.length,a=0,s=[];o>a;)n=i[a++],aP&&!cP(r,n)||fP(s,e?[n,r[n]]:r[n]);return s}},dP={entries:hP(!0),values:hP(!1)},pP=dP.values;Sn({target:"Object",stat:!0},{values:function(e){return pP(e)}});var vP=t(ee.Object.values),gP="SCTE35-OUT",yP="X-BREAK-ID",mP="X-AD-ID";function kP(e){switch(e){case gP:return"SCTE35";case mP:case yP:return"SSAI";default:return}}function bP(e){var t,n=[],r={},i=void 0;function o(){var e,i,o=vP(r);o.length&&(n.push({startTime:null==o||null===(e=o[0])||void 0===e?void 0:e.startTime,ad:r,type:t,idWithSlate:null==o||null===(i=o[0])||void 0===i?void 0:i.id}),t="")}for(var a=0;a<e.length;a++){var s=e[a];if(s.startTime===i){var l,u,c;if(kP(null==s||null===(l=s.value)||void 0===l?void 0:l.key))t=kP(null==s||null===(c=s.value)||void 0===c?void 0:c.key);null!=s&&null!==(u=s.value)&&void 0!==u&&u.key&&(r[s.value.key]=s)}else{var f;o(),null!=s&&null!==(f=s.value)&&void 0!==f&&f.key&&(r=ym({},s.value.key,s)),i=s.startTime}}return o(),n}function wP(e,t){return function(e){if(Wk(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==tc&&$m(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(df(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||aU(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 TP=dP.entries;Sn({target:"Object",stat:!0},{entries:function(e){return TP(e)}});var AP=t(ee.Object.entries);function _P(e,t){var n=nk(e);if(ok){var r=ok(e);t&&(r=dk(r).call(r,(function(t){return Qy(e,t).enumerable}))),df(n).apply(n,r)}return n}function EP(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Jc(n=_P(Object(i),!0)).call(n,(function(t){ym(e,t,i[t])})):Tk?Ik(e,Tk(i)):Jc(r=_P(Object(i))).call(r,(function(t){Lc(e,t,Qy(i,t))}))}return e}var CP,RP=fy((function e(t){ay(this,e),ym(this,"_player",void 0),ym(this,"_emitAdEvent",void 0),this._player=t.player,this._emitAdEvent=t.emitAdEvent})),SP=fy((function e(){ay(this,e)})),LP=function(e){return e.START="start",e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile",e.COMPLETE="complete",e.CLICK="click",e.IMPRESSION="impression",e.RESUME="resume",e.PAUSE="pause",e.ERROR="error",e}(LP||{}),xP=EP(EP({},qm),{},{AD_FIRST_QUARTILE:"ad_first_quartile",AD_MIDPOINT:"ad_midpoint",AD_THIRD_QUARTILE:"ad_third_quartile",AD_CLICK:"ad_click",AD_IMPRESSION:"ad_impression",AD_RESUME:"ad_resume"}),IP=(ym(CP={},"start",xP.AD_START),ym(CP,"firstQuartile",xP.AD_FIRST_QUARTILE),ym(CP,"midpoint",xP.AD_MIDPOINT),ym(CP,"thirdQuartile",xP.AD_THIRD_QUARTILE),ym(CP,"complete",xP.AD_COMPLETE),ym(CP,"click",xP.AD_CLICK),ym(CP,"impression",xP.AD_IMPRESSION),ym(CP,"resume",xP.AD_RESUME),ym(CP,"pause",xP.AD_PAUSE),ym(CP,"error",xP.AD_ERROR),CP),MP=function(e){return e.START="start",e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile",e.COMPLETE="complete",e}(MP||{}),OP=function(e){Zy(n,e);var t=gm(n);function n(e,r,i,o){var a,s,l,u,c,f;ay(this,n),ym(hy(f=t.call(this)),"_ad",void 0),ym(hy(f),"_parsedVast",void 0),ym(hy(f),"_skipOffset",void 0),ym(hy(f),"_trackingEvents",void 0),ym(hy(f),"_videoClickThrough",void 0),ym(hy(f),"_videoClickTracking",void 0),ym(hy(f),"_impressionTracking",void 0),ym(hy(f),"_errorTracking",void 0),ym(hy(f),"_state",void 0),ym(hy(f),"_player",void 0),ym(hy(f),"_type",void 0),ym(hy(f),"_breakId",void 0),f._ad=e,f._breakId=r,f._player=o,f._parsedVast=i;var h=null===(a=f._parsedVast)||void 0===a?void 0:Qb(s=a.ads).call(s,(function(e){return e.creatives.length>0})),d=null==h||null===(l=h.creatives)||void 0===l?void 0:Qb(l).call(l,(function(e){return null==e?void 0:e.mediaFiles}));return f._skipOffset=null==d?void 0:d.skipDelay,f._trackingEvents=null==d?void 0:d.trackingEvents,f._type=null==d?void 0:d.type,f._videoClickTracking=null==d||null===(u=d.videoClickTrackingURLTemplates)||void 0===u?void 0:qw(u).call(u,(function(e){return e.url})),f._videoClickThrough=null==d?void 0:d.videoClickThroughURLTemplate,f._impressionTracking=null==h||null===(c=h.impressionURLTemplates)||void 0===c?void 0:qw(c).call(c,(function(e){return e.url})),f._errorTracking=null==h?void 0:h.errorURLTemplates,f}return fy(n,[{key:"trackingEvents",get:function(){var e;return EP(EP({},this._trackingEvents),{},(ym(e={},LP.CLICK,this._videoClickTracking),ym(e,LP.IMPRESSION,this._impressionTracking),ym(e,LP.ERROR,this._errorTracking),e))}},{key:"errorTracking",get:function(){return this._errorTracking}},{key:"isLinear",value:function(){return"linear"===this._type}},{key:"getVideoClickThrough",value:function(){var e;return null===(e=this._videoClickThrough)||void 0===e?void 0:e.url}},{key:"getStartTime",value:function(){return this._ad.startTime}},{key:"getSkipOffset",value:function(){return this._skipOffset}},{key:"getDuration",value:function(){return this._ad.duration}},{key:"getAdId",value:function(){return this._ad.id}},{key:"isSlate",value:function(){var e;return!!this._ad.idWithSlate&&"slate"===(null===(e=this._ad.idWithSlate)||void 0===e?void 0:e.split("-"))[0]}},{key:"getBreakId",value:function(){return this._breakId}},{key:"getState",value:function(){return this._state}},{key:"setState",value:function(e){this._state=e}},{key:"isSkippable",value:function(){return"number"==typeof this.getSkipOffset()}},{key:"getSkipTimeOffset",value:function(){if(this.isSkippable()){var e=this.getSkipOffset();if("number"==typeof e){var t=this.getRemainingTime()+e-this.getDuration();return Math.max(t,0)}}}},{key:"canSkip",value:function(){return 0==this.getSkipTimeOffset()}},{key:"skip",value:function(){this._player&&(this._player.currentTime=this._player.currentTime+this.getRemainingTime())}},{key:"click",value:function(){var e,t;null!==(e=this._videoClickThrough)&&void 0!==e&&e.url&&window.open(null===(t=this._videoClickThrough)||void 0===t?void 0:t.url,"_blank")}},{key:"canClick",value:function(){var e;return!(null===(e=this._videoClickThrough)||void 0===e||!e.url)}},{key:"getRemainingTime",value:function(){var e;return this._ad.startTime+this._ad.duration-(null===(e=this._player)||void 0===e||null===(e=e.media)||void 0===e?void 0:e.currentTime)}}]),n}(SP);function UP(e){return function(e){if(Wk(e))return oU(e)}(e)||function(e){if(void 0!==tc&&null!=$m(e)||null!=e["@@iterator"])return ub(e)}(e)||aU(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.")}()}var PP=Sn,DP=i,NP=Hi.f;PP({target:"Object",stat:!0,forced:DP((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:NP});var BP=ee.Object,FP=t((function(e){return BP.getOwnPropertyNames(e)})),jP=r.isFinite;Sn({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&jP(e)}});var VP=t(ee.Number.isFinite);function HP(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:e.id||null,adId:e.adId||null,sequence:e.sequence||null,apiFramework:e.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}var zP=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function qP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=GP(e);for(var o in!t.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=JP(Math.round(1e8*Math.random())),t.TIMESTAMP=(new Date).toISOString(),t.RANDOM=t.random=t.CACHEBUSTING,t)t[o]=$P(t[o]);for(var a in i){var s=i[a];"string"==typeof s&&r.push(WP(s,t))}return r}function WP(e,t){var n=(e=KP(e,t)).match(/[^[\]]+(?=])/g);if(!n)return e;var r=pk(n).call(n,(function(e){return jb(zP).call(zP,e)>-1}));return 0===r.length?e:KP(e,r=IO(r).call(r,(function(e,t){return e[t]=-1,e}),{}))}function KP(e,t){var n=e;for(var r in t){var i=t[r];n=n.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),i)}return n}function GP(e){return Kk(e)?qw(e).call(e,(function(e){return e&&e.hasOwnProperty("url")?e.url:e})):e}function YP(e){return/^(https?:\/\/|\/\/)/.test(e)}function QP(e,t){for(var n=0;n<t.length;n++)if(XP(t[n],e))return!0;return!1}function XP(e,t){if(e&&t){var n=FP(e),r=FP(t);return n.length===r.length&&e.id===t.id&&e.url===t.url}return!1}function $P(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16))}))}function JP(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return XT(t=e.toString()).call(t,n,"0")}var ZP={track:function(e,t,n){var r;gk(r=qP(e,t,n)).call(r,(function(e){"undefined"!=typeof window&&null!==window&&((new Image).src=e)}))},resolveURLTemplates:qP,extractURLsFromTemplates:GP,filterUrlTemplates:function(e){return IO(e).call(e,(function(e,t){var n=t.url||t;return YP(n)?e.validUrls.push(n):e.invalidUrls.push(n),e}),{validUrls:[],invalidUrls:[]})},containsTemplateObject:QP,isTemplateObjectEqual:XP,encodeURIComponentRFC3986:$P,replaceUrlMacros:WP,isNumeric:function(e){return!isNaN(MA(e))&&isFinite(e)},flatten:function e(t){return IO(t).call(t,(function(t,n){return Tm(t).call(t,Kk(n)?e(n):n)}),[])},joinArrayOfUniqueTemplateObjs:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Kk(t)?t:[],i=Kk(n)?n:[];return IO(e=Tm(r).call(r,i)).call(e,(function(e,t){return QP(t,e)||e.push(t),e}),[])},isValidTimeValue:function(e){return VP(e)&&e>=-2},addLeadingZeros:JP,isValidUrl:YP,isBrowserEnvironment:function(){return"undefined"!=typeof window},formatMacrosValues:function(e){return"object"!=wc(e)?e:Ym(e)}};function eD(e){var t;return Tx(t=["true","TRUE","True","1"]).call(t,e)}var tD={childByName:function(e,t){var n;return Qb(n=cb(e.childNodes)).call(n,(function(e){return e.nodeName===t}))},childrenByName:function(e,t){var n;return pk(n=cb(e.childNodes)).call(n,(function(e){return e.nodeName===t}))},resolveVastAdTagURI:function(e,t){if(!t)return e;if(ix(e).call(e,"//")){var n,r=location.protocol;return Tm(n="".concat(r)).call(n,e)}if(!Tx(e).call(e,"://")){var i,o=Fk(t).call(t,0,LU(t).call(t,"/"));return Tm(i="".concat(o,"/")).call(i,e)}return e},parseBoolean:eD,parseNodeText:function(e){var t;return e&&VA(t=e.textContent||e.text||"").call(t)},copyNodeAttribute:function(e,t,n){var r=t.getAttribute(e);r&&n.setAttribute(e,r)},parseAttributes:function(e){var t;return IO(t=cb(e.attributes)).call(t,(function(e,t){return e[t.nodeName]=t.nodeValue,e}),{})},parseDuration:function(e){if(null==e)return-1;if(ZP.isNumeric(e))return Bw(e);var t=e.split(":");if(3!==t.length)return-1;var n=t[2].split("."),r=Bw(n[0]);2===n.length&&(r+=MA("0.".concat(n[1])));var i=Bw(60*t[1]),o=Bw(60*t[0]*60);return isNaN(o)||isNaN(i)||isNaN(r)||i>3600||r>60?-1:o+i+r},splitVAST:function(e){var t=[],n=null;return gk(e).call(e,(function(r,i){if(r.sequence&&(r.sequence=Bw(r.sequence,10)),r.sequence>1){var o=e[i-1];if(o&&o.sequence===r.sequence-1)return void(n&&n.push(r));delete r.sequence}n=[r],t.push(n)})),t},assignAttributes:function(e,t){var n;e&&gk(n=cb(e)).call(n,(function(e){var n=e.nodeName,r=e.nodeValue;if(n&&r&&t.hasOwnProperty(n)){var i=r;"boolean"==typeof t[n]&&(i=eD(i)),t[n]=i}}))},mergeWrapperAdData:function(e,t){var n,r,i,o,a,s,l,u,c;e.errorURLTemplates=Tm(n=t.errorURLTemplates).call(n,e.errorURLTemplates),e.impressionURLTemplates=Tm(r=t.impressionURLTemplates).call(r,e.impressionURLTemplates),e.extensions=Tm(i=t.extensions).call(i,e.extensions),t.viewableImpression.length>0&&(e.viewableImpression=Tm(o=[]).call(o,UP(e.viewableImpression),UP(t.viewableImpression))),e.followAdditionalWrappers=t.followAdditionalWrappers,e.allowMultipleAds=t.allowMultipleAds,e.fallbackOnNoAd=t.fallbackOnNoAd;var f=pk(a=t.creatives||[]).call(a,(function(e){return e&&"companion"===e.type})),h=IO(f).call(f,(function(e,t){var n;return gk(n=t.variations||[]).call(n,(function(t){var n;gk(n=t.companionClickTrackingURLTemplates||[]).call(n,(function(t){ZP.containsTemplateObject(t,e)||e.push(t)}))})),e}),[]);e.creatives=Tm(f).call(f,e.creatives);var d=t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length,p=t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length;if(gk(s=e.creatives).call(s,(function(e){var n,r,i;if(t.trackingEvents&&t.trackingEvents[e.type])for(var o in t.trackingEvents[e.type]){var a,s=t.trackingEvents[e.type][o];Kk(e.trackingEvents[o])||(e.trackingEvents[o]=[]),e.trackingEvents[o]=Tm(a=e.trackingEvents[o]).call(a,s)}"linear"===e.type&&(d&&(e.videoClickTrackingURLTemplates=Tm(n=e.videoClickTrackingURLTemplates).call(n,t.videoClickTrackingURLTemplates)),p&&(e.videoCustomClickURLTemplates=Tm(r=e.videoCustomClickURLTemplates).call(r,t.videoCustomClickURLTemplates)),!t.videoClickThroughURLTemplate||null!==e.videoClickThroughURLTemplate&&void 0!==e.videoClickThroughURLTemplate||(e.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)),"companion"===e.type&&h.length&&gk(i=e.variations||[]).call(i,(function(e){e.companionClickTrackingURLTemplates=ZP.joinArrayOfUniqueTemplateObjs(e.companionClickTrackingURLTemplates,h)}))})),t.adVerifications&&(e.adVerifications=Tm(l=e.adVerifications).call(l,t.adVerifications)),t.blockedAdCategories&&(e.blockedAdCategories=Tm(u=e.blockedAdCategories).call(u,t.blockedAdCategories)),null!==(c=t.creatives)&&void 0!==c&&c.length){var v,g,y=pk(v=t.creatives).call(v,(function(e){var t;return(null===(t=e.icons)||void 0===t?void 0:t.length)&&!e.mediaFiles.length}));y.length&&(e.creatives=Tm(g=e.creatives).call(g,y))}}};function nD(e,t){var n,r=function(){var e=HP(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:e.id,adId:e.adId,sequence:e.sequence,apiFramework:e.apiFramework,type:"companion",required:null,variations:[]}}(t);return r.required=e.getAttribute("required")||null,r.variations=qw(n=tD.childrenByName(e,"Companion")).call(n,(function(e){var t,n,r,i,o,a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:e.id||null,adType:"companionAd",width:e.width||0,height:e.height||0,assetWidth:e.assetWidth||null,assetHeight:e.assetHeight||null,expandedWidth:e.expandedWidth||null,expandedHeight:e.expandedHeight||null,apiFramework:e.apiFramework||null,adSlotId:e.adSlotId||null,pxratio:e.pxratio||"1",renderingMode:e.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}}(tD.parseAttributes(e));a.htmlResources=IO(t=tD.childrenByName(e,"HTMLResource")).call(t,(function(e,t){var n=tD.parseNodeText(t);return n?Tm(e).call(e,n):e}),[]),a.iframeResources=IO(n=tD.childrenByName(e,"IFrameResource")).call(n,(function(e,t){var n=tD.parseNodeText(t);return n?Tm(e).call(e,n):e}),[]),a.staticResources=IO(r=tD.childrenByName(e,"StaticResource")).call(r,(function(e,t){var n=tD.parseNodeText(t);return n?Tm(e).call(e,{url:n,creativeType:t.getAttribute("creativeType")||null}):e}),[]),a.altText=tD.parseNodeText(tD.childByName(e,"AltText"))||null;var s=tD.childByName(e,"TrackingEvents");s&&gk(i=tD.childrenByName(s,"Tracking")).call(i,(function(e){var t=e.getAttribute("event"),n=tD.parseNodeText(e);t&&n&&(Kk(a.trackingEvents[t])||(a.trackingEvents[t]=[]),a.trackingEvents[t].push(n))})),a.companionClickTrackingURLTemplates=qw(o=tD.childrenByName(e,"CompanionClickTracking")).call(o,(function(e){return{id:e.getAttribute("id")||null,url:tD.parseNodeText(e)}})),a.companionClickThroughURLTemplate=tD.parseNodeText(tD.childByName(e,"CompanionClickThrough"))||null;var l=tD.childByName(e,"AdParameters");return l&&(a.adParameters={value:tD.parseNodeText(l),xmlEncoded:l.getAttribute("xmlEncoded")||null}),a})),r}function rD(e,t){var n,r,i,o,a=function(){var e=HP(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:e.id,adId:e.adId,sequence:e.sequence,apiFramework:e.apiFramework,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}}(t);a.duration=tD.parseDuration(tD.parseNodeText(tD.childByName(e,"Duration")));var s=e.getAttribute("skipoffset");if(null==s)a.skipDelay=null;else if("%"===s.charAt(s.length-1)&&-1!==a.duration){var l=Bw(s,10);a.skipDelay=a.duration*(l/100)}else a.skipDelay=tD.parseDuration(s);var u=tD.childByName(e,"VideoClicks");if(u){var c,f,h=tD.childByName(u,"ClickThrough");a.videoClickThroughURLTemplate=h?{id:h.getAttribute("id")||null,url:tD.parseNodeText(h)}:null,gk(c=tD.childrenByName(u,"ClickTracking")).call(c,(function(e){a.videoClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:tD.parseNodeText(e)})})),gk(f=tD.childrenByName(u,"CustomClick")).call(f,(function(e){a.videoCustomClickURLTemplates.push({id:e.getAttribute("id")||null,url:tD.parseNodeText(e)})}))}var d=tD.childByName(e,"AdParameters");d&&(a.adParameters={value:tD.parseNodeText(d),xmlEncoded:d.getAttribute("xmlEncoded")||null}),gk(n=tD.childrenByName(e,"TrackingEvents")).call(n,(function(e){var t;gk(t=tD.childrenByName(e,"Tracking")).call(t,(function(e){var t=e.getAttribute("event"),n=tD.parseNodeText(e);if(t&&n){if("progress"===t){if(!(o=e.getAttribute("offset")))return;t="%"===o.charAt(o.length-1)?"progress-".concat(o):"progress-".concat(Math.round(tD.parseDuration(o)))}Kk(a.trackingEvents[t])||(a.trackingEvents[t]=[]),a.trackingEvents[t].push(n)}}))})),gk(r=tD.childrenByName(e,"MediaFiles")).call(r,(function(e){var t,n;gk(t=tD.childrenByName(e,"MediaFile")).call(t,(function(e){a.mediaFiles.push(function(e){var t={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};t.id=e.getAttribute("id"),t.fileURL=tD.parseNodeText(e),t.deliveryType=e.getAttribute("delivery"),t.codec=e.getAttribute("codec"),t.mimeType=e.getAttribute("type"),t.mediaType=e.getAttribute("mediaType")||"2D",t.apiFramework=e.getAttribute("apiFramework"),t.fileSize=Bw(e.getAttribute("fileSize")||0),t.bitrate=Bw(e.getAttribute("bitrate")||0),t.minBitrate=Bw(e.getAttribute("minBitrate")||0),t.maxBitrate=Bw(e.getAttribute("maxBitrate")||0),t.width=Bw(e.getAttribute("width")||0),t.height=Bw(e.getAttribute("height")||0);var n=e.getAttribute("scalable");n&&"string"==typeof n&&(t.scalable=tD.parseBoolean(n));var r=e.getAttribute("maintainAspectRatio");return r&&"string"==typeof r&&(t.maintainAspectRatio=tD.parseBoolean(r)),t}(e))}));var r,i,o=tD.childByName(e,"InteractiveCreativeFile");o&&(a.interactiveCreativeFile=(r=o,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type||null,apiFramework:e.apiFramework||null,variableDuration:tD.parseBoolean(e.variableDuration),fileURL:null}}(tD.parseAttributes(r)),i.fileURL=tD.parseNodeText(r),i));var s=tD.childByName(e,"ClosedCaptionFiles");s&&gk(n=tD.childrenByName(s,"ClosedCaptionFile")).call(n,(function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type||null,language:e.language||null,fileURL:null}}(tD.parseAttributes(e));t.fileURL=tD.parseNodeText(e),a.closedCaptionFiles.push(t)}));var l=tD.childByName(e,"Mezzanine"),u=function(e,t){var n={},r=!1;return gk(t).call(t,(function(t){e&&e.getAttribute(t)?n[t]=e.getAttribute(t):r=!0})),r?null:n}(l,["delivery","type","width","height"]);if(u){var c={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};c.id=l.getAttribute("id"),c.fileURL=tD.parseNodeText(l),c.delivery=u.delivery,c.codec=l.getAttribute("codec"),c.type=u.type,c.width=Bw(u.width,10),c.height=Bw(u.height,10),c.fileSize=Bw(l.getAttribute("fileSize"),10),c.mediaType=l.getAttribute("mediaType")||"2D",a.mezzanine=c}}));var p=tD.childByName(e,"Icons");return p&&gk(i=tD.childrenByName(p,"Icon")).call(i,(function(e){a.icons.push(function(e,t,n,r){var i,o,a={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[]};a.program=e.getAttribute("program"),a.height=Bw(e.getAttribute("height")||0),a.width=Bw(e.getAttribute("width")||0),a.xPosition=(i=e.getAttribute("xPosition"),-1!==jb(o=["left","right"]).call(o,i)?i:Bw(i||0)),a.yPosition=function(e,t){return-1!==jb(t=["top","bottom"]).call(t,e)?e:Bw(e||0)}(e.getAttribute("yPosition")),a.apiFramework=e.getAttribute("apiFramework"),a.pxratio=e.getAttribute("pxratio")||"1",a.offset=tD.parseDuration(e.getAttribute("offset")),a.duration=tD.parseDuration(e.getAttribute("duration")),gk(t=tD.childrenByName(e,"HTMLResource")).call(t,(function(e){a.type=e.getAttribute("creativeType")||"text/html",a.htmlResource=tD.parseNodeText(e)})),gk(n=tD.childrenByName(e,"IFrameResource")).call(n,(function(e){a.type=e.getAttribute("creativeType")||0,a.iframeResource=tD.parseNodeText(e)})),gk(r=tD.childrenByName(e,"StaticResource")).call(r,(function(e){a.type=e.getAttribute("creativeType")||0,a.staticResource=tD.parseNodeText(e)}));var s=tD.childByName(e,"IconClicks");if(s){var l,u;a.iconClickThroughURLTemplate=tD.parseNodeText(tD.childByName(s,"IconClickThrough")),gk(l=tD.childrenByName(s,"IconClickTracking")).call(l,(function(e){a.iconClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:tD.parseNodeText(e)})}));var c=tD.childByName(s,"IconClickFallbackImages");c&&gk(u=tD.childrenByName(c,"IconClickFallbackImage")).call(u,(function(e){a.iconClickFallbackImages.push({url:tD.parseNodeText(e)||null,width:e.getAttribute("width")||null,height:e.getAttribute("height")||null})}))}return a.iconViewTrackingURLTemplate=tD.parseNodeText(tD.childByName(e,"IconViewTracking")),a}(e))})),a}function iD(e,t){var n,r,i=function(){var e=HP(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:e.id,adId:e.adId,sequence:e.sequence,apiFramework:e.apiFramework,type:"nonlinear",variations:[],trackingEvents:{}}}(t);return gk(n=tD.childrenByName(e,"TrackingEvents")).call(n,(function(e){var t,n,r;gk(t=tD.childrenByName(e,"Tracking")).call(t,(function(e){n=e.getAttribute("event"),r=tD.parseNodeText(e),n&&r&&(Kk(i.trackingEvents[n])||(i.trackingEvents[n]=[]),i.trackingEvents[n].push(r))}))})),gk(r=tD.childrenByName(e,"NonLinear")).call(r,(function(e){var t,n,r,o,a={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};a.id=e.getAttribute("id")||null,a.width=e.getAttribute("width"),a.height=e.getAttribute("height"),a.expandedWidth=e.getAttribute("expandedWidth"),a.expandedHeight=e.getAttribute("expandedHeight"),a.scalable=tD.parseBoolean(e.getAttribute("scalable")),a.maintainAspectRatio=tD.parseBoolean(e.getAttribute("maintainAspectRatio")),a.minSuggestedDuration=tD.parseDuration(e.getAttribute("minSuggestedDuration")),a.apiFramework=e.getAttribute("apiFramework"),gk(t=tD.childrenByName(e,"HTMLResource")).call(t,(function(e){a.type=e.getAttribute("creativeType")||"text/html",a.htmlResource=tD.parseNodeText(e)})),gk(n=tD.childrenByName(e,"IFrameResource")).call(n,(function(e){a.type=e.getAttribute("creativeType")||0,a.iframeResource=tD.parseNodeText(e)})),gk(r=tD.childrenByName(e,"StaticResource")).call(r,(function(e){a.type=e.getAttribute("creativeType")||0,a.staticResource=tD.parseNodeText(e)}));var s=tD.childByName(e,"AdParameters");s&&(a.adParameters={value:tD.parseNodeText(s),xmlEncoded:s.getAttribute("xmlEncoded")||null}),a.nonlinearClickThroughURLTemplate=tD.parseNodeText(tD.childByName(e,"NonLinearClickThrough")),gk(o=tD.childrenByName(e,"NonLinearClickTracking")).call(o,(function(e){a.nonlinearClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:tD.parseNodeText(e)})})),i.variations.push(a)})),i}function oD(e){var t=[];return gk(e).call(e,(function(e){var n=aD(e);n&&t.push(n)})),t}function aD(e){var t;if("#comment"===e.nodeName)return null;var n,r={name:null,value:null,attributes:{},children:[]},i=e.attributes,o=e.childNodes;if(r.name=e.nodeName,e.attributes)for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];s.nodeName&&s.nodeValue&&(r.attributes[s.nodeName]=s.nodeValue)}for(var l in o)if(o.hasOwnProperty(l)){var u=aD(o[l]);u&&r.children.push(u)}if(0===r.children.length||1===r.children.length&&jb(t=["#cdata-section","#text"]).call(t,r.children[0].name)>=0){var c=tD.parseNodeText(e);""!==c&&(r.value=c),r.children=[]}return null===(n=r).value&&0===rk(n.attributes).length&&0===n.children.length?null:r}function sD(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}var lD={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function uD(e,t){var n;if(lD[e.nodeName]&&lD[e.nodeName].attributes){var r=pk(n=lD[e.nodeName].attributes).call(n,(function(t){return!e.getAttribute(t)}));r.length>0&&hD({name:e.nodeName,parentName:e.parentNode.nodeName,attributes:r},t)}}function cD(e,t,n){var r,i=lD[e.nodeName],o=!n&&"Wrapper"!==e.nodeName;if(i&&!o){if(i.subElements){var a,s=pk(a=i.subElements).call(a,(function(t){return!tD.childByName(e,t)}));s.length>0&&hD({name:e.nodeName,parentName:e.parentNode.nodeName,subElements:s},t)}n&&i.oneOfinLineResources&&(LT(r=i.oneOfinLineResources).call(r,(function(t){return tD.childByName(e,t)}))||hD({name:e.nodeName,parentName:e.parentNode.nodeName,oneOfResources:i.oneOfinLineResources},t))}}function fD(e){return e.children&&0!==e.children.length}function hD(e,t){var n=e.name,r=e.parentName,i=e.attributes,o=e.subElements,a=e.oneOfResources,s="Element '".concat(n,"'");t("VAST-warning",{message:s+=i?" missing required attribute(s) '".concat(i.join(", "),"' "):o?" missing required sub element(s) '".concat(o.join(", "),"' "):a?" must provide one of the following '".concat(a.join(", "),"' "):" is empty",parentElement:r,specVersion:4.1})}var dD={verifyRequiredValues:function e(t,n,r){if(t&&t.nodeName)if("InLine"===t.nodeName&&(r=!0),uD(t,n),fD(t)){cD(t,n,r);for(var i=0;i<t.children.length;i++)e(t.children[i],n,r)}else 0===tD.parseNodeText(t).length&&hD({name:t.nodeName,parentName:t.parentNode.nodeName},n)},hasSubElements:fD,emitMissingValueWarning:hD,verifyRequiredAttributes:uD,verifyRequiredSubElements:cD};function pD(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.allowMultipleAds,a=i.followAdditionalWrappers,s=sU(pk(n=cb(e.childNodes)).call(n,(function(e){var t=e.nodeName.toLowerCase();return"inline"===t||!1!==a&&"wrapper"===t})));try{for(s.s();!(r=s.n()).done;){var l=r.value;if(tD.copyNodeAttribute("id",e,l),tD.copyNodeAttribute("sequence",e,l),tD.copyNodeAttribute("adType",e,l),"Wrapper"===l.nodeName)return{ad:yD(l,t),type:"WRAPPER"};if("InLine"===l.nodeName)return{ad:vD(l,t,{allowMultipleAds:o}),type:"INLINE"};var u=l.nodeName.toLowerCase();t("VAST-warning",{message:"<".concat(l.nodeName,"inline"===u?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:l})}}catch(c){s.e(c)}finally{s.f()}}function vD(e,t){return!1===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allowMultipleAds&&e.getAttribute("sequence")?null:gD(e,t)}function gD(e,t){var n,r=[];t&&dD.verifyRequiredValues(e,t);var i=cb(e.childNodes),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:e.id||null,sequence:e.sequence||null,adType:e.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}}(tD.parseAttributes(e));return gk(i).call(i,(function(e){switch(e.nodeName){case"Error":o.errorURLTemplates.push(tD.parseNodeText(e));break;case"Impression":o.impressionURLTemplates.push({id:e.getAttribute("id")||null,url:tD.parseNodeText(e)});break;case"Creatives":o.creatives=(n=tD.childrenByName(e,"Creative"),i=[],gk(n).call(n,(function(e){var t,n,r={id:e.getAttribute("id")||null,adId:sD(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null},o=[];gk(t=tD.childrenByName(e,"UniversalAdId")).call(t,(function(e){var t={idRegistry:e.getAttribute("idRegistry")||"unknown",value:tD.parseNodeText(e)};o.push(t)}));var a=tD.childByName(e,"CreativeExtensions");for(var s in a&&(n=oD(tD.childrenByName(a,"CreativeExtension"))),e.childNodes){var l=e.childNodes[s],u=void 0;switch(l.nodeName){case"Linear":u=rD(l,r);break;case"NonLinearAds":u=iD(l,r);break;case"CompanionAds":u=nD(l,r)}u&&(o&&(u.universalAdIds=o),n&&(u.creativeExtensions=n),i.push(u))}})),i);break;case"Extensions":var t=tD.childrenByName(e,"Extension");o.extensions=oD(t),o.adVerifications.length||(r=function(e){var t=null,n=[];return LT(e).call(e,(function(e){return t=tD.childByName(e,"AdVerifications")})),t&&(n=mD(tD.childrenByName(t,"Verification"))),n}(t));break;case"AdVerifications":o.adVerifications=mD(tD.childrenByName(e,"Verification"));break;case"AdSystem":o.system={value:tD.parseNodeText(e),version:e.getAttribute("version")||null};break;case"AdTitle":o.title=tD.parseNodeText(e);break;case"AdServingId":o.adServingId=tD.parseNodeText(e);break;case"Category":o.categories.push({authority:e.getAttribute("authority")||null,value:tD.parseNodeText(e)});break;case"Expires":o.expires=Bw(tD.parseNodeText(e),10);break;case"ViewableImpression":o.viewableImpression.push(function(e,t,n,r){var i=function(e,t){var n=tD.parseNodeText(t);return n&&e.push(n),e};return{id:e.getAttribute("id")||null,viewable:IO(t=tD.childrenByName(e,"Viewable")).call(t,i,[]),notViewable:IO(n=tD.childrenByName(e,"NotViewable")).call(n,i,[]),viewUndetermined:IO(r=tD.childrenByName(e,"ViewUndetermined")).call(r,i,[])}}(e));break;case"Description":o.description=tD.parseNodeText(e);break;case"Advertiser":o.advertiser={id:e.getAttribute("id")||null,value:tD.parseNodeText(e)};break;case"Pricing":o.pricing={value:tD.parseNodeText(e),model:e.getAttribute("model")||null,currency:e.getAttribute("currency")||null};break;case"Survey":o.survey={value:tD.parseNodeText(e),type:e.getAttribute("type")||null};break;case"BlockedAdCategories":o.blockedAdCategories.push({authority:e.getAttribute("authority")||null,value:tD.parseNodeText(e)})}var n,i})),r.length&&(o.adVerifications=Tm(n=o.adVerifications).call(n,r)),o}function yD(e,t){var n,r=gD(e,t),i=e.getAttribute("followAdditionalWrappers"),o=e.getAttribute("allowMultipleAds"),a=e.getAttribute("fallbackOnNoAd");r.followAdditionalWrappers=!i||tD.parseBoolean(i),r.allowMultipleAds=!!o&&tD.parseBoolean(o),r.fallbackOnNoAd=a?tD.parseBoolean(a):null;var s=tD.childByName(e,"VASTAdTagURI");if(s?r.nextWrapperURL=tD.parseNodeText(s):(s=tD.childByName(e,"VASTAdTagURL"))&&(r.nextWrapperURL=tD.parseNodeText(tD.childByName(s,"URL"))),gk(n=r.creatives).call(n,(function(e){var t;if(Tx(t=["linear","nonlinear"]).call(t,e.type)){var n,i;if(e.trackingEvents){r.trackingEvents||(r.trackingEvents={}),r.trackingEvents[e.type]||(r.trackingEvents[e.type]={});var o=function(t){var n=e.trackingEvents[t];Kk(r.trackingEvents[e.type][t])||(r.trackingEvents[e.type][t]=[]),gk(n).call(n,(function(n){r.trackingEvents[e.type][t].push(n)}))};for(var a in e.trackingEvents)o(a)}e.videoClickTrackingURLTemplates&&(Kk(r.videoClickTrackingURLTemplates)||(r.videoClickTrackingURLTemplates=[]),gk(n=e.videoClickTrackingURLTemplates).call(n,(function(e){r.videoClickTrackingURLTemplates.push(e)}))),e.videoClickThroughURLTemplate&&(r.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),e.videoCustomClickURLTemplates&&(Kk(r.videoCustomClickURLTemplates)||(r.videoCustomClickURLTemplates=[]),gk(i=e.videoCustomClickURLTemplates).call(i,(function(e){r.videoCustomClickURLTemplates.push(e)})))}})),r.nextWrapperURL)return r}function mD(e){var t=[];return gk(e).call(e,(function(e){var n,r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},i=cb(e.childNodes);tD.assignAttributes(e.attributes,r),gk(i).call(i,(function(e){var t=e.nodeName,n=e.textContent,i=e.attributes;switch(t){case"JavaScriptResource":case"ExecutableResource":r.resource=VA(n).call(n),tD.assignAttributes(i,r);break;case"VerificationParameters":r.parameters=VA(n).call(n)}}));var o=tD.childByName(e,"TrackingEvents");o&&gk(n=tD.childrenByName(o,"Tracking")).call(n,(function(e){var t=e.getAttribute("event"),n=tD.parseNodeText(e);t&&n&&(Kk(r.trackingEvents[t])||(r.trackingEvents[t]=[]),r.trackingEvents[t].push(n))})),t.push(r)})),t}var kD=function(){function e(){ay(this,e),this._handlers=[]}return fy(e,[{key:"on",value:function(e,t){if("function"!=typeof t)throw new TypeError("The handler argument must be of type Function. Received type ".concat(wc(t)));if(!e)throw new TypeError("The event argument must be of type String. Received type ".concat(wc(e)));return this._handlers.push({event:e,handler:t}),this}},{key:"once",value:function(e,t){return this.on(e,function(e,t,n){var r={fired:!1,wrapFn:void 0};function i(){r.fired||(e.off(t,r.wrapFn),r.fired=!0,Vk(n).call(n,e).apply(void 0,arguments))}return r.wrapFn=i,i}(this,e,t))}},{key:"off",value:function(e,t){var n;return this._handlers=pk(n=this._handlers).call(n,(function(n){return n.event!==e||n.handler!==t})),this}},{key:"emit",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=!1;return gk(t=this._handlers).call(t,(function(t){var n;"*"===t.event&&(o=!0,t.handler.apply(t,Tm(n=[e]).call(n,r))),t.event===e&&(o=!0,t.handler.apply(t,r))})),o}},{key:"removeAllListeners",value:function(e){var t;return e?(this._handlers=pk(t=this._handlers).call(t,(function(t){return t.event!==e})),this):(this._handlers=[],this)}},{key:"listenerCount",value:function(e){var t;return pk(t=this._handlers).call(t,(function(t){return t.event===e})).length}},{key:"listeners",value:function(e){var t;return IO(t=this._handlers).call(t,(function(t,n){return n.event===e&&t.push(n.handler),t}),[])}},{key:"eventNames",value:function(){var e;return qw(e=this._handlers).call(e,(function(e){return e.event}))}}]),e}(),bD=0,wD=0,TD={ERRORCODE:900,extensions:[]},AD="VAST response version not supported",_D=function(e){Zy(n,e);var t=gm(n);function n(){var e;ay(this,n);var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).fetcher;return(e=t.call(this)).maxWrapperDepth=null,e.rootErrorURLTemplates=[],e.errorURLTemplates=[],e.remainingAds=[],e.parsingOptions={},e.fetcher=r||null,e}return fy(n,[{key:"trackVastError",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];this.emit("VAST-error",oT.apply(Object,Tm(n=[{},TD,t]).call(n,i))),ZP.track(e,t)}},{key:"getErrorURLTemplates",value:function(){var e;return Tm(e=this.rootErrorURLTemplates).call(e,this.errorURLTemplates)}},{key:"getEstimatedBitrate",value:function(){return wD}},{key:"initParsingStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.maxWrapperDepth=e.wrapperLimit||10,this.parsingOptions={allowMultipleAds:e.allowMultipleAds},this.rootURL="",this.resetParsingStatus(),function(e,t){!e||!t||e<=0||t<=0||(wD=(wD*bD+8*e/t)/++bD)}(e.byteLength,e.requestDuration)}},{key:"resetParsingStatus",value:function(){this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.vastVersion=null}},{key:"getRemainingAds",value:function(e){var t=this;if(0===this.remainingAds.length)return Nk.reject(new Error("No more ads are available for the given VAST"));var n=e?ZP.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.resolveAds(n,{wrapperDepth:0,url:this.rootURL}).then((function(e){return t.buildVASTResponse(e)}))}},{key:"parseVAST",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(e,n).then((function(e){return t.buildVASTResponse(e)}))}},{key:"buildVASTResponse",value:function(e){var t,n={ads:(t={ads:e,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion}).ads||[],errorURLTemplates:t.errorURLTemplates||[],version:t.version||null};return this.completeWrapperResolving(n),n}},{key:"parseVastXml",value:function(e,t){var n=t.isRootVAST,r=void 0!==n&&n,i=t.url,o=void 0===i?null:i,a=t.wrapperDepth,s=void 0===a?0:a,l=t.allowMultipleAds,u=t.followAdditionalWrappers;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName){var c;this.emit("VAST-ad-parsed",{type:"ERROR",url:o,wrapperDepth:s});var f="VideoAdServingTemplate"===(null==e||null===(c=e.documentElement)||void 0===c?void 0:c.nodeName);throw new Error(f?AD:"Invalid VAST XMLDocument")}var h=[],d=e.documentElement.childNodes,p=e.documentElement.getAttribute("version");for(var v in r&&p&&(this.vastVersion=p),d){var g=d[v];if("Error"===g.nodeName){var y=tD.parseNodeText(g);r?this.rootErrorURLTemplates.push(y):this.errorURLTemplates.push(y)}else if("Ad"===g.nodeName){var m;if(this.vastVersion&&MA(this.vastVersion)<3)l=!0;else if(!1===l&&h.length>1)break;var k=pD(g,Vk(m=this.emit).call(m,this),{allowMultipleAds:l,followAdditionalWrappers:u});k.ad?(h.push(k.ad),this.emit("VAST-ad-parsed",{type:k.type,url:o,wrapperDepth:s,adIndex:h.length-1,vastVersion:p})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return h}},{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.url,r=void 0===n?null:n,i=t.resolveAll,o=void 0===i||i,a=t.wrapperSequence,s=void 0===a?null:a,l=t.previousUrl,u=void 0===l?null:l,c=t.wrapperDepth,f=void 0===c?0:c,h=t.isRootVAST,d=void 0!==h&&h,p=t.followAdditionalWrappers,v=t.allowMultipleAds,g=[];this.vastVersion&&MA(this.vastVersion)<3&&d&&(v=!0);try{g=this.parseVastXml(e,{isRootVAST:d,url:r,wrapperDepth:f,allowMultipleAds:v,followAdditionalWrappers:p})}catch(y){return Nk.reject(y)}return 1===g.length&&null!=s&&(g[0].sequence=s),!1===o&&(this.remainingAds=tD.splitVAST(g),g=this.remainingAds.shift()),this.resolveAds(g,{wrapperDepth:f,previousUrl:u,url:r})}},{key:"resolveAds",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=n.wrapperDepth,i=n.previousUrl,o=n.url,a=[];return i=o,gk(t).call(t,(function(t){var n=e.resolveWrappers(t,r,i);a.push(n)})),Nk.all(a).then((function(e){return ZP.flatten(e)}))}},{key:"resolveWrappers",value:function(e,t,n){var r=this,i=EP({},e);return new Nk((function(e){var o,a;if(t++,!i.nextWrapperURL)return delete i.nextWrapperURL,e(i);if(!r.fetcher)return i.VASTAdTagURI=i.nextWrapperURL,delete i.nextWrapperURL,e(i);if(t>=r.maxWrapperDepth)return i.errorCode=302,delete i.nextWrapperURL,e(i);i.nextWrapperURL=tD.resolveVastAdTagURI(i.nextWrapperURL,n);var s=null!==(a=r.parsingOptions.allowMultipleAds)&&void 0!==a?a:i.allowMultipleAds,l=i.sequence;r.fetcher.fetchVAST({url:i.nextWrapperURL,emitter:Vk(o=r.emit).call(o,r),maxWrapperDepth:r.maxWrapperDepth}).then((function(o){return r.parse(o,{url:i.nextWrapperURL,previousUrl:n,wrapperSequence:l,wrapperDepth:t,followAdditionalWrappers:i.followAdditionalWrappers,allowMultipleAds:s}).then((function(t){if(delete i.nextWrapperURL,0===t.length)return i.creatives=[],e(i);gk(t).call(t,(function(e){e&&tD.mergeWrapperAdData(e,i)})),e(t)}))})).catch((function(t){i.errorCode=t.message===AD?102:301,i.errorMessage=t.message,e(i)}))}))}},{key:"completeWrapperResolving",value:function(e){if(0===e.ads.length)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(var t=e.ads.length-1;t>=0;t--){var n,r,i,o=e.ads[t],a=!LT(n=o.creatives).call(n,(function(e){var t;return(null===(t=e.mediaFiles)||void 0===t?void 0:t.length)>0}));!o.errorCode&&!a||o.VASTAdTagURI||(this.trackVastError(Tm(r=o.errorURLTemplates).call(r,e.errorURLTemplates),{ERRORCODE:o.errorCode||303},{ERRORMESSAGE:o.errorMessage||""},{extensions:o.extensions},{system:o.system}),gw(i=e.ads).call(i,t,1))}}}]),n}(kD),ED=function(e){Zy(n,e);var t=gm(n);function n(e,r,i){var o;ay(this,n);var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];for(var l in(o=t.call(this)).ad=r,o.creative=i,o.variation=a,o.muted=s,o.impressed=!1,o.skippable=!1,o.trackingEvents={},o.lastPercentage=0,o._alreadyTriggeredQuartiles={},o.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],o.creative.trackingEvents){var u=o.creative.trackingEvents[l];o.trackingEvents[l]=Fk(u).call(u,0)}return"linear"!==o.creative.type?o._initVariationTracking():o._initLinearTracking(),e&&o.on("start",(function(){e.lastSuccessfulAd=L_()})),o}return fy(n,[{key:"_initLinearTracking",value:function(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates}},{key:"_initVariationTracking",value:function(){if(this.linear=!1,this.skipDelay=-1,this.variation){for(var e in this.variation.trackingEvents){var t,n=this.variation.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=Tm(t=this.trackingEvents[e]).call(t,Fk(n).call(n,0)):this.trackingEvents[e]=Fk(n).call(n,0)}"nonLinearAd"===this.variation.adType?(this.clickThroughURLTemplate=this.variation.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.nonlinearClickTrackingURLTemplates,this.setDuration(this.variation.minSuggestedDuration)):"companionAd"===this.variation.adType&&(this.clickThroughURLTemplate=this.variation.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.companionClickTrackingURLTemplates)}}},{key:"setDuration",value:function(e){ZP.isValidTimeValue(e)?(this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}):this.emit("TRACKER-error",{message:"the duration provided is not valid. duration: ".concat(e)})}},{key:"setProgress",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(ZP.isValidTimeValue(e)&&"object"==wc(r)){var o=this.skipDelay||-1;if(-1===o||this.skippable||(o>e?this.emit("skip-countdown",o-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){var a=Math.round(e/this.assetDuration*100),s=[];if(e>0){s.push("start");for(var l=this.lastPercentage;l<a;l++)s.push("progress-".concat(l+1,"%"));for(var u in s.push("progress-".concat(Math.round(e))),this.quartiles)this.isQuartileReached(u,this.quartiles[u],e)&&(s.push(u),this._alreadyTriggeredQuartiles[u]=!0);this.lastPercentage=a}gk(s).call(s,(function(e){n.track(e,{macros:r,once:i})})),e<this.progress&&this.track("rewind",{macros:r})}this.progress=e}else this.emit("TRACKER-error",{message:Tm(t="One given setProgress parameter has the wrong type. progress: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(r))})}},{key:"isQuartileReached",value:function(e,t,n){var r=!1;return t<=n&&!this._alreadyTriggeredQuartiles[e]&&(r=!0),r}},{key:"setMuted",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof e&&"object"==wc(n)?(this.muted!==e&&this.track(e?"mute":"unmute",{macros:n}),this.muted=e):this.emit("TRACKER-error",{message:Tm(t="One given setMuted parameter has the wrong type. muted: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(n))})}},{key:"setPaused",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof e&&"object"==wc(n)?(this.paused!==e&&this.track(e?"pause":"resume",{macros:n}),this.paused=e):this.emit("TRACKER-error",{message:Tm(t="One given setPaused parameter has the wrong type. paused: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(n))})}},{key:"setFullscreen",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof e&&"object"==wc(n)?(this.fullscreen!==e&&this.track(e?"fullscreen":"exitFullscreen",{macros:n}),this.fullscreen=e):this.emit("TRACKER-error",{message:Tm(t="One given setFullScreen parameter has the wrong type. fullscreen: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(n))})}},{key:"setExpand",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof e&&"object"==wc(n)?(this.expanded!==e&&(this.track(e?"expand":"collapse",{macros:n}),this.track(e?"playerExpand":"playerCollapse",{macros:n})),this.expanded=e):this.emit("TRACKER-error",{message:Tm(t="One given setExpand parameter has the wrong type. expanded: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(n))})}},{key:"setSkipDelay",value:function(e){ZP.isValidTimeValue(e)?this.skipDelay=e:this.emit("TRACKER-error",{message:"setSkipDelay parameter does not have a valid value. duration: ".concat(e)})}},{key:"trackImpression",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates,e),this.track("creativeView",{macros:e})):this.emit("TRACKER-error",{message:"trackImpression parameter has the wrong type. macros: ".concat(e)})}},{key:"trackViewableImpression",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(n)?gk(e=this.ad.viewableImpression).call(e,(function(e){t.trackURLs(e.viewable,n)})):this.emit("TRACKER-error",{message:"trackViewableImpression given macros has the wrong type. macros: ".concat(n)})}},{key:"trackNotViewableImpression",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(n)?gk(e=this.ad.viewableImpression).call(e,(function(e){t.trackURLs(e.notViewable,n)})):this.emit("TRACKER-error",{message:"trackNotViewableImpression given macros has the wrong type. macros: ".concat(n)})}},{key:"trackUndeterminedImpression",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(n)?gk(e=this.ad.viewableImpression).call(e,(function(e){t.trackURLs(e.viewUndetermined,n)})):this.emit("TRACKER-error",{message:"trackUndeterminedImpression given macros has the wrong type. macros: ".concat(n)})}},{key:"error",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"object"==wc(t)&&"boolean"==typeof n?this.trackURLs(this.ad.errorURLTemplates,t,{isCustomCode:n}):this.emit("TRACKER-error",{message:Tm(e="One given error parameter has the wrong type. macros: ".concat(ZP.formatMacrosValues(t),", isCustomCode: ")).call(e,n)})}},{key:"errorWithCode",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"string"==typeof e&&"boolean"==typeof n?(this.error({ERRORCODE:e},n),console.log("The method errorWithCode is deprecated, please use vast tracker error method instead")):this.emit("TRACKER-error",{message:Tm(t="One given errorWithCode parameter has the wrong type. errorCode: ".concat(e,", isCustomCode: ")).call(t,n)})}},{key:"complete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("complete",{macros:e}):this.emit("TRACKER-error",{message:"complete given macros has the wrong type. macros: ".concat(e)})}},{key:"notUsed",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?(this.track("notUsed",{macros:e}),this.trackingEvents=[]):this.emit("TRACKER-error",{message:"notUsed given macros has the wrong type. macros: ".concat(e)})}},{key:"otherAdInteraction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("otherAdInteraction",{macros:e}):this.emit("TRACKER-error",{message:"otherAdInteraction given macros has the wrong type. macros: ".concat(e)})}},{key:"acceptInvitation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("acceptInvitation",{macros:e}):this.emit("TRACKER-error",{message:"acceptInvitation given macros has the wrong type. macros: ".concat(e)})}},{key:"adExpand",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("adExpand",{macros:e}):this.emit("TRACKER-error",{message:"adExpand given macros has the wrong type. macros: ".concat(e)})}},{key:"adCollapse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("adCollapse",{macros:e}):this.emit("TRACKER-error",{message:"adCollapse given macros has the wrong type. macros: ".concat(e)})}},{key:"minimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("minimize",{macros:e}):this.emit("TRACKER-error",{message:"minimize given macros has the wrong type. macros: ".concat(e)})}},{key:"verificationNotExecuted",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e&&"object"==wc(r)){if(!this.ad||!this.ad.adVerifications||!this.ad.adVerifications.length)throw new Error("No adVerifications provided");if(!e)throw new Error("No vendor provided, unable to find associated verificationNotExecuted");var i=Qb(n=this.ad.adVerifications).call(n,(function(t){return t.vendor===e}));if(!i)throw new Error("No associated verification element found for vendor: ".concat(e));var o=i.trackingEvents;if(o&&o.verificationNotExecuted){var a=o.verificationNotExecuted;this.trackURLs(a,r),this.emit("verificationNotExecuted",{trackingURLTemplates:a})}}else this.emit("TRACKER-error",{message:Tm(t="One given verificationNotExecuted parameter has to wrong type. vendor: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(r))})}},{key:"overlayViewDuration",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&"object"==wc(n)?(n.ADPLAYHEAD=e,this.track("overlayViewDuration",{macros:n})):this.emit("TRACKER-error",{message:Tm(t="One given overlayViewDuration parameters has the wrong type. formattedDuration: ".concat(e,", macros: ")).call(t,ZP.formatMacrosValues(n))})}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track(this.linear?"closeLinear":"close",{macros:e}):this.emit("TRACKER-error",{message:"close given macros has the wrong type. macros: ".concat(e)})}},{key:"skip",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("skip",{macros:e}):this.emit("TRACKER-error",{message:"skip given macros has the wrong type. macros: ".concat(e)})}},{key:"load",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"==wc(e)?this.track("loaded",{macros:e}):this.emit("TRACKER-error",{message:"load given macros has the wrong type. macros: ".concat(e)})}},{key:"click",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null!==t&&"string"!=typeof t||"object"!=wc(n))this.emit("TRACKER-error",{message:Tm(e="One given click parameter has the wrong type. fallbackClickThroughURL: ".concat(t,", macros: ")).call(e,ZP.formatMacrosValues(n))});else{this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates,n);var r=this.clickThroughURLTemplate||t,i=EP({},n);if(r){this.progress&&(i.ADPLAYHEAD=this.progressFormatted());var o=ZP.resolveURLTemplates([r],i)[0];this.emit("clickthrough",o)}}}},{key:"track",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.macros,a=void 0===o?{}:o,s=i.once,l=void 0!==s&&s;if("object"==wc(a)){"closeLinear"===e&&!this.trackingEvents[e]&&this.trackingEvents.close&&(e="close");var u=this.trackingEvents[e],c=jb(t=this.emitAlwaysEvents).call(t,e)>-1;u?(this.emit(e,{trackingURLTemplates:u}),this.trackURLs(u,a)):c&&this.emit(e,null),l&&(delete this.trackingEvents[e],c&&gw(n=this.emitAlwaysEvents).call(n,jb(r=this.emitAlwaysEvents).call(r,e),1))}else this.emit("TRACKER-error",{message:"track given macros has the wrong type. macros: ".concat(a)})}},{key:"trackURLs",value:function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=ZP.filterUrlTemplates(e),l=s.validUrls,u=s.invalidUrls;u.length&&this.emit("TRACKER-error",{message:"Provided urls are malformed. url: ".concat(u)});var c=EP({},o);this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(c.ASSETURI=this.creative.mediaFiles[0].fileURL),this.progress&&(c.ADPLAYHEAD=this.progressFormatted())),null!==(i=this.creative)&&void 0!==i&&null!==(i=i.universalAdIds)&&void 0!==i&&i.length&&(c.UNIVERSALADID=qw(t=this.creative.universalAdIds).call(t,(function(e){var t;return Tm(t=e.idRegistry).call(t," ",e.value)})).join(",")),this.ad&&(this.ad.sequence&&(c.PODSEQUENCE=this.ad.sequence),this.ad.adType&&(c.ADTYPE=this.ad.adType),this.ad.adServingId&&(c.ADSERVINGID=this.ad.adServingId),this.ad.categories&&this.ad.categories.length&&(c.ADCATEGORIES=qw(n=this.ad.categories).call(n,(function(e){return e.value})).join(",")),this.ad.blockedAdCategories&&this.ad.blockedAdCategories.length&&(c.BLOCKEDADCATEGORIES=qw(r=this.ad.blockedAdCategories).call(r,(function(e){return e.value})).join(","))),ZP.track(l,c,a)}},{key:"convertToTimecode",value:function(e){var t,n,r;if(!ZP.isValidTimeValue(e))return"";var i=1e3*e,o=Math.floor(i/36e5),a=Math.floor(i/6e4%60),s=Math.floor(i/1e3%60),l=Math.floor(i%1e3);return Tm(t=Tm(n=Tm(r="".concat(ZP.addLeadingZeros(o,2),":")).call(r,ZP.addLeadingZeros(a,2),":")).call(n,ZP.addLeadingZeros(s,2),".")).call(t,ZP.addLeadingZeros(l,3))}},{key:"progressFormatted",value:function(){return this.convertToTimecode(this.progress)}}]),n}(kD),CD=new _D;function RD(e){return SD.apply(this,arguments)}function SD(){return(SD=oy(ry().mark((function e(t){var n;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new DOMParser,e.abrupt("return",CD.parseVAST(n.parseFromString(t,"application/xml")));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LD(e){var t=e.url,n=void 0===t?"":t,r=e.method,i=void 0===r?"GET":r,o=e.type,a=void 0===o?"json":o,s=e.timeout,l=void 0===s?1e4:s,u=e.data,c=void 0===u?{}:u;return new Nk((function(e,t){var r=new window.XMLHttpRequest,o=i.toUpperCase();if(a&&(r.responseType=a),l&&(r.timeout=l),r.onload=function(){200===r.status?e(r.response):t({res:r,type:"error"})},r.onerror=function(){t({res:r,type:"error"})},r.ontimeout=function(){t({res:r,type:"error"})},r.onabort=function(){t({res:r,type:"error"})},"GET"===o)r.open(o,n),r.send();else{if("post"!==o)throw new Error("xhr ".concat(o," is not supported"));r.open(o,n),r.setRequestHeader("Content-type","application/json"),r.send(Ym(c))}}))}var xD=function(e,t){var n,r=ID(e);if(!e||!r)return null!==(n=e)&&void 0!==n?n:"";var i,o=ix(e).call(e,"//");for(var a in t){var s,l,u=t[a];if(null!=r&&r.searchParams.has(a))null==r||null===(s=r.searchParams)||void 0===s||s.set(a,u);else null==r||null===(l=r.searchParams)||void 0===l||l.append(a,u)}return e=r.toString(),o?null===(i=e)||void 0===i?void 0:i.replace(location.protocol,""):e},ID=function(e){if(e){ix(e).call(e,"//")&&(e=location.protocol+e);try{return new ML(e)}catch(UD){return}}},MD=function(e){Zy(o,e);var t,n,r,i=gm(o);function o(e){var t;return ay(this,o),ym(hy(t=i.call(this,e)),"ad",void 0),ym(hy(t),"_eventsSent",[]),ym(hy(t),"_track",void 0),ym(hy(t),"_breakCues",void 0),ym(hy(t),"_cues",void 0),ym(hy(t),"_breakInfoMap",{}),ym(hy(t),"_liveSyncDuration",void 0),ym(hy(t),"_liveMaxLatencyDuration",void 0),ym(hy(t),"_timer",void 0),ym(hy(t),"_vastTracker",void 0),ym(hy(t),"_onAddTrack",(function(e){var n=e.track;"metadata"===(null==n?void 0:n.kind)&&(n.mode="hidden",t._track=n,V_.os.isIos?t._loopCues():(t._onCuechange(),t._track.addEventListener("cuechange",t._onCuechange)))})),ym(hy(t),"_loopCues",(function(){t._onCuechange(),t._timer=vA(t._loopCues,2e3)})),ym(hy(t),"_onCuechange",oy(ry().mark((function e(){var n,r,i,o;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null===(n=t._track)||void 0===n?void 0:n.cues)||[],i=bP(r),o=t._transformSSAIAdBreak(null==i?void 0:pk(i).call(i,(function(e){return"SSAI"===e.type}))),t._cues=o,e.next=6,Nk.all(qw(o).call(o,function(){var e=oy(ry().mark((function e(n){var r,i,o,a;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Success"!==(null===(r=t._breakInfoMap[n.id])||void 0===r?void 0:r.status)){e.next=2;break}return e.abrupt("return",null===(o=t._breakInfoMap[n.id])||void 0===o?void 0:o.ads);case 2:if("Pending"!==(null===(i=t._breakInfoMap[n.id])||void 0===i?void 0:i.status)){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,t._fetchBreakInfo(n.id);case 6:a=e.sent,t._breakInfoMap[n.id]=a;case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:t._breakCues=o;case 7:case"end":return e.stop()}}),e)})))),t._init(),t}return fy(o,[{key:"skip",value:function(){var e,t,n,r,i,o;null!==(e=this._player)&&void 0!==e&&e.plugins.hls?null==this||null===(n=this.ad)||void 0===n||n.skip():null!==(r=this.ad)&&void 0!==r&&r.getBreakId()&&(null===(i=this._player)||void 0===i||i.switchURL(xD(this._player.config.url,{ssai_skip_ad:null===(o=this.ad)||void 0===o?void 0:o.getBreakId()})),this._breakCues=[]);null===(t=this._emitAdEvent)||void 0===t||t.call(this,xP.AD_SKIPPED),this._endAd(!0)}},{key:"onClick",value:function(){var e;return!this.ad||(this._player.pause(),null===(e=this.ad)||void 0===e||e.click(),this._handleTrackingEvent(LP.CLICK),!1)}},{key:"onError",value:function(e){var t;null!==(t=this._player)&&void 0!==t&&t.plugins.hls?e.originError.fatal&&this._handleTrackingEvent(LP.ERROR,{ERRORCODE:900}):this._handleTrackingEvent(LP.ERROR,{ERRORCODE:900})}},{key:"onPause",value:function(){this.ad&&this._handleTrackingEvent(LP.PAUSE)}},{key:"onPlay",value:function(){var e,t;this.ad&&(null!==(e=this.ad)&&void 0!==e&&e.getState()?this._handleTrackingEvent(LP.RESUME):(null===(t=this.ad)||void 0===t||t.setState(MP.START),this._handleTrackingEvent(LP.START),this._handleTrackingEvent(LP.IMPRESSION)))}},{key:"onTimeUpdate",value:function(e){var t,n;if(this.ad||null!==(t=this._breakCues)&&void 0!==t&&t.length){if(this.ad){var r;this._sendInProgressEvents(e,this.ad);var i=null===(r=this.ad)||void 0===r?void 0:r.getRemainingTime(),o=this.ad.getDuration();o>0&&(i<=0||i>o)&&this._endAd()}!this.ad&&null!==(n=this._breakCues)&&void 0!==n&&n.length&&this._checkLinearAds(e)}}},{key:"destroy",value:function(){this.ad=void 0,clearTimeout(this._timer),this._timer=void 0}},{key:"_init",value:function(){var e,t,n=this;null===(e=this._player)||void 0===e||null===(e=e.media)||void 0===e||null===(e=e.textTracks)||void 0===e||e.addEventListener("addtrack",this._onAddTrack),null===(t=this._player)||void 0===t||t.on("complete",(function(){var e,t;n._liveSyncDuration=null===(e=n._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.hls)||void 0===e||null===(e=e.hls)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.liveSyncDuration,n._liveMaxLatencyDuration=null===(t=n._player)||void 0===t||null===(t=t.plugins)||void 0===t||null===(t=t.hls)||void 0===t||null===(t=t.hls)||void 0===t||null===(t=t.config)||void 0===t?void 0:t.liveMaxLatencyDuration}))}},{key:"_transformSSAIAdBreak",value:function(e){var t,n=[];return gk(e).call(e,function(){var e=oy(ry().mark((function e(r){var i,o,a,s,l,u,c;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=null===(i=r.ad)||void 0===i||null===(i=i[mP])||void 0===i||null===(i=i.value)||void 0===i?void 0:i.data,s=null===(o=r.ad[yP])||void 0===o||null===(o=o.value)||void 0===o?void 0:o.data,a&&(u={id:a,idWithSlate:r.idWithSlate,startTime:r.startTime,duration:Number(null==r||null===(l=r.ad)||void 0===l||null===(l=l["PLANNED-DURATION"])||void 0===l||null===(l=l.value)||void 0===l?void 0:l.data)},s?(t&&n.push(t),t={id:s,startTime:r.startTime,duration:u.duration,ads:[u]}):r.ad[mP]&&t&&(null===(c=t)||void 0===c||null===(c=c.ads)||void 0===c||c.push(u),t.duration=t.duration+u.duration));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t&&n.push(t),n}},{key:"_fetchBreakInfo",value:(r=oy(ry().mark((function e(t){var n,r;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={status:"Pending",ads:{}},this._breakInfoMap[t]=r,e.abrupt("return",LD({url:Tm(n="".concat(location.protocol,"//","mediaplus-i18n.byteintlapi.com","/media_plus/ssai_proxy/v2/openapi/GetAdInfo?break_id=")).call(n,t)}).then(function(){var e=oy(ry().mark((function e(t){var n;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.ad_info){e.next=5;break}return e.next=3,Nk.all(null===(n=AP(t.ad_info))||void 0===n?void 0:qw(n).call(n,function(){var e=oy(ry().mark((function e(t){var n,i,o,a;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=wP(t,2),i=n[0],o=n[1],e.next=3,RD(o);case 3:return a=e.sent,r.ads[i]=a,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return r.status="Success",e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){r.status="Error"})));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_checkFrameChasing",value:function(e){var t,n,r;if(null!==(t=this._cues)&&void 0!==t&&t.length){var i=null===(n=this._cues)||void 0===n?void 0:n[(null===(r=this._cues)||void 0===r?void 0:r.length)-1],o=void 0!==(null==i?void 0:i.startTime)?i.startTime+i.duration:void 0;o&&this._setFrameChasing(o<=e)}else this._setFrameChasing(!0)}},{key:"_setFrameChasing",value:function(e){var t;null!==(t=this._player)&&void 0!==t&&null!==(t=t.plugins)&&void 0!==t&&null!==(t=t.hls)&&void 0!==t&&t.hls&&(this._player.plugins.hls.hls.config.liveSyncDuration=e?this._liveSyncDuration:void 0,this._player.plugins.hls.hls.config.targetLatency=null,this._player.plugins.hls.hls.config.liveMaxLatencyDuration=e?this._liveMaxLatencyDuration:void 0)}},{key:"_checkLinearAds",value:function(e){var t;if(null!==(t=this._breakCues)&&void 0!==t&&t.length)for(var n=0;n<this._breakCues.length;n++){var r,i;if(this.ad)break;var o=null===(r=this._breakCues)||void 0===r?void 0:r[n];if(null==o||null===(i=o.ads)||void 0===i||!i.length)return;for(var a=0;a<o.ads.length;a++){var s,l=o.ads[a],u=l.startTime,c=l.startTime+l.duration,f=null===(s=this._breakInfoMap[o.id])||void 0===s||null===(s=s.ads)||void 0===s?void 0:s[l.id];if(u<=e&&c>e&&(l.idWithSlate||f)){var h,d;this.ad=new OP(l,o.id,f,this._player);var p=null==f?void 0:Qb(h=f.ads).call(h,(function(e){return e.creatives.length>0})),v=null==p||null===(d=p.creatives)||void 0===d?void 0:Qb(d).call(d,(function(e){return null==e?void 0:e.mediaFiles}));p&&v&&(this._vastTracker=new ED(null,p,v)),this._adStart();break}}}}},{key:"_sendInProgressEvents",value:function(e,t){var n,r,i,o,a,s,l=t.getStartTime()+.25*t.getDuration(),u=t.getStartTime()+.5*t.getDuration(),c=t.getStartTime()+.75*t.getDuration();if(e>=l&&!Tx(n=this._eventsSent).call(n,LP.FIRST_QUARTILE))return this._eventsSent.push(LP.FIRST_QUARTILE),null===(o=this.ad)||void 0===o||o.setState(MP.FIRST_QUARTILE),void this._handleTrackingEvent(LP.FIRST_QUARTILE);if(e>=u&&!Tx(r=this._eventsSent).call(r,LP.MIDPOINT))return this._eventsSent.push(LP.MIDPOINT),null===(a=this.ad)||void 0===a||a.setState(MP.MIDPOINT),void this._handleTrackingEvent(LP.MIDPOINT);e>=c&&!Tx(i=this._eventsSent).call(i,LP.THIRD_QUARTILE)&&(this._eventsSent.push(LP.THIRD_QUARTILE),null===(s=this.ad)||void 0===s||s.setState(MP.THIRD_QUARTILE),this._handleTrackingEvent(LP.THIRD_QUARTILE))}},{key:"_handleTrackingEvent",value:(n=oy(ry().mark((function e(t,n){var r;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._sendTrackingEvent(t,n),null===(r=this._emitAdEvent)||void 0===r||r.call(this,IP[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_sendTrackingEvent",value:(t=oy(ry().mark((function e(t,n){var r,i,o,a;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==LP.ERROR){e.next=3;break}return null===(i=this._vastTracker)||void 0===i||i.error(n),e.abrupt("return");case 3:if(t!==LP.CLICK){e.next=6;break}return null===(o=this._vastTracker)||void 0===o||o.click(null,n),e.abrupt("return");case 6:if(t!==LP.IMPRESSION){e.next=9;break}return null===(a=this._vastTracker)||void 0===a||a.trackImpression(),e.abrupt("return");case 9:null===(r=this._vastTracker)||void 0===r||r.track(t,{macros:n});case 10:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"_adStart",value:function(){var e,t;null!=this&&null!==(e=this._player)&&void 0!==e&&e.paused||(null===(t=this.ad)||void 0===t||t.setState(MP.START),this._handleTrackingEvent(LP.START),this._handleTrackingEvent(LP.IMPRESSION))}},{key:"_endAd",value:function(e){e||this._handleTrackingEvent(LP.COMPLETE),this.ad=void 0,this._eventsSent=[]}}]),o}(RP),OD=function(e){Zy(r,e);var t,n=gm(r);function r(){var e,t;ay(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return ym(hy(t=n.call.apply(n,Tm(e=[this]).call(e,o))),"_scte35Manager",void 0),ym(hy(t),"_ssManager",void 0),ym(hy(t),"_onPlay",void 0),ym(hy(t),"_onTimeUpdate",void 0),ym(hy(t),"_onPause",void 0),ym(hy(t),"_onError",void 0),ym(hy(t),"_onClick",void 0),ym(hy(t),"_handlePrerollMuted",(function(e){var n,r;(function(e){var t;return 0===(null==e||null===(t=e.getAdPodInfo())||void 0===t?void 0:t.getTimeOffset())})(e.ad)&&(null===(n=t.player.plugins.autoplayplugin)||void 0===n||null===(r=n.handleAutoplayStart)||void 0===r||r.call(n),t.player.once(Q_,(function(){var e,n;null===(e=t.player.plugins.autoplayplugin)||void 0===e||null===(n=e.initState)||void 0===n||n.call(e)})))})),t}return fy(r,[{key:"adManager",get:function(){return this._ssManager||this.csManager}},{key:"afterCreate",value:function(){var e;($y(Xy(r.prototype),"afterCreate",this).call(this),this._init(),"ssai"===this.config.adType)&&(this.player.config.url=xD(this.player.config.url,{ssai_uid:null===(e=this.player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.logger)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.userId,ssai_platform:"web"}))}},{key:"afterPlayerInit",value:function(){var e;null!==(e=this.player.plugins)&&void 0!==e&&null!==(e=e.hls)&&void 0!==e&&e.hls&&"ssai"===this.config.adType&&(this.player.plugins.hls.hls.config.liveSyncDuration=null,this.player.plugins.hls.hls.config.liveMaxLatencyDuration=1/0)}},{key:"beforePlayerInit",value:(t=oy(ry().mark((function e(){var t,n,i,o=this;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=$y(Xy(r.prototype),"beforePlayerInit",this).call(this),null===(t=this.csManager)||void 0===t||t.once(Mm,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(n=this.config.ima)&&void 0!==n&&n.adTagUrlForSCTE35&&(this._scte35Manager=new oP({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager,replayForSCTE35:this.config.replayForSCTE35})),"ssai"===this.config.adType&&(this._ssManager=new MD({player:this.player,emitAdEvent:function(e){return o._dispatchEvent(e)}}),this._setupSSAIListener(),this.uiManager.adPlugin.offAll(),this.uiManager.destroy()),i.resolve(),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(){var e,t;$y(Xy(r.prototype),"destroy",this).call(this),null===(e=this._scte35Manager)||void 0===e||e.destroy(),this._scte35Manager=void 0,this._clearSSAIListener(),null===(t=this._ssManager)||void 0===t||t.destroy(),this._ssManager=void 0}},{key:"_clearSSAIListener",value:function(){var e,t,n,r,i,o,a;((null===(e=this._ssManager)||void 0===e?void 0:e.onPlay)&&this.player.off(H_,this._onPlay),(null===(t=this._ssManager)||void 0===t?void 0:t.onPause)&&this.player.off(q_,this._onPause),(null===(n=this._ssManager)||void 0===n?void 0:n.onError)&&this.player.off(W_,this._onError),(null===(r=this._ssManager)||void 0===r?void 0:r.onTimeUpdate)&&this.player.off(G_,this._onTimeUpdate),null!==(i=this._ssManager)&&void 0!==i&&i.onClick)&&(null===(o=this.player)||void 0===o||o.removePluginHooks("pc","videoClick",this._onClick),null===(a=this.player)||void 0===a||a.removePluginHooks("mobile","videoClick",this._onClick))}},{key:"_setupSSAIListener",value:function(){var e,t,n,r,i,o,a,s=this;(this._onPlay=function(){var e;return null===(e=s._ssManager)||void 0===e?void 0:e.onPlay()},this._onTimeUpdate=function(){var e;return null===(e=s._ssManager)||void 0===e?void 0:e.onTimeUpdate(s.player.currentTime)},this._onPause=function(){var e;return null===(e=s._ssManager)||void 0===e?void 0:e.onPause()},this._onError=function(e){var t;return null===(t=s._ssManager)||void 0===t?void 0:t.onError(e)},this._onClick=function(){var e;null===(e=s._ssManager)||void 0===e||e.onClick()},(null===(e=this._ssManager)||void 0===e?void 0:e.onPlay)&&this.player.on(H_,this._onPlay),(null===(t=this._ssManager)||void 0===t?void 0:t.onPause)&&this.player.on(q_,this._onPause),(null===(n=this._ssManager)||void 0===n?void 0:n.onError)&&this.player.on(W_,this._onError),(null===(r=this._ssManager)||void 0===r?void 0:r.onTimeUpdate)&&this.player.on(G_,this._onTimeUpdate),null!==(i=this._ssManager)&&void 0!==i&&i.onClick)&&(null===(o=this.player)||void 0===o||o.usePluginHooks("pc","videoClick",this._onClick),null===(a=this.player)||void 0===a||a.usePluginHooks("mobile","videoClick",this._onClick))}},{key:"_dispatchEvent",value:function(e){var t;this.player.emit(e,{ad:null===(t=this._ssManager)||void 0===t?void 0:t.ad})}},{key:"_init",value:function(){var e,t;null!==(e=this.config.ima)&&void 0!==e&&e.adTagUrl||null===(t=this.config.ima)||void 0===t||null===(t=t.schedule)||void 0===t||!t.length||(this.config.ima.adsResponse=function(e){var t,n;if(e&&e.length){var r=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),i=r.getElementsByTagName("vmap:VMAP");i[0].setAttribute("version","1.0");var o,a=0,s=0;return gk(t=__(n=pk(e).call(e,(function(e){var t=e.offset;return"pre"===t||"post"===t||/^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(t)}))).call(n,(function(e,t){return"pre"===e.offset||"post"===t.offset?-1:"post"===e.offset||"pre"===t.offset?1:Date.parse("2024-01-01T".concat(e.offset))<Date.parse("2024-01-01T".concat(t.offset))?-1:1}))).call(t,(function(e){var t,n,l,u=e.offset,c=e.type,f=e.tag;switch(u){case"pre":n="start",l="preroll";break;case"post":n="end",l="postroll";break;default:n=u,o!==u?(o=u,s=1,l="midroll-".concat(++a)):(s++,l="midroll-".concat(a))}var h=r.createElement("vmap:AdBreak");h.setAttribute("timeOffset",n),h.setAttribute("breakId",l),h.setAttribute("breakType",c||"linear"),i[0].appendChild(h);var d=r.createElement("vmap:AdSource");d.setAttribute("id",Tm(t="".concat(l,"-ad-")).call(t,s)),d.setAttribute("allowMultipleAds","true"),d.setAttribute("followRedirects","true"),h.appendChild(d);var p=r.createElement("vmap:AdTagURI");p.setAttribute("templateType","vast3"),d.appendChild(p),p.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(r)}}(this.config.ima.schedule)),this.player.once(_m,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(iU);return OD}));