@volcengine/veplayer-plugin 2.6.0-rc.3 → 2.6.0-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.
@@ -1,4 +1,4 @@
1
- function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var defineProperty$e={exports:{}},check=function(e){return e&&e.Math==Math&&e},global$r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),fails$z=function(e){try{return!!e()}catch(e){return!0}},fails$y=fails$z,functionBindNative=!fails$y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$3=Function.prototype,apply$7=FunctionPrototype$3.apply,call$r=FunctionPrototype$3.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$4?call$r.bind(apply$7):function(){return call$r.apply(apply$7,arguments)}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$2=Function.prototype,call$q=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$2.bind.bind(call$q,call$q),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$q.apply(e,arguments)}},uncurryThis$A=functionUncurryThis,toString$g=uncurryThis$A({}.toString),stringSlice$4=uncurryThis$A("".slice),classofRaw$2=function(e){return stringSlice$4(toString$g(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$z=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$z(e)},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$q=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$x=fails$z,descriptors$2=!fails$x((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$p=Function.prototype.call,functionCall=NATIVE_BIND$2?call$p.bind(call$p):function(){return call$p.apply(call$p,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$b=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$b&&!$propertyIsEnumerable$1.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$b(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$1;var match,version,createPropertyDescriptor$8=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$y=functionUncurryThis,fails$w=fails$z,classof$e=classofRaw$2,$Object$4=Object,split$3=uncurryThis$y("".split),indexedObject=fails$w((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$e(e)?split$3(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$6=function(e){return null==e},isNullOrUndefined$5=isNullOrUndefined$6,$TypeError$k=TypeError,requireObjectCoercible$7=function(e){if(isNullOrUndefined$5(e))throw $TypeError$k("Can't call method on "+e);return e},IndexedObject$3=indexedObject,requireObjectCoercible$6=requireObjectCoercible$7,toIndexedObject$b=function(e){return IndexedObject$3(requireObjectCoercible$6(e))},isCallable$p=isCallable$q,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$l=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$p(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$p(e)},path$t={},path$s=path$t,global$q=global$r,isCallable$o=isCallable$q,aFunction=function(e){return isCallable$o(e)?e:void 0},getBuiltIn$h=function(e,t){return arguments.length<2?aFunction(path$s[e])||aFunction(global$q[e]):path$s[e]&&path$s[e][t]||global$q[e]&&global$q[e][t]},uncurryThis$x=functionUncurryThis,objectIsPrototypeOf=uncurryThis$x({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$p=global$r,userAgent$6=engineUserAgent,process$4=global$p.process,Deno$1=global$p.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&userAgent$6&&(!(match=userAgent$6.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$6.match(/Chrome\/(\d+)/))&&(version=+match[1]);var engineV8Version=version,V8_VERSION$3=engineV8Version,fails$v=fails$z,global$o=global$r,$String$5=global$o.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$v((function(){var e=Symbol();return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$g=getBuiltIn$h,isCallable$n=isCallable$q,isPrototypeOf$p=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$g("Symbol");return isCallable$n(t)&&isPrototypeOf$p(t.prototype,$Object$3(e))},$String$4=String,tryToString$7=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$m=isCallable$q,tryToString$6=tryToString$7,$TypeError$j=TypeError,aCallable$j=function(e){if(isCallable$m(e))return e;throw $TypeError$j(tryToString$6(e)+" is not a function")},aCallable$i=aCallable$j,isNullOrUndefined$4=isNullOrUndefined$6,getMethod$3=function(e,t){var r=e[t];return isNullOrUndefined$4(r)?void 0:aCallable$i(r)},call$o=functionCall,isCallable$l=isCallable$q,isObject$k=isObject$l,$TypeError$i=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$l(r=e.toString)&&!isObject$k(n=call$o(r,e)))return n;if(isCallable$l(r=e.valueOf)&&!isObject$k(n=call$o(r,e)))return n;if("string"!==t&&isCallable$l(r=e.toString)&&!isObject$k(n=call$o(r,e)))return n;throw $TypeError$i("Can't convert object to primitive value")},shared$7={exports:{}},isPure=!0,global$n=global$r,defineProperty$d=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$d(global$n,e,{value:t,configurable:!0,writable:!0})}catch(r){global$n[e]=t}return t},global$m=global$r,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$m[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$7.exports=function(e,t){return store$2[e]||(store$2[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 sharedExports=shared$7.exports,requireObjectCoercible$5=requireObjectCoercible$7,$Object$2=Object,toObject$e=function(e){return $Object$2(requireObjectCoercible$5(e))},uncurryThis$w=functionUncurryThis,toObject$d=toObject$e,hasOwnProperty=uncurryThis$w({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$d(e),t)},uncurryThis$v=functionUncurryThis,id$1=0,postfix=Math.random(),toString$f=uncurryThis$v(1..toString),uid$4=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$f(++id$1+postfix,36)},global$l=global$r,shared$6=sharedExports,hasOwn$j=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$l.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$q=function(e){return hasOwn$j(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$4&&hasOwn$j(Symbol$5,e)?Symbol$5[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$n=functionCall,isObject$j=isObject$l,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$p=wellKnownSymbol$q,$TypeError$h=TypeError,TO_PRIMITIVE=wellKnownSymbol$p("toPrimitive"),toPrimitive$7=function(e,t){if(!isObject$j(e)||isSymbol$4(e))return e;var r,n=getMethod$2(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$n(n,e,t),!isObject$j(r)||isSymbol$4(r))return r;throw $TypeError$h("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$6=toPrimitive$7,isSymbol$3=isSymbol$5,toPropertyKey$4=function(e){var t=toPrimitive$6(e,"string");return isSymbol$3(t)?t:t+""},global$k=global$r,isObject$i=isObject$l,document$3=global$k.document,EXISTS$1=isObject$i(document$3)&&isObject$i(document$3.createElement),documentCreateElement$1=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$k=descriptors$2,fails$u=fails$z,createElement$1=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$k&&!fails$u((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$j=descriptors$2,call$m=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$7=createPropertyDescriptor$8,toIndexedObject$a=toIndexedObject$b,toPropertyKey$3=toPropertyKey$4,hasOwn$i=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$j?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$a(e),t=toPropertyKey$3(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$i(e,t))return createPropertyDescriptor$7(!call$m(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$t=fails$z,isCallable$k=isCallable$q,replacement=/#|\.prototype\./,isForced$2=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$k(t)?fails$t(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,uncurryThis$u=functionUncurryThisClause,aCallable$h=aCallable$j,NATIVE_BIND$1=functionBindNative,bind$r=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$h(e),void 0===t?e:NATIVE_BIND$1?bind$r(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$i=descriptors$2,fails$s=fails$z,v8PrototypeDefineBug=DESCRIPTORS$i&&fails$s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$h=isObject$l,$String$3=String,$TypeError$g=TypeError,anObject$g=function(e){if(isObject$h(e))return e;throw $TypeError$g($String$3(e)+" is not an object")},DESCRIPTORS$h=descriptors$2,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$2=toPropertyKey$4,$TypeError$f=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$h?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty$1(e,t,r)}:$defineProperty$1:function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$f("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$g=descriptors$2,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$6=createPropertyDescriptor$8,createNonEnumerableProperty$9=DESCRIPTORS$g?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$6(1,r))}:function(e,t,r){return e[t]=r,e},global$j=global$r,apply$6=functionApply,uncurryThis$t=functionUncurryThisClause,isCallable$j=isCallable$q,getOwnPropertyDescriptor$a=objectGetOwnPropertyDescriptor.f,isForced$1=isForced_1,path$r=path$t,bind$q=functionBindContext,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$h=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return apply$6(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,o,i,a,s,l,c,u,p=e.target,f=e.global,$=e.stat,y=e.proto,h=f?global$j:$?global$j[p]:(global$j[p]||{}).prototype,d=f?path$r:path$r[p]||createNonEnumerableProperty$8(path$r,p,{})[p],g=d.prototype;for(i in t)n=!(r=isForced$1(f?i:p+($?".":"#")+i,e.forced))&&h&&hasOwn$h(h,i),s=d[i],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$a(h,i))&&u.value:h[i]),a=n&&l?l:t[i],n&&typeof s==typeof a||(c=e.bind&&n?bind$q(a,global$j):e.wrap&&n?wrapConstructor(a):y&&isCallable$j(a)?uncurryThis$t(a):a,(e.sham||a&&a.sham||s&&s.sham)&&createNonEnumerableProperty$8(c,"sham",!0),createNonEnumerableProperty$8(d,i,c),y&&(hasOwn$h(path$r,o=p+"Prototype")||createNonEnumerableProperty$8(path$r,o,{}),createNonEnumerableProperty$8(path$r[o],i,a),e.real&&g&&(r||!g[i])&&createNonEnumerableProperty$8(g,i,a)))},$$1j=_export,DESCRIPTORS$f=descriptors$2,defineProperty$c=objectDefineProperty.f;$$1j({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$c,sham:!DESCRIPTORS$f},{defineProperty:defineProperty$c});var path$q=path$t,Object$4=path$q.Object,defineProperty$b=defineProperty$e.exports=function(e,t,r){return Object$4.defineProperty(e,t,r)};Object$4.defineProperty.sham&&(defineProperty$b.sham=!0);var definePropertyExports=defineProperty$e.exports,parent$2g=definePropertyExports,defineProperty$a=parent$2g,parent$2f=defineProperty$a,defineProperty$9=parent$2f,parent$2e=defineProperty$9,defineProperty$8=parent$2e,defineProperty$7=defineProperty$8,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$7),classof$d=classofRaw$2,isArray$d=Array.isArray||function(e){return"Array"==classof$d(e)},ceil$1=Math.ceil,floor$4=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$4:ceil$1)(t)},trunc2=mathTrunc,toIntegerOrInfinity$6=function(e){var t=+e;return t!=t||0===t?0:trunc2(t)},toIntegerOrInfinity$5=toIntegerOrInfinity$6,min$4=Math.min,toLength$2=function(e){return e>0?min$4(toIntegerOrInfinity$5(e),9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$d=function(e){return toLength$1(e.length)},$TypeError$e=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$2=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$e("Maximum allowed index exceeded");return e},toPropertyKey$1=toPropertyKey$4,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$8,createProperty$6=function(e,t,r){var n=toPropertyKey$1(t);n in e?definePropertyModule$3.f(e,n,createPropertyDescriptor$5(0,r)):e[n]=r},wellKnownSymbol$o=wellKnownSymbol$q,TO_STRING_TAG$4=wellKnownSymbol$o("toStringTag"),test$2={};test$2[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$2),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$i=isCallable$q,classofRaw=classofRaw$2,wellKnownSymbol$n=wellKnownSymbol$q,TO_STRING_TAG$3=wellKnownSymbol$n("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$c=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$1(e),TO_STRING_TAG$3))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable$i(t.callee)?"Arguments":n},uncurryThis$s=functionUncurryThis,isCallable$h=isCallable$q,store$1=sharedStore,functionToString=uncurryThis$s(Function.toString);isCallable$h(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$1.inspectSource,uncurryThis$r=functionUncurryThis,fails$r=fails$z,isCallable$g=isCallable$q,classof$b=classof$c,getBuiltIn$f=getBuiltIn$h,inspectSource$1=inspectSource$2,noop=function(){},empty=[],construct$7=getBuiltIn$f("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$4=uncurryThis$r(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$g(e))return!1;try{return construct$7(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$g(e))return!1;switch(classof$b(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$4(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$7||fails$r((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isArray$c=isArray$d,isConstructor$3=isConstructor$4,isObject$g=isObject$l,wellKnownSymbol$m=wellKnownSymbol$q,SPECIES$5=wellKnownSymbol$m("species"),$Array$3=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$c(e)&&(t=e.constructor,(isConstructor$3(t)&&(t===$Array$3||isArray$c(t.prototype))||isObject$g(t)&&null===(t=t[SPECIES$5]))&&(t=void 0)),void 0===t?$Array$3:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},fails$q=fails$z,wellKnownSymbol$l=wellKnownSymbol$q,V8_VERSION$2=engineV8Version,SPECIES$4=wellKnownSymbol$l("species"),arrayMethodHasSpeciesSupport$5=function(e){return V8_VERSION$2>=51||!fails$q((function(){var t=[];return(t.constructor={})[SPECIES$4]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$1i=_export,fails$p=fails$z,isArray$b=isArray$d,isObject$f=isObject$l,toObject$c=toObject$e,lengthOfArrayLike$c=lengthOfArrayLike$d,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$2,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$k=wellKnownSymbol$q,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$k("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$p((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$f(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$b(e)},FORCED$9=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$1i({target:"Array",proto:!0,arity:1,forced:FORCED$9},{concat:function(e){var t,r,n,o,i,a=toObject$c(this),s=arraySpeciesCreate$2(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(i=-1===t?a:arguments[t]))for(o=lengthOfArrayLike$c(i),doesNotExceedSafeInteger$1(l+o),r=0;r<o;r++,l++)r in i&&createProperty$5(s,l,i[r]);else doesNotExceedSafeInteger$1(l+1),createProperty$5(s,l++,i);return s.length=l,s}});var classof$a=classof$c,$String$2=String,toString$e=function(e){if("Symbol"===classof$a(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$2(e)},objectDefineProperties={},toIntegerOrInfinity$4=toIntegerOrInfinity$6,max$3=Math.max,min$3=Math.min,toAbsoluteIndex$6=function(e,t){var r=toIntegerOrInfinity$4(e);return r<0?max$3(r+t,0):min$3(r,t)},toIndexedObject$9=toIndexedObject$b,toAbsoluteIndex$5=toAbsoluteIndex$6,lengthOfArrayLike$b=lengthOfArrayLike$d,createMethod$5=function(e){return function(t,r,n){var o,i=toIndexedObject$9(t),a=lengthOfArrayLike$b(i),s=toAbsoluteIndex$5(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$q=functionUncurryThis,hasOwn$g=hasOwnProperty_1,toIndexedObject$8=toIndexedObject$b,indexOf$7=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$b=uncurryThis$q([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$8(e),o=0,i=[];for(r in n)!hasOwn$g(hiddenKeys$5,r)&&hasOwn$g(n,r)&&push$b(i,r);for(;t.length>o;)hasOwn$g(n,r=t[o++])&&(~indexOf$7(i,r)||push$b(i,r));return i},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$3=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$e=descriptors$2,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$e=anObject$g,toIndexedObject$7=toIndexedObject$b,objectKeys$2=objectKeys$3;objectDefineProperties.f=DESCRIPTORS$e&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$e(e);for(var r,n=toIndexedObject$7(t),o=objectKeys$2(t),i=o.length,a=0;i>a;)definePropertyModule$2.f(e,r=o[a++],n[r]);return e};var activeXDocument,getBuiltIn$e=getBuiltIn$h,html$2=getBuiltIn$e("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$6=shared$5("keys"),sharedKey$4=function(e){return keys$6[e]||(keys$6[e]=uid$2(e))},anObject$d=anObject$g,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html$1=html$2,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$d(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertyNamesExternal={},toAbsoluteIndex$4=toAbsoluteIndex$6,lengthOfArrayLike$a=lengthOfArrayLike$d,createProperty$4=createProperty$6,$Array$2=Array,max$2=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$a(e),o=toAbsoluteIndex$4(t,n),i=toAbsoluteIndex$4(void 0===r?n:r,n),a=$Array$2(max$2(i-o,0)),s=0;o<i;o++,s++)createProperty$4(a,s,e[o]);return a.length=s,a},classof$9=classofRaw$2,toIndexedObject$6=toIndexedObject$b,$getOwnPropertyNames$1=objectGetOwnPropertyNames.f,arraySlice$8=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames$1(e)}catch(e){return arraySlice$8(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$9(e)?getWindowNames(e):$getOwnPropertyNames$1(toIndexedObject$6(e))};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$8=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$7(e,t,r),e},defineProperty$6=objectDefineProperty,defineBuiltInAccessor$5=function(e,t,r){return defineProperty$6.f(e,t,r)},wellKnownSymbolWrapped={},wellKnownSymbol$j=wellKnownSymbol$q;wellKnownSymbolWrapped.f=wellKnownSymbol$j;var set$7,get$9,has$2,path$p=path$t,hasOwn$f=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$5=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$p.Symbol||(path$p.Symbol={});hasOwn$f(t,e)||defineProperty$5(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$l=functionCall,getBuiltIn$d=getBuiltIn$h,wellKnownSymbol$i=wellKnownSymbol$q,defineBuiltIn$7=defineBuiltIn$8,symbolDefineToPrimitive=function(){var e=getBuiltIn$d("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$i("toPrimitive");t&&!t[n]&&defineBuiltIn$7(t,n,(function(e){return call$l(r,this)}),{arity:1})},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$8=classof$c,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$8(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$4=objectDefineProperty.f,createNonEnumerableProperty$6=createNonEnumerableProperty$9,hasOwn$e=hasOwnProperty_1,toString$d=objectToString,wellKnownSymbol$h=wellKnownSymbol$q,TO_STRING_TAG$2=wellKnownSymbol$h("toStringTag"),setToStringTag$9=function(e,t,r,n){if(e){var o=r?e:e.prototype;hasOwn$e(o,TO_STRING_TAG$2)||defineProperty$4(o,TO_STRING_TAG$2,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$6(o,"toString",toString$d)}},global$i=global$r,isCallable$f=isCallable$q,WeakMap$1=global$i.WeakMap,weakMapBasicDetection=isCallable$f(WeakMap$1)&&/native code/.test(String(WeakMap$1)),NATIVE_WEAK_MAP=weakMapBasicDetection,global$h=global$r,isObject$e=isObject$l,createNonEnumerableProperty$5=createNonEnumerableProperty$9,hasOwn$d=hasOwnProperty_1,shared$4=sharedStore,sharedKey$2=sharedKey$4,hiddenKeys$2=hiddenKeys$6,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$5=global$h.TypeError,WeakMap=global$h.WeakMap,enforce=function(e){return has$2(e)?get$9(e):set$7(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$e(t)||(r=get$9(t)).type!==e)throw TypeError$5("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$4.state){var store=shared$4.state||(shared$4.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$7=function(e,t){if(store.has(e))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$9=function(e){return store.get(e)||{}},has$2=function(e){return store.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$2[STATE]=!0,set$7=function(e,t){if(hasOwn$d(e,STATE))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$5(e,STATE,t),t},get$9=function(e){return hasOwn$d(e,STATE)?e[STATE]:{}},has$2=function(e){return hasOwn$d(e,STATE)}}var internalState={set:set$7,get:get$9,has:has$2,enforce:enforce,getterFor:getterFor},bind$p=functionBindContext,uncurryThis$p=functionUncurryThis,IndexedObject$2=indexedObject,toObject$b=toObject$e,lengthOfArrayLike$9=lengthOfArrayLike$d,arraySpeciesCreate$1=arraySpeciesCreate$3,push$a=uncurryThis$p([].push),createMethod$4=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(l,c,u,p){for(var f,$,y=toObject$b(l),h=IndexedObject$2(y),d=bind$p(c,u),g=lengthOfArrayLike$9(h),m=0,v=p||arraySpeciesCreate$1,_=t?v(l,g):r||a?v(l,0):void 0;g>m;m++)if((s||m in h)&&($=d(f=h[m],m,y),e))if(t)_[m]=$;else if($)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:push$a(_,f)}else switch(e){case 4:return!1;case 7:push$a(_,f)}return i?-1:n||o?o:_}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$1h=_export,global$g=global$r,call$k=functionCall,uncurryThis$o=functionUncurryThis,DESCRIPTORS$d=descriptors$2,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$o=fails$z,hasOwn$c=hasOwnProperty_1,isPrototypeOf$o=objectIsPrototypeOf,anObject$c=anObject$g,toIndexedObject$5=toIndexedObject$b,toPropertyKey=toPropertyKey$4,$toString$2=toString$e,createPropertyDescriptor$4=createPropertyDescriptor$8,nativeObjectCreate=objectCreate,objectKeys$1=objectKeys$3,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$3=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$6=defineBuiltIn$8,defineBuiltInAccessor$4=defineBuiltInAccessor$5,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$g=wellKnownSymbol$q,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$8=setToStringTag$9,InternalStateModule$7=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$7=InternalStateModule$7.set,getInternalState$2=InternalStateModule$7.getterFor(SYMBOL),ObjectPrototype$2=Object[PROTOTYPE],$Symbol=global$g.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],TypeError$4=global$g.TypeError,QObject=global$g.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$3.f,nativeDefineProperty=definePropertyModule$1.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$9=uncurryThis$o([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDescriptor=DESCRIPTORS$d&&fails$o((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$2,t);n&&delete ObjectPrototype$2[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$2&&nativeDefineProperty(ObjectPrototype$2,t,n)}:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$7(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$d||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$2&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$c(e);var n=toPropertyKey(t);return anObject$c(r),hasOwn$c(AllSymbols,n)?(r.enumerable?(hasOwn$c(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$c(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor$4(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$c(e);var r=toIndexedObject$5(t),n=objectKeys$1(r).concat($getOwnPropertySymbols(r));return $forEach$1(n,(function(t){DESCRIPTORS$d&&!call$k($propertyIsEnumerable,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPropertyKey(e),r=call$k(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$2&&hasOwn$c(AllSymbols,t)&&!hasOwn$c(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$c(this,t)||!hasOwn$c(AllSymbols,t)||hasOwn$c(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$5(e),n=toPropertyKey(t);if(r!==ObjectPrototype$2||!hasOwn$c(AllSymbols,n)||hasOwn$c(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor$1(r,n);return!o||!hasOwn$c(AllSymbols,n)||hasOwn$c(r,HIDDEN)&&r[HIDDEN][n]||(o.enumerable=!0),o}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$5(e)),r=[];return $forEach$1(t,(function(e){hasOwn$c(AllSymbols,e)||hasOwn$c(hiddenKeys$1,e)||push$9(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$2,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$5(e)),n=[];return $forEach$1(r,(function(e){!hasOwn$c(AllSymbols,e)||t&&!hasOwn$c(ObjectPrototype$2,e)||push$9(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$6(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$o(SymbolPrototype,this))throw TypeError$4("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$2(arguments[0]):void 0,t=uid$1(e),r=function(e){this===ObjectPrototype$2&&call$k(r,ObjectPrototypeSymbols,e),hasOwn$c(this,HIDDEN)&&hasOwn$c(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor$4(1,e))};return DESCRIPTORS$d&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$2,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$2(this).tag})),defineBuiltIn$6($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable,definePropertyModule$1.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$3.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$g(e),e)},DESCRIPTORS$d&&defineBuiltInAccessor$4(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}})),$$1h({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach$1(objectKeys$1(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$l(e)})),$$1h({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1h({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$d},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1h({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$8($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$1g=_export,getBuiltIn$c=getBuiltIn$h,hasOwn$b=hasOwnProperty_1,toString$c=toString$e,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$1g({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$c(e);if(hasOwn$b(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$c("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1f=_export,hasOwn$a=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$5=tryToString$7,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$1f({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$2(e))throw TypeError(tryToString$5(e)+" is not a symbol");if(hasOwn$a(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$n=functionUncurryThis,arraySlice$7=uncurryThis$n([].slice),uncurryThis$m=functionUncurryThis,isArray$a=isArray$d,isCallable$e=isCallable$q,classof$7=classofRaw$2,toString$b=toString$e,push$8=uncurryThis$m([].push),getJsonReplacerFunction=function(e){if(isCallable$e(e))return e;if(isArray$a(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$8(r,o):"number"!=typeof o&&"Number"!=classof$7(o)&&"String"!=classof$7(o)||push$8(r,toString$b(o))}var i=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$a(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}},$$1e=_export,getBuiltIn$b=getBuiltIn$h,apply$5=functionApply,call$j=functionCall,uncurryThis$l=functionUncurryThis,fails$n=fails$z,isCallable$d=isCallable$q,isSymbol$1=isSymbol$5,arraySlice$6=arraySlice$7,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String$1=String,$stringify=getBuiltIn$b("JSON","stringify"),exec$3=uncurryThis$l(/./.exec),charAt$5=uncurryThis$l("".charAt),charCodeAt$2=uncurryThis$l("".charCodeAt),replace$5=uncurryThis$l("".replace),numberToString$1=uncurryThis$l(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$n((function(){var e=getBuiltIn$b("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$n((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$6(arguments),n=getReplacerFunction(t);if(isCallable$d(n)||void 0!==e&&!isSymbol$1(e))return r[1]=function(e,t){if(isCallable$d(n)&&(t=call$j(n,this,$String$1(e),t)),!isSymbol$1(t))return t},apply$5($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$5(r,t-1),o=charAt$5(r,t+1);return exec$3(low,e)&&!exec$3(hi,o)||exec$3(hi,e)&&!exec$3(low,n)?"\\u"+numberToString$1(charCodeAt$2(e,0),16):e};$stringify&&$$1e({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$6(arguments),o=apply$5(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$5(o,tester,fixIllFormed):o}});var $$1d=_export,NATIVE_SYMBOL=symbolConstructorDetection,fails$m=fails$z,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,toObject$a=toObject$e,FORCED$8=!NATIVE_SYMBOL||fails$m((function(){getOwnPropertySymbolsModule$2.f(1)}));$$1d({target:"Object",stat:!0,forced:FORCED$8},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$2.f;return t?t(toObject$a(e)):[]}});var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("asyncIterator");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("hasInstance");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("isConcatSpreadable");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("iterator");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("match");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("matchAll");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("replace");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("search");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("species");var defineWellKnownSymbol$b=wellKnownSymbolDefine;defineWellKnownSymbol$b("split");var defineWellKnownSymbol$a=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$a("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$a=getBuiltIn$h,defineWellKnownSymbol$9=wellKnownSymbolDefine,setToStringTag$7=setToStringTag$9;defineWellKnownSymbol$9("toStringTag"),setToStringTag$7(getBuiltIn$a("Symbol"),"Symbol");var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("unscopables");var global$f=global$r,setToStringTag$6=setToStringTag$9;setToStringTag$6(global$f.JSON,"JSON",!0);var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,path$o=path$t,symbol$5=path$o.Symbol,iterators={},DESCRIPTORS$c=descriptors$2,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$c&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$c||DESCRIPTORS$c&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$l=fails$z,correctPrototypeGetter=!fails$l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$8=hasOwnProperty_1,isCallable$c=isCallable$q,toObject$9=toObject$e,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object.getPrototypeOf:function(e){var t=toObject$9(e);if(hasOwn$8(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$c(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype$1:null},fails$k=fails$z,isCallable$b=isCallable$q,isObject$d=isObject$l,create$c=objectCreate,getPrototypeOf$9=objectGetPrototypeOf,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$f=wellKnownSymbol$q,ITERATOR$8=wellKnownSymbol$f("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$9(getPrototypeOf$9(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$d(IteratorPrototype$1)||fails$k((function(){var e={};return IteratorPrototype$1[ITERATOR$8].call(e)!==e}));isCallable$b((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$c(IteratorPrototype$1))[ITERATOR$8])||defineBuiltIn$5(IteratorPrototype$1,ITERATOR$8,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype=iteratorsCore.IteratorPrototype,create$b=objectCreate,createPropertyDescriptor$3=createPropertyDescriptor$8,setToStringTag$5=setToStringTag$9,Iterators$5=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$b(IteratorPrototype,{next:createPropertyDescriptor$3(+!n,r)}),setToStringTag$5(e,o,!1,!0),Iterators$5[o]=returnThis$1,e},uncurryThis$k=functionUncurryThis,aCallable$g=aCallable$j,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$k(aCallable$g(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$a=isCallable$q,$String=String,$TypeError$d=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$a(e))return e;throw $TypeError$d("Can't set "+$String(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$b=anObject$g,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$b(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1c=_export,call$i=functionCall,FunctionName=functionName,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$8=objectGetPrototypeOf,setToStringTag$4=setToStringTag$9,defineBuiltIn$4=defineBuiltIn$8,wellKnownSymbol$e=wellKnownSymbol$q,Iterators$4=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER;FunctionName.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$7=wellKnownSymbol$e("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,i,a){createIteratorConstructor$1(r,t,n);var s,l,c,u=function(e){if(e===o&&h)return h;if(!BUGGY_SAFARI_ITERATORS&&e in $)return $[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",f=!1,$=e.prototype,y=$[ITERATOR$7]||$["@@iterator"]||o&&$[o],h=!BUGGY_SAFARI_ITERATORS&&y||u(o),d="Array"==t&&$.entries||y;if(d&&(s=getPrototypeOf$8(d.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$4(s,p,!0,!0),Iterators$4[p]=returnThis),PROPER_FUNCTION_NAME$1&&o==VALUES&&y&&y.name!==VALUES&&(f=!0,h=function(){return call$i(y,this)}),o)if(l={values:u(VALUES),keys:i?h:u(KEYS),entries:u(ENTRIES)},a)for(c in l)(BUGGY_SAFARI_ITERATORS||f||!(c in $))&&defineBuiltIn$4($,c,l[c]);else $$1c({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||f},l);return a&&$[ITERATOR$7]!==h&&defineBuiltIn$4($,ITERATOR$7,h,{name:o}),Iterators$4[t]=h,l},createIterResultObject$3=function(e,t){return{value:e,done:t}},toIndexedObject$4=toIndexedObject$b,Iterators$3=iterators,InternalStateModule$6=internalState;objectDefineProperty.f;var defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$3,ARRAY_ITERATOR="Array Iterator",setInternalState$6=InternalStateModule$6.set,getInternalState$1=InternalStateModule$6.getterFor(ARRAY_ITERATOR);defineIterator$2(Array,"Array",(function(e,t){setInternalState$6(this,{type:ARRAY_ITERATOR,target:toIndexedObject$4(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$2(void 0,!0)):createIterResultObject$2("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$3.Arguments=Iterators$3.Array;var domIterables={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},DOMIterables$1=domIterables,global$e=global$r,classof$6=classof$c,createNonEnumerableProperty$4=createNonEnumerableProperty$9,Iterators$2=iterators,wellKnownSymbol$d=wellKnownSymbol$q,TO_STRING_TAG$1=wellKnownSymbol$d("toStringTag");for(var COLLECTION_NAME in DOMIterables$1){var Collection=global$e[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$6(CollectionPrototype)!==TO_STRING_TAG$1&&createNonEnumerableProperty$4(CollectionPrototype,TO_STRING_TAG$1,COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array}var parent$2d=symbol$5,symbol$4=parent$2d,defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var parent$2c=symbol$4,symbol$3=parent$2c,defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("asyncDispose");var $$1b=_export,getBuiltIn$9=getBuiltIn$h,uncurryThis$j=functionUncurryThis,Symbol$4=getBuiltIn$9("Symbol"),keyFor2=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$j(Symbol$4.prototype.valueOf);$$1b({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}}});for(var $$1a=_export,shared=sharedExports,getBuiltIn$8=getBuiltIn$h,uncurryThis$i=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$c=wellKnownSymbol$q,Symbol$3=getBuiltIn$8("Symbol"),$isWellKnown=Symbol$3.isWellKnown,getOwnPropertyNames4=getBuiltIn$8("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$i(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks"),i$1=0,symbolKeys=getOwnPropertyNames4(Symbol$3),symbolKeysLength=symbolKeys.length;i$1<symbolKeysLength;i$1++)try{var symbolKey=symbolKeys[i$1];isSymbol(Symbol$3[symbolKey])&&wellKnownSymbol$c(symbolKey)}catch(e){}$$1a({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames4(WellKnownSymbolsStore),o=n.length;r<o;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("matcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("metadataKey");var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("observable");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadata");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$2b=symbol$3,symbol$2=parent$2b,symbol$1=symbol$2,_Symbol$1=getDefaultExportFromCjs(symbol$1),uncurryThis$h=functionUncurryThis,toIntegerOrInfinity$3=toIntegerOrInfinity$6,toString$a=toString$e,requireObjectCoercible$4=requireObjectCoercible$7,charAt$4=uncurryThis$h("".charAt),charCodeAt$1=uncurryThis$h("".charCodeAt),stringSlice$3=uncurryThis$h("".slice),createMethod$3=function(e){return function(t,r){var n,o,i=toString$a(requireObjectCoercible$4(t)),a=toIntegerOrInfinity$3(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$1(i,a))<55296||n>56319||a+1===s||(o=charCodeAt$1(i,a+1))<56320||o>57343?e?charAt$4(i,a):n:e?stringSlice$3(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$3=stringMultibyte.charAt,toString$9=toString$e,InternalStateModule$5=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState=InternalStateModule$5.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",(function(e){setInternalState$5(this,{type:STRING_ITERATOR,string:toString$9(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$1(void 0,!0):(e=charAt$3(r,n),t.index+=e.length,createIterResultObject$1(e,!1))}));var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$2a=iterator$5,iterator$4=parent$2a,parent$29=iterator$4,iterator$3=parent$29,parent$28=iterator$3,iterator$2=parent$28,iterator$1=iterator$2,_Symbol$iterator$1=getDefaultExportFromCjs(iterator$1);function _typeof$3(e){return(_typeof$3="function"==typeof _Symbol$1&&"symbol"==typeof _Symbol$iterator$1?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol$1&&e.constructor===_Symbol$1&&e!==_Symbol$1.prototype?"symbol":typeof e})(e)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$5=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$27=toPrimitive$5,toPrimitive$4=parent$27,parent$26=toPrimitive$4,toPrimitive$3=parent$26,parent$25=toPrimitive$3,toPrimitive$2=parent$25,toPrimitive$1=toPrimitive$2,_Symbol$toPrimitive$1=getDefaultExportFromCjs(toPrimitive$1);function _toPrimitive$3(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive$1];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$3(e){var t=_toPrimitive$3(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}function _defineProperties$3(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty$1(e,_toPropertyKey$3(n.key),n)}}function _createClass$3(e,t,r){return t&&_defineProperties$3(e.prototype,t),r&&_defineProperties$3(e,r),_Object$defineProperty$1(e,"prototype",{writable:!1}),e}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hasOwn$7=hasOwnProperty_1,isDataDescriptor$1=function(e){return void 0!==e&&(hasOwn$7(e,"value")||hasOwn$7(e,"writable"))},$$19=_export,call$h=functionCall,isObject$c=isObject$l,anObject$a=anObject$g,isDataDescriptor=isDataDescriptor$1,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,getPrototypeOf$7=objectGetPrototypeOf;function get$8(e,t){var r,n,o=arguments.length<3?e:arguments[2];return anObject$a(e)===o?e[t]:(r=getOwnPropertyDescriptorModule$2.f(e,t))?isDataDescriptor(r)?r.value:void 0===r.get?void 0:call$h(r.get,o):isObject$c(n=getPrototypeOf$7(e))?get$8(n,t,o):void 0}$$19({target:"Reflect",stat:!0},{get:get$8});var path$n=path$t,get$7=path$n.Reflect.get,parent$24=get$7,get$6=parent$24,parent$23=get$6,get$5=parent$23,parent$22=get$5,get$4=parent$22,get$3=get$4,_Reflect$get$1=getDefaultExportFromCjs(get$3),uncurryThis$g=functionUncurryThis,aCallable$f=aCallable$j,isObject$b=isObject$l,hasOwn$6=hasOwnProperty_1,arraySlice$5=arraySlice$7,NATIVE_BIND=functionBindNative,$Function=Function,concat$9=uncurryThis$g([].concat),join$3=uncurryThis$g([].join),factories={},construct$6=function(e,t,r){if(!hasOwn$6(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=$Function("C,a","return new C("+join$3(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$f(this),r=t.prototype,n=arraySlice$5(arguments,1),o=function(){var r=concat$9(n,arraySlice$5(arguments));return this instanceof o?construct$6(t,r.length,r):t.apply(e,r)};return isObject$b(r)&&(o.prototype=r),o},$$18=_export,bind$o=functionBind;$$18({target:"Function",proto:!0,forced:Function.bind!==bind$o},{bind:bind$o});var path$m=path$t,entryVirtual$m=function(e){return path$m[e+"Prototype"]},entryVirtual$l=entryVirtual$m,bind$n=entryVirtual$l("Function").bind,isPrototypeOf$n=objectIsPrototypeOf,method$j=bind$n,FunctionPrototype=Function.prototype,bind$m=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$n(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$j:t},parent$21=bind$m,bind$l=parent$21,parent$20=bind$l,bind$k=parent$20,parent$1$=bind$k,bind$j=parent$1$,bind$i=bind$j,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$i),getOwnPropertyDescriptor$9={exports:{}},$$17=_export,fails$j=fails$z,toIndexedObject$3=toIndexedObject$b,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$b=descriptors$2,FORCED$7=!DESCRIPTORS$b||fails$j((function(){nativeGetOwnPropertyDescriptor(1)}));$$17({target:"Object",stat:!0,forced:FORCED$7,sham:!DESCRIPTORS$b},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(e),t)}});var path$l=path$t,Object$3=path$l.Object,getOwnPropertyDescriptor$8=getOwnPropertyDescriptor$9.exports=function(e,t){return Object$3.getOwnPropertyDescriptor(e,t)};Object$3.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$8.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$9.exports,parent$1_=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$7=parent$1_,parent$1Z=getOwnPropertyDescriptor$7,getOwnPropertyDescriptor$6=parent$1Z,parent$1Y=getOwnPropertyDescriptor$6,getOwnPropertyDescriptor$5=parent$1Y,getOwnPropertyDescriptor$4=getOwnPropertyDescriptor$5,_Object$getOwnPropertyDescriptor$1=getDefaultExportFromCjs(getOwnPropertyDescriptor$4),$$16=_export,setPrototypeOf$7=objectSetPrototypeOf;$$16({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$7});var path$k=path$t,setPrototypeOf$6=path$k.Object.setPrototypeOf,parent$1X=setPrototypeOf$6,setPrototypeOf$5=parent$1X,parent$1W=setPrototypeOf$5,setPrototypeOf$4=parent$1W,parent$1V=setPrototypeOf$4,setPrototypeOf$3=parent$1V,setPrototypeOf$2=setPrototypeOf$3,_Object$setPrototypeOf$1=getDefaultExportFromCjs(setPrototypeOf$2),$$15=_export,fails$i=fails$z,toObject$8=toObject$e,nativeGetPrototypeOf=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,FAILS_ON_PRIMITIVES$2=fails$i((function(){nativeGetPrototypeOf(1)}));$$15({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$8(e))}});var path$j=path$t,getPrototypeOf$6=path$j.Object.getPrototypeOf,parent$1U=getPrototypeOf$6,getPrototypeOf$5=parent$1U,parent$1T=getPrototypeOf$5,getPrototypeOf$4=parent$1T,parent$1S=getPrototypeOf$4,getPrototypeOf$3=parent$1S,getPrototypeOf$2=getPrototypeOf$3,_Object$getPrototypeOf$1=getDefaultExportFromCjs(getPrototypeOf$2);function _getPrototypeOf$2(e){var t;return(_getPrototypeOf$2=_Object$setPrototypeOf$1?_bindInstanceProperty$1(t=_Object$getPrototypeOf$1).call(t):function(e){return e.__proto__||_Object$getPrototypeOf$1(e)})(e)}function _superPropBase$2(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$2(e)););return e}function _get$2(){var e;"undefined"!=typeof Reflect&&_Reflect$get$1?_get$2=_bindInstanceProperty$1(e=_Reflect$get$1).call(e):_get$2=function(e,t,r){var n=_superPropBase$2(e,t);if(n){var o=_Object$getOwnPropertyDescriptor$1(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get$2.apply(this,arguments)}var $$14=_export,DESCRIPTORS$a=descriptors$2,create$a=objectCreate;$$14({target:"Object",stat:!0,sham:!DESCRIPTORS$a},{create:create$a});var path$i=path$t,Object$2=path$i.Object,create$9=function(e,t){return Object$2.create(e,t)},parent$1R=create$9,create$8=parent$1R,parent$1Q=create$8,create$7=parent$1Q,parent$1P=create$7,create$6=parent$1P,create$5=create$6,_Object$create$1=getDefaultExportFromCjs(create$5);function _setPrototypeOf$2(e,t){var r;return(_setPrototypeOf$2=_Object$setPrototypeOf$1?_bindInstanceProperty$1(r=_Object$setPrototypeOf$1).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create$1(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty$1(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}var isConstructor$2=isConstructor$4,tryToString$4=tryToString$7,$TypeError$c=TypeError,aConstructor$3=function(e){if(isConstructor$2(e))return e;throw $TypeError$c(tryToString$4(e)+" is not a constructor")},$$13=_export,getBuiltIn$7=getBuiltIn$h,apply$4=functionApply,bind$h=functionBind,aConstructor$2=aConstructor$3,anObject$9=anObject$g,isObject$a=isObject$l,create$4=objectCreate,fails$h=fails$z,nativeConstruct=getBuiltIn$7("Reflect","construct"),ObjectPrototype=Object.prototype,push$7=[].push,NEW_TARGET_BUG=fails$h((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$h((function(){nativeConstruct((function(){}))})),FORCED$6=NEW_TARGET_BUG||ARGS_BUG;$$13({target:"Reflect",stat:!0,forced:FORCED$6,sham:FORCED$6},{construct:function(e,t){aConstructor$2(e),anObject$9(t);var r=arguments.length<3?e:aConstructor$2(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e==r){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 n=[null];return apply$4(push$7,n,t),new(apply$4(bind$h,e,n))}var o=r.prototype,i=create$4(isObject$a(o)?o:ObjectPrototype),a=apply$4(e,i,t);return isObject$a(a)?a:i}});var path$h=path$t,construct$5=path$h.Reflect.construct,parent$1O=construct$5,construct$4=parent$1O,parent$1N=construct$4,construct$3=parent$1N,parent$1M=construct$3,construct$2=parent$1M,construct$1=construct$2,_Reflect$construct$1=getDefaultExportFromCjs(construct$1);function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!_Reflect$construct$1)return!1;if(_Reflect$construct$1.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _possibleConstructorReturn$2(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(e)}function _createSuper$2(e){var t=_isNativeReflectConstruct$2();return function(){var r,n=_getPrototypeOf$2(e);if(t){var o=_getPrototypeOf$2(this).constructor;r=_Reflect$construct$1(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$2(this,r)}}function _defineProperty$3(e,t,r){return(t=_toPropertyKey$3(t))in e?_Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var entryVirtual$k=entryVirtual$m,concat$8=entryVirtual$k("Array").concat,isPrototypeOf$m=objectIsPrototypeOf,method$i=concat$8,ArrayPrototype$i=Array.prototype,concat$7=function(e){var t=e.concat;return e===ArrayPrototype$i||isPrototypeOf$m(ArrayPrototype$i,e)&&t===ArrayPrototype$i.concat?method$i:t},parent$1L=concat$7,concat$6=parent$1L,parent$1K=concat$6,concat$5=parent$1K,parent$1J=concat$5,concat$4=parent$1J,concat$3=concat$4,concat$2=concat$3,_concatInstanceProperty=getDefaultExportFromCjs(concat$2),AD_START="ad_start",AD_PLAY="ad_play",AD_PAUSE="ad_pause",AD_TIME_UPDATE="ad_time_update",AD_SKIPPED="ad_skipped",AD_ERROR="ad_error",AD_COMPLETE="ad_complete",AD_ALL_COMPLETED="ad_all_completed",IMA_SDK_LOAD_START="ima_sdk_load_start",IMA_SDK_LOAD_SUCCESS="ima_sdk_load_success",IMA_SDK_LOAD_ERROR="ima_sdk_load_error",IMA_AD_LOADER_READY="ima_ad_loader_ready",IMA_AD_MANAGER_READY="ima_ad_manager_ready",IMA_AD_COMPLETE="ima_ad_complete",IMA_ALL_ADS_COMPLETED="ima_all_ads_completed",IMA_AD_ERROR="ima_ad_error",IMA_AD_LOADED="ima_ad_loaded",IMA_AD_BREAK_READY="ima_ad_break_ready",IMA_CONTENT_PAUSE_REQUESTED="ima_content_pause_requested",IMA_CONTENT_RESUME_REQUESTED="ima_content_resume_requested",IMA_READY_TO_PLAY="ima_ready_to_play",path$g=path$t,apply$3=functionApply;path$g.JSON||(path$g.JSON={stringify:JSON.stringify});var stringify$5=function(e,t,r){return apply$3(path$g.JSON.stringify,null,arguments)},parent$1I=stringify$5,stringify$4=parent$1I,parent$1H=stringify$4,stringify$3=parent$1H,parent$1G=stringify$3,stringify$2=parent$1G,stringify$1=stringify$2,stringify2=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify2),symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),classof$5=classof$c,getMethod$1=getMethod$3,isNullOrUndefined$3=isNullOrUndefined$6,Iterators$1=iterators,wellKnownSymbol$b=wellKnownSymbol$q,ITERATOR$6=wellKnownSymbol$b("iterator"),getIteratorMethod$a=function(e){if(!isNullOrUndefined$3(e))return getMethod$1(e,ITERATOR$6)||getMethod$1(e,"@@iterator")||Iterators$1[classof$5(e)]},getIteratorMethod$9=getIteratorMethod$a,getIteratorMethod_1=getIteratorMethod$9,parent$1F=getIteratorMethod_1,getIteratorMethod$8=parent$1F,parent$1E=getIteratorMethod$8,getIteratorMethod$7=parent$1E,parent$1D=getIteratorMethod$7,getIteratorMethod$6=parent$1D,getIteratorMethod$5=getIteratorMethod$6,_getIteratorMethod$1=getDefaultExportFromCjs(getIteratorMethod$5),getIteratorMethod$4=getIteratorMethod$5,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$4),$$12=_export,toObject$7=toObject$e,nativeKeys=objectKeys$3,fails$g=fails$z,FAILS_ON_PRIMITIVES$1=fails$g((function(){nativeKeys(1)}));$$12({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function(e){return nativeKeys(toObject$7(e))}});var path$f=path$t,keys$5=path$f.Object.keys,parent$1C=keys$5,keys$4=parent$1C,parent$1B=keys$4,keys$3=parent$1B,parent$1A=keys$3,keys$2=parent$1A,keys$1=keys$2,keys3=keys$1,_Object$keys=getDefaultExportFromCjs(keys3),path$e=path$t,getOwnPropertySymbols$5=path$e.Object.getOwnPropertySymbols,parent$1z=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1z,parent$1y=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1y,parent$1x=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1x,getOwnPropertySymbols$1=getOwnPropertySymbols$2,getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),$$11=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("filter");$$11({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$j=entryVirtual$m,filter$6=entryVirtual$j("Array").filter,isPrototypeOf$l=objectIsPrototypeOf,method$h=filter$6,ArrayPrototype$h=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$h||isPrototypeOf$l(ArrayPrototype$h,e)&&t===ArrayPrototype$h.filter?method$h:t},parent$1w=filter$5,filter$4=parent$1w,parent$1v=filter$4,filter$3=parent$1v,parent$1u=filter$3,filter$2=parent$1u,filter$1=filter$2,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$3),fails$f=fails$z,arrayMethodIsStrict$7=function(e,t){var r=[][e];return!!r&&fails$f((function(){r.call(null,t||function(){return 1},1)}))},$forEach=arrayIteration.forEach,arrayMethodIsStrict$6=arrayMethodIsStrict$7,STRICT_METHOD$4=arrayMethodIsStrict$6("forEach"),arrayForEach=STRICT_METHOD$4?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)},$$10=_export,forEach$8=arrayForEach;$$10({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});var entryVirtual$i=entryVirtual$m,forEach$7=entryVirtual$i("Array").forEach,parent$1t=forEach$7,forEach$6=parent$1t,classof$4=classof$c,hasOwn$5=hasOwnProperty_1,isPrototypeOf$k=objectIsPrototypeOf,method$g=forEach$6,ArrayPrototype$g=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},forEach$5=function(e){var t=e.forEach;return e===ArrayPrototype$g||isPrototypeOf$k(ArrayPrototype$g,e)&&t===ArrayPrototype$g.forEach||hasOwn$5(DOMIterables,classof$4(e))?method$g:t},parent$1s=forEach$5,forEach$4=parent$1s,parent$1r=forEach$4,forEach$3=parent$1r,forEach$2=forEach$3,forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),getBuiltIn$6=getBuiltIn$h,uncurryThis$f=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$8=anObject$g,concat$1=uncurryThis$f([].concat),ownKeys$4=getBuiltIn$6("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$1.f(anObject$8(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},$$$=_export,DESCRIPTORS$9=descriptors$2,ownKeys$3=ownKeys$4,toIndexedObject$2=toIndexedObject$b,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,createProperty$3=createProperty$6;$$$({target:"Object",stat:!0,sham:!DESCRIPTORS$9},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$2(e),o=getOwnPropertyDescriptorModule$1.f,i=ownKeys$3(n),a={},s=0;i.length>s;)void 0!==(r=o(n,t=i[s++]))&&createProperty$3(a,t,r);return a}});var path$d=path$t,getOwnPropertyDescriptors$5=path$d.Object.getOwnPropertyDescriptors,parent$1q=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1q,parent$1p=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1p,parent$1o=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1o,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$7={exports:{}},$$_=_export,DESCRIPTORS$8=descriptors$2,defineProperties$6=objectDefineProperties.f;$$_({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$8},{defineProperties:defineProperties$6});var path$c=path$t,Object$1=path$c.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$1.defineProperties(e,t)};Object$1.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1n=definePropertiesExports,defineProperties$4=parent$1n,parent$1m=defineProperties$4,defineProperties$3=parent$1m,parent$1l=defineProperties$3,defineProperties$2=parent$1l,defineProperties$1=defineProperties$2,defineProperties4=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties4),defineProperty$3=defineProperty$7,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),create$3=create$5,_Object$create=getDefaultExportFromCjs(create$3),getPrototypeOf$1=getPrototypeOf$2,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$1),setPrototypeOf$1=setPrototypeOf$2,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$1),hasOwn$4=hasOwnProperty_1,ownKeys$2=ownKeys$4,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys$2(t),o=definePropertyModule.f,i=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var s=n[a];hasOwn$4(e,s)||r&&hasOwn$4(r,s)||o(e,s,i(t,s))}},isObject$9=isObject$l,createNonEnumerableProperty$3=createNonEnumerableProperty$9,installErrorCause$1=function(e,t){isObject$9(t)&&"cause"in t&&createNonEnumerableProperty$3(e,"cause",t.cause)},uncurryThis$e=functionUncurryThis,$Error$1=Error,replace$4=uncurryThis$e("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$4(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$e=fails$z,createPropertyDescriptor$2=createPropertyDescriptor$8,errorStackInstallable=!fails$e((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$2(1,7)),7!==e.stack)})),createNonEnumerableProperty$2=createNonEnumerableProperty$9,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$2(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$a=wellKnownSymbol$q,Iterators=iterators,ITERATOR$5=wellKnownSymbol$a("iterator"),ArrayPrototype$f=Array.prototype,isArrayIteratorMethod$2=function(e){return void 0!==e&&(Iterators.Array===e||ArrayPrototype$f[ITERATOR$5]===e)},call$g=functionCall,aCallable$e=aCallable$j,anObject$7=anObject$g,tryToString$3=tryToString$7,getIteratorMethod$3=getIteratorMethod$a,$TypeError$b=TypeError,getIterator$3=function(e,t){var r=arguments.length<2?getIteratorMethod$3(e):t;if(aCallable$e(r))return anObject$7(call$g(r,e));throw $TypeError$b(tryToString$3(e)+" is not iterable")},call$f=functionCall,anObject$6=anObject$g,getMethod=getMethod$3,iteratorClose$2=function(e,t,r){var n,o;anObject$6(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$f(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$6(n),r},bind$g=functionBindContext,call$e=functionCall,anObject$5=anObject$g,tryToString$2=tryToString$7,isArrayIteratorMethod$1=isArrayIteratorMethod$2,lengthOfArrayLike$8=lengthOfArrayLike$d,isPrototypeOf$j=objectIsPrototypeOf,getIterator$2=getIterator$3,getIteratorMethod$2=getIteratorMethod$a,iteratorClose$1=iteratorClose$2,$TypeError$a=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$l=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,p=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),$=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=bind$g(t,u),d=function(e){return n&&iteratorClose$1(n,"normal",e),new Result(!0,e)},g=function(e){return p?(anObject$5(e),y?h(e[0],e[1],d):h(e[0],e[1])):y?h(e,d):h(e)};if(f)n=e.iterator;else if($)n=e;else{if(!(o=getIteratorMethod$2(e)))throw $TypeError$a(tryToString$2(e)+" is not iterable");if(isArrayIteratorMethod$1(o)){for(i=0,a=lengthOfArrayLike$8(e);a>i;i++)if((s=g(e[i]))&&isPrototypeOf$j(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$2(e,o)}for(l=f?e.next:n.next;!(c=call$e(l,n)).done;){try{s=g(c.value)}catch(e){iteratorClose$1(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$j(ResultPrototype,s))return s}return new Result(!1)},toString$8=toString$e,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$8(e)},$$Z=_export,isPrototypeOf$i=objectIsPrototypeOf,getPrototypeOf2=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$2=objectCreate,createNonEnumerableProperty$1=createNonEnumerableProperty$9,createPropertyDescriptor$1=createPropertyDescriptor$8,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$k=iterate$l,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$9=wellKnownSymbol$q,TO_STRING_TAG=wellKnownSymbol$9("toStringTag"),$Error=Error,push$6=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$i(AggregateErrorPrototype,this);setPrototypeOf?r=setPrototypeOf($Error(),n?getPrototypeOf2(this):AggregateErrorPrototype):(r=n?this:create$2(AggregateErrorPrototype),createNonEnumerableProperty$1(r,TO_STRING_TAG,"Error")),void 0!==t&&createNonEnumerableProperty$1(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var o=[];return iterate$k(e,push$6,{that:o}),createNonEnumerableProperty$1(r,"errors",o),r};setPrototypeOf?setPrototypeOf($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$2($Error.prototype,{constructor:createPropertyDescriptor$1(1,$AggregateError),message:createPropertyDescriptor$1(1,""),name:createPropertyDescriptor$1(1,"AggregateError")});$$Z({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,classof$3=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$3(process),getBuiltIn$5=getBuiltIn$h,defineBuiltInAccessor$3=defineBuiltInAccessor$5,wellKnownSymbol$8=wellKnownSymbol$q,DESCRIPTORS$7=descriptors$2,SPECIES$3=wellKnownSymbol$8("species"),setSpecies$2=function(e){var t=getBuiltIn$5(e);DESCRIPTORS$7&&t&&!t[SPECIES$3]&&defineBuiltInAccessor$3(t,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$h=objectIsPrototypeOf,$TypeError$9=TypeError,anInstance$5=function(e,t){if(isPrototypeOf$h(t,e))return e;throw $TypeError$9("Incorrect invocation")},anObject$4=anObject$g,aConstructor$1=aConstructor$3,isNullOrUndefined$2=isNullOrUndefined$6,wellKnownSymbol$7=wellKnownSymbol$q,SPECIES$2=wellKnownSymbol$7("species"),speciesConstructor$2=function(e,t){var r,n=anObject$4(e).constructor;return void 0===n||isNullOrUndefined$2(r=anObject$4(n)[SPECIES$2])?t:aConstructor$1(r)},$TypeError$8=TypeError,validateArgumentsLength$5=function(e,t){if(e<t)throw $TypeError$8("Not enough arguments");return e},userAgent$5=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$5),global$d=global$r,apply$2=functionApply,bind$f=functionBindContext,isCallable$9=isCallable$q,hasOwn$3=hasOwnProperty_1,fails$d=fails$z,html=html$2,arraySlice$4=arraySlice$7,createElement=documentCreateElement$1,validateArgumentsLength$4=validateArgumentsLength$5,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set$6=global$d.setImmediate,clear=global$d.clearImmediate,process$3=global$d.process,Dispatch=global$d.Dispatch,Function$2=global$d.Function,MessageChannel=global$d.MessageChannel,String$1=global$d.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$d((function(){$location=global$d.location}));var run=function(e){if(hasOwn$3(queue$2,e)){var t=queue$2[e];delete queue$2[e],t()}},runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$d.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$6&&clear||(set$6=function(e){validateArgumentsLength$4(arguments.length,1);var t=isCallable$9(e)?e:Function$2(e),r=arraySlice$4(arguments,1);return queue$2[++counter]=function(){apply$2(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$f(port.postMessage,port)):global$d.addEventListener&&isCallable$9(global$d.postMessage)&&!global$d.importScripts&&$location&&"file:"!==$location.protocol&&!fails$d(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$d.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$6,clear:clear},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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 notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$4=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$4)&&"undefined"!=typeof Pebble,userAgent$3=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$3),global$c=global$r,bind$e=functionBindContext,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$c.MutationObserver||global$c.WebKitMutationObserver,document$2=global$c.document,process$2=global$c.process,Promise$1=global$c.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$c,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise$6=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$e(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$3?notify$1=function(){process$2.nextTick(flush)}:(macrotask=bind$e(macrotask,global$c),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$b=global$r,promiseNativeConstructor=global$b.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$2&&"object"==typeof window&&"object"==typeof document,global$a=global$r,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$8=isCallable$q,isForced=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$6=wellKnownSymbol$q,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$1=wellKnownSymbol$6("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$8(global$a.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",(function(){var e=inspectSource(NativePromiseConstructor$5),t=e!==String(NativePromiseConstructor$5);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$2.catch||!NativePromisePrototype$2.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$5((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$1]=n,!(SUBCLASSING=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$d=aCallable$j,$TypeError$7=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$7("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$d(t),this.reject=aCallable$d(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$Y=_export,IS_NODE$1=engineIsNode,global$9=global$r,call$d=functionCall,defineBuiltIn$3=defineBuiltIn$8,setToStringTag$3=setToStringTag$9,setSpecies$1=setSpecies$2,aCallable$c=aCallable$j,isCallable$7=isCallable$q,isObject$8=isObject$l,anInstance$4=anInstance$5,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$4=internalState,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$6=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$4.getterFor(PROMISE),setInternalState$4=InternalStateModule$4.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$3=global$9.TypeError,document$1=global$9.document,process$1=global$9.process,newPromiseCapability$1=newPromiseCapabilityModule$6.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$9.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$8(e)||!isCallable$7(t=e.then))&&t},callReaction=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),o=!0)),r===e.promise?c(TypeError$3("Promise-chain cycle")):(n=isThenable(r))?call$d(n,r,l,c):l(r)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}},notify=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$9.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(o=global$9["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$d(task,global$9,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process$1.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$d(task,global$9,(function(){var t=e.facade;IS_NODE$1?process$1.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$d=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$3("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$d(n,t,bind$d(internalResolve,r,e),bind$d(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$4(this,PromisePrototype),aCallable$c(e),call$d(Internal,this);var t=getInternalPromiseState(this);try{e(bind$d(internalResolve,t),bind$d(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$4(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$3(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$7(e)||e,n.fail=isCallable$7(t)&&t,n.domain=IS_NODE$1?process$1.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$d(internalResolve,t),this.reject=bind$d(internalReject,t)},newPromiseCapabilityModule$6.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$Y({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$3(PromiseConstructor,PROMISE,!1,!0),setSpecies$1(PROMISE);var wellKnownSymbol$5=wellKnownSymbol$q,ITERATOR$4=wellKnownSymbol$5("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$4]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$2=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$4]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$2,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1((function(e){NativePromiseConstructor$3.all(e).then(void 0,(function(){}))})),$$X=_export,call$c=functionCall,aCallable$b=aCallable$j,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$4=perform$6,iterate$j=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$X({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.resolve,o=r.reject,i=perform$4((function(){var r=aCallable$b(t.resolve),i=[],a=0,s=1;iterate$j(e,(function(e){var l=a++,c=!1;s++,call$c(r,t,e).then((function(e){c||(c=!0,i[l]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var $$W=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$W({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$V=_export,call$b=functionCall,aCallable$a=aCallable$j,newPromiseCapabilityModule$4=newPromiseCapability$2,perform$3=perform$6,iterate$i=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$V({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$4.f(t),n=r.reject,o=perform$3((function(){var o=aCallable$a(t.resolve);iterate$i(e,(function(e){call$b(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$U=_export,call$a=functionCall,newPromiseCapabilityModule$3=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$U({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$3.f(this);return call$a(t.reject,void 0,e),t.promise}});var anObject$3=anObject$g,isObject$7=isObject$l,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(e,t){if(anObject$3(e),isObject$7(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$T=_export,getBuiltIn$4=getBuiltIn$h,IS_PURE$1=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$4("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$T({target:"Promise",stat:!0,forced:IS_PURE$1},{resolve:function(e){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,e)}});var $$S=_export,call$9=functionCall,aCallable$9=aCallable$j,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$2=perform$6,iterate$h=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$S({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,o=r.reject,i=perform$2((function(){var r=aCallable$9(t.resolve),o=[],i=0,a=1;iterate$h(e,(function(e){var s=i++,l=!1;a++,call$9(r,t,e).then((function(e){l||(l=!0,o[s]={status:"fulfilled",value:e},--a||n(o))}),(function(e){l||(l=!0,o[s]={status:"rejected",reason:e},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var $$R=_export,call$8=functionCall,aCallable$8=aCallable$j,getBuiltIn$3=getBuiltIn$h,newPromiseCapabilityModule$1=newPromiseCapability$2,perform$1=perform$6,iterate$g=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$R({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$3("AggregateError"),n=newPromiseCapabilityModule$1.f(t),o=n.resolve,i=n.reject,a=perform$1((function(){var n=aCallable$8(t.resolve),a=[],s=0,l=1,c=!1;iterate$g(e,(function(e){var u=s++,p=!1;l++,call$8(n,t,e).then((function(e){p||c||(c=!0,o(e))}),(function(e){p||c||(p=!0,a[u]=e,--l||i(new r(a,PROMISE_ANY_ERROR)))}))})),--l||i(new r(a,PROMISE_ANY_ERROR))}));return a.error&&i(a.value),n.promise}});var $$Q=_export,NativePromiseConstructor=promiseNativeConstructor,fails$c=fails$z,getBuiltIn$2=getBuiltIn$h,isCallable$6=isCallable$q,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$c((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));$$Q({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn$2("Promise")),r=isCallable$6(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}});var path$b=path$t,promise$5=path$b.Promise,parent$1k=promise$5,promise$4=parent$1k,parent$1j=promise$4,promise$3=parent$1j,$$P=_export,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$P({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule.f(this),r=perform(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$1i=promise$3,promise$2=parent$1i,promise$1=promise$2,promise=promise$1,_Promise=getDefaultExportFromCjs(promise),$$O=_export,uncurryThis$d=functionUncurryThis,isArray$9=isArray$d,nativeReverse=uncurryThis$d([].reverse),test$1=[1,2];$$O({target:"Array",proto:!0,forced:String(test$1)===String(test$1.reverse())},{reverse:function(){return isArray$9(this)&&(this.length=this.length),nativeReverse(this)}});var entryVirtual$h=entryVirtual$m,reverse$6=entryVirtual$h("Array").reverse,isPrototypeOf$g=objectIsPrototypeOf,method$f=reverse$6,ArrayPrototype$e=Array.prototype,reverse$5=function(e){var t=e.reverse;return e===ArrayPrototype$e||isPrototypeOf$g(ArrayPrototype$e,e)&&t===ArrayPrototype$e.reverse?method$f:t},parent$1h=reverse$5,reverse$4=parent$1h,parent$1g=reverse$4,reverse$3=parent$1g,parent$1f=reverse$3,reverse$2=parent$1f,reverse$1=reverse$2,reverse2=reverse$1,_reverseInstanceProperty=getDefaultExportFromCjs(reverse2),$$N=_export,isArray$8=isArray$d,isConstructor$1=isConstructor$4,isObject$6=isObject$l,toAbsoluteIndex$3=toAbsoluteIndex$6,lengthOfArrayLike$7=lengthOfArrayLike$d,toIndexedObject$1=toIndexedObject$b,createProperty$2=createProperty$6,wellKnownSymbol$4=wellKnownSymbol$q,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,nativeSlice=arraySlice$7,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("slice"),SPECIES=wellKnownSymbol$4("species"),$Array$1=Array,max$1=Math.max;$$N({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{slice:function(e,t){var r,n,o,i=toIndexedObject$1(this),a=lengthOfArrayLike$7(i),s=toAbsoluteIndex$3(e,a),l=toAbsoluteIndex$3(void 0===t?a:t,a);if(isArray$8(i)&&(r=i.constructor,(isConstructor$1(r)&&(r===$Array$1||isArray$8(r.prototype))||isObject$6(r)&&null===(r=r[SPECIES]))&&(r=void 0),r===$Array$1||void 0===r))return nativeSlice(i,s,l);for(n=new(void 0===r?$Array$1:r)(max$1(l-s,0)),o=0;s<l;s++,o++)s in i&&createProperty$2(n,o,i[s]);return n.length=o,n}});var entryVirtual$g=entryVirtual$m,slice$6=entryVirtual$g("Array").slice,isPrototypeOf$f=objectIsPrototypeOf,method$e=slice$6,ArrayPrototype$d=Array.prototype,slice$5=function(e){var t=e.slice;return e===ArrayPrototype$d||isPrototypeOf$f(ArrayPrototype$d,e)&&t===ArrayPrototype$d.slice?method$e:t},parent$1e=slice$5,slice$4=parent$1e,parent$1d=slice$4,slice$3=parent$1d,parent$1c=slice$3,slice$2=parent$1c,slice$1=slice$2,_sliceInstanceProperty$1=getDefaultExportFromCjs(slice$1),slice2=slice$1,_sliceInstanceProperty=getDefaultExportFromCjs(slice2),iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator),bind$c=bind$i,_bindInstanceProperty=getDefaultExportFromCjs(bind$c),construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),get$2=get$3,_Reflect$get=getDefaultExportFromCjs(get$2),$$M=_export,isArray$7=isArray$d;$$M({target:"Array",stat:!0},{isArray:isArray$7});var path$a=path$t,isArray$6=path$a.Array.isArray,parent$1b=isArray$6,isArray$5=parent$1b,parent$1a=isArray$5,isArray$4=parent$1a,parent$19=isArray$4,isArray$3=parent$19,isArray$2=isArray$3,_Array$isArray$1=getDefaultExportFromCjs(isArray$2),isArray$1=isArray$2,_Array$isArray=getDefaultExportFromCjs(isArray$1),anObject$2=anObject$g,iteratorClose=iteratorClose$2,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$2(r)[0],r[1]):t(r)}catch(t){iteratorClose(e,"throw",t)}},bind$b=functionBindContext,call$7=functionCall,toObject$6=toObject$e,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$6=lengthOfArrayLike$d,createProperty$1=createProperty$6,getIterator$1=getIterator$3,getIteratorMethod$1=getIteratorMethod$a,$Array=Array,arrayFrom$1=function(e){var t=toObject$6(e),r=isConstructor3(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=bind$b(o,n>2?arguments[2]:void 0));var a,s,l,c,u,p,f=getIteratorMethod$1(t),$=0;if(!f||this===$Array&&isArrayIteratorMethod(f))for(a=lengthOfArrayLike$6(t),s=r?new this(a):$Array(a);a>$;$++)p=i?o(t[$],$):t[$],createProperty$1(s,$,p);else for(u=(c=getIterator$1(t,f)).next,s=r?new this:[];!(l=call$7(u,c)).done;$++)p=i?callWithSafeIterationClosing(c,o,[l.value,$],!0):l.value,createProperty$1(s,$,p);return s.length=$,s},$$L=_export,from$7=arrayFrom$1,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$L({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$7});var path$9=path$t,from$6=path$9.Array.from,parent$18=from$6,from$5=parent$18,parent$17=from$5,from$4=parent$17,parent$16=from$4,from$3=parent$16,from$2=from$3,_Array$from$1=getDefaultExportFromCjs(from$2),from$1=from$2,_Array$from=getDefaultExportFromCjs(from$1),toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function _iterableToArrayLimit(e,t){var r=null==e?null:void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function ownKeys$1(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$1(Object(o),!0)).call(r,(function(t){_defineProperty$2(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys$1(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=_Object$defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof _Symbol?_Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,r){return _Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=_Object$create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:_(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p={};function f(){}function $(){}function y(){}var h={};l(h,i,(function(){return this}));var d=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(E([])));d&&d!==t&&r.call(d,i)&&(h=d);var g=y.prototype=f.prototype=_Object$create(h);function m(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==_typeof$3(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(p).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function _(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function b(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return $.prototype=y,n(g,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:$,configurable:!0}),$.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===$||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,y):(e.__proto__=y,l(e,s,"GeneratorFunction")),e.prototype=_Object$create(g),e},e.awrap=function(e){return{__await:e}},m(v.prototype),l(v.prototype,a,(function(){return this})),e.AsyncIterator=v,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise);var a=new v(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),l(g,s,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,P.prototype={constructor:P,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,_forEachInstanceProperty(t=this.tryEntries).call(t,I),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+_sliceInstanceProperty(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function _typeof$2(e){return(_typeof$2="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$2(n.key),n)}}function _createClass$2(e,t,r){return t&&_defineProperties$2(e.prototype,t),r&&_defineProperties$2(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$2(e,t,r){return(t=_toPropertyKey$2(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){var t;return(_getPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$1(e,t){var r;return(_setPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var r,n=_getPrototypeOf$1(e);if(t){var o=_getPrototypeOf$1(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$1(this,r)}}function _superPropBase$1(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$1(e)););return e}function _get$1(){var e;"undefined"!=typeof Reflect&&_Reflect$get?_get$1=_bindInstanceProperty(e=_Reflect$get).call(e):_get$1=function(e,t,r){var n=_superPropBase$1(e,t);if(n){var o=_Object$getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get$1.apply(this,arguments)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$2(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(_Array$isArray(e))return e}function _unsupportedIterableToArray$2(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$2(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$2(e,t):void 0}}function _arrayLikeToArray$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableRest(){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 _toPrimitive$2(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$2(e){var t=_toPrimitive$2(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var $$K=_export,uncurryThis$c=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$5=arrayMethodIsStrict$7,nativeIndexOf=uncurryThis$c([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$5=NEGATIVE_ZERO$1||!arrayMethodIsStrict$5("indexOf");$$K({target:"Array",proto:!0,forced:FORCED$5},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var entryVirtual$f=entryVirtual$m,indexOf$6=entryVirtual$f("Array").indexOf,isPrototypeOf$e=objectIsPrototypeOf,method$d=indexOf$6,ArrayPrototype$c=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$c||isPrototypeOf$e(ArrayPrototype$c,e)&&t===ArrayPrototype$c.indexOf?method$d:t},parent$15=indexOf$5,indexOf$4=parent$15,parent$14=indexOf$4,indexOf$3=parent$14,parent$13=indexOf$3,indexOf$2=parent$13,indexOf$1=indexOf$2,indexOf2=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf2),$$J=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES$1=!1})),$$J({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$e=entryVirtual$m,find$7=entryVirtual$e("Array").find,isPrototypeOf$d=objectIsPrototypeOf,method$c=find$7,ArrayPrototype$b=Array.prototype,find$6=function(e){var t=e.find;return e===ArrayPrototype$b||isPrototypeOf$d(ArrayPrototype$b,e)&&t===ArrayPrototype$b.find?method$c:t},parent$12=find$6,find$5=parent$12,parent$11=find$5,find$4=parent$11,parent$10=find$4,find$3=parent$10,find$2=find$3,find$1=find$2,_findInstanceProperty=getDefaultExportFromCjs(find$1),DESCRIPTORS$6=descriptors$2,isArray2=isArray$d,$TypeError$6=TypeError,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$6&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray2(e)&&!getOwnPropertyDescriptor$1(e,"length").writable)throw $TypeError$6("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$1=tryToString$7,$TypeError$5=TypeError,deletePropertyOrThrow$3=function(e,t){if(!delete e[t])throw $TypeError$5("Cannot delete property "+tryToString$1(t)+" of "+tryToString$1(e))},$$I=_export,toObject$5=toObject$e,toAbsoluteIndex$2=toAbsoluteIndex$6,toIntegerOrInfinity$2=toIntegerOrInfinity$6,lengthOfArrayLike$5=lengthOfArrayLike$d,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$2,arraySpeciesCreate=arraySpeciesCreate$3,createProperty=createProperty$6,deletePropertyOrThrow$2=deletePropertyOrThrow$3,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("splice"),max=Math.max,min$2=Math.min;$$I({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{splice:function(e,t){var r,n,o,i,a,s,l=toObject$5(this),c=lengthOfArrayLike$5(l),u=toAbsoluteIndex$2(e,c),p=arguments.length;for(0===p?r=n=0:1===p?(r=0,n=c-u):(r=p-2,n=min$2(max(toIntegerOrInfinity$2(t),0),c-u)),doesNotExceedSafeInteger(c+r-n),o=arraySpeciesCreate(l,n),i=0;i<n;i++)(a=u+i)in l&&createProperty(o,i,l[a]);if(o.length=n,r<n){for(i=u;i<c-n;i++)s=i+r,(a=i+n)in l?l[s]=l[a]:deletePropertyOrThrow$2(l,s);for(i=c;i>c-n+r;i--)deletePropertyOrThrow$2(l,i-1)}else if(r>n)for(i=c-n;i>u;i--)s=i+r-1,(a=i+n-1)in l?l[s]=l[a]:deletePropertyOrThrow$2(l,s);for(i=0;i<r;i++)l[i+u]=arguments[i+2];return setArrayLength(l,c-n+r),o}});var entryVirtual$d=entryVirtual$m,splice$7=entryVirtual$d("Array").splice,isPrototypeOf$c=objectIsPrototypeOf,method$b=splice$7,ArrayPrototype$a=Array.prototype,splice$6=function(e){var t=e.splice;return e===ArrayPrototype$a||isPrototypeOf$c(ArrayPrototype$a,e)&&t===ArrayPrototype$a.splice?method$b:t},parent$$=splice$6,splice$5=parent$$,parent$_=splice$5,splice$4=parent$_,parent$Z=splice$4,splice$3=parent$Z,splice$2=splice$3,splice$1=splice$2,_spliceInstanceProperty=getDefaultExportFromCjs(splice$1),whitespaces$4="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$b=functionUncurryThis,requireObjectCoercible$3=requireObjectCoercible$7,toString$7=toString$e,whitespaces$3=whitespaces$4,replace$3=uncurryThis$b("".replace),ltrim=RegExp("^["+whitespaces$3+"]+"),rtrim=RegExp("(^|[^"+whitespaces$3+"])["+whitespaces$3+"]+$"),createMethod$2=function(e){return function(t){var r=toString$7(requireObjectCoercible$3(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"$1")),r}},stringTrim={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},global$8=global$r,fails$b=fails$z,uncurryThis$a=functionUncurryThis,toString$6=toString$e,trim$8=stringTrim.trim,whitespaces$2=whitespaces$4,$parseInt$1=global$8.parseInt,Symbol$2=global$8.Symbol,ITERATOR$3=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$a(hex.exec),FORCED$4=8!==$parseInt$1(whitespaces$2+"08")||22!==$parseInt$1(whitespaces$2+"0x16")||ITERATOR$3&&!fails$b((function(){$parseInt$1(Object(ITERATOR$3))})),numberParseInt=FORCED$4?function(e,t){var r=trim$8(toString$6(e));return $parseInt$1(r,t>>>0||(exec$2(hex,r)?16:10))}:$parseInt$1,$$H=_export,$parseInt=numberParseInt;$$H({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var path$8=path$t,_parseInt$6=path$8.parseInt,parent$Y=_parseInt$6,_parseInt$5=parent$Y,parent$X=_parseInt$5,_parseInt$4=parent$X,parent$W=_parseInt$4,_parseInt$3=parent$W,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$G=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("map");$$G({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$c=entryVirtual$m,map$c=entryVirtual$c("Array").map,isPrototypeOf$b=objectIsPrototypeOf,method$a=map$c,ArrayPrototype$9=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$9||isPrototypeOf$b(ArrayPrototype$9,e)&&t===ArrayPrototype$9.map?method$a:t},parent$V=map$b,map$a=parent$V,parent$U=map$a,map$9=parent$U,parent$T=map$9,map$8=parent$T,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),DESCRIPTORS$5=descriptors$2,uncurryThis$9=functionUncurryThis,call$6=functionCall,fails$a=fails$z,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$4=toObject$e,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$2=Object.defineProperty,concat2=uncurryThis$9([].concat),objectAssign=!$assign||fails$a((function(){if(DESCRIPTORS$5&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$4(e),n=arguments.length,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;n>o;)for(var s,l=IndexedObject$1(arguments[o++]),c=i?concat2(objectKeys(l),i(l)):objectKeys(l),u=c.length,p=0;u>p;)s=c[p++],DESCRIPTORS$5&&!call$6(a,l,s)||(r[s]=l[s]);return r}:$assign,$$F=_export,assign$7=objectAssign;$$F({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$7=path$t,assign$6=path$7.Object.assign,parent$S=assign$6,assign$5=parent$S,parent$R=assign$5,assign$4=parent$R,parent$Q=assign$4,assign$3=parent$Q,assign$2=assign$3,assign$1=assign$2,_Object$assign=getDefaultExportFromCjs(assign$1);function ownKeys2(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys2(Object(o),!0)).call(r,(function(t){_defineProperty$1(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys2(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _typeof$1(e){return(_typeof$1="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$1(n.key),n)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,r){return(t=_toPropertyKey$1(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){var e;"undefined"!=typeof Reflect&&_Reflect$get?_get=_bindInstanceProperty(e=_Reflect$get).call(e):_get=function(e,t,r){var n=_superPropBase(e,t);if(n){var o=_Object$getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get.apply(this,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(_Array$isArray(e))return _arrayLikeToArray$1(e)}function _iterableToArray(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$1(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){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 _toPrimitive$1(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+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 n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}_Object$create&&(n.prototype=_Object$create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?_sliceInstanceProperty(n).call(n,1):n);return _Object$getOwnPropertySymbols?_concatInstanceProperty(o).call(o,_Object$getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,i),!0;case 6:return u.fn.call(u.context,t,n,o,i,a),!0}for(c=1,l=new Array(p-1);c<p;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,$=u.length;for(c=0;c<$;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),p){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(f=1,l=new Array(p-1);f<p;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports,$$E=_export,$some=arrayIteration.some,arrayMethodIsStrict$4=arrayMethodIsStrict$7,STRICT_METHOD$3=arrayMethodIsStrict$4("some");$$E({target:"Array",proto:!0,forced:!STRICT_METHOD$3},{some:function(e){return $some(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$b=entryVirtual$m,some$6=entryVirtual$b("Array").some,isPrototypeOf$a=objectIsPrototypeOf,method$9=some$6,ArrayPrototype$8=Array.prototype,some$5=function(e){var t=e.some;return e===ArrayPrototype$8||isPrototypeOf$a(ArrayPrototype$8,e)&&t===ArrayPrototype$8.some?method$9:t},parent$P=some$5,some$4=parent$P,parent$O=some$4,some$3=parent$O,parent$N=some$3,some$2=parent$N,some$1=some$2,some2=some$1,_someInstanceProperty=getDefaultExportFromCjs(some2),toIntegerOrInfinity$1=toIntegerOrInfinity$6,toString$5=toString$e,requireObjectCoercible$2=requireObjectCoercible$7,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$5(requireObjectCoercible$2(this)),r="",n=toIntegerOrInfinity$1(e);if(n<0||n==1/0)throw $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$8=functionUncurryThis,toLength=toLength$2,toString$4=toString$e,$repeat=stringRepeat,requireObjectCoercible$1=requireObjectCoercible$7,repeat2=uncurryThis$8($repeat),stringSlice$2=uncurryThis$8("".slice),ceil=Math.ceil,createMethod$1=function(e){return function(t,r,n){var o,i,a=toString$4(requireObjectCoercible$1(t)),s=toLength(r),l=a.length,c=void 0===n?" ":toString$4(n);return s<=l||""==c?a:((i=repeat2(c,ceil((o=s-l)/c.length))).length>o&&(i=stringSlice$2(i,0,o)),e?a+i:i+a)}},stringPad={start:createMethod$1(!1),end:createMethod$1(!0)},userAgent$2=engineUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$2),$$D=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$D({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$m,padStart$6=entryVirtual$a("String").padStart,isPrototypeOf$9=objectIsPrototypeOf,method$8=padStart$6,StringPrototype$2=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$9(StringPrototype$2,e)&&t===StringPrototype$2.padStart?method$8:t},parent$M=padStart$5,padStart$4=parent$M,parent$L=padStart$4,padStart$3=parent$L,parent$K=padStart$3,padStart$2=parent$K,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2),engineIsBun="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,global$7=global$r,apply$1=functionApply,isCallable$5=isCallable$q,ENGINE_IS_BUN=engineIsBun,USER_AGENT=engineUserAgent,arraySlice$3=arraySlice$7,validateArgumentsLength$3=validateArgumentsLength$5,Function$1=global$7.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var e=global$7.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),schedulersFix$2=function(e,t){var r=t?2:1;return WRAP?function(n,o){var i=validateArgumentsLength$3(arguments.length,1)>r,a=isCallable$5(n)?n:Function$1(n),s=i?arraySlice$3(arguments,r):[],l=i?function(){apply$1(a,this,s)}:a;return t?e(l,o):e(l)}:e},$$C=_export,global$6=global$r,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(global$6.setInterval,!0);$$C({global:!0,bind:!0,forced:global$6.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$B=_export,global$5=global$r,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(global$5.setTimeout,!0);$$B({global:!0,bind:!0,forced:global$5.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$6=path$t,setInterval$4=path$6.setInterval,parent$J=setInterval$4,setInterval$3=parent$J,parent$I=setInterval$3,setInterval$2=parent$I,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),path$5=path$t,setTimeout$5=path$5.setTimeout,parent$H=setTimeout$5,setTimeout$4=parent$H,parent$G=setTimeout$4,setTimeout$3=parent$G,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),$$A=_export,$every=arrayIteration.every,arrayMethodIsStrict$3=arrayMethodIsStrict$7,STRICT_METHOD$2=arrayMethodIsStrict$3("every");$$A({target:"Array",proto:!0,forced:!STRICT_METHOD$2},{every:function(e){return $every(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$9=entryVirtual$m,every$6=entryVirtual$9("Array").every,isPrototypeOf$8=objectIsPrototypeOf,method$7=every$6,ArrayPrototype$7=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$7||isPrototypeOf$8(ArrayPrototype$7,e)&&t===ArrayPrototype$7.every?method$7:t},parent$F=every$5,every$4=parent$F,parent$E=every$4,every$3=parent$E,parent$D=every$3,every$2=parent$D,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),global$4=global$r,fails$9=fails$z,uncurryThis$7=functionUncurryThis,toString$3=toString$e,trim$7=stringTrim.trim,whitespaces$1=whitespaces$4,charAt$2=uncurryThis$7("".charAt),$parseFloat$1=global$4.parseFloat,Symbol$1=global$4.Symbol,ITERATOR$2=Symbol$1&&Symbol$1.iterator,FORCED$3=1/$parseFloat$1(whitespaces$1+"-0")!=-1/0||ITERATOR$2&&!fails$9((function(){$parseFloat$1(Object(ITERATOR$2))})),numberParseFloat=FORCED$3?function(e){var t=trim$7(toString$3(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt$2(t,0)?-0:r}:$parseFloat$1,$$z=_export,$parseFloat=numberParseFloat;$$z({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var path$4=path$t,_parseFloat$6=path$4.parseFloat,parent$C=_parseFloat$6,_parseFloat$5=parent$C,parent$B=_parseFloat$5,_parseFloat$4=parent$B,parent$A=_parseFloat$4,_parseFloat$3=parent$A,_parseFloat$2=_parseFloat$3,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME=functionName.PROPER,fails$8=fails$z,whitespaces=whitespaces$4,non="​…᠎",stringTrimForced=function(e){return fails$8((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e}))},$$y=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$y({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var entryVirtual$8=entryVirtual$m,trim$6=entryVirtual$8("String").trim,isPrototypeOf$7=objectIsPrototypeOf,method$6=trim$6,StringPrototype$1=String.prototype,trim$5=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$7(StringPrototype$1,e)&&t===StringPrototype$1.trim?method$6:t},parent$z=trim$5,trim$4=parent$z,parent$y=trim$4,trim$3=parent$y,parent$x=trim$3,trim$2=parent$x,trim$1=trim$2,trim2=trim$1,_trimInstanceProperty=getDefaultExportFromCjs(trim2),arraySlice$2=arraySliceSimple,floor$3=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$3(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,n),t),mergeSort(arraySlice$2(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},arraySort$1=mergeSort,userAgent$1=engineUserAgent,firefox=userAgent$1.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent=engineUserAgent,webkit=userAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$x=_export,uncurryThis$6=functionUncurryThis,aCallable$7=aCallable$j,toObject$3=toObject$e,lengthOfArrayLike$4=lengthOfArrayLike$d,deletePropertyOrThrow$1=deletePropertyOrThrow$3,toString$2=toString$e,fails$7=fails$z,internalSort=arraySort$1,arrayMethodIsStrict$2=arrayMethodIsStrict$7,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],nativeSort=uncurryThis$6(test.sort),push$5=uncurryThis$6(test.push),FAILS_ON_UNDEFINED=fails$7((function(){test.sort(void 0)})),FAILS_ON_NULL=fails$7((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict$2("sort"),STABLE_SORT=!fails$7((function(){if(V8)return V8<70;if(!(FF&&FF>3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var e,t,r,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)test.push({k:t+n,v:r})}for(test.sort((function(e,t){return t.v-e.v})),n=0;n<test.length;n++)t=test[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$2=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$2(t)>toString$2(r)?1:-1}};$$x({target:"Array",proto:!0,forced:FORCED$2},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$3(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);var r,n,o=[],i=lengthOfArrayLike$4(t);for(n=0;n<i;n++)n in t&&push$5(o,t[n]);for(internalSort(o,getSortCompare(e)),r=lengthOfArrayLike$4(o),n=0;n<r;)t[n]=o[n++];for(;n<i;)deletePropertyOrThrow$1(t,n++);return t}});var _context,entryVirtual$7=entryVirtual$m,sort$6=entryVirtual$7("Array").sort,isPrototypeOf$6=objectIsPrototypeOf,method$5=sort$6,ArrayPrototype$6=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$6||isPrototypeOf$6(ArrayPrototype$6,e)&&t===ArrayPrototype$6.sort?method$5:t},parent$w=sort$5,sort$4=parent$w,parent$v=sort$4,sort$3=parent$v,parent$u=sort$3,sort$2=parent$u,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),XG_DEBUG_OPEN="undefined"!=typeof window&&window.location&&_indexOfInstanceProperty(_context=window.location.href).call(_context,"xgplayerdebugger=1")>-1,STYLE={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},XGTAG="%c[xgplayer]",XG_DEBUG={config:{debug:XG_DEBUG_OPEN?3:0},logInfo:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this.config.debug>=3&&(r=console).log.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.info,e]).call(t,o))},logWarn:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this.config.debug>=1&&(r=console).warn.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.warn,e]).call(t,o))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(r=console)[n].apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.error,e]).call(t,i))}}},XgplayerTimeRange=function(){function e(t){_classCallCheck$1(this,e),this.bufferedList=t}return _createClass$1(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}(),util$3={};function checkIsIn(e,t){for(var r=0,n=t.length;r<n;r++)if(_indexOfInstanceProperty(e).call(e,t[r])>-1)return!0;return!1}util$3.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=o,i.innerHTML=r,_forEachInstanceProperty(e=_Object$keys(n)).call(e,(function(e){var r=e,o=n[e];"video"===t||"audio"===t||"live-video"===t?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},util$3.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var o=n.children;if(n=null,o.length>0){var i;if(o=o[0],r&&util$3.addClass(o,r),t)_forEachInstanceProperty(i=_Object$keys(t)).call(i,(function(e){o.setAttribute(e,t[e])}));return o}return null}catch(e){return XG_DEBUG.logError("util.createDomFromHtml",e),null}},util$3.hasClass=function(e,t){if(!e||!t)return!1;try{return _someInstanceProperty(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===_typeof$1(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util$3.addClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(r){util$3.hasClass(e,t)||(e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util$3.removeClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(r){var n;if(util$3.hasClass(e,t))_forEachInstanceProperty(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util$3.toggleClass=function(e,t){var r;e&&_forEachInstanceProperty(r=t.split(/\s+/g)).call(r,(function(t){util$3.hasClass(e,t)?util$3.removeClass(e,t):util$3.addClass(e,t)}))},util$3.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util$3.typeOf(e[r]))t.push(e[r]);else if("Object"===util$3.typeOf(e[r])){var n;_mapInstanceProperty(n=_Object$keys(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},util$3.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){XG_DEBUG.logError("util.findDom",n),0===_indexOfInstanceProperty(r).call(r,"#")&&(e=t.getElementById(_sliceInstanceProperty(r).call(r,1)))}return e},util$3.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util$3.padStart=function(e,t,r){for(var n=String(r),o=t>>0,i=Math.ceil(o/n.length),a=[],s=String(e);i--;)a.push(n);return a.join("").substring(0,o-s.length)+s},util$3.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util$3).call(util$3,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util$3).call(util$3,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util$3).call(util$3,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util$3.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},util$3.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util$3.deepCopy=function(e,t){var r;if("Object"===util$3.typeOf(t)&&"Object"===util$3.typeOf(e))return _forEachInstanceProperty(r=_Object$keys(t)).call(r,(function(r){if("Object"!==util$3.typeOf(t[r])||t[r]instanceof Node)if("Array"===util$3.typeOf(t[r])){var n;e[r]="Array"===util$3.typeOf(e[r])?_concatInstanceProperty(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:util$3.deepCopy(e[r],t[r])})),e},util$3.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util$3.typeOf(t[r])&&"Array"===util$3.typeOf(e[r])?"Array"===util$3.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray(t[r])):util$3.typeOf(e[r])!==util$3.typeOf(t[r])||null===e[r]||"Object"!==util$3.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util$3.deepMerge(e[r],t[r])})),e},util$3.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},util$3.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return _forEachInstanceProperty(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},util$3.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=_setInterval(_bindInstanceProperty(r).call(r,e),n))},util$3.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util$3.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=_setTimeout((function(){t(),util$3.clearTimeout(e,n)}),r);return e._timers.push(n),n},util$3.clearTimeout=function(e,t){var r=e._timers;if("Array"===util$3.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){_spliceInstanceProperty(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},util$3.clearAllTimers=function(e){var t=e._timers;"Array"===util$3.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util$3.createImgBtn=function(e,t,r,n){var o,i,a,s,l,c,u,p,f,$,y,h,d=util$3.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(d.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(_everyInstanceProperty(o=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(o,(function(e){var t,o;return!(_indexOfInstanceProperty(r).call(r,e)>-1&&_indexOfInstanceProperty(n).call(n,e)>-1)||(u=_parseFloat$1(_trimInstanceProperty(t=_sliceInstanceProperty(r).call(r,0,_indexOfInstanceProperty(r).call(r,e))).call(t)),p=_parseFloat$1(_trimInstanceProperty(o=_sliceInstanceProperty(n).call(n,0,_indexOfInstanceProperty(n).call(n,e))).call(o)),f=e,!1)})),d.style.width=_concatInstanceProperty(i="".concat(u)).call(i,f),d.style.height=_concatInstanceProperty(a="".concat(p)).call(a,f),d.style.backgroundSize=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="".concat(u)).call(c,f," ")).call(l,p)).call(s,f),d.style.margin="start"===e?_concatInstanceProperty($=_concatInstanceProperty(y=_concatInstanceProperty(h="-".concat(p/2)).call(h,f," auto auto -")).call(y,u/2)).call($,f):"auto 5px auto 5px");return d},util$3.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var o="#";e.replace(/[0-9A-F]/gi,(function(e){o+=e+e})),e=o}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(_parseInt$1(e,16))})),_concatInstanceProperty(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},util$3.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util$3.checkIsFunction=function(e){return e&&"function"==typeof e},util$3.checkIsObject=function(e){return null!==e&&"object"===_typeof$1(e)},util$3.hide=function(e){e.style.display="none"},util$3.show=function(e,t){e.style.display=t||"block"},util$3.isUndefined=function(e){if(null==e)return!0},util$3.isNotNull=function(e){return!(null==e)},util$3.setStyleFromCsstext=function(e,t){if(t)if("String"===util$3.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");_mapInstanceProperty(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(r){e.style[r]=t[r]}))}},util$3.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var o=n.replace(/\s+/g,"").split(";"),i={},a={};return _mapInstanceProperty(o).call(o,(function(e){if(e){var t=e.split(":");t.length>1&&(checkIsIn(t[0],r)?i[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),_mapInstanceProperty(t=_Object$keys(a)).call(t,(function(t){e.style[t]=a[t]})),i},util$3.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return _mapInstanceProperty(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},util$3.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},util$3.stopPropagation=function(e){e&&e.stopPropagation()},util$3.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util$3.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util$3.checkTouchSupport=function(){return"ontouchstart"in window},util$3.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});_sortInstanceProperty(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var o=[];if(t)for(var i=0;i<r.length;i++){var a=o.length;if(a){var s=o[a-1].end;r[i].start-s<t?r[i].end>s&&(o[a-1].end=r[i].end):o.push(r[i])}else o.push(r[i])}else o=r;return new XgplayerTimeRange(o)},util$3.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}},util$3.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util$3.getHostFromUrl=function(e){if("String"!==util$3.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util$3.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util$3.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util$3.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},util$3.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=_parseInt$1(e)}catch(t){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=_parseInt$1(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},util$3.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util$3.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util$3.createPositionBar=function(e,t){var r=util$3.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util$3.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:_concatInstanceProperty(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},o=_Object$keys(n);return _forEachInstanceProperty(o).call(o,(function(e){var t,o=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),i=_concatInstanceProperty(t="".concat(e,"(")).call(t,n[e],")");o.test(r)?(o.lastIndex=-1,r=r.replace(o,i)):r+="".concat(i," ")})),r},util$3.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},util$3.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var o=1;o<r;o++)if(e>t[o-1].end&&e<=t[o].end){n=o;break}return n},util$3.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:util$3.getIndexByTime(e,t))<0)return-1;var o=t.length,i=t[n],a=i.start,s=i.end,l=i.cTime,c=i.offset;return e<a?l:e>=a&&e<=s?e-c:e>s&&n>=o-1?s:-1},util$3.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var o=t[r].start;return r-1<0?o+e:o+(e-t[r-1].duration)}return e};var VERSION_REG={android:/(Android)\s([\d.]+)/,ios:/(Version)\/([\d.]+)/},H264_MIMETYPES=["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"],sniffer={get device(){return sniffer.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var r=navigator.userAgent.toLowerCase(),n={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return _concatInstanceProperty(e=[]).call(e,_filterInstanceProperty(t=_Object$keys(n)).call(t,(function(e){return n[e].test(r)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),i=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=i||n&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:i,isIos:s||i,isAndroid:n,isPc:!(s||n||r||a),isSymbian:r,isWindowsPhone:t,isFireFox:o}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",r=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?VERSION_REG.ios:VERSION_REG.android)?t.exec(e):[];if(r&&r.length>=3){var n=r[2].split(".");return n.length>0?_parseInt$1(n[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&&_mapInstanceProperty(H264_MIMETYPES).call(H264_MIMETYPES,(function(r){"probably"===t.canPlayType('video/mp4; codecs="'.concat(r,'"'))&&(e.isSupport=!0,e.mime+="||".concat(r))})),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(t){return this._logger.error(e,t),!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 _Promise.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var r=e.video||{},n=e.audio||{};try{var o=MediaSource.isTypeSupported(r.contentType),i=MediaSource.isTypeSupported(n.contentType);return _Promise.resolve({supported:o&&i,smooth:!1,powerEfficient:!1})}catch(e){return _Promise.resolve(t)}}},PLAY="play",ENDED="ended",PAUSE="pause",ERROR="error",SEEKED="seeked",TIME_UPDATE="timeupdate",DURATION_CHANGE="durationchange",VOLUME_CHANGE="volumechange",LOADED_DATA="loadeddata",PROGRESS="progress",EMPTIED="emptied",AUTOPLAY_STARTED="autoplay_started",FULLSCREEN_CHANGE="fullscreen_change",CSS_FULLSCREEN_CHANGE="cssFullscreen_change",VIDEO_RESIZE="video_resize";function callHandler(e,t,r){for(var n,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];var s,l=t.call.apply(t,_concatInstanceProperty(n=[e]).call(n,i));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r.call.apply(r,_concatInstanceProperty(t=[e]).call(t,o))})):r.call.apply(r,_concatInstanceProperty(s=[e]).call(s,i)))}function hook(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),_bindInstanceProperty(r=function(){var r,o=arguments,i=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,_concatInstanceProperty(a=[this]).call(a,_sliceInstanceProperty(Array.prototype).call(arguments)))}catch(t){var l,c;throw t.message=_concatInstanceProperty(l=_concatInstanceProperty(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(l,t.message),t}if(this.__hooks&&this.__hooks[e])try{var u,p=runHooks(this,e,t);if(p)if(p.then)p.then((function(e){var r;!1!==e&&callHandler.apply(void 0,_concatInstanceProperty(r=[i,t,n.next]).call(r,_toConsumableArray(o)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty(u=[this,t,n.next]).call(u,_sliceInstanceProperty(Array.prototype).call(arguments)));else if(void 0===p){var f;callHandler.apply(void 0,_concatInstanceProperty(f=[this,t,n.next]).call(f,_sliceInstanceProperty(Array.prototype).call(arguments)))}}catch(t){var $,y;throw t.message=_concatInstanceProperty($=_concatInstanceProperty(y="[pluginName: ".concat(this.pluginName,":")).call(y,e,"] >> ")).call($,t.message),t}else callHandler.apply(void 0,_concatInstanceProperty(r=[this,t,n.next]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}).call(r,this)}function findHookIndex(e,t){var r=this.__hooks;if(!r||!_Array$isArray(r[e]))return-1;for(var n=r[e],o=0;o<n.length;o++)if(n[o]===t)return o;return-1}function useHooks(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(_Array$isArray(r[e])||(r[e]=[]),-1===findHookIndex.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function removeHooks(e,t){var r=this.__hooks;if(r){if(_Array$isArray(r[e])){var n=r[e],o=findHookIndex.call(this,e,t);-1!==o&&_spliceInstanceProperty(n).call(n,o,1)}delete r[e]}}function hooksDescriptor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&_mapInstanceProperty(t).call(t,(function(t){e.__hooks[t]=null})),_Object$defineProperty(e,"hooks",{get:function(){var t;return e.__hooks&&_mapInstanceProperty(t=_Object$keys(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function delHooksDescriptor(e){e.__hooks=null}function runHooks(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];if(e.__hooks&&_Array$isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,r,n){for(var o,i,a=arguments.length,c=new Array(a>3?a-3:0),u=3;u<a;u++)c[u-3]=arguments[u];if(l++,0===s.length||l===s.length)return n.call.apply(n,_concatInstanceProperty(i=[t,t]).call(i,c));var p,f=s[l],$=f.call.apply(f,_concatInstanceProperty(o=[t,t]).call(o,c));return $&&$.then?$.then((function(o){var i;return!1===o?null:e.apply(void 0,_concatInstanceProperty(i=[t,r,n]).call(i,c))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==$?e.apply(void 0,_concatInstanceProperty(p=[t,r,n]).call(p,c)):void 0}.apply(void 0,_concatInstanceProperty(a=[e,t,r]).call(a,o))}var c;return r.call.apply(r,_concatInstanceProperty(c=[e,e]).call(c,o))}function showErrorMsg(e,t){var r;XG_DEBUG.logError(_concatInstanceProperty(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var BasePlugin=function(){function e(t){_classCallCheck$1(this,e),util$3.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),hooksDescriptor(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return _createClass$1(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=util$3.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 r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):showErrorMsg(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):showErrorMsg(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):showErrorMsg(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;_forEachInstanceProperty(e=["__events","__onceEvents"]).call(e,(function(e){var r;_forEachInstanceProperty(r=_Object$keys(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];(r=this.player).emit.apply(r,_concatInstanceProperty(t=[e]).call(t,o))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=_objectSpread2(_objectSpread2({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return useHooks.call.apply(useHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return removeHooks.call.apply(removeHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{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]:"";if(this.player)return r&&(t.pluginName=r),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,r=this.player,n=this.pluginName;this.offAll(),util$3.clearAllTimers(this),util$3.checkIsFunction(this.destroy)&&this.destroy(),_mapInstanceProperty(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),delHooksDescriptor(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&_Object$defineProperty(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&_Object$defineProperty(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),DOCUMENT_NODE_TYPE=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}function closest$1(e,t){for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var closest_1=closest$1,closest=closest_1;function _delegate(e,t,r,n,o){var i=listener.apply(this,arguments);return e.addEventListener(r,i,o),{destroy:function(){e.removeEventListener(r,i,o)}}}function delegate(e,t,r,n,o){return"function"==typeof e.addEventListener?_delegate.apply(null,arguments):"function"==typeof r?_bindInstanceProperty(_delegate).call(_delegate,null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),_mapInstanceProperty(Array.prototype).call(e,(function(e){return _delegate(e,t,r,n,o)})))}function listener(e,t,r,n){return function(r){r.delegateTarget=closest(r.target,t),r.delegateTarget&&n.call(e,r)}}var delegate_1=delegate,_delegate$1=getDefaultExportFromCjs(delegate_1),ROOT_TYPES={CONTROLS:"controls",ROOT:"root"},POSITIONS={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"},PLUGIN_STATE_CLASS={ICON_DISABLE:"xg-icon-disable",ICON_HIDE:"xg-icon-hide"};function isUrl(e){return!!e&&(_indexOfInstanceProperty(e)&&/^(?:http|data:|\/)/.test(e))}function mergeIconClass(e,t){var r;return"object"===_typeof$1(e)&&e.class&&"string"==typeof e.class?_concatInstanceProperty(r="".concat(t," ")).call(r,e.class):t}function mergeIconAttr(e,t){var r;"object"===_typeof$1(e)&&e.attr&&"object"===_typeof$1(e.attr)&&_mapInstanceProperty(r=_Object$keys(e.attr)).call(r,(function(r){t[r]=e.attr[r]}));return t}function createIcon(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=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 util$3.addClass(e,o),_mapInstanceProperty(n=_Object$keys(i)).call(n,(function(t){e.setAttribute(t,i[t])})),e;if(isUrl(e)||isUrl(e.url))return i.src=isUrl(e)?e:e.url||"",s=util$3.createDom(e.tag||"img","",i,"xg-img ".concat(o));if("function"==typeof e)try{var l,c;return(s=e())instanceof window.Element?(util$3.addClass(s,o),_mapInstanceProperty(l=_Object$keys(i)).call(l,(function(e){s.setAttribute(e,i[e])})),s):(XG_DEBUG.logWarn(_concatInstanceProperty(c="warn>>icons.".concat(t," in config of plugin named [")).call(c,a,"] is a function mast return an Element Object")),null)}catch(e){return XG_DEBUG.logError("Plugin named [".concat(a,"]:createIcon"),e),null}return"string"==typeof e?util$3.createDomFromHtml(e,i,o):(XG_DEBUG.logWarn(_concatInstanceProperty(r="warn>>icons.".concat(t," in config of plugin named [")).call(r,a,"] is invalid")),null)}function registerIconsObj(e,t){var r,n=t.config.icons||t.playerConfig.icons;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){var o=e[r],i=o&&o.class?o.class:"",a=o&&o.attr?o.attr:{},s=null;n&&n[r]&&(i=mergeIconClass(n[r],i),a=mergeIconAttr(n[r],a),s=createIcon(n[r],r,i,a,t.pluginName)),!s&&o&&(s=createIcon(o.icon?o.icon:o,a,i,{},t.pluginName)),t.icons[r]=s}))}function registerTextObj(e,t){var r;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){_Object$defineProperty(t.langText,r,{get:function(){var n=t.lang,o=t.i18n;return o[r]?o[r]:e[r]&&e[r][n]||""}})}))}var Plugin=function(e){_inherits(r,BasePlugin);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,r),(e=t.call(this,n)).__delegates=[],e}return _createClass$1(r,[{key:"__init",value:function(e){if(_get(_getPrototypeOf(r.prototype),"__init",this).call(this,e),e.root){var t=e.root,n=null;this.icons={},this.root=null,this.parent=null,registerIconsObj(this.registerIcons()||{},this),this.langText={},registerTextObj(this.registerLanguageTexts()||{},this);var o="";try{o=this.render()}catch(e){var i;throw XG_DEBUG.logError("Plugin:".concat(this.pluginName,":render"),e),new Error(_concatInstanceProperty(i="Plugin:".concat(this.pluginName,":render:")).call(i,e.message))}if(o)(n=r.insert(o,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(n=util$3.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(n)}this.root=n,this.parent=t;var a=this.config.attr||{},s=this.config.style||{};this.setAttr(a),this.setStyle(s),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,r=this.children();if(r&&"object"===_typeof$1(r))if(_Object$keys(r).length>0)_mapInstanceProperty(t=_Object$keys(r)).call(t,(function(t){var n,o,i=t,a=r[i],s={root:e.root};"function"==typeof a?(n=e.config[i]||{},o=a):"object"===_typeof$1(a)&&"function"==typeof a.plugin&&(n=a.options?util$3.deepCopy(e.config[i]||{},a.options):e.config[i]||{},o=a.plugin),s.config=n,void 0!==n.index&&(s.index=n.index),n.root&&(s.root=n.root),e.registerPlugin(o,s,i)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,r=this.i18n,n=this.langText;t&&function e(t,r){for(var n=0;n<t.children.length;n++)t.children[n].children.length>0?e(t.children[n],r):r(t.children[n])}(t,(function(t){var o=t.getAttribute&&t.getAttribute("lang-key");if(o){var i=r[o.toUpperCase()]||n[o];i&&(t.innerHTML="function"==typeof i?i(e):i)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.i18n||{},n=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var o=r[t]||n[t]||"";o&&(e.innerHTML=o)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,util$3.addClass(_findInstanceProperty(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"enable",value:function(){this.config.disable=!1,util$3.removeClass(_findInstanceProperty(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"children",value:function(){return{}}},{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]:"";t.root=t.root||this.root;var o=_get(_getPrototypeOf(r.prototype),"registerPlugin",this).call(this,e,t,n);return this._children.push(o),o}},{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,n){var o=this;if(arguments.length<3&&"function"==typeof t)_Array$isArray(e)?_forEachInstanceProperty(e).call(e,(function(e){o.bindEL(e,t)})):this.bindEL(e,t);else{var i,a=r.delegate.call(this,this.root,e,t,n);this.__delegates=_concatInstanceProperty(i=this.__delegates).call(i,a)}}},{key:"unbind",value:function(e,t){var r=this;if(arguments.length<3&&"function"==typeof t)_Array$isArray(e)?_forEachInstanceProperty(e).call(e,(function(e){r.unbindEL(e,t)})):this.unbindEL(e,t);else for(var n,o=_concatInstanceProperty(n="".concat(e,"_")).call(n,t),i=0;i<this.__delegates.length;i++)if(this.__delegates[i].key===o){var a;this.__delegates[i].destroy(),_spliceInstanceProperty(a=this.__delegates).call(a,i,1);break}}},{key:"setStyle",value:function(e,t){var r,n=this;if(this.root)return"String"===util$3.typeOf(e)?this.root.style[e]=t:void("Object"===util$3.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var r,n=this;if(this.root)return"String"===util$3.typeOf(e)?this.root.setAttribute(e,t):void("Object"===util$3.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.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 r=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,r)}},{key:"unbindEL",value:function(e,t){var r=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,r)}},{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?_findInstanceProperty(this).call(this,e).appendChild(t):e.appendChild(t)}catch(e){return XG_DEBUG.logError("Plugin:appendChild",e),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,n,o=this,i=this.player;(_mapInstanceProperty(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(_mapInstanceProperty(n=this._children).call(n,(function(e){i.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),_get(_getPrototypeOf(r.prototype),"__destroy",this).call(this),this.icons={},_mapInstanceProperty(t=["root","parent"]).call(t,(function(e){o[e]=null}))}}],[{key:"insert",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.children.length,o=Number(r),i=e instanceof window.Node;if(n){for(var a=0,s=null,l="";a<n;a++){s=t.children[a];var c=Number(s.getAttribute("data-index"));if(c>=o){l="beforebegin";break}c<o&&(l="afterend")}return i?"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 i?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=[];if(e instanceof window.Node&&"function"==typeof n)if(_Array$isArray(r))_forEachInstanceProperty(r).call(r,(function(r){var a,s=_delegate$1(e,t,r,n,o);s.key=_concatInstanceProperty(a="".concat(t,"_")).call(a,r),i.push(s)}));else{var a,s=_delegate$1(e,t,r,n,o);s.key=_concatInstanceProperty(a="".concat(t,"_")).call(a,r),i.push(s)}return i}},{key:"ROOT_TYPES",get:function(){return ROOT_TYPES}},{key:"POSITIONS",get:function(){return POSITIONS}}]),r}(),STATE_CLASS={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"},STATES={INITIAL:1,READY:2,ATTACHING:3,ATTACHED:4,NOTALLOW:5,RUNNING:6,ENDED:7,DESTROYED:8};function PlaySvg(){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 PauseSvg(){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 xgIconTips(e,t,r){try{var n,o;return _concatInstanceProperty(n=_concatInstanceProperty(o=' <div class="xg-tips '.concat(r?"hide":" ",'" lang-key="')).call(o,e.i18nKeys[t],'">\n ')).call(n,e.i18n[t],"\n </div>")}catch(e){return'<div class="xg-tips hide"></div>'}}var $$w=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),$$w({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$6=entryVirtual$m,findIndex$6=entryVirtual$6("Array").findIndex,isPrototypeOf$5=objectIsPrototypeOf,method$4=findIndex$6,ArrayPrototype$5=Array.prototype,findIndex$5=function(e){var t=e.findIndex;return e===ArrayPrototype$5||isPrototypeOf$5(ArrayPrototype$5,e)&&t===ArrayPrototype$5.findIndex?method$4:t},parent$t=findIndex$5,findIndex$4=parent$t,parent$s=findIndex$4,findIndex$3=parent$s,parent$r=findIndex$3,findIndex$2=parent$r,findIndex$1=findIndex$2,findIndex2=findIndex$1,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex2),TPL=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],InnerList=function(){function e(t){_classCallCheck$1(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 _createClass$1(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var r=0,n=this.fragments;this.fragments=_mapInstanceProperty(n).call(n,(function(e){return e.start=_parseInt$1(r,10),e.end=_parseInt$1(r+e.percent*t.duration,10),e.duration=_parseInt$1(e.percent*t.duration,10),r+=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},r=this.progressList,n=this.fragments;if(!(r.length<1)){var o=t.newIndex,i=t.curIndex,a=t.millisecond;o!==i&&_mapInstanceProperty(r).call(r,(function(t,r){r<o?t[e].style.width="100%":r>o&&(t[e].style.width=0)}));var s=n[o],l=0===a?0:(a-s.start)/s.duration;r[o][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=_findIndexInstanceProperty(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 r={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(r)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var n={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(n),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||_parseInt$1(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(_parseInt$1(1e3*t,10))}var r=this.playedIndex,n=this.cachedIndex;if("Undefined"!==util$3.typeOf(e.played)){var o=_findIndexInstanceProperty(this).call(this,1e3*e.played,r);if(o<0)return;this.updateProgress("played",{newIndex:o,curIndex:r,millisecond:_parseInt$1(1e3*e.played,10)}),this.playedIndex=o}if("Undefined"!==util$3.typeOf(e.cached)){var i=_findIndexInstanceProperty(this).call(this,1e3*e.cached,n);if(i<0)return;this.updateProgress("cached",{newIndex:i,curIndex:n,millisecond:_parseInt$1(1e3*e.cached,10)}),this.cachedIndex=i}}},{key:"findIndex",value:function(e,t){var r=this.fragments;if(!r||0===r.length)return-1;if(1===r.length)return 0;if(t>-1&&t<r.length&&e>r[t].start&&e<r[t].end)return t;if(e>r[r.length-1].start)return r.length-1;for(var n=0;n<r.length;n++)if(e>r[n].start&&e<=r[n].end){t=n;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)if(util$3.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++)util$3.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return util$3.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,r=this;if(_forEachInstanceProperty(t=_Object$keys(this.fragConfig)).call(t,(function(t){void 0!==e[t]&&(r.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 n=this.root.children;n.length>0;)this.root.removeChild(n[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=util$3.createDom("xg-inners","",{},"progress-list")),this.fragments){var r,n=this.fragConfig,o=n.fragClass,i=n.fragFocusClass;this.progressList=_mapInstanceProperty(r=this.fragments).call(r,(function(r){var n,a,s=util$3.createDom("xg-inner","",{style:t?_concatInstanceProperty(n="background:".concat(t,"; flex: ")).call(n,r.percent):"flex: ".concat(r.percent)},_concatInstanceProperty(a="".concat(r.isFocus?i:""," xgplayer-progress-inner ")).call(a,o));return e.root.appendChild(s),_forEachInstanceProperty(TPL).call(TPL,(function(t){s.appendChild(util$3.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}(),FRAGMENT_FOCUS_CLASS={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},Progress=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"onMoveOnly",(function(e,t){var r=_assertThisInitialized(n),o=r.pos,i=r.config,a=r.player,s=t;if(e){util$3.event(e);var l=util$3.getEventPos(e,a.zoom),c=90===a.rotateDeg?l.clientY:l.clientX;if(o.moving&&Math.abs(o.x-c)<i.miniMoveStep)return;o.moving=!0,o.x=c,s=n.computeTime(e,c)}n.triggerCallbacks("dragmove",s,e),n._updateInnerFocus(s)})),_defineProperty$1(_assertThisInitialized(n),"onBodyClick",(function(e){n.pos.isLocked&&(n.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())})),_defineProperty$1(_assertThisInitialized(n),"_mouseDownHandler",(function(e,t){n._state.time=t.currentTime,n.updateWidth(t.currentTime,t.seekTime,t.percent,0),n._updateInnerFocus(t)})),_defineProperty$1(_assertThisInitialized(n),"_mouseUpHandler",(function(e,t){_assertThisInitialized(n).pos.moving&&n.updateWidth(t.currentTime,t.seekTime,t.percent,2)})),_defineProperty$1(_assertThisInitialized(n),"_mouseMoveHandler",(function(e,t){var r=_assertThisInitialized(n),o=r._state,i=r.pos,a=r.config,s=r.player;o.time<t.currentTime?t.forward=!0:t.forward=!1,o.time=t.currentTime,i.isDown&&!i.moving&&(i.moving=!0,a.isPauseMoving&&s.pause(),n.triggerCallbacks("dragstart",t,e),n.emitUserAction("drag","dragstart",t)),n.updateWidth(t.currentTime,t.seekTime,t.percent,1),n.triggerCallbacks("dragmove",t,e),n._updateInnerFocus(t)})),_defineProperty$1(_assertThisInitialized(n),"onMouseDown",(function(e){var t=_assertThisInitialized(n),r=t._state,o=t.player,i=t.pos,a=t.config,s=t.playerConfig,l=util$3.getEventPos(e,o.zoom),c=90===o.rotateDeg?l.clientY:l.clientX;if(!(o.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&o.ended)){if(o.duration||o.isPlaying){e.stopPropagation(),n.focus(),util$3.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),util$3.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),util$3.event(e),i.x=c,i.isDown=!0,i.moving=!1,r.prePlayTime=o.currentTime,o.focus({autoHide:!1}),n.isProgressMoving=!0,util$3.addClass(n.progressBtn,"active");var u=n.computeTime(e,c);return u.prePlayTime=r.prePlayTime,n._mouseDownHandlerHook(e,u),"touchstart"===e.type?(n.root.addEventListener("touchmove",n.onMouseMove),n.root.addEventListener("touchend",n.onMouseUp),n.root.addEventListener("touchcancel",n.onMouseUp)):(n.unbind("mousemove",n.onMoveOnly),document.addEventListener("mousemove",n.onMouseMove,!1),document.addEventListener("mouseup",n.onMouseUp,!1)),!0}o.play()}})),_defineProperty$1(_assertThisInitialized(n),"onMouseUp",(function(e){var t=_assertThisInitialized(n),r=t.player,o=t.config,i=t.pos,a=t.playerConfig,s=t._state;e.stopPropagation(),e.preventDefault(),util$3.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),util$3.checkIsFunction(o.onMoveEnd)&&o.onMoveEnd(),util$3.event(e),util$3.removeClass(n.progressBtn,"active");var l=n.computeTime(e,i.x);l.prePlayTime=s.prePlayTime,i.moving?(n.triggerCallbacks("dragend",l,e),n.emitUserAction("drag","dragend",l)):(n.triggerCallbacks("click",l,e),n.emitUserAction("click","click",l)),n._mouseUpHandlerHook(e,l),i.moving=!1,i.isDown=!1,i.x=0,i.y=0,i.isLocked=!0,s.prePlayTime=0,s.time=0;var c=e.type;"touchend"===c||"touchcancel"===c?(n.root.removeEventListener("touchmove",n.onMouseMove),n.root.removeEventListener("touchend",n.onMouseUp),n.root.removeEventListener("touchcancel",n.onMouseUp),n.blur()):(document.removeEventListener("mousemove",n.onMouseMove,!1),document.removeEventListener("mouseup",n.onMouseUp,!1),i.isEnter?"mobile"!==a.isMobileSimulateMode&&_bindInstanceProperty(n).call(n,"mousemove",n.onMoveOnly):n.onMouseLeave(e)),util$3.setTimeout(_assertThisInitialized(n),(function(){n.resetSeekState()}),1),r.focus()})),_defineProperty$1(_assertThisInitialized(n),"onMouseMove",(function(e){var t=_assertThisInitialized(n),r=t._state,o=t.pos,i=t.player,a=t.config;util$3.checkTouchSupport()&&e.preventDefault(),util$3.event(e);var s=util$3.getEventPos(e,i.zoom),l=90===i.rotateDeg?s.clientY:s.clientX,c=Math.abs(o.x-l);if(!(o.moving&&c<a.miniMoveStep||!o.moving&&c<a.miniStartStep)){o.x=l;var u=n.computeTime(e,l);u.prePlayTime=r.prePlayTime,n._mouseMoveHandlerHook(e,u)}})),_defineProperty$1(_assertThisInitialized(n),"onMouseOut",(function(e){n.triggerCallbacks("mouseout",null,e)})),_defineProperty$1(_assertThisInitialized(n),"onMouseOver",(function(e){n.triggerCallbacks("mouseover",null,e)})),_defineProperty$1(_assertThisInitialized(n),"onMouseEnter",(function(e){var t=_assertThisInitialized(n),r=t.player,o=t.pos;if(!(o.isDown||o.isEnter||r.isMini||!r.config.allowSeekAfterEnded&&r.ended)){o.isEnter=!0,_bindInstanceProperty(n).call(n,"mousemove",n.onMoveOnly),_bindInstanceProperty(n).call(n,"mouseleave",n.onMouseLeave),util$3.event(e);var i=util$3.getEventPos(e,r.zoom),a=90===r.rotateDeg?i.clientY:i.clientX,s=n.computeTime(e,a);n.triggerCallbacks("mouseenter",s,e),n.focus()}})),_defineProperty$1(_assertThisInitialized(n),"onMouseLeave",(function(e){n.triggerCallbacks("mouseleave",null,e),n.unlock(),n._updateInnerFocus(null)})),_defineProperty$1(_assertThisInitialized(n),"onVideoResize",(function(){var e=n.pos,t=e.x,r=e.isDown;if(e.isEnter&&!r){var o=n.computeTime(null,t);n.onMoveOnly(null,o)}})),n.useable=!1,n.isProgressMoving=!1,n.__dragCallBacks=[],n._state={now:-1,direc:0,time:0,prePlayTime:-1},n._disableBlur=!1,"boolean"==typeof n.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),n.config.isDraggingSeek=n.config.isDragingSeek),n}return _createClass$1(r,[{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,r=e.currentTime;return t>=0?t:r+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]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&0!==t.length||(t=[{percent:1}]);var n,o=_objectSpread2(_objectSpread2({fragments:t},r),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(o):(this.innerList=new InnerList(o),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),_mapInstanceProperty(n=["findHightLight","unHightLight","setHightLight","findFragment"]).call(n,(function(t){var r;e[t]=_bindInstanceProperty(r=e.innerList[t]).call(r,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=_findInstanceProperty(this).call(this,"xg-outer");var e=this.config,t=e.fragFocusClass,r=e.fragAutoFocus,n=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:t,fragAutoFocus:r,fragClass:n,style:this.playerConfig.commonStyle||{}}),"mobile"===sniffer.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=_findInstanceProperty(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(DURATION_CHANGE,(function(){e.onMouseLeave()})),this.on(TIME_UPDATE,(function(){e.onTimeupdate()})),this.on(SEEKED,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on(PROGRESS,(function(){e.onCacheUpdate()})),this.on(ENDED,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on(EMPTIED,(function(){e.onReset()})),this.on(VIDEO_RESIZE,(function(){e.onVideoResize()}))}},{key:"setConfig",value:function(e){var t,r=this,n=null;_forEachInstanceProperty(t=_Object$keys(e)).call(t,(function(t){r.config[t]=e[t],"fragments"===t&&(n=e[t])})),n&&this._initInner(n,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"===_typeof$1(e)){var r;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){t.style[r]=e[r]}))}}},{key:"triggerCallbacks",value:function(e,t,r){var n;this.__dragCallBacks.length>0&&_mapInstanceProperty(n=this.__dragCallBacks).call(n,(function(n){if(n&&n.handler&&n.type===e)try{n.handler(t,r)}catch(e){console.error("[XGPLAYER][triggerCallbacks] ".concat(n," error"),e)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var r=this.__dragCallBacks,n=-1;_mapInstanceProperty(r).call(r,(function(r,o){r&&r.type===e&&r.handler===t&&(n=o)})),n>-1&&_spliceInstanceProperty(r).call(r,n,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)&&(_bindInstanceProperty(this).call(this,"mousedown",this.onMouseDown),"mobile"!==e.isMobileSimulateMode&&_bindInstanceProperty(this).call(this,"mouseenter",this.onMouseEnter),_bindInstanceProperty(this).call(this,"mouseover",this.onMouseOver),_bindInstanceProperty(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),util$3.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),util$3.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,r,n){var o=this.config,i=this.player;if(!o.isCloseClickSeek||0!==n){var a=t=t>=i.duration?i.duration-o.endedDiff:Number(t).toFixed(1);this.updatePercent(r),this.updateTime(e),(1!==n||o.isDraggingSeek&&"audio"!==i.config.mediaType)&&(this._state.now=a,this._state.direc=a>i.currentTime?0:1,i.seek(a))}}},{key:"computeTime",value:function(e,t){var r,n,o=this.player,i=this.root.getBoundingClientRect(),a=i.width,s=i.height,l=i.top,c=i.left,u=t;90===o.rotateDeg?(r=s,n=l):(r=a,n=c);var p=u-n,f=(p=p>r?r:p<0?0:p)/r,$=_parseInt$1((f=f<0?0:f>1?1:f)*this.offsetDuration*1e3,10)/1e3;return{percent:f,currentTime:$,seekTime:util$3.getCurrentTimeByOffset($,o.timeSegments),offset:p,width:r,left:n,e:e}}},{key:"updateTime",value:function(e){var t=this.player,r=this.duration;e>r?e=r:e<0&&(e=0);var n=t.plugins.time;n&&n.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 r=this.player.plugins.miniprogress;r&&r.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,r=this._state,n=this.offsetDuration;if(!(t.isSeeking&&t.media.seeking||this.isProgressMoving)&&t.hasStart){if(r.now>-1){var o=_parseInt$1(1e3*r.now,10)-_parseInt$1(1e3*t.currentTime,10);if(0===r.direc&&o>300||1===r.direc&&o>-300)return void(r.now=-1);r.now=-1}var i=this.currentTime;i=util$3.adjustTimeByDuration(i,n,e),this.innerList.update({played:i},n),this.progressBtn.style.left="".concat(i/n*100,"%")}}},{key:"onCacheUpdate",value:function(e){var t=this.player,r=this.duration;if(t){var n=t.bufferedPoint.end;n=util$3.adjustTimeByDuration(n,r,e),this.innerList.update({cached:n},r)}}},{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:POSITIONS.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:FRAGMENT_FOCUS_CLASS.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return FRAGMENT_FOCUS_CLASS}}]),r}(),Icon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_onMouseenter",(function(e){n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"_onMouseLeave",(function(e){n.emit("icon_mouseleave",{pluginName:n.pluginName})})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){_bindInstanceProperty(this).call(this,"mouseenter",this._onMouseenter),_bindInstanceProperty(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)}}]),r}(),Play=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=_assertThisInitialized(n).player;return n.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),_bindInstanceProperty(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,t=this.player;this.on([PLAY,PAUSE,ERROR,EMPTIED],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:PlaySvg,class:"xg-icon-play"},pause:{icon:PauseSvg,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,r=_findInstanceProperty(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),r&&this.changeLangTextKey(r,t.PLAY_TIPS)):(this.setAttr("data-state","play"),r&&this.changeLangTextKey(r,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.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(xgIconTips(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:POSITIONS.CONTROLS_LEFT,index:0,disable:!1}}}]),r}();function BackSVG(){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 TopBackIcon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},_bindInstanceProperty(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:BackSVG,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){util$3.addClass(this.root,"show")}},{key:"hide",value:function(){util$3.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:POSITIONS.ROOT_TOP,index:0}}}]),r}();function FullScreenSvg(){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 ExitFullScreenSvg(){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 Fullscreen=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_onOrientationChange",(function(e){n.player.fullscreen&&n.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?n.player.setRotateDeg(0):n.player.setRotateDeg(90))})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){var e=this;_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this);var t=this.config,n=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var o=util$3.getFullScreenEl();n.fullscreenTarget===o&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var r=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:r,to:!r})}}),_bindInstanceProperty(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(FULLSCREEN_CHANGE,(function(t){var r=_findInstanceProperty(e).call(e,".xg-tips");r&&e.changeLangTextKey(r,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:TopBackIcon,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===sniffer.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:FullScreenSvg,class:"xg-get-fullscreen"},exitFullscreen:{icon:ExitFullScreenSvg,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===sniffer.device?"touchend":"click",this.handleFullscreen),"mobile"===sniffer.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,r=this.config;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):r.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):r.switchCallback&&"function"==typeof r.switchCallback?r.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),r.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),r.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(r.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(xgIconTips(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(e){}}},{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:POSITIONS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),r}(),Time=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),(n=t.call(this,e)).isActiving=!1,n}return _createClass$1(r,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,r=e.duration;return this.playerConfig.customDuration||t||r}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,r=e.currentTime;return t>=0?t:r}},{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=_findInstanceProperty(this).call(this,".time-duration"),this.timeDom=_findInstanceProperty(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([DURATION_CHANGE,SEEKED,TIME_UPDATE],(function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()})),this.on(ENDED,(function(){e.onTimeUpdate(!0)})),this.on(EMPTIED,(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,r=this.config,n=this.duration;if(!r.disable&&!this.isActiving&&t.hasStart){var o=this.currentTime+this.timeOffset;o=util$3.adjustTimeByDuration(o,n,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(o)),n!==1/0&&n>0&&(this.centerDurDom.innerHTML=util$3.format(n))):(this.timeDom.innerHTML=this.minWidthTime(util$3.format(o)),n!==1/0&&n>0&&(this.durationDom.innerHTML=util$3.format(n)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(0)),this.centerDurDom.innerHTML=util$3.format(0)):(this.timeDom.innerHTML=this.minWidthTime(util$3.format(0)),this.durationDom.innerHTML=util$3.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=util$3.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=util$3.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?(util$3.hide(this.durationDom),util$3.hide(this.timeDom),util$3.hide(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(_findInstanceProperty(this).call(this,".time-live-tag"))):util$3.hide(_findInstanceProperty(this).call(this,".time-live-tag"));e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(util$3.hide(this.durationDom),util$3.hide(this.timeDom),util$3.hide(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(_findInstanceProperty(this).call(this,".time-live-tag"))):(util$3.hide(_findInstanceProperty(this).call(this,".time-live-tag")),util$3.show(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(this.durationDom),util$3.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(util$3.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(e)))}},{key:"minWidthTime",value:function(e){var t;return _mapInstanceProperty(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,r=function(){e.isActiving=!1};this.off(SEEKED,r),t.isSeeking&&t.media.seeking?this.once(SEEKED,r):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:POSITIONS.CONTROLS_LEFT,index:2,disable:!1}}}]),r}();function volumeLargeSvg(){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 volumeSmallSvg(){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 volumeMutedSvg(){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 Volume=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"onBarMousedown",(function(e){var t=_assertThisInitialized(n).player,r=_findInstanceProperty(n).call(n,".xgplayer-bar");util$3.event(e);var o=r.getBoundingClientRect(),i=util$3.getEventPos(e,t.zoom),a=o.height-(i.clientY-o.top);if(i.h=a,i.barH=o.height,n.pos=i,!(a<-2))return n.updateVolumePos(a,e),document.addEventListener("mouseup",n.onBarMouseUp),n._d.isStart=!0,!1})),_defineProperty$1(_assertThisInitialized(n),"onBarMouseMove",(function(e){var t=_assertThisInitialized(n)._d;if(t.isStart){var r=_assertThisInitialized(n),o=r.pos,i=r.player;e.preventDefault(),e.stopPropagation(),util$3.event(e);var a=util$3.getEventPos(e,i.zoom);t.isMoving=!0;var s=o.h-a.clientY+o.clientY;s>o.barH||n.updateVolumePos(s,e)}})),_defineProperty$1(_assertThisInitialized(n),"onBarMouseUp",(function(e){util$3.event(e),document.removeEventListener("mouseup",n.onBarMouseUp);var t=_assertThisInitialized(n)._d;t.isStart=!1,t.isMoving=!1})),_defineProperty$1(_assertThisInitialized(n),"onMouseenter",(function(e){n._d.isActive=!0,n.focus(),n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"onMouseleave",(function(e){n._d.isActive=!1,n.unFocus(100,!1,e),n.emit("icon_mouseleave",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"onVolumeChange",(function(e){if(n.player){var t=n.player,r=t.muted,o=t.volume;n._d.isMoving||(_findInstanceProperty(n).call(n,".xgplayer-drag").style.height=r||0===o?"4px":"".concat(100*o,"%"),n.config.showValueLabel&&n.updateVolumeValue()),n.animate(r,o)}})),n}return _createClass$1(r,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:volumeSmallSvg,class:"xg-volume-small"},volumeLarge:{icon:volumeLargeSvg,class:"xg-volume"},volumeMuted:{icon:volumeMutedSvg,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,r=t.commonStyle,n=t.volume;if(r.volumeColor)_findInstanceProperty(this).call(this,".xgplayer-drag").style.backgroundColor=r.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"!==sniffer.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)_bindInstanceProperty(this).call(this,"mouseenter",this._onMouseenterHandler),_bindInstanceProperty(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),_bindInstanceProperty(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),_bindInstanceProperty(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),_bindInstanceProperty(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);_bindInstanceProperty(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(VOLUME_CHANGE,this.onVolumeChange),this.once(LOADED_DATA,this.onVolumeChange),"Number"!==util$3.typeOf(n)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var r=this.player,n=_findInstanceProperty(this).call(this,".xgplayer-drag"),o=_findInstanceProperty(this).call(this,".xgplayer-bar");if(o&&n){var i=_parseInt$1(e/o.getBoundingClientRect().height*1e3,10);n.style.height="".concat(e,"px");var a=Math.max(Math.min(i/1e3,1),0),s={volume:{from:r.volume,to:a}};r.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:r.muted,volume:r.volume,props:s}),r.volume=Math.max(Math.min(i/1e3,1),0),r.muted&&(r.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,r=e.muted,n=_findInstanceProperty(this).call(this,".xgplayer-value-label"),o=Math.max(Math.min(t,1),0);n.innerText=r?0:Math.round(100*o)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(util$3.clearTimeout(this,this._timerId),this._timerId=null),util$3.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this._d,i=this.player;o.isActive||(this._timerId&&(util$3.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=util$3.setTimeout(this,(function(){o.isActive||(r?i.blur():i.focus(),util$3.removeClass(e.root,"slide-show"),o.isStart&&e.onBarMouseUp(n)),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&&(util$3.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"===sniffer.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,r=this.config.showValueLabel;return _concatInstanceProperty(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(r?'<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:POSITIONS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),r}(),fails$6=fails$z,wellKnownSymbol$3=wellKnownSymbol$q,DESCRIPTORS$4=descriptors$2,IS_PURE=isPure,ITERATOR$1=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$6((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.size&&(IS_PURE||!DESCRIPTORS$4)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$1]||"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"!==r||"x"!==new URL("http://x",void 0).host})),uncurryThis$5=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$5(regexSeparators.exec),floor$2=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$5("".charCodeAt),join$2=uncurryThis$5([].join),push$4=uncurryThis$5([].push),replace$2=uncurryThis$5("".replace),split$2=uncurryThis$5("".split),toLowerCase$1=uncurryThis$5("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt(e,r++);if(o>=55296&&o<=56319&&r<n){var i=charCodeAt(e,r++);56320==(64512&i)?push$4(t,((1023&o)<<10)+(1023&i)+65536):(push$4(t,o),r--)}else push$4(t,o)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$2(e/damp):e>>1,e+=floor$2(e/t);e>baseMinusTMin*tMax>>1;)e=floor$2(e/baseMinusTMin),n+=base;return floor$2(n+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,r,n=[],o=(e=ucs2decode(e)).length,i=initialN,a=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$4(n,fromCharCode(r));var l=n.length,c=l;for(l&&push$4(n,delimiter);c<o;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var p=c+1;if(u-i>floor$2((maxInt-a)/p))throw $RangeError(OVERFLOW_ERROR);for(a+=(u-i)*p,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++a>maxInt)throw $RangeError(OVERFLOW_ERROR);if(r==i){for(var f=a,$=base;;){var y=$<=s?tMin:$>=s+tMax?tMax:$-s;if(f<y)break;var h=f-y,d=base-y;push$4(n,fromCharCode(digitToBasic(y+h%d))),f=floor$2(h/d),$+=base}push$4(n,fromCharCode(digitToBasic(f))),s=adapt(a,p,c==l),a=0,c++}}a++,i++}return join$2(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],o=split$2(replace$2(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<o.length;t++)r=o[t],push$4(n,exec$1(regexNonASCII,r)?"xn--"+encode(r):r);return join$2(n,".")},defineBuiltIn$2=defineBuiltIn$8,defineBuiltIns$2=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$2(e,n,t[n],r);return e},$$v=_export,global$3=global$r,call$5=functionCall,uncurryThis$4=functionUncurryThis,DESCRIPTORS$3=descriptors$2,USE_NATIVE_URL$2=urlConstructorDetection,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$2=defineBuiltInAccessor$5,defineBuiltIns$1=defineBuiltIns$2,setToStringTag$2=setToStringTag$9,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$3=internalState,anInstance$3=anInstance$5,isCallable$4=isCallable$q,hasOwn$2=hasOwnProperty_1,bind$a=functionBindContext,classof$2=classof$c,anObject$1=anObject$g,isObject$5=isObject$l,$toString$1=toString$e,create$1=objectCreate,createPropertyDescriptor=createPropertyDescriptor$8,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$a,validateArgumentsLength$2=validateArgumentsLength$5,wellKnownSymbol$2=wellKnownSymbol$q,arraySort=arraySort$1,ITERATOR=wellKnownSymbol$2("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$3=InternalStateModule$3.set,getInternalParamsState=InternalStateModule$3.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$3.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor5=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$3)return global$3[e];var t=getOwnPropertyDescriptor5(global$3,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers&&Headers.prototype,RegExp$1=global$3.RegExp,TypeError$2=global$3.TypeError,decodeURIComponent=global$3.decodeURIComponent,encodeURIComponent$1=global$3.encodeURIComponent,charAt$1=uncurryThis$4("".charAt),join$1=uncurryThis$4([].join),push$3=uncurryThis$4([].push),replace$1=uncurryThis$4("".replace),shift$1=uncurryThis$4([].shift),splice2=uncurryThis$4([].splice),split$1=uncurryThis$4("".split),stringSlice$1=uncurryThis$4("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$1("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=replace$1(e,plus," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=replace$1(t,percentSequence(r--),percentDecode);return t}},find2=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$1(encodeURIComponent$1(e),find2,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$3(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$5(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$1(e,0)?stringSlice$1(e,1):e:$toString$1(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,l=getIteratorMethod(e);if(l)for(r=(t=getIterator(e,l)).next;!(n=call$5(r,t)).done;){if(i=(o=getIterator(anObject$1(n.value))).next,(a=call$5(i,o)).done||(s=call$5(i,o)).done||!call$5(i,o).done)throw TypeError$2("Expected sequence with length 2");push$3(this.entries,{key:$toString$1(a.value),value:$toString$1(s.value)})}else for(var c in e)hasOwn$2(e,c)&&push$3(this.entries,{key:c,value:$toString$1(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$1(t,"="),push$3(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$1(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$3(r,serialize(e.key)+"="+serialize(e.value));return join$1(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$3(this,URLSearchParamsPrototype);var e=setInternalState$3(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$3||(this.length=e.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns$1(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$2(arguments.length,2);var r=getInternalParamsState(this);push$3(r.entries,{key:$toString$1(e),value:$toString$1(t)}),DESCRIPTORS$3||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$1(e),o=0;o<r.length;)r[o].key===n?splice2(r,o,1):o++;DESCRIPTORS$3||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$3(n,t[o].value);return n},has:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$2(arguments.length,1);for(var r,n=getInternalParamsState(this),o=n.entries,i=!1,a=$toString$1(e),s=$toString$1(t),l=0;l<o.length;l++)(r=o[l]).key===a&&(i?splice2(o,l--,1):(i=!0,r.value=s));i||push$3(o,{key:a,value:s}),DESCRIPTORS$3||(this.length=o.length),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$a(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$1(URLSearchParamsPrototype,ITERATOR,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$1(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),DESCRIPTORS$3&&defineBuiltInAccessor$2(URLSearchParamsPrototype,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$v({global:!0,constructor:!0,forced:!USE_NATIVE_URL$2},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$2&&isCallable$4(Headers)){var headersHas=uncurryThis$4(HeadersPrototype.has),headersSet=uncurryThis$4(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$5(e)){var t,r=e.body;if(classof$2(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers(e.headers):new Headers,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$1(e,{body:createPropertyDescriptor(0,$toString$1(r)),headers:createPropertyDescriptor(0,t)})}return e};if(isCallable$4(nativeFetch)&&$$v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$4(NativeRequest)){var RequestConstructor=function(e){return anInstance$3(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$v({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$u=_export,DESCRIPTORS$2=descriptors$2,USE_NATIVE_URL$1=urlConstructorDetection,global$2=global$r,bind$9=functionBindContext,uncurryThis$3=functionUncurryThis,defineBuiltIn=defineBuiltIn$8,defineBuiltInAccessor$1=defineBuiltInAccessor$5,anInstance$2=anInstance$5,hasOwn$1=hasOwnProperty_1,assign2=objectAssign,arrayFrom=arrayFrom$1,arraySlice$1=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$e,setToStringTag$1=setToStringTag$9,validateArgumentsLength$1=validateArgumentsLength$5,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule$2=internalState,setInternalState$2=InternalStateModule$2.set,getInternalURLState=InternalStateModule$2.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$2.URL,TypeError$1=global$2.TypeError,parseInt$1=global$2.parseInt,floor$1=Math.floor,pow=Math.pow,charAt=uncurryThis$3("".charAt),exec=uncurryThis$3(/./.exec),join=uncurryThis$3([].join),numberToString=uncurryThis$3(1..toString),pop=uncurryThis$3([].pop),push$2=uncurryThis$3([].push),replace=uncurryThis$3("".replace),shift=uncurryThis$3([].shift),split=uncurryThis$3("".split),stringSlice=uncurryThis$3("".slice),toLowerCase=uncurryThis$3("".toLowerCase),unshift=uncurryThis$3([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,o,i,a,s,l=split(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=l[n]))return e;if(i=10,o.length>1&&"0"==charAt(o,0)&&(i=exec(HEX_START,o)?16:8,o=stringSlice(o,8==i?1:2)),""===o)a=0;else{if(!exec(10==i?DEC:8==i?OCT:HEX,o))return e;a=parseInt$1(o,i)}push$2(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow(256,5-t))return null}else if(a>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow(256,3-n);return s},parseIPv6=function(e){var t,r,n,o,i,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,p=0,f=function(){return charAt(e,p)};if(":"==f()){if(":"!=charAt(e,1))return;p+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=r=0;r<4&&exec(HEX,f());)t=16*t+parseInt$1(f(),16),p++,r++;if("."==f()){if(0==r)return;if(p-=r,c>6)return;for(n=0;f();){if(o=null,n>0){if(!("."==f()&&n<4))return;p++}if(!exec(DIGIT,f()))return;for(;exec(DIGIT,f());){if(i=parseInt$1(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}l[c]=256*l[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;l[c++]=t}else{if(null!==u)return;p++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t},serializeHost=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor$1(e/256);return join(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign2({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn$1(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec(ALPHA,charAt(e,0))&&(":"==(r=charAt(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice(e,0,2))&&(2==e.length||"/"===(t=charAt(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,o,i,a=$toString(e);if(t){if(o=this.parse(a))throw TypeError$1(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),o=this.parse(a,null,n))throw TypeError$1(o);(i=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=i}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,l=t||SCHEME_START,c=0,u="",p=!1,f=!1,$=!1;for(e=$toString(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);c<=n.length;){switch(o=n[c],l){case SCHEME_START:if(!o||!exec(ALPHA,o)){if(t)return INVALID_SCHEME;l=NO_SCHEME;continue}u+=toLowerCase(o),l=SCHEME;break;case SCHEME:if(o&&(exec(ALPHANUMERIC,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase(o);else{if(":"!=o){if(t)return INVALID_SCHEME;u="",l=NO_SCHEME,c=0;continue}if(t&&(s.isSpecial()!=hasOwn$1(specialSchemes,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?l=FILE:s.isSpecial()&&r&&r.scheme==s.scheme?l=SPECIAL_RELATIVE_OR_AUTHORITY:s.isSpecial()?l=SPECIAL_AUTHORITY_SLASHES:"/"==n[c+1]?(l=PATH_OR_AUTHORITY,c++):(s.cannotBeABaseURL=!0,push$2(s.path,""),l=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,l=FRAGMENT;break}l="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=o||"/"!=n[c+1]){l=RELATIVE;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES,c++;break;case PATH_OR_AUTHORITY:if("/"==o){l=AUTHORITY;break}l=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,o==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())l=RELATIVE_SLASH;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.path.length--,l=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,l=PATH;continue}l=AUTHORITY}else l=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(l=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=o||"/"!=charAt(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){p&&(u="%40"+u),p=!0,i=arrayFrom(u);for(var y=0;y<i.length;y++){var h=i[y];if(":"!=h||$){var d=percentEncode(h,userinfoPercentEncodeSet);$?s.password+=d:s.username+=d}else $=!0}u=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(p&&""==u)return INVALID_AUTHORITY;c-=arrayFrom(u).length+1,u="",l=HOST}else u+=o;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){l=FILE_HOST;continue}if(":"!=o||f){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",l=PATH_START,t)return;continue}"["==o?f=!0:"]"==o&&(f=!1),u+=o}else{if(""==u)return INVALID_HOST;if(a=s.parseHost(u))return a;if(u="",l=PORT,t==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var g=parseInt$1(u,10);if(g>65535)return INVALID_PORT;s.port=s.isSpecial()&&g===specialSchemes[s.scheme]?null:g,u=""}if(t)return;l=PATH_START;continue}return INVALID_PORT}u+=o;break;case FILE:if(s.scheme="file","/"==o||"\\"==o)l=FILE_SLASH;else{if(!r||"file"!=r.scheme){l=PATH;continue}if(o==EOF)s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))||(s.host=r.host,s.path=arraySlice$1(r.path),s.shortenPath()),l=PATH;continue}s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}}break;case FILE_SLASH:if("/"==o||"\\"==o){l=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$2(s.path,r.path[0]):s.host=r.host),l=PATH;continue;case FILE_HOST:if(o==EOF||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter(u))l=PATH;else if(""==u){if(s.host="",t)return;l=PATH_START}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",l=PATH_START}continue}u+=o;break;case PATH_START:if(s.isSpecial()){if(l=PATH,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF&&(l=PATH,"/"!=o))continue}else s.fragment="",l=FRAGMENT;else s.query="",l=QUERY;break;case PATH:if(o==EOF||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push$2(s.path,"")):isSingleDot(u)?"/"==o||"\\"==o&&s.isSpecial()||push$2(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt(u,0)+":"),push$2(s.path,u)),u="","file"==s.scheme&&(o==EOF||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==o?(s.query="",l=QUERY):"#"==o&&(s.fragment="",l=FRAGMENT)}else u+=percentEncode(o,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==o?(s.query="",l=QUERY):"#"==o?(s.fragment="",l=FRAGMENT):o!=EOF&&(s.path[0]+=percentEncode(o,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=o?o!=EOF&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode(o,C0ControlPercentEncodeSet)):(s.fragment="",l=FRAGMENT);break;case FRAGMENT:o!=EOF&&(s.fragment+=percentEncode(o,fragmentPercentEncodeSet))}c++}},parseHost:function(e){var t,r,n;if("["==charAt(e,0)){if("]"!=charAt(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$1(specialSchemes,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=serializeHost(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+join(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$1(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString(e))?this.query=null:("?"==charAt(e,0)&&(e=stringSlice(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString(e))?("#"==charAt(e,0)&&(e=stringSlice(e,1)),this.fragment="",this.parse(e,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(e){var t=anInstance$2(this,URLPrototype),r=validateArgumentsLength$1(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$2(t,new URLState(e,!1,r));DESCRIPTORS$2||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$2&&(defineBuiltInAccessor$1(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$1(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$1(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$1(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$1(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$1(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$1(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$1(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$1(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$1(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$1(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$1(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn(URLConstructor,"createObjectURL",bind$9(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn(URLConstructor,"revokeObjectURL",bind$9(nativeRevokeObjectURL,NativeURL))}setToStringTag$1(URLConstructor,"URL"),$$u({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1,sham:!DESCRIPTORS$2},{URL:URLConstructor});var $$t=_export,getBuiltIn$1=getBuiltIn$h,fails$5=fails$z,validateArgumentsLength=validateArgumentsLength$5,toString$1=toString$e,USE_NATIVE_URL=urlConstructorDetection,URL$1=getBuiltIn$1("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL&&fails$5((function(){URL$1.canParse()}));$$t({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength(arguments.length,1),r=toString$1(e),n=t<2||void 0===arguments[1]?void 0:toString$1(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$3=path$t,url$5=path$3.URL,parent$q=url$5,url$4=parent$q,parent$p=url$4,url$3=parent$p,parent$o=url$3,url$2=parent$o,url$1=url$2,url=url$1,_URL=getDefaultExportFromCjs(url);function CssFullSceenSvg(){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 ExitCssFullSceenSvg(){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 CssFullScreen=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{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;_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(CSS_FULLSCREEN_CHANGE,(function(e){t.animate(e)})),this.btnClick=_bindInstanceProperty(e=this.btnClick).call(e,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),_bindInstanceProperty(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=_findInstanceProperty(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,r=_findInstanceProperty(this).call(this,".xg-tips");r&&this.changeLangTextKey(r,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:CssFullSceenSvg,class:"xg-get-cssfull"},exitCssFullscreen:{icon:ExitCssFullSceenSvg,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.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(xgIconTips(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:POSITIONS.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),r}(),isObject$4=isObject$l,classof$1=classofRaw$2,wellKnownSymbol$1=wellKnownSymbol$q,MATCH$1=wellKnownSymbol$1("match"),isRegexp=function(e){var t;return isObject$4(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$1(e))},isRegExp=isRegexp,$TypeError$4=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$4("The method doesn't accept regular expressions");return e},wellKnownSymbol=wellKnownSymbol$q,MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},isObject$3=isObject$l,floor=Math.floor,isIntegralNumber$1=Number.isInteger||function(e){return!isObject$3(e)&&isFinite(e)&&floor(e)===e},$$s=_export,isIntegralNumber=isIntegralNumber$1;$$s({target:"Number",stat:!0},{isInteger:isIntegralNumber});var path$2=path$t,isInteger$5=path$2.Number.isInteger,parent$n=isInteger$5,isInteger$4=parent$n,parent$m=isInteger$4,isInteger$3=parent$m,parent$l=isInteger$3,isInteger$2=parent$l,isInteger$1=isInteger$2,isInteger2=isInteger$1,_Number$isInteger=getDefaultExportFromCjs(isInteger2),$$r=_export,$includes=arrayIncludes.includes,fails$4=fails$z,BROKEN_ON_SPARSE=fails$4((function(){return!Array(1).includes()}));$$r({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$5=entryVirtual$m,includes$7=entryVirtual$5("Array").includes,$$q=_export,uncurryThis$2=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$7,toString4=toString$e,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$2("".indexOf);$$q({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString4(requireObjectCoercible(this)),toString4(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$4=entryVirtual$m,includes$6=entryVirtual$4("String").includes,isPrototypeOf$4=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$4=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$4||isPrototypeOf$4(ArrayPrototype$4,e)&&t===ArrayPrototype$4.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$4(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$k=includes$5,includes$4=parent$k,parent$j=includes$4,includes$3=parent$j,parent$i=includes$3,includes$2=parent$i,includes$1=includes$2,includes3=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes3),toObject$2=toObject$e,toAbsoluteIndex$1=toAbsoluteIndex$6,lengthOfArrayLike$3=lengthOfArrayLike$d,arrayFill=function(e){for(var t=toObject$2(this),r=lengthOfArrayLike$3(t),n=arguments.length,o=toAbsoluteIndex$1(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:toAbsoluteIndex$1(i,r);a>o;)t[o++]=e;return t},$$p=_export,fill$7=arrayFill;$$p({target:"Array",proto:!0},{fill:fill$7});var entryVirtual$3=entryVirtual$m,fill$6=entryVirtual$3("Array").fill,isPrototypeOf$3=objectIsPrototypeOf,method$3=fill$6,ArrayPrototype$3=Array.prototype,fill$5=function(e){var t=e.fill;return e===ArrayPrototype$3||isPrototypeOf$3(ArrayPrototype$3,e)&&t===ArrayPrototype$3.fill?method$3:t},parent$h=fill$5,fill$4=parent$h,parent$g=fill$4,fill$3=parent$g,parent$f=fill$3,fill$2=parent$f,fill$1=fill$2,fill2=fill$1,_fillInstanceProperty=getDefaultExportFromCjs(fill2),internalMetadata={exports:{}},fails$3=fails$z,arrayBufferNonExtensible=fails$3((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$2=fails$z,isObject$2=isObject$l,classof=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$2((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$2(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$1=fails$z,freezing=!fails$1((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$o=_export,uncurryThis$1=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$1=isObject$l,hasOwn2=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible2=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$1(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$1(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn2(e,METADATA)){if(!isExtensible2(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn2(e,METADATA)){if(!isExtensible2(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible2(e)&&!hasOwn2(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$1([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===METADATA){t(n,o,1);break}return n},$$o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$n=_export,global$1=global$r,InternalMetadataModule=internalMetadataExports,fails=fails$z,createNonEnumerableProperty=createNonEnumerableProperty$9,iterate$f=iterate$l,anInstance$1=anInstance$5,isCallable$3=isCallable$q,isObject=isObject$l,setToStringTag=setToStringTag$9,defineProperty5=objectDefineProperty.f,forEach3=arrayIteration.forEach,DESCRIPTORS$1=descriptors$2,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(e,t,r){var n,o=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=o?"set":"add",s=global$1[e],l=s&&s.prototype,c={};if(DESCRIPTORS$1&&isCallable$3(s)&&(i||l.forEach&&!fails((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$1(anInstance$1(t,u),{type:e,collection:new s}),null!=r&&iterate$f(r,t[a],{that:t,AS_ENTRIES:o})}))).prototype,p=internalStateGetterFor$1(e);forEach3(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||i&&"clear"==e||createNonEnumerableProperty(u,e,(function(r,n){var o=p(this).collection;if(!t&&i&&!isObject(r))return"get"==e&&void 0;var a=o[e](0===r?0:r,n);return t?this:a}))})),i||defineProperty5(u,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=r.getConstructor(t,e,o,a),InternalMetadataModule.enable();return setToStringTag(n,e,!1,!0),c[e]=n,$$n({global:!0,forced:!0},c),i||r.setStrong(n,e,o),n},create4=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$5,defineBuiltIns=defineBuiltIns$2,bind$8=functionBindContext,anInstance=anInstance$5,isNullOrUndefined$1=isNullOrUndefined$6,iterate$e=iterate$l,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS=descriptors$2,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,i),setInternalState(e,{type:t,index:create4(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(e.size=0),isNullOrUndefined$1(o)||iterate$e(o,e[n],{that:e,AS_ENTRIES:r})})),i=o.prototype,a=internalStateGetterFor(t),s=function(e,t,r){var n,o,i=a(e),s=l(e,t);return s?s.value=r:(i.last=s={index:o=fastKey(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=s),n&&(n.next=s),DESCRIPTORS?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},l=function(e,t){var r,n=a(e),o=fastKey(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns(i,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),DESCRIPTORS?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$8(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),defineBuiltIns(i,r?{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)}}),DESCRIPTORS&&defineBuiltInAccessor(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor(t),i=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var path$1=path$t,map$5=path$1.Map,parent$e=map$5,map$4=parent$e,parent$d=map$4,map$3=parent$d,bind$7=functionBindContext,call$4=functionCall,aCallable$6=aCallable$j,aConstructor=aConstructor$3,isNullOrUndefined=isNullOrUndefined$6,iterate$d=iterate$l,push$1=[].push,collectionFrom=function(e){var t,r,n,o,i=arguments.length,a=i>1?arguments[1]:void 0;return aConstructor(this),(t=void 0!==a)&&aCallable$6(a),isNullOrUndefined(e)?new this:(r=[],t?(n=0,o=bind$7(a,i>2?arguments[2]:void 0),iterate$d(e,(function(e){call$4(push$1,r,o(e,n++))}))):iterate$d(e,push$1,{that:r}),new this(r))},$$m=_export,from3=collectionFrom;$$m({target:"Map",stat:!0,forced:!0},{from:from3});var arraySlice=arraySlice$7,collectionOf=function(){return new this(arraySlice(arguments))},$$l=_export,of2=collectionOf;$$l({target:"Map",stat:!0,forced:!0},{of:of2});var tryToString=tryToString$7,aMap$e=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(tryToString(e)+" is not a map")},caller$1=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn=getBuiltIn$h,caller=caller$1,Map$5=getBuiltIn("Map"),mapHelpers={Map:Map$5,set:caller("set",2),get:caller("get",1),has:caller("has",1),remove:caller("delete",1),proto:Map$5.prototype},$$k=_export,aMap$d=aMap$e,remove=mapHelpers.remove;$$k({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$d(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$j=_export,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$1=MapHelpers$4.get,has$1=MapHelpers$4.has,set$5=MapHelpers$4.set;$$j({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,o=aMap$c(this);return has$1(o,e)?(r=get$1(o,e),"update"in t&&(r=t.update(r,e,o),set$5(o,e,r)),r):(n=t.insert(e,o),set$5(o,e,n),n)}});var call$3=functionCall,iterateSimple$1=function(e,t,r){for(var n,o,i=r||e.next;!(n=call$3(i,e)).done;)if(void 0!==(o=t(n.value)))return o},iterateSimple=iterateSimple$1,mapIterate=function(e,t,r){return r?iterateSimple(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},$$i=_export,bind$6=functionBindContext,aMap$b=aMap$e,iterate$c=mapIterate;$$i({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$b(this),r=bind$6(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$c(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$h=_export,bind$5=functionBindContext,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$b=mapIterate,Map$4=MapHelpers$3.Map,set$4=MapHelpers$3.set;$$h({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$a(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0),n=new Map$4;return iterate$b(t,(function(e,o){r(e,o,t)&&set$4(n,o,e)})),n}});var $$g=_export,bind$4=functionBindContext,aMap$9=aMap$e,iterate$a=mapIterate;$$g({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$9(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0),n=iterate$a(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$f=_export,bind$3=functionBindContext,aMap$8=aMap$e,iterate$9=mapIterate;$$f({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$8(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=iterate$9(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$e=_export,call$2=functionCall,uncurryThis=functionUncurryThis,isCallable$2=isCallable$q,aCallable$5=aCallable$j,iterate$8=iterate$l,Map$3=mapHelpers.Map,push=uncurryThis([].push);$$e({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$2(this)?this:Map$3);aCallable$5(t);var n=aCallable$5(r.has),o=aCallable$5(r.get),i=aCallable$5(r.set);return iterate$8(e,(function(e){var a=t(e);call$2(n,r,a)?push(call$2(o,r,a),e):call$2(i,r,a,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$d=_export,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$7=mapIterate;$$d({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$7(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$c=_export,call$1=functionCall,iterate$6=iterate$l,isCallable$1=isCallable$q,aCallable$4=aCallable$j,Map$2=mapHelpers.Map;$$c({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$1(this)?this:Map$2);aCallable$4(t);var n=aCallable$4(r.set);return iterate$6(e,(function(e){call$1(n,r,t(e),e)})),r}});var $$b=_export,aMap$6=aMap$e,iterate$5=mapIterate;$$b({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$5(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$a=_export,bind$2=functionBindContext,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$4=mapIterate,Map$1=MapHelpers$2.Map,set$3=MapHelpers$2.set;$$a({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$4(t,(function(e,o){set$3(n,r(e,o,t),e)})),n}});var $$9=_export,bind$1=functionBindContext,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$3=mapIterate,Map=MapHelpers$1.Map,set$2=MapHelpers$1.set;$$9({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$1(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$3(t,(function(e,o){set$2(n,o,r(e,o,t))})),n}});var $$8=_export,aMap$3=aMap$e,iterate$2=iterate$l,set$1=mapHelpers.set;$$8({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$2(arguments[n++],(function(e,r){set$1(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$7=_export,aCallable$3=aCallable$j,aMap$2=aMap$e,iterate$1=mapIterate,$TypeError$3=TypeError;$$7({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$3(e),iterate$1(t,(function(o,i){r?(r=!1,n=o):n=e(n,o,i,t)})),r)throw $TypeError$3("Reduce of empty map with no initial value");return n}});var $$6=_export,bind2=functionBindContext,aMap$1=aMap$e,iterate=mapIterate;$$6({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind2(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$5=_export,aCallable$2=aCallable$j,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$2=TypeError,get2=MapHelpers.get,has2=MapHelpers.has,set2=MapHelpers.set;$$5({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$2(t);var o=has2(r,e);if(!o&&n<3)throw $TypeError$2("Updating absent value");var i=o?get2(r,e):aCallable$2(n>2?arguments[2]:void 0)(e,r);return set2(r,e,t(i,e,r)),r}});var call=functionCall,aCallable$1=aCallable$j,isCallable=isCallable$q,anObject=anObject$g,$TypeError$1=TypeError,mapUpsert=function(e,t){var r,n=anObject(this),o=aCallable$1(n.get),i=aCallable$1(n.has),a=aCallable$1(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable(t)&&!isCallable(s))throw $TypeError$1("At least one callback required");return call(i,n,e)?(r=call(o,n,e),isCallable(t)&&(r=t(r),call(a,n,e,r))):isCallable(s)&&(r=s(),call(a,n,e,r)),r},$$4=_export,upsert$1=mapUpsert;$$4({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$3=_export,upsert2=mapUpsert;$$3({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$c=map$3,map$2=parent$c,map$1=map$2,map2=map$1,_Map=getDefaultExportFromCjs(map2);function _typeof(e){return(_typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPrimitive(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var aCallable=aCallable$j,toObject$1=toObject$e,IndexedObject=indexedObject,lengthOfArrayLike$2=lengthOfArrayLike$d,$TypeError=TypeError,createMethod=function(e){return function(t,r,n,o){aCallable(r);var i=toObject$1(t),a=IndexedObject(i),s=lengthOfArrayLike$2(i),l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in a){o=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw $TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(o=r(o,a[l],l,i));return o}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$2=_export,$reduce=arrayReduce.left,arrayMethodIsStrict$1=arrayMethodIsStrict$7,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&engineV8Version>79&&engineV8Version<83,FORCED$1=CHROME_BUG||!arrayMethodIsStrict$1("reduce");$$2({target:"Array",proto:!0,forced:FORCED$1},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var entryVirtual$2=entryVirtual$m,reduce$6=entryVirtual$2("Array").reduce,isPrototypeOf$2=objectIsPrototypeOf,method$2=reduce$6,ArrayPrototype$2=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$2||isPrototypeOf$2(ArrayPrototype$2,e)&&t===ArrayPrototype$2.reduce?method$2:t},parent$b=reduce$5,reduce$4=parent$b,parent$a=reduce$4,reduce$3=parent$a,parent$9=reduce$3,reduce$2=parent$9,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),LogCacheLevel={DEBUG:1,LOG:2,WARN:3,ERROR:4},LOG_MAX_SIZE=204800,SIMPLE_TYPE=["Boolean","Number","String","Undefined","Null","Date","Object"],Logger=function(){function e(t,r){_classCallCheck(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||LOG_MAX_SIZE,this.logSize=0,this.logTextArray=[]}return _createClass(e,[{key:"debug",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.DEBUG]).call(t,i)),e.disabled||(n=console).debug.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,i))}},{key:"log",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.LOG]).call(t,i)),e.disabled||(n=console).log.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,i))}},{key:"warn",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.WARN]).call(t,i)),e.disabled||(n=console).warn.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,i))}},{key:"error",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.ERROR]).call(t,i)),e.disabled||(n=console).error.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,i))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=_mapInstanceProperty(n).call(n,(function(e){return logable(e)}));t=this._prefix+nowTime()+_JSON$stringify(i)}catch(e){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}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function nowTime(){return(new Date).toLocaleString()}function reduceDepth(e){var t;if("object"!==_typeof(e))return e;var r=_sliceInstanceProperty(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function logable(e,t,r){var n;r||(r=1),t||(t=2);var o={};if(!e||"object"!==_typeof(e))return e;var i=_sliceInstanceProperty(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!_includesInstanceProperty(SIMPLE_TYPE).call(SIMPLE_TYPE,i))return i;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?o[a]=reduceDepth(e[a]):"object"===_typeof(e[a])?o[a]=logable(e[a],t,r+1):o[a]=e[a]);return o}}function createPublicPromise(){var e,t,r=new _Promise((function(r,n){e=r,t=n}));return r.used=!1,r.resolve=function(){return r.used=!0,e.apply(void 0,arguments)},r.reject=function(){return r.used=!0,t.apply(void 0,arguments)},r}_defineProperty(Logger,"disabled",!0);var AUDIO=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"}),VIDEO=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 setupDefaultValues(e){return _Object$assign({muted:!1,timeout:250,inline:!1},e)}function startPlayback(e,t){var r=e.muted,n=e.timeout,o=e.inline,i=t(),a=i.element,s=i.source,l=void 0,c=void 0,u=void 0;return a.muted=r,!0===r&&a.setAttribute("muted","muted"),!0===o&&a.setAttribute("playsinline","playsinline"),a.src=s,new _Promise((function(e){l=a.play(),c=_setTimeout((function(){u(!1,new Error("Timeout "+n+" ms has been reached"))}),n),u=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(c),e({result:t,error:r})},void 0!==l?l.then((function(){return u(!0)})).catch((function(e){return u(!1,e)})):u(!0)}))}function video(e){return startPlayback(e=setupDefaultValues(e),(function(){return{element:document.createElement("video"),source:_URL.createObjectURL(VIDEO)}}))}function audio(e){return startPlayback(e=setupDefaultValues(e),(function(){return{element:document.createElement("audio"),source:_URL.createObjectURL(AUDIO)}}))}var index={audio:audio,video:video},logger$2=new Logger("AdsPluginBaseAdManager"),BaseAdManager=function(e){_inherits$1(r,eventemitter3Exports.EventEmitter);var t=_createSuper$1(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$2(this,r),(e=t.call(this)).options=n,e.config=n.config||{},e.plugin=n.plugin,e.player=n.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 _createClass$2(r,[{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=_objectSpread2$1(_objectSpread2$1({},this.config),e):logger$2.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(){logger$2.log("content play"),e.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.addClass(STATE_CLASS.PLAYING),e.state<STATES.RUNNING&&(e.setState(STATES.RUNNING),e.emit(AUTOPLAY_STARTED))})).catch((function(t){if(logger$2.error("content play error",t),e.media&&e.media.error)return e.onError(),void e.removeClass(STATE_CLASS.ENTER)})):e.state<STATES.RUNNING&&(e.setState(STATES.RUNNING),e.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.removeClass(STATE_CLASS.NO_START),e.removeClass(STATE_CLASS.ENTER),e.addClass(STATE_CLASS.PLAYING),e.emit(AUTOPLAY_STARTED))}}]),r}(),logger$1=new Logger("AdsPluginImaAdManager"),CLASS_NAME="xgplayer-ads-playing",ImaAdManager=function(e){_inherits$1(i,BaseAdManager);var t,r,n,o=_createSuper$1(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$2(this,i),_defineProperty$2(_assertThisInitialized$1(e=o.call(this,t)),"_onMediaEnded",(function(){var t;e.isLinearAdRunning||(e._isMediaEnded=!0,null===(t=e.adsLoader)||void 0===t||t.contentComplete())})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaResize",(function(){var t,r=_assertThisInitialized$1(e).player,n=e.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(t=e.adsManager)||void 0===t||t.resize(r.sizeInfo.width,r.sizeInfo.height,n)})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaPlay",(function(){e._mediaPlayed=!0})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaPause",(function(){e._mediaPlayed=!1})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaVolumeChange",(function(){var t;null===(t=e.adsManager)||void 0===t||t.setVolume(e.player.muted?0:e.player.volume)})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsManagerLoaded",(function(t){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0;var n=e.adsManager=t.getAdsManager(e.mediaElement,r);logger$1.log("AdManager Loaded",n);var o=n.getCuePoints();o.length&&logger$1.log("cuePoints",o),e._initAdsManagerEventListeners(),e.player.emit(IMA_AD_MANAGER_READY,{adsManager:n})})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsManagerAdError",(function(t){e._handleAdError(t.getError()),e._resumeContent()})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsLoaderAdError",(function(t){e._handleAdError(t.getError())})),_defineProperty$2(_assertThisInitialized$1(e),"_handleAdError",(function(t){var r,n,o;logger$1.log("AdError",t),e.shouldBlockVideoContent=!1,e.isLinearAdRunning=!1,null===(r=e.adsManager)||void 0===r||r.destroy(),null===(n=e.plugin)||void 0===n||n.emit(IMA_AD_ERROR,t),null===(o=e.plugin)||void 0===o||o.emit(AD_ERROR,t)})),_defineProperty$2(_assertThisInitialized$1(e),"onAdEvent",(function(t){var r,n=_assertThisInitialized$1(e).player,o=null==t?void 0:t.getAd(),i=(null==t?void 0:t.getAdData())||(null==o?void 0:o.data),a=!1;switch(null==t?void 0:t.type){case google.ima.AdEvent.Type.AD_BREAK_READY:e.player.emit(IMA_AD_BREAK_READY,{ad:o});break;case google.ima.AdEvent.Type.LOADED:var s=(i||{}).adPodInfo,l=0===(null==s?void 0:s.podIndex);a=!0,l&&(o.isLinear()?e.shouldBlockVideoContent=!0:(e.shouldBlockVideoContent=!1,e.tryContentPlay())),e.emit(IMA_AD_LOADED,{ad:o,isPreroll:l}),e.plugin.emit(IMA_AD_LOADED,{ad:o,isPreroll:l});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e._resumeContent(),e.emit(IMA_CONTENT_RESUME_REQUESTED,{ad:o});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.isLinearAdRunning=!0,e.shouldBlockVideoContent=!0,util$3.addClass(e.player.root,CLASS_NAME),null==n||n.pause(),e.emit(IMA_CONTENT_PAUSE_REQUESTED,{ad:o});break;case google.ima.AdEvent.Type.STARTED:e.plugin.emit(AD_START,{ad:o}),o.isLinear()&&(e._isAdPaused=!1,e.plugin.emit(AD_PLAY,{ad:o}),r=_setInterval((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:e._isAdPaused=!1,e.plugin.emit(AD_PLAY,{ad:o});break;case google.ima.AdEvent.Type.PAUSED:e._isAdPaused=!0,e.plugin.emit(AD_PAUSE,{ad:o});break;case google.ima.AdEvent.Type.SKIPPED:e.plugin.emit(AD_SKIPPED,{ad:o});break;case google.ima.AdEvent.Type.AD_PROGRESS:var c=t.getAdData(),u=c.currentTime,p=c.duration;_Object$assign(e.context,{currentTime:u,duration:p}),e.plugin.emit(AD_TIME_UPDATE,{ad:o});break;case google.ima.AdEvent.Type.COMPLETE:var f=(i||{}).adPodInfo,$=!1;null!=o&&o.isLinear()&&(f&&($=f.adPosition<f.totalAds),clearInterval(r)),e.plugin.emit(IMA_AD_COMPLETE,{ad:o,hasNextInPod:$}),e.plugin.emit(AD_COMPLETE,{ad:o,hasNextInPod:$});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=o&&o.isLinear()&&clearInterval(r),e.plugin.emit(IMA_ALL_ADS_COMPLETED,{ad:o}),e.player.emit(AD_ALL_COMPLETED,{ad:o});break;default:null!=o&&o.isLinear()&&clearInterval(r)}logger$1.log("AdEvent",null==t?void 0:t.type,a?_JSON$stringify((null==t?void 0:t.getAdData())||{}):null==t?void 0:t.getAd())})),e.displayContainer=null,e.adsLoader=null,e.adsManager=null,e}return _createClass$2(i,[{key:"init",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().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(IMA_SDK_LOAD_START),e.next=5,this._loadIMASdk();case 5:this.emit(IMA_SDK_LOAD_SUCCESS),e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(1),logger$1.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(IMA_SDK_LOAD_ERROR),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 n.apply(this,arguments)})},{key:"destroy",value:function(){_get$1(_getPrototypeOf$1(i.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 _Promise((function(t,r){if("undefined"!=typeof google&&google.ima)t();else{var n=document.createElement("script"),o=_setTimeout((function(){r(new Error("google.ima sdk load timeout"))}),e.config.loadSdkTimeout||3e3);n.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(e.config.debug?"_debug":"",".js"),n.onload=function(){clearTimeout(o),t()},n.onerror=function(e){clearTimeout(o),r(null==e?void 0:e.message)},document.head.appendChild(n)}}))}},{key:"_initMediaEvents",value:function(){var e=this.player;e.on(VIDEO_RESIZE,this._onMediaResize),e.on(ENDED,this._onMediaEnded),e.on(PLAY,this._onMediaPlay),e.on(PAUSE,this._onMediaPause),e.on(VOLUME_CHANGE,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var e=this.player;e.off(VIDEO_RESIZE,this._onMediaResize),e.off(ENDED,this._onMediaEnded),e.off(PLAY,this._onMediaPlay),e.off(PAUSE,this._onMediaPause),e.off(VOLUME_CHANGE,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(IMA_AD_LOADER_READY,{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:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,o,i=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl,!(r||n||o)){e.next=9;break}return e.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(IMA_AD_MANAGER_READY,(function(){i.autoplayAllowed?i.playAds():i.player.useHooks("play",(function e(){return i.playAds(),i.player.removeHooks("play",e),!1})),i.emit(IMA_READY_TO_PLAY)})),this.player.once(IMA_AD_ERROR,(function(){i.emit(IMA_READY_TO_PLAY)})),e.next=10;break;case 9:this.emit(IMA_READY_TO_PLAY);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.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(e){this._handleAdError(e),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var e=this,t=this.adsManager;t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var r=["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"];_forEachInstanceProperty(r).call(r,(function(r){t.addEventListener(google.ima.AdEvent.Type[r],e.onAdEvent)}))}},{key:"_resumeContent",value:function(){var e;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,util$3.removeClass(this.player.root,CLASS_NAME),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(),util$3.removeClass(this.player.root,CLASS_NAME)}},{key:"requestAds",value:function(){var e,t=this.config,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl,i=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=i.sizeInfo.width,a.linearAdSlotHeight=i.sizeInfo.height,a.nonLinearAdSlotWidth=i.sizeInfo.width,a.nonLinearAdSlotHeight=i.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),o)a.adTagUrl=o;else if(n)a.adsResponse=n;else if(r&&"object"===_typeof$2(r)){var s;_forEachInstanceProperty(s=_Object$keys(r)).call(s,(function(e){a[e]=r[e]}))}logger$1.log("requestAds",_JSON$stringify(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){_get$1(_getPrototypeOf$1(i.prototype),"updateConfig",this).call(this,e),this._initConfig()}},{key:"_checkAutoplaySupport",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,o,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player.config.autoplay,e.next=4,_Promise.all([t?index.video({timeout:800}).then((function(e){return e.result})):_Promise.resolve(!1),t&&this.player.config.autoplayMuted?index.video({timeout:800,muted:!0}).then((function(e){return e.result})):_Promise.resolve(!1)]);case 4:r=e.sent,n=_slicedToArray(r,2),o=n[0],i=n[1],this.autoplayAllowed=o||i,this.autoplayRequiresMuted=!o&&i,logger$1.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),i}(),AD_STATE_CLASS={START:"xgplayer-ad-start",UI_SHOW:"xgplayer-ad-show-ui"},AdPlayIcon=function(e){_inherits$1(r,Play);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck$2(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$2(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=n.getAdPlugin();return t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1})),n}return _createClass$2(r,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var e=this;this.on([AD_PAUSE],(function(){e.animate(!0)})),this.on(AD_PLAY,(function(){e.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),r}(),AdProgress=function(e){_inherits$1(r,Progress);var t=_createSuper$1(r);function r(){return _classCallCheck$2(this,r),t.apply(this,arguments)}return _createClass$2(r,[{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(){_Object$assign(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),_get$1(_getPrototypeOf$1(r.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var e=this;this.on(AD_TIME_UPDATE,(function(){e.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),r}(),AdTimeIcon=function(e){_inherits$1(r,Time);var t=_createSuper$1(r);function r(){return _classCallCheck$2(this,r),t.apply(this,arguments)}return _createClass$2(r,[{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([AD_TIME_UPDATE],(function(t){e.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),r}(),AdUIManager=function(){function e(t,r){_classCallCheck$2(this,e);var n=r.player,o=r.plugin;this.player=n,this.config=t,this.adPlugin=o,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[Play,AdPlayIcon],[Time,AdTimeIcon],[Progress,AdProgress],[Volume,null],[CssFullScreen,null],[Fullscreen,null]],this.init(),this.initEvents()}return _createClass$2(e,[{key:"init",value:function(){var e=this.player,t=this.adUIPlugins,r=this.fragment,n=this.decoratedAdPluginList;_forEachInstanceProperty(n).call(n,(function(n){var o=_slicedToArray(n,2),i=o[0],a=o[1],s=e.getPlugin(i.pluginName);if(s){var l=null;a&&!e.getPlugin(a.pluginName)&&(e.registerPlugin(a),l=e.getPlugin(a.pluginName),r.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,r=this.player;t.on(AD_PLAY,(function(){var e=[STATE_CLASS.NO_START,STATE_CLASS.PAUSED,STATE_CLASS.ENDED,STATE_CLASS.ERROR,STATE_CLASS.REPLAY,STATE_CLASS.LOADING];_forEachInstanceProperty(e).call(e,(function(e){r.removeClass(e)}))})),t.on(AD_START,(function(){e.showAdContainer()})),t.on(AD_COMPLETE,(function(t){t.hasNextInPod||e.hideAdContainer()})),t.on(AD_SKIPPED,(function(){e.hideAdContainer()})),t.on(AD_ERROR,(function(){e.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var e=this.player;util$3.hasClass(e.root,AD_STATE_CLASS.START)||util$3.addClass(e.root,AD_STATE_CLASS.START)}},{key:"hideAdContainer",value:function(){var e=this.player;util$3.hasClass(e.root,AD_STATE_CLASS.START)&&util$3.removeClass(e.root,AD_STATE_CLASS.START)}},{key:"showAdUI",value:function(){var e,t=this.player,r=this.config,n=this.adUIPlugins,o=this.fragment;_forEachInstanceProperty(n).call(n,(function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];if(n){var i=n.root,a=r.root;o.contains(i)&&o.removeChild(i),a.parentNode.insertBefore(i,a),o.appendChild(a)}}));var i=this._getNonAdPlugin();_forEachInstanceProperty(e=_filterInstanceProperty(i).call(i,(function(e){return!!e.root}))).call(e,(function(e){var t=e.root;e.__adStub__||(e.__adStub__=util$3.createDom("xg-ad-stub","",{})),t.parentNode.insertBefore(e.__adStub__,t),o.appendChild(t)}));var a=t.getPlugin("start");a&&a.hide(),!1===r.controls&&t.controls&&this.hideControls(),this.showAdContainer(),t.addClass(AD_STATE_CLASS.UI_SHOW)}},{key:"hideAdUI",value:function(){var e,t,r=this.player,n=this.config,o=this.adUIPlugins,i=this.fragment;_forEachInstanceProperty(o).call(o,(function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];if(n){var o=n.root,a=r.root;i.contains(a)&&i.removeChild(a),i.contains(o)||(o.parentNode.insertBefore(a,o),i.appendChild(o))}}));var a=this._getNonAdPlugin();_forEachInstanceProperty(e=_filterInstanceProperty(a).call(a,(function(e){return!!e.root}))).call(e,(function(e){var t,r,n=e.root;i.contains(n)&&i.removeChild(n),null===(t=e.__adStub__)||void 0===t||null===(r=t.parentNode)||void 0===r||r.insertBefore(n,e.__adStub__)})),!1===n.controls&&i.contains(null===(t=r.controls)||void 0===t?void 0:t.root)&&this.showControls();var s=r.getPlugin("start");if(s){var l=s.config.disableAnimate,c=s.config.isShowPause;l||(s.config.disableAnimate=!0,s.config.isShowPause=!1),r.once("play",(function(){_setTimeout((function(){s.config.disableAnimate=l,s.config.disableAnimate=c}),10)}))}r.removeClass(AD_STATE_CLASS.UI_SHOW)}},{key:"hideControls",value:function(){var e=this.player,t=this.config,r=this.fragment;if(!1===t.controls&&e.controls){var n=e.controls.root,o=n.parentElement,i=n.previousSibling,a=n.nextSibling;this.controlsPos={parentNode:o,previousSibling:i,nextSibling:a},r.appendChild(e.controls.root)}}},{key:"showControls",value:function(){var e=this.player,t=this.config,r=this.fragment;if(!1===t.controls&&e.controls){if(!this.controlsPos)return;var n=e.controls.root;r.contains(n)&&r.removeChild(n);var o=this.controlsPos,i=o.parentNode,a=o.previousSibling,s=o.nextSibling;i&&(s?i.insertBefore(n,s):a?i.insertBefore(n,a.nextSibling):i.appendChild(n)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var e,t=this.player,r=this.decoratedAdPluginList,n=[];_forEachInstanceProperty(r).call(r,(function(e){var t=_slicedToArray(e,2),r=t[0],o=t[1];n.push(r.pluginName.toLowerCase()),o&&n.push(o.pluginName.toLowerCase())}));var o=(null===(e=t.controls)||void 0===e?void 0:e.plugins())||[];return _filterInstanceProperty(o).call(o,(function(e){return-1===_indexOfInstanceProperty(n).call(n,e.pluginName.toLowerCase())}))}}]),e}(),logger=new Logger("AdsPlugin"),AdsPlugin$1=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck$2(this,r),t.apply(this,arguments)}return _createClass$2(r,[{key:"version",get:function(){return"3.0.20-alpha.8"}},{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;logger.log("plugin afterCreate, config: ".concat(_JSON$stringify(e||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){switch(logger.log("plugin beforePlayerInit"),this.initPromise=createPublicPromise(),this.uiManager=new AdUIManager(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 util$3.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 ImaAdManager({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(IMA_SDK_LOAD_START,(function(){e.uiManager.showAdContainer()})),this.csManager.on(IMA_SDK_LOAD_ERROR,(function(){e.uiManager.hideAdContainer()})),this.csManager.once(IMA_AD_LOADED,(function(t){t.isPreroll||e.uiManager.hideAdContainer()})),this.csManager.once(IMA_READY_TO_PLAY,(function(){var t;null===(t=e.initPromise)||void 0===t||t.resolve()})),this.csManager.on(IMA_CONTENT_PAUSE_REQUESTED,(function(){e.uiManager.showAdUI()})),this.csManager.on(IMA_CONTENT_RESUME_REQUESTED,(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 r;null!==(r=e.csManager)&&void 0!==r&&r.shouldBlockVideoContent&&(logger.log("block content play"),t.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),r}();function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=_sliceInstanceProperty$1(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from$1(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol$1&&_getIteratorMethod$1(e)||e["@@iterator"];if(!r){if(_Array$isArray$1(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}var scte35={},descriptors$1={},util$2={};!function(e){_Object$defineProperty(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 _mapInstanceProperty([]).call(e,(function(e,t){var r=(e<=15?"0":"")+e.toString(16);return t>=4&&t<=10&&t%2==0?"-"+r:r})).join("")},e.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);e.shiftThirtyTwoBits=function(t){return t*e.THIRTY_TWO_BIT_MULTIPLIER}}(util$2),_Object$defineProperty(descriptors$1,"__esModule",{value:!0}),descriptors$1.parseDescriptor=descriptors$1.SegmentationMessage=void 0;var SegmentationMessage,util$1=util$2;!function(e){e[e.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",e[e.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",e[e.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",e[e.NONE=3]="NONE"}(SegmentationMessage||(descriptors$1.SegmentationMessage=SegmentationMessage={}));var spliceDescriptor=function(e){var t={},r=0;for(t.spliceDescriptorTag=e.getUint8(r++),t.descriptorLength=e.getUint8(r++),t.identifier="";t.identifier.length<4;)t.identifier+=String.fromCharCode(e.getUint8(r++));return t},parseDescriptor=function(e){var t,r=spliceDescriptor(e),n=6;if(0===r.spliceDescriptorTag)n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===r.spliceDescriptorTag)n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===r.spliceDescriptorTag){var o=r;if(o.segmentationEventId=e.getUint32(n),n+=4,o.segmentationEventCancelIndicator=!!(128&e.getUint8(n++)),!o.segmentationEventCancelIndicator){var i=e.getUint8(n++);o.programSegmentationFlag=!!(128&i),o.segmentationDurationFlag=!!(64&i),o.deliveryNotRestrictedFlag=!!(32&i),o.deliveryNotRestrictedFlag||(o.webDeliveryAllowedFlag=!!(16&i),o.noRegionalBlackoutFlag=!!(8&i),o.archiveAllowedFlag=!!(4&i),o.deviceRestrictions=3&i),o.programSegmentationFlag||(o.componentCount=e.getUint8(n++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+o.componentCount),n+=6*o.componentCount),o.segmentationDurationFlag&&(o.segmentationDuration=util$1.shiftThirtyTwoBits(e.getUint8(n++)),o.segmentationDuration+=e.getUint32(n),n+=4),o.segmentationUpidType=e.getUint8(n++),o.segmentationUpidLength=e.getUint8(n++);var a=o.segmentationUpidLength;for(o.segmentationUpid=new Uint8Array(a);a>=0;)a--,o.segmentationUpid[a]=e.getUint8(n+a);n+=o.segmentationUpidLength,o.segmentationTypeId=e.getUint8(n++),o.segmentNum=e.getUint8(n++),o.segmentsExpected=e.getUint8(n++),n<r.descriptorLength+2&&(52===o.segmentationTypeId||54===o.segmentationTypeId)&&(o.subSegmentNum=e.getUint8(n++),o.subSegmentsExpected=e.getUint8(n++))}}else 3===r.spliceDescriptorTag?(n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(r.spliceDescriptorTag)),n=r.descriptorLength+2);n!==r.descriptorLength+2&&console.error(_concatInstanceProperty(t="scte35-js Error reading descriptor offset @".concat(n," of ")).call(t,r.descriptorLength+2));return r};descriptors$1.parseDescriptor=parseDescriptor;var path=path$t,_for$5=path.Symbol.for,parent$8=_for$5,_for$4=parent$8,parent$7=_for$4,_for$3=parent$7,parent$6=_for$3,_for$2=parent$6,_for$1=_for$2,_for=_for$1,_Symbol$for=getDefaultExportFromCjs(_for),apply=functionApply,toIndexedObject=toIndexedObject$b,toIntegerOrInfinity=toIntegerOrInfinity$6,lengthOfArrayLike$1=lengthOfArrayLike$d,arrayMethodIsStrict=arrayMethodIsStrict$7,min$1=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),FORCED=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED?function(e){if(NEGATIVE_ZERO)return apply($lastIndexOf,this,arguments)||0;var t=toIndexedObject(this),r=lengthOfArrayLike$1(t),n=r-1;for(arguments.length>1&&(n=min$1(n,toIntegerOrInfinity(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$1=_export,lastIndexOf$7=arrayLastIndexOf;$$1({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var entryVirtual$1=entryVirtual$m,lastIndexOf$6=entryVirtual$1("Array").lastIndexOf,isPrototypeOf$1=objectIsPrototypeOf,method$1=lastIndexOf$6,ArrayPrototype$1=Array.prototype,lastIndexOf$5=function(e){var t=e.lastIndexOf;return e===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,e)&&t===ArrayPrototype$1.lastIndexOf?method$1:t},parent$5=lastIndexOf$5,lastIndexOf$4=parent$5,parent$4=lastIndexOf$4,lastIndexOf$3=parent$4,parent$3=lastIndexOf$3,lastIndexOf$2=parent$3,lastIndexOf$1=lastIndexOf$2,lastIndexOf2=lastIndexOf$1,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf2),toObject=toObject$e,toAbsoluteIndex=toAbsoluteIndex$6,lengthOfArrayLike=lengthOfArrayLike$d,deletePropertyOrThrow=deletePropertyOrThrow$3,min=Math.min,arrayCopyWithin=[].copyWithin||function(e,t){var r=toObject(this),n=lengthOfArrayLike(r),o=toAbsoluteIndex(e,n),i=toAbsoluteIndex(t,n),a=arguments.length>2?arguments[2]:void 0,s=min((void 0===a?n:toAbsoluteIndex(a,n))-i,n-o),l=1;for(i<o&&o<i+s&&(l=-1,i+=s-1,o+=s-1);s-- >0;)i in r?r[o]=r[i]:deletePropertyOrThrow(r,o),o+=l,i+=l;return r},$=_export,copyWithin$7=arrayCopyWithin;$({target:"Array",proto:!0},{copyWithin:copyWithin$7});var entryVirtual=entryVirtual$m,copyWithin$6=entryVirtual("Array").copyWithin,isPrototypeOf=objectIsPrototypeOf,method=copyWithin$6,ArrayPrototype=Array.prototype,copyWithin$5=function(e){var t=e.copyWithin;return e===ArrayPrototype||isPrototypeOf(ArrayPrototype,e)&&t===ArrayPrototype.copyWithin?method:t},parent$2=copyWithin$5,copyWithin$4=parent$2,parent$1=copyWithin$4,copyWithin$3=parent$1,parent=copyWithin$3,copyWithin$2=parent,copyWithin$1=copyWithin$2,copyWithin2=copyWithin$1,_copyWithinInstanceProperty=getDefaultExportFromCjs(copyWithin2),buffer={},base64Js={};base64Js.byteLength=byteLength,base64Js.toByteArray=toByteArray,base64Js.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=_indexOfInstanceProperty(e).call(e,"=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function byteLength(e){var t=getLens(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function _byteLength(e,t,r){return 3*(t+r)/4-r}function toByteArray(e){var t,r,n=getLens(e),o=n[0],i=n[1],a=new Arr(_byteLength(e,o,i)),s=0,l=i>0?o-4:o;for(r=0;r<l;r+=4)t=revLookup[e.charCodeAt(r)]<<18|revLookup[e.charCodeAt(r+1)]<<12|revLookup[e.charCodeAt(r+2)]<<6|revLookup[e.charCodeAt(r+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===i&&(t=revLookup[e.charCodeAt(r)]<<2|revLookup[e.charCodeAt(r+1)]>>4,a[s++]=255&t),1===i&&(t=revLookup[e.charCodeAt(r)]<<10|revLookup[e.charCodeAt(r+1)]<<4|revLookup[e.charCodeAt(r+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(tripletToBase64(n));return o.join("")}function fromByteArray(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(encodeChunk(e,a,a+i>s?s:a+i));return 1===n?(t=e[r-1],o.push(lookup[t>>2]+lookup[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),o.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var ieee754={
1
+ function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var defineProperty$e={exports:{}},check=function(e){return e&&e.Math==Math&&e},global$r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),fails$A=function(e){try{return!!e()}catch(e){return!0}},fails$z=fails$A,functionBindNative=!fails$z((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$3=Function.prototype,apply$7=FunctionPrototype$3.apply,call$r=FunctionPrototype$3.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$4?call$r.bind(apply$7):function(){return call$r.apply(apply$7,arguments)}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$2=Function.prototype,call$q=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$2.bind.bind(call$q,call$q),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$q.apply(e,arguments)}},uncurryThis$A=functionUncurryThis,toString$g=uncurryThis$A({}.toString),stringSlice$4=uncurryThis$A("".slice),classofRaw$2=function(e){return stringSlice$4(toString$g(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$z=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$z(e)},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$q=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$y=fails$A,descriptors$2=!fails$y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$p=Function.prototype.call,functionCall=NATIVE_BIND$2?call$p.bind(call$p):function(){return call$p.apply(call$p,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$b=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$b&&!$propertyIsEnumerable$1.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$b(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$1;var match,version,createPropertyDescriptor$8=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$y=functionUncurryThis,fails$x=fails$A,classof$e=classofRaw$2,$Object$4=Object,split$3=uncurryThis$y("".split),indexedObject=fails$x((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$e(e)?split$3(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$6=function(e){return null==e},isNullOrUndefined$5=isNullOrUndefined$6,$TypeError$k=TypeError,requireObjectCoercible$7=function(e){if(isNullOrUndefined$5(e))throw $TypeError$k("Can't call method on "+e);return e},IndexedObject$3=indexedObject,requireObjectCoercible$6=requireObjectCoercible$7,toIndexedObject$b=function(e){return IndexedObject$3(requireObjectCoercible$6(e))},isCallable$p=isCallable$q,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$l=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$p(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$p(e)},path$t={},path$s=path$t,global$q=global$r,isCallable$o=isCallable$q,aFunction=function(e){return isCallable$o(e)?e:void 0},getBuiltIn$h=function(e,t){return arguments.length<2?aFunction(path$s[e])||aFunction(global$q[e]):path$s[e]&&path$s[e][t]||global$q[e]&&global$q[e][t]},uncurryThis$x=functionUncurryThis,objectIsPrototypeOf=uncurryThis$x({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$p=global$r,userAgent$6=engineUserAgent,process$4=global$p.process,Deno$1=global$p.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&userAgent$6&&(!(match=userAgent$6.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$6.match(/Chrome\/(\d+)/))&&(version=+match[1]);var engineV8Version=version,V8_VERSION$3=engineV8Version,fails$w=fails$A,global$o=global$r,$String$5=global$o.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$w((function(){var e=Symbol();return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$g=getBuiltIn$h,isCallable$n=isCallable$q,isPrototypeOf$q=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$g("Symbol");return isCallable$n(t)&&isPrototypeOf$q(t.prototype,$Object$3(e))},$String$4=String,tryToString$7=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$m=isCallable$q,tryToString$6=tryToString$7,$TypeError$j=TypeError,aCallable$j=function(e){if(isCallable$m(e))return e;throw $TypeError$j(tryToString$6(e)+" is not a function")},aCallable$i=aCallable$j,isNullOrUndefined$4=isNullOrUndefined$6,getMethod$3=function(e,t){var r=e[t];return isNullOrUndefined$4(r)?void 0:aCallable$i(r)},call$o=functionCall,isCallable$l=isCallable$q,isObject$k=isObject$l,$TypeError$i=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$l(r=e.toString)&&!isObject$k(n=call$o(r,e)))return n;if(isCallable$l(r=e.valueOf)&&!isObject$k(n=call$o(r,e)))return n;if("string"!==t&&isCallable$l(r=e.toString)&&!isObject$k(n=call$o(r,e)))return n;throw $TypeError$i("Can't convert object to primitive value")},shared$7={exports:{}},isPure=!0,global$n=global$r,defineProperty$d=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$d(global$n,e,{value:t,configurable:!0,writable:!0})}catch(r){global$n[e]=t}return t},global$m=global$r,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$m[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$7.exports=function(e,t){return store$2[e]||(store$2[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 sharedExports=shared$7.exports,requireObjectCoercible$5=requireObjectCoercible$7,$Object$2=Object,toObject$f=function(e){return $Object$2(requireObjectCoercible$5(e))},uncurryThis$w=functionUncurryThis,toObject$e=toObject$f,hasOwnProperty=uncurryThis$w({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$e(e),t)},uncurryThis$v=functionUncurryThis,id$1=0,postfix=Math.random(),toString$f=uncurryThis$v(1..toString),uid$4=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$f(++id$1+postfix,36)},global$l=global$r,shared$6=sharedExports,hasOwn$j=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$l.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$q=function(e){return hasOwn$j(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$4&&hasOwn$j(Symbol$5,e)?Symbol$5[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$n=functionCall,isObject$j=isObject$l,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$p=wellKnownSymbol$q,$TypeError$h=TypeError,TO_PRIMITIVE=wellKnownSymbol$p("toPrimitive"),toPrimitive$7=function(e,t){if(!isObject$j(e)||isSymbol$4(e))return e;var r,n=getMethod$2(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$n(n,e,t),!isObject$j(r)||isSymbol$4(r))return r;throw $TypeError$h("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$6=toPrimitive$7,isSymbol$3=isSymbol$5,toPropertyKey$4=function(e){var t=toPrimitive$6(e,"string");return isSymbol$3(t)?t:t+""},global$k=global$r,isObject$i=isObject$l,document$3=global$k.document,EXISTS$1=isObject$i(document$3)&&isObject$i(document$3.createElement),documentCreateElement$1=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$k=descriptors$2,fails$v=fails$A,createElement$1=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$k&&!fails$v((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$j=descriptors$2,call$m=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$7=createPropertyDescriptor$8,toIndexedObject$a=toIndexedObject$b,toPropertyKey$3=toPropertyKey$4,hasOwn$i=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$j?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$a(e),t=toPropertyKey$3(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$i(e,t))return createPropertyDescriptor$7(!call$m(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$u=fails$A,isCallable$k=isCallable$q,replacement=/#|\.prototype\./,isForced$2=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$k(t)?fails$u(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,uncurryThis$u=functionUncurryThisClause,aCallable$h=aCallable$j,NATIVE_BIND$1=functionBindNative,bind$r=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$h(e),void 0===t?e:NATIVE_BIND$1?bind$r(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$i=descriptors$2,fails$t=fails$A,v8PrototypeDefineBug=DESCRIPTORS$i&&fails$t((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$h=isObject$l,$String$3=String,$TypeError$g=TypeError,anObject$g=function(e){if(isObject$h(e))return e;throw $TypeError$g($String$3(e)+" is not an object")},DESCRIPTORS$h=descriptors$2,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$2=toPropertyKey$4,$TypeError$f=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$h?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty$1(e,t,r)}:$defineProperty$1:function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$f("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$g=descriptors$2,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$6=createPropertyDescriptor$8,createNonEnumerableProperty$9=DESCRIPTORS$g?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$6(1,r))}:function(e,t,r){return e[t]=r,e},global$j=global$r,apply$6=functionApply,uncurryThis$t=functionUncurryThisClause,isCallable$j=isCallable$q,getOwnPropertyDescriptor$a=objectGetOwnPropertyDescriptor.f,isForced$1=isForced_1,path$r=path$t,bind$q=functionBindContext,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$h=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return apply$6(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,o,i,a,s,l,c,u,p=e.target,f=e.global,$=e.stat,y=e.proto,h=f?global$j:$?global$j[p]:(global$j[p]||{}).prototype,d=f?path$r:path$r[p]||createNonEnumerableProperty$8(path$r,p,{})[p],g=d.prototype;for(i in t)n=!(r=isForced$1(f?i:p+($?".":"#")+i,e.forced))&&h&&hasOwn$h(h,i),s=d[i],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$a(h,i))&&u.value:h[i]),a=n&&l?l:t[i],n&&typeof s==typeof a||(c=e.bind&&n?bind$q(a,global$j):e.wrap&&n?wrapConstructor(a):y&&isCallable$j(a)?uncurryThis$t(a):a,(e.sham||a&&a.sham||s&&s.sham)&&createNonEnumerableProperty$8(c,"sham",!0),createNonEnumerableProperty$8(d,i,c),y&&(hasOwn$h(path$r,o=p+"Prototype")||createNonEnumerableProperty$8(path$r,o,{}),createNonEnumerableProperty$8(path$r[o],i,a),e.real&&g&&(r||!g[i])&&createNonEnumerableProperty$8(g,i,a)))},$$1k=_export,DESCRIPTORS$f=descriptors$2,defineProperty$c=objectDefineProperty.f;$$1k({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$c,sham:!DESCRIPTORS$f},{defineProperty:defineProperty$c});var path$q=path$t,Object$4=path$q.Object,defineProperty$b=defineProperty$e.exports=function(e,t,r){return Object$4.defineProperty(e,t,r)};Object$4.defineProperty.sham&&(defineProperty$b.sham=!0);var definePropertyExports=defineProperty$e.exports,parent$2j=definePropertyExports,defineProperty$a=parent$2j,parent$2i=defineProperty$a,defineProperty$9=parent$2i,parent$2h=defineProperty$9,defineProperty$8=parent$2h,defineProperty$7=defineProperty$8,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$7),classof$d=classofRaw$2,isArray$d=Array.isArray||function(e){return"Array"==classof$d(e)},ceil$1=Math.ceil,floor$4=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$4:ceil$1)(t)},trunc2=mathTrunc,toIntegerOrInfinity$6=function(e){var t=+e;return t!=t||0===t?0:trunc2(t)},toIntegerOrInfinity$5=toIntegerOrInfinity$6,min$4=Math.min,toLength$2=function(e){return e>0?min$4(toIntegerOrInfinity$5(e),9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$e=function(e){return toLength$1(e.length)},$TypeError$e=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$3=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$e("Maximum allowed index exceeded");return e},toPropertyKey$1=toPropertyKey$4,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$8,createProperty$6=function(e,t,r){var n=toPropertyKey$1(t);n in e?definePropertyModule$3.f(e,n,createPropertyDescriptor$5(0,r)):e[n]=r},wellKnownSymbol$o=wellKnownSymbol$q,TO_STRING_TAG$4=wellKnownSymbol$o("toStringTag"),test$2={};test$2[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$2),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$i=isCallable$q,classofRaw=classofRaw$2,wellKnownSymbol$n=wellKnownSymbol$q,TO_STRING_TAG$3=wellKnownSymbol$n("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$c=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$1(e),TO_STRING_TAG$3))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable$i(t.callee)?"Arguments":n},uncurryThis$s=functionUncurryThis,isCallable$h=isCallable$q,store$1=sharedStore,functionToString=uncurryThis$s(Function.toString);isCallable$h(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$1.inspectSource,uncurryThis$r=functionUncurryThis,fails$s=fails$A,isCallable$g=isCallable$q,classof$b=classof$c,getBuiltIn$f=getBuiltIn$h,inspectSource$1=inspectSource$2,noop=function(){},empty=[],construct$7=getBuiltIn$f("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$4=uncurryThis$r(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$g(e))return!1;try{return construct$7(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$g(e))return!1;switch(classof$b(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$4(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$7||fails$s((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isArray$c=isArray$d,isConstructor$3=isConstructor$4,isObject$g=isObject$l,wellKnownSymbol$m=wellKnownSymbol$q,SPECIES$5=wellKnownSymbol$m("species"),$Array$3=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$c(e)&&(t=e.constructor,(isConstructor$3(t)&&(t===$Array$3||isArray$c(t.prototype))||isObject$g(t)&&null===(t=t[SPECIES$5]))&&(t=void 0)),void 0===t?$Array$3:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},fails$r=fails$A,wellKnownSymbol$l=wellKnownSymbol$q,V8_VERSION$2=engineV8Version,SPECIES$4=wellKnownSymbol$l("species"),arrayMethodHasSpeciesSupport$5=function(e){return V8_VERSION$2>=51||!fails$r((function(){var t=[];return(t.constructor={})[SPECIES$4]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$1j=_export,fails$q=fails$A,isArray$b=isArray$d,isObject$f=isObject$l,toObject$d=toObject$f,lengthOfArrayLike$d=lengthOfArrayLike$e,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$k=wellKnownSymbol$q,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$k("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$q((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$f(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$b(e)},FORCED$a=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$1j({target:"Array",proto:!0,arity:1,forced:FORCED$a},{concat:function(e){var t,r,n,o,i,a=toObject$d(this),s=arraySpeciesCreate$2(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(i=-1===t?a:arguments[t]))for(o=lengthOfArrayLike$d(i),doesNotExceedSafeInteger$2(l+o),r=0;r<o;r++,l++)r in i&&createProperty$5(s,l,i[r]);else doesNotExceedSafeInteger$2(l+1),createProperty$5(s,l++,i);return s.length=l,s}});var classof$a=classof$c,$String$2=String,toString$e=function(e){if("Symbol"===classof$a(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$2(e)},objectDefineProperties={},toIntegerOrInfinity$4=toIntegerOrInfinity$6,max$3=Math.max,min$3=Math.min,toAbsoluteIndex$6=function(e,t){var r=toIntegerOrInfinity$4(e);return r<0?max$3(r+t,0):min$3(r,t)},toIndexedObject$9=toIndexedObject$b,toAbsoluteIndex$5=toAbsoluteIndex$6,lengthOfArrayLike$c=lengthOfArrayLike$e,createMethod$5=function(e){return function(t,r,n){var o,i=toIndexedObject$9(t),a=lengthOfArrayLike$c(i),s=toAbsoluteIndex$5(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$q=functionUncurryThis,hasOwn$g=hasOwnProperty_1,toIndexedObject$8=toIndexedObject$b,indexOf$7=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$h=uncurryThis$q([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$8(e),o=0,i=[];for(r in n)!hasOwn$g(hiddenKeys$5,r)&&hasOwn$g(n,r)&&push$h(i,r);for(;t.length>o;)hasOwn$g(n,r=t[o++])&&(~indexOf$7(i,r)||push$h(i,r));return i},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$3=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$e=descriptors$2,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$e=anObject$g,toIndexedObject$7=toIndexedObject$b,objectKeys$2=objectKeys$3;objectDefineProperties.f=DESCRIPTORS$e&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$e(e);for(var r,n=toIndexedObject$7(t),o=objectKeys$2(t),i=o.length,a=0;i>a;)definePropertyModule$2.f(e,r=o[a++],n[r]);return e};var activeXDocument,getBuiltIn$e=getBuiltIn$h,html$2=getBuiltIn$e("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$6=shared$5("keys"),sharedKey$4=function(e){return keys$6[e]||(keys$6[e]=uid$2(e))},anObject$d=anObject$g,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html$1=html$2,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$d(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertyNamesExternal={},toAbsoluteIndex$4=toAbsoluteIndex$6,lengthOfArrayLike$b=lengthOfArrayLike$e,createProperty$4=createProperty$6,$Array$2=Array,max$2=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$b(e),o=toAbsoluteIndex$4(t,n),i=toAbsoluteIndex$4(void 0===r?n:r,n),a=$Array$2(max$2(i-o,0)),s=0;o<i;o++,s++)createProperty$4(a,s,e[o]);return a.length=s,a},classof$9=classofRaw$2,toIndexedObject$6=toIndexedObject$b,$getOwnPropertyNames$1=objectGetOwnPropertyNames.f,arraySlice$8=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames$1(e)}catch(e){return arraySlice$8(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$9(e)?getWindowNames(e):$getOwnPropertyNames$1(toIndexedObject$6(e))};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$8=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$7(e,t,r),e},defineProperty$6=objectDefineProperty,defineBuiltInAccessor$5=function(e,t,r){return defineProperty$6.f(e,t,r)},wellKnownSymbolWrapped={},wellKnownSymbol$j=wellKnownSymbol$q;wellKnownSymbolWrapped.f=wellKnownSymbol$j;var set$7,get$9,has$2,path$p=path$t,hasOwn$f=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$5=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$p.Symbol||(path$p.Symbol={});hasOwn$f(t,e)||defineProperty$5(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$l=functionCall,getBuiltIn$d=getBuiltIn$h,wellKnownSymbol$i=wellKnownSymbol$q,defineBuiltIn$7=defineBuiltIn$8,symbolDefineToPrimitive=function(){var e=getBuiltIn$d("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$i("toPrimitive");t&&!t[n]&&defineBuiltIn$7(t,n,(function(e){return call$l(r,this)}),{arity:1})},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$8=classof$c,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$8(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$4=objectDefineProperty.f,createNonEnumerableProperty$6=createNonEnumerableProperty$9,hasOwn$e=hasOwnProperty_1,toString$d=objectToString,wellKnownSymbol$h=wellKnownSymbol$q,TO_STRING_TAG$2=wellKnownSymbol$h("toStringTag"),setToStringTag$9=function(e,t,r,n){if(e){var o=r?e:e.prototype;hasOwn$e(o,TO_STRING_TAG$2)||defineProperty$4(o,TO_STRING_TAG$2,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$6(o,"toString",toString$d)}},global$i=global$r,isCallable$f=isCallable$q,WeakMap$1=global$i.WeakMap,weakMapBasicDetection=isCallable$f(WeakMap$1)&&/native code/.test(String(WeakMap$1)),NATIVE_WEAK_MAP=weakMapBasicDetection,global$h=global$r,isObject$e=isObject$l,createNonEnumerableProperty$5=createNonEnumerableProperty$9,hasOwn$d=hasOwnProperty_1,shared$4=sharedStore,sharedKey$2=sharedKey$4,hiddenKeys$2=hiddenKeys$6,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$5=global$h.TypeError,WeakMap=global$h.WeakMap,enforce=function(e){return has$2(e)?get$9(e):set$7(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$e(t)||(r=get$9(t)).type!==e)throw TypeError$5("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$4.state){var store=shared$4.state||(shared$4.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$7=function(e,t){if(store.has(e))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$9=function(e){return store.get(e)||{}},has$2=function(e){return store.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$2[STATE]=!0,set$7=function(e,t){if(hasOwn$d(e,STATE))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$5(e,STATE,t),t},get$9=function(e){return hasOwn$d(e,STATE)?e[STATE]:{}},has$2=function(e){return hasOwn$d(e,STATE)}}var internalState={set:set$7,get:get$9,has:has$2,enforce:enforce,getterFor:getterFor},bind$p=functionBindContext,uncurryThis$p=functionUncurryThis,IndexedObject$2=indexedObject,toObject$c=toObject$f,lengthOfArrayLike$a=lengthOfArrayLike$e,arraySpeciesCreate$1=arraySpeciesCreate$3,push$g=uncurryThis$p([].push),createMethod$4=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(l,c,u,p){for(var f,$,y=toObject$c(l),h=IndexedObject$2(y),d=bind$p(c,u),g=lengthOfArrayLike$a(h),m=0,v=p||arraySpeciesCreate$1,_=t?v(l,g):r||a?v(l,0):void 0;g>m;m++)if((s||m in h)&&($=d(f=h[m],m,y),e))if(t)_[m]=$;else if($)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:push$g(_,f)}else switch(e){case 4:return!1;case 7:push$g(_,f)}return i?-1:n||o?o:_}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$1i=_export,global$g=global$r,call$k=functionCall,uncurryThis$o=functionUncurryThis,DESCRIPTORS$d=descriptors$2,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$p=fails$A,hasOwn$c=hasOwnProperty_1,isPrototypeOf$p=objectIsPrototypeOf,anObject$c=anObject$g,toIndexedObject$5=toIndexedObject$b,toPropertyKey=toPropertyKey$4,$toString$2=toString$e,createPropertyDescriptor$4=createPropertyDescriptor$8,nativeObjectCreate=objectCreate,objectKeys$1=objectKeys$3,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$3=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$6=defineBuiltIn$8,defineBuiltInAccessor$4=defineBuiltInAccessor$5,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$g=wellKnownSymbol$q,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$8=setToStringTag$9,InternalStateModule$7=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$7=InternalStateModule$7.set,getInternalState$2=InternalStateModule$7.getterFor(SYMBOL),ObjectPrototype$2=Object[PROTOTYPE],$Symbol=global$g.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],TypeError$4=global$g.TypeError,QObject=global$g.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$3.f,nativeDefineProperty=definePropertyModule$1.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$f=uncurryThis$o([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDescriptor=DESCRIPTORS$d&&fails$p((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$2,t);n&&delete ObjectPrototype$2[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$2&&nativeDefineProperty(ObjectPrototype$2,t,n)}:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$7(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$d||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$2&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$c(e);var n=toPropertyKey(t);return anObject$c(r),hasOwn$c(AllSymbols,n)?(r.enumerable?(hasOwn$c(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$c(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor$4(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$c(e);var r=toIndexedObject$5(t),n=objectKeys$1(r).concat($getOwnPropertySymbols(r));return $forEach$1(n,(function(t){DESCRIPTORS$d&&!call$k($propertyIsEnumerable,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPropertyKey(e),r=call$k(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$2&&hasOwn$c(AllSymbols,t)&&!hasOwn$c(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$c(this,t)||!hasOwn$c(AllSymbols,t)||hasOwn$c(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$5(e),n=toPropertyKey(t);if(r!==ObjectPrototype$2||!hasOwn$c(AllSymbols,n)||hasOwn$c(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor$1(r,n);return!o||!hasOwn$c(AllSymbols,n)||hasOwn$c(r,HIDDEN)&&r[HIDDEN][n]||(o.enumerable=!0),o}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$5(e)),r=[];return $forEach$1(t,(function(e){hasOwn$c(AllSymbols,e)||hasOwn$c(hiddenKeys$1,e)||push$f(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$2,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$5(e)),n=[];return $forEach$1(r,(function(e){!hasOwn$c(AllSymbols,e)||t&&!hasOwn$c(ObjectPrototype$2,e)||push$f(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$6(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$p(SymbolPrototype,this))throw TypeError$4("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$2(arguments[0]):void 0,t=uid$1(e),r=function(e){this===ObjectPrototype$2&&call$k(r,ObjectPrototypeSymbols,e),hasOwn$c(this,HIDDEN)&&hasOwn$c(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor$4(1,e))};return DESCRIPTORS$d&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$2,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$2(this).tag})),defineBuiltIn$6($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable,definePropertyModule$1.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$3.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$g(e),e)},DESCRIPTORS$d&&defineBuiltInAccessor$4(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}})),$$1i({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach$1(objectKeys$1(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$l(e)})),$$1i({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1i({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$d},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1i({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$8($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$1h=_export,getBuiltIn$c=getBuiltIn$h,hasOwn$b=hasOwnProperty_1,toString$c=toString$e,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$1h({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$c(e);if(hasOwn$b(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$c("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1g=_export,hasOwn$a=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$5=tryToString$7,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$1g({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$2(e))throw TypeError(tryToString$5(e)+" is not a symbol");if(hasOwn$a(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$n=functionUncurryThis,arraySlice$7=uncurryThis$n([].slice),uncurryThis$m=functionUncurryThis,isArray$a=isArray$d,isCallable$e=isCallable$q,classof$7=classofRaw$2,toString$b=toString$e,push$e=uncurryThis$m([].push),getJsonReplacerFunction=function(e){if(isCallable$e(e))return e;if(isArray$a(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$e(r,o):"number"!=typeof o&&"Number"!=classof$7(o)&&"String"!=classof$7(o)||push$e(r,toString$b(o))}var i=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$a(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}},$$1f=_export,getBuiltIn$b=getBuiltIn$h,apply$5=functionApply,call$j=functionCall,uncurryThis$l=functionUncurryThis,fails$o=fails$A,isCallable$d=isCallable$q,isSymbol$1=isSymbol$5,arraySlice$6=arraySlice$7,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String$1=String,$stringify=getBuiltIn$b("JSON","stringify"),exec$3=uncurryThis$l(/./.exec),charAt$5=uncurryThis$l("".charAt),charCodeAt$2=uncurryThis$l("".charCodeAt),replace$5=uncurryThis$l("".replace),numberToString$1=uncurryThis$l(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$o((function(){var e=getBuiltIn$b("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$o((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$6(arguments),n=getReplacerFunction(t);if(isCallable$d(n)||void 0!==e&&!isSymbol$1(e))return r[1]=function(e,t){if(isCallable$d(n)&&(t=call$j(n,this,$String$1(e),t)),!isSymbol$1(t))return t},apply$5($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$5(r,t-1),o=charAt$5(r,t+1);return exec$3(low,e)&&!exec$3(hi,o)||exec$3(hi,e)&&!exec$3(low,n)?"\\u"+numberToString$1(charCodeAt$2(e,0),16):e};$stringify&&$$1f({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$6(arguments),o=apply$5(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$5(o,tester,fixIllFormed):o}});var $$1e=_export,NATIVE_SYMBOL=symbolConstructorDetection,fails$n=fails$A,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,toObject$b=toObject$f,FORCED$9=!NATIVE_SYMBOL||fails$n((function(){getOwnPropertySymbolsModule$2.f(1)}));$$1e({target:"Object",stat:!0,forced:FORCED$9},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$2.f;return t?t(toObject$b(e)):[]}});var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("asyncIterator");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("hasInstance");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("isConcatSpreadable");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("iterator");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("match");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("matchAll");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("replace");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("search");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("species");var defineWellKnownSymbol$b=wellKnownSymbolDefine;defineWellKnownSymbol$b("split");var defineWellKnownSymbol$a=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$a("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$a=getBuiltIn$h,defineWellKnownSymbol$9=wellKnownSymbolDefine,setToStringTag$7=setToStringTag$9;defineWellKnownSymbol$9("toStringTag"),setToStringTag$7(getBuiltIn$a("Symbol"),"Symbol");var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("unscopables");var global$f=global$r,setToStringTag$6=setToStringTag$9;setToStringTag$6(global$f.JSON,"JSON",!0);var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,path$o=path$t,symbol$5=path$o.Symbol,iterators={},DESCRIPTORS$c=descriptors$2,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$c&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$c||DESCRIPTORS$c&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$m=fails$A,correctPrototypeGetter=!fails$m((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$8=hasOwnProperty_1,isCallable$c=isCallable$q,toObject$a=toObject$f,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object.getPrototypeOf:function(e){var t=toObject$a(e);if(hasOwn$8(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$c(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype$1:null},fails$l=fails$A,isCallable$b=isCallable$q,isObject$d=isObject$l,create$c=objectCreate,getPrototypeOf$9=objectGetPrototypeOf,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$f=wellKnownSymbol$q,ITERATOR$8=wellKnownSymbol$f("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$9(getPrototypeOf$9(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$d(IteratorPrototype$1)||fails$l((function(){var e={};return IteratorPrototype$1[ITERATOR$8].call(e)!==e}));isCallable$b((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$c(IteratorPrototype$1))[ITERATOR$8])||defineBuiltIn$5(IteratorPrototype$1,ITERATOR$8,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype=iteratorsCore.IteratorPrototype,create$b=objectCreate,createPropertyDescriptor$3=createPropertyDescriptor$8,setToStringTag$5=setToStringTag$9,Iterators$5=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$b(IteratorPrototype,{next:createPropertyDescriptor$3(+!n,r)}),setToStringTag$5(e,o,!1,!0),Iterators$5[o]=returnThis$1,e},uncurryThis$k=functionUncurryThis,aCallable$g=aCallable$j,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$k(aCallable$g(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$a=isCallable$q,$String=String,$TypeError$d=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$a(e))return e;throw $TypeError$d("Can't set "+$String(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$b=anObject$g,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$b(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1d=_export,call$i=functionCall,FunctionName=functionName,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$8=objectGetPrototypeOf,setToStringTag$4=setToStringTag$9,defineBuiltIn$4=defineBuiltIn$8,wellKnownSymbol$e=wellKnownSymbol$q,Iterators$4=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER;FunctionName.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$7=wellKnownSymbol$e("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,i,a){createIteratorConstructor$1(r,t,n);var s,l,c,u=function(e){if(e===o&&h)return h;if(!BUGGY_SAFARI_ITERATORS&&e in $)return $[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",f=!1,$=e.prototype,y=$[ITERATOR$7]||$["@@iterator"]||o&&$[o],h=!BUGGY_SAFARI_ITERATORS&&y||u(o),d="Array"==t&&$.entries||y;if(d&&(s=getPrototypeOf$8(d.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$4(s,p,!0,!0),Iterators$4[p]=returnThis),PROPER_FUNCTION_NAME$1&&o==VALUES&&y&&y.name!==VALUES&&(f=!0,h=function(){return call$i(y,this)}),o)if(l={values:u(VALUES),keys:i?h:u(KEYS),entries:u(ENTRIES)},a)for(c in l)(BUGGY_SAFARI_ITERATORS||f||!(c in $))&&defineBuiltIn$4($,c,l[c]);else $$1d({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||f},l);return a&&$[ITERATOR$7]!==h&&defineBuiltIn$4($,ITERATOR$7,h,{name:o}),Iterators$4[t]=h,l},createIterResultObject$3=function(e,t){return{value:e,done:t}},toIndexedObject$4=toIndexedObject$b,Iterators$3=iterators,InternalStateModule$6=internalState;objectDefineProperty.f;var defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$3,ARRAY_ITERATOR="Array Iterator",setInternalState$6=InternalStateModule$6.set,getInternalState$1=InternalStateModule$6.getterFor(ARRAY_ITERATOR);defineIterator$2(Array,"Array",(function(e,t){setInternalState$6(this,{type:ARRAY_ITERATOR,target:toIndexedObject$4(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$2(void 0,!0)):createIterResultObject$2("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$3.Arguments=Iterators$3.Array;var domIterables={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},DOMIterables$1=domIterables,global$e=global$r,classof$6=classof$c,createNonEnumerableProperty$4=createNonEnumerableProperty$9,Iterators$2=iterators,wellKnownSymbol$d=wellKnownSymbol$q,TO_STRING_TAG$1=wellKnownSymbol$d("toStringTag");for(var COLLECTION_NAME in DOMIterables$1){var Collection=global$e[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$6(CollectionPrototype)!==TO_STRING_TAG$1&&createNonEnumerableProperty$4(CollectionPrototype,TO_STRING_TAG$1,COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array}var parent$2g=symbol$5,symbol$4=parent$2g,defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var parent$2f=symbol$4,symbol$3=parent$2f,defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("asyncDispose");var $$1c=_export,getBuiltIn$9=getBuiltIn$h,uncurryThis$j=functionUncurryThis,Symbol$4=getBuiltIn$9("Symbol"),keyFor2=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$j(Symbol$4.prototype.valueOf);$$1c({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}}});for(var $$1b=_export,shared=sharedExports,getBuiltIn$8=getBuiltIn$h,uncurryThis$i=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$c=wellKnownSymbol$q,Symbol$3=getBuiltIn$8("Symbol"),$isWellKnown=Symbol$3.isWellKnown,getOwnPropertyNames4=getBuiltIn$8("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$i(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks"),i$1=0,symbolKeys=getOwnPropertyNames4(Symbol$3),symbolKeysLength=symbolKeys.length;i$1<symbolKeysLength;i$1++)try{var symbolKey=symbolKeys[i$1];isSymbol(Symbol$3[symbolKey])&&wellKnownSymbol$c(symbolKey)}catch(e){}$$1b({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames4(WellKnownSymbolsStore),o=n.length;r<o;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("matcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("metadataKey");var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("observable");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadata");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$2e=symbol$3,symbol$2=parent$2e,symbol$1=symbol$2,_Symbol$1=getDefaultExportFromCjs(symbol$1),uncurryThis$h=functionUncurryThis,toIntegerOrInfinity$3=toIntegerOrInfinity$6,toString$a=toString$e,requireObjectCoercible$4=requireObjectCoercible$7,charAt$4=uncurryThis$h("".charAt),charCodeAt$1=uncurryThis$h("".charCodeAt),stringSlice$3=uncurryThis$h("".slice),createMethod$3=function(e){return function(t,r){var n,o,i=toString$a(requireObjectCoercible$4(t)),a=toIntegerOrInfinity$3(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$1(i,a))<55296||n>56319||a+1===s||(o=charCodeAt$1(i,a+1))<56320||o>57343?e?charAt$4(i,a):n:e?stringSlice$3(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$3=stringMultibyte.charAt,toString$9=toString$e,InternalStateModule$5=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState=InternalStateModule$5.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",(function(e){setInternalState$5(this,{type:STRING_ITERATOR,string:toString$9(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$1(void 0,!0):(e=charAt$3(r,n),t.index+=e.length,createIterResultObject$1(e,!1))}));var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$2d=iterator$5,iterator$4=parent$2d,parent$2c=iterator$4,iterator$3=parent$2c,parent$2b=iterator$3,iterator$2=parent$2b,iterator$1=iterator$2,_Symbol$iterator$1=getDefaultExportFromCjs(iterator$1);function _typeof$3(e){return(_typeof$3="function"==typeof _Symbol$1&&"symbol"==typeof _Symbol$iterator$1?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol$1&&e.constructor===_Symbol$1&&e!==_Symbol$1.prototype?"symbol":typeof e})(e)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$5=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$2a=toPrimitive$5,toPrimitive$4=parent$2a,parent$29=toPrimitive$4,toPrimitive$3=parent$29,parent$28=toPrimitive$3,toPrimitive$2=parent$28,toPrimitive$1=toPrimitive$2,_Symbol$toPrimitive$1=getDefaultExportFromCjs(toPrimitive$1);function _toPrimitive$3(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive$1];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$3(e){var t=_toPrimitive$3(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}function _defineProperties$3(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty$1(e,_toPropertyKey$3(n.key),n)}}function _createClass$3(e,t,r){return t&&_defineProperties$3(e.prototype,t),r&&_defineProperties$3(e,r),_Object$defineProperty$1(e,"prototype",{writable:!1}),e}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hasOwn$7=hasOwnProperty_1,isDataDescriptor$1=function(e){return void 0!==e&&(hasOwn$7(e,"value")||hasOwn$7(e,"writable"))},$$1a=_export,call$h=functionCall,isObject$c=isObject$l,anObject$a=anObject$g,isDataDescriptor=isDataDescriptor$1,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,getPrototypeOf$7=objectGetPrototypeOf;function get$8(e,t){var r,n,o=arguments.length<3?e:arguments[2];return anObject$a(e)===o?e[t]:(r=getOwnPropertyDescriptorModule$2.f(e,t))?isDataDescriptor(r)?r.value:void 0===r.get?void 0:call$h(r.get,o):isObject$c(n=getPrototypeOf$7(e))?get$8(n,t,o):void 0}$$1a({target:"Reflect",stat:!0},{get:get$8});var path$n=path$t,get$7=path$n.Reflect.get,parent$27=get$7,get$6=parent$27,parent$26=get$6,get$5=parent$26,parent$25=get$5,get$4=parent$25,get$3=get$4,_Reflect$get$1=getDefaultExportFromCjs(get$3),uncurryThis$g=functionUncurryThis,aCallable$f=aCallable$j,isObject$b=isObject$l,hasOwn$6=hasOwnProperty_1,arraySlice$5=arraySlice$7,NATIVE_BIND=functionBindNative,$Function=Function,concat$9=uncurryThis$g([].concat),join$3=uncurryThis$g([].join),factories={},construct$6=function(e,t,r){if(!hasOwn$6(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=$Function("C,a","return new C("+join$3(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$f(this),r=t.prototype,n=arraySlice$5(arguments,1),o=function(){var r=concat$9(n,arraySlice$5(arguments));return this instanceof o?construct$6(t,r.length,r):t.apply(e,r)};return isObject$b(r)&&(o.prototype=r),o},$$19=_export,bind$o=functionBind;$$19({target:"Function",proto:!0,forced:Function.bind!==bind$o},{bind:bind$o});var path$m=path$t,entryVirtual$n=function(e){return path$m[e+"Prototype"]},entryVirtual$m=entryVirtual$n,bind$n=entryVirtual$m("Function").bind,isPrototypeOf$o=objectIsPrototypeOf,method$k=bind$n,FunctionPrototype=Function.prototype,bind$m=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$o(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$k:t},parent$24=bind$m,bind$l=parent$24,parent$23=bind$l,bind$k=parent$23,parent$22=bind$k,bind$j=parent$22,bind$i=bind$j,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$i),getOwnPropertyDescriptor$9={exports:{}},$$18=_export,fails$k=fails$A,toIndexedObject$3=toIndexedObject$b,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$b=descriptors$2,FORCED$8=!DESCRIPTORS$b||fails$k((function(){nativeGetOwnPropertyDescriptor(1)}));$$18({target:"Object",stat:!0,forced:FORCED$8,sham:!DESCRIPTORS$b},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(e),t)}});var path$l=path$t,Object$3=path$l.Object,getOwnPropertyDescriptor$8=getOwnPropertyDescriptor$9.exports=function(e,t){return Object$3.getOwnPropertyDescriptor(e,t)};Object$3.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$8.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$9.exports,parent$21=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$7=parent$21,parent$20=getOwnPropertyDescriptor$7,getOwnPropertyDescriptor$6=parent$20,parent$1$=getOwnPropertyDescriptor$6,getOwnPropertyDescriptor$5=parent$1$,getOwnPropertyDescriptor$4=getOwnPropertyDescriptor$5,_Object$getOwnPropertyDescriptor$1=getDefaultExportFromCjs(getOwnPropertyDescriptor$4),$$17=_export,setPrototypeOf$7=objectSetPrototypeOf;$$17({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$7});var path$k=path$t,setPrototypeOf$6=path$k.Object.setPrototypeOf,parent$1_=setPrototypeOf$6,setPrototypeOf$5=parent$1_,parent$1Z=setPrototypeOf$5,setPrototypeOf$4=parent$1Z,parent$1Y=setPrototypeOf$4,setPrototypeOf$3=parent$1Y,setPrototypeOf$2=setPrototypeOf$3,_Object$setPrototypeOf$1=getDefaultExportFromCjs(setPrototypeOf$2),$$16=_export,fails$j=fails$A,toObject$9=toObject$f,nativeGetPrototypeOf=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,FAILS_ON_PRIMITIVES$2=fails$j((function(){nativeGetPrototypeOf(1)}));$$16({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$9(e))}});var path$j=path$t,getPrototypeOf$6=path$j.Object.getPrototypeOf,parent$1X=getPrototypeOf$6,getPrototypeOf$5=parent$1X,parent$1W=getPrototypeOf$5,getPrototypeOf$4=parent$1W,parent$1V=getPrototypeOf$4,getPrototypeOf$3=parent$1V,getPrototypeOf$2=getPrototypeOf$3,_Object$getPrototypeOf$1=getDefaultExportFromCjs(getPrototypeOf$2);function _getPrototypeOf$2(e){var t;return(_getPrototypeOf$2=_Object$setPrototypeOf$1?_bindInstanceProperty$1(t=_Object$getPrototypeOf$1).call(t):function(e){return e.__proto__||_Object$getPrototypeOf$1(e)})(e)}function _superPropBase$2(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$2(e)););return e}function _get$2(){var e;"undefined"!=typeof Reflect&&_Reflect$get$1?_get$2=_bindInstanceProperty$1(e=_Reflect$get$1).call(e):_get$2=function(e,t,r){var n=_superPropBase$2(e,t);if(n){var o=_Object$getOwnPropertyDescriptor$1(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get$2.apply(this,arguments)}var $$15=_export,DESCRIPTORS$a=descriptors$2,create$a=objectCreate;$$15({target:"Object",stat:!0,sham:!DESCRIPTORS$a},{create:create$a});var path$i=path$t,Object$2=path$i.Object,create$9=function(e,t){return Object$2.create(e,t)},parent$1U=create$9,create$8=parent$1U,parent$1T=create$8,create$7=parent$1T,parent$1S=create$7,create$6=parent$1S,create$5=create$6,_Object$create$1=getDefaultExportFromCjs(create$5);function _setPrototypeOf$2(e,t){var r;return(_setPrototypeOf$2=_Object$setPrototypeOf$1?_bindInstanceProperty$1(r=_Object$setPrototypeOf$1).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create$1(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty$1(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}var isConstructor$2=isConstructor$4,tryToString$4=tryToString$7,$TypeError$c=TypeError,aConstructor$3=function(e){if(isConstructor$2(e))return e;throw $TypeError$c(tryToString$4(e)+" is not a constructor")},$$14=_export,getBuiltIn$7=getBuiltIn$h,apply$4=functionApply,bind$h=functionBind,aConstructor$2=aConstructor$3,anObject$9=anObject$g,isObject$a=isObject$l,create$4=objectCreate,fails$i=fails$A,nativeConstruct=getBuiltIn$7("Reflect","construct"),ObjectPrototype=Object.prototype,push$d=[].push,NEW_TARGET_BUG=fails$i((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$i((function(){nativeConstruct((function(){}))})),FORCED$7=NEW_TARGET_BUG||ARGS_BUG;$$14({target:"Reflect",stat:!0,forced:FORCED$7,sham:FORCED$7},{construct:function(e,t){aConstructor$2(e),anObject$9(t);var r=arguments.length<3?e:aConstructor$2(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e==r){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 n=[null];return apply$4(push$d,n,t),new(apply$4(bind$h,e,n))}var o=r.prototype,i=create$4(isObject$a(o)?o:ObjectPrototype),a=apply$4(e,i,t);return isObject$a(a)?a:i}});var path$h=path$t,construct$5=path$h.Reflect.construct,parent$1R=construct$5,construct$4=parent$1R,parent$1Q=construct$4,construct$3=parent$1Q,parent$1P=construct$3,construct$2=parent$1P,construct$1=construct$2,_Reflect$construct$1=getDefaultExportFromCjs(construct$1);function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!_Reflect$construct$1)return!1;if(_Reflect$construct$1.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _possibleConstructorReturn$2(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(e)}function _createSuper$2(e){var t=_isNativeReflectConstruct$2();return function(){var r,n=_getPrototypeOf$2(e);if(t){var o=_getPrototypeOf$2(this).constructor;r=_Reflect$construct$1(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$2(this,r)}}function _defineProperty$3(e,t,r){return(t=_toPropertyKey$3(t))in e?_Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var entryVirtual$l=entryVirtual$n,concat$8=entryVirtual$l("Array").concat,isPrototypeOf$n=objectIsPrototypeOf,method$j=concat$8,ArrayPrototype$j=Array.prototype,concat$7=function(e){var t=e.concat;return e===ArrayPrototype$j||isPrototypeOf$n(ArrayPrototype$j,e)&&t===ArrayPrototype$j.concat?method$j:t},parent$1O=concat$7,concat$6=parent$1O,parent$1N=concat$6,concat$5=parent$1N,parent$1M=concat$5,concat$4=parent$1M,concat$3=concat$4,concat$2=concat$3,_concatInstanceProperty=getDefaultExportFromCjs(concat$2),AD_START="ad_start",AD_PLAY="ad_play",AD_PAUSE="ad_pause",AD_TIME_UPDATE="ad_time_update",AD_SKIPPED="ad_skipped",AD_ERROR="ad_error",AD_COMPLETE="ad_complete",AD_ALL_COMPLETED="ad_all_completed",IMA_SDK_LOAD_START="ima_sdk_load_start",IMA_SDK_LOAD_SUCCESS="ima_sdk_load_success",IMA_SDK_LOAD_ERROR="ima_sdk_load_error",IMA_AD_LOADER_READY="ima_ad_loader_ready",IMA_AD_MANAGER_READY="ima_ad_manager_ready",IMA_AD_COMPLETE="ima_ad_complete",IMA_ALL_ADS_COMPLETED="ima_all_ads_completed",IMA_AD_ERROR="ima_ad_error",IMA_AD_LOADED="ima_ad_loaded",IMA_AD_BREAK_READY="ima_ad_break_ready",IMA_CONTENT_PAUSE_REQUESTED="ima_content_pause_requested",IMA_CONTENT_RESUME_REQUESTED="ima_content_resume_requested",IMA_READY_TO_PLAY="ima_ready_to_play",path$g=path$t,apply$3=functionApply;path$g.JSON||(path$g.JSON={stringify:JSON.stringify});var stringify$5=function(e,t,r){return apply$3(path$g.JSON.stringify,null,arguments)},parent$1L=stringify$5,stringify$4=parent$1L,parent$1K=stringify$4,stringify$3=parent$1K,parent$1J=stringify$3,stringify$2=parent$1J,stringify$1=stringify$2,stringify2=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify2),symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),classof$5=classof$c,getMethod$1=getMethod$3,isNullOrUndefined$3=isNullOrUndefined$6,Iterators$1=iterators,wellKnownSymbol$b=wellKnownSymbol$q,ITERATOR$6=wellKnownSymbol$b("iterator"),getIteratorMethod$a=function(e){if(!isNullOrUndefined$3(e))return getMethod$1(e,ITERATOR$6)||getMethod$1(e,"@@iterator")||Iterators$1[classof$5(e)]},getIteratorMethod$9=getIteratorMethod$a,getIteratorMethod_1=getIteratorMethod$9,parent$1I=getIteratorMethod_1,getIteratorMethod$8=parent$1I,parent$1H=getIteratorMethod$8,getIteratorMethod$7=parent$1H,parent$1G=getIteratorMethod$7,getIteratorMethod$6=parent$1G,getIteratorMethod$5=getIteratorMethod$6,_getIteratorMethod$1=getDefaultExportFromCjs(getIteratorMethod$5),getIteratorMethod$4=getIteratorMethod$5,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$4),$$13=_export,toObject$8=toObject$f,nativeKeys=objectKeys$3,fails$h=fails$A,FAILS_ON_PRIMITIVES$1=fails$h((function(){nativeKeys(1)}));$$13({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function(e){return nativeKeys(toObject$8(e))}});var path$f=path$t,keys$5=path$f.Object.keys,parent$1F=keys$5,keys$4=parent$1F,parent$1E=keys$4,keys$3=parent$1E,parent$1D=keys$3,keys$2=parent$1D,keys$1=keys$2,keys3=keys$1,_Object$keys=getDefaultExportFromCjs(keys3),path$e=path$t,getOwnPropertySymbols$5=path$e.Object.getOwnPropertySymbols,parent$1C=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1C,parent$1B=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1B,parent$1A=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1A,getOwnPropertySymbols$1=getOwnPropertySymbols$2,getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),$$12=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("filter");$$12({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$k=entryVirtual$n,filter$6=entryVirtual$k("Array").filter,isPrototypeOf$m=objectIsPrototypeOf,method$i=filter$6,ArrayPrototype$i=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$i||isPrototypeOf$m(ArrayPrototype$i,e)&&t===ArrayPrototype$i.filter?method$i:t},parent$1z=filter$5,filter$4=parent$1z,parent$1y=filter$4,filter$3=parent$1y,parent$1x=filter$3,filter$2=parent$1x,filter$1=filter$2,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$3),fails$g=fails$A,arrayMethodIsStrict$7=function(e,t){var r=[][e];return!!r&&fails$g((function(){r.call(null,t||function(){return 1},1)}))},$forEach=arrayIteration.forEach,arrayMethodIsStrict$6=arrayMethodIsStrict$7,STRICT_METHOD$4=arrayMethodIsStrict$6("forEach"),arrayForEach=STRICT_METHOD$4?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)},$$11=_export,forEach$8=arrayForEach;$$11({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});var entryVirtual$j=entryVirtual$n,forEach$7=entryVirtual$j("Array").forEach,parent$1w=forEach$7,forEach$6=parent$1w,classof$4=classof$c,hasOwn$5=hasOwnProperty_1,isPrototypeOf$l=objectIsPrototypeOf,method$h=forEach$6,ArrayPrototype$h=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},forEach$5=function(e){var t=e.forEach;return e===ArrayPrototype$h||isPrototypeOf$l(ArrayPrototype$h,e)&&t===ArrayPrototype$h.forEach||hasOwn$5(DOMIterables,classof$4(e))?method$h:t},parent$1v=forEach$5,forEach$4=parent$1v,parent$1u=forEach$4,forEach$3=parent$1u,forEach$2=forEach$3,_forEachInstanceProperty$1=getDefaultExportFromCjs(forEach$2),forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),getBuiltIn$6=getBuiltIn$h,uncurryThis$f=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$8=anObject$g,concat$1=uncurryThis$f([].concat),ownKeys$4=getBuiltIn$6("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$1.f(anObject$8(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},$$10=_export,DESCRIPTORS$9=descriptors$2,ownKeys$3=ownKeys$4,toIndexedObject$2=toIndexedObject$b,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,createProperty$3=createProperty$6;$$10({target:"Object",stat:!0,sham:!DESCRIPTORS$9},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$2(e),o=getOwnPropertyDescriptorModule$1.f,i=ownKeys$3(n),a={},s=0;i.length>s;)void 0!==(r=o(n,t=i[s++]))&&createProperty$3(a,t,r);return a}});var path$d=path$t,getOwnPropertyDescriptors$5=path$d.Object.getOwnPropertyDescriptors,parent$1t=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1t,parent$1s=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1s,parent$1r=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1r,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$7={exports:{}},$$$=_export,DESCRIPTORS$8=descriptors$2,defineProperties$6=objectDefineProperties.f;$$$({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$8},{defineProperties:defineProperties$6});var path$c=path$t,Object$1=path$c.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$1.defineProperties(e,t)};Object$1.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1q=definePropertiesExports,defineProperties$4=parent$1q,parent$1p=defineProperties$4,defineProperties$3=parent$1p,parent$1o=defineProperties$3,defineProperties$2=parent$1o,defineProperties$1=defineProperties$2,defineProperties4=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties4),defineProperty$3=defineProperty$7,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),create$3=create$5,_Object$create=getDefaultExportFromCjs(create$3),getPrototypeOf$1=getPrototypeOf$2,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$1),setPrototypeOf$1=setPrototypeOf$2,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$1),hasOwn$4=hasOwnProperty_1,ownKeys$2=ownKeys$4,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys$2(t),o=definePropertyModule.f,i=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var s=n[a];hasOwn$4(e,s)||r&&hasOwn$4(r,s)||o(e,s,i(t,s))}},isObject$9=isObject$l,createNonEnumerableProperty$3=createNonEnumerableProperty$9,installErrorCause$1=function(e,t){isObject$9(t)&&"cause"in t&&createNonEnumerableProperty$3(e,"cause",t.cause)},uncurryThis$e=functionUncurryThis,$Error$1=Error,replace$4=uncurryThis$e("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$4(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$f=fails$A,createPropertyDescriptor$2=createPropertyDescriptor$8,errorStackInstallable=!fails$f((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$2(1,7)),7!==e.stack)})),createNonEnumerableProperty$2=createNonEnumerableProperty$9,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$2(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$a=wellKnownSymbol$q,Iterators=iterators,ITERATOR$5=wellKnownSymbol$a("iterator"),ArrayPrototype$g=Array.prototype,isArrayIteratorMethod$2=function(e){return void 0!==e&&(Iterators.Array===e||ArrayPrototype$g[ITERATOR$5]===e)},call$g=functionCall,aCallable$e=aCallable$j,anObject$7=anObject$g,tryToString$3=tryToString$7,getIteratorMethod$3=getIteratorMethod$a,$TypeError$b=TypeError,getIterator$3=function(e,t){var r=arguments.length<2?getIteratorMethod$3(e):t;if(aCallable$e(r))return anObject$7(call$g(r,e));throw $TypeError$b(tryToString$3(e)+" is not iterable")},call$f=functionCall,anObject$6=anObject$g,getMethod=getMethod$3,iteratorClose$2=function(e,t,r){var n,o;anObject$6(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$f(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$6(n),r},bind$g=functionBindContext,call$e=functionCall,anObject$5=anObject$g,tryToString$2=tryToString$7,isArrayIteratorMethod$1=isArrayIteratorMethod$2,lengthOfArrayLike$9=lengthOfArrayLike$e,isPrototypeOf$k=objectIsPrototypeOf,getIterator$2=getIterator$3,getIteratorMethod$2=getIteratorMethod$a,iteratorClose$1=iteratorClose$2,$TypeError$a=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$l=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,p=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),$=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=bind$g(t,u),d=function(e){return n&&iteratorClose$1(n,"normal",e),new Result(!0,e)},g=function(e){return p?(anObject$5(e),y?h(e[0],e[1],d):h(e[0],e[1])):y?h(e,d):h(e)};if(f)n=e.iterator;else if($)n=e;else{if(!(o=getIteratorMethod$2(e)))throw $TypeError$a(tryToString$2(e)+" is not iterable");if(isArrayIteratorMethod$1(o)){for(i=0,a=lengthOfArrayLike$9(e);a>i;i++)if((s=g(e[i]))&&isPrototypeOf$k(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$2(e,o)}for(l=f?e.next:n.next;!(c=call$e(l,n)).done;){try{s=g(c.value)}catch(e){iteratorClose$1(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$k(ResultPrototype,s))return s}return new Result(!1)},toString$8=toString$e,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$8(e)},$$_=_export,isPrototypeOf$j=objectIsPrototypeOf,getPrototypeOf2=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$2=objectCreate,createNonEnumerableProperty$1=createNonEnumerableProperty$9,createPropertyDescriptor$1=createPropertyDescriptor$8,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$k=iterate$l,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$9=wellKnownSymbol$q,TO_STRING_TAG=wellKnownSymbol$9("toStringTag"),$Error=Error,push$c=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$j(AggregateErrorPrototype,this);setPrototypeOf?r=setPrototypeOf($Error(),n?getPrototypeOf2(this):AggregateErrorPrototype):(r=n?this:create$2(AggregateErrorPrototype),createNonEnumerableProperty$1(r,TO_STRING_TAG,"Error")),void 0!==t&&createNonEnumerableProperty$1(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var o=[];return iterate$k(e,push$c,{that:o}),createNonEnumerableProperty$1(r,"errors",o),r};setPrototypeOf?setPrototypeOf($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$2($Error.prototype,{constructor:createPropertyDescriptor$1(1,$AggregateError),message:createPropertyDescriptor$1(1,""),name:createPropertyDescriptor$1(1,"AggregateError")});$$_({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,classof$3=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$3(process),getBuiltIn$5=getBuiltIn$h,defineBuiltInAccessor$3=defineBuiltInAccessor$5,wellKnownSymbol$8=wellKnownSymbol$q,DESCRIPTORS$7=descriptors$2,SPECIES$3=wellKnownSymbol$8("species"),setSpecies$2=function(e){var t=getBuiltIn$5(e);DESCRIPTORS$7&&t&&!t[SPECIES$3]&&defineBuiltInAccessor$3(t,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$i=objectIsPrototypeOf,$TypeError$9=TypeError,anInstance$5=function(e,t){if(isPrototypeOf$i(t,e))return e;throw $TypeError$9("Incorrect invocation")},anObject$4=anObject$g,aConstructor$1=aConstructor$3,isNullOrUndefined$2=isNullOrUndefined$6,wellKnownSymbol$7=wellKnownSymbol$q,SPECIES$2=wellKnownSymbol$7("species"),speciesConstructor$2=function(e,t){var r,n=anObject$4(e).constructor;return void 0===n||isNullOrUndefined$2(r=anObject$4(n)[SPECIES$2])?t:aConstructor$1(r)},$TypeError$8=TypeError,validateArgumentsLength$5=function(e,t){if(e<t)throw $TypeError$8("Not enough arguments");return e},userAgent$5=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$5),global$d=global$r,apply$2=functionApply,bind$f=functionBindContext,isCallable$9=isCallable$q,hasOwn$3=hasOwnProperty_1,fails$e=fails$A,html=html$2,arraySlice$4=arraySlice$7,createElement=documentCreateElement$1,validateArgumentsLength$4=validateArgumentsLength$5,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set$6=global$d.setImmediate,clear=global$d.clearImmediate,process$3=global$d.process,Dispatch=global$d.Dispatch,Function$2=global$d.Function,MessageChannel=global$d.MessageChannel,String$1=global$d.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$e((function(){$location=global$d.location}));var run=function(e){if(hasOwn$3(queue$2,e)){var t=queue$2[e];delete queue$2[e],t()}},runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$d.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$6&&clear||(set$6=function(e){validateArgumentsLength$4(arguments.length,1);var t=isCallable$9(e)?e:Function$2(e),r=arraySlice$4(arguments,1);return queue$2[++counter]=function(){apply$2(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$f(port.postMessage,port)):global$d.addEventListener&&isCallable$9(global$d.postMessage)&&!global$d.importScripts&&$location&&"file:"!==$location.protocol&&!fails$e(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$d.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$6,clear:clear},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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 notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$4=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$4)&&"undefined"!=typeof Pebble,userAgent$3=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$3),global$c=global$r,bind$e=functionBindContext,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$c.MutationObserver||global$c.WebKitMutationObserver,document$2=global$c.document,process$2=global$c.process,Promise$1=global$c.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$c,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise$6=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$e(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$3?notify$1=function(){process$2.nextTick(flush)}:(macrotask=bind$e(macrotask,global$c),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$b=global$r,promiseNativeConstructor=global$b.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$2&&"object"==typeof window&&"object"==typeof document,global$a=global$r,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$8=isCallable$q,isForced=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$6=wellKnownSymbol$q,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$1=wellKnownSymbol$6("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$8(global$a.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",(function(){var e=inspectSource(NativePromiseConstructor$5),t=e!==String(NativePromiseConstructor$5);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$2.catch||!NativePromisePrototype$2.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$5((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$1]=n,!(SUBCLASSING=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$d=aCallable$j,$TypeError$7=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$7("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$d(t),this.reject=aCallable$d(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$Z=_export,IS_NODE$1=engineIsNode,global$9=global$r,call$d=functionCall,defineBuiltIn$3=defineBuiltIn$8,setToStringTag$3=setToStringTag$9,setSpecies$1=setSpecies$2,aCallable$c=aCallable$j,isCallable$7=isCallable$q,isObject$8=isObject$l,anInstance$4=anInstance$5,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$4=internalState,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$6=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$4.getterFor(PROMISE),setInternalState$4=InternalStateModule$4.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$3=global$9.TypeError,document$1=global$9.document,process$1=global$9.process,newPromiseCapability$1=newPromiseCapabilityModule$6.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$9.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$8(e)||!isCallable$7(t=e.then))&&t},callReaction=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),o=!0)),r===e.promise?c(TypeError$3("Promise-chain cycle")):(n=isThenable(r))?call$d(n,r,l,c):l(r)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}},notify=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$9.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(o=global$9["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$d(task,global$9,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process$1.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$d(task,global$9,(function(){var t=e.facade;IS_NODE$1?process$1.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$d=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$3("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$d(n,t,bind$d(internalResolve,r,e),bind$d(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$4(this,PromisePrototype),aCallable$c(e),call$d(Internal,this);var t=getInternalPromiseState(this);try{e(bind$d(internalResolve,t),bind$d(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$4(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$3(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$7(e)||e,n.fail=isCallable$7(t)&&t,n.domain=IS_NODE$1?process$1.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$d(internalResolve,t),this.reject=bind$d(internalReject,t)},newPromiseCapabilityModule$6.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$Z({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$3(PromiseConstructor,PROMISE,!1,!0),setSpecies$1(PROMISE);var wellKnownSymbol$5=wellKnownSymbol$q,ITERATOR$4=wellKnownSymbol$5("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$4]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$2=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$4]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$2,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1((function(e){NativePromiseConstructor$3.all(e).then(void 0,(function(){}))})),$$Y=_export,call$c=functionCall,aCallable$b=aCallable$j,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$4=perform$6,iterate$j=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$Y({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.resolve,o=r.reject,i=perform$4((function(){var r=aCallable$b(t.resolve),i=[],a=0,s=1;iterate$j(e,(function(e){var l=a++,c=!1;s++,call$c(r,t,e).then((function(e){c||(c=!0,i[l]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var $$X=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$X({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$W=_export,call$b=functionCall,aCallable$a=aCallable$j,newPromiseCapabilityModule$4=newPromiseCapability$2,perform$3=perform$6,iterate$i=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$W({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$4.f(t),n=r.reject,o=perform$3((function(){var o=aCallable$a(t.resolve);iterate$i(e,(function(e){call$b(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$V=_export,call$a=functionCall,newPromiseCapabilityModule$3=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$V({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$3.f(this);return call$a(t.reject,void 0,e),t.promise}});var anObject$3=anObject$g,isObject$7=isObject$l,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(e,t){if(anObject$3(e),isObject$7(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$U=_export,getBuiltIn$4=getBuiltIn$h,IS_PURE$1=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$4("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$U({target:"Promise",stat:!0,forced:IS_PURE$1},{resolve:function(e){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,e)}});var $$T=_export,call$9=functionCall,aCallable$9=aCallable$j,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$2=perform$6,iterate$h=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$T({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,o=r.reject,i=perform$2((function(){var r=aCallable$9(t.resolve),o=[],i=0,a=1;iterate$h(e,(function(e){var s=i++,l=!1;a++,call$9(r,t,e).then((function(e){l||(l=!0,o[s]={status:"fulfilled",value:e},--a||n(o))}),(function(e){l||(l=!0,o[s]={status:"rejected",reason:e},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var $$S=_export,call$8=functionCall,aCallable$8=aCallable$j,getBuiltIn$3=getBuiltIn$h,newPromiseCapabilityModule$1=newPromiseCapability$2,perform$1=perform$6,iterate$g=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$S({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$3("AggregateError"),n=newPromiseCapabilityModule$1.f(t),o=n.resolve,i=n.reject,a=perform$1((function(){var n=aCallable$8(t.resolve),a=[],s=0,l=1,c=!1;iterate$g(e,(function(e){var u=s++,p=!1;l++,call$8(n,t,e).then((function(e){p||c||(c=!0,o(e))}),(function(e){p||c||(p=!0,a[u]=e,--l||i(new r(a,PROMISE_ANY_ERROR)))}))})),--l||i(new r(a,PROMISE_ANY_ERROR))}));return a.error&&i(a.value),n.promise}});var $$R=_export,NativePromiseConstructor=promiseNativeConstructor,fails$d=fails$A,getBuiltIn$2=getBuiltIn$h,isCallable$6=isCallable$q,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$d((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));$$R({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn$2("Promise")),r=isCallable$6(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}});var path$b=path$t,promise$5=path$b.Promise,parent$1n=promise$5,promise$4=parent$1n,parent$1m=promise$4,promise$3=parent$1m,$$Q=_export,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$Q({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule.f(this),r=perform(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$1l=promise$3,promise$2=parent$1l,promise$1=promise$2,_Promise$1=getDefaultExportFromCjs(promise$1),promise=promise$1,_Promise=getDefaultExportFromCjs(promise),$$P=_export,uncurryThis$d=functionUncurryThis,isArray$9=isArray$d,nativeReverse=uncurryThis$d([].reverse),test$1=[1,2];$$P({target:"Array",proto:!0,forced:String(test$1)===String(test$1.reverse())},{reverse:function(){return isArray$9(this)&&(this.length=this.length),nativeReverse(this)}});var entryVirtual$i=entryVirtual$n,reverse$6=entryVirtual$i("Array").reverse,isPrototypeOf$h=objectIsPrototypeOf,method$g=reverse$6,ArrayPrototype$f=Array.prototype,reverse$5=function(e){var t=e.reverse;return e===ArrayPrototype$f||isPrototypeOf$h(ArrayPrototype$f,e)&&t===ArrayPrototype$f.reverse?method$g:t},parent$1k=reverse$5,reverse$4=parent$1k,parent$1j=reverse$4,reverse$3=parent$1j,parent$1i=reverse$3,reverse$2=parent$1i,reverse$1=reverse$2,_reverseInstanceProperty$1=getDefaultExportFromCjs(reverse$1),reverse2=reverse$1,_reverseInstanceProperty=getDefaultExportFromCjs(reverse2),$$O=_export,isArray$8=isArray$d,isConstructor$1=isConstructor$4,isObject$6=isObject$l,toAbsoluteIndex$3=toAbsoluteIndex$6,lengthOfArrayLike$8=lengthOfArrayLike$e,toIndexedObject$1=toIndexedObject$b,createProperty$2=createProperty$6,wellKnownSymbol$4=wellKnownSymbol$q,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,nativeSlice=arraySlice$7,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("slice"),SPECIES=wellKnownSymbol$4("species"),$Array$1=Array,max$1=Math.max;$$O({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{slice:function(e,t){var r,n,o,i=toIndexedObject$1(this),a=lengthOfArrayLike$8(i),s=toAbsoluteIndex$3(e,a),l=toAbsoluteIndex$3(void 0===t?a:t,a);if(isArray$8(i)&&(r=i.constructor,(isConstructor$1(r)&&(r===$Array$1||isArray$8(r.prototype))||isObject$6(r)&&null===(r=r[SPECIES]))&&(r=void 0),r===$Array$1||void 0===r))return nativeSlice(i,s,l);for(n=new(void 0===r?$Array$1:r)(max$1(l-s,0)),o=0;s<l;s++,o++)s in i&&createProperty$2(n,o,i[s]);return n.length=o,n}});var entryVirtual$h=entryVirtual$n,slice$6=entryVirtual$h("Array").slice,isPrototypeOf$g=objectIsPrototypeOf,method$f=slice$6,ArrayPrototype$e=Array.prototype,slice$5=function(e){var t=e.slice;return e===ArrayPrototype$e||isPrototypeOf$g(ArrayPrototype$e,e)&&t===ArrayPrototype$e.slice?method$f:t},parent$1h=slice$5,slice$4=parent$1h,parent$1g=slice$4,slice$3=parent$1g,parent$1f=slice$3,slice$2=parent$1f,slice$1=slice$2,_sliceInstanceProperty$1=getDefaultExportFromCjs(slice$1),slice2=slice$1,_sliceInstanceProperty=getDefaultExportFromCjs(slice2),iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator),bind$c=bind$i,_bindInstanceProperty=getDefaultExportFromCjs(bind$c),construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),get$2=get$3,_Reflect$get=getDefaultExportFromCjs(get$2),$$N=_export,isArray$7=isArray$d;$$N({target:"Array",stat:!0},{isArray:isArray$7});var path$a=path$t,isArray$6=path$a.Array.isArray,parent$1e=isArray$6,isArray$5=parent$1e,parent$1d=isArray$5,isArray$4=parent$1d,parent$1c=isArray$4,isArray$3=parent$1c,isArray$2=isArray$3,_Array$isArray$1=getDefaultExportFromCjs(isArray$2),isArray$1=isArray$2,_Array$isArray=getDefaultExportFromCjs(isArray$1),anObject$2=anObject$g,iteratorClose=iteratorClose$2,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$2(r)[0],r[1]):t(r)}catch(t){iteratorClose(e,"throw",t)}},bind$b=functionBindContext,call$7=functionCall,toObject$7=toObject$f,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$7=lengthOfArrayLike$e,createProperty$1=createProperty$6,getIterator$1=getIterator$3,getIteratorMethod$1=getIteratorMethod$a,$Array=Array,arrayFrom$1=function(e){var t=toObject$7(e),r=isConstructor3(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=bind$b(o,n>2?arguments[2]:void 0));var a,s,l,c,u,p,f=getIteratorMethod$1(t),$=0;if(!f||this===$Array&&isArrayIteratorMethod(f))for(a=lengthOfArrayLike$7(t),s=r?new this(a):$Array(a);a>$;$++)p=i?o(t[$],$):t[$],createProperty$1(s,$,p);else for(u=(c=getIterator$1(t,f)).next,s=r?new this:[];!(l=call$7(u,c)).done;$++)p=i?callWithSafeIterationClosing(c,o,[l.value,$],!0):l.value,createProperty$1(s,$,p);return s.length=$,s},$$M=_export,from$7=arrayFrom$1,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$M({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$7});var path$9=path$t,from$6=path$9.Array.from,parent$1b=from$6,from$5=parent$1b,parent$1a=from$5,from$4=parent$1a,parent$19=from$4,from$3=parent$19,from$2=from$3,_Array$from$1=getDefaultExportFromCjs(from$2),from$1=from$2,_Array$from=getDefaultExportFromCjs(from$1),toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function _iterableToArrayLimit(e,t){var r=null==e?null:void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function ownKeys$1(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$1(Object(o),!0)).call(r,(function(t){_defineProperty$2(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys$1(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _regeneratorRuntime$1(){_regeneratorRuntime$1=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=_Object$defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof _Symbol?_Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,r){return _Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=_Object$create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:_(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p={};function f(){}function $(){}function y(){}var h={};l(h,i,(function(){return this}));var d=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(E([])));d&&d!==t&&r.call(d,i)&&(h=d);var g=y.prototype=f.prototype=_Object$create(h);function m(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==_typeof$3(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(p).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function _(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function b(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return $.prototype=y,n(g,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:$,configurable:!0}),$.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===$||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,y):(e.__proto__=y,l(e,s,"GeneratorFunction")),e.prototype=_Object$create(g),e},e.awrap=function(e){return{__await:e}},m(v.prototype),l(v.prototype,a,(function(){return this})),e.AsyncIterator=v,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise);var a=new v(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),l(g,s,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,P.prototype={constructor:P,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,_forEachInstanceProperty(t=this.tryEntries).call(t,I),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+_sliceInstanceProperty(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function _typeof$2(e){return(_typeof$2="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep$1(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise.resolve(l).then(n,o)}function _asyncToGenerator$1(e){return function(){var t=this,r=arguments;return new _Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep$1(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep$1(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$2(n.key),n)}}function _createClass$2(e,t,r){return t&&_defineProperties$2(e.prototype,t),r&&_defineProperties$2(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$2(e,t,r){return(t=_toPropertyKey$2(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){var t;return(_getPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$1(e,t){var r;return(_setPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var r,n=_getPrototypeOf$1(e);if(t){var o=_getPrototypeOf$1(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$1(this,r)}}function _superPropBase$1(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$1(e)););return e}function _get$1(){var e;"undefined"!=typeof Reflect&&_Reflect$get?_get$1=_bindInstanceProperty(e=_Reflect$get).call(e):_get$1=function(e,t,r){var n=_superPropBase$1(e,t);if(n){var o=_Object$getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get$1.apply(this,arguments)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$2(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(_Array$isArray(e))return e}function _unsupportedIterableToArray$2(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$2(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$2(e,t):void 0}}function _arrayLikeToArray$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableRest(){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 _toPrimitive$2(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$2(e){var t=_toPrimitive$2(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var $$L=_export,uncurryThis$c=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$5=arrayMethodIsStrict$7,nativeIndexOf=uncurryThis$c([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$6=NEGATIVE_ZERO$1||!arrayMethodIsStrict$5("indexOf");$$L({target:"Array",proto:!0,forced:FORCED$6},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var entryVirtual$g=entryVirtual$n,indexOf$6=entryVirtual$g("Array").indexOf,isPrototypeOf$f=objectIsPrototypeOf,method$e=indexOf$6,ArrayPrototype$d=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$d||isPrototypeOf$f(ArrayPrototype$d,e)&&t===ArrayPrototype$d.indexOf?method$e:t},parent$18=indexOf$5,indexOf$4=parent$18,parent$17=indexOf$4,indexOf$3=parent$17,parent$16=indexOf$3,indexOf$2=parent$16,indexOf$1=indexOf$2,indexOf2=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf2),$$K=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES$1=!1})),$$K({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$f=entryVirtual$n,find$7=entryVirtual$f("Array").find,isPrototypeOf$e=objectIsPrototypeOf,method$d=find$7,ArrayPrototype$c=Array.prototype,find$6=function(e){var t=e.find;return e===ArrayPrototype$c||isPrototypeOf$e(ArrayPrototype$c,e)&&t===ArrayPrototype$c.find?method$d:t},parent$15=find$6,find$5=parent$15,parent$14=find$5,find$4=parent$14,parent$13=find$4,find$3=parent$13,find$2=find$3,find$1=find$2,_findInstanceProperty=getDefaultExportFromCjs(find$1),DESCRIPTORS$6=descriptors$2,isArray2=isArray$d,$TypeError$6=TypeError,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$6&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray2(e)&&!getOwnPropertyDescriptor$1(e,"length").writable)throw $TypeError$6("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$1=tryToString$7,$TypeError$5=TypeError,deletePropertyOrThrow$3=function(e,t){if(!delete e[t])throw $TypeError$5("Cannot delete property "+tryToString$1(t)+" of "+tryToString$1(e))},$$J=_export,toObject$6=toObject$f,toAbsoluteIndex$2=toAbsoluteIndex$6,toIntegerOrInfinity$2=toIntegerOrInfinity$6,lengthOfArrayLike$6=lengthOfArrayLike$e,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,arraySpeciesCreate=arraySpeciesCreate$3,createProperty=createProperty$6,deletePropertyOrThrow$2=deletePropertyOrThrow$3,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("splice"),max=Math.max,min$2=Math.min;$$J({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{splice:function(e,t){var r,n,o,i,a,s,l=toObject$6(this),c=lengthOfArrayLike$6(l),u=toAbsoluteIndex$2(e,c),p=arguments.length;for(0===p?r=n=0:1===p?(r=0,n=c-u):(r=p-2,n=min$2(max(toIntegerOrInfinity$2(t),0),c-u)),doesNotExceedSafeInteger$1(c+r-n),o=arraySpeciesCreate(l,n),i=0;i<n;i++)(a=u+i)in l&&createProperty(o,i,l[a]);if(o.length=n,r<n){for(i=u;i<c-n;i++)s=i+r,(a=i+n)in l?l[s]=l[a]:deletePropertyOrThrow$2(l,s);for(i=c;i>c-n+r;i--)deletePropertyOrThrow$2(l,i-1)}else if(r>n)for(i=c-n;i>u;i--)s=i+r-1,(a=i+n-1)in l?l[s]=l[a]:deletePropertyOrThrow$2(l,s);for(i=0;i<r;i++)l[i+u]=arguments[i+2];return setArrayLength$1(l,c-n+r),o}});var entryVirtual$e=entryVirtual$n,splice$7=entryVirtual$e("Array").splice,isPrototypeOf$d=objectIsPrototypeOf,method$c=splice$7,ArrayPrototype$b=Array.prototype,splice$6=function(e){var t=e.splice;return e===ArrayPrototype$b||isPrototypeOf$d(ArrayPrototype$b,e)&&t===ArrayPrototype$b.splice?method$c:t},parent$12=splice$6,splice$5=parent$12,parent$11=splice$5,splice$4=parent$11,parent$10=splice$4,splice$3=parent$10,splice$2=splice$3,splice$1=splice$2,_spliceInstanceProperty=getDefaultExportFromCjs(splice$1),whitespaces$4="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$b=functionUncurryThis,requireObjectCoercible$3=requireObjectCoercible$7,toString$7=toString$e,whitespaces$3=whitespaces$4,replace$3=uncurryThis$b("".replace),ltrim=RegExp("^["+whitespaces$3+"]+"),rtrim=RegExp("(^|[^"+whitespaces$3+"])["+whitespaces$3+"]+$"),createMethod$2=function(e){return function(t){var r=toString$7(requireObjectCoercible$3(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"$1")),r}},stringTrim={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},global$8=global$r,fails$c=fails$A,uncurryThis$a=functionUncurryThis,toString$6=toString$e,trim$8=stringTrim.trim,whitespaces$2=whitespaces$4,$parseInt$1=global$8.parseInt,Symbol$2=global$8.Symbol,ITERATOR$3=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$a(hex.exec),FORCED$5=8!==$parseInt$1(whitespaces$2+"08")||22!==$parseInt$1(whitespaces$2+"0x16")||ITERATOR$3&&!fails$c((function(){$parseInt$1(Object(ITERATOR$3))})),numberParseInt=FORCED$5?function(e,t){var r=trim$8(toString$6(e));return $parseInt$1(r,t>>>0||(exec$2(hex,r)?16:10))}:$parseInt$1,$$I=_export,$parseInt=numberParseInt;$$I({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var path$8=path$t,_parseInt$6=path$8.parseInt,parent$$=_parseInt$6,_parseInt$5=parent$$,parent$_=_parseInt$5,_parseInt$4=parent$_,parent$Z=_parseInt$4,_parseInt$3=parent$Z,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$H=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("map");$$H({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$d=entryVirtual$n,map$c=entryVirtual$d("Array").map,isPrototypeOf$c=objectIsPrototypeOf,method$b=map$c,ArrayPrototype$a=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$a||isPrototypeOf$c(ArrayPrototype$a,e)&&t===ArrayPrototype$a.map?method$b:t},parent$Y=map$b,map$a=parent$Y,parent$X=map$a,map$9=parent$X,parent$W=map$9,map$8=parent$W,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),DESCRIPTORS$5=descriptors$2,uncurryThis$9=functionUncurryThis,call$6=functionCall,fails$b=fails$A,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$5=toObject$f,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$2=Object.defineProperty,concat2=uncurryThis$9([].concat),objectAssign=!$assign||fails$b((function(){if(DESCRIPTORS$5&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$5(e),n=arguments.length,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;n>o;)for(var s,l=IndexedObject$1(arguments[o++]),c=i?concat2(objectKeys(l),i(l)):objectKeys(l),u=c.length,p=0;u>p;)s=c[p++],DESCRIPTORS$5&&!call$6(a,l,s)||(r[s]=l[s]);return r}:$assign,$$G=_export,assign$7=objectAssign;$$G({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$7=path$t,assign$6=path$7.Object.assign,parent$V=assign$6,assign$5=parent$V,parent$U=assign$5,assign$4=parent$U,parent$T=assign$4,assign$3=parent$T,assign$2=assign$3,assign$1=assign$2,_Object$assign=getDefaultExportFromCjs(assign$1);function ownKeys2(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys2(Object(o),!0)).call(r,(function(t){_defineProperty$1(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys2(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _typeof$1(e){return(_typeof$1="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$1(n.key),n)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,r){return(t=_toPropertyKey$1(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){var e;"undefined"!=typeof Reflect&&_Reflect$get?_get=_bindInstanceProperty(e=_Reflect$get).call(e):_get=function(e,t,r){var n=_superPropBase(e,t);if(n){var o=_Object$getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get.apply(this,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(_Array$isArray(e))return _arrayLikeToArray$1(e)}function _iterableToArray(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$1(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){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 _toPrimitive$1(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+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 n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}_Object$create&&(n.prototype=_Object$create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?_sliceInstanceProperty(n).call(n,1):n);return _Object$getOwnPropertySymbols?_concatInstanceProperty(o).call(o,_Object$getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,i),!0;case 6:return u.fn.call(u.context,t,n,o,i,a),!0}for(c=1,l=new Array(p-1);c<p;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,$=u.length;for(c=0;c<$;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),p){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(f=1,l=new Array(p-1);f<p;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports,$$F=_export,$some=arrayIteration.some,arrayMethodIsStrict$4=arrayMethodIsStrict$7,STRICT_METHOD$3=arrayMethodIsStrict$4("some");$$F({target:"Array",proto:!0,forced:!STRICT_METHOD$3},{some:function(e){return $some(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$c=entryVirtual$n,some$6=entryVirtual$c("Array").some,isPrototypeOf$b=objectIsPrototypeOf,method$a=some$6,ArrayPrototype$9=Array.prototype,some$5=function(e){var t=e.some;return e===ArrayPrototype$9||isPrototypeOf$b(ArrayPrototype$9,e)&&t===ArrayPrototype$9.some?method$a:t},parent$S=some$5,some$4=parent$S,parent$R=some$4,some$3=parent$R,parent$Q=some$3,some$2=parent$Q,some$1=some$2,some2=some$1,_someInstanceProperty=getDefaultExportFromCjs(some2),toIntegerOrInfinity$1=toIntegerOrInfinity$6,toString$5=toString$e,requireObjectCoercible$2=requireObjectCoercible$7,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$5(requireObjectCoercible$2(this)),r="",n=toIntegerOrInfinity$1(e);if(n<0||n==1/0)throw $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$8=functionUncurryThis,toLength=toLength$2,toString$4=toString$e,$repeat=stringRepeat,requireObjectCoercible$1=requireObjectCoercible$7,repeat2=uncurryThis$8($repeat),stringSlice$2=uncurryThis$8("".slice),ceil=Math.ceil,createMethod$1=function(e){return function(t,r,n){var o,i,a=toString$4(requireObjectCoercible$1(t)),s=toLength(r),l=a.length,c=void 0===n?" ":toString$4(n);return s<=l||""==c?a:((i=repeat2(c,ceil((o=s-l)/c.length))).length>o&&(i=stringSlice$2(i,0,o)),e?a+i:i+a)}},stringPad={start:createMethod$1(!1),end:createMethod$1(!0)},userAgent$2=engineUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$2),$$E=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$E({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$b=entryVirtual$n,padStart$6=entryVirtual$b("String").padStart,isPrototypeOf$a=objectIsPrototypeOf,method$9=padStart$6,StringPrototype$2=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$a(StringPrototype$2,e)&&t===StringPrototype$2.padStart?method$9:t},parent$P=padStart$5,padStart$4=parent$P,parent$O=padStart$4,padStart$3=parent$O,parent$N=padStart$3,padStart$2=parent$N,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2),engineIsBun="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,global$7=global$r,apply$1=functionApply,isCallable$5=isCallable$q,ENGINE_IS_BUN=engineIsBun,USER_AGENT=engineUserAgent,arraySlice$3=arraySlice$7,validateArgumentsLength$3=validateArgumentsLength$5,Function$1=global$7.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var e=global$7.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),schedulersFix$2=function(e,t){var r=t?2:1;return WRAP?function(n,o){var i=validateArgumentsLength$3(arguments.length,1)>r,a=isCallable$5(n)?n:Function$1(n),s=i?arraySlice$3(arguments,r):[],l=i?function(){apply$1(a,this,s)}:a;return t?e(l,o):e(l)}:e},$$D=_export,global$6=global$r,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(global$6.setInterval,!0);$$D({global:!0,bind:!0,forced:global$6.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$C=_export,global$5=global$r,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(global$5.setTimeout,!0);$$C({global:!0,bind:!0,forced:global$5.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$6=path$t,setInterval$4=path$6.setInterval,parent$M=setInterval$4,setInterval$3=parent$M,parent$L=setInterval$3,setInterval$2=parent$L,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),path$5=path$t,setTimeout$5=path$5.setTimeout,parent$K=setTimeout$5,setTimeout$4=parent$K,parent$J=setTimeout$4,setTimeout$3=parent$J,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),$$B=_export,$every=arrayIteration.every,arrayMethodIsStrict$3=arrayMethodIsStrict$7,STRICT_METHOD$2=arrayMethodIsStrict$3("every");$$B({target:"Array",proto:!0,forced:!STRICT_METHOD$2},{every:function(e){return $every(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$n,every$6=entryVirtual$a("Array").every,isPrototypeOf$9=objectIsPrototypeOf,method$8=every$6,ArrayPrototype$8=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$8||isPrototypeOf$9(ArrayPrototype$8,e)&&t===ArrayPrototype$8.every?method$8:t},parent$I=every$5,every$4=parent$I,parent$H=every$4,every$3=parent$H,parent$G=every$3,every$2=parent$G,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),global$4=global$r,fails$a=fails$A,uncurryThis$7=functionUncurryThis,toString$3=toString$e,trim$7=stringTrim.trim,whitespaces$1=whitespaces$4,charAt$2=uncurryThis$7("".charAt),$parseFloat$1=global$4.parseFloat,Symbol$1=global$4.Symbol,ITERATOR$2=Symbol$1&&Symbol$1.iterator,FORCED$4=1/$parseFloat$1(whitespaces$1+"-0")!=-1/0||ITERATOR$2&&!fails$a((function(){$parseFloat$1(Object(ITERATOR$2))})),numberParseFloat=FORCED$4?function(e){var t=trim$7(toString$3(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt$2(t,0)?-0:r}:$parseFloat$1,$$A=_export,$parseFloat=numberParseFloat;$$A({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var path$4=path$t,_parseFloat$6=path$4.parseFloat,parent$F=_parseFloat$6,_parseFloat$5=parent$F,parent$E=_parseFloat$5,_parseFloat$4=parent$E,parent$D=_parseFloat$4,_parseFloat$3=parent$D,_parseFloat$2=_parseFloat$3,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME=functionName.PROPER,fails$9=fails$A,whitespaces=whitespaces$4,non="​…᠎",stringTrimForced=function(e){return fails$9((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e}))},$$z=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$z({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var entryVirtual$9=entryVirtual$n,trim$6=entryVirtual$9("String").trim,isPrototypeOf$8=objectIsPrototypeOf,method$7=trim$6,StringPrototype$1=String.prototype,trim$5=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$8(StringPrototype$1,e)&&t===StringPrototype$1.trim?method$7:t},parent$C=trim$5,trim$4=parent$C,parent$B=trim$4,trim$3=parent$B,parent$A=trim$3,trim$2=parent$A,trim$1=trim$2,trim2=trim$1,_trimInstanceProperty=getDefaultExportFromCjs(trim2),arraySlice$2=arraySliceSimple,floor$3=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$3(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,n),t),mergeSort(arraySlice$2(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},arraySort$1=mergeSort,userAgent$1=engineUserAgent,firefox=userAgent$1.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent=engineUserAgent,webkit=userAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$y=_export,uncurryThis$6=functionUncurryThis,aCallable$7=aCallable$j,toObject$4=toObject$f,lengthOfArrayLike$5=lengthOfArrayLike$e,deletePropertyOrThrow$1=deletePropertyOrThrow$3,toString$2=toString$e,fails$8=fails$A,internalSort=arraySort$1,arrayMethodIsStrict$2=arrayMethodIsStrict$7,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],nativeSort=uncurryThis$6(test.sort),push$b=uncurryThis$6(test.push),FAILS_ON_UNDEFINED=fails$8((function(){test.sort(void 0)})),FAILS_ON_NULL=fails$8((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict$2("sort"),STABLE_SORT=!fails$8((function(){if(V8)return V8<70;if(!(FF&&FF>3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var e,t,r,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)test.push({k:t+n,v:r})}for(test.sort((function(e,t){return t.v-e.v})),n=0;n<test.length;n++)t=test[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$3=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$2(t)>toString$2(r)?1:-1}};$$y({target:"Array",proto:!0,forced:FORCED$3},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$4(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);var r,n,o=[],i=lengthOfArrayLike$5(t);for(n=0;n<i;n++)n in t&&push$b(o,t[n]);for(internalSort(o,getSortCompare(e)),r=lengthOfArrayLike$5(o),n=0;n<r;)t[n]=o[n++];for(;n<i;)deletePropertyOrThrow$1(t,n++);return t}});var _context,entryVirtual$8=entryVirtual$n,sort$6=entryVirtual$8("Array").sort,isPrototypeOf$7=objectIsPrototypeOf,method$6=sort$6,ArrayPrototype$7=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$7||isPrototypeOf$7(ArrayPrototype$7,e)&&t===ArrayPrototype$7.sort?method$6:t},parent$z=sort$5,sort$4=parent$z,parent$y=sort$4,sort$3=parent$y,parent$x=sort$3,sort$2=parent$x,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),XG_DEBUG_OPEN="undefined"!=typeof window&&window.location&&_indexOfInstanceProperty(_context=window.location.href).call(_context,"xgplayerdebugger=1")>-1,STYLE={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},XGTAG="%c[xgplayer]",XG_DEBUG={config:{debug:XG_DEBUG_OPEN?3:0},logInfo:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this.config.debug>=3&&(r=console).log.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.info,e]).call(t,o))},logWarn:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this.config.debug>=1&&(r=console).warn.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.warn,e]).call(t,o))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];(r=console)[n].apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.error,e]).call(t,i))}}},XgplayerTimeRange=function(){function e(t){_classCallCheck$1(this,e),this.bufferedList=t}return _createClass$1(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}(),util$3={};function checkIsIn(e,t){for(var r=0,n=t.length;r<n;r++)if(_indexOfInstanceProperty(e).call(e,t[r])>-1)return!0;return!1}util$3.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=o,i.innerHTML=r,_forEachInstanceProperty(e=_Object$keys(n)).call(e,(function(e){var r=e,o=n[e];"video"===t||"audio"===t||"live-video"===t?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},util$3.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var o=n.children;if(n=null,o.length>0){var i;if(o=o[0],r&&util$3.addClass(o,r),t)_forEachInstanceProperty(i=_Object$keys(t)).call(i,(function(e){o.setAttribute(e,t[e])}));return o}return null}catch(e){return XG_DEBUG.logError("util.createDomFromHtml",e),null}},util$3.hasClass=function(e,t){if(!e||!t)return!1;try{return _someInstanceProperty(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===_typeof$1(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util$3.addClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(r){util$3.hasClass(e,t)||(e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util$3.removeClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(r){var n;if(util$3.hasClass(e,t))_forEachInstanceProperty(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util$3.toggleClass=function(e,t){var r;e&&_forEachInstanceProperty(r=t.split(/\s+/g)).call(r,(function(t){util$3.hasClass(e,t)?util$3.removeClass(e,t):util$3.addClass(e,t)}))},util$3.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util$3.typeOf(e[r]))t.push(e[r]);else if("Object"===util$3.typeOf(e[r])){var n;_mapInstanceProperty(n=_Object$keys(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},util$3.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){XG_DEBUG.logError("util.findDom",n),0===_indexOfInstanceProperty(r).call(r,"#")&&(e=t.getElementById(_sliceInstanceProperty(r).call(r,1)))}return e},util$3.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util$3.padStart=function(e,t,r){for(var n=String(r),o=t>>0,i=Math.ceil(o/n.length),a=[],s=String(e);i--;)a.push(n);return a.join("").substring(0,o-s.length)+s},util$3.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util$3).call(util$3,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util$3).call(util$3,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util$3).call(util$3,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util$3.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},util$3.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util$3.deepCopy=function(e,t){var r;if("Object"===util$3.typeOf(t)&&"Object"===util$3.typeOf(e))return _forEachInstanceProperty(r=_Object$keys(t)).call(r,(function(r){if("Object"!==util$3.typeOf(t[r])||t[r]instanceof Node)if("Array"===util$3.typeOf(t[r])){var n;e[r]="Array"===util$3.typeOf(e[r])?_concatInstanceProperty(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:util$3.deepCopy(e[r],t[r])})),e},util$3.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util$3.typeOf(t[r])&&"Array"===util$3.typeOf(e[r])?"Array"===util$3.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray(t[r])):util$3.typeOf(e[r])!==util$3.typeOf(t[r])||null===e[r]||"Object"!==util$3.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util$3.deepMerge(e[r],t[r])})),e},util$3.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},util$3.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return _forEachInstanceProperty(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},util$3.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=_setInterval(_bindInstanceProperty(r).call(r,e),n))},util$3.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util$3.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=_setTimeout((function(){t(),util$3.clearTimeout(e,n)}),r);return e._timers.push(n),n},util$3.clearTimeout=function(e,t){var r=e._timers;if("Array"===util$3.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){_spliceInstanceProperty(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},util$3.clearAllTimers=function(e){var t=e._timers;"Array"===util$3.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util$3.createImgBtn=function(e,t,r,n){var o,i,a,s,l,c,u,p,f,$,y,h,d=util$3.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(d.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(_everyInstanceProperty(o=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(o,(function(e){var t,o;return!(_indexOfInstanceProperty(r).call(r,e)>-1&&_indexOfInstanceProperty(n).call(n,e)>-1)||(u=_parseFloat$1(_trimInstanceProperty(t=_sliceInstanceProperty(r).call(r,0,_indexOfInstanceProperty(r).call(r,e))).call(t)),p=_parseFloat$1(_trimInstanceProperty(o=_sliceInstanceProperty(n).call(n,0,_indexOfInstanceProperty(n).call(n,e))).call(o)),f=e,!1)})),d.style.width=_concatInstanceProperty(i="".concat(u)).call(i,f),d.style.height=_concatInstanceProperty(a="".concat(p)).call(a,f),d.style.backgroundSize=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="".concat(u)).call(c,f," ")).call(l,p)).call(s,f),d.style.margin="start"===e?_concatInstanceProperty($=_concatInstanceProperty(y=_concatInstanceProperty(h="-".concat(p/2)).call(h,f," auto auto -")).call(y,u/2)).call($,f):"auto 5px auto 5px");return d},util$3.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var o="#";e.replace(/[0-9A-F]/gi,(function(e){o+=e+e})),e=o}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(_parseInt$1(e,16))})),_concatInstanceProperty(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},util$3.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util$3.checkIsFunction=function(e){return e&&"function"==typeof e},util$3.checkIsObject=function(e){return null!==e&&"object"===_typeof$1(e)},util$3.hide=function(e){e.style.display="none"},util$3.show=function(e,t){e.style.display=t||"block"},util$3.isUndefined=function(e){if(null==e)return!0},util$3.isNotNull=function(e){return!(null==e)},util$3.setStyleFromCsstext=function(e,t){if(t)if("String"===util$3.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");_mapInstanceProperty(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(r){e.style[r]=t[r]}))}},util$3.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var o=n.replace(/\s+/g,"").split(";"),i={},a={};return _mapInstanceProperty(o).call(o,(function(e){if(e){var t=e.split(":");t.length>1&&(checkIsIn(t[0],r)?i[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),_mapInstanceProperty(t=_Object$keys(a)).call(t,(function(t){e.style[t]=a[t]})),i},util$3.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return _mapInstanceProperty(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},util$3.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},util$3.stopPropagation=function(e){e&&e.stopPropagation()},util$3.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util$3.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util$3.checkTouchSupport=function(){return"ontouchstart"in window},util$3.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});_sortInstanceProperty(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var o=[];if(t)for(var i=0;i<r.length;i++){var a=o.length;if(a){var s=o[a-1].end;r[i].start-s<t?r[i].end>s&&(o[a-1].end=r[i].end):o.push(r[i])}else o.push(r[i])}else o=r;return new XgplayerTimeRange(o)},util$3.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}},util$3.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util$3.getHostFromUrl=function(e){if("String"!==util$3.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util$3.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util$3.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util$3.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},util$3.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=_parseInt$1(e)}catch(t){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=_parseInt$1(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},util$3.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util$3.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util$3.createPositionBar=function(e,t){var r=util$3.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util$3.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:_concatInstanceProperty(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},o=_Object$keys(n);return _forEachInstanceProperty(o).call(o,(function(e){var t,o=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),i=_concatInstanceProperty(t="".concat(e,"(")).call(t,n[e],")");o.test(r)?(o.lastIndex=-1,r=r.replace(o,i)):r+="".concat(i," ")})),r},util$3.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},util$3.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var o=1;o<r;o++)if(e>t[o-1].end&&e<=t[o].end){n=o;break}return n},util$3.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:util$3.getIndexByTime(e,t))<0)return-1;var o=t.length,i=t[n],a=i.start,s=i.end,l=i.cTime,c=i.offset;return e<a?l:e>=a&&e<=s?e-c:e>s&&n>=o-1?s:-1},util$3.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var o=t[r].start;return r-1<0?o+e:o+(e-t[r-1].duration)}return e};var VERSION_REG={android:/(Android)\s([\d.]+)/,ios:/(Version)\/([\d.]+)/},H264_MIMETYPES=["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"],sniffer={get device(){return sniffer.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var r=navigator.userAgent.toLowerCase(),n={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return _concatInstanceProperty(e=[]).call(e,_filterInstanceProperty(t=_Object$keys(n)).call(t,(function(e){return n[e].test(r)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),i=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=i||n&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:i,isIos:s||i,isAndroid:n,isPc:!(s||n||r||a),isSymbian:r,isWindowsPhone:t,isFireFox:o}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",r=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?VERSION_REG.ios:VERSION_REG.android)?t.exec(e):[];if(r&&r.length>=3){var n=r[2].split(".");return n.length>0?_parseInt$1(n[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&&_mapInstanceProperty(H264_MIMETYPES).call(H264_MIMETYPES,(function(r){"probably"===t.canPlayType('video/mp4; codecs="'.concat(r,'"'))&&(e.isSupport=!0,e.mime+="||".concat(r))})),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(t){return this._logger.error(e,t),!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 _Promise.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var r=e.video||{},n=e.audio||{};try{var o=MediaSource.isTypeSupported(r.contentType),i=MediaSource.isTypeSupported(n.contentType);return _Promise.resolve({supported:o&&i,smooth:!1,powerEfficient:!1})}catch(e){return _Promise.resolve(t)}}},PLAY="play",ENDED="ended",PAUSE="pause",ERROR="error",SEEKED="seeked",TIME_UPDATE="timeupdate",DURATION_CHANGE="durationchange",VOLUME_CHANGE="volumechange",LOADED_DATA="loadeddata",PROGRESS="progress",EMPTIED="emptied",AUTOPLAY_STARTED="autoplay_started",FULLSCREEN_CHANGE="fullscreen_change",CSS_FULLSCREEN_CHANGE="cssFullscreen_change",VIDEO_RESIZE="video_resize";function callHandler(e,t,r){for(var n,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];var s,l=t.call.apply(t,_concatInstanceProperty(n=[e]).call(n,i));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r.call.apply(r,_concatInstanceProperty(t=[e]).call(t,o))})):r.call.apply(r,_concatInstanceProperty(s=[e]).call(s,i)))}function hook(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),_bindInstanceProperty(r=function(){var r,o=arguments,i=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,_concatInstanceProperty(a=[this]).call(a,_sliceInstanceProperty(Array.prototype).call(arguments)))}catch(t){var l,c;throw t.message=_concatInstanceProperty(l=_concatInstanceProperty(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(l,t.message),t}if(this.__hooks&&this.__hooks[e])try{var u,p=runHooks(this,e,t);if(p)if(p.then)p.then((function(e){var r;!1!==e&&callHandler.apply(void 0,_concatInstanceProperty(r=[i,t,n.next]).call(r,_toConsumableArray(o)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty(u=[this,t,n.next]).call(u,_sliceInstanceProperty(Array.prototype).call(arguments)));else if(void 0===p){var f;callHandler.apply(void 0,_concatInstanceProperty(f=[this,t,n.next]).call(f,_sliceInstanceProperty(Array.prototype).call(arguments)))}}catch(t){var $,y;throw t.message=_concatInstanceProperty($=_concatInstanceProperty(y="[pluginName: ".concat(this.pluginName,":")).call(y,e,"] >> ")).call($,t.message),t}else callHandler.apply(void 0,_concatInstanceProperty(r=[this,t,n.next]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}).call(r,this)}function findHookIndex(e,t){var r=this.__hooks;if(!r||!_Array$isArray(r[e]))return-1;for(var n=r[e],o=0;o<n.length;o++)if(n[o]===t)return o;return-1}function useHooks(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(_Array$isArray(r[e])||(r[e]=[]),-1===findHookIndex.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function removeHooks(e,t){var r=this.__hooks;if(r){if(_Array$isArray(r[e])){var n=r[e],o=findHookIndex.call(this,e,t);-1!==o&&_spliceInstanceProperty(n).call(n,o,1)}delete r[e]}}function hooksDescriptor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&_mapInstanceProperty(t).call(t,(function(t){e.__hooks[t]=null})),_Object$defineProperty(e,"hooks",{get:function(){var t;return e.__hooks&&_mapInstanceProperty(t=_Object$keys(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function delHooksDescriptor(e){e.__hooks=null}function runHooks(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];if(e.__hooks&&_Array$isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,r,n){for(var o,i,a=arguments.length,c=new Array(a>3?a-3:0),u=3;u<a;u++)c[u-3]=arguments[u];if(l++,0===s.length||l===s.length)return n.call.apply(n,_concatInstanceProperty(i=[t,t]).call(i,c));var p,f=s[l],$=f.call.apply(f,_concatInstanceProperty(o=[t,t]).call(o,c));return $&&$.then?$.then((function(o){var i;return!1===o?null:e.apply(void 0,_concatInstanceProperty(i=[t,r,n]).call(i,c))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==$?e.apply(void 0,_concatInstanceProperty(p=[t,r,n]).call(p,c)):void 0}.apply(void 0,_concatInstanceProperty(a=[e,t,r]).call(a,o))}var c;return r.call.apply(r,_concatInstanceProperty(c=[e,e]).call(c,o))}function showErrorMsg(e,t){var r;XG_DEBUG.logError(_concatInstanceProperty(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var BasePlugin=function(){function e(t){_classCallCheck$1(this,e),util$3.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),hooksDescriptor(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return _createClass$1(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=util$3.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 r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):showErrorMsg(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):showErrorMsg(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):showErrorMsg(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;_forEachInstanceProperty(e=["__events","__onceEvents"]).call(e,(function(e){var r;_forEachInstanceProperty(r=_Object$keys(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];(r=this.player).emit.apply(r,_concatInstanceProperty(t=[e]).call(t,o))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=_objectSpread2(_objectSpread2({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return useHooks.call.apply(useHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return removeHooks.call.apply(removeHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{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]:"";if(this.player)return r&&(t.pluginName=r),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,r=this.player,n=this.pluginName;this.offAll(),util$3.clearAllTimers(this),util$3.checkIsFunction(this.destroy)&&this.destroy(),_mapInstanceProperty(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),delHooksDescriptor(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&_Object$defineProperty(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&_Object$defineProperty(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),DOCUMENT_NODE_TYPE=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}function closest$1(e,t){for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var closest_1=closest$1,closest=closest_1;function _delegate(e,t,r,n,o){var i=listener.apply(this,arguments);return e.addEventListener(r,i,o),{destroy:function(){e.removeEventListener(r,i,o)}}}function delegate(e,t,r,n,o){return"function"==typeof e.addEventListener?_delegate.apply(null,arguments):"function"==typeof r?_bindInstanceProperty(_delegate).call(_delegate,null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),_mapInstanceProperty(Array.prototype).call(e,(function(e){return _delegate(e,t,r,n,o)})))}function listener(e,t,r,n){return function(r){r.delegateTarget=closest(r.target,t),r.delegateTarget&&n.call(e,r)}}var delegate_1=delegate,_delegate$1=getDefaultExportFromCjs(delegate_1),ROOT_TYPES={CONTROLS:"controls",ROOT:"root"},POSITIONS={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"},PLUGIN_STATE_CLASS={ICON_DISABLE:"xg-icon-disable",ICON_HIDE:"xg-icon-hide"};function isUrl(e){return!!e&&(_indexOfInstanceProperty(e)&&/^(?:http|data:|\/)/.test(e))}function mergeIconClass(e,t){var r;return"object"===_typeof$1(e)&&e.class&&"string"==typeof e.class?_concatInstanceProperty(r="".concat(t," ")).call(r,e.class):t}function mergeIconAttr(e,t){var r;"object"===_typeof$1(e)&&e.attr&&"object"===_typeof$1(e.attr)&&_mapInstanceProperty(r=_Object$keys(e.attr)).call(r,(function(r){t[r]=e.attr[r]}));return t}function createIcon(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=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 util$3.addClass(e,o),_mapInstanceProperty(n=_Object$keys(i)).call(n,(function(t){e.setAttribute(t,i[t])})),e;if(isUrl(e)||isUrl(e.url))return i.src=isUrl(e)?e:e.url||"",s=util$3.createDom(e.tag||"img","",i,"xg-img ".concat(o));if("function"==typeof e)try{var l,c;return(s=e())instanceof window.Element?(util$3.addClass(s,o),_mapInstanceProperty(l=_Object$keys(i)).call(l,(function(e){s.setAttribute(e,i[e])})),s):(XG_DEBUG.logWarn(_concatInstanceProperty(c="warn>>icons.".concat(t," in config of plugin named [")).call(c,a,"] is a function mast return an Element Object")),null)}catch(e){return XG_DEBUG.logError("Plugin named [".concat(a,"]:createIcon"),e),null}return"string"==typeof e?util$3.createDomFromHtml(e,i,o):(XG_DEBUG.logWarn(_concatInstanceProperty(r="warn>>icons.".concat(t," in config of plugin named [")).call(r,a,"] is invalid")),null)}function registerIconsObj(e,t){var r,n=t.config.icons||t.playerConfig.icons;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){var o=e[r],i=o&&o.class?o.class:"",a=o&&o.attr?o.attr:{},s=null;n&&n[r]&&(i=mergeIconClass(n[r],i),a=mergeIconAttr(n[r],a),s=createIcon(n[r],r,i,a,t.pluginName)),!s&&o&&(s=createIcon(o.icon?o.icon:o,a,i,{},t.pluginName)),t.icons[r]=s}))}function registerTextObj(e,t){var r;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){_Object$defineProperty(t.langText,r,{get:function(){var n=t.lang,o=t.i18n;return o[r]?o[r]:e[r]&&e[r][n]||""}})}))}var Plugin=function(e){_inherits(r,BasePlugin);var t=_createSuper(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,r),(e=t.call(this,n)).__delegates=[],e}return _createClass$1(r,[{key:"__init",value:function(e){if(_get(_getPrototypeOf(r.prototype),"__init",this).call(this,e),e.root){var t=e.root,n=null;this.icons={},this.root=null,this.parent=null,registerIconsObj(this.registerIcons()||{},this),this.langText={},registerTextObj(this.registerLanguageTexts()||{},this);var o="";try{o=this.render()}catch(e){var i;throw XG_DEBUG.logError("Plugin:".concat(this.pluginName,":render"),e),new Error(_concatInstanceProperty(i="Plugin:".concat(this.pluginName,":render:")).call(i,e.message))}if(o)(n=r.insert(o,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(n=util$3.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(n)}this.root=n,this.parent=t;var a=this.config.attr||{},s=this.config.style||{};this.setAttr(a),this.setStyle(s),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,r=this.children();if(r&&"object"===_typeof$1(r))if(_Object$keys(r).length>0)_mapInstanceProperty(t=_Object$keys(r)).call(t,(function(t){var n,o,i=t,a=r[i],s={root:e.root};"function"==typeof a?(n=e.config[i]||{},o=a):"object"===_typeof$1(a)&&"function"==typeof a.plugin&&(n=a.options?util$3.deepCopy(e.config[i]||{},a.options):e.config[i]||{},o=a.plugin),s.config=n,void 0!==n.index&&(s.index=n.index),n.root&&(s.root=n.root),e.registerPlugin(o,s,i)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,r=this.i18n,n=this.langText;t&&function e(t,r){for(var n=0;n<t.children.length;n++)t.children[n].children.length>0?e(t.children[n],r):r(t.children[n])}(t,(function(t){var o=t.getAttribute&&t.getAttribute("lang-key");if(o){var i=r[o.toUpperCase()]||n[o];i&&(t.innerHTML="function"==typeof i?i(e):i)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.i18n||{},n=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var o=r[t]||n[t]||"";o&&(e.innerHTML=o)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,util$3.addClass(_findInstanceProperty(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"enable",value:function(){this.config.disable=!1,util$3.removeClass(_findInstanceProperty(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"children",value:function(){return{}}},{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]:"";t.root=t.root||this.root;var o=_get(_getPrototypeOf(r.prototype),"registerPlugin",this).call(this,e,t,n);return this._children.push(o),o}},{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,n){var o=this;if(arguments.length<3&&"function"==typeof t)_Array$isArray(e)?_forEachInstanceProperty(e).call(e,(function(e){o.bindEL(e,t)})):this.bindEL(e,t);else{var i,a=r.delegate.call(this,this.root,e,t,n);this.__delegates=_concatInstanceProperty(i=this.__delegates).call(i,a)}}},{key:"unbind",value:function(e,t){var r=this;if(arguments.length<3&&"function"==typeof t)_Array$isArray(e)?_forEachInstanceProperty(e).call(e,(function(e){r.unbindEL(e,t)})):this.unbindEL(e,t);else for(var n,o=_concatInstanceProperty(n="".concat(e,"_")).call(n,t),i=0;i<this.__delegates.length;i++)if(this.__delegates[i].key===o){var a;this.__delegates[i].destroy(),_spliceInstanceProperty(a=this.__delegates).call(a,i,1);break}}},{key:"setStyle",value:function(e,t){var r,n=this;if(this.root)return"String"===util$3.typeOf(e)?this.root.style[e]=t:void("Object"===util$3.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var r,n=this;if(this.root)return"String"===util$3.typeOf(e)?this.root.setAttribute(e,t):void("Object"===util$3.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.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 r=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,r)}},{key:"unbindEL",value:function(e,t){var r=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,r)}},{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?_findInstanceProperty(this).call(this,e).appendChild(t):e.appendChild(t)}catch(e){return XG_DEBUG.logError("Plugin:appendChild",e),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,n,o=this,i=this.player;(_mapInstanceProperty(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(_mapInstanceProperty(n=this._children).call(n,(function(e){i.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),_get(_getPrototypeOf(r.prototype),"__destroy",this).call(this),this.icons={},_mapInstanceProperty(t=["root","parent"]).call(t,(function(e){o[e]=null}))}}],[{key:"insert",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.children.length,o=Number(r),i=e instanceof window.Node;if(n){for(var a=0,s=null,l="";a<n;a++){s=t.children[a];var c=Number(s.getAttribute("data-index"));if(c>=o){l="beforebegin";break}c<o&&(l="afterend")}return i?"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 i?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=[];if(e instanceof window.Node&&"function"==typeof n)if(_Array$isArray(r))_forEachInstanceProperty(r).call(r,(function(r){var a,s=_delegate$1(e,t,r,n,o);s.key=_concatInstanceProperty(a="".concat(t,"_")).call(a,r),i.push(s)}));else{var a,s=_delegate$1(e,t,r,n,o);s.key=_concatInstanceProperty(a="".concat(t,"_")).call(a,r),i.push(s)}return i}},{key:"ROOT_TYPES",get:function(){return ROOT_TYPES}},{key:"POSITIONS",get:function(){return POSITIONS}}]),r}(),STATE_CLASS={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"},STATES={INITIAL:1,READY:2,ATTACHING:3,ATTACHED:4,NOTALLOW:5,RUNNING:6,ENDED:7,DESTROYED:8};function PlaySvg(){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 PauseSvg(){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 xgIconTips(e,t,r){try{var n,o;return _concatInstanceProperty(n=_concatInstanceProperty(o=' <div class="xg-tips '.concat(r?"hide":" ",'" lang-key="')).call(o,e.i18nKeys[t],'">\n ')).call(n,e.i18n[t],"\n </div>")}catch(e){return'<div class="xg-tips hide"></div>'}}var $$x=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),$$x({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$7=entryVirtual$n,findIndex$6=entryVirtual$7("Array").findIndex,isPrototypeOf$6=objectIsPrototypeOf,method$5=findIndex$6,ArrayPrototype$6=Array.prototype,findIndex$5=function(e){var t=e.findIndex;return e===ArrayPrototype$6||isPrototypeOf$6(ArrayPrototype$6,e)&&t===ArrayPrototype$6.findIndex?method$5:t},parent$w=findIndex$5,findIndex$4=parent$w,parent$v=findIndex$4,findIndex$3=parent$v,parent$u=findIndex$3,findIndex$2=parent$u,findIndex$1=findIndex$2,findIndex2=findIndex$1,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex2),TPL=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],InnerList=function(){function e(t){_classCallCheck$1(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 _createClass$1(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var r=0,n=this.fragments;this.fragments=_mapInstanceProperty(n).call(n,(function(e){return e.start=_parseInt$1(r,10),e.end=_parseInt$1(r+e.percent*t.duration,10),e.duration=_parseInt$1(e.percent*t.duration,10),r+=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},r=this.progressList,n=this.fragments;if(!(r.length<1)){var o=t.newIndex,i=t.curIndex,a=t.millisecond;o!==i&&_mapInstanceProperty(r).call(r,(function(t,r){r<o?t[e].style.width="100%":r>o&&(t[e].style.width=0)}));var s=n[o],l=0===a?0:(a-s.start)/s.duration;r[o][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=_findIndexInstanceProperty(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 r={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(r)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var n={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(n),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||_parseInt$1(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(_parseInt$1(1e3*t,10))}var r=this.playedIndex,n=this.cachedIndex;if("Undefined"!==util$3.typeOf(e.played)){var o=_findIndexInstanceProperty(this).call(this,1e3*e.played,r);if(o<0)return;this.updateProgress("played",{newIndex:o,curIndex:r,millisecond:_parseInt$1(1e3*e.played,10)}),this.playedIndex=o}if("Undefined"!==util$3.typeOf(e.cached)){var i=_findIndexInstanceProperty(this).call(this,1e3*e.cached,n);if(i<0)return;this.updateProgress("cached",{newIndex:i,curIndex:n,millisecond:_parseInt$1(1e3*e.cached,10)}),this.cachedIndex=i}}},{key:"findIndex",value:function(e,t){var r=this.fragments;if(!r||0===r.length)return-1;if(1===r.length)return 0;if(t>-1&&t<r.length&&e>r[t].start&&e<r[t].end)return t;if(e>r[r.length-1].start)return r.length-1;for(var n=0;n<r.length;n++)if(e>r[n].start&&e<=r[n].end){t=n;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)if(util$3.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++)util$3.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return util$3.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,r=this;if(_forEachInstanceProperty(t=_Object$keys(this.fragConfig)).call(t,(function(t){void 0!==e[t]&&(r.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 n=this.root.children;n.length>0;)this.root.removeChild(n[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=util$3.createDom("xg-inners","",{},"progress-list")),this.fragments){var r,n=this.fragConfig,o=n.fragClass,i=n.fragFocusClass;this.progressList=_mapInstanceProperty(r=this.fragments).call(r,(function(r){var n,a,s=util$3.createDom("xg-inner","",{style:t?_concatInstanceProperty(n="background:".concat(t,"; flex: ")).call(n,r.percent):"flex: ".concat(r.percent)},_concatInstanceProperty(a="".concat(r.isFocus?i:""," xgplayer-progress-inner ")).call(a,o));return e.root.appendChild(s),_forEachInstanceProperty(TPL).call(TPL,(function(t){s.appendChild(util$3.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}(),FRAGMENT_FOCUS_CLASS={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},Progress=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"onMoveOnly",(function(e,t){var r=_assertThisInitialized(n),o=r.pos,i=r.config,a=r.player,s=t;if(e){util$3.event(e);var l=util$3.getEventPos(e,a.zoom),c=90===a.rotateDeg?l.clientY:l.clientX;if(o.moving&&Math.abs(o.x-c)<i.miniMoveStep)return;o.moving=!0,o.x=c,s=n.computeTime(e,c)}n.triggerCallbacks("dragmove",s,e),n._updateInnerFocus(s)})),_defineProperty$1(_assertThisInitialized(n),"onBodyClick",(function(e){n.pos.isLocked&&(n.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())})),_defineProperty$1(_assertThisInitialized(n),"_mouseDownHandler",(function(e,t){n._state.time=t.currentTime,n.updateWidth(t.currentTime,t.seekTime,t.percent,0),n._updateInnerFocus(t)})),_defineProperty$1(_assertThisInitialized(n),"_mouseUpHandler",(function(e,t){_assertThisInitialized(n).pos.moving&&n.updateWidth(t.currentTime,t.seekTime,t.percent,2)})),_defineProperty$1(_assertThisInitialized(n),"_mouseMoveHandler",(function(e,t){var r=_assertThisInitialized(n),o=r._state,i=r.pos,a=r.config,s=r.player;o.time<t.currentTime?t.forward=!0:t.forward=!1,o.time=t.currentTime,i.isDown&&!i.moving&&(i.moving=!0,a.isPauseMoving&&s.pause(),n.triggerCallbacks("dragstart",t,e),n.emitUserAction("drag","dragstart",t)),n.updateWidth(t.currentTime,t.seekTime,t.percent,1),n.triggerCallbacks("dragmove",t,e),n._updateInnerFocus(t)})),_defineProperty$1(_assertThisInitialized(n),"onMouseDown",(function(e){var t=_assertThisInitialized(n),r=t._state,o=t.player,i=t.pos,a=t.config,s=t.playerConfig,l=util$3.getEventPos(e,o.zoom),c=90===o.rotateDeg?l.clientY:l.clientX;if(!(o.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&o.ended)){if(o.duration||o.isPlaying){e.stopPropagation(),n.focus(),util$3.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),util$3.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),util$3.event(e),i.x=c,i.isDown=!0,i.moving=!1,r.prePlayTime=o.currentTime,o.focus({autoHide:!1}),n.isProgressMoving=!0,util$3.addClass(n.progressBtn,"active");var u=n.computeTime(e,c);return u.prePlayTime=r.prePlayTime,n._mouseDownHandlerHook(e,u),"touchstart"===e.type?(n.root.addEventListener("touchmove",n.onMouseMove),n.root.addEventListener("touchend",n.onMouseUp),n.root.addEventListener("touchcancel",n.onMouseUp)):(n.unbind("mousemove",n.onMoveOnly),document.addEventListener("mousemove",n.onMouseMove,!1),document.addEventListener("mouseup",n.onMouseUp,!1)),!0}o.play()}})),_defineProperty$1(_assertThisInitialized(n),"onMouseUp",(function(e){var t=_assertThisInitialized(n),r=t.player,o=t.config,i=t.pos,a=t.playerConfig,s=t._state;e.stopPropagation(),e.preventDefault(),util$3.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),util$3.checkIsFunction(o.onMoveEnd)&&o.onMoveEnd(),util$3.event(e),util$3.removeClass(n.progressBtn,"active");var l=n.computeTime(e,i.x);l.prePlayTime=s.prePlayTime,i.moving?(n.triggerCallbacks("dragend",l,e),n.emitUserAction("drag","dragend",l)):(n.triggerCallbacks("click",l,e),n.emitUserAction("click","click",l)),n._mouseUpHandlerHook(e,l),i.moving=!1,i.isDown=!1,i.x=0,i.y=0,i.isLocked=!0,s.prePlayTime=0,s.time=0;var c=e.type;"touchend"===c||"touchcancel"===c?(n.root.removeEventListener("touchmove",n.onMouseMove),n.root.removeEventListener("touchend",n.onMouseUp),n.root.removeEventListener("touchcancel",n.onMouseUp),n.blur()):(document.removeEventListener("mousemove",n.onMouseMove,!1),document.removeEventListener("mouseup",n.onMouseUp,!1),i.isEnter?"mobile"!==a.isMobileSimulateMode&&_bindInstanceProperty(n).call(n,"mousemove",n.onMoveOnly):n.onMouseLeave(e)),util$3.setTimeout(_assertThisInitialized(n),(function(){n.resetSeekState()}),1),r.focus()})),_defineProperty$1(_assertThisInitialized(n),"onMouseMove",(function(e){var t=_assertThisInitialized(n),r=t._state,o=t.pos,i=t.player,a=t.config;util$3.checkTouchSupport()&&e.preventDefault(),util$3.event(e);var s=util$3.getEventPos(e,i.zoom),l=90===i.rotateDeg?s.clientY:s.clientX,c=Math.abs(o.x-l);if(!(o.moving&&c<a.miniMoveStep||!o.moving&&c<a.miniStartStep)){o.x=l;var u=n.computeTime(e,l);u.prePlayTime=r.prePlayTime,n._mouseMoveHandlerHook(e,u)}})),_defineProperty$1(_assertThisInitialized(n),"onMouseOut",(function(e){n.triggerCallbacks("mouseout",null,e)})),_defineProperty$1(_assertThisInitialized(n),"onMouseOver",(function(e){n.triggerCallbacks("mouseover",null,e)})),_defineProperty$1(_assertThisInitialized(n),"onMouseEnter",(function(e){var t=_assertThisInitialized(n),r=t.player,o=t.pos;if(!(o.isDown||o.isEnter||r.isMini||!r.config.allowSeekAfterEnded&&r.ended)){o.isEnter=!0,_bindInstanceProperty(n).call(n,"mousemove",n.onMoveOnly),_bindInstanceProperty(n).call(n,"mouseleave",n.onMouseLeave),util$3.event(e);var i=util$3.getEventPos(e,r.zoom),a=90===r.rotateDeg?i.clientY:i.clientX,s=n.computeTime(e,a);n.triggerCallbacks("mouseenter",s,e),n.focus()}})),_defineProperty$1(_assertThisInitialized(n),"onMouseLeave",(function(e){n.triggerCallbacks("mouseleave",null,e),n.unlock(),n._updateInnerFocus(null)})),_defineProperty$1(_assertThisInitialized(n),"onVideoResize",(function(){var e=n.pos,t=e.x,r=e.isDown;if(e.isEnter&&!r){var o=n.computeTime(null,t);n.onMoveOnly(null,o)}})),n.useable=!1,n.isProgressMoving=!1,n.__dragCallBacks=[],n._state={now:-1,direc:0,time:0,prePlayTime:-1},n._disableBlur=!1,"boolean"==typeof n.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),n.config.isDraggingSeek=n.config.isDragingSeek),n}return _createClass$1(r,[{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,r=e.currentTime;return t>=0?t:r+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]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&0!==t.length||(t=[{percent:1}]);var n,o=_objectSpread2(_objectSpread2({fragments:t},r),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(o):(this.innerList=new InnerList(o),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),_mapInstanceProperty(n=["findHightLight","unHightLight","setHightLight","findFragment"]).call(n,(function(t){var r;e[t]=_bindInstanceProperty(r=e.innerList[t]).call(r,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=_findInstanceProperty(this).call(this,"xg-outer");var e=this.config,t=e.fragFocusClass,r=e.fragAutoFocus,n=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:t,fragAutoFocus:r,fragClass:n,style:this.playerConfig.commonStyle||{}}),"mobile"===sniffer.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=_findInstanceProperty(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(DURATION_CHANGE,(function(){e.onMouseLeave()})),this.on(TIME_UPDATE,(function(){e.onTimeupdate()})),this.on(SEEKED,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on(PROGRESS,(function(){e.onCacheUpdate()})),this.on(ENDED,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on(EMPTIED,(function(){e.onReset()})),this.on(VIDEO_RESIZE,(function(){e.onVideoResize()}))}},{key:"setConfig",value:function(e){var t,r=this,n=null;_forEachInstanceProperty(t=_Object$keys(e)).call(t,(function(t){r.config[t]=e[t],"fragments"===t&&(n=e[t])})),n&&this._initInner(n,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"===_typeof$1(e)){var r;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){t.style[r]=e[r]}))}}},{key:"triggerCallbacks",value:function(e,t,r){var n;this.__dragCallBacks.length>0&&_mapInstanceProperty(n=this.__dragCallBacks).call(n,(function(n){if(n&&n.handler&&n.type===e)try{n.handler(t,r)}catch(e){console.error("[XGPLAYER][triggerCallbacks] ".concat(n," error"),e)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var r=this.__dragCallBacks,n=-1;_mapInstanceProperty(r).call(r,(function(r,o){r&&r.type===e&&r.handler===t&&(n=o)})),n>-1&&_spliceInstanceProperty(r).call(r,n,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)&&(_bindInstanceProperty(this).call(this,"mousedown",this.onMouseDown),"mobile"!==e.isMobileSimulateMode&&_bindInstanceProperty(this).call(this,"mouseenter",this.onMouseEnter),_bindInstanceProperty(this).call(this,"mouseover",this.onMouseOver),_bindInstanceProperty(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),util$3.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),util$3.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,r,n){var o=this.config,i=this.player;if(!o.isCloseClickSeek||0!==n){var a=t=t>=i.duration?i.duration-o.endedDiff:Number(t).toFixed(1);this.updatePercent(r),this.updateTime(e),(1!==n||o.isDraggingSeek&&"audio"!==i.config.mediaType)&&(this._state.now=a,this._state.direc=a>i.currentTime?0:1,i.seek(a))}}},{key:"computeTime",value:function(e,t){var r,n,o=this.player,i=this.root.getBoundingClientRect(),a=i.width,s=i.height,l=i.top,c=i.left,u=t;90===o.rotateDeg?(r=s,n=l):(r=a,n=c);var p=u-n,f=(p=p>r?r:p<0?0:p)/r,$=_parseInt$1((f=f<0?0:f>1?1:f)*this.offsetDuration*1e3,10)/1e3;return{percent:f,currentTime:$,seekTime:util$3.getCurrentTimeByOffset($,o.timeSegments),offset:p,width:r,left:n,e:e}}},{key:"updateTime",value:function(e){var t=this.player,r=this.duration;e>r?e=r:e<0&&(e=0);var n=t.plugins.time;n&&n.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 r=this.player.plugins.miniprogress;r&&r.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,r=this._state,n=this.offsetDuration;if(!(t.isSeeking&&t.media.seeking||this.isProgressMoving)&&t.hasStart){if(r.now>-1){var o=_parseInt$1(1e3*r.now,10)-_parseInt$1(1e3*t.currentTime,10);if(0===r.direc&&o>300||1===r.direc&&o>-300)return void(r.now=-1);r.now=-1}var i=this.currentTime;i=util$3.adjustTimeByDuration(i,n,e),this.innerList.update({played:i},n),this.progressBtn.style.left="".concat(i/n*100,"%")}}},{key:"onCacheUpdate",value:function(e){var t=this.player,r=this.duration;if(t){var n=t.bufferedPoint.end;n=util$3.adjustTimeByDuration(n,r,e),this.innerList.update({cached:n},r)}}},{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:POSITIONS.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:FRAGMENT_FOCUS_CLASS.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return FRAGMENT_FOCUS_CLASS}}]),r}(),Icon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_onMouseenter",(function(e){n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"_onMouseLeave",(function(e){n.emit("icon_mouseleave",{pluginName:n.pluginName})})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){_bindInstanceProperty(this).call(this,"mouseenter",this._onMouseenter),_bindInstanceProperty(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)}}]),r}(),Play=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=_assertThisInitialized(n).player;return n.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),_bindInstanceProperty(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,t=this.player;this.on([PLAY,PAUSE,ERROR,EMPTIED],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:PlaySvg,class:"xg-icon-play"},pause:{icon:PauseSvg,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,r=_findInstanceProperty(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),r&&this.changeLangTextKey(r,t.PLAY_TIPS)):(this.setAttr("data-state","play"),r&&this.changeLangTextKey(r,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.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(xgIconTips(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:POSITIONS.CONTROLS_LEFT,index:0,disable:!1}}}]),r}();function BackSVG(){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 TopBackIcon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},_bindInstanceProperty(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:BackSVG,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){util$3.addClass(this.root,"show")}},{key:"hide",value:function(){util$3.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:POSITIONS.ROOT_TOP,index:0}}}]),r}();function FullScreenSvg(){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 ExitFullScreenSvg(){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 Fullscreen=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_onOrientationChange",(function(e){n.player.fullscreen&&n.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?n.player.setRotateDeg(0):n.player.setRotateDeg(90))})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){var e=this;_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this);var t=this.config,n=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var o=util$3.getFullScreenEl();n.fullscreenTarget===o&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var r=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:r,to:!r})}}),_bindInstanceProperty(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(FULLSCREEN_CHANGE,(function(t){var r=_findInstanceProperty(e).call(e,".xg-tips");r&&e.changeLangTextKey(r,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:TopBackIcon,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===sniffer.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:FullScreenSvg,class:"xg-get-fullscreen"},exitFullscreen:{icon:ExitFullScreenSvg,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===sniffer.device?"touchend":"click",this.handleFullscreen),"mobile"===sniffer.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,r=this.config;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):r.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):r.switchCallback&&"function"==typeof r.switchCallback?r.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),r.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),r.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(r.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(xgIconTips(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(e){}}},{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:POSITIONS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),r}(),Time=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),(n=t.call(this,e)).isActiving=!1,n}return _createClass$1(r,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,r=e.duration;return this.playerConfig.customDuration||t||r}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,r=e.currentTime;return t>=0?t:r}},{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=_findInstanceProperty(this).call(this,".time-duration"),this.timeDom=_findInstanceProperty(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([DURATION_CHANGE,SEEKED,TIME_UPDATE],(function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()})),this.on(ENDED,(function(){e.onTimeUpdate(!0)})),this.on(EMPTIED,(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,r=this.config,n=this.duration;if(!r.disable&&!this.isActiving&&t.hasStart){var o=this.currentTime+this.timeOffset;o=util$3.adjustTimeByDuration(o,n,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(o)),n!==1/0&&n>0&&(this.centerDurDom.innerHTML=util$3.format(n))):(this.timeDom.innerHTML=this.minWidthTime(util$3.format(o)),n!==1/0&&n>0&&(this.durationDom.innerHTML=util$3.format(n)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(0)),this.centerDurDom.innerHTML=util$3.format(0)):(this.timeDom.innerHTML=this.minWidthTime(util$3.format(0)),this.durationDom.innerHTML=util$3.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=util$3.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=util$3.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?(util$3.hide(this.durationDom),util$3.hide(this.timeDom),util$3.hide(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(_findInstanceProperty(this).call(this,".time-live-tag"))):util$3.hide(_findInstanceProperty(this).call(this,".time-live-tag"));e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(util$3.hide(this.durationDom),util$3.hide(this.timeDom),util$3.hide(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(_findInstanceProperty(this).call(this,".time-live-tag"))):(util$3.hide(_findInstanceProperty(this).call(this,".time-live-tag")),util$3.show(_findInstanceProperty(this).call(this,".time-separator")),util$3.show(this.durationDom),util$3.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(util$3.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(util$3.format(e)))}},{key:"minWidthTime",value:function(e){var t;return _mapInstanceProperty(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,r=function(){e.isActiving=!1};this.off(SEEKED,r),t.isSeeking&&t.media.seeking?this.once(SEEKED,r):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:POSITIONS.CONTROLS_LEFT,index:2,disable:!1}}}]),r}();function volumeLargeSvg(){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 volumeSmallSvg(){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 volumeMutedSvg(){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 Volume=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"onBarMousedown",(function(e){var t=_assertThisInitialized(n).player,r=_findInstanceProperty(n).call(n,".xgplayer-bar");util$3.event(e);var o=r.getBoundingClientRect(),i=util$3.getEventPos(e,t.zoom),a=o.height-(i.clientY-o.top);if(i.h=a,i.barH=o.height,n.pos=i,!(a<-2))return n.updateVolumePos(a,e),document.addEventListener("mouseup",n.onBarMouseUp),n._d.isStart=!0,!1})),_defineProperty$1(_assertThisInitialized(n),"onBarMouseMove",(function(e){var t=_assertThisInitialized(n)._d;if(t.isStart){var r=_assertThisInitialized(n),o=r.pos,i=r.player;e.preventDefault(),e.stopPropagation(),util$3.event(e);var a=util$3.getEventPos(e,i.zoom);t.isMoving=!0;var s=o.h-a.clientY+o.clientY;s>o.barH||n.updateVolumePos(s,e)}})),_defineProperty$1(_assertThisInitialized(n),"onBarMouseUp",(function(e){util$3.event(e),document.removeEventListener("mouseup",n.onBarMouseUp);var t=_assertThisInitialized(n)._d;t.isStart=!1,t.isMoving=!1})),_defineProperty$1(_assertThisInitialized(n),"onMouseenter",(function(e){n._d.isActive=!0,n.focus(),n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"onMouseleave",(function(e){n._d.isActive=!1,n.unFocus(100,!1,e),n.emit("icon_mouseleave",{pluginName:n.pluginName})})),_defineProperty$1(_assertThisInitialized(n),"onVolumeChange",(function(e){if(n.player){var t=n.player,r=t.muted,o=t.volume;n._d.isMoving||(_findInstanceProperty(n).call(n,".xgplayer-drag").style.height=r||0===o?"4px":"".concat(100*o,"%"),n.config.showValueLabel&&n.updateVolumeValue()),n.animate(r,o)}})),n}return _createClass$1(r,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:volumeSmallSvg,class:"xg-volume-small"},volumeLarge:{icon:volumeLargeSvg,class:"xg-volume"},volumeMuted:{icon:volumeMutedSvg,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,r=t.commonStyle,n=t.volume;if(r.volumeColor)_findInstanceProperty(this).call(this,".xgplayer-drag").style.backgroundColor=r.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"!==sniffer.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)_bindInstanceProperty(this).call(this,"mouseenter",this._onMouseenterHandler),_bindInstanceProperty(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),_bindInstanceProperty(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),_bindInstanceProperty(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),_bindInstanceProperty(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);_bindInstanceProperty(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(VOLUME_CHANGE,this.onVolumeChange),this.once(LOADED_DATA,this.onVolumeChange),"Number"!==util$3.typeOf(n)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var r=this.player,n=_findInstanceProperty(this).call(this,".xgplayer-drag"),o=_findInstanceProperty(this).call(this,".xgplayer-bar");if(o&&n){var i=_parseInt$1(e/o.getBoundingClientRect().height*1e3,10);n.style.height="".concat(e,"px");var a=Math.max(Math.min(i/1e3,1),0),s={volume:{from:r.volume,to:a}};r.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:r.muted,volume:r.volume,props:s}),r.volume=Math.max(Math.min(i/1e3,1),0),r.muted&&(r.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,r=e.muted,n=_findInstanceProperty(this).call(this,".xgplayer-value-label"),o=Math.max(Math.min(t,1),0);n.innerText=r?0:Math.round(100*o)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(util$3.clearTimeout(this,this._timerId),this._timerId=null),util$3.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this._d,i=this.player;o.isActive||(this._timerId&&(util$3.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=util$3.setTimeout(this,(function(){o.isActive||(r?i.blur():i.focus(),util$3.removeClass(e.root,"slide-show"),o.isStart&&e.onBarMouseUp(n)),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&&(util$3.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"===sniffer.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,r=this.config.showValueLabel;return _concatInstanceProperty(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(r?'<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:POSITIONS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),r}(),fails$7=fails$A,wellKnownSymbol$3=wellKnownSymbol$q,DESCRIPTORS$4=descriptors$2,IS_PURE=isPure,ITERATOR$1=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$7((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.size&&(IS_PURE||!DESCRIPTORS$4)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$1]||"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"!==r||"x"!==new URL("http://x",void 0).host})),uncurryThis$5=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$5(regexSeparators.exec),floor$2=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$5("".charCodeAt),join$2=uncurryThis$5([].join),push$a=uncurryThis$5([].push),replace$2=uncurryThis$5("".replace),split$2=uncurryThis$5("".split),toLowerCase$1=uncurryThis$5("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt(e,r++);if(o>=55296&&o<=56319&&r<n){var i=charCodeAt(e,r++);56320==(64512&i)?push$a(t,((1023&o)<<10)+(1023&i)+65536):(push$a(t,o),r--)}else push$a(t,o)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$2(e/damp):e>>1,e+=floor$2(e/t);e>baseMinusTMin*tMax>>1;)e=floor$2(e/baseMinusTMin),n+=base;return floor$2(n+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,r,n=[],o=(e=ucs2decode(e)).length,i=initialN,a=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$a(n,fromCharCode(r));var l=n.length,c=l;for(l&&push$a(n,delimiter);c<o;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var p=c+1;if(u-i>floor$2((maxInt-a)/p))throw $RangeError(OVERFLOW_ERROR);for(a+=(u-i)*p,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++a>maxInt)throw $RangeError(OVERFLOW_ERROR);if(r==i){for(var f=a,$=base;;){var y=$<=s?tMin:$>=s+tMax?tMax:$-s;if(f<y)break;var h=f-y,d=base-y;push$a(n,fromCharCode(digitToBasic(y+h%d))),f=floor$2(h/d),$+=base}push$a(n,fromCharCode(digitToBasic(f))),s=adapt(a,p,c==l),a=0,c++}}a++,i++}return join$2(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],o=split$2(replace$2(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<o.length;t++)r=o[t],push$a(n,exec$1(regexNonASCII,r)?"xn--"+encode(r):r);return join$2(n,".")},defineBuiltIn$2=defineBuiltIn$8,defineBuiltIns$2=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$2(e,n,t[n],r);return e},$$w=_export,global$3=global$r,call$5=functionCall,uncurryThis$4=functionUncurryThis,DESCRIPTORS$3=descriptors$2,USE_NATIVE_URL$2=urlConstructorDetection,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$2=defineBuiltInAccessor$5,defineBuiltIns$1=defineBuiltIns$2,setToStringTag$2=setToStringTag$9,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$3=internalState,anInstance$3=anInstance$5,isCallable$4=isCallable$q,hasOwn$2=hasOwnProperty_1,bind$a=functionBindContext,classof$2=classof$c,anObject$1=anObject$g,isObject$5=isObject$l,$toString$1=toString$e,create$1=objectCreate,createPropertyDescriptor=createPropertyDescriptor$8,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$a,validateArgumentsLength$2=validateArgumentsLength$5,wellKnownSymbol$2=wellKnownSymbol$q,arraySort=arraySort$1,ITERATOR=wellKnownSymbol$2("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$3=InternalStateModule$3.set,getInternalParamsState=InternalStateModule$3.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$3.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor5=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$3)return global$3[e];var t=getOwnPropertyDescriptor5(global$3,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers&&Headers.prototype,RegExp$1=global$3.RegExp,TypeError$2=global$3.TypeError,decodeURIComponent=global$3.decodeURIComponent,encodeURIComponent$1=global$3.encodeURIComponent,charAt$1=uncurryThis$4("".charAt),join$1=uncurryThis$4([].join),push$9=uncurryThis$4([].push),replace$1=uncurryThis$4("".replace),shift$1=uncurryThis$4([].shift),splice2=uncurryThis$4([].splice),split$1=uncurryThis$4("".split),stringSlice$1=uncurryThis$4("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$1("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=replace$1(e,plus," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=replace$1(t,percentSequence(r--),percentDecode);return t}},find2=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$1(encodeURIComponent$1(e),find2,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$3(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$5(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$1(e,0)?stringSlice$1(e,1):e:$toString$1(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,l=getIteratorMethod(e);if(l)for(r=(t=getIterator(e,l)).next;!(n=call$5(r,t)).done;){if(i=(o=getIterator(anObject$1(n.value))).next,(a=call$5(i,o)).done||(s=call$5(i,o)).done||!call$5(i,o).done)throw TypeError$2("Expected sequence with length 2");push$9(this.entries,{key:$toString$1(a.value),value:$toString$1(s.value)})}else for(var c in e)hasOwn$2(e,c)&&push$9(this.entries,{key:c,value:$toString$1(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$1(t,"="),push$9(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$1(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$9(r,serialize(e.key)+"="+serialize(e.value));return join$1(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$3(this,URLSearchParamsPrototype);var e=setInternalState$3(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$3||(this.length=e.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns$1(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$2(arguments.length,2);var r=getInternalParamsState(this);push$9(r.entries,{key:$toString$1(e),value:$toString$1(t)}),DESCRIPTORS$3||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$1(e),o=0;o<r.length;)r[o].key===n?splice2(r,o,1):o++;DESCRIPTORS$3||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$9(n,t[o].value);return n},has:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$2(arguments.length,1);for(var r,n=getInternalParamsState(this),o=n.entries,i=!1,a=$toString$1(e),s=$toString$1(t),l=0;l<o.length;l++)(r=o[l]).key===a&&(i?splice2(o,l--,1):(i=!0,r.value=s));i||push$9(o,{key:a,value:s}),DESCRIPTORS$3||(this.length=o.length),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$a(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$1(URLSearchParamsPrototype,ITERATOR,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$1(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),DESCRIPTORS$3&&defineBuiltInAccessor$2(URLSearchParamsPrototype,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$w({global:!0,constructor:!0,forced:!USE_NATIVE_URL$2},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$2&&isCallable$4(Headers)){var headersHas=uncurryThis$4(HeadersPrototype.has),headersSet=uncurryThis$4(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$5(e)){var t,r=e.body;if(classof$2(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers(e.headers):new Headers,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$1(e,{body:createPropertyDescriptor(0,$toString$1(r)),headers:createPropertyDescriptor(0,t)})}return e};if(isCallable$4(nativeFetch)&&$$w({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$4(NativeRequest)){var RequestConstructor=function(e){return anInstance$3(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$w({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$v=_export,DESCRIPTORS$2=descriptors$2,USE_NATIVE_URL$1=urlConstructorDetection,global$2=global$r,bind$9=functionBindContext,uncurryThis$3=functionUncurryThis,defineBuiltIn=defineBuiltIn$8,defineBuiltInAccessor$1=defineBuiltInAccessor$5,anInstance$2=anInstance$5,hasOwn$1=hasOwnProperty_1,assign2=objectAssign,arrayFrom=arrayFrom$1,arraySlice$1=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$e,setToStringTag$1=setToStringTag$9,validateArgumentsLength$1=validateArgumentsLength$5,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule$2=internalState,setInternalState$2=InternalStateModule$2.set,getInternalURLState=InternalStateModule$2.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$2.URL,TypeError$1=global$2.TypeError,parseInt$1=global$2.parseInt,floor$1=Math.floor,pow=Math.pow,charAt=uncurryThis$3("".charAt),exec=uncurryThis$3(/./.exec),join=uncurryThis$3([].join),numberToString=uncurryThis$3(1..toString),pop=uncurryThis$3([].pop),push$8=uncurryThis$3([].push),replace=uncurryThis$3("".replace),shift=uncurryThis$3([].shift),split=uncurryThis$3("".split),stringSlice=uncurryThis$3("".slice),toLowerCase=uncurryThis$3("".toLowerCase),unshift=uncurryThis$3([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,o,i,a,s,l=split(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=l[n]))return e;if(i=10,o.length>1&&"0"==charAt(o,0)&&(i=exec(HEX_START,o)?16:8,o=stringSlice(o,8==i?1:2)),""===o)a=0;else{if(!exec(10==i?DEC:8==i?OCT:HEX,o))return e;a=parseInt$1(o,i)}push$8(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow(256,5-t))return null}else if(a>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow(256,3-n);return s},parseIPv6=function(e){var t,r,n,o,i,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,p=0,f=function(){return charAt(e,p)};if(":"==f()){if(":"!=charAt(e,1))return;p+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=r=0;r<4&&exec(HEX,f());)t=16*t+parseInt$1(f(),16),p++,r++;if("."==f()){if(0==r)return;if(p-=r,c>6)return;for(n=0;f();){if(o=null,n>0){if(!("."==f()&&n<4))return;p++}if(!exec(DIGIT,f()))return;for(;exec(DIGIT,f());){if(i=parseInt$1(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}l[c]=256*l[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;l[c++]=t}else{if(null!==u)return;p++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t},serializeHost=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor$1(e/256);return join(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign2({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn$1(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec(ALPHA,charAt(e,0))&&(":"==(r=charAt(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice(e,0,2))&&(2==e.length||"/"===(t=charAt(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,o,i,a=$toString(e);if(t){if(o=this.parse(a))throw TypeError$1(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),o=this.parse(a,null,n))throw TypeError$1(o);(i=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=i}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,l=t||SCHEME_START,c=0,u="",p=!1,f=!1,$=!1;for(e=$toString(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);c<=n.length;){switch(o=n[c],l){case SCHEME_START:if(!o||!exec(ALPHA,o)){if(t)return INVALID_SCHEME;l=NO_SCHEME;continue}u+=toLowerCase(o),l=SCHEME;break;case SCHEME:if(o&&(exec(ALPHANUMERIC,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase(o);else{if(":"!=o){if(t)return INVALID_SCHEME;u="",l=NO_SCHEME,c=0;continue}if(t&&(s.isSpecial()!=hasOwn$1(specialSchemes,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?l=FILE:s.isSpecial()&&r&&r.scheme==s.scheme?l=SPECIAL_RELATIVE_OR_AUTHORITY:s.isSpecial()?l=SPECIAL_AUTHORITY_SLASHES:"/"==n[c+1]?(l=PATH_OR_AUTHORITY,c++):(s.cannotBeABaseURL=!0,push$8(s.path,""),l=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,l=FRAGMENT;break}l="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=o||"/"!=n[c+1]){l=RELATIVE;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES,c++;break;case PATH_OR_AUTHORITY:if("/"==o){l=AUTHORITY;break}l=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,o==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())l=RELATIVE_SLASH;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.path.length--,l=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,l=PATH;continue}l=AUTHORITY}else l=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(l=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=o||"/"!=charAt(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){p&&(u="%40"+u),p=!0,i=arrayFrom(u);for(var y=0;y<i.length;y++){var h=i[y];if(":"!=h||$){var d=percentEncode(h,userinfoPercentEncodeSet);$?s.password+=d:s.username+=d}else $=!0}u=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(p&&""==u)return INVALID_AUTHORITY;c-=arrayFrom(u).length+1,u="",l=HOST}else u+=o;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){l=FILE_HOST;continue}if(":"!=o||f){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",l=PATH_START,t)return;continue}"["==o?f=!0:"]"==o&&(f=!1),u+=o}else{if(""==u)return INVALID_HOST;if(a=s.parseHost(u))return a;if(u="",l=PORT,t==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var g=parseInt$1(u,10);if(g>65535)return INVALID_PORT;s.port=s.isSpecial()&&g===specialSchemes[s.scheme]?null:g,u=""}if(t)return;l=PATH_START;continue}return INVALID_PORT}u+=o;break;case FILE:if(s.scheme="file","/"==o||"\\"==o)l=FILE_SLASH;else{if(!r||"file"!=r.scheme){l=PATH;continue}if(o==EOF)s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))||(s.host=r.host,s.path=arraySlice$1(r.path),s.shortenPath()),l=PATH;continue}s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}}break;case FILE_SLASH:if("/"==o||"\\"==o){l=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$8(s.path,r.path[0]):s.host=r.host),l=PATH;continue;case FILE_HOST:if(o==EOF||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter(u))l=PATH;else if(""==u){if(s.host="",t)return;l=PATH_START}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",l=PATH_START}continue}u+=o;break;case PATH_START:if(s.isSpecial()){if(l=PATH,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF&&(l=PATH,"/"!=o))continue}else s.fragment="",l=FRAGMENT;else s.query="",l=QUERY;break;case PATH:if(o==EOF||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push$8(s.path,"")):isSingleDot(u)?"/"==o||"\\"==o&&s.isSpecial()||push$8(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt(u,0)+":"),push$8(s.path,u)),u="","file"==s.scheme&&(o==EOF||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==o?(s.query="",l=QUERY):"#"==o&&(s.fragment="",l=FRAGMENT)}else u+=percentEncode(o,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==o?(s.query="",l=QUERY):"#"==o?(s.fragment="",l=FRAGMENT):o!=EOF&&(s.path[0]+=percentEncode(o,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=o?o!=EOF&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode(o,C0ControlPercentEncodeSet)):(s.fragment="",l=FRAGMENT);break;case FRAGMENT:o!=EOF&&(s.fragment+=percentEncode(o,fragmentPercentEncodeSet))}c++}},parseHost:function(e){var t,r,n;if("["==charAt(e,0)){if("]"!=charAt(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$1(specialSchemes,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=serializeHost(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+join(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$1(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString(e))?this.query=null:("?"==charAt(e,0)&&(e=stringSlice(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString(e))?("#"==charAt(e,0)&&(e=stringSlice(e,1)),this.fragment="",this.parse(e,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(e){var t=anInstance$2(this,URLPrototype),r=validateArgumentsLength$1(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$2(t,new URLState(e,!1,r));DESCRIPTORS$2||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$2&&(defineBuiltInAccessor$1(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$1(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$1(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$1(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$1(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$1(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$1(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$1(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$1(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$1(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$1(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$1(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn(URLConstructor,"createObjectURL",bind$9(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn(URLConstructor,"revokeObjectURL",bind$9(nativeRevokeObjectURL,NativeURL))}setToStringTag$1(URLConstructor,"URL"),$$v({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1,sham:!DESCRIPTORS$2},{URL:URLConstructor});var $$u=_export,getBuiltIn$1=getBuiltIn$h,fails$6=fails$A,validateArgumentsLength=validateArgumentsLength$5,toString$1=toString$e,USE_NATIVE_URL=urlConstructorDetection,URL$1=getBuiltIn$1("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL&&fails$6((function(){URL$1.canParse()}));$$u({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength(arguments.length,1),r=toString$1(e),n=t<2||void 0===arguments[1]?void 0:toString$1(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$3=path$t,url$5=path$3.URL,parent$t=url$5,url$4=parent$t,parent$s=url$4,url$3=parent$s,parent$r=url$3,url$2=parent$r,url$1=url$2,url=url$1,_URL=getDefaultExportFromCjs(url);function CssFullSceenSvg(){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 ExitCssFullSceenSvg(){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 CssFullScreen=function(e){_inherits(r,Icon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{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;_get(_getPrototypeOf(r.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(CSS_FULLSCREEN_CHANGE,(function(e){t.animate(e)})),this.btnClick=_bindInstanceProperty(e=this.btnClick).call(e,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),_bindInstanceProperty(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=_findInstanceProperty(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,r=_findInstanceProperty(this).call(this,".xg-tips");r&&this.changeLangTextKey(r,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:CssFullSceenSvg,class:"xg-get-cssfull"},exitCssFullscreen:{icon:ExitCssFullSceenSvg,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){_get(_getPrototypeOf(r.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(xgIconTips(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:POSITIONS.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),r}(),isObject$4=isObject$l,classof$1=classofRaw$2,wellKnownSymbol$1=wellKnownSymbol$q,MATCH$1=wellKnownSymbol$1("match"),isRegexp=function(e){var t;return isObject$4(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$1(e))},isRegExp=isRegexp,$TypeError$4=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$4("The method doesn't accept regular expressions");return e},wellKnownSymbol=wellKnownSymbol$q,MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},isObject$3=isObject$l,floor=Math.floor,isIntegralNumber$1=Number.isInteger||function(e){return!isObject$3(e)&&isFinite(e)&&floor(e)===e},$$t=_export,isIntegralNumber=isIntegralNumber$1;$$t({target:"Number",stat:!0},{isInteger:isIntegralNumber});var path$2=path$t,isInteger$5=path$2.Number.isInteger,parent$q=isInteger$5,isInteger$4=parent$q,parent$p=isInteger$4,isInteger$3=parent$p,parent$o=isInteger$3,isInteger$2=parent$o,isInteger$1=isInteger$2,isInteger2=isInteger$1,_Number$isInteger=getDefaultExportFromCjs(isInteger2),$$s=_export,$includes=arrayIncludes.includes,fails$5=fails$A,BROKEN_ON_SPARSE=fails$5((function(){return!Array(1).includes()}));$$s({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$6=entryVirtual$n,includes$7=entryVirtual$6("Array").includes,$$r=_export,uncurryThis$2=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$7,toString4=toString$e,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$2("".indexOf);$$r({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString4(requireObjectCoercible(this)),toString4(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$5=entryVirtual$n,includes$6=entryVirtual$5("String").includes,isPrototypeOf$5=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$5=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$5||isPrototypeOf$5(ArrayPrototype$5,e)&&t===ArrayPrototype$5.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$5(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$n=includes$5,includes$4=parent$n,parent$m=includes$4,includes$3=parent$m,parent$l=includes$3,includes$2=parent$l,includes$1=includes$2,includes3=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes3),toObject$3=toObject$f,toAbsoluteIndex$1=toAbsoluteIndex$6,lengthOfArrayLike$4=lengthOfArrayLike$e,arrayFill=function(e){for(var t=toObject$3(this),r=lengthOfArrayLike$4(t),n=arguments.length,o=toAbsoluteIndex$1(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:toAbsoluteIndex$1(i,r);a>o;)t[o++]=e;return t},$$q=_export,fill$7=arrayFill;$$q({target:"Array",proto:!0},{fill:fill$7});var entryVirtual$4=entryVirtual$n,fill$6=entryVirtual$4("Array").fill,isPrototypeOf$4=objectIsPrototypeOf,method$4=fill$6,ArrayPrototype$4=Array.prototype,fill$5=function(e){var t=e.fill;return e===ArrayPrototype$4||isPrototypeOf$4(ArrayPrototype$4,e)&&t===ArrayPrototype$4.fill?method$4:t},parent$k=fill$5,fill$4=parent$k,parent$j=fill$4,fill$3=parent$j,parent$i=fill$3,fill$2=parent$i,fill$1=fill$2,fill2=fill$1,_fillInstanceProperty=getDefaultExportFromCjs(fill2),internalMetadata={exports:{}},fails$4=fails$A,arrayBufferNonExtensible=fails$4((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$3=fails$A,isObject$2=isObject$l,classof=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$3((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$2(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$2=fails$A,freezing=!fails$2((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$p=_export,uncurryThis$1=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$1=isObject$l,hasOwn2=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible2=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$1(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$1(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn2(e,METADATA)){if(!isExtensible2(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn2(e,METADATA)){if(!isExtensible2(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible2(e)&&!hasOwn2(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$1([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===METADATA){t(n,o,1);break}return n},$$p({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$o=_export,global$1=global$r,InternalMetadataModule=internalMetadataExports,fails$1=fails$A,createNonEnumerableProperty=createNonEnumerableProperty$9,iterate$f=iterate$l,anInstance$1=anInstance$5,isCallable$3=isCallable$q,isObject=isObject$l,setToStringTag=setToStringTag$9,defineProperty5=objectDefineProperty.f,forEach3=arrayIteration.forEach,DESCRIPTORS$1=descriptors$2,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(e,t,r){var n,o=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=o?"set":"add",s=global$1[e],l=s&&s.prototype,c={};if(DESCRIPTORS$1&&isCallable$3(s)&&(i||l.forEach&&!fails$1((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$1(anInstance$1(t,u),{type:e,collection:new s}),null!=r&&iterate$f(r,t[a],{that:t,AS_ENTRIES:o})}))).prototype,p=internalStateGetterFor$1(e);forEach3(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||i&&"clear"==e||createNonEnumerableProperty(u,e,(function(r,n){var o=p(this).collection;if(!t&&i&&!isObject(r))return"get"==e&&void 0;var a=o[e](0===r?0:r,n);return t?this:a}))})),i||defineProperty5(u,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=r.getConstructor(t,e,o,a),InternalMetadataModule.enable();return setToStringTag(n,e,!1,!0),c[e]=n,$$o({global:!0,forced:!0},c),i||r.setStrong(n,e,o),n},create4=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$5,defineBuiltIns=defineBuiltIns$2,bind$8=functionBindContext,anInstance=anInstance$5,isNullOrUndefined$1=isNullOrUndefined$6,iterate$e=iterate$l,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS=descriptors$2,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,i),setInternalState(e,{type:t,index:create4(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(e.size=0),isNullOrUndefined$1(o)||iterate$e(o,e[n],{that:e,AS_ENTRIES:r})})),i=o.prototype,a=internalStateGetterFor(t),s=function(e,t,r){var n,o,i=a(e),s=l(e,t);return s?s.value=r:(i.last=s={index:o=fastKey(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=s),n&&(n.next=s),DESCRIPTORS?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},l=function(e,t){var r,n=a(e),o=fastKey(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns(i,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),DESCRIPTORS?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$8(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),defineBuiltIns(i,r?{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)}}),DESCRIPTORS&&defineBuiltInAccessor(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor(t),i=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var path$1=path$t,map$5=path$1.Map,parent$h=map$5,map$4=parent$h,parent$g=map$4,map$3=parent$g,bind$7=functionBindContext,call$4=functionCall,aCallable$6=aCallable$j,aConstructor=aConstructor$3,isNullOrUndefined=isNullOrUndefined$6,iterate$d=iterate$l,push$7=[].push,collectionFrom=function(e){var t,r,n,o,i=arguments.length,a=i>1?arguments[1]:void 0;return aConstructor(this),(t=void 0!==a)&&aCallable$6(a),isNullOrUndefined(e)?new this:(r=[],t?(n=0,o=bind$7(a,i>2?arguments[2]:void 0),iterate$d(e,(function(e){call$4(push$7,r,o(e,n++))}))):iterate$d(e,push$7,{that:r}),new this(r))},$$n=_export,from3=collectionFrom;$$n({target:"Map",stat:!0,forced:!0},{from:from3});var arraySlice=arraySlice$7,collectionOf=function(){return new this(arraySlice(arguments))},$$m=_export,of2=collectionOf;$$m({target:"Map",stat:!0,forced:!0},{of:of2});var tryToString=tryToString$7,aMap$e=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(tryToString(e)+" is not a map")},caller$1=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn=getBuiltIn$h,caller=caller$1,Map$5=getBuiltIn("Map"),mapHelpers={Map:Map$5,set:caller("set",2),get:caller("get",1),has:caller("has",1),remove:caller("delete",1),proto:Map$5.prototype},$$l=_export,aMap$d=aMap$e,remove=mapHelpers.remove;$$l({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$d(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$k=_export,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$1=MapHelpers$4.get,has$1=MapHelpers$4.has,set$5=MapHelpers$4.set;$$k({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,o=aMap$c(this);return has$1(o,e)?(r=get$1(o,e),"update"in t&&(r=t.update(r,e,o),set$5(o,e,r)),r):(n=t.insert(e,o),set$5(o,e,n),n)}});var call$3=functionCall,iterateSimple$1=function(e,t,r){for(var n,o,i=r||e.next;!(n=call$3(i,e)).done;)if(void 0!==(o=t(n.value)))return o},iterateSimple=iterateSimple$1,mapIterate=function(e,t,r){return r?iterateSimple(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},$$j=_export,bind$6=functionBindContext,aMap$b=aMap$e,iterate$c=mapIterate;$$j({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$b(this),r=bind$6(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$c(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$i=_export,bind$5=functionBindContext,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$b=mapIterate,Map$4=MapHelpers$3.Map,set$4=MapHelpers$3.set;$$i({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$a(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0),n=new Map$4;return iterate$b(t,(function(e,o){r(e,o,t)&&set$4(n,o,e)})),n}});var $$h=_export,bind$4=functionBindContext,aMap$9=aMap$e,iterate$a=mapIterate;$$h({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$9(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0),n=iterate$a(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$g=_export,bind$3=functionBindContext,aMap$8=aMap$e,iterate$9=mapIterate;$$g({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$8(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=iterate$9(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$f=_export,call$2=functionCall,uncurryThis=functionUncurryThis,isCallable$2=isCallable$q,aCallable$5=aCallable$j,iterate$8=iterate$l,Map$3=mapHelpers.Map,push$6=uncurryThis([].push);$$f({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$2(this)?this:Map$3);aCallable$5(t);var n=aCallable$5(r.has),o=aCallable$5(r.get),i=aCallable$5(r.set);return iterate$8(e,(function(e){var a=t(e);call$2(n,r,a)?push$6(call$2(o,r,a),e):call$2(i,r,a,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$e=_export,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$7=mapIterate;$$e({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$7(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$d=_export,call$1=functionCall,iterate$6=iterate$l,isCallable$1=isCallable$q,aCallable$4=aCallable$j,Map$2=mapHelpers.Map;$$d({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$1(this)?this:Map$2);aCallable$4(t);var n=aCallable$4(r.set);return iterate$6(e,(function(e){call$1(n,r,t(e),e)})),r}});var $$c=_export,aMap$6=aMap$e,iterate$5=mapIterate;$$c({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$5(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$b=_export,bind$2=functionBindContext,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$4=mapIterate,Map$1=MapHelpers$2.Map,set$3=MapHelpers$2.set;$$b({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$4(t,(function(e,o){set$3(n,r(e,o,t),e)})),n}});var $$a=_export,bind$1=functionBindContext,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$3=mapIterate,Map=MapHelpers$1.Map,set$2=MapHelpers$1.set;$$a({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$1(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$3(t,(function(e,o){set$2(n,o,r(e,o,t))})),n}});var $$9=_export,aMap$3=aMap$e,iterate$2=iterate$l,set$1=mapHelpers.set;$$9({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$2(arguments[n++],(function(e,r){set$1(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$8=_export,aCallable$3=aCallable$j,aMap$2=aMap$e,iterate$1=mapIterate,$TypeError$3=TypeError;$$8({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$3(e),iterate$1(t,(function(o,i){r?(r=!1,n=o):n=e(n,o,i,t)})),r)throw $TypeError$3("Reduce of empty map with no initial value");return n}});var $$7=_export,bind2=functionBindContext,aMap$1=aMap$e,iterate=mapIterate;$$7({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind2(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$6=_export,aCallable$2=aCallable$j,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$2=TypeError,get2=MapHelpers.get,has2=MapHelpers.has,set2=MapHelpers.set;$$6({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$2(t);var o=has2(r,e);if(!o&&n<3)throw $TypeError$2("Updating absent value");var i=o?get2(r,e):aCallable$2(n>2?arguments[2]:void 0)(e,r);return set2(r,e,t(i,e,r)),r}});var call=functionCall,aCallable$1=aCallable$j,isCallable=isCallable$q,anObject=anObject$g,$TypeError$1=TypeError,mapUpsert=function(e,t){var r,n=anObject(this),o=aCallable$1(n.get),i=aCallable$1(n.has),a=aCallable$1(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable(t)&&!isCallable(s))throw $TypeError$1("At least one callback required");return call(i,n,e)?(r=call(o,n,e),isCallable(t)&&(r=t(r),call(a,n,e,r))):isCallable(s)&&(r=s(),call(a,n,e,r)),r},$$5=_export,upsert$1=mapUpsert;$$5({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$4=_export,upsert2=mapUpsert;$$4({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$f=map$3,map$2=parent$f,map$1=map$2,map2=map$1,_Map=getDefaultExportFromCjs(map2);function _typeof(e){return(_typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPrimitive(e,t){if("object"!==_typeof$3(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$3(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof$3(t)?t:String(t)}var aCallable=aCallable$j,toObject$2=toObject$f,IndexedObject=indexedObject,lengthOfArrayLike$3=lengthOfArrayLike$e,$TypeError=TypeError,createMethod=function(e){return function(t,r,n,o){aCallable(r);var i=toObject$2(t),a=IndexedObject(i),s=lengthOfArrayLike$3(i),l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in a){o=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw $TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(o=r(o,a[l],l,i));return o}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$3=_export,$reduce=arrayReduce.left,arrayMethodIsStrict$1=arrayMethodIsStrict$7,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&engineV8Version>79&&engineV8Version<83,FORCED$2=CHROME_BUG||!arrayMethodIsStrict$1("reduce");$$3({target:"Array",proto:!0,forced:FORCED$2},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var entryVirtual$3=entryVirtual$n,reduce$6=entryVirtual$3("Array").reduce,isPrototypeOf$3=objectIsPrototypeOf,method$3=reduce$6,ArrayPrototype$3=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$3||isPrototypeOf$3(ArrayPrototype$3,e)&&t===ArrayPrototype$3.reduce?method$3:t},parent$e=reduce$5,reduce$4=parent$e,parent$d=reduce$4,reduce$3=parent$d,parent$c=reduce$3,reduce$2=parent$c,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),LogCacheLevel={DEBUG:1,LOG:2,WARN:3,ERROR:4},LOG_MAX_SIZE=204800,SIMPLE_TYPE=["Boolean","Number","String","Undefined","Null","Date","Object"],Logger=function(){function e(t,r){_classCallCheck(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||LOG_MAX_SIZE,this.logSize=0,this.logTextArray=[]}return _createClass(e,[{key:"debug",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.DEBUG]).call(t,i)),e.disabled||(n=console).debug.apply(n,_concatInstanceProperty(r=["[".concat(nowTime(),"]"),this._prefix]).call(r,i))}},{key:"log",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.LOG]).call(t,i)),e.disabled||(n=console).log.apply(n,_concatInstanceProperty(r=["[".concat(nowTime(),"]"),this._prefix]).call(r,i))}},{key:"warn",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.WARN]).call(t,i)),e.disabled||(n=console).warn.apply(n,_concatInstanceProperty(r=["[".concat(nowTime(),"]"),this._prefix]).call(r,i))}},{key:"error",value:function(){for(var t,r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.ERROR]).call(t,i)),e.disabled||(n=console).error.apply(n,_concatInstanceProperty(r=["[".concat(nowTime(),"]"),this._prefix]).call(r,i))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=_mapInstanceProperty(n).call(n,(function(e){return logable(e)}));t="[".concat(nowTime(),"]")+this._prefix+_JSON$stringify(i)}catch(e){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}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function nowTime(){return(new Date).toLocaleString()}function reduceDepth(e){var t;if("object"!==_typeof(e))return e;var r=_sliceInstanceProperty(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function logable(e,t,r){var n;r||(r=1),t||(t=2);var o={};if(!e||"object"!==_typeof(e))return e;var i=_sliceInstanceProperty(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!_includesInstanceProperty(SIMPLE_TYPE).call(SIMPLE_TYPE,i))return i;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?o[a]=reduceDepth(e[a]):"object"===_typeof(e[a])?o[a]=logable(e[a],t,r+1):o[a]=e[a]);return o}}function createPublicPromise(){var e,t,r=new _Promise((function(r,n){e=r,t=n}));return r.used=!1,r.resolve=function(){return r.used=!0,e.apply(void 0,arguments)},r.reject=function(){return r.used=!0,t.apply(void 0,arguments)},r}_defineProperty(Logger,"disabled",!0);var AUDIO=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"}),VIDEO=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 setupDefaultValues(e){return _Object$assign({muted:!1,timeout:250,inline:!1},e)}function startPlayback(e,t){var r=e.muted,n=e.timeout,o=e.inline,i=t(),a=i.element,s=i.source,l=void 0,c=void 0,u=void 0;return a.muted=r,!0===r&&a.setAttribute("muted","muted"),!0===o&&a.setAttribute("playsinline","playsinline"),a.src=s,new _Promise((function(e){l=a.play(),c=_setTimeout((function(){u(!1,new Error("Timeout "+n+" ms has been reached"))}),n),u=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(c),e({result:t,error:r})},void 0!==l?l.then((function(){return u(!0)})).catch((function(e){return u(!1,e)})):u(!0)}))}function video(e){return startPlayback(e=setupDefaultValues(e),(function(){return{element:document.createElement("video"),source:_URL.createObjectURL(VIDEO)}}))}function audio(e){return startPlayback(e=setupDefaultValues(e),(function(){return{element:document.createElement("audio"),source:_URL.createObjectURL(AUDIO)}}))}var index={audio:audio,video:video},logger$2=new Logger("AdsPluginBaseAdManager"),BaseAdManager=function(e){_inherits$1(r,eventemitter3Exports.EventEmitter);var t=_createSuper$1(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$2(this,r),(e=t.call(this)).options=n,e.config=n.config||{},e.plugin=n.plugin,e.player=n.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 _createClass$2(r,[{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=_objectSpread2$1(_objectSpread2$1({},this.config),e):logger$2.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(){logger$2.log("content play"),e.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.addClass(STATE_CLASS.PLAYING),e.state<STATES.RUNNING&&(e.setState(STATES.RUNNING),e.emit(AUTOPLAY_STARTED))})).catch((function(t){if(logger$2.error("content play error",t),e.media&&e.media.error)return e.onError(),void e.removeClass(STATE_CLASS.ENTER)})):e.state<STATES.RUNNING&&(e.setState(STATES.RUNNING),e.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.removeClass(STATE_CLASS.NO_START),e.removeClass(STATE_CLASS.ENTER),e.addClass(STATE_CLASS.PLAYING),e.emit(AUTOPLAY_STARTED))}}]),r}(),logger$1=new Logger("AdsPluginImaAdManager"),CLASS_NAME="xgplayer-ads-playing",ImaAdManager=function(e){_inherits$1(i,BaseAdManager);var t,r,n,o=_createSuper$1(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$2(this,i),_defineProperty$2(_assertThisInitialized$1(e=o.call(this,t)),"_onMediaEnded",(function(){var t;e.isLinearAdRunning||(e._isMediaEnded=!0,null===(t=e.adsLoader)||void 0===t||t.contentComplete())})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaResize",(function(){var t,r=_assertThisInitialized$1(e).player,n=e.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(t=e.adsManager)||void 0===t||t.resize(r.sizeInfo.width,r.sizeInfo.height,n)})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaPlay",(function(){e._mediaPlayed=!0})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaPause",(function(){e._mediaPlayed=!1})),_defineProperty$2(_assertThisInitialized$1(e),"_onMediaVolumeChange",(function(){var t;null===(t=e.adsManager)||void 0===t||t.setVolume(e.player.muted?0:e.player.volume)})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsManagerLoaded",(function(t){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0;var n=e.adsManager=t.getAdsManager(e.mediaElement,r);logger$1.log("AdManager Loaded",n);var o=n.getCuePoints();o.length&&logger$1.log("cuePoints",o),e._initAdsManagerEventListeners(),e.player.emit(IMA_AD_MANAGER_READY,{adsManager:n})})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsManagerAdError",(function(t){e._handleAdError(t.getError()),e._resumeContent()})),_defineProperty$2(_assertThisInitialized$1(e),"_onAdsLoaderAdError",(function(t){e._handleAdError(t.getError())})),_defineProperty$2(_assertThisInitialized$1(e),"_handleAdError",(function(t){var r,n,o;logger$1.log("AdError",t),e.shouldBlockVideoContent=!1,e.isLinearAdRunning=!1,null===(r=e.adsManager)||void 0===r||r.destroy(),null===(n=e.plugin)||void 0===n||n.emit(IMA_AD_ERROR,t),null===(o=e.plugin)||void 0===o||o.emit(AD_ERROR,t)})),_defineProperty$2(_assertThisInitialized$1(e),"onAdEvent",(function(t){var r,n=_assertThisInitialized$1(e).player,o=null==t?void 0:t.getAd(),i=(null==t?void 0:t.getAdData())||(null==o?void 0:o.data),a=!1;switch(null==t?void 0:t.type){case google.ima.AdEvent.Type.AD_BREAK_READY:e.player.emit(IMA_AD_BREAK_READY,{ad:o});break;case google.ima.AdEvent.Type.LOADED:var s=(i||{}).adPodInfo,l=0===(null==s?void 0:s.podIndex);a=!0,l&&(o.isLinear()?e.shouldBlockVideoContent=!0:(e.shouldBlockVideoContent=!1,e.tryContentPlay())),e.emit(IMA_AD_LOADED,{ad:o,isPreroll:l}),e.plugin.emit(IMA_AD_LOADED,{ad:o,isPreroll:l});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:if(e._resumeCallback)if(!e._resumeCallback().canResume)break;e._resumeContent(),e.emit(IMA_CONTENT_RESUME_REQUESTED,{ad:o});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.isLinearAdRunning=!0,e.shouldBlockVideoContent=!0,util$3.addClass(e.player.root,CLASS_NAME),null==n||n.pause(),e.emit(IMA_CONTENT_PAUSE_REQUESTED,{ad:o});break;case google.ima.AdEvent.Type.STARTED:e.plugin.emit(AD_START,{ad:o}),o.isLinear()&&(e._isAdPaused=!1,e.plugin.emit(AD_PLAY,{ad:o}),r=_setInterval((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:e._isAdPaused=!1,e.plugin.emit(AD_PLAY,{ad:o});break;case google.ima.AdEvent.Type.PAUSED:e._isAdPaused=!0,e.plugin.emit(AD_PAUSE,{ad:o});break;case google.ima.AdEvent.Type.SKIPPED:e.plugin.emit(AD_SKIPPED,{ad:o});break;case google.ima.AdEvent.Type.AD_PROGRESS:var c=t.getAdData(),u=c.currentTime,p=c.duration;_Object$assign(e.context,{currentTime:u,duration:p}),e.plugin.emit(AD_TIME_UPDATE,{ad:o});break;case google.ima.AdEvent.Type.COMPLETE:var f=(i||{}).adPodInfo,$=!1;null!=o&&o.isLinear()&&(f&&($=f.adPosition<f.totalAds),clearInterval(r)),e.plugin.emit(IMA_AD_COMPLETE,{ad:o,hasNextInPod:$}),e.plugin.emit(AD_COMPLETE,{ad:o,hasNextInPod:$});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=o&&o.isLinear()&&clearInterval(r),e.plugin.emit(IMA_ALL_ADS_COMPLETED,{ad:o}),e.player.emit(AD_ALL_COMPLETED,{ad:o});break;default:null!=o&&o.isLinear()&&clearInterval(r)}logger$1.log("AdEvent",null==t?void 0:t.type,a?_JSON$stringify((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 _createClass$2(i,[{key:"init",value:(n=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().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(IMA_SDK_LOAD_START),e.next=5,this._loadIMASdk();case 5:this.emit(IMA_SDK_LOAD_SUCCESS),e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(1),logger$1.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(IMA_SDK_LOAD_ERROR),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 n.apply(this,arguments)})},{key:"destroy",value:function(){_get$1(_getPrototypeOf$1(i.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 _Promise((function(t,r){if("undefined"!=typeof google&&google.ima)t();else{var n=document.createElement("script"),o=_setTimeout((function(){r(new Error("google.ima sdk load timeout"))}),e.config.loadSdkTimeout||3e3);n.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(e.config.debug?"_debug":"",".js"),n.onload=function(){clearTimeout(o),t()},n.onerror=function(e){clearTimeout(o),r(null==e?void 0:e.message)},document.head.appendChild(n)}}))}},{key:"_initMediaEvents",value:function(){var e=this.player;e.on(VIDEO_RESIZE,this._onMediaResize),e.on(ENDED,this._onMediaEnded),e.on(PLAY,this._onMediaPlay),e.on(PAUSE,this._onMediaPause),e.on(VOLUME_CHANGE,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var e=this.player;e.off(VIDEO_RESIZE,this._onMediaResize),e.off(ENDED,this._onMediaEnded),e.off(PLAY,this._onMediaPlay),e.off(PAUSE,this._onMediaPause),e.off(VOLUME_CHANGE,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(IMA_AD_LOADER_READY,{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:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r,n,o,i=this;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl,!(r||n||o)){e.next=9;break}return e.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(IMA_AD_MANAGER_READY,(function(){i.autoplayAllowed?i.playAds():i.player.useHooks("play",(function e(){return i.playAds(),i.player.removeHooks("play",e),!1})),i.emit(IMA_READY_TO_PLAY)})),this.player.once(IMA_AD_ERROR,(function(){i.emit(IMA_READY_TO_PLAY)})),e.next=10;break;case 9:this.emit(IMA_READY_TO_PLAY);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.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(e){this._handleAdError(e),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var e=this,t=this.adsManager;t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var r=["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"];_forEachInstanceProperty(r).call(r,(function(r){t.addEventListener(google.ima.AdEvent.Type[r],e.onAdEvent)}))}},{key:"_resumeContent",value:function(){var e;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,util$3.removeClass(this.player.root,CLASS_NAME),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(),util$3.removeClass(this.player.root,CLASS_NAME)}},{key:"requestAds",value:function(){var e,t=this.config,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl,i=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=i.sizeInfo.width,a.linearAdSlotHeight=i.sizeInfo.height,a.nonLinearAdSlotWidth=i.sizeInfo.width,a.nonLinearAdSlotHeight=i.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),o)a.adTagUrl=o;else if(n)a.adsResponse=n;else if(r&&"object"===_typeof$2(r)){var s;_forEachInstanceProperty(s=_Object$keys(r)).call(s,(function(e){a[e]=r[e]}))}logger$1.log("requestAds",_JSON$stringify(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){_get$1(_getPrototypeOf$1(i.prototype),"updateConfig",this).call(this,e),this._initConfig()}},{key:"_checkAutoplaySupport",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r,n,o,i;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player.config.autoplay,e.next=4,_Promise.all([t?index.video({timeout:800}).then((function(e){return e.result})):_Promise.resolve(!1),t&&this.player.config.autoplayMuted?index.video({timeout:800,muted:!0}).then((function(e){return e.result})):_Promise.resolve(!1)]);case 4:r=e.sent,n=_slicedToArray(r,2),o=n[0],i=n[1],this.autoplayAllowed=o||i,this.autoplayRequiresMuted=!o&&i,logger$1.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),i}(),AD_STATE_CLASS={START:"xgplayer-ad-start",UI_SHOW:"xgplayer-ad-show-ui"},AdPlayIcon=function(e){_inherits$1(r,Play);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck$2(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$2(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=n.getAdPlugin();return t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1})),n}return _createClass$2(r,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var e=this;this.on([AD_PAUSE],(function(){e.animate(!0)})),this.on(AD_PLAY,(function(){e.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),r}(),AdProgress=function(e){_inherits$1(r,Progress);var t=_createSuper$1(r);function r(){return _classCallCheck$2(this,r),t.apply(this,arguments)}return _createClass$2(r,[{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(){_Object$assign(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),_get$1(_getPrototypeOf$1(r.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var e=this;this.on(AD_TIME_UPDATE,(function(){e.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),r}(),AdTimeIcon=function(e){_inherits$1(r,Time);var t=_createSuper$1(r);function r(){return _classCallCheck$2(this,r),t.apply(this,arguments)}return _createClass$2(r,[{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([AD_TIME_UPDATE],(function(t){e.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),r}(),AdUIManager=function(){function e(t,r){_classCallCheck$2(this,e);var n=r.player,o=r.plugin;this.player=n,this.config=t,this.adPlugin=o,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[Play,AdPlayIcon],[Time,AdTimeIcon],[Progress,AdProgress],[Volume,null],[CssFullScreen,null],[Fullscreen,null]],this.init(),this.initEvents()}return _createClass$2(e,[{key:"init",value:function(){var e=this.player,t=this.adUIPlugins,r=this.fragment,n=this.decoratedAdPluginList;_forEachInstanceProperty(n).call(n,(function(n){var o=_slicedToArray(n,2),i=o[0],a=o[1],s=e.getPlugin(i.pluginName);if(s){var l=null;a&&!e.getPlugin(a.pluginName)&&(e.registerPlugin(a),l=e.getPlugin(a.pluginName),r.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,r=this.player;t.on(AD_PLAY,(function(){var e=[STATE_CLASS.NO_START,STATE_CLASS.PAUSED,STATE_CLASS.ENDED,STATE_CLASS.ERROR,STATE_CLASS.REPLAY,STATE_CLASS.LOADING];_forEachInstanceProperty(e).call(e,(function(e){r.removeClass(e)}))})),t.on(AD_START,(function(){e.showAdContainer()})),t.on(AD_COMPLETE,(function(t){t.hasNextInPod||e.hideAdContainer()})),t.on(AD_SKIPPED,(function(){e.hideAdContainer()})),t.on(AD_ERROR,(function(){e.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var e=this.player;util$3.hasClass(e.root,AD_STATE_CLASS.START)||util$3.addClass(e.root,AD_STATE_CLASS.START)}},{key:"hideAdContainer",value:function(){var e=this.player;util$3.hasClass(e.root,AD_STATE_CLASS.START)&&util$3.removeClass(e.root,AD_STATE_CLASS.START)}},{key:"showAdUI",value:function(){var e,t=this.player,r=this.config,n=this.adUIPlugins,o=this.fragment;_forEachInstanceProperty(n).call(n,(function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];if(n){var i=n.root,a=r.root;o.contains(i)&&o.removeChild(i),a.parentNode.insertBefore(i,a),o.appendChild(a)}}));var i=this._getNonAdPlugin();_forEachInstanceProperty(e=_filterInstanceProperty(i).call(i,(function(e){return!!e.root}))).call(e,(function(e){var t=e.root;e.__adStub__||(e.__adStub__=util$3.createDom("xg-ad-stub","",{})),t.parentNode.insertBefore(e.__adStub__,t),o.appendChild(t)}));var a=t.getPlugin("start");a&&a.hide(),!1===r.controls&&t.controls&&this.hideControls(),this.showAdContainer(),t.addClass(AD_STATE_CLASS.UI_SHOW)}},{key:"hideAdUI",value:function(){var e,t,r=this.player,n=this.config,o=this.adUIPlugins,i=this.fragment;_forEachInstanceProperty(o).call(o,(function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];if(n){var o=n.root,a=r.root;i.contains(a)&&i.removeChild(a),i.contains(o)||(o.parentNode.insertBefore(a,o),i.appendChild(o))}}));var a=this._getNonAdPlugin();_forEachInstanceProperty(e=_filterInstanceProperty(a).call(a,(function(e){return!!e.root}))).call(e,(function(e){var t,r,n=e.root;i.contains(n)&&i.removeChild(n),null===(t=e.__adStub__)||void 0===t||null===(r=t.parentNode)||void 0===r||r.insertBefore(n,e.__adStub__)})),!1===n.controls&&i.contains(null===(t=r.controls)||void 0===t?void 0:t.root)&&this.showControls();var s=r.getPlugin("start");if(s){var l=s.config.disableAnimate,c=s.config.isShowPause;l||(s.config.disableAnimate=!0,s.config.isShowPause=!1),r.once("play",(function(){_setTimeout((function(){s.config.disableAnimate=l,s.config.disableAnimate=c}),10)}))}r.removeClass(AD_STATE_CLASS.UI_SHOW)}},{key:"hideControls",value:function(){var e=this.player,t=this.config,r=this.fragment;if(!1===t.controls&&e.controls){var n=e.controls.root,o=n.parentElement,i=n.previousSibling,a=n.nextSibling;this.controlsPos={parentNode:o,previousSibling:i,nextSibling:a},r.appendChild(e.controls.root)}}},{key:"showControls",value:function(){var e=this.player,t=this.config,r=this.fragment;if(!1===t.controls&&e.controls){if(!this.controlsPos)return;var n=e.controls.root;r.contains(n)&&r.removeChild(n);var o=this.controlsPos,i=o.parentNode,a=o.previousSibling,s=o.nextSibling;i&&(s?i.insertBefore(n,s):a?i.insertBefore(n,a.nextSibling):i.appendChild(n)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var e,t=this.player,r=this.decoratedAdPluginList,n=[];_forEachInstanceProperty(r).call(r,(function(e){var t=_slicedToArray(e,2),r=t[0],o=t[1];n.push(r.pluginName.toLowerCase()),o&&n.push(o.pluginName.toLowerCase())}));var o=(null===(e=t.controls)||void 0===e?void 0:e.plugins())||[];return _filterInstanceProperty(o).call(o,(function(e){return-1===_indexOfInstanceProperty(n).call(n,e.pluginName.toLowerCase())}))}}]),e}(),logger=new Logger("AdsPlugin"),AdsPlugin$1=function(e){_inherits$1(n,Plugin);var t,r=_createSuper$1(n);function n(){return _classCallCheck$2(this,n),r.apply(this,arguments)}return _createClass$2(n,[{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;logger.log("plugin afterCreate, config: ".concat(_JSON$stringify(e||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){switch(logger.log("plugin beforePlayerInit"),this.initPromise=createPublicPromise(),this.uiManager=new AdUIManager(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 util$3.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t=this;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.csManager=new ImaAdManager({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(IMA_SDK_LOAD_START,(function(){t.uiManager.showAdContainer()})),this.csManager.on(IMA_SDK_LOAD_ERROR,(function(){t.uiManager.hideAdContainer()})),this.csManager.once(IMA_AD_LOADED,(function(e){e.isPreroll||t.uiManager.hideAdContainer()})),this.csManager.once(IMA_READY_TO_PLAY,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(IMA_CONTENT_PAUSE_REQUESTED,(function(){t.uiManager.showAdUI()})),this.csManager.on(IMA_CONTENT_RESUME_REQUESTED,(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 r;null!==(r=e.csManager)&&void 0!==r&&r.shouldBlockVideoContent&&(logger.log("block content play"),t.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(),$$2=_export,toObject$1=toObject$f,lengthOfArrayLike$2=lengthOfArrayLike$e,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$3,fails=fails$A,INCORRECT_TO_LENGTH=fails((function(){return 4294967297!==[].push.call({length:4294967296},1)})),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},FORCED$1=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$2({target:"Array",proto:!0,arity:1,forced:FORCED$1},{push:function(e){var t=toObject$1(this),r=lengthOfArrayLike$2(t),n=arguments.length;doesNotExceedSafeInteger(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return setArrayLength(t,r),r}});var entryVirtual$2=entryVirtual$n,push$5=entryVirtual$2("Array").push,isPrototypeOf$2=objectIsPrototypeOf,method$2=push$5,ArrayPrototype$2=Array.prototype,push$4=function(e){var t=e.push;return e===ArrayPrototype$2||isPrototypeOf$2(ArrayPrototype$2,e)&&t===ArrayPrototype$2.push?method$2:t},parent$b=push$4,push$3=parent$b,parent$a=push$3,push$2=parent$a,parent$9=push$2,push$1=parent$9,push2=push$1,_pushInstanceProperty=getDefaultExportFromCjs(push2);function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=_Object$defineProperty$1||function(e,t,r){e[t]=r.value},o="function"==typeof _Symbol$1?_Symbol$1:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,r){return _Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=_Object$create$1(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:_(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p={};function f(){}function $(){}function y(){}var h={};l(h,i,(function(){return this}));var d=_Object$getPrototypeOf$1&&_Object$getPrototypeOf$1(_Object$getPrototypeOf$1(E([])));d&&d!==t&&r.call(d,i)&&(h=d);var g=y.prototype=f.prototype=_Object$create$1(h);function m(e){var t;_forEachInstanceProperty$1(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==_typeof$3(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(p).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function _(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function b(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t,r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),_pushInstanceProperty(t=this.tryEntries).call(t,r)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty$1(e).call(e,S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return $.prototype=y,n(g,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:$,configurable:!0}),$.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===$||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return _Object$setPrototypeOf$1?_Object$setPrototypeOf$1(e,y):(e.__proto__=y,l(e,s,"GeneratorFunction")),e.prototype=_Object$create$1(g),e},e.awrap=function(e){return{__await:e}},m(v.prototype),l(v.prototype,a,(function(){return this})),e.AsyncIterator=v,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise$1);var a=new v(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),l(g,s,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)_pushInstanceProperty(r).call(r,n);return _reverseInstanceProperty$1(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=E,P.prototype={constructor:P,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,_forEachInstanceProperty$1(t=this.tryEntries).call(t,I),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+_sliceInstanceProperty$1(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise$1.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise$1((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=_sliceInstanceProperty$1(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from$1(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol$1&&_getIteratorMethod$1(e)||e["@@iterator"];if(!r){if(_Array$isArray$1(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}var scte35={},descriptors$1={},util$2={};!function(e){_Object$defineProperty(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 _mapInstanceProperty([]).call(e,(function(e,t){var r=(e<=15?"0":"")+e.toString(16);return t>=4&&t<=10&&t%2==0?"-"+r:r})).join("")},e.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);e.shiftThirtyTwoBits=function(t){return t*e.THIRTY_TWO_BIT_MULTIPLIER}}(util$2),_Object$defineProperty(descriptors$1,"__esModule",{value:!0}),descriptors$1.parseDescriptor=descriptors$1.SegmentationMessage=void 0;var SegmentationMessage,util$1=util$2;!function(e){e[e.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",e[e.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",e[e.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",e[e.NONE=3]="NONE"}(SegmentationMessage||(descriptors$1.SegmentationMessage=SegmentationMessage={}));var spliceDescriptor=function(e){var t={},r=0;for(t.spliceDescriptorTag=e.getUint8(r++),t.descriptorLength=e.getUint8(r++),t.identifier="";t.identifier.length<4;)t.identifier+=String.fromCharCode(e.getUint8(r++));return t},parseDescriptor=function(e){var t,r=spliceDescriptor(e),n=6;if(0===r.spliceDescriptorTag)n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===r.spliceDescriptorTag)n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===r.spliceDescriptorTag){var o=r;if(o.segmentationEventId=e.getUint32(n),n+=4,o.segmentationEventCancelIndicator=!!(128&e.getUint8(n++)),!o.segmentationEventCancelIndicator){var i=e.getUint8(n++);o.programSegmentationFlag=!!(128&i),o.segmentationDurationFlag=!!(64&i),o.deliveryNotRestrictedFlag=!!(32&i),o.deliveryNotRestrictedFlag||(o.webDeliveryAllowedFlag=!!(16&i),o.noRegionalBlackoutFlag=!!(8&i),o.archiveAllowedFlag=!!(4&i),o.deviceRestrictions=3&i),o.programSegmentationFlag||(o.componentCount=e.getUint8(n++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+o.componentCount),n+=6*o.componentCount),o.segmentationDurationFlag&&(o.segmentationDuration=util$1.shiftThirtyTwoBits(e.getUint8(n++)),o.segmentationDuration+=e.getUint32(n),n+=4),o.segmentationUpidType=e.getUint8(n++),o.segmentationUpidLength=e.getUint8(n++);var a=o.segmentationUpidLength;for(o.segmentationUpid=new Uint8Array(a);a>=0;)a--,o.segmentationUpid[a]=e.getUint8(n+a);n+=o.segmentationUpidLength,o.segmentationTypeId=e.getUint8(n++),o.segmentNum=e.getUint8(n++),o.segmentsExpected=e.getUint8(n++),n<r.descriptorLength+2&&(52===o.segmentationTypeId||54===o.segmentationTypeId)&&(o.subSegmentNum=e.getUint8(n++),o.subSegmentsExpected=e.getUint8(n++))}}else 3===r.spliceDescriptorTag?(n=r.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(r.spliceDescriptorTag)),n=r.descriptorLength+2);n!==r.descriptorLength+2&&console.error(_concatInstanceProperty(t="scte35-js Error reading descriptor offset @".concat(n," of ")).call(t,r.descriptorLength+2));return r};descriptors$1.parseDescriptor=parseDescriptor;var path=path$t,_for$5=path.Symbol.for,parent$8=_for$5,_for$4=parent$8,parent$7=_for$4,_for$3=parent$7,parent$6=_for$3,_for$2=parent$6,_for$1=_for$2,_for=_for$1,_Symbol$for=getDefaultExportFromCjs(_for),apply=functionApply,toIndexedObject=toIndexedObject$b,toIntegerOrInfinity=toIntegerOrInfinity$6,lengthOfArrayLike$1=lengthOfArrayLike$e,arrayMethodIsStrict=arrayMethodIsStrict$7,min$1=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),FORCED=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED?function(e){if(NEGATIVE_ZERO)return apply($lastIndexOf,this,arguments)||0;var t=toIndexedObject(this),r=lengthOfArrayLike$1(t),n=r-1;for(arguments.length>1&&(n=min$1(n,toIntegerOrInfinity(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$1=_export,lastIndexOf$7=arrayLastIndexOf;$$1({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var entryVirtual$1=entryVirtual$n,lastIndexOf$6=entryVirtual$1("Array").lastIndexOf,isPrototypeOf$1=objectIsPrototypeOf,method$1=lastIndexOf$6,ArrayPrototype$1=Array.prototype,lastIndexOf$5=function(e){var t=e.lastIndexOf;return e===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,e)&&t===ArrayPrototype$1.lastIndexOf?method$1:t},parent$5=lastIndexOf$5,lastIndexOf$4=parent$5,parent$4=lastIndexOf$4,lastIndexOf$3=parent$4,parent$3=lastIndexOf$3,lastIndexOf$2=parent$3,lastIndexOf$1=lastIndexOf$2,lastIndexOf2=lastIndexOf$1,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf2),toObject=toObject$f,toAbsoluteIndex=toAbsoluteIndex$6,lengthOfArrayLike=lengthOfArrayLike$e,deletePropertyOrThrow=deletePropertyOrThrow$3,min=Math.min,arrayCopyWithin=[].copyWithin||function(e,t){var r=toObject(this),n=lengthOfArrayLike(r),o=toAbsoluteIndex(e,n),i=toAbsoluteIndex(t,n),a=arguments.length>2?arguments[2]:void 0,s=min((void 0===a?n:toAbsoluteIndex(a,n))-i,n-o),l=1;for(i<o&&o<i+s&&(l=-1,i+=s-1,o+=s-1);s-- >0;)i in r?r[o]=r[i]:deletePropertyOrThrow(r,o),o+=l,i+=l;return r},$=_export,copyWithin$7=arrayCopyWithin;$({target:"Array",proto:!0},{copyWithin:copyWithin$7});var entryVirtual=entryVirtual$n,copyWithin$6=entryVirtual("Array").copyWithin,isPrototypeOf=objectIsPrototypeOf,method=copyWithin$6,ArrayPrototype=Array.prototype,copyWithin$5=function(e){var t=e.copyWithin;return e===ArrayPrototype||isPrototypeOf(ArrayPrototype,e)&&t===ArrayPrototype.copyWithin?method:t},parent$2=copyWithin$5,copyWithin$4=parent$2,parent$1=copyWithin$4,copyWithin$3=parent$1,parent=copyWithin$3,copyWithin$2=parent,copyWithin$1=copyWithin$2,copyWithin2=copyWithin$1,_copyWithinInstanceProperty=getDefaultExportFromCjs(copyWithin2),buffer={},base64Js={};base64Js.byteLength=byteLength,base64Js.toByteArray=toByteArray,base64Js.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=_indexOfInstanceProperty(e).call(e,"=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function byteLength(e){var t=getLens(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function _byteLength(e,t,r){return 3*(t+r)/4-r}function toByteArray(e){var t,r,n=getLens(e),o=n[0],i=n[1],a=new Arr(_byteLength(e,o,i)),s=0,l=i>0?o-4:o;for(r=0;r<l;r+=4)t=revLookup[e.charCodeAt(r)]<<18|revLookup[e.charCodeAt(r+1)]<<12|revLookup[e.charCodeAt(r+2)]<<6|revLookup[e.charCodeAt(r+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===i&&(t=revLookup[e.charCodeAt(r)]<<2|revLookup[e.charCodeAt(r+1)]>>4,a[s++]=255&t),1===i&&(t=revLookup[e.charCodeAt(r)]<<10|revLookup[e.charCodeAt(r+1)]<<4|revLookup[e.charCodeAt(r+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(tripletToBase64(n));return o.join("")}function fromByteArray(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(encodeChunk(e,a,a+i>s?s:a+i));return 1===n?(t=e[r-1],o.push(lookup[t>>2]+lookup[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),o.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var ieee754={
2
2
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
- read:function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<<s)-1,c=l>>1,u=-7,p=r?o-1:0,f=r?-1:1,$=e[t+p];for(p+=f,i=$&(1<<-u)-1,$>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*($?-1:1);a+=Math.pow(2,n),i-=c}return($?-1:1)*a*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,$=n?0:i-1,y=n?1:-1,h=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+$]=255&s,$+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+$]=255&a,$+=y,a/=256,c-=8);e[r+$-y]|=128*h}};(function(e){var t=base64Js,r=ieee754,n="function"==typeof _Symbol&&"function"==typeof _Symbol$for?_Symbol$for("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 o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return _Object$setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){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 r=0|$(e,t),n=i(r),o=n.write(e,t);o!==r&&(n=_sliceInstanceProperty(n).call(n,0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return u(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 "+_typeof$3(e));if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var o=function(e){if(a.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?i(0):u(e);if("Buffer"===e.type&&_Array$isArray(e.data))return u(e.data)}(e);if(o)return o;if(void 0!==_Symbol&&null!=_Symbol$toPrimitive&&"function"==typeof e[_Symbol$toPrimitive])return a.from(e[_Symbol$toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof$3(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 c(e){return l(e),i(e<0?0:0|f(e))}function u(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),_Object$setPrototypeOf(n,a.prototype),n}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function $(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(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 '+_typeof$3(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(o)return n?-1:K(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function d(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof _indexOfInstanceProperty(Uint8Array.prototype)?o?_indexOfInstanceProperty(Uint8Array.prototype).call(e,t,r):_lastIndexOfInstanceProperty(Uint8Array.prototype).call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function m(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i,a=t.length;for(n>a/2&&(n=a/2),i=0;i<n;++i){var s=_parseInt$1(t.substr(2*i,2),16);if(Y(s))return i;e[r+i]=s}return i}function v(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function _(e,t,r,n){return W(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r,n){return W(V(t),e,r,n)}function S(e,t,r,n){return W(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(_sliceInstanceProperty(e).call(e,r,n))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){var l=void 0,c=void 0,u=void 0,p=void 0;switch(s){case 1:i<128&&(a=i);break;case 2:128==(192&(l=e[o+1]))&&(p=(31&i)<<6|63&l)>127&&(a=p);break;case 3:l=e[o+1],c=e[o+2],128==(192&l)&&128==(192&c)&&(p=(15&i)<<12|(63&l)<<6|63&c)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:l=e[o+1],c=e[o+2],u=e[o+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(p=(15&i)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,_sliceInstanceProperty(e).call(e,n,n+=E));return r}(n)}e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return _Object$setPrototypeOf(t,Uint8Array.prototype),_Object$setPrototypeOf(e,t),42===e.foo()}catch(e){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."),_Object$defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),_Object$defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},_Object$setPrototypeOf(a.prototype,Uint8Array.prototype),_Object$setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?i(e):void 0!==t?"string"==typeof r?_fillInstanceProperty(n=i(e)).call(n,t,r):_fillInstanceProperty(o=i(e)).call(o,t):i(e);var n,o}(e,t,r)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(z(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),z(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 r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?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(!_Array$isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(z(i,Uint8Array))o+i.length>n.length?(a.isBuffer(i)||(i=a.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else{if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},a.byteLength=$,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)h(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)h(this,t,t+3),h(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)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):y.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,r="",n=e.INSPECT_MAX_BYTES;return r=_trimInstanceProperty(t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ")).call(t),this.length>n&&(r+=" ... "),"<Buffer "+r+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(z(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 '+_typeof$3(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(i,s),c=_sliceInstanceProperty(this).call(this,n,o),u=_sliceInstanceProperty(e).call(e,t,r),p=0;p<l;++p)if(c[p]!==u[p]){i=c[p],s=u[p];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,r){return-1!==_indexOfInstanceProperty(this).call(this,e,t,r)},a.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:_sliceInstanceProperty(Array.prototype).call(this._arr||this,0)}};var E=4096;function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function A(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=q[e[i]];return o}function C(e,t,r){for(var n=_sliceInstanceProperty(e).call(e,t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function w(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n,o){B(t,n,o,e,r,7);var i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){B(t,n,o,e,r,7);var i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function M(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(e,t,n,o,i){return t=+t,n>>>=0,i||M(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function k(e,t,n,o,i){return t=+t,n>>>=0,i||M(e,0,n,8),r.write(e,t,n,o,52,8),n+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return _Object$setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(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||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(o)<<BigInt(32))})),a.prototype.readBigUInt64BE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(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||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<<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){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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 D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=X((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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 D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=X((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;this===e&&"function"==typeof _copyWithinInstanceProperty(Uint8Array.prototype)?_copyWithinInstanceProperty(this).call(this,t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%l]}return this};var N={};function j(e,t,r){N[e]=function(r){_inherits$2(o,r);var n=_createSuper$2(o);function o(){var r,i;return _classCallCheck$3(this,o),i=n.call(this),_Object$defineProperty(_assertThisInitialized$2(i),"message",{value:t.apply(_assertThisInitialized$2(i),arguments),writable:!0,configurable:!0}),i.name=_concatInstanceProperty(r="".concat(i.name," [")).call(r,e,"]"),i.stack,delete i.name,i}return _createClass$3(o,[{key:"code",get:function(){return e},set:function(e){_Object$defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){var t,r;return _concatInstanceProperty(t=_concatInstanceProperty(r="".concat(this.name," [")).call(r,e,"]: ")).call(t,this.message)}}]),o}(r)}function U(e){for(var t,r="",n=e.length,o="-"===e[0]?1:0;n>=o+4;n-=3){var i;r=_concatInstanceProperty(i="_".concat(_sliceInstanceProperty(e).call(e,n-3,n))).call(i,r)}return _concatInstanceProperty(t="".concat(_sliceInstanceProperty(e).call(e,0,n))).call(t,r)}function B(e,t,r,n,o,i){if(e>r||e<t){var a,s,l,c,u,p,f,$,y,h,d="bigint"==typeof t?"n":"";if(i>3)if(0===t||t===BigInt(0))a=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c=">= 0".concat(d," and < 2")).call(c,d," ** ")).call(l,8*(i+1))).call(s,d);else a=_concatInstanceProperty(u=_concatInstanceProperty(p=">= -(2".concat(d," ** ")).call(p,8*(i+1)-1)).call(u,d,") and < 2 ** ")+_concatInstanceProperty(f="".concat(8*(i+1)-1)).call(f,d);else a=_concatInstanceProperty($=_concatInstanceProperty(y=_concatInstanceProperty(h=">= ".concat(t)).call(h,d," and <= ")).call(y,r)).call($,d);throw new N.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,r){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,o,i)}function F(e,t){if("number"!=typeof e)throw new N.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){var n;if(Math.floor(e)!==e)throw F(e,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",_concatInstanceProperty(n=">= ".concat(r?1:0," and <= ")).call(n,t),e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){var r;return _concatInstanceProperty(r='The "'.concat(e,'" argument must be of type number. Received type ')).call(r,_typeof$3(t))}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){var n,o='The value of "'.concat(e,'" is out of range.'),i=r;return _Number$isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=U(i)),i+="n"),o+=_concatInstanceProperty(n=" It must be ".concat(t,". Received ")).call(n,i)}),RangeError);var G=/[^+/0-9A-Za-z-_]/g;function K(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(e){return t.toByteArray(function(e){if(e=e.split("=")[0],(e=_trimInstanceProperty(e).call(e).replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){var o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function z(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),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}})(buffer),_Object$defineProperty(scte35,"__esModule",{value:!0});var SCTE35_1=scte35.SCTE35=void 0,descriptors=descriptors$1,util=util$2,buffer_1=buffer,SCTE35=function(){function e(){_classCallCheck$3(this,e),this.buffer=buffer_1.Buffer}return _createClass$3(e,[{key:"parseFromB64",value:function(e){var t,r=Uint8Array.from(_mapInstanceProperty(t=this.parseBase64(e).split("")).call(t,(function(e){return e.charCodeAt(0)})));return this.parseSCTE35Data(r)}},{key:"parseFromHex",value:function(e){var t=e.match(/[a-f\d]{2}/gi)||[],r=Uint8Array.from(_mapInstanceProperty(t).call(t,(function(e){return _parseInt$1(e,16)})));return this.parseSCTE35Data(r)}},{key:"parseBase64",value:function(e){return this.buffer.from(e,"base64").toString("binary")}},{key:"spliceEvent",value:function(e,t,r){var n=0;if(e.spliceEventId=t.getUint32(n),n+=4,e.spliceEventCancelIndicator=!!(128&t.getUint8(n++)),e.spliceEventCancelIndicator)return n;var o=t.getUint8(n++);if(e.outOfNetworkIndicator=!!(128&o),e.programSpliceFlag=!!(64&o),e.durationFlag=!!(32&o),5===r&&(e.spliceImmediateFlag=!!(16&o)),e.programSpliceFlag)if(5!==r||e.spliceImmediateFlag)4===r&&(e.utcSpliceTime=t.getUint32(n),n+=4);else{var i=this.timeSignal(new DataView(t.buffer,t.byteOffset+n,5));e.spliceTime=i,n++,i.specified&&(n+=4)}else if(e.componentCount=t.getUint8(n++),4===r){for(var a=[];a.length!==e.componentCount;)a.push({componentTag:t.getUint8(n++),utcSpliceTime:t.getUint32(n)}),n+=4;e.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return e.durationFlag&&(o=t.getUint8(n++),e.breakDuration={autoReturn:!!(128&o),duration:(1&o?util.THIRTY_TWO_BIT_MULTIPLIER:0)+t.getUint32(n)},n+=4),e.uniqueProgramId=t.getUint16(n),n+=2,e.available=t.getUint8(n++),e.expected=t.getUint8(n++),n}},{key:"spliceSchedule",value:function(e){var t={};t.spliceCount=e.getUint8(0),t.spliceEvents=[];for(var r,n=1;t.spliceEvents.length!==t.spliceCount;){var o={};n+=this.spliceEvent(o,new DataView(e.buffer,e.byteOffset+n),4),t.spliceEvents.push(o)}n!==e.byteLength&&console.error(_concatInstanceProperty(r="scte35-js Bad read splice_schedule actual: ".concat(n," expected: ")).call(r,e.byteLength));return t}},{key:"spliceInsert",value:function(e){var t,r={},n=this.spliceEvent(r,e,5);n!==e.byteLength&&console.error(_concatInstanceProperty(t="scte35-js Bad read splice_insert actual: ".concat(n," expected: ")).call(t,e.byteLength));return r}},{key:"timeSignal",value:function(e){var t={},r=e.getUint8(0);return t.specified=!!(128&r),t.specified&&(t.pts=1&r?util.THIRTY_TWO_BIT_MULTIPLIER:0,t.pts+=e.getUint32(1)),t}},{key:"privateCommand",value:function(e){var t={},r=e.getUint32(0),n=new Uint8Array(e.buffer,e.byteOffset+4,e.byteLength-4);return t.identifier=r,t.identifier&&(t.rawData=n),t}},{key:"parseSCTE35Data",value:function(e){var t={},r=new DataView(e.buffer),n=0;t.tableId=r.getUint8(n++);var o,i=r.getUint8(n++);if(t.selectionSyntaxIndicator=!!(128&i),t.privateIndicator=!!(64&i),t.sectionLength=((15&i)<<8)+r.getUint8(n++),t.sectionLength+3!==e.byteLength)throw new Error(_concatInstanceProperty(o="Binary read error sectionLength: ".concat(t.sectionLength," + 3 !== data.length: ")).call(o,e.byteLength));if(t.protocolVersion=r.getUint8(n++),i=r.getUint8(n++),t.encryptedPacket=!!(128&i),t.encryptedAlgorithm=(126&i)>>1,t.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(t.encryptedAlgorithm," not supported")),t.ptsAdjustment=1&i?util.THIRTY_TWO_BIT_MULTIPLIER:0,t.ptsAdjustment+=r.getUint32(n),n+=4,t.cwIndex=r.getUint8(n++),t.tier=r.getUint8(n++)<<4,i=r.getUint8(n++),t.tier+=(240&i)>>4,t.spliceCommandLength=((15&i)<<8)+r.getUint8(n++),t.spliceCommandType=r.getUint8(n++),4095===t.spliceCommandLength)if(6===t.spliceCommandType){var a=128&r.getUint8(n);t.spliceCommandLength=a?5:1}else if(0===t.spliceCommandType)t.spliceCommandLength=0;else if(5===t.spliceCommandType){var s=n;if(s+=4,!(128&r.getUint8(s++))){var l=r.getUint8(s++),c=16&l,u=32&l,p=64&l;if(p&&!c&&(s+=5),!p){var f=r.getUint8(s++);s+=f,s+=c?0:5*f}u&&(s+=5),s+=4,t.spliceCommandLength=s-n}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==t.spliceCommandType){var $=new DataView(e.buffer,n,t.spliceCommandLength);4===t.spliceCommandType?t.spliceCommand=this.spliceSchedule($):5===t.spliceCommandType?t.spliceCommand=this.spliceInsert($):6===t.spliceCommandType?t.spliceCommand=this.timeSignal($):255===t.spliceCommandType&&(t.spliceCommand=this.privateCommand($))}if(n+=t.spliceCommandLength,t.descriptorLoopLength=r.getUint16(n),n+=2,t.descriptorLoopLength){var y=t.descriptorLoopLength;t.descriptors=[];try{for(;y;){var h=new DataView(e.buffer,n,y),d=descriptors.parseDescriptor(h);y-=d.descriptorLength+2,n+=d.descriptorLength+2,t.descriptors.push(d)}}catch(e){var g;console.error(_concatInstanceProperty(g="scte35-js Error reading descriptor @ ".concat(n,", ignoring remaining bytes: ")).call(g,y," in loop.")),console.error(e),n+=y,y=0}}return t.crc=r.getUint32(n),(n+=4)!==r.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(_sliceInstanceProperty(e).call(e,n).join(", "))),t}}]),e}();SCTE35_1=scte35.SCTE35=SCTE35;var SCTE35_OUT_TAG="SCTE35-OUT",START_DATE_TAG="START-DATE",PLANNED_DURATION_TAG="PLANNED-DURATION",SPLICE_INSERT=5;function isValidScte35DateRange(e){return!(!e[PLANNED_DURATION_TAG]||!e.message&&!e[SCTE35_OUT_TAG]||void 0===e.startTime&&!e[START_DATE_TAG])}var Scte35Manager=function(){function e(t){var r=this;_classCallCheck$3(this,e),_defineProperty$3(this,"_options",void 0),_defineProperty$3(this,"_track",void 0),_defineProperty$3(this,"_startTime",void 0),_defineProperty$3(this,"_adBreakCues",void 0),_defineProperty$3(this,"_activeAdBreak",null),_defineProperty$3(this,"_activeAdBreakStatus","WAITING_PREROLL"),_defineProperty$3(this,"_scte35",new SCTE35_1),_defineProperty$3(this,"_scte35ResultMap",new _Map),_defineProperty$3(this,"_handleTimeUpdate",(function(){var e,t,n,o,i;if(null!==(e=r._adBreakCues)&&void 0!==e&&e.length)for(var a=0;a<r._adBreakCues.length;a++){var s=r._adBreakCues[a];if(s.startTime>=r._player.currentTime){n=s;break}}if(n&&(null===(t=r._activeAdBreak)||void 0===t?void 0:t.id)===n.id)if((null===(o=r._activeAdBreak)||void 0===o?void 0:o.startDate)!==n.startDate)switch(r._activeAdBreakStatus){case"REQUESTED":r._changeActiveAdBreakStatus("REQUESTED",n);break;case"ERROR":case"COMPLETE":r._changeActiveAdBreakStatus("READY",null)}else(null===(i=r._activeAdBreak)||void 0===i?void 0:i.startTime)!==n.startTime&&r._changeActiveAdBreakStatus(r._activeAdBreakStatus,n);r._tryToPlayAd(),r._tryToRequestAd(n)})),_defineProperty$3(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY",null),r._player.off(AD_ERROR,r._onReady),r._player.off(AD_ALL_COMPLETED,r._onReady),r._player.on(TIME_UPDATE,r._handleTimeUpdate),r._player.on(AD_ALL_COMPLETED,r._onAdComplete),r._player.on(AD_ERROR,r._onAdError),r._handleTimeUpdate()})),_defineProperty$3(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE",r._activeAdBreak)})),_defineProperty$3(this,"_onAdError",(function(){r._changeActiveAdBreakStatus("ERROR",r._activeAdBreak)})),_defineProperty$3(this,"_handleHlsCoreEvent",(function(e){var t=e.eventName,n=e.playlist;if("core.hlslevelloaded"===t){var o;if(null!=n&&null!==(o=n.segments)&&void 0!==o&&o.length&&0===r._player.currentTime){var i,a=_createForOfIteratorHelper(n.segments);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(e){a.e(e)}finally{a.f()}}null!=n&&n.dateRanges&&r._startTime&&r._updateAdBreakCues(n.dateRanges)}})),_defineProperty$3(this,"_onAddTrack",(function(e){var t=e.track;"metadata"===(null==t?void 0:t.kind)&&(t.mode="hidden",r._track=t,r._track.addEventListener("cuechange",r._onCuechange))})),_defineProperty$3(this,"_onCuechange",(function(){for(var e,t={},n=(null===(e=r._track)||void 0===e?void 0:e.cues)||[],o=0;o<n.length;){var i,a=n[o];if((null===(i=a.value)||void 0===i?void 0:i.key)===PLANNED_DURATION_TAG){var s,l=o+1<n.length?n[o+1]:null;if((null==l||null===(s=l.value)||void 0===s?void 0:s.key)===SCTE35_OUT_TAG&&(null==l?void 0:l.startTime)===a.startTime){var c,u,p=r._getScte35Result(null===(c=l.value)||void 0===c?void 0:c.data),f=String((null==p?void 0:p.spliceCommand).spliceEventId);t[f]=_defineProperty$3({ID:f,startTime:l.startTime,message:p},PLANNED_DURATION_TAG,null===(u=a.value)||void 0===u?void 0:u.data),o+=2}else o++}else o++}r._updateAdBreakCues(t)})),this._options=t,this._init()}return _createClass$3(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adManager",get:function(){return this._options.adManager}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var e,t;null===(e=this._track)||void 0===e||e.removeEventListener("cuechange",this._onCuechange),this._track=void 0,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(TIME_UPDATE,this._handleTimeUpdate),this._player.off(IMA_AD_COMPLETE,this._onAdComplete),this._player.off(IMA_AD_ERROR,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,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl;r||n||o?(this._player.once(AD_ERROR,this._onReady),this._player.once(AD_ALL_COMPLETED,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(e,t){var r,n;this._activeAdBreakStatus=e,this._activeAdBreak=t,console.log(_concatInstanceProperty(r=_concatInstanceProperty(n="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(n,this._startTime,", player current time: ")).call(r,this._player.currentTime),this._activeAdBreak)}},{key:"_tryToRequestAd",value:function(e){var t;e&&"WAITING_PREROLL"!==this._activeAdBreakStatus&&"STARTED"!==this._activeAdBreakStatus&&e.id!==(null===(t=this._activeAdBreak)||void 0===t?void 0:t.id)&&(this._changeActiveAdBreakStatus("REQUESTED",e),this._adManager.reset(),this._adManager.updateConfig({adTagUrl:this._adTagUrl}),this._adManager.requestAds())}},{key:"_tryToPlayAd",value:function(){!this._activeAdBreak||this._activeAdBreak.startTime>this._player.currentTime||("ERROR"!==this._activeAdBreakStatus?"REQUESTED"===this._activeAdBreakStatus&&(this._changeActiveAdBreakStatus("STARTED",this._activeAdBreak),this._adManager.playAds()):this._changeActiveAdBreakStatus("READY",null))}},{key:"_getScte35Result",value:function(e){if(!this._scte35ResultMap.has(e))try{this._scte35ResultMap.set(e,this._scte35.parseFromHex(e))}catch(e){}if(!this._scte35ResultMap.has(e))try{this._scte35ResultMap.set(e,this._scte35.parseFromB64(e))}catch(e){}return this._scte35ResultMap.get(e)}},{key:"_updateAdBreakCues",value:function(e){var t,r,n=this;this._adBreakCues=_sortInstanceProperty(t=_reduceInstanceProperty(r=_Object$keys(e)).call(r,(function(t,r){var o=e[r];if(isValidScte35DateRange(o)){var i=o.message||n._getScte35Result(o[SCTE35_OUT_TAG]);(null==i?void 0:i.spliceCommandType)===SPLICE_INSERT&&t.push({data:i,id:o.ID,startTime:o.startTime||(new Date(o[START_DATE_TAG]).getTime()-n._startTime)/1e3,duration:_parseFloat$1(o[PLANNED_DURATION_TAG]||"0"),startDate:o[START_DATE_TAG]})}return t}),[])).call(t,(function(e,t){return e.startTime-t.startTime}))}}]),e}();function scheduleToVmap(e){var t,r;if(e&&e.length){var n=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),o=n.getElementsByTagName("vmap:VMAP");o[0].setAttribute("version","1.0");var i,a=0,s=0;return _forEachInstanceProperty(t=_sortInstanceProperty(r=_filterInstanceProperty(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(r,(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,r,l,c=e.offset,u=e.type,p=e.tag;switch(c){case"pre":r="start",l="preroll";break;case"post":r="end",l="postroll";break;default:r=c,i!==c?(i=c,s=1,l="midroll-".concat(++a)):(s++,l="midroll-".concat(a))}var f=n.createElement("vmap:AdBreak");f.setAttribute("timeOffset",r),f.setAttribute("breakId",l),f.setAttribute("breakType",u||"linear"),o[0].appendChild(f);var $=n.createElement("vmap:AdSource");$.setAttribute("id",_concatInstanceProperty(t="".concat(l,"-ad-")).call(t,s)),$.setAttribute("allowMultipleAds","true"),$.setAttribute("followRedirects","true"),f.appendChild($);var y=n.createElement("vmap:AdTagURI");y.setAttribute("templateType","vast3"),$.appendChild(y),y.innerHTML="<![CDATA[ ".concat(p," ]]>")})),(new XMLSerializer).serializeToString(n)}}function isPrerollAd(e){var t;return 0===(null==e||null===(t=e.getAdPodInfo())||void 0===t?void 0:t.getTimeOffset())}var index_min="",AdsPlugin=function(e){_inherits$2(r,AdsPlugin$1);var t=_createSuper$2(r);function r(){var e,n;_classCallCheck$3(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$3(_assertThisInitialized$2(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_scte35Manager",void 0),_defineProperty$3(_assertThisInitialized$2(n),"_handlePrerollMuted",(function(e){var t,r;isPrerollAd(e.ad)&&(null===(t=n.player.plugins.autoplayplugin)||void 0===t||null===(r=t.handleAutoplayStart)||void 0===r||r.call(t),n.player.once(VOLUME_CHANGE,(function(){var e,t;null===(e=n.player.plugins.autoplayplugin)||void 0===e||null===(t=e.initState)||void 0===t||t.call(e)})))})),n}return _createClass$3(r,[{key:"afterCreate",value:function(){_get$2(_getPrototypeOf$2(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var e,t,n=_get$2(_getPrototypeOf$2(r.prototype),"beforePlayerInit",this).call(this);return null===(e=this.csManager)||void 0===e||e.once(IMA_SDK_LOAD_SUCCESS,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrlForSCTE35&&(this._scte35Manager=new Scte35Manager({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager})),n}},{key:"destroy",value:function(){var e;_get$2(_getPrototypeOf$2(r.prototype),"destroy",this).call(this),null===(e=this._scte35Manager)||void 0===e||e.destroy(),this._scte35Manager=void 0}},{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=scheduleToVmap(this.config.ima.schedule)),this.player.once(AD_PLAY,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(),plugin="";export{AdsPlugin as default};
3
+ read:function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<<s)-1,c=l>>1,u=-7,p=r?o-1:0,f=r?-1:1,$=e[t+p];for(p+=f,i=$&(1<<-u)-1,$>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*($?-1:1);a+=Math.pow(2,n),i-=c}return($?-1:1)*a*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,$=n?0:i-1,y=n?1:-1,h=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+$]=255&s,$+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+$]=255&a,$+=y,a/=256,c-=8);e[r+$-y]|=128*h}};(function(e){var t=base64Js,r=ieee754,n="function"==typeof _Symbol&&"function"==typeof _Symbol$for?_Symbol$for("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 o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return _Object$setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){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 r=0|$(e,t),n=i(r),o=n.write(e,t);o!==r&&(n=_sliceInstanceProperty(n).call(n,0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return u(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 "+_typeof$3(e));if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var o=function(e){if(a.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?i(0):u(e);if("Buffer"===e.type&&_Array$isArray(e.data))return u(e.data)}(e);if(o)return o;if(void 0!==_Symbol&&null!=_Symbol$toPrimitive&&"function"==typeof e[_Symbol$toPrimitive])return a.from(e[_Symbol$toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof$3(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 c(e){return l(e),i(e<0?0:0|f(e))}function u(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),_Object$setPrototypeOf(n,a.prototype),n}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function $(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(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 '+_typeof$3(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(o)return n?-1:K(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function d(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof _indexOfInstanceProperty(Uint8Array.prototype)?o?_indexOfInstanceProperty(Uint8Array.prototype).call(e,t,r):_lastIndexOfInstanceProperty(Uint8Array.prototype).call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function m(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i,a=t.length;for(n>a/2&&(n=a/2),i=0;i<n;++i){var s=_parseInt$1(t.substr(2*i,2),16);if(q(s))return i;e[r+i]=s}return i}function v(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function _(e,t,r,n){return W(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r,n){return W(V(t),e,r,n)}function S(e,t,r,n){return W(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(_sliceInstanceProperty(e).call(e,r,n))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){var l=void 0,c=void 0,u=void 0,p=void 0;switch(s){case 1:i<128&&(a=i);break;case 2:128==(192&(l=e[o+1]))&&(p=(31&i)<<6|63&l)>127&&(a=p);break;case 3:l=e[o+1],c=e[o+2],128==(192&l)&&128==(192&c)&&(p=(15&i)<<12|(63&l)<<6|63&c)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:l=e[o+1],c=e[o+2],u=e[o+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(p=(15&i)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,_sliceInstanceProperty(e).call(e,n,n+=E));return r}(n)}e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return _Object$setPrototypeOf(t,Uint8Array.prototype),_Object$setPrototypeOf(e,t),42===e.foo()}catch(e){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."),_Object$defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),_Object$defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},_Object$setPrototypeOf(a.prototype,Uint8Array.prototype),_Object$setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?i(e):void 0!==t?"string"==typeof r?_fillInstanceProperty(n=i(e)).call(n,t,r):_fillInstanceProperty(o=i(e)).call(o,t):i(e);var n,o}(e,t,r)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(Y(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),Y(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 r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?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(!_Array$isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(Y(i,Uint8Array))o+i.length>n.length?(a.isBuffer(i)||(i=a.from(i)),i.copy(n,o)):Uint8Array.prototype.set.call(n,i,o);else{if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},a.byteLength=$,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)h(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)h(this,t,t+3),h(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)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):y.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,r="",n=e.INSPECT_MAX_BYTES;return r=_trimInstanceProperty(t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ")).call(t),this.length>n&&(r+=" ... "),"<Buffer "+r+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(Y(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 '+_typeof$3(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(i,s),c=_sliceInstanceProperty(this).call(this,n,o),u=_sliceInstanceProperty(e).call(e,t,r),p=0;p<l;++p)if(c[p]!==u[p]){i=c[p],s=u[p];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,r){return-1!==_indexOfInstanceProperty(this).call(this,e,t,r)},a.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:_sliceInstanceProperty(Array.prototype).call(this._arr||this,0)}};var E=4096;function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function A(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=z[e[i]];return o}function C(e,t,r){for(var n=_sliceInstanceProperty(e).call(e,t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function w(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n,o){B(t,n,o,e,r,7);var i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){B(t,n,o,e,r,7);var i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function M(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(e,t,n,o,i){return t=+t,n>>>=0,i||M(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function k(e,t,n,o,i){return t=+t,n>>>=0,i||M(e,0,n,8),r.write(e,t,n,o,52,8),n+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return _Object$setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(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||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(o)<<BigInt(32))})),a.prototype.readBigUInt64BE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(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||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=X((function(e){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<<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){F(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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 D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=X((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(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,r){return e=+e,t>>>=0,r||R(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 D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=X((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;this===e&&"function"==typeof _copyWithinInstanceProperty(Uint8Array.prototype)?_copyWithinInstanceProperty(this).call(this,t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%l]}return this};var N={};function j(e,t,r){N[e]=function(r){_inherits$2(o,r);var n=_createSuper$2(o);function o(){var r,i;return _classCallCheck$3(this,o),i=n.call(this),_Object$defineProperty(_assertThisInitialized$2(i),"message",{value:t.apply(_assertThisInitialized$2(i),arguments),writable:!0,configurable:!0}),i.name=_concatInstanceProperty(r="".concat(i.name," [")).call(r,e,"]"),i.stack,delete i.name,i}return _createClass$3(o,[{key:"code",get:function(){return e},set:function(e){_Object$defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){var t,r;return _concatInstanceProperty(t=_concatInstanceProperty(r="".concat(this.name," [")).call(r,e,"]: ")).call(t,this.message)}}]),o}(r)}function U(e){for(var t,r="",n=e.length,o="-"===e[0]?1:0;n>=o+4;n-=3){var i;r=_concatInstanceProperty(i="_".concat(_sliceInstanceProperty(e).call(e,n-3,n))).call(i,r)}return _concatInstanceProperty(t="".concat(_sliceInstanceProperty(e).call(e,0,n))).call(t,r)}function B(e,t,r,n,o,i){if(e>r||e<t){var a,s,l,c,u,p,f,$,y,h,d="bigint"==typeof t?"n":"";if(i>3)if(0===t||t===BigInt(0))a=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c=">= 0".concat(d," and < 2")).call(c,d," ** ")).call(l,8*(i+1))).call(s,d);else a=_concatInstanceProperty(u=_concatInstanceProperty(p=">= -(2".concat(d," ** ")).call(p,8*(i+1)-1)).call(u,d,") and < 2 ** ")+_concatInstanceProperty(f="".concat(8*(i+1)-1)).call(f,d);else a=_concatInstanceProperty($=_concatInstanceProperty(y=_concatInstanceProperty(h=">= ".concat(t)).call(h,d," and <= ")).call(y,r)).call($,d);throw new N.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,r){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,o,i)}function F(e,t){if("number"!=typeof e)throw new N.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){var n;if(Math.floor(e)!==e)throw F(e,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",_concatInstanceProperty(n=">= ".concat(r?1:0," and <= ")).call(n,t),e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){var r;return _concatInstanceProperty(r='The "'.concat(e,'" argument must be of type number. Received type ')).call(r,_typeof$3(t))}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){var n,o='The value of "'.concat(e,'" is out of range.'),i=r;return _Number$isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=U(i)),i+="n"),o+=_concatInstanceProperty(n=" It must be ".concat(t,". Received ")).call(n,i)}),RangeError);var G=/[^+/0-9A-Za-z-_]/g;function K(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(e){return t.toByteArray(function(e){if(e=e.split("=")[0],(e=_trimInstanceProperty(e).call(e).replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){var o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}})(buffer),_Object$defineProperty(scte35,"__esModule",{value:!0});var SCTE35_1=scte35.SCTE35=void 0,descriptors=descriptors$1,util=util$2,buffer_1=buffer,SCTE35=function(){function e(){_classCallCheck$3(this,e),this.buffer=buffer_1.Buffer}return _createClass$3(e,[{key:"parseFromB64",value:function(e){var t,r=Uint8Array.from(_mapInstanceProperty(t=this.parseBase64(e).split("")).call(t,(function(e){return e.charCodeAt(0)})));return this.parseSCTE35Data(r)}},{key:"parseFromHex",value:function(e){var t=e.match(/[a-f\d]{2}/gi)||[],r=Uint8Array.from(_mapInstanceProperty(t).call(t,(function(e){return _parseInt$1(e,16)})));return this.parseSCTE35Data(r)}},{key:"parseBase64",value:function(e){return this.buffer.from(e,"base64").toString("binary")}},{key:"spliceEvent",value:function(e,t,r){var n=0;if(e.spliceEventId=t.getUint32(n),n+=4,e.spliceEventCancelIndicator=!!(128&t.getUint8(n++)),e.spliceEventCancelIndicator)return n;var o=t.getUint8(n++);if(e.outOfNetworkIndicator=!!(128&o),e.programSpliceFlag=!!(64&o),e.durationFlag=!!(32&o),5===r&&(e.spliceImmediateFlag=!!(16&o)),e.programSpliceFlag)if(5!==r||e.spliceImmediateFlag)4===r&&(e.utcSpliceTime=t.getUint32(n),n+=4);else{var i=this.timeSignal(new DataView(t.buffer,t.byteOffset+n,5));e.spliceTime=i,n++,i.specified&&(n+=4)}else if(e.componentCount=t.getUint8(n++),4===r){for(var a=[];a.length!==e.componentCount;)a.push({componentTag:t.getUint8(n++),utcSpliceTime:t.getUint32(n)}),n+=4;e.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return e.durationFlag&&(o=t.getUint8(n++),e.breakDuration={autoReturn:!!(128&o),duration:(1&o?util.THIRTY_TWO_BIT_MULTIPLIER:0)+t.getUint32(n)},n+=4),e.uniqueProgramId=t.getUint16(n),n+=2,e.available=t.getUint8(n++),e.expected=t.getUint8(n++),n}},{key:"spliceSchedule",value:function(e){var t={};t.spliceCount=e.getUint8(0),t.spliceEvents=[];for(var r,n=1;t.spliceEvents.length!==t.spliceCount;){var o={};n+=this.spliceEvent(o,new DataView(e.buffer,e.byteOffset+n),4),t.spliceEvents.push(o)}n!==e.byteLength&&console.error(_concatInstanceProperty(r="scte35-js Bad read splice_schedule actual: ".concat(n," expected: ")).call(r,e.byteLength));return t}},{key:"spliceInsert",value:function(e){var t,r={},n=this.spliceEvent(r,e,5);n!==e.byteLength&&console.error(_concatInstanceProperty(t="scte35-js Bad read splice_insert actual: ".concat(n," expected: ")).call(t,e.byteLength));return r}},{key:"timeSignal",value:function(e){var t={},r=e.getUint8(0);return t.specified=!!(128&r),t.specified&&(t.pts=1&r?util.THIRTY_TWO_BIT_MULTIPLIER:0,t.pts+=e.getUint32(1)),t}},{key:"privateCommand",value:function(e){var t={},r=e.getUint32(0),n=new Uint8Array(e.buffer,e.byteOffset+4,e.byteLength-4);return t.identifier=r,t.identifier&&(t.rawData=n),t}},{key:"parseSCTE35Data",value:function(e){var t={},r=new DataView(e.buffer),n=0;t.tableId=r.getUint8(n++);var o,i=r.getUint8(n++);if(t.selectionSyntaxIndicator=!!(128&i),t.privateIndicator=!!(64&i),t.sectionLength=((15&i)<<8)+r.getUint8(n++),t.sectionLength+3!==e.byteLength)throw new Error(_concatInstanceProperty(o="Binary read error sectionLength: ".concat(t.sectionLength," + 3 !== data.length: ")).call(o,e.byteLength));if(t.protocolVersion=r.getUint8(n++),i=r.getUint8(n++),t.encryptedPacket=!!(128&i),t.encryptedAlgorithm=(126&i)>>1,t.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(t.encryptedAlgorithm," not supported")),t.ptsAdjustment=1&i?util.THIRTY_TWO_BIT_MULTIPLIER:0,t.ptsAdjustment+=r.getUint32(n),n+=4,t.cwIndex=r.getUint8(n++),t.tier=r.getUint8(n++)<<4,i=r.getUint8(n++),t.tier+=(240&i)>>4,t.spliceCommandLength=((15&i)<<8)+r.getUint8(n++),t.spliceCommandType=r.getUint8(n++),4095===t.spliceCommandLength)if(6===t.spliceCommandType){var a=128&r.getUint8(n);t.spliceCommandLength=a?5:1}else if(0===t.spliceCommandType)t.spliceCommandLength=0;else if(5===t.spliceCommandType){var s=n;if(s+=4,!(128&r.getUint8(s++))){var l=r.getUint8(s++),c=16&l,u=32&l,p=64&l;if(p&&!c&&(s+=5),!p){var f=r.getUint8(s++);s+=f,s+=c?0:5*f}u&&(s+=5),s+=4,t.spliceCommandLength=s-n}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==t.spliceCommandType){var $=new DataView(e.buffer,n,t.spliceCommandLength);4===t.spliceCommandType?t.spliceCommand=this.spliceSchedule($):5===t.spliceCommandType?t.spliceCommand=this.spliceInsert($):6===t.spliceCommandType?t.spliceCommand=this.timeSignal($):255===t.spliceCommandType&&(t.spliceCommand=this.privateCommand($))}if(n+=t.spliceCommandLength,t.descriptorLoopLength=r.getUint16(n),n+=2,t.descriptorLoopLength){var y=t.descriptorLoopLength;t.descriptors=[];try{for(;y;){var h=new DataView(e.buffer,n,y),d=descriptors.parseDescriptor(h);y-=d.descriptorLength+2,n+=d.descriptorLength+2,t.descriptors.push(d)}}catch(e){var g;console.error(_concatInstanceProperty(g="scte35-js Error reading descriptor @ ".concat(n,", ignoring remaining bytes: ")).call(g,y," in loop.")),console.error(e),n+=y,y=0}}return t.crc=r.getUint32(n),(n+=4)!==r.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(_sliceInstanceProperty(e).call(e,n).join(", "))),t}}]),e}();SCTE35_1=scte35.SCTE35=SCTE35;var SCTE35_OUT_TAG="SCTE35-OUT",START_DATE_TAG="START-DATE",PLANNED_DURATION_TAG="PLANNED-DURATION",SPLICE_INSERT=5,MIN_DURATION_OFFSET=5;function isValidScte35DateRange(e){return!(!e[PLANNED_DURATION_TAG]||!e.message&&!e[SCTE35_OUT_TAG]||void 0===e.startTime&&!e[START_DATE_TAG])}var Scte35Manager=function(){function e(t){var r=this;_classCallCheck$3(this,e),_defineProperty$3(this,"_options",void 0),_defineProperty$3(this,"_track",void 0),_defineProperty$3(this,"_startTime",void 0),_defineProperty$3(this,"_adBreakCues",void 0),_defineProperty$3(this,"_activeAdBreak",null),_defineProperty$3(this,"_activeAdBreakStatus","WAITING_PREROLL"),_defineProperty$3(this,"_scte35",new SCTE35_1),_defineProperty$3(this,"_scte35ResultMap",new _Map),_defineProperty$3(this,"_adManager",void 0),_defineProperty$3(this,"_timer",void 0),_defineProperty$3(this,"_handleTimeUpdate",(function(){var e,t,n,o,i;if(null!==(e=r._adBreakCues)&&void 0!==e&&e.length)for(var a=0;a<r._adBreakCues.length;a++){var s=r._adBreakCues[a];if(s.startTime>=r._player.currentTime){n=s;break}}if(n&&(null===(t=r._activeAdBreak)||void 0===t?void 0:t.id)===n.id)if((null===(o=r._activeAdBreak)||void 0===o?void 0:o.startDate)!==n.startDate)switch(r._activeAdBreakStatus){case"REQUESTED":r._changeActiveAdBreakStatus("REQUESTED",n);break;case"ERROR":case"COMPLETE":r._changeActiveAdBreakStatus("READY",null)}else(null===(i=r._activeAdBreak)||void 0===i?void 0:i.startTime)!==n.startTime&&r._changeActiveAdBreakStatus(r._activeAdBreakStatus,n);r._tryToPlayAd(),r._tryToRequestAd(n)})),_defineProperty$3(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY",null),r._player.off(AD_ERROR,r._onReady),r._player.off(AD_ALL_COMPLETED,r._onReady),r._player.on(TIME_UPDATE,r._handleTimeUpdate),r._player.on(AD_ALL_COMPLETED,r._onAdComplete),r._player.on(AD_ERROR,r._onAdError),r._handleTimeUpdate()})),_defineProperty$3(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE",r._activeAdBreak)})),_defineProperty$3(this,"_onAdError",(function(){var e,t;null===(e=r._player)||void 0===e||null===(e=e.media)||void 0===e||null===(e=e.style)||void 0===e||e.setProperty("visibility",""),null===(t=r._adManager)||void 0===t||t.destroy(),r._adManager=null,r._changeActiveAdBreakStatus("ERROR",r._activeAdBreak)})),_defineProperty$3(this,"_handleHlsCoreEvent",(function(e){var t=e.eventName,n=e.playlist;if("core.hlslevelloaded"===t){var o;if(null!=n&&null!==(o=n.segments)&&void 0!==o&&o.length&&0===r._player.currentTime){var i,a=_createForOfIteratorHelper(n.segments);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(e){a.e(e)}finally{a.f()}}null!=n&&n.dateRanges&&r._startTime&&r._updateAdBreakCues(n.dateRanges)}})),_defineProperty$3(this,"_onAddTrack",(function(e){var t=e.track;"metadata"===(null==t?void 0:t.kind)&&(t.mode="hidden",r._track=t,sniffer.os.isIos?r.loopCues():(r._onCuechange(),r._track.addEventListener("cuechange",r._onCuechange)))})),_defineProperty$3(this,"loopCues",(function(){r._onCuechange(),r._timer=_setTimeout(r.loopCues,2e3)})),_defineProperty$3(this,"_onCuechange",(function(){for(var e,t={},n=(null===(e=r._track)||void 0===e?void 0:e.cues)||[],o=0;o<n.length;){var i,a=n[o];if((null===(i=a.value)||void 0===i?void 0:i.key)===PLANNED_DURATION_TAG){var s,l=o+1<n.length?n[o+1]:null;if((null==l||null===(s=l.value)||void 0===s?void 0:s.key)===SCTE35_OUT_TAG&&(null==l?void 0:l.startTime)===a.startTime){var c,u,p=r._getScte35Result(null===(c=l.value)||void 0===c?void 0:c.data),f=String((null==p?void 0:p.spliceCommand).spliceEventId);t[f]=_defineProperty$3({ID:f,startTime:l.startTime,message:p},PLANNED_DURATION_TAG,null===(u=a.value)||void 0===u?void 0:u.data),o+=2}else o++}else o++}r._updateAdBreakCues(t)})),this._options=t,this._adManager=this._options.adManager,this._init()}var t,r,n;return _createClass$3(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(TIME_UPDATE,this._handleTimeUpdate),this._player.off(IMA_AD_COMPLETE,this._onAdComplete),this._player.off(IMA_AD_ERROR,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,r=t.adsRequest,n=t.adsResponse,o=t.adTagUrl;r||n||o?(this._player.once(AD_ERROR,this._onReady),this._player.once(AD_ALL_COMPLETED,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(e,t){var r,n;this._activeAdBreakStatus=e,this._activeAdBreak=t,console.log(_concatInstanceProperty(r=_concatInstanceProperty(n="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(n,this._startTime,", player current time: ")).call(r,this._player.currentTime),this._activeAdBreak)}},{key:"_tryToRequestAd",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().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===(r=this._activeAdBreak)||void 0===r?void 0:r.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 n.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:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().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:r=e.sent,e.next=8;break;case 6:(r=t).reset();case 8:return r.updateConfig({adTagUrl:this._adTagUrl}),r.requestAds(),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_playLoopAds",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o=this,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i.length>2&&void 0!==i[2]&&i[2],console.log("开始播放广告"),t.playAds(),t.once(IMA_CONTENT_RESUME_REQUESTED,(function(){o._player.media.style.setProperty("visibility","")})),t.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,(function(e){var o,i=null==e||null===(o=e.getAd().data)||void 0===o?void 0:o.duration;n&&r&&r<i&&(console.log(r+"后中断广告"),_setTimeout((function(){var e;console.log("在 duration 时间中断广告"),null===(e=t)||void 0===e||null===(e=e.adsManager)||void 0===e||e.stop()}),1e3*r))})),t.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(n){var i,a,s,l,c,u,p,f,$;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p=null==n||null===(i=n.getAd().data)||void 0===i?void 0:i.duration,f=r-p,console.log("currentRemianDuration:",r,"adDuration:",p,"nextRemainDuration:",f,"minDurationOffset:",null!==(a=null===(s=o._options.replayForSCTE35)||void 0===s?void 0:s.minDurationOffset)&&void 0!==a?a:MIN_DURATION_OFFSET),!(p&&null!==(l=o._options.replayForSCTE35)&&void 0!==l&&l.enable&&f>0&&f>(null!==(c=null===(u=o._options.replayForSCTE35)||void 0===u?void 0:u.minDurationOffset)&&void 0!==c?c:MIN_DURATION_OFFSET))){e.next=10;break}return console.log("创建下一个 manager"),e.next=7,o._generateOrUpdateManager();case 7:return($=e.sent)&&(t.resumeCallback=function(){var e;return console.log("当前广告播放结束"),o._player.plugins.ad.uiManager.hideAdUI(),o._player.media.style.setProperty("visibility","hidden"),null===(e=t)||void 0===e||e.destroy(),t=null,o._playLoopAds($,f,!0),{canResume:!1}}),e.abrupt("return");case 10:o._adManager=t;case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:case"end":return e.stop()}}),e)}))),function(e,r){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(e){}if(!this._scte35ResultMap.has(e))try{this._scte35ResultMap.set(e,this._scte35.parseFromB64(e))}catch(e){}return this._scte35ResultMap.get(e)}},{key:"_updateAdBreakCues",value:function(e){var t,r,n=this;this._adBreakCues=_sortInstanceProperty(t=_reduceInstanceProperty(r=_Object$keys(e)).call(r,(function(t,r){var o=e[r];if(isValidScte35DateRange(o)){var i=o.message||n._getScte35Result(o[SCTE35_OUT_TAG]);(null==i?void 0:i.spliceCommandType)===SPLICE_INSERT&&t.push({data:i,id:o.ID,startTime:o.startTime||(new Date(o[START_DATE_TAG]).getTime()-n._startTime)/1e3,duration:_parseFloat$1(o[PLANNED_DURATION_TAG]||"0"),startDate:o[START_DATE_TAG]})}return t}),[])).call(t,(function(e,t){return e.startTime-t.startTime}))}}]),e}();function scheduleToVmap(e){var t,r;if(e&&e.length){var n=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),o=n.getElementsByTagName("vmap:VMAP");o[0].setAttribute("version","1.0");var i,a=0,s=0;return _forEachInstanceProperty(t=_sortInstanceProperty(r=_filterInstanceProperty(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(r,(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,r,l,c=e.offset,u=e.type,p=e.tag;switch(c){case"pre":r="start",l="preroll";break;case"post":r="end",l="postroll";break;default:r=c,i!==c?(i=c,s=1,l="midroll-".concat(++a)):(s++,l="midroll-".concat(a))}var f=n.createElement("vmap:AdBreak");f.setAttribute("timeOffset",r),f.setAttribute("breakId",l),f.setAttribute("breakType",u||"linear"),o[0].appendChild(f);var $=n.createElement("vmap:AdSource");$.setAttribute("id",_concatInstanceProperty(t="".concat(l,"-ad-")).call(t,s)),$.setAttribute("allowMultipleAds","true"),$.setAttribute("followRedirects","true"),f.appendChild($);var y=n.createElement("vmap:AdTagURI");y.setAttribute("templateType","vast3"),$.appendChild(y),y.innerHTML="<![CDATA[ ".concat(p," ]]>")})),(new XMLSerializer).serializeToString(n)}}function isPrerollAd(e){var t;return 0===(null==e||null===(t=e.getAdPodInfo())||void 0===t?void 0:t.getTimeOffset())}var index_min="",AdsPlugin=function(e){_inherits$2(r,AdsPlugin$1);var t=_createSuper$2(r);function r(){var e,n;_classCallCheck$3(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return _defineProperty$3(_assertThisInitialized$2(n=t.call.apply(t,_concatInstanceProperty(e=[this]).call(e,i))),"_scte35Manager",void 0),_defineProperty$3(_assertThisInitialized$2(n),"_handlePrerollMuted",(function(e){var t,r;isPrerollAd(e.ad)&&(null===(t=n.player.plugins.autoplayplugin)||void 0===t||null===(r=t.handleAutoplayStart)||void 0===r||r.call(t),n.player.once(VOLUME_CHANGE,(function(){var e,t;null===(e=n.player.plugins.autoplayplugin)||void 0===e||null===(t=e.initState)||void 0===t||t.call(e)})))})),n}return _createClass$3(r,[{key:"afterCreate",value:function(){_get$2(_getPrototypeOf$2(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var e,t,n=_get$2(_getPrototypeOf$2(r.prototype),"beforePlayerInit",this).call(this);return null===(e=this.csManager)||void 0===e||e.once(IMA_SDK_LOAD_SUCCESS,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrlForSCTE35&&(this._scte35Manager=new Scte35Manager({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager,replayForSCTE35:this.config.replayForSCTE35})),n}},{key:"destroy",value:function(){var e;_get$2(_getPrototypeOf$2(r.prototype),"destroy",this).call(this),null===(e=this._scte35Manager)||void 0===e||e.destroy(),this._scte35Manager=void 0}},{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=scheduleToVmap(this.config.ima.schedule)),this.player.once(AD_PLAY,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(),plugin="";export{AdsPlugin as default};
4
4
  //# sourceMappingURL=esm/veplayer.plugin.ad.production.js.map