@volcengine/veplayer-plugin 2.7.1-rc.2 → 2.7.1-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +35918 -34463
- package/esm/index.production.js +3 -3
- package/esm/veplayer.plugin.ad.development.js +1412 -1398
- package/esm/veplayer.plugin.ad.production.js +2 -2
- package/esm/veplayer.plugin.rtm.development.js +6 -2
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.ad.development.js +1412 -1398
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +6 -2
- package/umd/veplayer.plugin.rtm.production.js +1 -1
|
@@ -1 +1 @@
|
|
|
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&<.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)}else n[e]&&(n[e]=null)}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,i;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={status:"Pending",ads:{}},this._breakInfoMap[t]=i,e.abrupt("return",LD({url:Tm(n=Tm(r="".concat(location.protocol,"//")).call(r,__LIVE_AD_REQUEST_DOMAIN__,"/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,r,o,a;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=wP(t,2),r=n[0],o=n[1],e.next=3,RD(o);case 3:return a=e.sent,i.ads[r]=a,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return i.status="Success",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){i.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}));
|
|
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,W=function(e){return null==e},q=W,K=TypeError,G=function(e){if(q(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=W,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,{}),We=ze;(Be.exports=function(e,t){return We[e]||(We[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 qe=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=qe,it=$e,ot=nt,at=me,st=ke,lt=r.Symbol,ut=rt("wks"),ct=st?lt.for||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==Wt||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",Wt=jt.POLYFILL="P",qt=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=qt,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,Wn=B,qn=function(e,t,n){var r=Hn(t);r in e?zn.f(e,r,Wn(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=qn,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 Wr=er,qr=String,Kr=function(e){if("Symbol"===Wr(e))throw TypeError("Cannot convert a Symbol value to a string");return qr(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=qe("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,Wi=Fn,qi=qn,Ki=Array,Gi=Math.max,Yi=function(e,t,n){for(var r=Wi(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++)qi(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 Wo=Bo("state");Fo[Wo]=!0,so=function(e,t){if(Do(e,Wo))throw Vo(jo);return t.facade=e,Po(e,Wo,t),t},lo=function(e){return Do(e,Wo)?e[Wo]:{}},uo=function(e){return Do(e,Wo)}}var qo={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=qe,Ca=ri,Ra=nt,Sa=ft,La=oo,xa=vo,Ia=bo,Ma=Lo,Oa=qo,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,Wa=ta.QObject,qa=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=!Wa||!Wa[Na]||!Wa[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=qa(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=qa(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=qe,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=qe("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),Ws=Os("".charCodeAt),qs=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(Ws(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?qs(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,Wl=C,ql=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||Wl(e))return e;throw Kl("Can't set "+ql(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=qo;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=qe,Vu=oe,Hu=v,zu=_e,Wu=ft,qu=Vu("Symbol"),Ku=qu.isWellKnown,Gu=Vu("Object","getOwnPropertyNames"),Yu=Hu(qu.prototype.valueOf),Qu=ju("wks"),Xu=0,$u=Gu(qu),Ju=$u.length;Xu<Ju;Xu++)try{var Zu=$u[Xu];zu(qu[Zu])&&Wu(Zu)}catch(PD){}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(PD){}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=qo,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"]},Wc=zc("Array").forEach,qc=er,Kc=$e,Gc=ae,Yc=Wc,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,qc(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(PD){return PD 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(PD){return PD 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,Wf=Oe,qf=W,Kf=ul,Gf=ft("iterator"),Yf=function(e){if(!qf(e))return Wf(e,Gf)||Wf(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(PD){i=!0,r=PD}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(PD){vh(r,"throw",PD)}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,Wh=io,qh=S,Kh=ft("species"),Gh=function(e){var t=zh(e);qh&&t&&!t[Kh]&&Wh(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=W,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,Wd=/web0s(?!.*chrome)/i.test(se),qd=r,Kd=Qt,Gd=R.f,Yd=Pd.set,Qd=Hd,Xd=ld,$d=zd,Jd=Wd,Zd=Hh,ep=qd.MutationObserver||qd.WebKitMutationObserver,tp=qd.document,np=qd.process,rp=qd.Promise,ip=Gd(qd,"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(PD){throw ap.head&&Nd(),PD}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,qd),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(PD){return{error:!0,value:PD}}},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=qt,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,Wp=od,qp=Pd.set,Kp=lp,Gp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(PD){}},Yp=up,Qp=Hd,Xp=qo,$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(PD){c&&!i&&c.exit(),u(PD)}},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(qp,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(qp,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(PD){Av(n,PD,e)}})):(e.value=t,e.state=1,yv(e,!1))}catch(PD){Av({done:!1},PD,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(PD){Av(t,PD)}}).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(Wp(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(PD){}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(PD){}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 Wv=I,qv=Rp;Sn({target:"Promise",stat:!0,forced:Cp.CONSTRUCTOR},{reject:function(e){var t=qv.f(this);return Wv(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,Wg=qn,qg=ft,Kg=As,Gg=Lr("slice"),Yg=qg("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&&Wg(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(PD){return void n(PD)}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,Wy=R.f,qy=S;Vy({target:"Object",stat:!0,forced:!qy||Hy((function(){Wy(1)})),sham:!qy},{getOwnPropertyDescriptor:function(e,t){return Wy(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",Wm=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}),qm=ee,Km=c;qm.JSON||(qm.JSON={stringify:JSON.stringify});var Gm=function(e,t,n){return Km(qm.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=qn;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 Wk=ee.Array.isArray,qk=t(Wk),Kk=t(Wk),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(PD){Yk(e,"throw",PD)}},Zk=Hf,eb=mr,tb=Fn,nb=qn,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(PD){return void n(PD)}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",Wb=!0;zb in[]&&Array(1)[zb]((function(){Wb=!1})),Vb({target:"Array",proto:!0,forced:Wb},{find:function(e){return Hb(this,e,arguments.length>1?arguments[1]:void 0)}});var qb=zc("Array").find,Kb=ae,Gb=qb,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=qn,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}));Sn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var yw=t(ee.Number.isNaN),mw="\t\n\v\f\r \u2028\u2029\ufeff",kw=G,bw=Kr,ww=mw,Tw=v("".replace),Aw=RegExp("^["+ww+"]+"),_w=RegExp("(^|[^"+ww+"])["+ww+"]+$"),Ew=function(e){return function(t){var n=bw(kw(t));return 1&e&&(n=Tw(n,Aw,"")),2&e&&(n=Tw(n,_w,"$1")),n}},Cw={start:Ew(1),end:Ew(2),trim:Ew(3)},Rw=r,Sw=i,Lw=v,xw=Kr,Iw=Cw.trim,Mw=mw,Ow=Rw.parseInt,Uw=Rw.Symbol,Pw=Uw&&Uw.iterator,Dw=/^[+-]?0x/i,Nw=Lw(Dw.exec),Bw=8!==Ow(Mw+"08")||22!==Ow(Mw+"0x16")||Pw&&!Sw((function(){Ow(Object(Pw))}))?function(e,t){var n=Iw(xw(e));return Ow(n,t>>>0||(Nw(Dw,n)?16:10))}:Ow;Sn({global:!0,forced:parseInt!=Bw},{parseInt:Bw});var Fw=t(ee.parseInt),jw=Zo.map;Sn({target:"Array",proto:!0,forced:!Lr("map")},{map:function(e){return jw(this,e,arguments.length>1?arguments[1]:void 0)}});var Vw=zc("Array").map,Hw=ae,zw=Vw,Ww=Array.prototype,qw=t((function(e){var t=e.map;return e===Ww||Hw(Ww,e)&&t===Ww.map?zw:t})),Kw=S,Gw=v,Yw=I,Qw=i,Xw=di,$w=eo,Jw=M,Zw=Ye,eT=z,tT=Object.assign,nT=Object.defineProperty,rT=Gw([].concat),iT=!tT||Qw((function(){if(Kw&&1!==tT({b:1},tT(nT({},"a",{enumerable:!0,get:function(){nT(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!=tT({},e)[n]||Xw(tT({},t)).join("")!=r}))?function(e,t){for(var n=Zw(e),r=arguments.length,i=1,o=$w.f,a=Jw.f;r>i;)for(var s,l=eT(arguments[i++]),u=o?rT(Xw(l),o(l)):Xw(l),c=u.length,f=0;c>f;)s=u[f++],Kw&&!Yw(a,l,s)||(n[s]=l[s]);return n}:tT,oT=iT;Sn({target:"Object",stat:!0,arity:2,forced:Object.assign!==oT},{assign:oT});var aT=t(ee.Object.assign);function sT(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 lT(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?gk(n=sT(Object(i),!0)).call(n,(function(t){dT(e,t,i[t])})):Ak?Mk(e,Ak(i)):gk(r=sT(Object(i))).call(r,(function(t){Ok(e,t,vk(i,t))}))}return e}function uT(e){return(uT="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 cT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fT(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,TT(r.key),r)}}function hT(e,t,n){return t&&fT(e.prototype,t),n&&fT(e,n),Ok(e,"prototype",{writable:!1}),e}function dT(e,t,n){return(t=TT(t))in e?Ok(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pT(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&&gT(e,t)}function vT(e){var t;return(vT=Dk?Vk(t=Pk).call(t):function(e){return e.__proto__||Pk(e)})(e)}function gT(e,t){var n;return(gT=Dk?Vk(n=Dk).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function yT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mT(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=vT(e);if(t){var i=vT(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 yT(e)}(this,n)}}function kT(){var e;"undefined"!=typeof Reflect&&zk?kT=Vk(e=zk).call(e):kT=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vT(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 kT.apply(this,arguments)}function bT(e){return function(e){if(Kk(e))return wT(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 wT(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 wT(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 wT(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 TT(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 AT={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}(AT);var _T=AT.exports,ET=Zo.some;Sn({target:"Array",proto:!0,forced:!Fc("some")},{some:function(e){return ET(this,e,arguments.length>1?arguments[1]:void 0)}});var CT=zc("Array").some,RT=ae,ST=CT,LT=Array.prototype,xT=t((function(e){var t=e.some;return e===LT||RT(LT,e)&&t===LT.some?ST:t})),IT=Un,MT=Kr,OT=G,UT=RangeError,PT=v,DT=Nn,NT=Kr,BT=G,FT=PT((function(e){var t=MT(OT(this)),n="",r=IT(e);if(r<0||r==1/0)throw UT("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n})),jT=PT("".slice),VT=Math.ceil,HT=function(e){return function(t,n,r){var i,o,a=NT(BT(t)),s=DT(n),l=a.length,u=void 0===r?" ":NT(r);return s<=l||""==u?a:((o=FT(u,VT((i=s-l)/u.length))).length>i&&(o=jT(o,0,i)),e?a+o:o+a)}},zT={start:HT(!1),end:HT(!0)},WT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(se),qT=zT.start;Sn({target:"String",proto:!0,forced:WT},{padStart:function(e){return qT(this,e,arguments.length>1?arguments[1]:void 0)}});var KT,GT=zc("String").padStart,YT=ae,QT=GT,XT=String.prototype,$T=t((function(e){var t=e.padStart;return"string"==typeof e||e===XT||YT(XT,e)&&t===XT.padStart?QT:t})),JT="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,ZT=r,eA=c,tA=C,nA=JT,rA=se,iA=As,oA=sd,aA=ZT.Function,sA=/MSIE .\./.test(rA)||nA&&((KT=ZT.Bun.version.split(".")).length<3||0==KT[0]&&(KT[1]<3||3==KT[1]&&0==KT[2])),lA=function(e,t){var n=t?2:1;return sA?function(r,i){var o=oA(arguments.length,1)>n,a=tA(r)?r:aA(r),s=o?iA(arguments,n):[],l=o?function(){eA(a,this,s)}:a;return t?e(l,i):e(l)}:e},uA=Sn,cA=r,fA=lA(cA.setInterval,!0);uA({global:!0,bind:!0,forced:cA.setInterval!==fA},{setInterval:fA});var hA=Sn,dA=r,pA=lA(dA.setTimeout,!0);hA({global:!0,bind:!0,forced:dA.setTimeout!==pA},{setTimeout:pA});var vA=t(ee.setInterval),gA=t(ee.setTimeout),yA=Zo.every;Sn({target:"Array",proto:!0,forced:!Fc("every")},{every:function(e){return yA(this,e,arguments.length>1?arguments[1]:void 0)}});var mA=zc("Array").every,kA=ae,bA=mA,wA=Array.prototype,TA=t((function(e){var t=e.every;return e===wA||kA(wA,e)&&t===wA.every?bA:t})),AA=r,_A=i,EA=Kr,CA=Cw.trim,RA=mw,SA=v("".charAt),LA=AA.parseFloat,xA=AA.Symbol,IA=xA&&xA.iterator,MA=1/LA(RA+"-0")!=-1/0||IA&&!_A((function(){LA(Object(IA))}))?function(e){var t=CA(EA(e)),n=LA(t);return 0===n&&"-"==SA(t,0)?-0:n}:LA;Sn({global:!0,forced:parseFloat!=MA},{parseFloat:MA});var OA=t(ee.parseFloat),UA=vl.PROPER,PA=i,DA=mw,NA=Cw.trim;Sn({target:"String",proto:!0,forced:function(e){return PA((function(){return!!DA[e]()||"
"!=="
"[e]()||UA&&DA[e].name!==e}))}("trim")},{trim:function(){return NA(this)}});var BA=zc("String").trim,FA=ae,jA=BA,VA=String.prototype,HA=t((function(e){var t=e.trim;return"string"==typeof e||e===VA||FA(VA,e)&&t===VA.trim?jA:t})),zA=Yi,WA=Math.floor,qA=function(e,t){var n=e.length,r=WA(n/2);return n<8?KA(e,t):GA(e,qA(zA(e,0,r),t),qA(zA(e,r),t),t)},KA=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},GA=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},YA=qA,QA=se.match(/firefox\/(\d+)/i),XA=!!QA&&+QA[1],$A=/MSIE|Trident/.test(se),JA=se.match(/AppleWebKit\/(\d+)\./),ZA=!!JA&&+JA[1],e_=Sn,t_=v,n_=xe,r_=Ye,i_=Fn,o_=Jb,a_=Kr,s_=i,l_=YA,u_=Fc,c_=XA,f_=$A,h_=pe,d_=ZA,p_=[],v_=t_(p_.sort),g_=t_(p_.push),y_=s_((function(){p_.sort(void 0)})),m_=s_((function(){p_.sort(null)})),k_=u_("sort"),b_=!s_((function(){if(h_)return h_<70;if(!(c_&&c_>3)){if(f_)return!0;if(d_)return d_<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++)p_.push({k:t+r,v:n})}for(p_.sort((function(e,t){return t.v-e.v})),r=0;r<p_.length;r++)t=p_[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));e_({target:"Array",proto:!0,forced:y_||!m_||!k_||!b_},{sort:function(e){void 0!==e&&n_(e);var t=r_(this);if(b_)return void 0===e?v_(t):v_(t,e);var n,r,i=[],o=i_(t);for(r=0;r<o;r++)r in t&&g_(i,t[r]);for(l_(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:a_(t)>a_(n)?1:-1}}(e)),n=i_(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)o_(t,r++);return t}});var w_=zc("Array").sort,T_=ae,A_=w_,__=Array.prototype,E_=t((function(e){var t=e.sort;return e===__||T_(__,e)&&t===__.sort?A_:t})),C_=Sn,R_=Date,S_=v(R_.prototype.getTime);C_({target:"Date",stat:!0},{now:function(){return S_(new R_)}});var L_,x_=t(ee.Date.now),I_="undefined"!=typeof window&&window.location&&jb(L_=window.location.href).call(L_,"xgplayerdebugger=1")>-1,M_="color: #525252; background-color: #90ee90;",O_="color: #525252; background-color: red;",U_="color: #525252; background-color: yellow; ",P_="%c[xgplayer]",D_={config:{debug:I_?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=[P_,M_,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=[P_,U_,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=[P_,O_,e]).call(t,o))}}},N_=function(){function e(t){cT(this,e),this.bufferedList=t}return hT(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}(),B_={};B_.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},B_.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&&B_.addClass(i,n),t)gk(o=rk(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return D_.logError("util.createDomFromHtml",a),null}},B_.hasClass=function(e,t){if(!e||!t)return!1;try{return xT(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(r){var n=e.className&&"object"===uT(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},B_.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){B_.hasClass(e,t)||(e.className&&"object"===uT(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},B_.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(B_.hasClass(e,t))gk(r=t.split(/\s+/g)).call(r,(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===uT(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},B_.toggleClass=function(e,t){var n;e&&gk(n=t.split(/\s+/g)).call(n,(function(t){B_.hasClass(e,t)?B_.removeClass(e,t):B_.addClass(e,t)}))},B_.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===B_.typeOf(e[n]))t.push(e[n]);else if("Object"===B_.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(" ")},B_.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){D_.logError("util.findDom",r),0===jb(n).call(n,"#")&&(e=t.getElementById(Fk(n).call(n,1)))}return e},B_.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},B_.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},B_.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=$T(B_).call(B_,Math.floor(e/3600),2,0),n=$T(B_).call(B_,Math.floor((e-3600*t)/60),2,0),r=$T(B_).call(B_,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},B_.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},B_.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},B_.deepCopy=function(e,t){var n;if("Object"===B_.typeOf(t)&&"Object"===B_.typeOf(e))return gk(n=rk(t)).call(n,(function(n){if("Object"!==B_.typeOf(t[n])||t[n]instanceof Node)if("Array"===B_.typeOf(t[n])){var r;e[n]="Array"===B_.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]:B_.deepCopy(e[n],t[n])})),e},B_.deepMerge=function(e,t){var n;return qw(n=rk(t)).call(n,(function(n){var r;"Array"===B_.typeOf(t[n])&&"Array"===B_.typeOf(e[n])?"Array"===B_.typeOf(e[n])&&(r=e[n]).push.apply(r,bT(t[n])):B_.typeOf(e[n])!==B_.typeOf(t[n])||null===e[n]||"Object"!==B_.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):B_.deepMerge(e[n],t[n])})),e},B_.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},B_.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""},B_.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=vA(Vk(n).call(n,e),r))},B_.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},B_.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=gA((function(){t(),B_.clearTimeout(e,r)}),n);return e._timers.push(r),r},B_.clearTimeout=function(e,t){var n=e._timers;if("Array"===B_.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)},B_.clearAllTimers=function(e){var t=e._timers;"Array"===B_.typeOf(t)&&(qw(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},B_.createImgBtn=function(e,t,n,r){var i,o,a,s,l,u,c,f,h,d,p,v,g=B_.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(g.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(TA(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=OA(HA(t=Fk(n).call(n,0,jb(n).call(n,e))).call(t)),f=OA(HA(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},B_.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(Fw(e,16))})),Tm(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},B_.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},B_.checkIsFunction=function(e){return e&&"function"==typeof e},B_.checkIsObject=function(e){return null!==e&&"object"===uT(e)},B_.hide=function(e){e.style.display="none"},B_.show=function(e,t){e.style.display=t||"block"},B_.isUndefined=function(e){if(null==e)return!0},B_.isNotNull=function(e){return!(null==e)},B_.setStyleFromCsstext=function(e,t){if(t)if("String"===B_.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]}))}},B_.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},B_.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},B_.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}},B_.stopPropagation=function(e){e&&e.stopPropagation()},B_.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},B_.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},B_.checkTouchSupport=function(){return"ontouchstart"in window},B_.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)});E_(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 N_(i)},B_.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}},B_.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},B_.getHostFromUrl=function(e){if("String"!==B_.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},B_.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},B_.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},B_.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},B_.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Fw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Fw(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)}))},B_.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},B_.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},B_.createPositionBar=function(e,t){var n=B_.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},B_.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},B_.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},B_.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},B_.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:B_.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},B_.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 F_=/(Android)\s([\d.]+)/,j_=/(Version)\/([\d.]+)/,V_=["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"],H_={get device(){return H_.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=/(?:Tizen)/gi.test(e),i=/(?:Web0S)/gi.test(e),o=/(?:Android)/.test(e),a=/(?:Firefox)/.test(e),s=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,l=s||o&&!/(?:Mobile)/.test(e)||a&&/(?:Tablet)/.test(e),u=/(?:iPhone)/.test(e)&&!l;return{isTablet:l,isPhone:u,isIpad:s,isIos:u||s,isAndroid:o,isPc:!(u||o||n||l),isSymbian:n,isWindowsPhone:t,isFireFox:a,isTizen:r,isWebOS:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?j_:F_)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Fw(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(V_).call(V_,(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(PD){return this._logger.error(e,PD),!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)}}},z_="play",W_="ended",q_="pause",K_="error",G_="seeked",Y_="timeupdate",Q_="durationchange",X_="volumechange",$_="emptied",J_="autoplay_started",Z_="video_resize";function eE(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 tE(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&&eE.apply(void 0,Tm(n=[o,t,r.next]).call(n,bT(i)))})).catch((function(e){throw e}));else eE.apply(void 0,Tm(c=[this,t,r.next]).call(c,Fk(Array.prototype).call(arguments)));else if(void 0===f){var h;eE.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 eE.apply(void 0,Tm(n=[this,t,r.next]).call(n,Fk(Array.prototype).call(arguments)))}).call(n,this)}function nE(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 rE(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Kk(n[e])||(n[e]=[]),-1===nE.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function iE(e,t){var n=this.__hooks;if(n)if(Kk(n[e])){var r=n[e],i=nE.call(this,e,t);-1!==i&&gw(r).call(r,i,1)}else n[e]&&(n[e]=null)}function oE(e,t){var n;D_.logError(Tm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var aE=function(){function e(t){cT(this,e),B_.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 hT(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=B_.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)})):oE(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)})):oE(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)})):oE(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=lT(lT({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return tE.call.apply(tE,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 rE.call.apply(rE,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 iE.call.apply(iE,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(),B_.clearAllTimers(this),B_.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 sE=Element.prototype;sE.matches=sE.matchesSelector||sE.mozMatchesSelector||sE.msMatchesSelector||sE.oMatchesSelector||sE.webkitMatchesSelector}var lE=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function uE(e,t,n,r,i){var o=cE.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function cE(e,t,n,r){return function(n){n.delegateTarget=lE(n.target,t),n.delegateTarget&&r.call(e,n)}}var fE=function(e,t,n,r,i){return"function"==typeof e.addEventListener?uE.apply(null,arguments):"function"==typeof n?Vk(uE).call(uE,null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),qw(Array.prototype).call(e,(function(e){return uE(e,t,n,r,i)})))},hE=t(fE),dE={CONTROLS:"controls",ROOT:"root"},pE={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"},vE="xg-icon-disable";function gE(e){return!!e&&(jb(e)&&/^(?:http|data:|\/)/.test(e))}function yE(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 B_.addClass(e,i),qw(r=rk(o)).call(r,(function(t){e.setAttribute(t,o[t])})),e;if(gE(e)||gE(e.url))return o.src=gE(e)?e:e.url||"",s=B_.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(B_.addClass(s,i),qw(l=rk(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(D_.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 D_.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?B_.createDomFromHtml(e,o,i):(D_.logWarn(Tm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function mE(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"===uT(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"===uT(e)&&e.attr&&"object"===uT(e.attr)&&qw(n=rk(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(r[n],a),s=yE(r[n],n,o,a,t.pluginName)),!s&&i&&(s=yE(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[n]=s}))}var kE=function(e){pT(n,e);var t=mT(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return cT(this,n),(e=t.call(this,r)).__delegates=[],e}return hT(n,[{key:"__init",value:function(e){if(kT(vT(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,r=null;this.icons={},this.root=null,this.parent=null,this.extraEls=[],mE(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 D_.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=B_.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"===uT(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"===uT(a)&&"function"==typeof a.plugin&&(r=a.options?B_.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,B_.addClass(Qb(this).call(this,".xgplayer-icon"),vE)}},{key:"enable",value:function(){this.config.disable=!1,B_.removeClass(Qb(this).call(this,".xgplayer-icon"),vE)}},{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=kT(vT(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"===B_.typeOf(e)?this.root.style[e]=t:void("Object"===B_.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"===B_.typeOf(e)?this.root.setAttribute(e,t):void("Object"===B_.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 D_.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)),kT(vT(n.prototype),"__destroy",this).call(this),this.icons={},qw(t=["root","parent"]).call(t,(function(e){i[e]=null})),this.extraEls=[]}}],[{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=hE(e,t,n,r,i);s.key=Tm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=hE(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 dE}},{key:"POSITIONS",get:function(){return pE}}]),n}(aE),bE="xgplayer-is-enter",wE="xgplayer-pause",TE="xgplayer-playing",AE="xgplayer-ended",_E="xgplayer-isloading",EE="xgplayer-is-error",CE="xgplayer-replay",RE="xgplayer-nostart",SE="not-allow-autoplay",LE=6;function xE(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 IE=function(e){pT(n,e);var t=mT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(yT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"_onMouseenter",(function(e){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),dT(yT(r),"_onMouseLeave",(function(e){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return hT(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}(kE);function ME(){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 OE(){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 UE=function(e){pT(n,e);var t=mT(n);function n(){return cT(this,n),t.apply(this,arguments)}return hT(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;kT(vT(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:ME,class:"xg-get-cssfull"},exitCssFullscreen:{icon:OE,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){kT(vT(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(xE(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:pE.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(IE);function PE(){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 DE=function(e){pT(n,e);var t=mT(n);function n(){return cT(this,n),t.apply(this,arguments)}return hT(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:PE,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){B_.addClass(this.root,"show")}},{key:"hide",value:function(){B_.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:pE.ROOT_TOP,index:0}}}]),n}(kE);function NE(){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 BE(){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 FE=function(e){pT(n,e);var t=mT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(yT(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 hT(n,[{key:"afterCreate",value:function(){var e=this;kT(vT(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=B_.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:DE,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===H_.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:NE,class:"xg-get-fullscreen"},exitFullscreen:{icon:BE,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){kT(vT(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===H_.device?"touchend":"click",this.handleFullscreen),"mobile"===H_.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(xE(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:pE.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(IE);function jE(){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 VE(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}var HE=function(e){pT(n,e);var t=mT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(yT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=yT(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 hT(n,[{key:"afterCreate",value:function(){kT(vT(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([z_,q_,K_,$_],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:jE,class:"xg-icon-play"},pause:{icon:VE,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(){kT(vT(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(xE(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:pE.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(IE),zE=Sn,WE=Zo.findIndex,qE="findIndex",KE=!0;qE in[]&&Array(1)[qE]((function(){KE=!1})),zE({target:"Array",proto:!0,forced:KE},{findIndex:function(e){return WE(this,e,arguments.length>1?arguments[1]:void 0)}});var GE=zc("Array").findIndex,YE=ae,QE=GE,XE=Array.prototype,$E=t((function(e){var t=e.findIndex;return e===XE||YE(XE,e)&&t===XE.findIndex?QE:t})),JE=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],ZE=function(){function e(t){cT(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 hT(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=Fw(n,10),e.end=Fw(n+e.percent*t.duration,10),e.duration=Fw(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=$E(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||Fw(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(Fw(1e3*t,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==B_.typeOf(e.played)){var i=$E(this).call(this,1e3*e.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:Fw(1e3*e.played,10)}),this.playedIndex=i}if("Undefined"!==B_.typeOf(e.cached)){var o=$E(this).call(this,1e3*e.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:Fw(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(B_.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++)B_.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return B_.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=B_.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=B_.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(JE).call(JE,(function(t){s.appendChild(B_.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}(),eC={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},tC=function(e){pT(n,e);var t=mT(n);function n(e){var r;return cT(this,n),dT(yT(r=t.call(this,e)),"onMoveOnly",(function(e,t){var n=yT(r),i=n.pos,o=n.config,a=n.player,s=t;if(e){B_.event(e);var l=B_.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)})),dT(yT(r),"onBodyClick",(function(e){r.pos.isLocked&&(r.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())})),dT(yT(r),"_mouseDownHandler",(function(e,t){r._state.time=t.currentTime,r.updateWidth(t.currentTime,t.seekTime,t.percent,0),r._updateInnerFocus(t)})),dT(yT(r),"_mouseUpHandler",(function(e,t){yT(r).pos.moving&&r.updateWidth(t.currentTime,t.seekTime,t.percent,2)})),dT(yT(r),"_mouseMoveHandler",(function(e,t){var n=yT(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)})),dT(yT(r),"onMouseDown",(function(e){var t=yT(r),n=t._state,i=t.player,o=t.pos,a=t.config,s=t.playerConfig,l=B_.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(),B_.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),B_.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),B_.event(e),o.x=u,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,B_.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()}})),dT(yT(r),"onMouseUp",(function(e){var t=yT(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=t._state;if(o){e.stopPropagation(),e.preventDefault(),B_.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),B_.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),B_.event(e),B_.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)),B_.setTimeout(yT(r),(function(){r.resetSeekState()}),1),n.focus()}})),dT(yT(r),"onMouseMove",(function(e){var t=yT(r),n=t._state,i=t.pos,o=t.player,a=t.config;B_.checkTouchSupport()&&e.preventDefault(),B_.event(e);var s=B_.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)}})),dT(yT(r),"onMouseOut",(function(e){r.triggerCallbacks("mouseout",null,e)})),dT(yT(r),"onMouseOver",(function(e){r.triggerCallbacks("mouseover",null,e)})),dT(yT(r),"onMouseEnter",(function(e){var t=yT(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),B_.event(e);var o=B_.getEventPos(e,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(e,a);r.triggerCallbacks("mouseenter",s,e),r.focus()}})),dT(yT(r),"onMouseLeave",(function(e){r.triggerCallbacks("mouseleave",null,e),r.unlock(),r._updateInnerFocus(null)})),dT(yT(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 hT(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=lT(lT({fragments:t},n),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(i):(this.innerList=new ZE(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"===H_.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(Q_,(function(){e.onMouseLeave()})),this.on(Y_,(function(){e.onTimeupdate()})),this.on(G_,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on("progress",(function(){e.onCacheUpdate()})),this.on(W_,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on($_,(function(){e.onReset()})),this.on(Z_,(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"===uT(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(PD){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),PD)}}))}},{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(),B_.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),B_.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;yw(h=h<0?0:h>1?1:h)&&(h=this.player.currentTime/this.offsetDuration);var d=Fw(h*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:d,seekTime:B_.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=Fw(1e3*n.now,10)-Fw(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=B_.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=B_.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:pE.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:eC.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return eC}}]),n}(kE),nC=function(e){pT(n,e);var t=mT(n);function n(e){var r;return cT(this,n),(r=t.call(this,e)).isActiving=!1,r}return hT(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([Q_,G_,Y_],(function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()})),this.on(W_,(function(){e.onTimeUpdate(!0)})),this.on($_,(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=B_.adjustTimeByDuration(i,r,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(B_.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=B_.format(r))):(this.timeDom.innerHTML=this.minWidthTime(B_.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=B_.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(B_.format(0)),this.centerDurDom.innerHTML=B_.format(0)):(this.timeDom.innerHTML=this.minWidthTime(B_.format(0)),this.durationDom.innerHTML=B_.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=B_.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=B_.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),this.extraEls=[this.centerCurDom,this.centerDurDom]}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(B_.hide(this.durationDom),B_.hide(this.timeDom),B_.hide(Qb(this).call(this,".time-separator")),B_.show(Qb(this).call(this,".time-live-tag"))):B_.hide(Qb(this).call(this,".time-live-tag"));e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(B_.hide(this.durationDom),B_.hide(this.timeDom),B_.hide(Qb(this).call(this,".time-separator")),B_.show(Qb(this).call(this,".time-live-tag"))):(B_.hide(Qb(this).call(this,".time-live-tag")),B_.show(Qb(this).call(this,".time-separator")),B_.show(this.durationDom),B_.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(B_.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(B_.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(G_,n),t.isSeeking&&t.media.seeking?this.once(G_,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:pE.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(kE);function rC(){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 iC(){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 oC(){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 aC=function(e){pT(n,e);var t=mT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(yT(r=t.call.apply(t,Tm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=yT(r).player,n=Qb(r).call(r,".xgplayer-bar");B_.event(e);var i=n.getBoundingClientRect(),o=B_.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})),dT(yT(r),"onBarMouseMove",(function(e){var t=yT(r)._d;if(t.isStart){var n=yT(r),i=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),B_.event(e);var a=B_.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,e)}})),dT(yT(r),"onBarMouseUp",(function(e){B_.event(e),document.removeEventListener("mouseup",r.onBarMouseUp);var t=yT(r)._d;t.isStart=!1,t.isMoving=!1})),dT(yT(r),"onMouseenter",(function(e){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),dT(yT(r),"onMouseleave",(function(e){r._d.isActive=!1,r.unFocus(100,!1,e),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),dT(yT(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 hT(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:iC,class:"xg-volume-small"},volumeLarge:{icon:rC,class:"xg-volume"},volumeMuted:{icon:oC,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"!==H_.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(X_,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==B_.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=Fw(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&&(B_.clearTimeout(this,this._timerId),this._timerId=null),B_.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&&(B_.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=B_.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),B_.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&&(B_.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"===H_.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:pE.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(kE),sC=i,lC=ft("iterator"),uC=!sC((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[lC]||"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})),cC=v,fC=2147483647,hC=/[^\0-\u007E]/,dC=/[.\u3002\uFF0E\uFF61]/g,pC="Overflow: input needs wider integers to process",vC=RangeError,gC=cC(dC.exec),yC=Math.floor,mC=String.fromCharCode,kC=cC("".charCodeAt),bC=cC([].join),wC=cC([].push),TC=cC("".replace),AC=cC("".split),_C=cC("".toLowerCase),EC=function(e){return e+22+75*(e<26)},CC=function(e,t,n){var r=0;for(e=n?yC(e/700):e>>1,e+=yC(e/t);e>455;)e=yC(e/35),r+=36;return yC(r+36*e/(e+38))},RC=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=kC(e,n++);if(i>=55296&&i<=56319&&n<r){var o=kC(e,n++);56320==(64512&o)?wC(t,((1023&i)<<10)+(1023&o)+65536):(wC(t,i),n--)}else wC(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&&wC(t,mC(r));var l=t.length,u=l;for(l&&wC(t,"-");u<i;){var c=fC;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<c&&(c=r);var f=u+1;if(c-o>yC((fC-a)/f))throw vC(pC);for(a+=(c-o)*f,o=c,n=0;n<e.length;n++){if((r=e[n])<o&&++a>fC)throw vC(pC);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;wC(t,mC(EC(p+v%g))),h=yC(v/g),d+=36}wC(t,mC(EC(h))),s=CC(a,f,u==l),a=0,u++}}a++,o++}return bC(t,"")},SC=no,LC=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:SC(e,r,t[r],n);return e},xC=Sn,IC=r,MC=I,OC=v,UC=S,PC=uC,DC=no,NC=io,BC=LC,FC=Lo,jC=Vl,VC=qo,HC=Xh,zC=C,WC=$e,qC=Qt,KC=er,GC=tn,YC=Z,QC=Kr,XC=Bi,$C=B,JC=th,ZC=Yf,eR=sd,tR=YA,nR=ft("iterator"),rR="URLSearchParams",iR=rR+"Iterator",oR=VC.set,aR=VC.getterFor(rR),sR=VC.getterFor(iR),lR=Object.getOwnPropertyDescriptor,uR=function(e){if(!UC)return IC[e];var t=lR(IC,e);return t&&t.value},cR=uR("fetch"),fR=uR("Request"),hR=uR("Headers"),dR=fR&&fR.prototype,pR=hR&&hR.prototype,vR=IC.RegExp,gR=IC.TypeError,yR=IC.decodeURIComponent,mR=IC.encodeURIComponent,kR=OC("".charAt),bR=OC([].join),wR=OC([].push),TR=OC("".replace),AR=OC([].shift),_R=OC([].splice),ER=OC("".split),CR=OC("".slice),RR=/\+/g,SR=Array(4),LR=function(e){return SR[e-1]||(SR[e-1]=vR("((?:%[\\da-f]{2}){"+e+"})","gi"))},xR=function(e){try{return yR(e)}catch(PD){return e}},IR=function(e){var t=TR(e,RR," "),n=4;try{return yR(t)}catch(PD){for(;n;)t=TR(t,LR(n--),xR);return t}},MR=/[!'()~]|%20/g,OR={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},UR=function(e){return OR[e]},PR=function(e){return TR(mR(e),MR,UR)},DR=jC((function(e,t){oR(this,{type:iR,iterator:JC(aR(e).entries),kind:t})}),"Iterator",(function(){var e=sR(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),NR=function(e){this.entries=[],this.url=null,void 0!==e&&(YC(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===kR(e,0)?CR(e,1):e:QC(e)))};NR.prototype={type:rR,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,l=ZC(e);if(l)for(n=(t=JC(e,l)).next;!(r=MC(n,t)).done;){if(o=(i=JC(GC(r.value))).next,(a=MC(o,i)).done||(s=MC(o,i)).done||!MC(o,i).done)throw gR("Expected sequence with length 2");wR(this.entries,{key:QC(a.value),value:QC(s.value)})}else for(var u in e)WC(e,u)&&wR(this.entries,{key:u,value:QC(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=ER(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ER(t,"="),wR(this.entries,{key:IR(AR(n)),value:IR(bR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],wR(n,PR(e.key)+"="+PR(e.value));return bR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var BR=function(){HC(this,FR);var e=oR(this,new NR(arguments.length>0?arguments[0]:void 0));UC||(this.length=e.entries.length)},FR=BR.prototype;if(BC(FR,{append:function(e,t){eR(arguments.length,2);var n=aR(this);wR(n.entries,{key:QC(e),value:QC(t)}),UC||this.length++,n.updateURL()},delete:function(e){eR(arguments.length,1);for(var t=aR(this),n=t.entries,r=QC(e),i=0;i<n.length;)n[i].key===r?_R(n,i,1):i++;UC||(this.length=n.length),t.updateURL()},get:function(e){eR(arguments.length,1);for(var t=aR(this).entries,n=QC(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){eR(arguments.length,1);for(var t=aR(this).entries,n=QC(e),r=[],i=0;i<t.length;i++)t[i].key===n&&wR(r,t[i].value);return r},has:function(e){eR(arguments.length,1);for(var t=aR(this).entries,n=QC(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){eR(arguments.length,1);for(var n,r=aR(this),i=r.entries,o=!1,a=QC(e),s=QC(t),l=0;l<i.length;l++)(n=i[l]).key===a&&(o?_R(i,l--,1):(o=!0,n.value=s));o||wR(i,{key:a,value:s}),UC||(this.length=i.length),r.updateURL()},sort:function(){var e=aR(this);tR(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=aR(this).entries,r=qC(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 DR(this,"keys")},values:function(){return new DR(this,"values")},entries:function(){return new DR(this,"entries")}},{enumerable:!0}),DC(FR,nR,FR.entries,{name:"entries"}),DC(FR,"toString",(function(){return aR(this).serialize()}),{enumerable:!0}),UC&&NC(FR,"size",{get:function(){return aR(this).entries.length},configurable:!0,enumerable:!0}),FC(BR,rR),xC({global:!0,constructor:!0,forced:!PC},{URLSearchParams:BR}),!PC&&zC(hR)){var jR=OC(pR.has),VR=OC(pR.set),HR=function(e){if(YC(e)){var t,n=e.body;if(KC(n)===rR)return t=e.headers?new hR(e.headers):new hR,jR(t,"content-type")||VR(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),XC(e,{body:$C(0,QC(n)),headers:$C(0,t)})}return e};if(zC(cR)&&xC({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return cR(e,arguments.length>1?HR(arguments[1]):{})}}),zC(fR)){var zR=function(e){return HC(this,dR),new fR(e,arguments.length>1?HR(arguments[1]):{})};dR.constructor=zR,zR.prototype=dR,xC({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:zR})}}var WR,qR=Sn,KR=S,GR=uC,YR=r,QR=Qt,XR=v,$R=no,JR=io,ZR=Xh,eS=$e,tS=iT,nS=ab,rS=Yi,iS=cc.codeAt,oS=function(e){var t,n,r=[],i=AC(TC(_C(e),dC,"."),".");for(t=0;t<i.length;t++)n=i[t],wC(r,gC(hC,n)?"xn--"+RC(n):n);return bC(r,".")},aS=Kr,sS=Lo,lS=sd,uS={URLSearchParams:BR,getState:aR},cS=qo,fS=cS.set,hS=cS.getterFor("URL"),dS=uS.URLSearchParams,pS=uS.getState,vS=YR.URL,gS=YR.TypeError,yS=YR.parseInt,mS=Math.floor,kS=Math.pow,bS=XR("".charAt),wS=XR(/./.exec),TS=XR([].join),AS=XR(1..toString),_S=XR([].pop),ES=XR([].push),CS=XR("".replace),RS=XR([].shift),SS=XR("".split),LS=XR("".slice),xS=XR("".toLowerCase),IS=XR([].unshift),MS="Invalid scheme",OS="Invalid host",US="Invalid port",PS=/[a-z]/i,DS=/[\d+-.a-z]/i,NS=/\d/,BS=/^0x/i,FS=/^[0-7]+$/,jS=/^\d+$/,VS=/^[\da-f]+$/i,HS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,zS=/[\0\t\n\r #/:<>?@[\\\]^|]/,WS=/^[\u0000-\u0020]+/,qS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,KS=/[\t\n\r]/g,GS=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)IS(t,e%256),e=mS(e/256);return TS(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+=AS(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},YS={},QS=tS({},YS,{" ":1,'"':1,"<":1,">":1,"`":1}),XS=tS({},QS,{"#":1,"?":1,"{":1,"}":1}),$S=tS({},XS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),JS=function(e,t){var n=iS(e,0);return n>32&&n<127&&!eS(t,e)?e:encodeURIComponent(e)},ZS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},eL=function(e,t){var n;return 2==e.length&&wS(PS,bS(e,0))&&(":"==(n=bS(e,1))||!t&&"|"==n)},tL=function(e){var t;return e.length>1&&eL(LS(e,0,2))&&(2==e.length||"/"===(t=bS(e,2))||"\\"===t||"?"===t||"#"===t)},nL=function(e){return"."===e||"%2e"===xS(e)},rL={},iL={},oL={},aL={},sL={},lL={},uL={},cL={},fL={},hL={},dL={},pL={},vL={},gL={},yL={},mL={},kL={},bL={},wL={},TL={},AL={},_L=function(e,t,n){var r,i,o,a=aS(e);if(t){if(i=this.parse(a))throw gS(i);this.searchParams=null}else{if(void 0!==n&&(r=new _L(n,!0)),i=this.parse(a,null,r))throw gS(i);(o=pS(new dS)).bindURL(this),this.searchParams=o}};_L.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,l=this,u=t||rL,c=0,f="",h=!1,d=!1,p=!1;for(e=aS(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=CS(e,WS,""),e=CS(e,qS,"$1")),e=CS(e,KS,""),r=nS(e);c<=r.length;){switch(i=r[c],u){case rL:if(!i||!wS(PS,i)){if(t)return MS;u=oL;continue}f+=xS(i),u=iL;break;case iL:if(i&&(wS(DS,i)||"+"==i||"-"==i||"."==i))f+=xS(i);else{if(":"!=i){if(t)return MS;f="",u=oL,c=0;continue}if(t&&(l.isSpecial()!=eS(ZS,f)||"file"==f&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=f,t)return void(l.isSpecial()&&ZS[l.scheme]==l.port&&(l.port=null));f="","file"==l.scheme?u=gL:l.isSpecial()&&n&&n.scheme==l.scheme?u=aL:l.isSpecial()?u=cL:"/"==r[c+1]?(u=sL,c++):(l.cannotBeABaseURL=!0,ES(l.path,""),u=wL)}break;case oL:if(!n||n.cannotBeABaseURL&&"#"!=i)return MS;if(n.cannotBeABaseURL&&"#"==i){l.scheme=n.scheme,l.path=rS(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,u=AL;break}u="file"==n.scheme?gL:lL;continue;case aL:if("/"!=i||"/"!=r[c+1]){u=lL;continue}u=fL,c++;break;case sL:if("/"==i){u=hL;break}u=bL;continue;case lL:if(l.scheme=n.scheme,i==WR)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=rS(n.path),l.query=n.query;else if("/"==i||"\\"==i&&l.isSpecial())u=uL;else if("?"==i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=rS(n.path),l.query="",u=TL;else{if("#"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=rS(n.path),l.path.length--,u=bL;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=rS(n.path),l.query=n.query,l.fragment="",u=AL}break;case uL:if(!l.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,u=bL;continue}u=hL}else u=fL;break;case cL:if(u=fL,"/"!=i||"/"!=bS(f,c+1))continue;c++;break;case fL:if("/"!=i&&"\\"!=i){u=hL;continue}break;case hL:if("@"==i){h&&(f="%40"+f),h=!0,o=nS(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=JS(g,$S);p?l.password+=y:l.username+=y}else p=!0}f=""}else if(i==WR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(h&&""==f)return"Invalid authority";c-=nS(f).length+1,f="",u=dL}else f+=i;break;case dL:case pL:if(t&&"file"==l.scheme){u=mL;continue}if(":"!=i||d){if(i==WR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(l.isSpecial()&&""==f)return OS;if(t&&""==f&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(f))return a;if(f="",u=kL,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return OS;if(a=l.parseHost(f))return a;if(f="",u=vL,t==pL)return}break;case vL:if(!wS(NS,i)){if(i==WR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()||t){if(""!=f){var m=yS(f,10);if(m>65535)return US;l.port=l.isSpecial()&&m===ZS[l.scheme]?null:m,f=""}if(t)return;u=kL;continue}return US}f+=i;break;case gL:if(l.scheme="file","/"==i||"\\"==i)u=yL;else{if(!n||"file"!=n.scheme){u=bL;continue}if(i==WR)l.host=n.host,l.path=rS(n.path),l.query=n.query;else if("?"==i)l.host=n.host,l.path=rS(n.path),l.query="",u=TL;else{if("#"!=i){tL(TS(rS(r,c),""))||(l.host=n.host,l.path=rS(n.path),l.shortenPath()),u=bL;continue}l.host=n.host,l.path=rS(n.path),l.query=n.query,l.fragment="",u=AL}}break;case yL:if("/"==i||"\\"==i){u=mL;break}n&&"file"==n.scheme&&!tL(TS(rS(r,c),""))&&(eL(n.path[0],!0)?ES(l.path,n.path[0]):l.host=n.host),u=bL;continue;case mL:if(i==WR||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&eL(f))u=bL;else if(""==f){if(l.host="",t)return;u=kL}else{if(a=l.parseHost(f))return a;if("localhost"==l.host&&(l.host=""),t)return;f="",u=kL}continue}f+=i;break;case kL:if(l.isSpecial()){if(u=bL,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=WR&&(u=bL,"/"!=i))continue}else l.fragment="",u=AL;else l.query="",u=TL;break;case bL:if(i==WR||"/"==i||"\\"==i&&l.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=xS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==i||"\\"==i&&l.isSpecial()||ES(l.path,"")):nL(f)?"/"==i||"\\"==i&&l.isSpecial()||ES(l.path,""):("file"==l.scheme&&!l.path.length&&eL(f)&&(l.host&&(l.host=""),f=bS(f,0)+":"),ES(l.path,f)),f="","file"==l.scheme&&(i==WR||"?"==i||"#"==i))for(;l.path.length>1&&""===l.path[0];)RS(l.path);"?"==i?(l.query="",u=TL):"#"==i&&(l.fragment="",u=AL)}else f+=JS(i,XS);break;case wL:"?"==i?(l.query="",u=TL):"#"==i?(l.fragment="",u=AL):i!=WR&&(l.path[0]+=JS(i,YS));break;case TL:t||"#"!=i?i!=WR&&("'"==i&&l.isSpecial()?l.query+="%27":l.query+="#"==i?"%23":JS(i,YS)):(l.fragment="",u=AL);break;case AL:i!=WR&&(l.fragment+=JS(i,QS))}c++}},parseHost:function(e){var t,n,r;if("["==bS(e,0)){if("]"!=bS(e,e.length-1))return OS;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 bS(e,f)};if(":"==h()){if(":"!=bS(e,1))return;f+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&wS(VS,h());)t=16*t+yS(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(!wS(NS,h()))return;for(;wS(NS,h());){if(o=yS(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}(LS(e,1,-1)),!t)return OS;this.host=t}else if(this.isSpecial()){if(e=oS(e),wS(HS,e))return OS;if(t=function(e){var t,n,r,i,o,a,s,l=SS(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"==bS(i,0)&&(o=wS(BS,i)?16:8,i=LS(i,8==o?1:2)),""===i)a=0;else{if(!wS(10==o?jS:8==o?FS:VS,i))return e;a=yS(i,o)}ES(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=kS(256,5-t))return null}else if(a>255)return null;for(s=_S(n),r=0;r<n.length;r++)s+=n[r]*kS(256,3-r);return s}(e),null===t)return OS;this.host=t}else{if(wS(zS,e))return OS;for(t="",n=nS(e),r=0;r<n.length;r++)t+=JS(n[r],YS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return eS(ZS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&eL(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+=GS(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+TS(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw gS(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new EL(e.path[0]).origin}catch(PD){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+GS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(aS(e)+":",rL)},getUsername:function(){return this.username},setUsername:function(e){var t=nS(aS(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=JS(t[n],$S)}},getPassword:function(){return this.password},setPassword:function(e){var t=nS(aS(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=JS(t[n],$S)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?GS(e):GS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,dL)},getHostname:function(){var e=this.host;return null===e?"":GS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,pL)},getPort:function(){var e=this.port;return null===e?"":aS(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=aS(e))?this.port=null:this.parse(e,vL))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+TS(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,kL))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=aS(e))?this.query=null:("?"==bS(e,0)&&(e=LS(e,1)),this.query="",this.parse(e,TL)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=aS(e))?("#"==bS(e,0)&&(e=LS(e,1)),this.fragment="",this.parse(e,AL)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var EL=function(e){var t=ZR(this,CL),n=lS(arguments.length,1)>1?arguments[1]:void 0,r=fS(t,new _L(e,!1,n));KR||(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())},CL=EL.prototype,RL=function(e,t){return{get:function(){return hS(this)[e]()},set:t&&function(e){return hS(this)[t](e)},configurable:!0,enumerable:!0}};if(KR&&(JR(CL,"href",RL("serialize","setHref")),JR(CL,"origin",RL("getOrigin")),JR(CL,"protocol",RL("getProtocol","setProtocol")),JR(CL,"username",RL("getUsername","setUsername")),JR(CL,"password",RL("getPassword","setPassword")),JR(CL,"host",RL("getHost","setHost")),JR(CL,"hostname",RL("getHostname","setHostname")),JR(CL,"port",RL("getPort","setPort")),JR(CL,"pathname",RL("getPathname","setPathname")),JR(CL,"search",RL("getSearch","setSearch")),JR(CL,"searchParams",RL("getSearchParams")),JR(CL,"hash",RL("getHash","setHash"))),$R(CL,"toJSON",(function(){return hS(this).serialize()}),{enumerable:!0}),$R(CL,"toString",(function(){return hS(this).serialize()}),{enumerable:!0}),vS){var SL=vS.createObjectURL,LL=vS.revokeObjectURL;SL&&$R(EL,"createObjectURL",QR(SL,vS)),LL&&$R(EL,"revokeObjectURL",QR(LL,vS))}sS(EL,"URL"),qR({global:!0,constructor:!0,forced:!GR,sham:!KR},{URL:EL});var xL=Sn,IL=i,ML=sd,OL=Kr,UL=uC,PL=oe("URL");xL({target:"URL",stat:!0,forced:!(UL&&IL((function(){PL.canParse()})))},{canParse:function(e){var t=ML(arguments.length,1),n=OL(e),r=t<2||void 0===arguments[1]?void 0:OL(arguments[1]);try{return!!new PL(n,r)}catch(PD){return!1}}});var DL=t(ee.URL),NL=Z,BL=k,FL=ft("match"),jL=function(e){var t;return NL(e)&&(void 0!==(t=e[FL])?!!t:"RegExp"==BL(e))},VL=TypeError,HL=function(e){if(jL(e))throw VL("The method doesn't accept regular expressions");return e},zL=ft("match"),WL=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[zL]=!1,"/./"[e](t)}catch(r){}}return!1},qL=Sn,KL=T;R.f;var GL=Nn,YL=Kr,QL=HL,XL=G,$L=WL,JL=KL("".startsWith),ZL=KL("".slice),ex=Math.min;qL({target:"String",proto:!0,forced:!$L("startsWith")},{startsWith:function(e){var t=YL(XL(this));QL(e);var n=GL(ex(arguments.length>1?arguments[1]:void 0,t.length)),r=YL(e);return JL?JL(t,r,n):ZL(t,n,n+r.length)===r}});var tx=zc("String").startsWith,nx=ae,rx=tx,ix=String.prototype,ox=t((function(e){var t=e.startsWith;return"string"==typeof e||e===ix||nx(ix,e)&&t===ix.startsWith?rx:t})),ax=Z,sx=Math.floor;Sn({target:"Number",stat:!0},{isInteger:Number.isInteger||function(e){return!ax(e)&&isFinite(e)&&sx(e)===e}});var lx=t(ee.Number.isInteger),ux=ni.includes;Sn({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return ux(this,e,arguments.length>1?arguments[1]:void 0)}});var cx=zc("Array").includes,fx=Sn,hx=HL,dx=G,px=Kr,vx=WL,gx=v("".indexOf);fx({target:"String",proto:!0,forced:!vx("includes")},{includes:function(e){return!!~gx(px(dx(this)),px(hx(e)),arguments.length>1?arguments[1]:void 0)}});var yx=zc("String").includes,mx=ae,kx=cx,bx=yx,wx=Array.prototype,Tx=String.prototype,Ax=t((function(e){var t=e.includes;return e===wx||mx(wx,e)&&t===wx.includes?kx:"string"==typeof e||e===Tx||mx(Tx,e)&&t===Tx.includes?bx:t})),_x=Ye,Ex=$r,Cx=Fn,Rx=function(e){for(var t=_x(this),n=Cx(t),r=arguments.length,i=Ex(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:Ex(o,n);a>i;)t[i++]=e;return t};Sn({target:"Array",proto:!0},{fill:Rx});var Sx=zc("Array").fill,Lx=ae,xx=Sx,Ix=Array.prototype,Mx=t((function(e){var t=e.fill;return e===Ix||Lx(Ix,e)&&t===Ix.fill?xx:t})),Ox={exports:{}},Ux=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Px=i,Dx=Z,Nx=k,Bx=Ux,Fx=Object.isExtensible,jx=Px((function(){Fx(1)}))||Bx?function(e){return!!Dx(e)&&((!Bx||"ArrayBuffer"!=Nx(e))&&(!Fx||Fx(e)))}:Fx,Vx=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hx=Sn,zx=v,Wx=ri,qx=Z,Kx=$e,Gx=Xt.f,Yx=Fi,Qx=Hi,Xx=jx,$x=Vx,Jx=!1,Zx=nt("meta"),eI=0,tI=function(e){Gx(e,Zx,{value:{objectID:"O"+eI++,weakData:{}}})},nI=Ox.exports={enable:function(){nI.enable=function(){},Jx=!0;var e=Yx.f,t=zx([].splice),n={};n[Zx]=1,e(n).length&&(Yx.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===Zx){t(r,i,1);break}return r},Hx({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Qx.f}))},fastKey:function(e,t){if(!qx(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Kx(e,Zx)){if(!Xx(e))return"F";if(!t)return"E";tI(e)}return e[Zx].objectID},getWeakData:function(e,t){if(!Kx(e,Zx)){if(!Xx(e))return!0;if(!t)return!1;tI(e)}return e[Zx].weakData},onFreeze:function(e){return $x&&Jx&&Xx(e)&&!Kx(e,Zx)&&tI(e),e}};Wx[Zx]=!0;var rI=Ox.exports,iI=Sn,oI=r,aI=rI,sI=i,lI=gn,uI=kh,cI=Xh,fI=C,hI=Z,dI=Lo,pI=Xt.f,vI=Zo.forEach,gI=S,yI=qo.set,mI=qo.getterFor,kI=Bi,bI=io,wI=LC,TI=Qt,AI=Xh,_I=W,EI=kh,CI=du,RI=pu,SI=Gh,LI=S,xI=rI.fastKey,II=qo.set,MI=qo.getterFor,OI={getConstructor:function(e,t,n,r){var i=e((function(e,i){AI(e,o),II(e,{type:t,index:kI(null),first:void 0,last:void 0,size:0}),LI||(e.size=0),_I(i)||EI(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=MI(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=xI(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),LI?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var n,r=a(e),i=xI(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return wI(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,LI?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),LI?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=TI(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)}}),wI(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)}}),LI&&bI(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=MI(t),o=MI(r);CI(e,t,(function(e,t){II(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)?RI("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,RI(void 0,!0))}),n?"entries":"values",!n,!0),SI(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=oI[e],l=s&&s.prototype,u={};if(gI&&fI(s)&&(o||l.forEach&&!sI((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){yI(cI(t,c),{type:e,collection:new s}),null!=n&&uI(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,f=mI(e);vI(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||lI(c,e,(function(n,r){var i=f(this).collection;if(!t&&o&&!hI(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||pI(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(t,e,i,a),aI.enable();dI(r,e,!1,!0),u[e]=r,iI({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)}}),OI);var UI=ee.Map,PI=Qt,DI=I,NI=xe,BI=ed,FI=W,jI=kh,VI=[].push,HI=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return BI(this),(t=void 0!==a)&&NI(a),FI(e)?new this:(n=[],t?(r=0,i=PI(a,o>2?arguments[2]:void 0),jI(e,(function(e){DI(VI,n,i(e,r++))}))):jI(e,VI,{that:n}),new this(n))};Sn({target:"Map",stat:!0,forced:!0},{from:HI});var zI=As,WI=function(){return new this(zI(arguments))};Sn({target:"Map",stat:!0,forced:!0},{of:WI});var qI=Ce,KI=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")},GI=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},YI=oe("Map"),QI={Map:YI,set:GI("set",2),get:GI("get",1),has:GI("has",1),remove:GI("delete",1),proto:YI.prototype},XI=KI,$I=QI.remove;Sn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=XI(this),n=!0,r=0,i=arguments.length;r<i;r++)e=$I(t,arguments[r]),n=n&&e;return!!n}});var JI=KI,ZI=QI.get,eM=QI.has,tM=QI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=JI(this);return eM(i,e)?(n=ZI(i,e),"update"in t&&(n=t.update(n,e,i),tM(i,e,n)),n):(r=t.insert(e,i),tM(i,e,r),r)}});var nM=I,rM=function(e,t,n){for(var r,i,o=n||e.next;!(r=nM(o,e)).done;)if(void 0!==(i=t(r.value)))return i},iM=function(e,t,n){return n?rM(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},oM=Qt,aM=KI,sM=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aM(this),n=oM(e,arguments.length>1?arguments[1]:void 0);return!1!==sM(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var lM=Qt,uM=KI,cM=iM,fM=QI.Map,hM=QI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=uM(this),n=lM(e,arguments.length>1?arguments[1]:void 0),r=new fM;return cM(t,(function(e,i){n(e,i,t)&&hM(r,i,e)})),r}});var dM=Qt,pM=KI,vM=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=pM(this),n=dM(e,arguments.length>1?arguments[1]:void 0),r=vM(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var gM=Qt,yM=KI,mM=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=yM(this),n=gM(e,arguments.length>1?arguments[1]:void 0),r=mM(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var kM=Sn,bM=I,wM=C,TM=xe,AM=kh,_M=QI.Map,EM=v([].push);kM({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(wM(this)?this:_M);TM(t);var r=TM(n.has),i=TM(n.get),o=TM(n.set);return AM(e,(function(e){var a=t(e);bM(r,n,a)?EM(bM(i,n,a),e):bM(o,n,a,[e])})),n}});var CM=function(e,t){return e===t||e!=e&&t!=t},RM=KI,SM=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===SM(RM(this),(function(t){if(CM(t,e))return!0}),!0)}});var LM=I,xM=kh,IM=C,MM=xe,OM=QI.Map;Sn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(IM(this)?this:OM);MM(t);var r=MM(n.set);return xM(e,(function(e){LM(r,n,t(e),e)})),n}});var UM=KI,PM=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=PM(UM(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var DM=Qt,NM=KI,BM=iM,FM=QI.Map,jM=QI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=NM(this),n=DM(e,arguments.length>1?arguments[1]:void 0),r=new FM;return BM(t,(function(e,i){jM(r,n(e,i,t),e)})),r}});var VM=Qt,HM=KI,zM=iM,WM=QI.Map,qM=QI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=HM(this),n=VM(e,arguments.length>1?arguments[1]:void 0),r=new WM;return zM(t,(function(e,i){qM(r,i,n(e,i,t))})),r}});var KM=KI,GM=kh,YM=QI.set;Sn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=KM(this),n=arguments.length,r=0;r<n;)GM(arguments[r++],(function(e,n){YM(t,e,n)}),{AS_ENTRIES:!0});return t}});var QM=xe,XM=KI,$M=iM,JM=TypeError;Sn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=XM(this),n=arguments.length<2,r=n?void 0:arguments[1];if(QM(e),$M(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw JM("Reduce of empty map with no initial value");return r}});var ZM=Qt,eO=KI,tO=iM;Sn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=eO(this),n=ZM(e,arguments.length>1?arguments[1]:void 0);return!0===tO(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var nO=xe,rO=KI,iO=TypeError,oO=QI.get,aO=QI.has,sO=QI.set;Sn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=rO(this),r=arguments.length;nO(t);var i=aO(n,e);if(!i&&r<3)throw iO("Updating absent value");var o=i?oO(n,e):nO(r>2?arguments[2]:void 0)(e,n);return sO(n,e,t(o,e,n)),n}});var lO=I,uO=xe,cO=C,fO=tn,hO=TypeError,dO=function(e,t){var n,r=fO(this),i=uO(r.get),o=uO(r.has),a=uO(r.set),s=arguments.length>2?arguments[2]:void 0;if(!cO(t)&&!cO(s))throw hO("At least one callback required");return lO(o,r,e)?(n=lO(i,r,e),cO(t)&&(n=t(n),lO(a,r,e,n))):cO(s)&&(n=s(),lO(a,r,e,n)),n};Sn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:dO}),Sn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:dO});var pO=t(UI);function vO(e){return(vO="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 gO(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,yO(r.key),r)}}function yO(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 mO=xe,kO=Ye,bO=z,wO=Fn,TO=TypeError,AO=function(e){return function(t,n,r,i){mO(n);var o=kO(t),a=bO(o),s=wO(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 TO("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}},_O={left:AO(!1),right:AO(!0)}.left;Sn({target:"Array",proto:!0,forced:!Hh&&pe>79&&pe<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return _O(this,e,t,t>1?arguments[1]:void 0)}});var EO,CO,RO,SO=zc("Array").reduce,LO=ae,xO=SO,IO=Array.prototype,MO=t((function(e){var t=e.reduce;return e===IO||LO(IO,e)&&t===IO.reduce?xO:t})),OO=1,UO=2,PO=3,DO=4,NO=["Boolean","Number","String","Undefined","Null","Date","Object"],BO=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=[OO]).call(t,o)),e.disabled||(r=console).debug.apply(r,Tm(n=["[".concat(FO(),"]"),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=[UO]).call(t,o)),e.disabled||(r=console).log.apply(r,Tm(n=["[".concat(FO(),"]"),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=[PO]).call(t,o)),e.disabled||(r=console).warn.apply(r,Tm(n=["[".concat(FO(),"]"),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=[DO]).call(t,o)),e.disabled||(r=console).error.apply(r,Tm(n=["[".concat(FO(),"]"),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 VO(e)}));t="[".concat(FO(),"]")+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&&gO(t.prototype,n),r&&gO(t,r),Ok(t,"prototype",{writable:!1}),e}();function FO(){return(new Date).toLocaleString()}function jO(e){var t;if("object"!==vO(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 VO(e,t,n){var r;n||(n=1),t||(t=2);var i={};if(!e||"object"!==vO(e))return e;var o=Fk(r=Object.prototype.toString.call(e)).call(r,8,-1);if(!Ax(NO).call(NO,o))return o;if(!(n>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n===t?i[a]=jO(e[a]):"object"===vO(e[a])?i[a]=VO(e[a],t,n+1):i[a]=e[a]);return i}}EO=BO,RO=!0,(CO=yO(CO="disabled"))in EO?Ok(EO,CO,{value:RO,enumerable:!0,configurable:!0,writable:!0}):EO[CO]=RO;var HO=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"}),zO=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 WO(e){return aT({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=gA((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 KO={audio:function(e){return qO(e=WO(e),(function(){return{element:document.createElement("audio"),source:DL.createObjectURL(HO)}}))},video:function(e){return qO(e=WO(e),(function(){return{element:document.createElement("video"),source:DL.createObjectURL(zO)}}))}},GO=new BO("AdsPluginBaseAdManager"),YO=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!H_.os.isTizen&&!H_.os.isWebOS&&(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):GO.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(){GO.log("content play"),e.removeClass(SE),e.addClass(TE),e.state<LE&&(e.setState(LE),e.emit(J_))})).catch((function(t){if(GO.error("content play error",t),e.media&&e.media.error)return e.onError(),void e.removeClass(bE)})):e.state<LE&&(e.setState(LE),e.removeClass(SE),e.removeClass(RE),e.removeClass(bE),e.addClass(TE),e.emit(J_))}}]),n}(_T.EventEmitter),QO=new BO("AdsPluginImaAdManager"),XO="xgplayer-ads-playing",$O=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);QO.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&QO.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;QO.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:e._resumeContent(),e.emit(Hm,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.isLinearAdRunning=!0,e.shouldBlockVideoContent=!0,B_.addClass(e.player.root,XO),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}));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;aT(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)}QO.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}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),QO.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._removeMediaEvents(),this._destroyLoader()}},{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=gA((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(Z_,this._onMediaResize),e.on(W_,this._onMediaEnded),e.on(z_,this._onMediaPlay),e.on(q_,this._onMediaPause),e.on(X_,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var e=this.player;e.off(Z_,this._onMediaResize),e.off(W_,this._onMediaEnded),e.off(z_,this._onMediaPlay),e.off(q_,this._onMediaPause),e.off(X_,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,B_.removeClass(this.player.root,XO),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(),B_.removeClass(this.player.root,XO)}},{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]}))}QO.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,a;return pb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player.config.autoplay,n=H_.os.isTizen||H_.os.isWebOS,e.next=5,Nk.all([t?n||KO.video({timeout:800}).then((function(e){return e.result})):Nk.resolve(!1),t&&this.player.config.autoplayMuted?n||KO.video({timeout:800,muted:!0}).then((function(e){return e.result})):Nk.resolve(!1)]);case 5:r=e.sent,i=Sb(r,2),o=i[0],a=i[1],this.autoplayAllowed=o||a,this.autoplayRequiresMuted=!o&&a,QO.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),o}(YO),JO="xgplayer-ad-start",ZO="xgplayer-ad-show-ui",eU=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}(HE),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:"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(){aT(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}(tC),nU=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}(nC),rU=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=[[HE,eU],[nC,nU],[tC,tU],[aC,null],[UE,null],[FE,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,u,c=null;if(a&&!e.getPlugin(a.pluginName))if(e.registerPlugin(a),c=e.getPlugin(a.pluginName),n.appendChild(c.root),null!==(l=c.extraEls)&&void 0!==l&&l.length)gk(u=c.extraEls).call(u,(function(e){n.appendChild(e)}));t.push([s,c])}}))}},{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=[RE,wE,AE,EE,CE,_E];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;B_.hasClass(e.root,JO)||B_.addClass(e.root,JO)}},{key:"hideAdContainer",value:function(){var e=this.player;B_.hasClass(e.root,JO)&&B_.removeClass(e.root,JO)}},{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=r.extraEls,s=n.root,l=n.extraEls;i.contains(o)&&i.removeChild(o),Kk(a)&&a.length&&gk(a).call(a,(function(e,t){i.contains(e)&&i.removeChild(e);var n=null==l?void 0:l[t];null!=n&&n.parentNode&&(n.parentNode.insertBefore(e,n),i.appendChild(n))})),s.parentNode.insertBefore(o,s),i.appendChild(s)}}));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__=B_.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(ZO)}},{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=r.extraEls,s=n.root,l=n.extraEls;o.contains(s)&&o.removeChild(s),o.contains(i)||(i.parentNode.insertBefore(s,i),o.appendChild(i)),Kk(l)&&null!=l&&l.length&&gk(l).call(l,(function(e,t){o.contains(e)&&o.removeChild(e);var n=null==a?void 0:a[t];n&&n.parentNode&&(n.parentNode.insertBefore(e,n),o.appendChild(n))}))}}));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(){gA((function(){s.config.disableAnimate=l,s.config.disableAnimate=u}),10)}))}n.removeClass(ZO)}},{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}(),iU=new BO("AdsPlugin"),oU=function(e){Tb(n,e);var t=Cb(n);function n(){return mb(this,n),t.apply(this,arguments)}return bb(n,[{key:"version",get:function(){return"3.0.23-rc.1"}},{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;iU.log("plugin afterCreate, config: ".concat(Ym(e||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var e,t,n;switch(iU.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 rU(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 B_.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 e=this;this.csManager=new $O({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(Im,(function(){e.uiManager.showAdContainer()})),this.csManager.on(Om,(function(){e.uiManager.hideAdContainer()})),this.csManager.once(Fm,(function(t){t.isPreroll||e.uiManager.hideAdContainer()})),this.csManager.once(zm,(function(){var t;null===(t=e.initPromise)||void 0===t||t.resolve()})),this.csManager.on(Vm,(function(){e.uiManager.showAdUI()})),this.csManager.on(Hm,(function(){e.uiManager.hideAdUI()})),this.csManager.init()}},{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&&(iU.log("block content play"),t.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(kE);function aU(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 sU(e,t){var n;if(e){if("string"==typeof e)return aU(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)?aU(e,t):void 0}}function lU(e,t){var n=void 0!==tc&&$m(e)||e["@@iterator"];if(!n){if(qk(e)||(n=sU(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 uU={},cU={},fU={};!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}}(fU),Ok(cU,"__esModule",{value:!0}),cU.parseDescriptor=cU.SegmentationMessage=void 0;var hU,dU,pU=fU;(dU=hU||(cU.SegmentationMessage=hU={}))[dU.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",dU[dU.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",dU[dU.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",dU[dU.NONE=3]="NONE";cU.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=pU.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 vU=t(ee.Symbol.for),gU=c,yU=X,mU=Un,kU=Fn,bU=Fc,wU=Math.min,TU=[].lastIndexOf,AU=!!TU&&1/[1].lastIndexOf(1,-0)<0,_U=bU("lastIndexOf"),EU=AU||!_U?function(e){if(AU)return gU(TU,this,arguments)||0;var t=yU(this),n=kU(t),r=n-1;for(arguments.length>1&&(r=wU(r,mU(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:TU;Sn({target:"Array",proto:!0,forced:EU!==[].lastIndexOf},{lastIndexOf:EU});var CU=zc("Array").lastIndexOf,RU=ae,SU=CU,LU=Array.prototype,xU=t((function(e){var t=e.lastIndexOf;return e===LU||RU(LU,e)&&t===LU.lastIndexOf?SU:t})),IU=Ye,MU=$r,OU=Fn,UU=Jb,PU=Math.min,DU=[].copyWithin||function(e,t){var n=IU(this),r=OU(n),i=MU(e,r),o=MU(t,r),a=arguments.length>2?arguments[2]:void 0,s=PU((void 0===a?r:MU(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]:UU(n,i),i+=l,o+=l;return n};Sn({target:"Array",proto:!0},{copyWithin:DU});for(var NU=zc("Array").copyWithin,BU=ae,FU=NU,jU=Array.prototype,VU=t((function(e){var t=e.copyWithin;return e===jU||BU(jU,e)&&t===jU.copyWithin?FU:t})),HU={},zU={byteLength:function(e){var t=QU(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=QU(e),i=r[0],o=r[1],a=new KU(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(XU(e,a,a+o>s?s:a+o));1===r?(t=e[n-1],i.push(WU[t>>2]+WU[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(WU[t>>10]+WU[t>>4&63]+WU[t<<2&63]+"="));return i.join("")}},WU=[],qU=[],KU="undefined"!=typeof Uint8Array?Uint8Array:Array,GU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",YU=0;YU<64;++YU)WU[YU]=GU[YU],qU[GU.charCodeAt(YU)]=YU;function QU(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 XU(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(WU[(i=r)>>18&63]+WU[i>>12&63]+WU[i>>6&63]+WU[63&i]);return o.join("")}qU["-".charCodeAt(0)]=62,qU["_".charCodeAt(0)]=63;var $U={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=zU,n=$U,r="function"==typeof Qm&&"function"==typeof vU?vU("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 W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(i)return r?-1:W(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):xU(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=Fw(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(W(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(q(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?Mx(r=o(e)).call(r,t,n):Mx(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=HA(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 VU(Uint8Array.prototype)?VU(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 lx(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 W(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 q(e){return t.toByteArray(function(e){if(e=e.split("=")[0],(e=HA(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")}})(HU),Ok(uU,"__esModule",{value:!0});var JU=uU.SCTE35=void 0,ZU=cU,eP=fU,tP=HU,nP=function(){function e(){ay(this,e),this.buffer=tP.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 Fw(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?eP.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?eP.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?eP.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=ZU.parseDescriptor(v);p-=g.descriptorLength+2,r+=g.descriptorLength+2,t.descriptors.push(g)}}catch(PD){var y;console.error(Tm(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,p," in loop.")),console.error(PD),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}();JU=uU.SCTE35=nP;var rP="SCTE35-OUT",iP="START-DATE",oP="PLANNED-DURATION";var aP=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 JU),ym(this,"_scte35ResultMap",new pO),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(Y_,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=lU(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,H_.os.isIos?n.loopCues():(n._onCuechange(),n._track.addEventListener("cuechange",n._onCuechange)))})),ym(this,"loopCues",(function(){n._onCuechange(),n._timer=gA(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)===oP){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)===rP&&(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},oP,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(Y_,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&&gA((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=E_(t=MO(n=rk(e)).call(n,(function(t,n){var i=e[n];if(function(e){return!(!e[oP]||!e.message&&!e[rP]||void 0===e.startTime&&!e[iP])}(i)){var o=i.message||r._getScte35Result(i[rP]);5===(null==o?void 0:o.spliceCommandType)&&t.push({data:o,id:i.ID,startTime:i.startTime||(new Date(i[iP]).getTime()-r._startTime)/1e3,duration:OA(i[oP]||"0"),startDate:i[iP]})}return t}),[])).call(t,(function(e,t){return e.startTime-t.startTime}))}}]),e}();var sP=S,lP=v,uP=di,cP=X,fP=lP(M.f),hP=lP([].push),dP=function(e){return function(t){for(var n,r=cP(t),i=uP(r),o=i.length,a=0,s=[];o>a;)n=i[a++],sP&&!fP(r,n)||hP(s,e?[n,r[n]]:r[n]);return s}},pP={entries:dP(!0),values:dP(!1)},vP=pP.values;Sn({target:"Object",stat:!0},{values:function(e){return vP(e)}});var gP=t(ee.Object.values),yP="SCTE35-OUT",mP="X-BREAK-ID",kP="X-AD-ID";function bP(e){switch(e){case yP:return"SCTE35";case kP:case mP:return"SSAI";default:return}}function wP(e){var t,n=[],r={},i=void 0;function o(){var e,i,o=gP(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(bP(null==s||null===(l=s.value)||void 0===l?void 0:l.key))t=bP(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 TP(e,t){return function(e){if(qk(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)||sU(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 AP=pP.entries;Sn({target:"Object",stat:!0},{entries:function(e){return AP(e)}});var _P=t(ee.Object.entries);function EP(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 CP(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Jc(n=EP(Object(i),!0)).call(n,(function(t){ym(e,t,i[t])})):Tk?Ik(e,Tk(i)):Jc(r=EP(Object(i))).call(r,(function(t){Lc(e,t,Qy(i,t))}))}return e}var RP,SP=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})),LP=fy((function e(){ay(this,e)})),xP=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}(xP||{}),IP=CP(CP({},Wm),{},{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"}),MP=(ym(RP={},"start",IP.AD_START),ym(RP,"firstQuartile",IP.AD_FIRST_QUARTILE),ym(RP,"midpoint",IP.AD_MIDPOINT),ym(RP,"thirdQuartile",IP.AD_THIRD_QUARTILE),ym(RP,"complete",IP.AD_COMPLETE),ym(RP,"click",IP.AD_CLICK),ym(RP,"impression",IP.AD_IMPRESSION),ym(RP,"resume",IP.AD_RESUME),ym(RP,"pause",IP.AD_PAUSE),ym(RP,"error",IP.AD_ERROR),RP),OP=function(e){return e.START="start",e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile",e.COMPLETE="complete",e}(OP||{}),UP=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 CP(CP({},this._trackingEvents),{},(ym(e={},xP.CLICK,this._videoClickTracking),ym(e,xP.IMPRESSION,this._impressionTracking),ym(e,xP.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}(LP);function PP(e){return function(e){if(qk(e))return aU(e)}(e)||function(e){if(void 0!==tc&&null!=$m(e)||null!=e["@@iterator"])return ub(e)}(e)||sU(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 DP=Sn,NP=i,BP=Hi.f;DP({target:"Object",stat:!0,forced:NP((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:BP});var FP=ee.Object,jP=t((function(e){return FP.getOwnPropertyNames(e)})),VP=r.isFinite;Sn({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&VP(e)}});var HP=t(ee.Number.isFinite);function zP(){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 WP=["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=YP(e);for(var o in!t.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=ZP(Math.round(1e8*Math.random())),t.TIMESTAMP=(new Date).toISOString(),t.RANDOM=t.random=t.CACHEBUSTING,t)t[o]=JP(t[o]);for(var a in i){var s=i[a];"string"==typeof s&&r.push(KP(s,t))}return r}function KP(e,t){var n=(e=GP(e,t)).match(/[^[\]]+(?=])/g);if(!n)return e;var r=pk(n).call(n,(function(e){return jb(WP).call(WP,e)>-1}));return 0===r.length?e:GP(e,r=MO(r).call(r,(function(e,t){return e[t]=-1,e}),{}))}function GP(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 YP(e){return Kk(e)?qw(e).call(e,(function(e){return e&&e.hasOwnProperty("url")?e.url:e})):e}function QP(e){return/^(https?:\/\/|\/\/)/.test(e)}function XP(e,t){for(var n=0;n<t.length;n++)if($P(t[n],e))return!0;return!1}function $P(e,t){if(e&&t){var n=jP(e),r=jP(t);return n.length===r.length&&e.id===t.id&&e.url===t.url}return!1}function JP(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16))}))}function ZP(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return $T(t=e.toString()).call(t,n,"0")}var eD={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:YP,filterUrlTemplates:function(e){return MO(e).call(e,(function(e,t){var n=t.url||t;return QP(n)?e.validUrls.push(n):e.invalidUrls.push(n),e}),{validUrls:[],invalidUrls:[]})},containsTemplateObject:XP,isTemplateObjectEqual:$P,encodeURIComponentRFC3986:JP,replaceUrlMacros:KP,isNumeric:function(e){return!isNaN(OA(e))&&isFinite(e)},flatten:function e(t){return MO(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 MO(e=Tm(r).call(r,i)).call(e,(function(e,t){return XP(t,e)||e.push(t),e}),[])},isValidTimeValue:function(e){return HP(e)&&e>=-2},addLeadingZeros:ZP,isValidUrl:QP,isBrowserEnvironment:function(){return"undefined"!=typeof window},formatMacrosValues:function(e){return"object"!=wc(e)?e:Ym(e)}};function tD(e){var t;return Ax(t=["true","TRUE","True","1"]).call(t,e)}var nD={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(ox(e).call(e,"//")){var n,r=location.protocol;return Tm(n="".concat(r)).call(n,e)}if(!Ax(e).call(e,"://")){var i,o=Fk(t).call(t,0,xU(t).call(t,"/"));return Tm(i="".concat(o,"/")).call(i,e)}return e},parseBoolean:tD,parseNodeText:function(e){var t;return e&&HA(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 MO(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(eD.isNumeric(e))return Fw(e);var t=e.split(":");if(3!==t.length)return-1;var n=t[2].split("."),r=Fw(n[0]);2===n.length&&(r+=OA("0.".concat(n[1])));var i=Fw(60*t[1]),o=Fw(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=Fw(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=tD(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,PP(e.viewableImpression),PP(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=MO(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){eD.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=eD.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 rD(e,t){var n,r=function(){var e=zP(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=nD.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:{}}}(nD.parseAttributes(e));a.htmlResources=MO(t=nD.childrenByName(e,"HTMLResource")).call(t,(function(e,t){var n=nD.parseNodeText(t);return n?Tm(e).call(e,n):e}),[]),a.iframeResources=MO(n=nD.childrenByName(e,"IFrameResource")).call(n,(function(e,t){var n=nD.parseNodeText(t);return n?Tm(e).call(e,n):e}),[]),a.staticResources=MO(r=nD.childrenByName(e,"StaticResource")).call(r,(function(e,t){var n=nD.parseNodeText(t);return n?Tm(e).call(e,{url:n,creativeType:t.getAttribute("creativeType")||null}):e}),[]),a.altText=nD.parseNodeText(nD.childByName(e,"AltText"))||null;var s=nD.childByName(e,"TrackingEvents");s&&gk(i=nD.childrenByName(s,"Tracking")).call(i,(function(e){var t=e.getAttribute("event"),n=nD.parseNodeText(e);t&&n&&(Kk(a.trackingEvents[t])||(a.trackingEvents[t]=[]),a.trackingEvents[t].push(n))})),a.companionClickTrackingURLTemplates=qw(o=nD.childrenByName(e,"CompanionClickTracking")).call(o,(function(e){return{id:e.getAttribute("id")||null,url:nD.parseNodeText(e)}})),a.companionClickThroughURLTemplate=nD.parseNodeText(nD.childByName(e,"CompanionClickThrough"))||null;var l=nD.childByName(e,"AdParameters");return l&&(a.adParameters={value:nD.parseNodeText(l),xmlEncoded:l.getAttribute("xmlEncoded")||null}),a})),r}function iD(e,t){var n,r,i,o,a=function(){var e=zP(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=nD.parseDuration(nD.parseNodeText(nD.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=Fw(s,10);a.skipDelay=a.duration*(l/100)}else a.skipDelay=nD.parseDuration(s);var u=nD.childByName(e,"VideoClicks");if(u){var c,f,h=nD.childByName(u,"ClickThrough");a.videoClickThroughURLTemplate=h?{id:h.getAttribute("id")||null,url:nD.parseNodeText(h)}:null,gk(c=nD.childrenByName(u,"ClickTracking")).call(c,(function(e){a.videoClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:nD.parseNodeText(e)})})),gk(f=nD.childrenByName(u,"CustomClick")).call(f,(function(e){a.videoCustomClickURLTemplates.push({id:e.getAttribute("id")||null,url:nD.parseNodeText(e)})}))}var d=nD.childByName(e,"AdParameters");d&&(a.adParameters={value:nD.parseNodeText(d),xmlEncoded:d.getAttribute("xmlEncoded")||null}),gk(n=nD.childrenByName(e,"TrackingEvents")).call(n,(function(e){var t;gk(t=nD.childrenByName(e,"Tracking")).call(t,(function(e){var t=e.getAttribute("event"),n=nD.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(nD.parseDuration(o)))}Kk(a.trackingEvents[t])||(a.trackingEvents[t]=[]),a.trackingEvents[t].push(n)}}))})),gk(r=nD.childrenByName(e,"MediaFiles")).call(r,(function(e){var t,n;gk(t=nD.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=nD.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=Fw(e.getAttribute("fileSize")||0),t.bitrate=Fw(e.getAttribute("bitrate")||0),t.minBitrate=Fw(e.getAttribute("minBitrate")||0),t.maxBitrate=Fw(e.getAttribute("maxBitrate")||0),t.width=Fw(e.getAttribute("width")||0),t.height=Fw(e.getAttribute("height")||0);var n=e.getAttribute("scalable");n&&"string"==typeof n&&(t.scalable=nD.parseBoolean(n));var r=e.getAttribute("maintainAspectRatio");return r&&"string"==typeof r&&(t.maintainAspectRatio=nD.parseBoolean(r)),t}(e))}));var r,i,o=nD.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:nD.parseBoolean(e.variableDuration),fileURL:null}}(nD.parseAttributes(r)),i.fileURL=nD.parseNodeText(r),i));var s=nD.childByName(e,"ClosedCaptionFiles");s&&gk(n=nD.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}}(nD.parseAttributes(e));t.fileURL=nD.parseNodeText(e),a.closedCaptionFiles.push(t)}));var l=nD.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=nD.parseNodeText(l),c.delivery=u.delivery,c.codec=l.getAttribute("codec"),c.type=u.type,c.width=Fw(u.width,10),c.height=Fw(u.height,10),c.fileSize=Fw(l.getAttribute("fileSize"),10),c.mediaType=l.getAttribute("mediaType")||"2D",a.mezzanine=c}}));var p=nD.childByName(e,"Icons");return p&&gk(i=nD.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=Fw(e.getAttribute("height")||0),a.width=Fw(e.getAttribute("width")||0),a.xPosition=(i=e.getAttribute("xPosition"),-1!==jb(o=["left","right"]).call(o,i)?i:Fw(i||0)),a.yPosition=function(e,t){return-1!==jb(t=["top","bottom"]).call(t,e)?e:Fw(e||0)}(e.getAttribute("yPosition")),a.apiFramework=e.getAttribute("apiFramework"),a.pxratio=e.getAttribute("pxratio")||"1",a.offset=nD.parseDuration(e.getAttribute("offset")),a.duration=nD.parseDuration(e.getAttribute("duration")),gk(t=nD.childrenByName(e,"HTMLResource")).call(t,(function(e){a.type=e.getAttribute("creativeType")||"text/html",a.htmlResource=nD.parseNodeText(e)})),gk(n=nD.childrenByName(e,"IFrameResource")).call(n,(function(e){a.type=e.getAttribute("creativeType")||0,a.iframeResource=nD.parseNodeText(e)})),gk(r=nD.childrenByName(e,"StaticResource")).call(r,(function(e){a.type=e.getAttribute("creativeType")||0,a.staticResource=nD.parseNodeText(e)}));var s=nD.childByName(e,"IconClicks");if(s){var l,u;a.iconClickThroughURLTemplate=nD.parseNodeText(nD.childByName(s,"IconClickThrough")),gk(l=nD.childrenByName(s,"IconClickTracking")).call(l,(function(e){a.iconClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:nD.parseNodeText(e)})}));var c=nD.childByName(s,"IconClickFallbackImages");c&&gk(u=nD.childrenByName(c,"IconClickFallbackImage")).call(u,(function(e){a.iconClickFallbackImages.push({url:nD.parseNodeText(e)||null,width:e.getAttribute("width")||null,height:e.getAttribute("height")||null})}))}return a.iconViewTrackingURLTemplate=nD.parseNodeText(nD.childByName(e,"IconViewTracking")),a}(e))})),a}function oD(e,t){var n,r,i=function(){var e=zP(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=nD.childrenByName(e,"TrackingEvents")).call(n,(function(e){var t,n,r;gk(t=nD.childrenByName(e,"Tracking")).call(t,(function(e){n=e.getAttribute("event"),r=nD.parseNodeText(e),n&&r&&(Kk(i.trackingEvents[n])||(i.trackingEvents[n]=[]),i.trackingEvents[n].push(r))}))})),gk(r=nD.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=nD.parseBoolean(e.getAttribute("scalable")),a.maintainAspectRatio=nD.parseBoolean(e.getAttribute("maintainAspectRatio")),a.minSuggestedDuration=nD.parseDuration(e.getAttribute("minSuggestedDuration")),a.apiFramework=e.getAttribute("apiFramework"),gk(t=nD.childrenByName(e,"HTMLResource")).call(t,(function(e){a.type=e.getAttribute("creativeType")||"text/html",a.htmlResource=nD.parseNodeText(e)})),gk(n=nD.childrenByName(e,"IFrameResource")).call(n,(function(e){a.type=e.getAttribute("creativeType")||0,a.iframeResource=nD.parseNodeText(e)})),gk(r=nD.childrenByName(e,"StaticResource")).call(r,(function(e){a.type=e.getAttribute("creativeType")||0,a.staticResource=nD.parseNodeText(e)}));var s=nD.childByName(e,"AdParameters");s&&(a.adParameters={value:nD.parseNodeText(s),xmlEncoded:s.getAttribute("xmlEncoded")||null}),a.nonlinearClickThroughURLTemplate=nD.parseNodeText(nD.childByName(e,"NonLinearClickThrough")),gk(o=nD.childrenByName(e,"NonLinearClickTracking")).call(o,(function(e){a.nonlinearClickTrackingURLTemplates.push({id:e.getAttribute("id")||null,url:nD.parseNodeText(e)})})),i.variations.push(a)})),i}function aD(e){var t=[];return gk(e).call(e,(function(e){var n=sD(e);n&&t.push(n)})),t}function sD(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=sD(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=nD.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 lD(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}var uD={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 cD(e,t){var n;if(uD[e.nodeName]&&uD[e.nodeName].attributes){var r=pk(n=uD[e.nodeName].attributes).call(n,(function(t){return!e.getAttribute(t)}));r.length>0&&dD({name:e.nodeName,parentName:e.parentNode.nodeName,attributes:r},t)}}function fD(e,t,n){var r,i=uD[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!nD.childByName(e,t)}));s.length>0&&dD({name:e.nodeName,parentName:e.parentNode.nodeName,subElements:s},t)}n&&i.oneOfinLineResources&&(xT(r=i.oneOfinLineResources).call(r,(function(t){return nD.childByName(e,t)}))||dD({name:e.nodeName,parentName:e.parentNode.nodeName,oneOfResources:i.oneOfinLineResources},t))}}function hD(e){return e.children&&0!==e.children.length}function dD(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 pD={verifyRequiredValues:function e(t,n,r){if(t&&t.nodeName)if("InLine"===t.nodeName&&(r=!0),cD(t,n),hD(t)){fD(t,n,r);for(var i=0;i<t.children.length;i++)e(t.children[i],n,r)}else 0===nD.parseNodeText(t).length&&dD({name:t.nodeName,parentName:t.parentNode.nodeName},n)},hasSubElements:hD,emitMissingValueWarning:dD,verifyRequiredAttributes:cD,verifyRequiredSubElements:fD};function vD(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.allowMultipleAds,a=i.followAdditionalWrappers,s=lU(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(nD.copyNodeAttribute("id",e,l),nD.copyNodeAttribute("sequence",e,l),nD.copyNodeAttribute("adType",e,l),"Wrapper"===l.nodeName)return{ad:mD(l,t),type:"WRAPPER"};if("InLine"===l.nodeName)return{ad:gD(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 gD(e,t){return!1===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allowMultipleAds&&e.getAttribute("sequence")?null:yD(e,t)}function yD(e,t){var n,r=[];t&&pD.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}}(nD.parseAttributes(e));return gk(i).call(i,(function(e){switch(e.nodeName){case"Error":o.errorURLTemplates.push(nD.parseNodeText(e));break;case"Impression":o.impressionURLTemplates.push({id:e.getAttribute("id")||null,url:nD.parseNodeText(e)});break;case"Creatives":o.creatives=(n=nD.childrenByName(e,"Creative"),i=[],gk(n).call(n,(function(e){var t,n,r={id:e.getAttribute("id")||null,adId:lD(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null},o=[];gk(t=nD.childrenByName(e,"UniversalAdId")).call(t,(function(e){var t={idRegistry:e.getAttribute("idRegistry")||"unknown",value:nD.parseNodeText(e)};o.push(t)}));var a=nD.childByName(e,"CreativeExtensions");for(var s in a&&(n=aD(nD.childrenByName(a,"CreativeExtension"))),e.childNodes){var l=e.childNodes[s],u=void 0;switch(l.nodeName){case"Linear":u=iD(l,r);break;case"NonLinearAds":u=oD(l,r);break;case"CompanionAds":u=rD(l,r)}u&&(o&&(u.universalAdIds=o),n&&(u.creativeExtensions=n),i.push(u))}})),i);break;case"Extensions":var t=nD.childrenByName(e,"Extension");o.extensions=aD(t),o.adVerifications.length||(r=function(e){var t=null,n=[];return xT(e).call(e,(function(e){return t=nD.childByName(e,"AdVerifications")})),t&&(n=kD(nD.childrenByName(t,"Verification"))),n}(t));break;case"AdVerifications":o.adVerifications=kD(nD.childrenByName(e,"Verification"));break;case"AdSystem":o.system={value:nD.parseNodeText(e),version:e.getAttribute("version")||null};break;case"AdTitle":o.title=nD.parseNodeText(e);break;case"AdServingId":o.adServingId=nD.parseNodeText(e);break;case"Category":o.categories.push({authority:e.getAttribute("authority")||null,value:nD.parseNodeText(e)});break;case"Expires":o.expires=Fw(nD.parseNodeText(e),10);break;case"ViewableImpression":o.viewableImpression.push(function(e,t,n,r){var i=function(e,t){var n=nD.parseNodeText(t);return n&&e.push(n),e};return{id:e.getAttribute("id")||null,viewable:MO(t=nD.childrenByName(e,"Viewable")).call(t,i,[]),notViewable:MO(n=nD.childrenByName(e,"NotViewable")).call(n,i,[]),viewUndetermined:MO(r=nD.childrenByName(e,"ViewUndetermined")).call(r,i,[])}}(e));break;case"Description":o.description=nD.parseNodeText(e);break;case"Advertiser":o.advertiser={id:e.getAttribute("id")||null,value:nD.parseNodeText(e)};break;case"Pricing":o.pricing={value:nD.parseNodeText(e),model:e.getAttribute("model")||null,currency:e.getAttribute("currency")||null};break;case"Survey":o.survey={value:nD.parseNodeText(e),type:e.getAttribute("type")||null};break;case"BlockedAdCategories":o.blockedAdCategories.push({authority:e.getAttribute("authority")||null,value:nD.parseNodeText(e)})}var n,i})),r.length&&(o.adVerifications=Tm(n=o.adVerifications).call(n,r)),o}function mD(e,t){var n,r=yD(e,t),i=e.getAttribute("followAdditionalWrappers"),o=e.getAttribute("allowMultipleAds"),a=e.getAttribute("fallbackOnNoAd");r.followAdditionalWrappers=!i||nD.parseBoolean(i),r.allowMultipleAds=!!o&&nD.parseBoolean(o),r.fallbackOnNoAd=a?nD.parseBoolean(a):null;var s=nD.childByName(e,"VASTAdTagURI");if(s?r.nextWrapperURL=nD.parseNodeText(s):(s=nD.childByName(e,"VASTAdTagURL"))&&(r.nextWrapperURL=nD.parseNodeText(nD.childByName(s,"URL"))),gk(n=r.creatives).call(n,(function(e){var t;if(Ax(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 kD(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);nD.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=HA(n).call(n),nD.assignAttributes(i,r);break;case"VerificationParameters":r.parameters=HA(n).call(n)}}));var o=nD.childByName(e,"TrackingEvents");o&&gk(n=nD.childrenByName(o,"Tracking")).call(n,(function(e){var t=e.getAttribute("event"),n=nD.parseNodeText(e);t&&n&&(Kk(r.trackingEvents[t])||(r.trackingEvents[t]=[]),r.trackingEvents[t].push(n))})),t.push(r)})),t}var bD=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 MO(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}(),wD=0,TD=0,AD={ERRORCODE:900,extensions:[]},_D="VAST response version not supported",ED=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",aT.apply(Object,Tm(n=[{},AD,t]).call(n,i))),eD.track(e,t)}},{key:"getErrorURLTemplates",value:function(){var e;return Tm(e=this.rootErrorURLTemplates).call(e,this.errorURLTemplates)}},{key:"getEstimatedBitrate",value:function(){return TD}},{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||(TD=(TD*wD+8*e/t)/++wD)}(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?eD.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?_D:"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=nD.parseNodeText(g);r?this.rootErrorURLTemplates.push(y):this.errorURLTemplates.push(y)}else if("Ad"===g.nodeName){var m;if(this.vastVersion&&OA(this.vastVersion)<3)l=!0;else if(!1===l&&h.length>1)break;var k=vD(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&&OA(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=nD.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 eD.flatten(e)}))}},{key:"resolveWrappers",value:function(e,t,n){var r=this,i=CP({},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=nD.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&&nD.mergeWrapperAdData(e,i)})),e(t)}))})).catch((function(t){i.errorCode=t.message===_D?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=!xT(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}(bD),CD=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=x_()})),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){eD.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(eD.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,eD.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,eD.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,eD.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,eD.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,eD.formatMacrosValues(n))})}},{key:"setSkipDelay",value:function(e){eD.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(eD.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,eD.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,eD.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,eD.formatMacrosValues(n))});else{this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates,n);var r=this.clickThroughURLTemplate||t,i=CP({},n);if(r){this.progress&&(i.ADPLAYHEAD=this.progressFormatted());var o=eD.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=eD.filterUrlTemplates(e),l=s.validUrls,u=s.invalidUrls;u.length&&this.emit("TRACKER-error",{message:"Provided urls are malformed. url: ".concat(u)});var c=CP({},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(","))),eD.track(l,c,a)}},{key:"convertToTimecode",value:function(e){var t,n,r;if(!eD.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(eD.addLeadingZeros(o,2),":")).call(r,eD.addLeadingZeros(a,2),":")).call(n,eD.addLeadingZeros(s,2),".")).call(t,eD.addLeadingZeros(l,3))}},{key:"progressFormatted",value:function(){return this.convertToTimecode(this.progress)}}]),n}(bD),RD=new ED;function SD(e){return LD.apply(this,arguments)}function LD(){return(LD=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",RD.parseVAST(n.parseFromString(t,"application/xml")));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xD(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 ID=function(e,t){var n,r=MD(e);if(!e||!r)return null!==(n=e)&&void 0!==n?n:"";var i,o=ox(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},MD=function(e){if(e){ox(e).call(e,"//")&&(e=location.protocol+e);try{return new DL(e)}catch(PD){return}}},OD=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,H_.os.isIos?t._loopCues():(t._onCuechange(),t._track.addEventListener("cuechange",t._onCuechange)))})),ym(hy(t),"_loopCues",(function(){t._onCuechange(),t._timer=gA(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=wP(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(ID(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,IP.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(xP.CLICK),!1)}},{key:"onError",value:function(e){var t;null!==(t=this._player)&&void 0!==t&&t.plugins.hls?e.originError.fatal&&this._handleTrackingEvent(xP.ERROR,{ERRORCODE:900}):this._handleTrackingEvent(xP.ERROR,{ERRORCODE:900})}},{key:"onPause",value:function(){this.ad&&this._handleTrackingEvent(xP.PAUSE)}},{key:"onPlay",value:function(){var e,t;this.ad&&(null!==(e=this.ad)&&void 0!==e&&e.getState()?this._handleTrackingEvent(xP.RESUME):(null===(t=this.ad)||void 0===t||t.setState(OP.START),this._handleTrackingEvent(xP.START),this._handleTrackingEvent(xP.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[kP])||void 0===i||null===(i=i.value)||void 0===i?void 0:i.data,s=null===(o=r.ad[mP])||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[kP]&&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,i;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={status:"Pending",ads:{}},this._breakInfoMap[t]=i,e.abrupt("return",xD({url:Tm(n=Tm(r="".concat(location.protocol,"//")).call(r,__LIVE_AD_REQUEST_DOMAIN__,"/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=_P(t.ad_info))||void 0===n?void 0:qw(n).call(n,function(){var e=oy(ry().mark((function e(t){var n,r,o,a;return ry().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=TP(t,2),r=n[0],o=n[1],e.next=3,SD(o);case 3:return a=e.sent,i.ads[r]=a,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return i.status="Success",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){i.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 UP(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 CD(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&&!Ax(n=this._eventsSent).call(n,xP.FIRST_QUARTILE))return this._eventsSent.push(xP.FIRST_QUARTILE),null===(o=this.ad)||void 0===o||o.setState(OP.FIRST_QUARTILE),void this._handleTrackingEvent(xP.FIRST_QUARTILE);if(e>=u&&!Ax(r=this._eventsSent).call(r,xP.MIDPOINT))return this._eventsSent.push(xP.MIDPOINT),null===(a=this.ad)||void 0===a||a.setState(OP.MIDPOINT),void this._handleTrackingEvent(xP.MIDPOINT);e>=c&&!Ax(i=this._eventsSent).call(i,xP.THIRD_QUARTILE)&&(this._eventsSent.push(xP.THIRD_QUARTILE),null===(s=this.ad)||void 0===s||s.setState(OP.THIRD_QUARTILE),this._handleTrackingEvent(xP.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,MP[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!==xP.ERROR){e.next=3;break}return null===(i=this._vastTracker)||void 0===i||i.error(n),e.abrupt("return");case 3:if(t!==xP.CLICK){e.next=6;break}return null===(o=this._vastTracker)||void 0===o||o.click(null,n),e.abrupt("return");case 6:if(t!==xP.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(OP.START),this._handleTrackingEvent(xP.START),this._handleTrackingEvent(xP.IMPRESSION))}},{key:"_endAd",value:function(e){e||this._handleTrackingEvent(xP.COMPLETE),this.ad=void 0,this._eventsSent=[]}}]),o}(SP),UD=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(X_,(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=ID(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 aP({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager,replayForSCTE35:this.config.replayForSCTE35})),"ssai"===this.config.adType&&(this._ssManager=new OD({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(z_,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(K_,this._onError),(null===(r=this._ssManager)||void 0===r?void 0:r.onTimeUpdate)&&this.player.off(Y_,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(z_,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(K_,this._onError),(null===(r=this._ssManager)||void 0===r?void 0:r.onTimeUpdate)&&this.player.on(Y_,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=E_(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}(oU);return UD}));
|