@byteplus/veplayer-plugin 2.3.0 → 2.3.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +86 -34
- package/esm/index.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +82 -30
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.flv.development.js +82 -30
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +0 -1577
- package/esm/veplayer.plugin.drm.production.js +0 -2
- package/esm/veplayer.plugin.mp4.development.js +0 -38039
- package/esm/veplayer.plugin.mp4.production.js +0 -2
- package/esm/veplayer.plugin.rtm.development.js +0 -5587
- package/esm/veplayer.plugin.rtm.production.js +0 -2
- package/esm/veplayer.plugin.shaka.development.js +0 -15973
- package/esm/veplayer.plugin.shaka.production.js +0 -20
- package/esm/veplayer.plugin.time.shift.development.css +0 -63
- package/esm/veplayer.plugin.time.shift.development.js +0 -339
- package/esm/veplayer.plugin.time.shift.production.css +0 -1
- package/esm/veplayer.plugin.time.shift.production.js +0 -2
- package/esm/veplayer.plugin.xgvideo.development.js +0 -19097
- package/esm/veplayer.plugin.xgvideo.production.js +0 -2
- package/umd/veplayer.plugin.drm.development.js +0 -1579
- package/umd/veplayer.plugin.drm.production.js +0 -1
- package/umd/veplayer.plugin.mp4.development.js +0 -38043
- package/umd/veplayer.plugin.mp4.production.js +0 -1
- package/umd/veplayer.plugin.rtm.development.js +0 -5589
- package/umd/veplayer.plugin.rtm.production.js +0 -1
- package/umd/veplayer.plugin.shaka.development.js +0 -15977
- package/umd/veplayer.plugin.shaka.production.js +0 -1
- package/umd/veplayer.plugin.time.shift.development.css +0 -63
- package/umd/veplayer.plugin.time.shift.development.js +0 -342
- package/umd/veplayer.plugin.time.shift.production.css +0 -1
- package/umd/veplayer.plugin.time.shift.production.js +0 -1
- package/umd/veplayer.plugin.xgvideo.development.js +0 -19099
- package/umd/veplayer.plugin.xgvideo.production.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
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 check$2=function(e){return e&&e.Math==Math&&e},global$1I=check$2("object"==typeof globalThis&&globalThis)||check$2("object"==typeof window&&window)||check$2("object"==typeof self&&self)||check$2("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),fails$20=function(e){try{return!!e()}catch(e){return!0}},fails$1$=fails$20,functionBindNative$2=!fails$1$((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$e=functionBindNative$2,FunctionPrototype$a=Function.prototype,apply$n=FunctionPrototype$a.apply,call$1e=FunctionPrototype$a.call,functionApply$2="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$e?call$1e.bind(apply$n):function(){return call$1e.apply(apply$n,arguments)}),NATIVE_BIND$d=functionBindNative$2,FunctionPrototype$9=Function.prototype,call$1d=FunctionPrototype$9.call,uncurryThisWithBind$2=NATIVE_BIND$d&&FunctionPrototype$9.bind.bind(call$1d,call$1d),functionUncurryThis$2=NATIVE_BIND$d?uncurryThisWithBind$2:function(e){return function(){return call$1d.apply(e,arguments)}},uncurryThis$21=functionUncurryThis$2,toString$O=uncurryThis$21({}.toString),stringSlice$l=uncurryThis$21("".slice),classofRaw$8=function(e){return stringSlice$l(toString$O(e),8,-1)},classofRaw$7=classofRaw$8,uncurryThis$20=functionUncurryThis$2,functionUncurryThisClause$2=function(e){if("Function"===classofRaw$7(e))return uncurryThis$20(e)},documentAll$8="object"==typeof document&&document.all,IS_HTMLDDA$2=void 0===documentAll$8&&void 0!==documentAll$8,documentAll_1$2={all:documentAll$8,IS_HTMLDDA:IS_HTMLDDA$2},$documentAll$5=documentAll_1$2,documentAll$7=$documentAll$5.all,isCallable$1j=$documentAll$5.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$7}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor$2={},fails$1_=fails$20,descriptors$2=!fails$1_((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$c=functionBindNative$2,call$1c=Function.prototype.call,functionCall$2=NATIVE_BIND$c?call$1c.bind(call$1c):function(){return call$1c.apply(call$1c,arguments)},objectPropertyIsEnumerable$2={},$propertyIsEnumerable$6={}.propertyIsEnumerable,getOwnPropertyDescriptor$m=Object.getOwnPropertyDescriptor,NASHORN_BUG$2=getOwnPropertyDescriptor$m&&!$propertyIsEnumerable$6.call({1:2},1);objectPropertyIsEnumerable$2.f=NASHORN_BUG$2?function(e){var t=getOwnPropertyDescriptor$m(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$6;var match$2,version$4,createPropertyDescriptor$m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$1$=functionUncurryThis$2,fails$1Z=fails$20,classof$M=classofRaw$8,$Object$e=Object,split$8=uncurryThis$1$("".split),indexedObject$2=fails$1Z((function(){return!$Object$e("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$M(e)?split$8(e,""):$Object$e(e)}:$Object$e,isNullOrUndefined$n=function(e){return null==e},isNullOrUndefined$m=isNullOrUndefined$n,$TypeError$U=TypeError,requireObjectCoercible$q=function(e){if(isNullOrUndefined$m(e))throw $TypeError$U("Can't call method on "+e);return e},IndexedObject$c=indexedObject$2,requireObjectCoercible$p=requireObjectCoercible$q,toIndexedObject$A=function(e){return IndexedObject$c(requireObjectCoercible$p(e))},isCallable$1i=isCallable$1j,$documentAll$4=documentAll_1$2,documentAll$6=$documentAll$4.all,isObject$13=$documentAll$4.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$1i(e)||e===documentAll$6}:function(e){return"object"==typeof e?null!==e:isCallable$1i(e)},path$C={},path$B=path$C,global$1H=global$1I,isCallable$1h=isCallable$1j,aFunction$2=function(e){return isCallable$1h(e)?e:void 0},getBuiltIn$D=function(e,t){return arguments.length<2?aFunction$2(path$B[e])||aFunction$2(global$1H[e]):path$B[e]&&path$B[e][t]||global$1H[e]&&global$1H[e][t]},uncurryThis$1_=functionUncurryThis$2,objectIsPrototypeOf$2=uncurryThis$1_({}.isPrototypeOf),engineUserAgent$2="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$1G=global$1I,userAgent$k=engineUserAgent$2,process$d=global$1G.process,Deno$3=global$1G.Deno,versions$2=process$d&&process$d.versions||Deno$3&&Deno$3.version,v8$2=versions$2&&versions$2.v8;v8$2&&(version$4=(match$2=v8$2.split("."))[0]>0&&match$2[0]<4?1:+(match$2[0]+match$2[1])),!version$4&&userAgent$k&&(!(match$2=userAgent$k.match(/Edge\/(\d+)/))||match$2[1]>=74)&&(match$2=userAgent$k.match(/Chrome\/(\d+)/))&&(version$4=+match$2[1]);var engineV8Version$2=version$4,V8_VERSION$a=engineV8Version$2,fails$1Y=fails$20,global$1F=global$1I,$String$g=global$1F.String,symbolConstructorDetection$2=!!Object.getOwnPropertySymbols&&!fails$1Y((function(){var e=Symbol();return!$String$g(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$a&&V8_VERSION$a<41})),NATIVE_SYMBOL$e=symbolConstructorDetection$2,useSymbolAsUid$2=NATIVE_SYMBOL$e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$C=getBuiltIn$D,isCallable$1g=isCallable$1j,isPrototypeOf$J=objectIsPrototypeOf$2,USE_SYMBOL_AS_UID$5=useSymbolAsUid$2,$Object$d=Object,isSymbol$h=USE_SYMBOL_AS_UID$5?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$C("Symbol");return isCallable$1g(t)&&isPrototypeOf$J(t.prototype,$Object$d(e))},$String$f=String,tryToString$m=function(e){try{return $String$f(e)}catch(e){return"Object"}},isCallable$1f=isCallable$1j,tryToString$l=tryToString$m,$TypeError$T=TypeError,aCallable$I=function(e){if(isCallable$1f(e))return e;throw $TypeError$T(tryToString$l(e)+" is not a function")},aCallable$H=aCallable$I,isNullOrUndefined$l=isNullOrUndefined$n,getMethod$e=function(e,t){var r=e[t];return isNullOrUndefined$l(r)?void 0:aCallable$H(r)},call$1b=functionCall$2,isCallable$1e=isCallable$1j,isObject$12=isObject$13,$TypeError$S=TypeError,ordinaryToPrimitive$5=function(e,t){var r,n;if("string"===t&&isCallable$1e(r=e.toString)&&!isObject$12(n=call$1b(r,e)))return n;if(isCallable$1e(r=e.valueOf)&&!isObject$12(n=call$1b(r,e)))return n;if("string"!==t&&isCallable$1e(r=e.toString)&&!isObject$12(n=call$1b(r,e)))return n;throw $TypeError$S("Can't convert object to primitive value")},shared$j={exports:{}},isPure$2=!0,global$1E=global$1I,defineProperty$C=Object.defineProperty,defineGlobalProperty$9=function(e,t){try{defineProperty$C(global$1E,e,{value:t,configurable:!0,writable:!0})}catch(r){global$1E[e]=t}return t},global$1D=global$1I,defineGlobalProperty$8=defineGlobalProperty$9,SHARED$2="__core-js_shared__",store$b=global$1D[SHARED$2]||defineGlobalProperty$8(SHARED$2,{}),sharedStore$2=store$b,store$a=sharedStore$2;(shared$j.exports=function(e,t){return store$a[e]||(store$a[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$2=shared$j.exports,requireObjectCoercible$o=requireObjectCoercible$q,$Object$c=Object,toObject$F=function(e){return $Object$c(requireObjectCoercible$o(e))},uncurryThis$1Z=functionUncurryThis$2,toObject$E=toObject$F,hasOwnProperty$4=uncurryThis$1Z({}.hasOwnProperty),hasOwnProperty_1$2=Object.hasOwn||function(e,t){return hasOwnProperty$4(toObject$E(e),t)},uncurryThis$1Y=functionUncurryThis$2,id$5=0,postfix$2=Math.random(),toString$N=uncurryThis$1Y(1..toString),uid$f=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$N(++id$5+postfix$2,36)},global$1C=global$1I,shared$i=sharedExports$2,hasOwn$_=hasOwnProperty_1$2,uid$e=uid$f,NATIVE_SYMBOL$d=symbolConstructorDetection$2,USE_SYMBOL_AS_UID$4=useSymbolAsUid$2,Symbol$b=global$1C.Symbol,WellKnownSymbolsStore$5=shared$i("wks"),createWellKnownSymbol$2=USE_SYMBOL_AS_UID$4?Symbol$b.for||Symbol$b:Symbol$b&&Symbol$b.withoutSetter||uid$e,wellKnownSymbol$1c=function(e){return hasOwn$_(WellKnownSymbolsStore$5,e)||(WellKnownSymbolsStore$5[e]=NATIVE_SYMBOL$d&&hasOwn$_(Symbol$b,e)?Symbol$b[e]:createWellKnownSymbol$2("Symbol."+e)),WellKnownSymbolsStore$5[e]},call$1a=functionCall$2,isObject$11=isObject$13,isSymbol$g=isSymbol$h,getMethod$d=getMethod$e,ordinaryToPrimitive$4=ordinaryToPrimitive$5,wellKnownSymbol$1b=wellKnownSymbol$1c,$TypeError$R=TypeError,TO_PRIMITIVE$2=wellKnownSymbol$1b("toPrimitive"),toPrimitive$f=function(e,t){if(!isObject$11(e)||isSymbol$g(e))return e;var r,n=getMethod$d(e,TO_PRIMITIVE$2);if(n){if(void 0===t&&(t="default"),r=call$1a(n,e,t),!isObject$11(r)||isSymbol$g(r))return r;throw $TypeError$R("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive$4(e,t)},toPrimitive$e=toPrimitive$f,isSymbol$f=isSymbol$h,toPropertyKey$f=function(e){var t=toPrimitive$e(e,"string");return isSymbol$f(t)?t:t+""},global$1B=global$1I,isObject$10=isObject$13,document$9=global$1B.document,EXISTS$5=isObject$10(document$9)&&isObject$10(document$9.createElement),documentCreateElement$7=function(e){return EXISTS$5?document$9.createElement(e):{}},DESCRIPTORS$_=descriptors$2,fails$1X=fails$20,createElement$5=documentCreateElement$7,ie8DomDefine$2=!DESCRIPTORS$_&&!fails$1X((function(){return 7!=Object.defineProperty(createElement$5("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$Z=descriptors$2,call$19=functionCall$2,propertyIsEnumerableModule$6=objectPropertyIsEnumerable$2,createPropertyDescriptor$l=createPropertyDescriptor$m,toIndexedObject$z=toIndexedObject$A,toPropertyKey$e=toPropertyKey$f,hasOwn$Z=hasOwnProperty_1$2,IE8_DOM_DEFINE$5=ie8DomDefine$2,$getOwnPropertyDescriptor$7=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$2.f=DESCRIPTORS$Z?$getOwnPropertyDescriptor$7:function(e,t){if(e=toIndexedObject$z(e),t=toPropertyKey$e(t),IE8_DOM_DEFINE$5)try{return $getOwnPropertyDescriptor$7(e,t)}catch(e){}if(hasOwn$Z(e,t))return createPropertyDescriptor$l(!call$19(propertyIsEnumerableModule$6.f,e,t),e[t])};var fails$1W=fails$20,isCallable$1d=isCallable$1j,replacement$2=/#|\.prototype\./,isForced$c=function(e,t){var r=data$2[normalize$2(e)];return r==POLYFILL$2||r!=NATIVE$2&&(isCallable$1d(t)?fails$1W(t):!!t)},normalize$2=isForced$c.normalize=function(e){return String(e).replace(replacement$2,".").toLowerCase()},data$2=isForced$c.data={},NATIVE$2=isForced$c.NATIVE="N",POLYFILL$2=isForced$c.POLYFILL="P",isForced_1$2=isForced$c,uncurryThis$1X=functionUncurryThisClause$2,aCallable$G=aCallable$I,NATIVE_BIND$b=functionBindNative$2,bind$O=functionUncurryThisClause$2(functionUncurryThisClause$2.bind),functionBindContext$2=function(e,t){return aCallable$G(e),void 0===t?e:NATIVE_BIND$b?bind$O(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty$2={},DESCRIPTORS$Y=descriptors$2,fails$1V=fails$20,v8PrototypeDefineBug$2=DESCRIPTORS$Y&&fails$1V((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$$=isObject$13,$String$e=String,$TypeError$Q=TypeError,anObject$S=function(e){if(isObject$$(e))return e;throw $TypeError$Q($String$e(e)+" is not an object")},DESCRIPTORS$X=descriptors$2,IE8_DOM_DEFINE$4=ie8DomDefine$2,V8_PROTOTYPE_DEFINE_BUG$5=v8PrototypeDefineBug$2,anObject$R=anObject$S,toPropertyKey$d=toPropertyKey$f,$TypeError$P=TypeError,$defineProperty$4=Object.defineProperty,$getOwnPropertyDescriptor$6=Object.getOwnPropertyDescriptor,ENUMERABLE$2="enumerable",CONFIGURABLE$5="configurable",WRITABLE$2="writable";objectDefineProperty$2.f=DESCRIPTORS$X?V8_PROTOTYPE_DEFINE_BUG$5?function(e,t,r){if(anObject$R(e),t=toPropertyKey$d(t),anObject$R(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE$2 in r&&!r[WRITABLE$2]){var n=$getOwnPropertyDescriptor$6(e,t);n&&n[WRITABLE$2]&&(e[t]=r.value,r={configurable:CONFIGURABLE$5 in r?r[CONFIGURABLE$5]:n[CONFIGURABLE$5],enumerable:ENUMERABLE$2 in r?r[ENUMERABLE$2]:n[ENUMERABLE$2],writable:!1})}return $defineProperty$4(e,t,r)}:$defineProperty$4:function(e,t,r){if(anObject$R(e),t=toPropertyKey$d(t),anObject$R(r),IE8_DOM_DEFINE$4)try{return $defineProperty$4(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$P("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$W=descriptors$2,definePropertyModule$i=objectDefineProperty$2,createPropertyDescriptor$k=createPropertyDescriptor$m,createNonEnumerableProperty$s=DESCRIPTORS$W?function(e,t,r){return definePropertyModule$i.f(e,t,createPropertyDescriptor$k(1,r))}:function(e,t,r){return e[t]=r,e},global$1A=global$1I,apply$m=functionApply$2,uncurryThis$1W=functionUncurryThisClause$2,isCallable$1c=isCallable$1j,getOwnPropertyDescriptor$l=objectGetOwnPropertyDescriptor$2.f,isForced$b=isForced_1$2,path$A=path$C,bind$N=functionBindContext$2,createNonEnumerableProperty$r=createNonEnumerableProperty$s,hasOwn$Y=hasOwnProperty_1$2,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$m(e,this,arguments)};return t.prototype=e.prototype,t},_export$2=function(e,t){var r,n,o,i,a,s,l,c,u,$=e.target,d=e.global,p=e.stat,y=e.proto,f=d?global$1A:p?global$1A[$]:(global$1A[$]||{}).prototype,h=d?path$A:path$A[$]||createNonEnumerableProperty$r(path$A,$,{})[$],m=h.prototype;for(i in t)n=!(r=isForced$b(d?i:$+(p?".":"#")+i,e.forced))&&f&&hasOwn$Y(f,i),s=h[i],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$l(f,i))&&u.value:f[i]),a=n&&l?l:t[i],n&&typeof s==typeof a||(c=e.bind&&n?bind$N(a,global$1A):e.wrap&&n?wrapConstructor(a):y&&isCallable$1c(a)?uncurryThis$1W(a):a,(e.sham||a&&a.sham||s&&s.sham)&&createNonEnumerableProperty$r(c,"sham",!0),createNonEnumerableProperty$r(h,i,c),y&&(hasOwn$Y(path$A,o=$+"Prototype")||createNonEnumerableProperty$r(path$A,o,{}),createNonEnumerableProperty$r(path$A[o],i,a),e.real&&m&&(r||!m[i])&&createNonEnumerableProperty$r(m,i,a)))},engineIsBun$1="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,uncurryThis$1V=functionUncurryThis$2,arraySlice$u=uncurryThis$1V([].slice),$TypeError$O=TypeError,validateArgumentsLength$d=function(e,t){if(e<t)throw $TypeError$O("Not enough arguments");return e},global$1z=global$1I,apply$l=functionApply$2,isCallable$1b=isCallable$1j,ENGINE_IS_BUN$1=engineIsBun$1,USER_AGENT$1=engineUserAgent$2,arraySlice$t=arraySlice$u,validateArgumentsLength$c=validateArgumentsLength$d,Function$6=global$1z.Function,WRAP$1=/MSIE .\./.test(USER_AGENT$1)||ENGINE_IS_BUN$1&&function(){var e=global$1z.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),schedulersFix$6=function(e,t){var r=t?2:1;return WRAP$1?function(n,o){var i=validateArgumentsLength$c(arguments.length,1)>r,a=isCallable$1b(n)?n:Function$6(n),s=i?arraySlice$t(arguments,r):[],l=i?function(){apply$l(a,this,s)}:a;return t?e(l,o):e(l)}:e},$$2K=_export$2,global$1y=global$1I,schedulersFix$5=schedulersFix$6,setInterval$7=schedulersFix$5(global$1y.setInterval,!0);$$2K({global:!0,bind:!0,forced:global$1y.setInterval!==setInterval$7},{setInterval:setInterval$7});var $$2J=_export$2,global$1x=global$1I,schedulersFix$4=schedulersFix$6,setTimeout$8=schedulersFix$4(global$1x.setTimeout,!0);$$2J({global:!0,bind:!0,forced:global$1x.setTimeout!==setTimeout$8},{setTimeout:setTimeout$8});var path$z=path$C,setTimeout$7=path$z.setTimeout,parent$2H=setTimeout$7,setTimeout$6=parent$2H,parent$2G=setTimeout$6,setTimeout$5=parent$2G,setTimeout$4=setTimeout$5,setTimeout$3=setTimeout$4,_setTimeout=getDefaultExportFromCjs(setTimeout$3),ceil$4=Math.ceil,floor$j=Math.floor,mathTrunc$2=Math.trunc||function(e){var t=+e;return(t>0?floor$j:ceil$4)(t)},trunc$a=mathTrunc$2,toIntegerOrInfinity$s=function(e){var t=+e;return t!=t||0===t?0:trunc$a(t)},toIntegerOrInfinity$r=toIntegerOrInfinity$s,min$g=Math.min,toLength$m=function(e){return e>0?min$g(toIntegerOrInfinity$r(e),9007199254740991):0},toLength$l=toLength$m,lengthOfArrayLike$J=function(e){return toLength$l(e.length)},classof$L=classofRaw$8,isArray$n=Array.isArray||function(e){return"Array"==classof$L(e)},wellKnownSymbol$1a=wellKnownSymbol$1c,TO_STRING_TAG$e=wellKnownSymbol$1a("toStringTag"),test$6={};test$6[TO_STRING_TAG$e]="z";var toStringTagSupport$2="[object z]"===String(test$6),TO_STRING_TAG_SUPPORT$8=toStringTagSupport$2,isCallable$1a=isCallable$1j,classofRaw$6=classofRaw$8,wellKnownSymbol$19=wellKnownSymbol$1c,TO_STRING_TAG$d=wellKnownSymbol$19("toStringTag"),$Object$b=Object,CORRECT_ARGUMENTS$2="Arguments"==classofRaw$6(function(){return arguments}()),tryGet$2=function(e,t){try{return e[t]}catch(e){}},classof$K=TO_STRING_TAG_SUPPORT$8?classofRaw$6:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet$2(t=$Object$b(e),TO_STRING_TAG$d))?r:CORRECT_ARGUMENTS$2?classofRaw$6(t):"Object"==(n=classofRaw$6(t))&&isCallable$1a(t.callee)?"Arguments":n},uncurryThis$1U=functionUncurryThis$2,isCallable$19=isCallable$1j,store$9=sharedStore$2,functionToString$4=uncurryThis$1U(Function.toString);isCallable$19(store$9.inspectSource)||(store$9.inspectSource=function(e){return functionToString$4(e)});var inspectSource$a=store$9.inspectSource,uncurryThis$1T=functionUncurryThis$2,fails$1U=fails$20,isCallable$18=isCallable$1j,classof$J=classof$K,getBuiltIn$B=getBuiltIn$D,inspectSource$9=inspectSource$a,noop$3=function(){},empty$2=[],construct$b=getBuiltIn$B("Reflect","construct"),constructorRegExp$2=/^\s*(?:class|function)\b/,exec$d=uncurryThis$1T(constructorRegExp$2.exec),INCORRECT_TO_STRING$2=!constructorRegExp$2.exec(noop$3),isConstructorModern$2=function(e){if(!isCallable$18(e))return!1;try{return construct$b(noop$3,empty$2,e),!0}catch(e){return!1}},isConstructorLegacy$2=function(e){if(!isCallable$18(e))return!1;switch(classof$J(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$2||!!exec$d(constructorRegExp$2,inspectSource$9(e))}catch(e){return!0}};isConstructorLegacy$2.sham=!0;var isConstructor$d=!construct$b||fails$1U((function(){var e;return isConstructorModern$2(isConstructorModern$2.call)||!isConstructorModern$2(Object)||!isConstructorModern$2((function(){e=!0}))||e}))?isConstructorLegacy$2:isConstructorModern$2,isArray$m=isArray$n,isConstructor$c=isConstructor$d,isObject$_=isObject$13,wellKnownSymbol$18=wellKnownSymbol$1c,SPECIES$i=wellKnownSymbol$18("species"),$Array$c=Array,arraySpeciesConstructor$5=function(e){var t;return isArray$m(e)&&(t=e.constructor,(isConstructor$c(t)&&(t===$Array$c||isArray$m(t.prototype))||isObject$_(t)&&null===(t=t[SPECIES$i]))&&(t=void 0)),void 0===t?$Array$c:t},arraySpeciesConstructor$4=arraySpeciesConstructor$5,arraySpeciesCreate$9=function(e,t){return new(arraySpeciesConstructor$4(e))(0===t?0:t)},bind$M=functionBindContext$2,uncurryThis$1S=functionUncurryThis$2,IndexedObject$b=indexedObject$2,toObject$D=toObject$F,lengthOfArrayLike$I=lengthOfArrayLike$J,arraySpeciesCreate$8=arraySpeciesCreate$9,push$w=uncurryThis$1S([].push),createMethod$j=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,$){for(var d,p,y=toObject$D(l),f=IndexedObject$b(y),h=bind$M(c,u),m=lengthOfArrayLike$I(f),b=0,g=$||arraySpeciesCreate$8,S=t?g(l,m):r||a?g(l,0):void 0;m>b;b++)if((s||b in f)&&(p=h(d=f[b],b,y),e))if(t)S[b]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:push$w(S,d)}else switch(e){case 4:return!1;case 7:push$w(S,d)}return i?-1:n||o?o:S}},arrayIteration$2={forEach:createMethod$j(0),map:createMethod$j(1),filter:createMethod$j(2),some:createMethod$j(3),every:createMethod$j(4),find:createMethod$j(5),findIndex:createMethod$j(6),filterReject:createMethod$j(7)},fails$1T=fails$20,wellKnownSymbol$17=wellKnownSymbol$1c,V8_VERSION$9=engineV8Version$2,SPECIES$h=wellKnownSymbol$17("species"),arrayMethodHasSpeciesSupport$e=function(e){return V8_VERSION$9>=51||!fails$1T((function(){var t=[];return(t.constructor={})[SPECIES$h]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$2I=_export$2,$filter$3=arrayIteration$2.filter,arrayMethodHasSpeciesSupport$d=arrayMethodHasSpeciesSupport$e,HAS_SPECIES_SUPPORT$9=arrayMethodHasSpeciesSupport$d("filter");$$2I({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$9},{filter:function(e){return $filter$3(this,e,arguments.length>1?arguments[1]:void 0)}});var path$y=path$C,entryVirtual$o=function(e){return path$y[e+"Prototype"]},entryVirtual$n=entryVirtual$o,filter$6=entryVirtual$n("Array").filter,isPrototypeOf$I=objectIsPrototypeOf$2,method$o=filter$6,ArrayPrototype$n=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$n||isPrototypeOf$I(ArrayPrototype$n,e)&&t===ArrayPrototype$n.filter?method$o:t},parent$2F=filter$5,filter$4=parent$2F,parent$2E=filter$4,filter$3=parent$2E,parent$2D=filter$3,filter$2=parent$2D,filter$1=filter$2,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),$TypeError$N=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$6=function(e){if(e>MAX_SAFE_INTEGER$1)throw $TypeError$N("Maximum allowed index exceeded");return e},toPropertyKey$c=toPropertyKey$f,definePropertyModule$h=objectDefineProperty$2,createPropertyDescriptor$j=createPropertyDescriptor$m,createProperty$f=function(e,t,r){var n=toPropertyKey$c(t);n in e?definePropertyModule$h.f(e,n,createPropertyDescriptor$j(0,r)):e[n]=r},$$2H=_export$2,fails$1S=fails$20,isArray$l=isArray$n,isObject$Z=isObject$13,toObject$C=toObject$F,lengthOfArrayLike$H=lengthOfArrayLike$J,doesNotExceedSafeInteger$5=doesNotExceedSafeInteger$6,createProperty$e=createProperty$f,arraySpeciesCreate$7=arraySpeciesCreate$9,arrayMethodHasSpeciesSupport$c=arrayMethodHasSpeciesSupport$e,wellKnownSymbol$16=wellKnownSymbol$1c,V8_VERSION$8=engineV8Version$2,IS_CONCAT_SPREADABLE$1=wellKnownSymbol$16("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$1=V8_VERSION$8>=51||!fails$1S((function(){var e=[];return e[IS_CONCAT_SPREADABLE$1]=!1,e.concat()[0]!==e})),isConcatSpreadable$1=function(e){if(!isObject$Z(e))return!1;var t=e[IS_CONCAT_SPREADABLE$1];return void 0!==t?!!t:isArray$l(e)},FORCED$w=!IS_CONCAT_SPREADABLE_SUPPORT$1||!arrayMethodHasSpeciesSupport$c("concat");$$2H({target:"Array",proto:!0,arity:1,forced:FORCED$w},{concat:function(e){var t,r,n,o,i,a=toObject$C(this),s=arraySpeciesCreate$7(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable$1(i=-1===t?a:arguments[t]))for(o=lengthOfArrayLike$H(i),doesNotExceedSafeInteger$5(l+o),r=0;r<o;r++,l++)r in i&&createProperty$e(s,l,i[r]);else doesNotExceedSafeInteger$5(l+1),createProperty$e(s,l++,i);return s.length=l,s}});var entryVirtual$m=entryVirtual$o,concat$g=entryVirtual$m("Array").concat,isPrototypeOf$H=objectIsPrototypeOf$2,method$n=concat$g,ArrayPrototype$m=Array.prototype,concat$f=function(e){var t=e.concat;return e===ArrayPrototype$m||isPrototypeOf$H(ArrayPrototype$m,e)&&t===ArrayPrototype$m.concat?method$n:t},parent$2C=concat$f,concat$e=parent$2C,parent$2B=concat$e,concat$d=parent$2B,parent$2A=concat$d,concat$c=parent$2A,concat$b=concat$c,concat$a=concat$b,_concatInstanceProperty=getDefaultExportFromCjs(concat$a),fails$1R=fails$20,arrayMethodIsStrict$l=function(e,t){var r=[][e];return!!r&&fails$1R((function(){r.call(null,t||function(){return 1},1)}))},$$2G=_export$2,$every$3=arrayIteration$2.every,arrayMethodIsStrict$k=arrayMethodIsStrict$l,STRICT_METHOD$f=arrayMethodIsStrict$k("every");$$2G({target:"Array",proto:!0,forced:!STRICT_METHOD$f},{every:function(e){return $every$3(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$l=entryVirtual$o,every$6=entryVirtual$l("Array").every,isPrototypeOf$G=objectIsPrototypeOf$2,method$m=every$6,ArrayPrototype$l=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$l||isPrototypeOf$G(ArrayPrototype$l,e)&&t===ArrayPrototype$l.every?method$m:t},parent$2z=every$5,every$4=parent$2z,parent$2y=every$4,every$3=parent$2y,parent$2x=every$3,every$2=parent$2x,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),toIntegerOrInfinity$q=toIntegerOrInfinity$s,max$b=Math.max,min$f=Math.min,toAbsoluteIndex$l=function(e,t){var r=toIntegerOrInfinity$q(e);return r<0?max$b(r+t,0):min$f(r,t)},toIndexedObject$y=toIndexedObject$A,toAbsoluteIndex$k=toAbsoluteIndex$l,lengthOfArrayLike$G=lengthOfArrayLike$J,createMethod$i=function(e){return function(t,r,n){var o,i=toIndexedObject$y(t),a=lengthOfArrayLike$G(i),s=toAbsoluteIndex$k(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$2={includes:createMethod$i(!0),indexOf:createMethod$i(!1)},hiddenKeys$j={},uncurryThis$1R=functionUncurryThis$2,hasOwn$X=hasOwnProperty_1$2,toIndexedObject$x=toIndexedObject$A,indexOf$a=arrayIncludes$2.indexOf,hiddenKeys$i=hiddenKeys$j,push$v=uncurryThis$1R([].push),objectKeysInternal$2=function(e,t){var r,n=toIndexedObject$x(e),o=0,i=[];for(r in n)!hasOwn$X(hiddenKeys$i,r)&&hasOwn$X(n,r)&&push$v(i,r);for(;t.length>o;)hasOwn$X(n,r=t[o++])&&(~indexOf$a(i,r)||push$v(i,r));return i},enumBugKeys$b=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$5=objectKeysInternal$2,enumBugKeys$a=enumBugKeys$b,objectKeys$b=Object.keys||function(e){return internalObjectKeys$5(e,enumBugKeys$a)},$$2F=_export$2,toObject$B=toObject$F,nativeKeys$2=objectKeys$b,fails$1Q=fails$20,FAILS_ON_PRIMITIVES$8=fails$1Q((function(){nativeKeys$2(1)}));$$2F({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$8},{keys:function(e){return nativeKeys$2(toObject$B(e))}});var path$x=path$C,keys$j=path$x.Object.keys,parent$2w=keys$j,keys$i=parent$2w,parent$2v=keys$i,keys$h=parent$2v,parent$2u=keys$h,keys$g=parent$2u,keys$f=keys$g,keys$e=keys$f,_Object$keys=getDefaultExportFromCjs(keys$e),classof$I=classof$K,$String$d=String,toString$M=function(e){if("Symbol"===classof$I(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$d(e)},uncurryThis$1Q=functionUncurryThis$2,isArray$k=isArray$n,isCallable$17=isCallable$1j,classof$H=classofRaw$8,toString$L=toString$M,push$u=uncurryThis$1Q([].push),getJsonReplacerFunction=function(e){if(isCallable$17(e))return e;if(isArray$k(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$u(r,o):"number"!=typeof o&&"Number"!=classof$H(o)&&"String"!=classof$H(o)||push$u(r,toString$L(o))}var i=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$k(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}},$$2E=_export$2,getBuiltIn$A=getBuiltIn$D,apply$k=functionApply$2,call$18=functionCall$2,uncurryThis$1P=functionUncurryThis$2,fails$1P=fails$20,isCallable$16=isCallable$1j,isSymbol$e=isSymbol$h,arraySlice$s=arraySlice$u,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$c=symbolConstructorDetection$2,$String$c=String,$stringify$1=getBuiltIn$A("JSON","stringify"),exec$c=uncurryThis$1P(/./.exec),charAt$h=uncurryThis$1P("".charAt),charCodeAt$8=uncurryThis$1P("".charCodeAt),replace$f=uncurryThis$1P("".replace),numberToString$3=uncurryThis$1P(1..toString),tester$1=/[\uD800-\uDFFF]/g,low$1=/^[\uD800-\uDBFF]$/,hi$1=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION$1=!NATIVE_SYMBOL$c||fails$1P((function(){var e=getBuiltIn$A("Symbol")();return"[null]"!=$stringify$1([e])||"{}"!=$stringify$1({a:e})||"{}"!=$stringify$1(Object(e))})),ILL_FORMED_UNICODE$1=fails$1P((function(){return'"\\udf06\\ud834"'!==$stringify$1("\udf06\ud834")||'"\\udead"'!==$stringify$1("\udead")})),stringifyWithSymbolsFix$1=function(e,t){var r=arraySlice$s(arguments),n=getReplacerFunction(t);if(isCallable$16(n)||void 0!==e&&!isSymbol$e(e))return r[1]=function(e,t){if(isCallable$16(n)&&(t=call$18(n,this,$String$c(e),t)),!isSymbol$e(t))return t},apply$k($stringify$1,null,r)},fixIllFormed$1=function(e,t,r){var n=charAt$h(r,t-1),o=charAt$h(r,t+1);return exec$c(low$1,e)&&!exec$c(hi$1,o)||exec$c(hi$1,e)&&!exec$c(low$1,n)?"\\u"+numberToString$3(charCodeAt$8(e,0),16):e};$stringify$1&&$$2E({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION$1||ILL_FORMED_UNICODE$1},{stringify:function(e,t,r){var n=arraySlice$s(arguments),o=apply$k(WRONG_SYMBOLS_CONVERSION$1?stringifyWithSymbolsFix$1:$stringify$1,null,n);return ILL_FORMED_UNICODE$1&&"string"==typeof o?replace$f(o,tester$1,fixIllFormed$1):o}});var path$w=path$C,apply$j=functionApply$2;path$w.JSON||(path$w.JSON={stringify:JSON.stringify});var stringify$5=function(e,t,r){return apply$j(path$w.JSON.stringify,null,arguments)},parent$2t=stringify$5,stringify$4=parent$2t,parent$2s=stringify$4,stringify$3=parent$2s,parent$2r=stringify$3,stringify$2=parent$2r,stringify$1=stringify$2,stringify2=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify2),$$2D=_export$2,uncurryThis$1O=functionUncurryThisClause$2,$indexOf$4=arrayIncludes$2.indexOf,arrayMethodIsStrict$j=arrayMethodIsStrict$l,nativeIndexOf$2=uncurryThis$1O([].indexOf),NEGATIVE_ZERO$5=!!nativeIndexOf$2&&1/nativeIndexOf$2([1],1,-0)<0,FORCED$v=NEGATIVE_ZERO$5||!arrayMethodIsStrict$j("indexOf");$$2D({target:"Array",proto:!0,forced:FORCED$v},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$5?nativeIndexOf$2(this,e,t)||0:$indexOf$4(this,e,t)}});var entryVirtual$k=entryVirtual$o,indexOf$9=entryVirtual$k("Array").indexOf,isPrototypeOf$F=objectIsPrototypeOf$2,method$l=indexOf$9,ArrayPrototype$k=Array.prototype,indexOf$8=function(e){var t=e.indexOf;return e===ArrayPrototype$k||isPrototypeOf$F(ArrayPrototype$k,e)&&t===ArrayPrototype$k.indexOf?method$l:t},parent$2q=indexOf$8,indexOf$7=parent$2q,parent$2p=indexOf$7,indexOf$6=parent$2p,parent$2o=indexOf$6,indexOf$5=parent$2o,indexOf$4=indexOf$5,indexOf$3=indexOf$4,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf$3),uncurryThis$1N=functionUncurryThis$2,aCallable$F=aCallable$I,isObject$Y=isObject$13,hasOwn$W=hasOwnProperty_1$2,arraySlice$r=arraySlice$u,NATIVE_BIND$a=functionBindNative$2,$Function$2=Function,concat$9=uncurryThis$1N([].concat),join$b=uncurryThis$1N([].join),factories$2={},construct$a=function(e,t,r){if(!hasOwn$W(factories$2,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories$2[t]=$Function$2("C,a","return new C("+join$b(n,",")+")")}return factories$2[t](e,r)},functionBind$2=NATIVE_BIND$a?$Function$2.bind:function(e){var t=aCallable$F(this),r=t.prototype,n=arraySlice$r(arguments,1),o=function(){var r=concat$9(n,arraySlice$r(arguments));return this instanceof o?construct$a(t,r.length,r):t.apply(e,r)};return isObject$Y(r)&&(o.prototype=r),o},$$2C=_export$2,bind$L=functionBind$2;$$2C({target:"Function",proto:!0,forced:Function.bind!==bind$L},{bind:bind$L});var entryVirtual$j=entryVirtual$o,bind$K=entryVirtual$j("Function").bind,isPrototypeOf$E=objectIsPrototypeOf$2,method$k=bind$K,FunctionPrototype$8=Function.prototype,bind$J=function(e){var t=e.bind;return e===FunctionPrototype$8||isPrototypeOf$E(FunctionPrototype$8,e)&&t===FunctionPrototype$8.bind?method$k:t},parent$2n=bind$J,bind$I=parent$2n,parent$2m=bind$I,bind$H=parent$2m,parent$2l=bind$H,bind$G=parent$2l,bind$F=bind$G,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$F),bind$E=bind$F,_bindInstanceProperty=getDefaultExportFromCjs(bind$E),$$2B=_export$2,$map$4=arrayIteration$2.map,arrayMethodHasSpeciesSupport$b=arrayMethodHasSpeciesSupport$e,HAS_SPECIES_SUPPORT$8=arrayMethodHasSpeciesSupport$b("map");$$2B({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$8},{map:function(e){return $map$4(this,e,arguments.length>1?arguments[1]:void 0)}});var set$d,get$d,has$4,entryVirtual$i=entryVirtual$o,map$d=entryVirtual$i("Array").map,isPrototypeOf$D=objectIsPrototypeOf$2,method$j=map$d,ArrayPrototype$j=Array.prototype,map$c=function(e){var t=e.map;return e===ArrayPrototype$j||isPrototypeOf$D(ArrayPrototype$j,e)&&t===ArrayPrototype$j.map?method$j:t},parent$2k=map$c,map$b=parent$2k,parent$2j=map$b,map$a=parent$2j,parent$2i=map$a,map$9=parent$2i,map$8=map$9,map$7=map$8,_mapInstanceProperty=getDefaultExportFromCjs(map$7),iterators$2={},global$1w=global$1I,isCallable$15=isCallable$1j,WeakMap$5=global$1w.WeakMap,weakMapBasicDetection$2=isCallable$15(WeakMap$5)&&/native code/.test(String(WeakMap$5)),shared$h=sharedExports$2,uid$d=uid$f,keys$d=shared$h("keys"),sharedKey$d=function(e){return keys$d[e]||(keys$d[e]=uid$d(e))},NATIVE_WEAK_MAP$2=weakMapBasicDetection$2,global$1v=global$1I,isObject$X=isObject$13,createNonEnumerableProperty$q=createNonEnumerableProperty$s,hasOwn$V=hasOwnProperty_1$2,shared$g=sharedStore$2,sharedKey$c=sharedKey$d,hiddenKeys$h=hiddenKeys$j,OBJECT_ALREADY_INITIALIZED$2="Object already initialized",TypeError$g=global$1v.TypeError,WeakMap$4=global$1v.WeakMap,enforce$2=function(e){return has$4(e)?get$d(e):set$d(e,{})},getterFor$2=function(e){return function(t){var r;if(!isObject$X(t)||(r=get$d(t)).type!==e)throw TypeError$g("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP$2||shared$g.state){var store$8=shared$g.state||(shared$g.state=new WeakMap$4);store$8.get=store$8.get,store$8.has=store$8.has,store$8.set=store$8.set,set$d=function(e,t){if(store$8.has(e))throw TypeError$g(OBJECT_ALREADY_INITIALIZED$2);return t.facade=e,store$8.set(e,t),t},get$d=function(e){return store$8.get(e)||{}},has$4=function(e){return store$8.has(e)}}else{var STATE$2=sharedKey$c("state");hiddenKeys$h[STATE$2]=!0,set$d=function(e,t){if(hasOwn$V(e,STATE$2))throw TypeError$g(OBJECT_ALREADY_INITIALIZED$2);return t.facade=e,createNonEnumerableProperty$q(e,STATE$2,t),t},get$d=function(e){return hasOwn$V(e,STATE$2)?e[STATE$2]:{}},has$4=function(e){return hasOwn$V(e,STATE$2)}}var internalState$2={set:set$d,get:get$d,has:has$4,enforce:enforce$2,getterFor:getterFor$2},DESCRIPTORS$V=descriptors$2,hasOwn$U=hasOwnProperty_1$2,FunctionPrototype$7=Function.prototype,getDescriptor$2=DESCRIPTORS$V&&Object.getOwnPropertyDescriptor,EXISTS$4=hasOwn$U(FunctionPrototype$7,"name"),PROPER$2=EXISTS$4&&"something"===function(){}.name,CONFIGURABLE$4=EXISTS$4&&(!DESCRIPTORS$V||DESCRIPTORS$V&&getDescriptor$2(FunctionPrototype$7,"name").configurable),functionName$2={EXISTS:EXISTS$4,PROPER:PROPER$2,CONFIGURABLE:CONFIGURABLE$4},objectDefineProperties$2={},DESCRIPTORS$U=descriptors$2,V8_PROTOTYPE_DEFINE_BUG$4=v8PrototypeDefineBug$2,definePropertyModule$g=objectDefineProperty$2,anObject$Q=anObject$S,toIndexedObject$w=toIndexedObject$A,objectKeys$a=objectKeys$b;objectDefineProperties$2.f=DESCRIPTORS$U&&!V8_PROTOTYPE_DEFINE_BUG$4?Object.defineProperties:function(e,t){anObject$Q(e);for(var r,n=toIndexedObject$w(t),o=objectKeys$a(t),i=o.length,a=0;i>a;)definePropertyModule$g.f(e,r=o[a++],n[r]);return e};var activeXDocument$2,getBuiltIn$z=getBuiltIn$D,html$8=getBuiltIn$z("document","documentElement"),anObject$P=anObject$S,definePropertiesModule$4=objectDefineProperties$2,enumBugKeys$9=enumBugKeys$b,hiddenKeys$g=hiddenKeys$j,html$7=html$8,documentCreateElement$6=documentCreateElement$7,sharedKey$b=sharedKey$d,GT$2=">",LT$2="<",PROTOTYPE$6="prototype",SCRIPT$2="script",IE_PROTO$5=sharedKey$b("IE_PROTO"),EmptyConstructor$2=function(){},scriptTag$2=function(e){return LT$2+SCRIPT$2+GT$2+e+LT$2+"/"+SCRIPT$2+GT$2},NullProtoObjectViaActiveX$2=function(e){e.write(scriptTag$2("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame$2=function(){var e,t=documentCreateElement$6("iframe"),r="java"+SCRIPT$2+":";return t.style.display="none",html$7.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag$2("document.F=Object")),e.close(),e.F},NullProtoObject$2=function(){try{activeXDocument$2=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject$2="undefined"!=typeof document?document.domain&&activeXDocument$2?NullProtoObjectViaActiveX$2(activeXDocument$2):NullProtoObjectViaIFrame$2():NullProtoObjectViaActiveX$2(activeXDocument$2);for(var e=enumBugKeys$9.length;e--;)delete NullProtoObject$2[PROTOTYPE$6][enumBugKeys$9[e]];return NullProtoObject$2()};hiddenKeys$g[IE_PROTO$5]=!0;var IteratorPrototype$7,PrototypeOfArrayIteratorPrototype$2,arrayIterator$2,objectCreate$2=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor$2[PROTOTYPE$6]=anObject$P(e),r=new EmptyConstructor$2,EmptyConstructor$2[PROTOTYPE$6]=null,r[IE_PROTO$5]=e):r=NullProtoObject$2(),void 0===t?r:definePropertiesModule$4.f(r,t)},fails$1O=fails$20,correctPrototypeGetter$2=!fails$1O((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$T=hasOwnProperty_1$2,isCallable$14=isCallable$1j,toObject$A=toObject$F,sharedKey$a=sharedKey$d,CORRECT_PROTOTYPE_GETTER$4=correctPrototypeGetter$2,IE_PROTO$4=sharedKey$a("IE_PROTO"),$Object$a=Object,ObjectPrototype$a=$Object$a.prototype,objectGetPrototypeOf$2=CORRECT_PROTOTYPE_GETTER$4?$Object$a.getPrototypeOf:function(e){var t=toObject$A(e);if(hasOwn$T(t,IE_PROTO$4))return t[IE_PROTO$4];var r=t.constructor;return isCallable$14(r)&&t instanceof r?r.prototype:t instanceof $Object$a?ObjectPrototype$a:null},createNonEnumerableProperty$p=createNonEnumerableProperty$s,defineBuiltIn$D=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$p(e,t,r),e},fails$1N=fails$20,isCallable$13=isCallable$1j,isObject$W=isObject$13,create$o=objectCreate$2,getPrototypeOf$h=objectGetPrototypeOf$2,defineBuiltIn$C=defineBuiltIn$D,wellKnownSymbol$15=wellKnownSymbol$1c,ITERATOR$s=wellKnownSymbol$15("iterator"),BUGGY_SAFARI_ITERATORS$5=!1;[].keys&&("next"in(arrayIterator$2=[].keys())?(PrototypeOfArrayIteratorPrototype$2=getPrototypeOf$h(getPrototypeOf$h(arrayIterator$2)))!==Object.prototype&&(IteratorPrototype$7=PrototypeOfArrayIteratorPrototype$2):BUGGY_SAFARI_ITERATORS$5=!0);var NEW_ITERATOR_PROTOTYPE$2=!isObject$W(IteratorPrototype$7)||fails$1N((function(){var e={};return IteratorPrototype$7[ITERATOR$s].call(e)!==e}));isCallable$13((IteratorPrototype$7=NEW_ITERATOR_PROTOTYPE$2?{}:create$o(IteratorPrototype$7))[ITERATOR$s])||defineBuiltIn$C(IteratorPrototype$7,ITERATOR$s,(function(){return this}));var iteratorsCore$2={IteratorPrototype:IteratorPrototype$7,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$5},TO_STRING_TAG_SUPPORT$7=toStringTagSupport$2,classof$G=classof$K,objectToString$2=TO_STRING_TAG_SUPPORT$7?{}.toString:function(){return"[object "+classof$G(this)+"]"},TO_STRING_TAG_SUPPORT$6=toStringTagSupport$2,defineProperty$B=objectDefineProperty$2.f,createNonEnumerableProperty$o=createNonEnumerableProperty$s,hasOwn$S=hasOwnProperty_1$2,toString$K=objectToString$2,wellKnownSymbol$14=wellKnownSymbol$1c,TO_STRING_TAG$c=wellKnownSymbol$14("toStringTag"),setToStringTag$o=function(e,t,r,n){if(e){var o=r?e:e.prototype;hasOwn$S(o,TO_STRING_TAG$c)||defineProperty$B(o,TO_STRING_TAG$c,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT$6&&createNonEnumerableProperty$o(o,"toString",toString$K)}},IteratorPrototype$6=iteratorsCore$2.IteratorPrototype,create$n=objectCreate$2,createPropertyDescriptor$i=createPropertyDescriptor$m,setToStringTag$n=setToStringTag$o,Iterators$f=iterators$2,returnThis$5=function(){return this},iteratorCreateConstructor$2=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$n(IteratorPrototype$6,{next:createPropertyDescriptor$i(+!n,r)}),setToStringTag$n(e,o,!1,!0),Iterators$f[o]=returnThis$5,e},uncurryThis$1M=functionUncurryThis$2,aCallable$E=aCallable$I,functionUncurryThisAccessor$1=function(e,t,r){try{return uncurryThis$1M(aCallable$E(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$12=isCallable$1j,$String$b=String,$TypeError$M=TypeError,aPossiblePrototype$5=function(e){if("object"==typeof e||isCallable$12(e))return e;throw $TypeError$M("Can't set "+$String$b(e)+" as a prototype")},uncurryThisAccessor$1=functionUncurryThisAccessor$1,anObject$O=anObject$S,aPossiblePrototype$4=aPossiblePrototype$5,objectSetPrototypeOf$2=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor$1(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$O(r),aPossiblePrototype$4(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$2A=_export$2,call$17=functionCall$2,FunctionName$4=functionName$2,createIteratorConstructor$4=iteratorCreateConstructor$2,getPrototypeOf$g=objectGetPrototypeOf$2,setToStringTag$m=setToStringTag$o,defineBuiltIn$B=defineBuiltIn$D,wellKnownSymbol$13=wellKnownSymbol$1c,Iterators$e=iterators$2,IteratorsCore$2=iteratorsCore$2,PROPER_FUNCTION_NAME$8=FunctionName$4.PROPER;FunctionName$4.CONFIGURABLE,IteratorsCore$2.IteratorPrototype;var BUGGY_SAFARI_ITERATORS$4=IteratorsCore$2.BUGGY_SAFARI_ITERATORS,ITERATOR$r=wellKnownSymbol$13("iterator"),KEYS$2="keys",VALUES$2="values",ENTRIES$2="entries",returnThis$4=function(){return this},iteratorDefine$2=function(e,t,r,n,o,i,a){createIteratorConstructor$4(r,t,n);var s,l,c,u=function(e){if(e===o&&f)return f;if(!BUGGY_SAFARI_ITERATORS$4&&e in p)return p[e];switch(e){case KEYS$2:case VALUES$2:case ENTRIES$2:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",d=!1,p=e.prototype,y=p[ITERATOR$r]||p["@@iterator"]||o&&p[o],f=!BUGGY_SAFARI_ITERATORS$4&&y||u(o),h="Array"==t&&p.entries||y;if(h&&(s=getPrototypeOf$g(h.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$m(s,$,!0,!0),Iterators$e[$]=returnThis$4),PROPER_FUNCTION_NAME$8&&o==VALUES$2&&y&&y.name!==VALUES$2&&(d=!0,f=function(){return call$17(y,this)}),o)if(l={values:u(VALUES$2),keys:i?f:u(KEYS$2),entries:u(ENTRIES$2)},a)for(c in l)(BUGGY_SAFARI_ITERATORS$4||d||!(c in p))&&defineBuiltIn$B(p,c,l[c]);else $$2A({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS$4||d},l);return a&&p[ITERATOR$r]!==f&&defineBuiltIn$B(p,ITERATOR$r,f,{name:o}),Iterators$e[t]=f,l},createIterResultObject$b=function(e,t){return{value:e,done:t}},toIndexedObject$v=toIndexedObject$A,Iterators$d=iterators$2,InternalStateModule$q=internalState$2;objectDefineProperty$2.f;var defineIterator$8=iteratorDefine$2,createIterResultObject$a=createIterResultObject$b,ARRAY_ITERATOR$2="Array Iterator",setInternalState$m=InternalStateModule$q.set,getInternalState$f=InternalStateModule$q.getterFor(ARRAY_ITERATOR$2);defineIterator$8(Array,"Array",(function(e,t){setInternalState$m(this,{type:ARRAY_ITERATOR$2,target:toIndexedObject$v(e),index:0,kind:t})}),(function(){var e=getInternalState$f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$a(void 0,!0)):createIterResultObject$a("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$d.Arguments=Iterators$d.Array;var domIterables$2={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$8=domIterables$2,global$1u=global$1I,classof$F=classof$K,createNonEnumerableProperty$n=createNonEnumerableProperty$s,Iterators$c=iterators$2,wellKnownSymbol$12=wellKnownSymbol$1c,TO_STRING_TAG$b=wellKnownSymbol$12("toStringTag");for(var COLLECTION_NAME$4 in DOMIterables$8){var Collection=global$1u[COLLECTION_NAME$4],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$F(CollectionPrototype)!==TO_STRING_TAG$b&&createNonEnumerableProperty$n(CollectionPrototype,TO_STRING_TAG$b,COLLECTION_NAME$4),Iterators$c[COLLECTION_NAME$4]=Iterators$c.Array}var $forEach$6=arrayIteration$2.forEach,arrayMethodIsStrict$i=arrayMethodIsStrict$l,STRICT_METHOD$e=arrayMethodIsStrict$i("forEach"),arrayForEach$2=STRICT_METHOD$e?[].forEach:function(e){return $forEach$6(this,e,arguments.length>1?arguments[1]:void 0)},$$2z=_export$2,forEach$f=arrayForEach$2;$$2z({target:"Array",proto:!0,forced:[].forEach!=arrayForEach$2},{forEach:arrayForEach$2});var entryVirtual$h=entryVirtual$o,forEach$e=entryVirtual$h("Array").forEach,parent$2h=forEach$e,forEach$d=parent$2h,classof$E=classof$K,hasOwn$R=hasOwnProperty_1$2,isPrototypeOf$C=objectIsPrototypeOf$2,method$i=forEach$d,ArrayPrototype$i=Array.prototype,DOMIterables$7={DOMTokenList:!0,NodeList:!0},forEach$c=function(e){var t=e.forEach;return e===ArrayPrototype$i||isPrototypeOf$C(ArrayPrototype$i,e)&&t===ArrayPrototype$i.forEach||hasOwn$R(DOMIterables$7,classof$E(e))?method$i:t},parent$2g=forEach$c,forEach$b=parent$2g,parent$2f=forEach$b,forEach$a=parent$2f,forEach$9=forEach$a,forEach$8=forEach$9,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$8),objectGetOwnPropertySymbols$2={};objectGetOwnPropertySymbols$2.f=Object.getOwnPropertySymbols;var DESCRIPTORS$T=descriptors$2,uncurryThis$1L=functionUncurryThis$2,call$16=functionCall$2,fails$1M=fails$20,objectKeys$9=objectKeys$b,getOwnPropertySymbolsModule$8=objectGetOwnPropertySymbols$2,propertyIsEnumerableModule$5=objectPropertyIsEnumerable$2,toObject$z=toObject$F,IndexedObject$a=indexedObject$2,$assign$1=Object.assign,defineProperty$A=Object.defineProperty,concat$8=uncurryThis$1L([].concat),objectAssign$1=!$assign$1||fails$1M((function(){if(DESCRIPTORS$T&&1!==$assign$1({b:1},$assign$1(defineProperty$A({},"a",{enumerable:!0,get:function(){defineProperty$A(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$1({},e)[r]||objectKeys$9($assign$1({},t)).join("")!=n}))?function(e,t){for(var r=toObject$z(e),n=arguments.length,o=1,i=getOwnPropertySymbolsModule$8.f,a=propertyIsEnumerableModule$5.f;n>o;)for(var s,l=IndexedObject$a(arguments[o++]),c=i?concat$8(objectKeys$9(l),i(l)):objectKeys$9(l),u=c.length,$=0;u>$;)s=c[$++],DESCRIPTORS$T&&!call$16(a,l,s)||(r[s]=l[s]);return r}:$assign$1,$$2y=_export$2,assign$b=objectAssign$1;$$2y({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$b},{assign:assign$b});var path$v=path$C,assign$a=path$v.Object.assign,parent$2e=assign$a,assign$9=parent$2e,parent$2d=assign$9,assign$8=parent$2d,parent$2c=assign$8,assign$7=parent$2c,assign$6=assign$7,assign$5=assign$6,_Object$assign=getDefaultExportFromCjs(assign$5),objectGetOwnPropertyNames$2={},internalObjectKeys$4=objectKeysInternal$2,enumBugKeys$8=enumBugKeys$b,hiddenKeys$f=enumBugKeys$8.concat("length","prototype");objectGetOwnPropertyNames$2.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$4(e,hiddenKeys$f)};var getBuiltIn$y=getBuiltIn$D,uncurryThis$1K=functionUncurryThis$2,getOwnPropertyNamesModule$7=objectGetOwnPropertyNames$2,getOwnPropertySymbolsModule$7=objectGetOwnPropertySymbols$2,anObject$N=anObject$S,concat$7=uncurryThis$1K([].concat),ownKeys$a=getBuiltIn$y("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$7.f(anObject$N(e)),r=getOwnPropertySymbolsModule$7.f;return r?concat$7(t,r(e)):t},hasOwn$Q=hasOwnProperty_1$2,ownKeys$9=ownKeys$a,getOwnPropertyDescriptorModule$8=objectGetOwnPropertyDescriptor$2,definePropertyModule$f=objectDefineProperty$2,copyConstructorProperties$7=function(e,t,r){for(var n=ownKeys$9(t),o=definePropertyModule$f.f,i=getOwnPropertyDescriptorModule$8.f,a=0;a<n.length;a++){var s=n[a];hasOwn$Q(e,s)||r&&hasOwn$Q(r,s)||o(e,s,i(t,s))}},isObject$V=isObject$13,createNonEnumerableProperty$m=createNonEnumerableProperty$s,installErrorCause$1=function(e,t){isObject$V(t)&&"cause"in t&&createNonEnumerableProperty$m(e,"cause",t.cause)},uncurryThis$1J=functionUncurryThis$2,$Error$1=Error,replace$e=uncurryThis$1J("".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$e(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$1L=fails$20,createPropertyDescriptor$h=createPropertyDescriptor$m,errorStackInstallable=!fails$1L((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$h(1,7)),7!==e.stack)})),createNonEnumerableProperty$l=createNonEnumerableProperty$s,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$l(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$11=wellKnownSymbol$1c,Iterators$b=iterators$2,ITERATOR$q=wellKnownSymbol$11("iterator"),ArrayPrototype$h=Array.prototype,isArrayIteratorMethod$9=function(e){return void 0!==e&&(Iterators$b.Array===e||ArrayPrototype$h[ITERATOR$q]===e)},classof$D=classof$K,getMethod$c=getMethod$e,isNullOrUndefined$k=isNullOrUndefined$n,Iterators$a=iterators$2,wellKnownSymbol$10=wellKnownSymbol$1c,ITERATOR$p=wellKnownSymbol$10("iterator"),getIteratorMethod$k=function(e){if(!isNullOrUndefined$k(e))return getMethod$c(e,ITERATOR$p)||getMethod$c(e,"@@iterator")||Iterators$a[classof$D(e)]},call$15=functionCall$2,aCallable$D=aCallable$I,anObject$M=anObject$S,tryToString$k=tryToString$m,getIteratorMethod$j=getIteratorMethod$k,$TypeError$L=TypeError,getIterator$h=function(e,t){var r=arguments.length<2?getIteratorMethod$j(e):t;if(aCallable$D(r))return anObject$M(call$15(r,e));throw $TypeError$L(tryToString$k(e)+" is not iterable")},call$14=functionCall$2,anObject$L=anObject$S,getMethod$b=getMethod$e,iteratorClose$7=function(e,t,r){var n,o;anObject$L(e);try{if(!(n=getMethod$b(e,"return"))){if("throw"===t)throw r;return r}n=call$14(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$L(n),r},bind$D=functionBindContext$2,call$13=functionCall$2,anObject$K=anObject$S,tryToString$j=tryToString$m,isArrayIteratorMethod$8=isArrayIteratorMethod$9,lengthOfArrayLike$F=lengthOfArrayLike$J,isPrototypeOf$B=objectIsPrototypeOf$2,getIterator$g=getIterator$h,getIteratorMethod$i=getIteratorMethod$k,iteratorClose$6=iteratorClose$7,$TypeError$K=TypeError,Result$2=function(e,t){this.stopped=e,this.result=t},ResultPrototype$2=Result$2.prototype,iterate$v=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),f=bind$D(t,u),h=function(e){return n&&iteratorClose$6(n,"normal",e),new Result$2(!0,e)},m=function(e){return $?(anObject$K(e),y?f(e[0],e[1],h):f(e[0],e[1])):y?f(e,h):f(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(o=getIteratorMethod$i(e)))throw $TypeError$K(tryToString$j(e)+" is not iterable");if(isArrayIteratorMethod$8(o)){for(i=0,a=lengthOfArrayLike$F(e);a>i;i++)if((s=m(e[i]))&&isPrototypeOf$B(ResultPrototype$2,s))return s;return new Result$2(!1)}n=getIterator$g(e,o)}for(l=d?e.next:n.next;!(c=call$13(l,n)).done;){try{s=m(c.value)}catch(e){iteratorClose$6(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$B(ResultPrototype$2,s))return s}return new Result$2(!1)},toString$J=toString$M,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$J(e)},$$2x=_export$2,isPrototypeOf$A=objectIsPrototypeOf$2,getPrototypeOf$f=objectGetPrototypeOf$2,setPrototypeOf$j=objectSetPrototypeOf$2,copyConstructorProperties$6=copyConstructorProperties$7,create$m=objectCreate$2,createNonEnumerableProperty$k=createNonEnumerableProperty$s,createPropertyDescriptor$g=createPropertyDescriptor$m,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$u=iterate$v,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$$=wellKnownSymbol$1c,TO_STRING_TAG$a=wellKnownSymbol$$("toStringTag"),$Error=Error,push$t=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$A(AggregateErrorPrototype,this);setPrototypeOf$j?r=setPrototypeOf$j($Error(),n?getPrototypeOf$f(this):AggregateErrorPrototype):(r=n?this:create$m(AggregateErrorPrototype),createNonEnumerableProperty$k(r,TO_STRING_TAG$a,"Error")),void 0!==t&&createNonEnumerableProperty$k(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var o=[];return iterate$u(e,push$t,{that:o}),createNonEnumerableProperty$k(r,"errors",o),r};setPrototypeOf$j?setPrototypeOf$j($AggregateError,$Error):copyConstructorProperties$6($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$m($Error.prototype,{constructor:createPropertyDescriptor$g(1,$AggregateError),message:createPropertyDescriptor$g(1,""),name:createPropertyDescriptor$g(1,"AggregateError")});$$2x({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location$2,defer$2,channel$2,port$2,classof$C=classofRaw$8,engineIsNode$2="undefined"!=typeof process&&"process"==classof$C(process),defineProperty$z=objectDefineProperty$2,defineBuiltInAccessor$e=function(e,t,r){return defineProperty$z.f(e,t,r)},getBuiltIn$x=getBuiltIn$D,defineBuiltInAccessor$d=defineBuiltInAccessor$e,wellKnownSymbol$_=wellKnownSymbol$1c,DESCRIPTORS$S=descriptors$2,SPECIES$g=wellKnownSymbol$_("species"),setSpecies$b=function(e){var t=getBuiltIn$x(e);DESCRIPTORS$S&&t&&!t[SPECIES$g]&&defineBuiltInAccessor$d(t,SPECIES$g,{configurable:!0,get:function(){return this}})},isPrototypeOf$z=objectIsPrototypeOf$2,$TypeError$J=TypeError,anInstance$j=function(e,t){if(isPrototypeOf$z(t,e))return e;throw $TypeError$J("Incorrect invocation")},isConstructor$b=isConstructor$d,tryToString$i=tryToString$m,$TypeError$I=TypeError,aConstructor$a=function(e){if(isConstructor$b(e))return e;throw $TypeError$I(tryToString$i(e)+" is not a constructor")},anObject$J=anObject$S,aConstructor$9=aConstructor$a,isNullOrUndefined$j=isNullOrUndefined$n,wellKnownSymbol$Z=wellKnownSymbol$1c,SPECIES$f=wellKnownSymbol$Z("species"),speciesConstructor$c=function(e,t){var r,n=anObject$J(e).constructor;return void 0===n||isNullOrUndefined$j(r=anObject$J(n)[SPECIES$f])?t:aConstructor$9(r)},userAgent$j=engineUserAgent$2,engineIsIos$2=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$j),global$1t=global$1I,apply$i=functionApply$2,bind$C=functionBindContext$2,isCallable$11=isCallable$1j,hasOwn$P=hasOwnProperty_1$2,fails$1K=fails$20,html$6=html$8,arraySlice$q=arraySlice$u,createElement$4=documentCreateElement$7,validateArgumentsLength$b=validateArgumentsLength$d,IS_IOS$5=engineIsIos$2,IS_NODE$d=engineIsNode$2,set$c=global$1t.setImmediate,clear$2=global$1t.clearImmediate,process$c=global$1t.process,Dispatch$2=global$1t.Dispatch,Function$5=global$1t.Function,MessageChannel$2=global$1t.MessageChannel,String$3=global$1t.String,counter$2=0,queue$7={},ONREADYSTATECHANGE$2="onreadystatechange";fails$1K((function(){$location$2=global$1t.location}));var run$2=function(e){if(hasOwn$P(queue$7,e)){var t=queue$7[e];delete queue$7[e],t()}},runner$2=function(e){return function(){run$2(e)}},eventListener$1=function(e){run$2(e.data)},globalPostMessageDefer$1=function(e){global$1t.postMessage(String$3(e),$location$2.protocol+"//"+$location$2.host)};set$c&&clear$2||(set$c=function(e){validateArgumentsLength$b(arguments.length,1);var t=isCallable$11(e)?e:Function$5(e),r=arraySlice$q(arguments,1);return queue$7[++counter$2]=function(){apply$i(t,void 0,r)},defer$2(counter$2),counter$2},clear$2=function(e){delete queue$7[e]},IS_NODE$d?defer$2=function(e){process$c.nextTick(runner$2(e))}:Dispatch$2&&Dispatch$2.now?defer$2=function(e){Dispatch$2.now(runner$2(e))}:MessageChannel$2&&!IS_IOS$5?(port$2=(channel$2=new MessageChannel$2).port2,channel$2.port1.onmessage=eventListener$1,defer$2=bind$C(port$2.postMessage,port$2)):global$1t.addEventListener&&isCallable$11(global$1t.postMessage)&&!global$1t.importScripts&&$location$2&&"file:"!==$location$2.protocol&&!fails$1K(globalPostMessageDefer$1)?(defer$2=globalPostMessageDefer$1,global$1t.addEventListener("message",eventListener$1,!1)):defer$2=ONREADYSTATECHANGE$2 in createElement$4("script")?function(e){html$6.appendChild(createElement$4("script"))[ONREADYSTATECHANGE$2]=function(){html$6.removeChild(this),run$2(e)}}:function(e){setTimeout(runner$2(e),0)});var task$5={set:set$c,clear:clear$2},Queue$7=function(){this.head=null,this.tail=null};Queue$7.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$5,toggle$2,node$2,promise$8,then$2,queue$6=Queue$7,userAgent$i=engineUserAgent$2,engineIsIosPebble$2=/ipad|iphone|ipod/i.test(userAgent$i)&&"undefined"!=typeof Pebble,userAgent$h=engineUserAgent$2,engineIsWebosWebkit$2=/web0s(?!.*chrome)/i.test(userAgent$h),global$1s=global$1I,bind$B=functionBindContext$2,getOwnPropertyDescriptor$k=objectGetOwnPropertyDescriptor$2.f,macrotask$2=task$5.set,Queue$6=queue$6,IS_IOS$4=engineIsIos$2,IS_IOS_PEBBLE$2=engineIsIosPebble$2,IS_WEBOS_WEBKIT$2=engineIsWebosWebkit$2,IS_NODE$c=engineIsNode$2,MutationObserver$2=global$1s.MutationObserver||global$1s.WebKitMutationObserver,document$8=global$1s.document,process$b=global$1s.process,Promise$3=global$1s.Promise,queueMicrotaskDescriptor$2=getOwnPropertyDescriptor$k(global$1s,"queueMicrotask"),microtask$5=queueMicrotaskDescriptor$2&&queueMicrotaskDescriptor$2.value;if(!microtask$5){var queue$5=new Queue$6,flush$2=function(){var e,t;for(IS_NODE$c&&(e=process$b.domain)&&e.exit();t=queue$5.get();)try{t()}catch(e){throw queue$5.head&¬ify$5(),e}e&&e.enter()};IS_IOS$4||IS_NODE$c||IS_WEBOS_WEBKIT$2||!MutationObserver$2||!document$8?!IS_IOS_PEBBLE$2&&Promise$3&&Promise$3.resolve?((promise$8=Promise$3.resolve(void 0)).constructor=Promise$3,then$2=bind$B(promise$8.then,promise$8),notify$5=function(){then$2(flush$2)}):IS_NODE$c?notify$5=function(){process$b.nextTick(flush$2)}:(macrotask$2=bind$B(macrotask$2,global$1s),notify$5=function(){macrotask$2(flush$2)}):(toggle$2=!0,node$2=document$8.createTextNode(""),new MutationObserver$2(flush$2).observe(node$2,{characterData:!0}),notify$5=function(){node$2.data=toggle$2=!toggle$2}),microtask$5=function(e){queue$5.head||notify$5(),queue$5.add(e)}}var microtask_1$1=microtask$5,hostReportErrors$5=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$e=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$1r=global$1I,promiseNativeConstructor$2=global$1r.Promise,engineIsDeno$2="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$5=engineIsDeno$2,IS_NODE$b=engineIsNode$2,engineIsBrowser$2=!IS_DENO$5&&!IS_NODE$b&&"object"==typeof window&&"object"==typeof document,global$1q=global$1I,NativePromiseConstructor$e=promiseNativeConstructor$2,isCallable$10=isCallable$1j,isForced$a=isForced_1$2,inspectSource$8=inspectSource$a,wellKnownSymbol$Y=wellKnownSymbol$1c,IS_BROWSER$2=engineIsBrowser$2,IS_DENO$4=engineIsDeno$2,V8_VERSION$7=engineV8Version$2,NativePromisePrototype$7=NativePromiseConstructor$e&&NativePromiseConstructor$e.prototype,SPECIES$e=wellKnownSymbol$Y("species"),SUBCLASSING$2=!1,NATIVE_PROMISE_REJECTION_EVENT$5=isCallable$10(global$1q.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$h=isForced$a("Promise",(function(){var e=inspectSource$8(NativePromiseConstructor$e),t=e!==String(NativePromiseConstructor$e);if(!t&&66===V8_VERSION$7)return!0;if(!NativePromisePrototype$7.catch||!NativePromisePrototype$7.finally)return!0;if(!V8_VERSION$7||V8_VERSION$7<51||!/native code/.test(e)){var r=new NativePromiseConstructor$e((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$e]=n,!(SUBCLASSING$2=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER$2||IS_DENO$4)&&!NATIVE_PROMISE_REJECTION_EVENT$5})),promiseConstructorDetection$2={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$h,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$5,SUBCLASSING:SUBCLASSING$2},newPromiseCapability$8={},aCallable$C=aCallable$I,$TypeError$H=TypeError,PromiseCapability$2=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$H("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$C(t),this.reject=aCallable$C(r)};newPromiseCapability$8.f=function(e){return new PromiseCapability$2(e)};var $$2w=_export$2,IS_NODE$a=engineIsNode$2,global$1p=global$1I,call$12=functionCall$2,defineBuiltIn$A=defineBuiltIn$D,setToStringTag$l=setToStringTag$o,setSpecies$a=setSpecies$b,aCallable$B=aCallable$I,isCallable$$=isCallable$1j,isObject$U=isObject$13,anInstance$i=anInstance$j,speciesConstructor$b=speciesConstructor$c,task$4=task$5.set,microtask$4=microtask_1$1,hostReportErrors$4=hostReportErrors$5,perform$d=perform$e,Queue$5=queue$6,InternalStateModule$p=internalState$2,NativePromiseConstructor$d=promiseNativeConstructor$2,PromiseConstructorDetection$2=promiseConstructorDetection$2,newPromiseCapabilityModule$e=newPromiseCapability$8,PROMISE$2="Promise",FORCED_PROMISE_CONSTRUCTOR$g=PromiseConstructorDetection$2.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT$4=PromiseConstructorDetection$2.REJECTION_EVENT;PromiseConstructorDetection$2.SUBCLASSING;var Internal$2,OwnPromiseCapability$2,PromiseWrapper$2,getInternalPromiseState$2=InternalStateModule$p.getterFor(PROMISE$2),setInternalState$l=InternalStateModule$p.set,NativePromisePrototype$6=NativePromiseConstructor$d&&NativePromiseConstructor$d.prototype,PromiseConstructor$2=NativePromiseConstructor$d,PromisePrototype$2=NativePromisePrototype$6,TypeError$f=global$1p.TypeError,document$7=global$1p.document,process$a=global$1p.process,newPromiseCapability$7=newPromiseCapabilityModule$e.f,newGenericPromiseCapability$2=newPromiseCapability$7,DISPATCH_EVENT$2=!!(document$7&&document$7.createEvent&&global$1p.dispatchEvent),UNHANDLED_REJECTION$2="unhandledrejection",REJECTION_HANDLED$2="rejectionhandled",PENDING$2=0,FULFILLED$2=1,REJECTED$2=2,HANDLED$2=1,UNHANDLED$2=2,isThenable$2=function(e){var t;return!(!isObject$U(e)||!isCallable$$(t=e.then))&&t},callReaction$2=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED$2,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED$2&&onHandleUnhandled$2(t),t.rejection=HANDLED$2),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),o=!0)),r===e.promise?c(TypeError$f("Promise-chain cycle")):(n=isThenable$2(r))?call$12(n,r,l,c):l(r)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}},notify$4=function(e,t){e.notified||(e.notified=!0,microtask$4((function(){for(var r,n=e.reactions;r=n.get();)callReaction$2(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled$2(e)})))},dispatchEvent$2=function(e,t,r){var n,o;DISPATCH_EVENT$2?((n=document$7.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$1p.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT$4&&(o=global$1p["on"+e])?o(n):e===UNHANDLED_REJECTION$2&&hostReportErrors$4("Unhandled promise rejection",r)},onUnhandled$2=function(e){call$12(task$4,global$1p,(function(){var t,r=e.facade,n=e.value;if(isUnhandled$2(e)&&(t=perform$d((function(){IS_NODE$a?process$a.emit("unhandledRejection",n,r):dispatchEvent$2(UNHANDLED_REJECTION$2,r,n)})),e.rejection=IS_NODE$a||isUnhandled$2(e)?UNHANDLED$2:HANDLED$2,t.error))throw t.value}))},isUnhandled$2=function(e){return e.rejection!==HANDLED$2&&!e.parent},onHandleUnhandled$2=function(e){call$12(task$4,global$1p,(function(){var t=e.facade;IS_NODE$a?process$a.emit("rejectionHandled",t):dispatchEvent$2(REJECTION_HANDLED$2,t,e.value)}))},bind$A=function(e,t,r){return function(n){e(t,n,r)}},internalReject$2=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED$2,notify$4(e,!0))},internalResolve$2=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$f("Promise can't be resolved itself");var n=isThenable$2(t);n?microtask$4((function(){var r={done:!1};try{call$12(n,t,bind$A(internalResolve$2,r,e),bind$A(internalReject$2,r,e))}catch(t){internalReject$2(r,t,e)}})):(e.value=t,e.state=FULFILLED$2,notify$4(e,!1))}catch(t){internalReject$2({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$g&&(PromisePrototype$2=(PromiseConstructor$2=function(e){anInstance$i(this,PromisePrototype$2),aCallable$B(e),call$12(Internal$2,this);var t=getInternalPromiseState$2(this);try{e(bind$A(internalResolve$2,t),bind$A(internalReject$2,t))}catch(e){internalReject$2(t,e)}}).prototype,(Internal$2=function(e){setInternalState$l(this,{type:PROMISE$2,done:!1,notified:!1,parent:!1,reactions:new Queue$5,rejection:!1,state:PENDING$2,value:void 0})}).prototype=defineBuiltIn$A(PromisePrototype$2,"then",(function(e,t){var r=getInternalPromiseState$2(this),n=newPromiseCapability$7(speciesConstructor$b(this,PromiseConstructor$2));return r.parent=!0,n.ok=!isCallable$$(e)||e,n.fail=isCallable$$(t)&&t,n.domain=IS_NODE$a?process$a.domain:void 0,r.state==PENDING$2?r.reactions.add(n):microtask$4((function(){callReaction$2(n,r)})),n.promise})),OwnPromiseCapability$2=function(){var e=new Internal$2,t=getInternalPromiseState$2(e);this.promise=e,this.resolve=bind$A(internalResolve$2,t),this.reject=bind$A(internalReject$2,t)},newPromiseCapabilityModule$e.f=newPromiseCapability$7=function(e){return e===PromiseConstructor$2||e===PromiseWrapper$2?new OwnPromiseCapability$2(e):newGenericPromiseCapability$2(e)}),$$2w({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$g},{Promise:PromiseConstructor$2}),setToStringTag$l(PromiseConstructor$2,PROMISE$2,!1,!0),setSpecies$a(PROMISE$2);var wellKnownSymbol$X=wellKnownSymbol$1c,ITERATOR$o=wellKnownSymbol$X("iterator"),SAFE_CLOSING$2=!1;try{var called$2=0,iteratorWithReturn$2={next:function(){return{done:!!called$2++}},return:function(){SAFE_CLOSING$2=!0}};iteratorWithReturn$2[ITERATOR$o]=function(){return this},Array.from(iteratorWithReturn$2,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$b=function(e,t){if(!t&&!SAFE_CLOSING$2)return!1;var r=!1;try{var n={};n[ITERATOR$o]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$c=promiseNativeConstructor$2,checkCorrectnessOfIteration$a=checkCorrectnessOfIteration$b,FORCED_PROMISE_CONSTRUCTOR$f=promiseConstructorDetection$2.CONSTRUCTOR,promiseStaticsIncorrectIteration$2=FORCED_PROMISE_CONSTRUCTOR$f||!checkCorrectnessOfIteration$a((function(e){NativePromiseConstructor$c.all(e).then(void 0,(function(){}))})),$$2v=_export$2,call$11=functionCall$2,aCallable$A=aCallable$I,newPromiseCapabilityModule$d=newPromiseCapability$8,perform$c=perform$e,iterate$t=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$7=promiseStaticsIncorrectIteration$2;$$2v({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$7},{all:function(e){var t=this,r=newPromiseCapabilityModule$d.f(t),n=r.resolve,o=r.reject,i=perform$c((function(){var r=aCallable$A(t.resolve),i=[],a=0,s=1;iterate$t(e,(function(e){var l=a++,c=!1;s++,call$11(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 $$2u=_export$2,FORCED_PROMISE_CONSTRUCTOR$e=promiseConstructorDetection$2.CONSTRUCTOR,NativePromiseConstructor$b=promiseNativeConstructor$2;promiseNativeConstructor$2&&promiseNativeConstructor$2.prototype,$$2u({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$e,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$2t=_export$2,call$10=functionCall$2,aCallable$z=aCallable$I,newPromiseCapabilityModule$c=newPromiseCapability$8,perform$b=perform$e,iterate$s=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$6=promiseStaticsIncorrectIteration$2;$$2t({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$6},{race:function(e){var t=this,r=newPromiseCapabilityModule$c.f(t),n=r.reject,o=perform$b((function(){var o=aCallable$z(t.resolve);iterate$s(e,(function(e){call$10(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$2s=_export$2,call$$=functionCall$2,newPromiseCapabilityModule$b=newPromiseCapability$8,FORCED_PROMISE_CONSTRUCTOR$d=promiseConstructorDetection$2.CONSTRUCTOR;$$2s({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$d},{reject:function(e){var t=newPromiseCapabilityModule$b.f(this);return call$$(t.reject,void 0,e),t.promise}});var anObject$I=anObject$S,isObject$T=isObject$13,newPromiseCapability$6=newPromiseCapability$8,promiseResolve$7=function(e,t){if(anObject$I(e),isObject$T(t)&&t.constructor===e)return t;var r=newPromiseCapability$6.f(e);return(0,r.resolve)(t),r.promise},$$2r=_export$2,getBuiltIn$w=getBuiltIn$D,IS_PURE$3=isPure$2,NativePromiseConstructor$a=promiseNativeConstructor$2,FORCED_PROMISE_CONSTRUCTOR$c=promiseConstructorDetection$2.CONSTRUCTOR,promiseResolve$6=promiseResolve$7,PromiseConstructorWrapper=getBuiltIn$w("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR$c;$$2r({target:"Promise",stat:!0,forced:IS_PURE$3},{resolve:function(e){return promiseResolve$6(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$a:this,e)}});var $$2q=_export$2,call$_=functionCall$2,aCallable$y=aCallable$I,newPromiseCapabilityModule$a=newPromiseCapability$8,perform$a=perform$e,iterate$r=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$5=promiseStaticsIncorrectIteration$2;$$2q({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$5},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$a.f(t),n=r.resolve,o=r.reject,i=perform$a((function(){var r=aCallable$y(t.resolve),o=[],i=0,a=1;iterate$r(e,(function(e){var s=i++,l=!1;a++,call$_(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 $$2p=_export$2,call$Z=functionCall$2,aCallable$x=aCallable$I,getBuiltIn$v=getBuiltIn$D,newPromiseCapabilityModule$9=newPromiseCapability$8,perform$9=perform$e,iterate$q=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$4=promiseStaticsIncorrectIteration$2,PROMISE_ANY_ERROR="No one promise resolved";$$2p({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$4},{any:function(e){var t=this,r=getBuiltIn$v("AggregateError"),n=newPromiseCapabilityModule$9.f(t),o=n.resolve,i=n.reject,a=perform$9((function(){var n=aCallable$x(t.resolve),a=[],s=0,l=1,c=!1;iterate$q(e,(function(e){var u=s++,$=!1;l++,call$Z(n,t,e).then((function(e){$||c||(c=!0,o(e))}),(function(e){$||c||($=!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 $$2o=_export$2,NativePromiseConstructor$9=promiseNativeConstructor$2,fails$1J=fails$20,getBuiltIn$u=getBuiltIn$D,isCallable$_=isCallable$1j,speciesConstructor$a=speciesConstructor$c,promiseResolve$5=promiseResolve$7,NativePromisePrototype$5=NativePromiseConstructor$9&&NativePromiseConstructor$9.prototype,NON_GENERIC$1=!!NativePromiseConstructor$9&&fails$1J((function(){NativePromisePrototype$5.finally.call({then:function(){}},(function(){}))}));$$2o({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC$1},{finally:function(e){var t=speciesConstructor$a(this,getBuiltIn$u("Promise")),r=isCallable$_(e);return this.then(r?function(r){return promiseResolve$5(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve$5(t,e()).then((function(){throw r}))}:e)}});var uncurryThis$1I=functionUncurryThis$2,toIntegerOrInfinity$p=toIntegerOrInfinity$s,toString$I=toString$M,requireObjectCoercible$n=requireObjectCoercible$q,charAt$g=uncurryThis$1I("".charAt),charCodeAt$7=uncurryThis$1I("".charCodeAt),stringSlice$k=uncurryThis$1I("".slice),createMethod$h=function(e){return function(t,r){var n,o,i=toString$I(requireObjectCoercible$n(t)),a=toIntegerOrInfinity$p(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$7(i,a))<55296||n>56319||a+1===s||(o=charCodeAt$7(i,a+1))<56320||o>57343?e?charAt$g(i,a):n:e?stringSlice$k(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte$2={codeAt:createMethod$h(!1),charAt:createMethod$h(!0)},charAt$f=stringMultibyte$2.charAt,toString$H=toString$M,InternalStateModule$o=internalState$2,defineIterator$7=iteratorDefine$2,createIterResultObject$9=createIterResultObject$b,STRING_ITERATOR$2="String Iterator",setInternalState$k=InternalStateModule$o.set,getInternalState$e=InternalStateModule$o.getterFor(STRING_ITERATOR$2);defineIterator$7(String,"String",(function(e){setInternalState$k(this,{type:STRING_ITERATOR$2,string:toString$H(e),index:0})}),(function(){var e,t=getInternalState$e(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$9(void 0,!0):(e=charAt$f(r,n),t.index+=e.length,createIterResultObject$9(e,!1))}));var path$u=path$C,promise$7=path$u.Promise,parent$2b=promise$7,promise$6=parent$2b,parent$2a=promise$6,promise$5=parent$2a,$$2n=_export$2,newPromiseCapabilityModule$8=newPromiseCapability$8,perform$8=perform$e;$$2n({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule$8.f(this),r=perform$8(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$29=promise$5,promise$4=parent$29,promise$3=promise$4,promise$2=promise$3,_Promise=getDefaultExportFromCjs(promise$2),DESCRIPTORS$R=descriptors$2,isArray$j=isArray$n,$TypeError$G=TypeError,getOwnPropertyDescriptor$j=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET$1=DESCRIPTORS$R&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength$1=SILENT_ON_NON_WRITABLE_LENGTH_SET$1?function(e,t){if(isArray$j(e)&&!getOwnPropertyDescriptor$j(e,"length").writable)throw $TypeError$G("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$h=tryToString$m,$TypeError$F=TypeError,deletePropertyOrThrow$9=function(e,t){if(!delete e[t])throw $TypeError$F("Cannot delete property "+tryToString$h(t)+" of "+tryToString$h(e))},$$2m=_export$2,toObject$y=toObject$F,toAbsoluteIndex$j=toAbsoluteIndex$l,toIntegerOrInfinity$o=toIntegerOrInfinity$s,lengthOfArrayLike$E=lengthOfArrayLike$J,setArrayLength$2=arraySetLength$1,doesNotExceedSafeInteger$4=doesNotExceedSafeInteger$6,arraySpeciesCreate$6=arraySpeciesCreate$9,createProperty$d=createProperty$f,deletePropertyOrThrow$8=deletePropertyOrThrow$9,arrayMethodHasSpeciesSupport$a=arrayMethodHasSpeciesSupport$e,HAS_SPECIES_SUPPORT$7=arrayMethodHasSpeciesSupport$a("splice"),max$a=Math.max,min$e=Math.min;$$2m({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$7},{splice:function(e,t){var r,n,o,i,a,s,l=toObject$y(this),c=lengthOfArrayLike$E(l),u=toAbsoluteIndex$j(e,c),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=c-u):(r=$-2,n=min$e(max$a(toIntegerOrInfinity$o(t),0),c-u)),doesNotExceedSafeInteger$4(c+r-n),o=arraySpeciesCreate$6(l,n),i=0;i<n;i++)(a=u+i)in l&&createProperty$d(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$8(l,s);for(i=c;i>c-n+r;i--)deletePropertyOrThrow$8(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$8(l,s);for(i=0;i<r;i++)l[i+u]=arguments[i+2];return setArrayLength$2(l,c-n+r),o}});var entryVirtual$g=entryVirtual$o,splice$8=entryVirtual$g("Array").splice,isPrototypeOf$y=objectIsPrototypeOf$2,method$h=splice$8,ArrayPrototype$g=Array.prototype,splice$7=function(e){var t=e.splice;return e===ArrayPrototype$g||isPrototypeOf$y(ArrayPrototype$g,e)&&t===ArrayPrototype$g.splice?method$h:t},parent$28=splice$7,splice$6=parent$28,parent$27=splice$6,splice$5=parent$27,parent$26=splice$5,splice$4=parent$26,splice$3=splice$4,splice$2=splice$3,_spliceInstanceProperty=getDefaultExportFromCjs(splice$2),whitespaces$d="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$1H=functionUncurryThis$2,requireObjectCoercible$m=requireObjectCoercible$q,toString$G=toString$M,whitespaces$c=whitespaces$d,replace$d=uncurryThis$1H("".replace),ltrim$2=RegExp("^["+whitespaces$c+"]+"),rtrim$2=RegExp("(^|[^"+whitespaces$c+"])["+whitespaces$c+"]+$"),createMethod$g=function(e){return function(t){var r=toString$G(requireObjectCoercible$m(t));return 1&e&&(r=replace$d(r,ltrim$2,"")),2&e&&(r=replace$d(r,rtrim$2,"$1")),r}},stringTrim$2={start:createMethod$g(1),end:createMethod$g(2),trim:createMethod$g(3)},global$1o=global$1I,fails$1I=fails$20,uncurryThis$1G=functionUncurryThis$2,toString$F=toString$M,trim$e=stringTrim$2.trim,whitespaces$b=whitespaces$d,$parseInt$5=global$1o.parseInt,Symbol$a=global$1o.Symbol,ITERATOR$n=Symbol$a&&Symbol$a.iterator,hex$2=/^[+-]?0x/i,exec$b=uncurryThis$1G(hex$2.exec),FORCED$u=8!==$parseInt$5(whitespaces$b+"08")||22!==$parseInt$5(whitespaces$b+"0x16")||ITERATOR$n&&!fails$1I((function(){$parseInt$5(Object(ITERATOR$n))})),numberParseInt$2=FORCED$u?function(e,t){var r=trim$e(toString$F(e));return $parseInt$5(r,t>>>0||(exec$b(hex$2,r)?16:10))}:$parseInt$5,$$2l=_export$2,$parseInt$4=numberParseInt$2;$$2l({global:!0,forced:parseInt!=numberParseInt$2},{parseInt:numberParseInt$2});var path$t=path$C,_parseInt$6=path$t.parseInt,parent$25=_parseInt$6,_parseInt$5=parent$25,parent$24=_parseInt$5,_parseInt$4=parent$24,parent$23=_parseInt$4,_parseInt$3=parent$23,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),objectGetOwnPropertyNamesExternal$2={},toAbsoluteIndex$i=toAbsoluteIndex$l,lengthOfArrayLike$D=lengthOfArrayLike$J,createProperty$c=createProperty$f,$Array$b=Array,max$9=Math.max,arraySliceSimple$2=function(e,t,r){for(var n=lengthOfArrayLike$D(e),o=toAbsoluteIndex$i(t,n),i=toAbsoluteIndex$i(void 0===r?n:r,n),a=$Array$b(max$9(i-o,0)),s=0;o<i;o++,s++)createProperty$c(a,s,e[o]);return a.length=s,a},classof$B=classofRaw$8,toIndexedObject$u=toIndexedObject$A,$getOwnPropertyNames$4=objectGetOwnPropertyNames$2.f,arraySlice$p=arraySliceSimple$2,windowNames$2="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames$2=function(e){try{return $getOwnPropertyNames$4(e)}catch(e){return arraySlice$p(windowNames$2)}};objectGetOwnPropertyNamesExternal$2.f=function(e){return windowNames$2&&"Window"==classof$B(e)?getWindowNames$2(e):$getOwnPropertyNames$4(toIndexedObject$u(e))};var wellKnownSymbolWrapped$1={},wellKnownSymbol$W=wellKnownSymbol$1c;wellKnownSymbolWrapped$1.f=wellKnownSymbol$W;var path$s=path$C,hasOwn$O=hasOwnProperty_1$2,wrappedWellKnownSymbolModule$3=wellKnownSymbolWrapped$1,defineProperty$y=objectDefineProperty$2.f,wellKnownSymbolDefine$1=function(e){var t=path$s.Symbol||(path$s.Symbol={});hasOwn$O(t,e)||defineProperty$y(t,e,{value:wrappedWellKnownSymbolModule$3.f(e)})},call$Y=functionCall$2,getBuiltIn$t=getBuiltIn$D,wellKnownSymbol$V=wellKnownSymbol$1c,defineBuiltIn$z=defineBuiltIn$D,symbolDefineToPrimitive$1=function(){var e=getBuiltIn$t("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$V("toPrimitive");t&&!t[n]&&defineBuiltIn$z(t,n,(function(e){return call$Y(r,this)}),{arity:1})},$$2k=_export$2,global$1n=global$1I,call$X=functionCall$2,uncurryThis$1F=functionUncurryThis$2,DESCRIPTORS$Q=descriptors$2,NATIVE_SYMBOL$b=symbolConstructorDetection$2,fails$1H=fails$20,hasOwn$N=hasOwnProperty_1$2,isPrototypeOf$x=objectIsPrototypeOf$2,anObject$H=anObject$S,toIndexedObject$t=toIndexedObject$A,toPropertyKey$b=toPropertyKey$f,$toString$7=toString$M,createPropertyDescriptor$f=createPropertyDescriptor$m,nativeObjectCreate$1=objectCreate$2,objectKeys$8=objectKeys$b,getOwnPropertyNamesModule$6=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternal$1=objectGetOwnPropertyNamesExternal$2,getOwnPropertySymbolsModule$6=objectGetOwnPropertySymbols$2,getOwnPropertyDescriptorModule$7=objectGetOwnPropertyDescriptor$2,definePropertyModule$e=objectDefineProperty$2,definePropertiesModule$3=objectDefineProperties$2,propertyIsEnumerableModule$4=objectPropertyIsEnumerable$2,defineBuiltIn$y=defineBuiltIn$D,defineBuiltInAccessor$c=defineBuiltInAccessor$e,shared$f=sharedExports$2,sharedKey$9=sharedKey$d,hiddenKeys$e=hiddenKeys$j,uid$c=uid$f,wellKnownSymbol$U=wellKnownSymbol$1c,wrappedWellKnownSymbolModule$2=wellKnownSymbolWrapped$1,defineWellKnownSymbol$m=wellKnownSymbolDefine$1,defineSymbolToPrimitive$2=symbolDefineToPrimitive$1,setToStringTag$k=setToStringTag$o,InternalStateModule$n=internalState$2,$forEach$5=arrayIteration$2.forEach,HIDDEN$1=sharedKey$9("hidden"),SYMBOL$1="Symbol",PROTOTYPE$5="prototype",setInternalState$j=InternalStateModule$n.set,getInternalState$d=InternalStateModule$n.getterFor(SYMBOL$1),ObjectPrototype$9=Object[PROTOTYPE$5],$Symbol$1=global$1n.Symbol,SymbolPrototype$2=$Symbol$1&&$Symbol$1[PROTOTYPE$5],TypeError$e=global$1n.TypeError,QObject$1=global$1n.QObject,nativeGetOwnPropertyDescriptor$5=getOwnPropertyDescriptorModule$7.f,nativeDefineProperty$3=definePropertyModule$e.f,nativeGetOwnPropertyNames$1=getOwnPropertyNamesExternal$1.f,nativePropertyIsEnumerable$1=propertyIsEnumerableModule$4.f,push$s=uncurryThis$1F([].push),AllSymbols$1=shared$f("symbols"),ObjectPrototypeSymbols$1=shared$f("op-symbols"),WellKnownSymbolsStore$4=shared$f("wks"),USE_SETTER$1=!QObject$1||!QObject$1[PROTOTYPE$5]||!QObject$1[PROTOTYPE$5].findChild,setSymbolDescriptor$1=DESCRIPTORS$Q&&fails$1H((function(){return 7!=nativeObjectCreate$1(nativeDefineProperty$3({},"a",{get:function(){return nativeDefineProperty$3(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$5(ObjectPrototype$9,t);n&&delete ObjectPrototype$9[t],nativeDefineProperty$3(e,t,r),n&&e!==ObjectPrototype$9&&nativeDefineProperty$3(ObjectPrototype$9,t,n)}:nativeDefineProperty$3,wrap$2=function(e,t){var r=AllSymbols$1[e]=nativeObjectCreate$1(SymbolPrototype$2);return setInternalState$j(r,{type:SYMBOL$1,tag:e,description:t}),DESCRIPTORS$Q||(r.description=t),r},$defineProperty$3=function(e,t,r){e===ObjectPrototype$9&&$defineProperty$3(ObjectPrototypeSymbols$1,t,r),anObject$H(e);var n=toPropertyKey$b(t);return anObject$H(r),hasOwn$N(AllSymbols$1,n)?(r.enumerable?(hasOwn$N(e,HIDDEN$1)&&e[HIDDEN$1][n]&&(e[HIDDEN$1][n]=!1),r=nativeObjectCreate$1(r,{enumerable:createPropertyDescriptor$f(0,!1)})):(hasOwn$N(e,HIDDEN$1)||nativeDefineProperty$3(e,HIDDEN$1,createPropertyDescriptor$f(1,{})),e[HIDDEN$1][n]=!0),setSymbolDescriptor$1(e,n,r)):nativeDefineProperty$3(e,n,r)},$defineProperties$1=function(e,t){anObject$H(e);var r=toIndexedObject$t(t),n=objectKeys$8(r).concat($getOwnPropertySymbols$1(r));return $forEach$5(n,(function(t){DESCRIPTORS$Q&&!call$X($propertyIsEnumerable$5,r,t)||$defineProperty$3(e,t,r[t])})),e},$create$1=function(e,t){return void 0===t?nativeObjectCreate$1(e):$defineProperties$1(nativeObjectCreate$1(e),t)},$propertyIsEnumerable$5=function(e){var t=toPropertyKey$b(e),r=call$X(nativePropertyIsEnumerable$1,this,t);return!(this===ObjectPrototype$9&&hasOwn$N(AllSymbols$1,t)&&!hasOwn$N(ObjectPrototypeSymbols$1,t))&&(!(r||!hasOwn$N(this,t)||!hasOwn$N(AllSymbols$1,t)||hasOwn$N(this,HIDDEN$1)&&this[HIDDEN$1][t])||r)},$getOwnPropertyDescriptor$5=function(e,t){var r=toIndexedObject$t(e),n=toPropertyKey$b(t);if(r!==ObjectPrototype$9||!hasOwn$N(AllSymbols$1,n)||hasOwn$N(ObjectPrototypeSymbols$1,n)){var o=nativeGetOwnPropertyDescriptor$5(r,n);return!o||!hasOwn$N(AllSymbols$1,n)||hasOwn$N(r,HIDDEN$1)&&r[HIDDEN$1][n]||(o.enumerable=!0),o}},$getOwnPropertyNames$3=function(e){var t=nativeGetOwnPropertyNames$1(toIndexedObject$t(e)),r=[];return $forEach$5(t,(function(e){hasOwn$N(AllSymbols$1,e)||hasOwn$N(hiddenKeys$e,e)||push$s(r,e)})),r},$getOwnPropertySymbols$1=function(e){var t=e===ObjectPrototype$9,r=nativeGetOwnPropertyNames$1(t?ObjectPrototypeSymbols$1:toIndexedObject$t(e)),n=[];return $forEach$5(r,(function(e){!hasOwn$N(AllSymbols$1,e)||t&&!hasOwn$N(ObjectPrototype$9,e)||push$s(n,AllSymbols$1[e])})),n};NATIVE_SYMBOL$b||(defineBuiltIn$y(SymbolPrototype$2=($Symbol$1=function(){if(isPrototypeOf$x(SymbolPrototype$2,this))throw TypeError$e("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$7(arguments[0]):void 0,t=uid$c(e),r=function(e){this===ObjectPrototype$9&&call$X(r,ObjectPrototypeSymbols$1,e),hasOwn$N(this,HIDDEN$1)&&hasOwn$N(this[HIDDEN$1],t)&&(this[HIDDEN$1][t]=!1),setSymbolDescriptor$1(this,t,createPropertyDescriptor$f(1,e))};return DESCRIPTORS$Q&&USE_SETTER$1&&setSymbolDescriptor$1(ObjectPrototype$9,t,{configurable:!0,set:r}),wrap$2(t,e)})[PROTOTYPE$5],"toString",(function(){return getInternalState$d(this).tag})),defineBuiltIn$y($Symbol$1,"withoutSetter",(function(e){return wrap$2(uid$c(e),e)})),propertyIsEnumerableModule$4.f=$propertyIsEnumerable$5,definePropertyModule$e.f=$defineProperty$3,definePropertiesModule$3.f=$defineProperties$1,getOwnPropertyDescriptorModule$7.f=$getOwnPropertyDescriptor$5,getOwnPropertyNamesModule$6.f=getOwnPropertyNamesExternal$1.f=$getOwnPropertyNames$3,getOwnPropertySymbolsModule$6.f=$getOwnPropertySymbols$1,wrappedWellKnownSymbolModule$2.f=function(e){return wrap$2(wellKnownSymbol$U(e),e)},DESCRIPTORS$Q&&defineBuiltInAccessor$c(SymbolPrototype$2,"description",{configurable:!0,get:function(){return getInternalState$d(this).description}})),$$2k({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$b,sham:!NATIVE_SYMBOL$b},{Symbol:$Symbol$1}),$forEach$5(objectKeys$8(WellKnownSymbolsStore$4),(function(e){defineWellKnownSymbol$m(e)})),$$2k({target:SYMBOL$1,stat:!0,forced:!NATIVE_SYMBOL$b},{useSetter:function(){USE_SETTER$1=!0},useSimple:function(){USE_SETTER$1=!1}}),$$2k({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$b,sham:!DESCRIPTORS$Q},{create:$create$1,defineProperty:$defineProperty$3,defineProperties:$defineProperties$1,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$5}),$$2k({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$b},{getOwnPropertyNames:$getOwnPropertyNames$3}),defineSymbolToPrimitive$2(),setToStringTag$k($Symbol$1,SYMBOL$1),hiddenKeys$e[HIDDEN$1]=!0;var NATIVE_SYMBOL$a=symbolConstructorDetection$2,symbolRegistryDetection$1=NATIVE_SYMBOL$a&&!!Symbol.for&&!!Symbol.keyFor,$$2j=_export$2,getBuiltIn$s=getBuiltIn$D,hasOwn$M=hasOwnProperty_1$2,toString$E=toString$M,shared$e=sharedExports$2,NATIVE_SYMBOL_REGISTRY$3=symbolRegistryDetection$1,StringToSymbolRegistry$1=shared$e("string-to-symbol-registry"),SymbolToStringRegistry$3=shared$e("symbol-to-string-registry");$$2j({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$3},{for:function(e){var t=toString$E(e);if(hasOwn$M(StringToSymbolRegistry$1,t))return StringToSymbolRegistry$1[t];var r=getBuiltIn$s("Symbol")(t);return StringToSymbolRegistry$1[t]=r,SymbolToStringRegistry$3[r]=t,r}});var $$2i=_export$2,hasOwn$L=hasOwnProperty_1$2,isSymbol$d=isSymbol$h,tryToString$g=tryToString$m,shared$d=sharedExports$2,NATIVE_SYMBOL_REGISTRY$2=symbolRegistryDetection$1,SymbolToStringRegistry$2=shared$d("symbol-to-string-registry");$$2i({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$2},{keyFor:function(e){if(!isSymbol$d(e))throw TypeError(tryToString$g(e)+" is not a symbol");if(hasOwn$L(SymbolToStringRegistry$2,e))return SymbolToStringRegistry$2[e]}});var $$2h=_export$2,NATIVE_SYMBOL$9=symbolConstructorDetection$2,fails$1G=fails$20,getOwnPropertySymbolsModule$5=objectGetOwnPropertySymbols$2,toObject$x=toObject$F,FORCED$t=!NATIVE_SYMBOL$9||fails$1G((function(){getOwnPropertySymbolsModule$5.f(1)}));$$2h({target:"Object",stat:!0,forced:FORCED$t},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$5.f;return t?t(toObject$x(e)):[]}});var defineWellKnownSymbol$l=wellKnownSymbolDefine$1;defineWellKnownSymbol$l("asyncIterator");var defineWellKnownSymbol$k=wellKnownSymbolDefine$1;defineWellKnownSymbol$k("hasInstance");var defineWellKnownSymbol$j=wellKnownSymbolDefine$1;defineWellKnownSymbol$j("isConcatSpreadable");var defineWellKnownSymbol$i=wellKnownSymbolDefine$1;defineWellKnownSymbol$i("iterator");var defineWellKnownSymbol$h=wellKnownSymbolDefine$1;defineWellKnownSymbol$h("match");var defineWellKnownSymbol$g=wellKnownSymbolDefine$1;defineWellKnownSymbol$g("matchAll");var defineWellKnownSymbol$f=wellKnownSymbolDefine$1;defineWellKnownSymbol$f("replace");var defineWellKnownSymbol$e=wellKnownSymbolDefine$1;defineWellKnownSymbol$e("search");var defineWellKnownSymbol$d=wellKnownSymbolDefine$1;defineWellKnownSymbol$d("species");var defineWellKnownSymbol$c=wellKnownSymbolDefine$1;defineWellKnownSymbol$c("split");var defineWellKnownSymbol$b=wellKnownSymbolDefine$1,defineSymbolToPrimitive$1=symbolDefineToPrimitive$1;defineWellKnownSymbol$b("toPrimitive"),defineSymbolToPrimitive$1();var getBuiltIn$r=getBuiltIn$D,defineWellKnownSymbol$a=wellKnownSymbolDefine$1,setToStringTag$j=setToStringTag$o;defineWellKnownSymbol$a("toStringTag"),setToStringTag$j(getBuiltIn$r("Symbol"),"Symbol");var defineWellKnownSymbol$9=wellKnownSymbolDefine$1;defineWellKnownSymbol$9("unscopables");var global$1m=global$1I,setToStringTag$i=setToStringTag$o;setToStringTag$i(global$1m.JSON,"JSON",!0);var path$r=path$C,symbol$5=path$r.Symbol,parent$22=symbol$5,symbol$4=parent$22,defineWellKnownSymbol$8=wellKnownSymbolDefine$1;defineWellKnownSymbol$8("dispose");var parent$21=symbol$4,symbol$3=parent$21,defineWellKnownSymbol$7=wellKnownSymbolDefine$1;defineWellKnownSymbol$7("asyncDispose");var $$2g=_export$2,getBuiltIn$q=getBuiltIn$D,uncurryThis$1E=functionUncurryThis$2,Symbol$9=getBuiltIn$q("Symbol"),keyFor2=Symbol$9.keyFor,thisSymbolValue$2=uncurryThis$1E(Symbol$9.prototype.valueOf);$$2g({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$2(e))}catch(e){return!1}}});for(var $$2f=_export$2,shared$c=sharedExports$2,getBuiltIn$p=getBuiltIn$D,uncurryThis$1D=functionUncurryThis$2,isSymbol$c=isSymbol$h,wellKnownSymbol$T=wellKnownSymbol$1c,Symbol$8=getBuiltIn$p("Symbol"),$isWellKnown=Symbol$8.isWellKnown,getOwnPropertyNames$6=getBuiltIn$p("Object","getOwnPropertyNames"),thisSymbolValue$1=uncurryThis$1D(Symbol$8.prototype.valueOf),WellKnownSymbolsStore$3=shared$c("wks"),i$2=0,symbolKeys=getOwnPropertyNames$6(Symbol$8),symbolKeysLength=symbolKeys.length;i$2<symbolKeysLength;i$2++)try{var symbolKey=symbolKeys[i$2];isSymbol$c(Symbol$8[symbolKey])&&wellKnownSymbol$T(symbolKey)}catch(e){}$$2f({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue$1(e),r=0,n=getOwnPropertyNames$6(WellKnownSymbolsStore$3),o=n.length;r<o;r++)if(WellKnownSymbolsStore$3[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$6=wellKnownSymbolDefine$1;defineWellKnownSymbol$6("matcher");var defineWellKnownSymbol$5=wellKnownSymbolDefine$1;defineWellKnownSymbol$5("metadataKey");var defineWellKnownSymbol$4=wellKnownSymbolDefine$1;defineWellKnownSymbol$4("observable");var defineWellKnownSymbol$3=wellKnownSymbolDefine$1;defineWellKnownSymbol$3("metadata");var defineWellKnownSymbol$2=wellKnownSymbolDefine$1;defineWellKnownSymbol$2("patternMatch");var defineWellKnownSymbol$1=wellKnownSymbolDefine$1;defineWellKnownSymbol$1("replaceAll");var parent$20=symbol$3,symbol$2=parent$20,symbol$1=symbol$2,_Symbol$1=getDefaultExportFromCjs(symbol$1),WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped$1,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$1$=iterator$5,iterator$4=parent$1$,parent$1_=iterator$4,iterator$3=parent$1_,parent$1Z=iterator$3,iterator$2=parent$1Z,iterator$1=iterator$2,_Symbol$iterator$1=getDefaultExportFromCjs(iterator$1);function _typeof$5(e){return(_typeof$5="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 path$q=path$C,getOwnPropertySymbols$5=path$q.Object.getOwnPropertySymbols,parent$1Y=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1Y,parent$1X=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1X,parent$1W=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1W,getOwnPropertySymbols$1=getOwnPropertySymbols$2,getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),getOwnPropertyDescriptor$i={exports:{}},$$2e=_export$2,fails$1F=fails$20,toIndexedObject$s=toIndexedObject$A,nativeGetOwnPropertyDescriptor$4=objectGetOwnPropertyDescriptor$2.f,DESCRIPTORS$P=descriptors$2,FORCED$s=!DESCRIPTORS$P||fails$1F((function(){nativeGetOwnPropertyDescriptor$4(1)}));$$2e({target:"Object",stat:!0,forced:FORCED$s,sham:!DESCRIPTORS$P},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor$4(toIndexedObject$s(e),t)}});var path$p=path$C,Object$4=path$p.Object,getOwnPropertyDescriptor$h=getOwnPropertyDescriptor$i.exports=function(e,t){return Object$4.getOwnPropertyDescriptor(e,t)};Object$4.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$h.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$i.exports,parent$1V=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$g=parent$1V,parent$1U=getOwnPropertyDescriptor$g,getOwnPropertyDescriptor$f=parent$1U,parent$1T=getOwnPropertyDescriptor$f,getOwnPropertyDescriptor$e=parent$1T,getOwnPropertyDescriptor$d=getOwnPropertyDescriptor$e,_Object$getOwnPropertyDescriptor$1=getDefaultExportFromCjs(getOwnPropertyDescriptor$d),getOwnPropertyDescriptor$c=getOwnPropertyDescriptor$d,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$c),$$2d=_export$2,DESCRIPTORS$O=descriptors$2,ownKeys$8=ownKeys$a,toIndexedObject$r=toIndexedObject$A,getOwnPropertyDescriptorModule$6=objectGetOwnPropertyDescriptor$2,createProperty$b=createProperty$f;$$2d({target:"Object",stat:!0,sham:!DESCRIPTORS$O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$r(e),o=getOwnPropertyDescriptorModule$6.f,i=ownKeys$8(n),a={},s=0;i.length>s;)void 0!==(r=o(n,t=i[s++]))&&createProperty$b(a,t,r);return a}});var path$o=path$C,getOwnPropertyDescriptors$5=path$o.Object.getOwnPropertyDescriptors,parent$1S=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1S,parent$1R=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1R,parent$1Q=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1Q,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$7={exports:{}},$$2c=_export$2,DESCRIPTORS$N=descriptors$2,defineProperties$6=objectDefineProperties$2.f;$$2c({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$N},{defineProperties:defineProperties$6});var path$n=path$C,Object$3=path$n.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$3.defineProperties(e,t)};Object$3.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1P=definePropertiesExports,defineProperties$4=parent$1P,parent$1O=defineProperties$4,defineProperties$3=parent$1O,parent$1N=defineProperties$3,defineProperties$2=parent$1N,defineProperties$1=defineProperties$2,defineProperties4=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties4),defineProperty$x={exports:{}},$$2b=_export$2,DESCRIPTORS$M=descriptors$2,defineProperty$w=objectDefineProperty$2.f;$$2b({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$w,sham:!DESCRIPTORS$M},{defineProperty:defineProperty$w});var path$m=path$C,Object$2=path$m.Object,defineProperty$v=defineProperty$x.exports=function(e,t,r){return Object$2.defineProperty(e,t,r)};Object$2.defineProperty.sham&&(defineProperty$v.sham=!0);var definePropertyExports=defineProperty$x.exports,parent$1M=definePropertyExports,defineProperty$u=parent$1M,parent$1L=defineProperty$u,defineProperty$t=parent$1L,parent$1K=defineProperty$t,defineProperty$s=parent$1K,defineProperty$r=defineProperty$s,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$r),defineProperty$q=defineProperty$r,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$q),symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),$$2a=_export$2,DESCRIPTORS$L=descriptors$2,create$l=objectCreate$2;$$2a({target:"Object",stat:!0,sham:!DESCRIPTORS$L},{create:create$l});var path$l=path$C,Object$1=path$l.Object,create$k=function(e,t){return Object$1.create(e,t)},parent$1J=create$k,create$j=parent$1J,parent$1I=create$j,create$i=parent$1I,parent$1H=create$i,create$h=parent$1H,create$g=create$h,_Object$create$1=getDefaultExportFromCjs(create$g),create$f=create$g,_Object$create=getDefaultExportFromCjs(create$f),$$29=_export$2,fails$1E=fails$20,toObject$w=toObject$F,nativeGetPrototypeOf$1=objectGetPrototypeOf$2,CORRECT_PROTOTYPE_GETTER$3=correctPrototypeGetter$2,FAILS_ON_PRIMITIVES$7=fails$1E((function(){nativeGetPrototypeOf$1(1)}));$$29({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$7,sham:!CORRECT_PROTOTYPE_GETTER$3},{getPrototypeOf:function(e){return nativeGetPrototypeOf$1(toObject$w(e))}});var path$k=path$C,getPrototypeOf$e=path$k.Object.getPrototypeOf,parent$1G=getPrototypeOf$e,getPrototypeOf$d=parent$1G,parent$1F=getPrototypeOf$d,getPrototypeOf$c=parent$1F,parent$1E=getPrototypeOf$c,getPrototypeOf$b=parent$1E,getPrototypeOf$a=getPrototypeOf$b,_Object$getPrototypeOf$1=getDefaultExportFromCjs(getPrototypeOf$a),getPrototypeOf$9=getPrototypeOf$a,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$9),$$28=_export$2,setPrototypeOf$i=objectSetPrototypeOf$2;$$28({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$i});var path$j=path$C,setPrototypeOf$h=path$j.Object.setPrototypeOf,parent$1D=setPrototypeOf$h,setPrototypeOf$g=parent$1D,parent$1C=setPrototypeOf$g,setPrototypeOf$f=parent$1C,parent$1B=setPrototypeOf$f,setPrototypeOf$e=parent$1B,setPrototypeOf$d=setPrototypeOf$e,_Object$setPrototypeOf$1=getDefaultExportFromCjs(setPrototypeOf$d),setPrototypeOf$c=setPrototypeOf$d,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$c),$$27=_export$2,uncurryThis$1C=functionUncurryThis$2,isArray$i=isArray$n,nativeReverse=uncurryThis$1C([].reverse),test$5=[1,2];$$27({target:"Array",proto:!0,forced:String(test$5)===String(test$5.reverse())},{reverse:function(){return isArray$i(this)&&(this.length=this.length),nativeReverse(this)}});var entryVirtual$f=entryVirtual$o,reverse$8=entryVirtual$f("Array").reverse,isPrototypeOf$w=objectIsPrototypeOf$2,method$g=reverse$8,ArrayPrototype$f=Array.prototype,reverse$7=function(e){var t=e.reverse;return e===ArrayPrototype$f||isPrototypeOf$w(ArrayPrototype$f,e)&&t===ArrayPrototype$f.reverse?method$g:t},parent$1A=reverse$7,reverse$6=parent$1A,parent$1z=reverse$6,reverse$5=parent$1z,parent$1y=reverse$5,reverse$4=parent$1y,reverse$3=reverse$4,reverse$2=reverse$3,_reverseInstanceProperty=getDefaultExportFromCjs(reverse$2),$$26=_export$2,isArray$h=isArray$n,isConstructor$a=isConstructor$d,isObject$S=isObject$13,toAbsoluteIndex$h=toAbsoluteIndex$l,lengthOfArrayLike$C=lengthOfArrayLike$J,toIndexedObject$q=toIndexedObject$A,createProperty$a=createProperty$f,wellKnownSymbol$S=wellKnownSymbol$1c,arrayMethodHasSpeciesSupport$9=arrayMethodHasSpeciesSupport$e,nativeSlice$2=arraySlice$u,HAS_SPECIES_SUPPORT$6=arrayMethodHasSpeciesSupport$9("slice"),SPECIES$d=wellKnownSymbol$S("species"),$Array$a=Array,max$8=Math.max;$$26({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$6},{slice:function(e,t){var r,n,o,i=toIndexedObject$q(this),a=lengthOfArrayLike$C(i),s=toAbsoluteIndex$h(e,a),l=toAbsoluteIndex$h(void 0===t?a:t,a);if(isArray$h(i)&&(r=i.constructor,(isConstructor$a(r)&&(r===$Array$a||isArray$h(r.prototype))||isObject$S(r)&&null===(r=r[SPECIES$d]))&&(r=void 0),r===$Array$a||void 0===r))return nativeSlice$2(i,s,l);for(n=new(void 0===r?$Array$a:r)(max$8(l-s,0)),o=0;s<l;s++,o++)s in i&&createProperty$a(n,o,i[s]);return n.length=o,n}});var entryVirtual$e=entryVirtual$o,slice$9=entryVirtual$e("Array").slice,isPrototypeOf$v=objectIsPrototypeOf$2,method$f=slice$9,ArrayPrototype$e=Array.prototype,slice$8=function(e){var t=e.slice;return e===ArrayPrototype$e||isPrototypeOf$v(ArrayPrototype$e,e)&&t===ArrayPrototype$e.slice?method$f:t},parent$1x=slice$8,slice$7=parent$1x,parent$1w=slice$7,slice$6=parent$1w,parent$1v=slice$6,slice$5=parent$1v,slice$4=slice$5,slice$3=slice$4,_sliceInstanceProperty=getDefaultExportFromCjs(slice$3),iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator),$$25=_export$2,getBuiltIn$o=getBuiltIn$D,apply$h=functionApply$2,bind$z=functionBind$2,aConstructor$8=aConstructor$a,anObject$G=anObject$S,isObject$R=isObject$13,create$e=objectCreate$2,fails$1D=fails$20,nativeConstruct$1=getBuiltIn$o("Reflect","construct"),ObjectPrototype$8=Object.prototype,push$r=[].push,NEW_TARGET_BUG$1=fails$1D((function(){function e(){}return!(nativeConstruct$1((function(){}),[],e)instanceof e)})),ARGS_BUG$1=!fails$1D((function(){nativeConstruct$1((function(){}))})),FORCED$r=NEW_TARGET_BUG$1||ARGS_BUG$1;$$25({target:"Reflect",stat:!0,forced:FORCED$r,sham:FORCED$r},{construct:function(e,t){aConstructor$8(e),anObject$G(t);var r=arguments.length<3?e:aConstructor$8(arguments[2]);if(ARGS_BUG$1&&!NEW_TARGET_BUG$1)return nativeConstruct$1(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$h(push$r,n,t),new(apply$h(bind$z,e,n))}var o=r.prototype,i=create$e(isObject$R(o)?o:ObjectPrototype$8),a=apply$h(e,i,t);return isObject$R(a)?a:i}});var path$i=path$C,construct$9=path$i.Reflect.construct,parent$1u=construct$9,construct$8=parent$1u,parent$1t=construct$8,construct$7=parent$1t,parent$1s=construct$7,construct$6=parent$1s,construct$5=construct$6,_Reflect$construct$1=getDefaultExportFromCjs(construct$5),construct$4=construct$5,_Reflect$construct=getDefaultExportFromCjs(construct$4),$$24=_export$2,isArray$g=isArray$n;$$24({target:"Array",stat:!0},{isArray:isArray$g});var path$h=path$C,isArray$f=path$h.Array.isArray,parent$1r=isArray$f,isArray$e=parent$1r,parent$1q=isArray$e,isArray$d=parent$1q,parent$1p=isArray$d,isArray$c=parent$1p,isArray$b=isArray$c,isArray$a=isArray$b,_Array$isArray=getDefaultExportFromCjs(isArray$a),getIteratorMethod$h=getIteratorMethod$k,getIteratorMethod_1=getIteratorMethod$h,parent$1o=getIteratorMethod_1,getIteratorMethod$g=parent$1o,parent$1n=getIteratorMethod$g,getIteratorMethod$f=parent$1n,parent$1m=getIteratorMethod$f,getIteratorMethod$e=parent$1m,getIteratorMethod$d=getIteratorMethod$e,getIteratorMethod$c=getIteratorMethod$d,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$c),anObject$F=anObject$S,iteratorClose$5=iteratorClose$7,callWithSafeIterationClosing$3=function(e,t,r,n){try{return n?t(anObject$F(r)[0],r[1]):t(r)}catch(t){iteratorClose$5(e,"throw",t)}},bind$y=functionBindContext$2,call$W=functionCall$2,toObject$v=toObject$F,callWithSafeIterationClosing$2=callWithSafeIterationClosing$3,isArrayIteratorMethod$7=isArrayIteratorMethod$9,isConstructor$9=isConstructor$d,lengthOfArrayLike$B=lengthOfArrayLike$J,createProperty$9=createProperty$f,getIterator$f=getIterator$h,getIteratorMethod$b=getIteratorMethod$k,$Array$9=Array,arrayFrom$3=function(e){var t=toObject$v(e),r=isConstructor$9(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=bind$y(o,n>2?arguments[2]:void 0));var a,s,l,c,u,$,d=getIteratorMethod$b(t),p=0;if(!d||this===$Array$9&&isArrayIteratorMethod$7(d))for(a=lengthOfArrayLike$B(t),s=r?new this(a):$Array$9(a);a>p;p++)$=i?o(t[p],p):t[p],createProperty$9(s,p,$);else for(u=(c=getIterator$f(t,d)).next,s=r?new this:[];!(l=call$W(u,c)).done;p++)$=i?callWithSafeIterationClosing$2(c,o,[l.value,p],!0):l.value,createProperty$9(s,p,$);return s.length=p,s},$$23=_export$2,from$8=arrayFrom$3,checkCorrectnessOfIteration$9=checkCorrectnessOfIteration$b,INCORRECT_ITERATION$1=!checkCorrectnessOfIteration$9((function(e){Array.from(e)}));$$23({target:"Array",stat:!0,forced:INCORRECT_ITERATION$1},{from:from$8});var path$g=path$C,from$7=path$g.Array.from,parent$1l=from$7,from$6=parent$1l,parent$1k=from$6,from$5=parent$1k,parent$1j=from$5,from$4=parent$1j,from$3=from$4,from$2=from$3,_Array$from=getDefaultExportFromCjs(from$2);function ownKeys$7(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$3(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$7(Object(o),!0)).call(r,(function(t){_defineProperty$5(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys$7(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _regeneratorRuntime$2(){_regeneratorRuntime$2=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 d?t:d,a=_Object$create(i.prototype),s=new _(o||[]);return n(a,"_invoke",{value:S(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 $={};function d(){}function p(){}function y(){}var f={};l(f,i,(function(){return this}));var h=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(P([])));h&&h!==t&&r.call(h,i)&&(f=h);var m=y.prototype=d.prototype=_Object$create(f);function b(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,$=c.value;return $&&"object"==_typeof$5($)&&r.call($,"__await")?t.resolve($.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve($).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 S(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=I(a,r);if(s){if(s===$)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===$)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function I(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method))return $;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return $}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,$;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,$):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,$)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,T,this),this.reset(!0)}function P(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:E}}function E(){return{value:void 0,done:!0}}return p.prototype=y,n(m,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:p,configurable:!0}),p.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"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(m),e},e.awrap=function(e){return{__await:e}},b(g.prototype),l(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise);var a=new g(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(m),l(m,s,"Generator"),l(m,i,(function(){return this})),l(m,"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=P,_.prototype={constructor:_,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,_forEachInstanceProperty(t=this.tryEntries).call(t,v),!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,$):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),$},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),v(r),$}},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;v(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),$}},e}function _typeof$4(e){return(_typeof$4="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$2(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$2(e){return function(){var t=this,r=arguments;return new _Promise((function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep$2(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep$2(i,n,o,a,s,"throw",e)}a(void 0)}))}}function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(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,n.key,n)}}function _createClass$8(e,t,r){return t&&_defineProperties$8(e.prototype,t),r&&_defineProperties$8(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$5(e,t,r){return t in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$5(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$5(e,t)}function _getPrototypeOf$5(e){var t;return(_getPrototypeOf$5=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$5(e,t){var r;return(_setPrototypeOf$5=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$5(){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$5(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$5(e,t){if(t&&("object"===_typeof$5(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$5(e)}function _createSuper$5(e){var t=_isNativeReflectConstruct$5();return function(){var r,n=_getPrototypeOf$5(e);if(t){var o=_getPrototypeOf$5(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$5(this,r)}}function _toConsumableArray$4(e){return _arrayWithoutHoles$4(e)||_iterableToArray$4(e)||_unsupportedIterableToArray$5(e)||_nonIterableSpread$4()}function _arrayWithoutHoles$4(e){if(_Array$isArray(e))return _arrayLikeToArray$5(e)}function _iterableToArray$4(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$5(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$5(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$5(e,t):void 0}}function _arrayLikeToArray$5(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$4(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var check$1=function(e){return e&&e.Math==Math&&e},global$1l=check$1("object"==typeof globalThis&&globalThis)||check$1("object"==typeof window&&window)||check$1("object"==typeof self&&self)||check$1("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor$1={},fails$1C=function(e){try{return!!e()}catch(e){return!0}},fails$1B=fails$1C,descriptors$1=!fails$1B((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),fails$1A=fails$1C,functionBindNative$1=!fails$1A((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$9=functionBindNative$1,call$V=Function.prototype.call,functionCall$1=NATIVE_BIND$9?call$V.bind(call$V):function(){return call$V.apply(call$V,arguments)},objectPropertyIsEnumerable$1={},$propertyIsEnumerable$4={}.propertyIsEnumerable,getOwnPropertyDescriptor$b=Object.getOwnPropertyDescriptor,NASHORN_BUG$1=getOwnPropertyDescriptor$b&&!$propertyIsEnumerable$4.call({1:2},1);objectPropertyIsEnumerable$1.f=NASHORN_BUG$1?function(e){var t=getOwnPropertyDescriptor$b(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$4;var match$1,version$3,createPropertyDescriptor$e=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},NATIVE_BIND$8=functionBindNative$1,FunctionPrototype$6=Function.prototype,call$U=FunctionPrototype$6.call,uncurryThisWithBind$1=NATIVE_BIND$8&&FunctionPrototype$6.bind.bind(call$U,call$U),functionUncurryThis$1=NATIVE_BIND$8?uncurryThisWithBind$1:function(e){return function(){return call$U.apply(e,arguments)}},uncurryThis$1B=functionUncurryThis$1,toString$D=uncurryThis$1B({}.toString),stringSlice$j=uncurryThis$1B("".slice),classofRaw$5=function(e){return stringSlice$j(toString$D(e),8,-1)},uncurryThis$1A=functionUncurryThis$1,fails$1z=fails$1C,classof$A=classofRaw$5,$Object$9=Object,split$7=uncurryThis$1A("".split),indexedObject$1=fails$1z((function(){return!$Object$9("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$A(e)?split$7(e,""):$Object$9(e)}:$Object$9,isNullOrUndefined$i=function(e){return null==e},isNullOrUndefined$h=isNullOrUndefined$i,$TypeError$E=TypeError,requireObjectCoercible$l=function(e){if(isNullOrUndefined$h(e))throw $TypeError$E("Can't call method on "+e);return e},IndexedObject$9=indexedObject$1,requireObjectCoercible$k=requireObjectCoercible$l,toIndexedObject$p=function(e){return IndexedObject$9(requireObjectCoercible$k(e))},documentAll$5="object"==typeof document&&document.all,IS_HTMLDDA$1=void 0===documentAll$5&&void 0!==documentAll$5,documentAll_1$1={all:documentAll$5,IS_HTMLDDA:IS_HTMLDDA$1},$documentAll$3=documentAll_1$1,documentAll$4=$documentAll$3.all,isCallable$Z=$documentAll$3.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$4}:function(e){return"function"==typeof e},isCallable$Y=isCallable$Z,$documentAll$2=documentAll_1$1,documentAll$3=$documentAll$2.all,isObject$Q=$documentAll$2.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$Y(e)||e===documentAll$3}:function(e){return"object"==typeof e?null!==e:isCallable$Y(e)},global$1k=global$1l,isCallable$X=isCallable$Z,aFunction$1=function(e){return isCallable$X(e)?e:void 0},getBuiltIn$n=function(e,t){return arguments.length<2?aFunction$1(global$1k[e]):global$1k[e]&&global$1k[e][t]},uncurryThis$1z=functionUncurryThis$1,objectIsPrototypeOf$1=uncurryThis$1z({}.isPrototypeOf),getBuiltIn$m=getBuiltIn$n,engineUserAgent$1=getBuiltIn$m("navigator","userAgent")||"",global$1j=global$1l,userAgent$g=engineUserAgent$1,process$9=global$1j.process,Deno$2=global$1j.Deno,versions$1=process$9&&process$9.versions||Deno$2&&Deno$2.version,v8$1=versions$1&&versions$1.v8;v8$1&&(version$3=(match$1=v8$1.split("."))[0]>0&&match$1[0]<4?1:+(match$1[0]+match$1[1])),!version$3&&userAgent$g&&(!(match$1=userAgent$g.match(/Edge\/(\d+)/))||match$1[1]>=74)&&(match$1=userAgent$g.match(/Chrome\/(\d+)/))&&(version$3=+match$1[1]);var engineV8Version$1=version$3,V8_VERSION$6=engineV8Version$1,fails$1y=fails$1C,symbolConstructorDetection$1=!!Object.getOwnPropertySymbols&&!fails$1y((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$6&&V8_VERSION$6<41})),NATIVE_SYMBOL$8=symbolConstructorDetection$1,useSymbolAsUid$1=NATIVE_SYMBOL$8&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$l=getBuiltIn$n,isCallable$W=isCallable$Z,isPrototypeOf$u=objectIsPrototypeOf$1,USE_SYMBOL_AS_UID$3=useSymbolAsUid$1,$Object$8=Object,isSymbol$b=USE_SYMBOL_AS_UID$3?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$l("Symbol");return isCallable$W(t)&&isPrototypeOf$u(t.prototype,$Object$8(e))},$String$a=String,tryToString$f=function(e){try{return $String$a(e)}catch(e){return"Object"}},isCallable$V=isCallable$Z,tryToString$e=tryToString$f,$TypeError$D=TypeError,aCallable$w=function(e){if(isCallable$V(e))return e;throw $TypeError$D(tryToString$e(e)+" is not a function")},aCallable$v=aCallable$w,isNullOrUndefined$g=isNullOrUndefined$i,getMethod$a=function(e,t){var r=e[t];return isNullOrUndefined$g(r)?void 0:aCallable$v(r)},call$T=functionCall$1,isCallable$U=isCallable$Z,isObject$P=isObject$Q,$TypeError$C=TypeError,ordinaryToPrimitive$3=function(e,t){var r,n;if("string"===t&&isCallable$U(r=e.toString)&&!isObject$P(n=call$T(r,e)))return n;if(isCallable$U(r=e.valueOf)&&!isObject$P(n=call$T(r,e)))return n;if("string"!==t&&isCallable$U(r=e.toString)&&!isObject$P(n=call$T(r,e)))return n;throw $TypeError$C("Can't convert object to primitive value")},shared$b={exports:{}},isPure$1=!1,global$1i=global$1l,defineProperty$p=Object.defineProperty,defineGlobalProperty$7=function(e,t){try{defineProperty$p(global$1i,e,{value:t,configurable:!0,writable:!0})}catch(r){global$1i[e]=t}return t},global$1h=global$1l,defineGlobalProperty$6=defineGlobalProperty$7,SHARED$1="__core-js_shared__",store$7=global$1h[SHARED$1]||defineGlobalProperty$6(SHARED$1,{}),sharedStore$1=store$7,store$6=sharedStore$1;(shared$b.exports=function(e,t){return store$6[e]||(store$6[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$1=shared$b.exports,requireObjectCoercible$j=requireObjectCoercible$l,$Object$7=Object,toObject$u=function(e){return $Object$7(requireObjectCoercible$j(e))},uncurryThis$1y=functionUncurryThis$1,toObject$t=toObject$u,hasOwnProperty$3=uncurryThis$1y({}.hasOwnProperty),hasOwnProperty_1$1=Object.hasOwn||function(e,t){return hasOwnProperty$3(toObject$t(e),t)},uncurryThis$1x=functionUncurryThis$1,id$4=0,postfix$1=Math.random(),toString$C=uncurryThis$1x(1..toString),uid$b=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$C(++id$4+postfix$1,36)},global$1g=global$1l,shared$a=sharedExports$1,hasOwn$K=hasOwnProperty_1$1,uid$a=uid$b,NATIVE_SYMBOL$7=symbolConstructorDetection$1,USE_SYMBOL_AS_UID$2=useSymbolAsUid$1,WellKnownSymbolsStore$2=shared$a("wks"),Symbol$7=global$1g.Symbol,symbolFor=Symbol$7&&Symbol$7.for,createWellKnownSymbol$1=USE_SYMBOL_AS_UID$2?Symbol$7:Symbol$7&&Symbol$7.withoutSetter||uid$a,wellKnownSymbol$R=function(e){if(!hasOwn$K(WellKnownSymbolsStore$2,e)||!NATIVE_SYMBOL$7&&"string"!=typeof WellKnownSymbolsStore$2[e]){var t="Symbol."+e;NATIVE_SYMBOL$7&&hasOwn$K(Symbol$7,e)?WellKnownSymbolsStore$2[e]=Symbol$7[e]:WellKnownSymbolsStore$2[e]=USE_SYMBOL_AS_UID$2&&symbolFor?symbolFor(t):createWellKnownSymbol$1(t)}return WellKnownSymbolsStore$2[e]},call$S=functionCall$1,isObject$O=isObject$Q,isSymbol$a=isSymbol$b,getMethod$9=getMethod$a,ordinaryToPrimitive$2=ordinaryToPrimitive$3,wellKnownSymbol$Q=wellKnownSymbol$R,$TypeError$B=TypeError,TO_PRIMITIVE$1=wellKnownSymbol$Q("toPrimitive"),toPrimitive$d=function(e,t){if(!isObject$O(e)||isSymbol$a(e))return e;var r,n=getMethod$9(e,TO_PRIMITIVE$1);if(n){if(void 0===t&&(t="default"),r=call$S(n,e,t),!isObject$O(r)||isSymbol$a(r))return r;throw $TypeError$B("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive$2(e,t)},toPrimitive$c=toPrimitive$d,isSymbol$9=isSymbol$b,toPropertyKey$a=function(e){var t=toPrimitive$c(e,"string");return isSymbol$9(t)?t:t+""},global$1f=global$1l,isObject$N=isObject$Q,document$6=global$1f.document,EXISTS$3=isObject$N(document$6)&&isObject$N(document$6.createElement),documentCreateElement$5=function(e){return EXISTS$3?document$6.createElement(e):{}},DESCRIPTORS$K=descriptors$1,fails$1x=fails$1C,createElement$3=documentCreateElement$5,ie8DomDefine$1=!DESCRIPTORS$K&&!fails$1x((function(){return 7!=Object.defineProperty(createElement$3("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$J=descriptors$1,call$R=functionCall$1,propertyIsEnumerableModule$3=objectPropertyIsEnumerable$1,createPropertyDescriptor$d=createPropertyDescriptor$e,toIndexedObject$o=toIndexedObject$p,toPropertyKey$9=toPropertyKey$a,hasOwn$J=hasOwnProperty_1$1,IE8_DOM_DEFINE$3=ie8DomDefine$1,$getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$1.f=DESCRIPTORS$J?$getOwnPropertyDescriptor$4:function(e,t){if(e=toIndexedObject$o(e),t=toPropertyKey$9(t),IE8_DOM_DEFINE$3)try{return $getOwnPropertyDescriptor$4(e,t)}catch(e){}if(hasOwn$J(e,t))return createPropertyDescriptor$d(!call$R(propertyIsEnumerableModule$3.f,e,t),e[t])};var objectDefineProperty$1={},DESCRIPTORS$I=descriptors$1,fails$1w=fails$1C,v8PrototypeDefineBug$1=DESCRIPTORS$I&&fails$1w((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$M=isObject$Q,$String$9=String,$TypeError$A=TypeError,anObject$E=function(e){if(isObject$M(e))return e;throw $TypeError$A($String$9(e)+" is not an object")},DESCRIPTORS$H=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,V8_PROTOTYPE_DEFINE_BUG$3=v8PrototypeDefineBug$1,anObject$D=anObject$E,toPropertyKey$8=toPropertyKey$a,$TypeError$z=TypeError,$defineProperty$2=Object.defineProperty,$getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,ENUMERABLE$1="enumerable",CONFIGURABLE$3="configurable",WRITABLE$1="writable";objectDefineProperty$1.f=DESCRIPTORS$H?V8_PROTOTYPE_DEFINE_BUG$3?function(e,t,r){if(anObject$D(e),t=toPropertyKey$8(t),anObject$D(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE$1 in r&&!r[WRITABLE$1]){var n=$getOwnPropertyDescriptor$3(e,t);n&&n[WRITABLE$1]&&(e[t]=r.value,r={configurable:CONFIGURABLE$3 in r?r[CONFIGURABLE$3]:n[CONFIGURABLE$3],enumerable:ENUMERABLE$1 in r?r[ENUMERABLE$1]:n[ENUMERABLE$1],writable:!1})}return $defineProperty$2(e,t,r)}:$defineProperty$2:function(e,t,r){if(anObject$D(e),t=toPropertyKey$8(t),anObject$D(r),IE8_DOM_DEFINE$2)try{return $defineProperty$2(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$z("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$G=descriptors$1,definePropertyModule$d=objectDefineProperty$1,createPropertyDescriptor$c=createPropertyDescriptor$e,createNonEnumerableProperty$j=DESCRIPTORS$G?function(e,t,r){return definePropertyModule$d.f(e,t,createPropertyDescriptor$c(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$7={exports:{}},DESCRIPTORS$F=descriptors$1,hasOwn$I=hasOwnProperty_1$1,FunctionPrototype$5=Function.prototype,getDescriptor$1=DESCRIPTORS$F&&Object.getOwnPropertyDescriptor,EXISTS$2=hasOwn$I(FunctionPrototype$5,"name"),PROPER$1=EXISTS$2&&"something"===function(){}.name,CONFIGURABLE$2=EXISTS$2&&(!DESCRIPTORS$F||DESCRIPTORS$F&&getDescriptor$1(FunctionPrototype$5,"name").configurable),functionName$1={EXISTS:EXISTS$2,PROPER:PROPER$1,CONFIGURABLE:CONFIGURABLE$2},uncurryThis$1w=functionUncurryThis$1,isCallable$T=isCallable$Z,store$5=sharedStore$1,functionToString$3=uncurryThis$1w(Function.toString);isCallable$T(store$5.inspectSource)||(store$5.inspectSource=function(e){return functionToString$3(e)});var set$b,get$c,has$3,inspectSource$7=store$5.inspectSource,global$1e=global$1l,isCallable$S=isCallable$Z,WeakMap$3=global$1e.WeakMap,weakMapBasicDetection$1=isCallable$S(WeakMap$3)&&/native code/.test(String(WeakMap$3)),shared$9=sharedExports$1,uid$9=uid$b,keys$c=shared$9("keys"),sharedKey$8=function(e){return keys$c[e]||(keys$c[e]=uid$9(e))},hiddenKeys$d={},NATIVE_WEAK_MAP$1=weakMapBasicDetection$1,global$1d=global$1l,isObject$L=isObject$Q,createNonEnumerableProperty$i=createNonEnumerableProperty$j,hasOwn$H=hasOwnProperty_1$1,shared$8=sharedStore$1,sharedKey$7=sharedKey$8,hiddenKeys$c=hiddenKeys$d,OBJECT_ALREADY_INITIALIZED$1="Object already initialized",TypeError$d=global$1d.TypeError,WeakMap$2=global$1d.WeakMap,enforce$1=function(e){return has$3(e)?get$c(e):set$b(e,{})},getterFor$1=function(e){return function(t){var r;if(!isObject$L(t)||(r=get$c(t)).type!==e)throw TypeError$d("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP$1||shared$8.state){var store$4=shared$8.state||(shared$8.state=new WeakMap$2);store$4.get=store$4.get,store$4.has=store$4.has,store$4.set=store$4.set,set$b=function(e,t){if(store$4.has(e))throw TypeError$d(OBJECT_ALREADY_INITIALIZED$1);return t.facade=e,store$4.set(e,t),t},get$c=function(e){return store$4.get(e)||{}},has$3=function(e){return store$4.has(e)}}else{var STATE$1=sharedKey$7("state");hiddenKeys$c[STATE$1]=!0,set$b=function(e,t){if(hasOwn$H(e,STATE$1))throw TypeError$d(OBJECT_ALREADY_INITIALIZED$1);return t.facade=e,createNonEnumerableProperty$i(e,STATE$1,t),t},get$c=function(e){return hasOwn$H(e,STATE$1)?e[STATE$1]:{}},has$3=function(e){return hasOwn$H(e,STATE$1)}}var internalState$1={set:set$b,get:get$c,has:has$3,enforce:enforce$1,getterFor:getterFor$1},fails$1v=fails$1C,isCallable$R=isCallable$Z,hasOwn$G=hasOwnProperty_1$1,DESCRIPTORS$E=descriptors$1,CONFIGURABLE_FUNCTION_NAME$5=functionName$1.CONFIGURABLE,inspectSource$6=inspectSource$7,InternalStateModule$m=internalState$1,enforceInternalState$5=InternalStateModule$m.enforce,getInternalState$c=InternalStateModule$m.get,defineProperty$o=Object.defineProperty,CONFIGURABLE_LENGTH$1=DESCRIPTORS$E&&!fails$1v((function(){return 8!==defineProperty$o((function(){}),"length",{value:8}).length})),TEMPLATE$1=String(String).split("String"),makeBuiltIn$6=makeBuiltIn$7.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$G(e,"name")||CONFIGURABLE_FUNCTION_NAME$5&&e.name!==t)&&(DESCRIPTORS$E?defineProperty$o(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH$1&&r&&hasOwn$G(r,"arity")&&e.length!==r.arity&&defineProperty$o(e,"length",{value:r.arity});try{r&&hasOwn$G(r,"constructor")&&r.constructor?DESCRIPTORS$E&&defineProperty$o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=enforceInternalState$5(e);return hasOwn$G(n,"source")||(n.source=TEMPLATE$1.join("string"==typeof t?t:"")),e};Function.prototype.toString=makeBuiltIn$6((function(){return isCallable$R(this)&&getInternalState$c(this).source||inspectSource$6(this)}),"toString");var makeBuiltInExports$1=makeBuiltIn$7.exports,isCallable$Q=isCallable$Z,definePropertyModule$c=objectDefineProperty$1,makeBuiltIn$5=makeBuiltInExports$1,defineGlobalProperty$5=defineGlobalProperty$7,defineBuiltIn$x=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(isCallable$Q(r)&&makeBuiltIn$5(r,i,n),n.global)o?e[t]=r:defineGlobalProperty$5(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$c.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames$1={},ceil$3=Math.ceil,floor$i=Math.floor,mathTrunc$1=Math.trunc||function(e){var t=+e;return(t>0?floor$i:ceil$3)(t)},trunc$9=mathTrunc$1,toIntegerOrInfinity$n=function(e){var t=+e;return t!=t||0===t?0:trunc$9(t)},toIntegerOrInfinity$m=toIntegerOrInfinity$n,max$7=Math.max,min$d=Math.min,toAbsoluteIndex$g=function(e,t){var r=toIntegerOrInfinity$m(e);return r<0?max$7(r+t,0):min$d(r,t)},toIntegerOrInfinity$l=toIntegerOrInfinity$n,min$c=Math.min,toLength$k=function(e){return e>0?min$c(toIntegerOrInfinity$l(e),9007199254740991):0},toLength$j=toLength$k,lengthOfArrayLike$A=function(e){return toLength$j(e.length)},toIndexedObject$n=toIndexedObject$p,toAbsoluteIndex$f=toAbsoluteIndex$g,lengthOfArrayLike$z=lengthOfArrayLike$A,createMethod$f=function(e){return function(t,r,n){var o,i=toIndexedObject$n(t),a=lengthOfArrayLike$z(i),s=toAbsoluteIndex$f(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$1={includes:createMethod$f(!0),indexOf:createMethod$f(!1)},uncurryThis$1v=functionUncurryThis$1,hasOwn$F=hasOwnProperty_1$1,toIndexedObject$m=toIndexedObject$p,indexOf$2=arrayIncludes$1.indexOf,hiddenKeys$b=hiddenKeys$d,push$q=uncurryThis$1v([].push),objectKeysInternal$1=function(e,t){var r,n=toIndexedObject$m(e),o=0,i=[];for(r in n)!hasOwn$F(hiddenKeys$b,r)&&hasOwn$F(n,r)&&push$q(i,r);for(;t.length>o;)hasOwn$F(n,r=t[o++])&&(~indexOf$2(i,r)||push$q(i,r));return i},enumBugKeys$7=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$3=objectKeysInternal$1,enumBugKeys$6=enumBugKeys$7,hiddenKeys$a=enumBugKeys$6.concat("length","prototype");objectGetOwnPropertyNames$1.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$3(e,hiddenKeys$a)};var objectGetOwnPropertySymbols$1={};objectGetOwnPropertySymbols$1.f=Object.getOwnPropertySymbols;var getBuiltIn$k=getBuiltIn$n,uncurryThis$1u=functionUncurryThis$1,getOwnPropertyNamesModule$5=objectGetOwnPropertyNames$1,getOwnPropertySymbolsModule$4=objectGetOwnPropertySymbols$1,anObject$C=anObject$E,concat$6=uncurryThis$1u([].concat),ownKeys$6=getBuiltIn$k("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$5.f(anObject$C(e)),r=getOwnPropertySymbolsModule$4.f;return r?concat$6(t,r(e)):t},hasOwn$E=hasOwnProperty_1$1,ownKeys$5=ownKeys$6,getOwnPropertyDescriptorModule$5=objectGetOwnPropertyDescriptor$1,definePropertyModule$b=objectDefineProperty$1,copyConstructorProperties$5=function(e,t,r){for(var n=ownKeys$5(t),o=definePropertyModule$b.f,i=getOwnPropertyDescriptorModule$5.f,a=0;a<n.length;a++){var s=n[a];hasOwn$E(e,s)||r&&hasOwn$E(r,s)||o(e,s,i(t,s))}},fails$1u=fails$1C,isCallable$P=isCallable$Z,replacement$1=/#|\.prototype\./,isForced$9=function(e,t){var r=data$1[normalize$1(e)];return r==POLYFILL$1||r!=NATIVE$1&&(isCallable$P(t)?fails$1u(t):!!t)},normalize$1=isForced$9.normalize=function(e){return String(e).replace(replacement$1,".").toLowerCase()},data$1=isForced$9.data={},NATIVE$1=isForced$9.NATIVE="N",POLYFILL$1=isForced$9.POLYFILL="P",isForced_1$1=isForced$9,global$1c=global$1l,getOwnPropertyDescriptor$a=objectGetOwnPropertyDescriptor$1.f,createNonEnumerableProperty$h=createNonEnumerableProperty$j,defineBuiltIn$w=defineBuiltIn$x,defineGlobalProperty$4=defineGlobalProperty$7,copyConstructorProperties$4=copyConstructorProperties$5,isForced$8=isForced_1$1,_export$1=function(e,t){var r,n,o,i,a,s=e.target,l=e.global,c=e.stat;if(r=l?global$1c:c?global$1c[s]||defineGlobalProperty$4(s,{}):(global$1c[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=getOwnPropertyDescriptor$a(r,n))&&a.value:r[n],!isForced$8(l?n:s+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties$4(i,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$h(i,"sham",!0),defineBuiltIn$w(r,n,i,e)}},NATIVE_BIND$7=functionBindNative$1,FunctionPrototype$4=Function.prototype,apply$g=FunctionPrototype$4.apply,call$Q=FunctionPrototype$4.call,functionApply$1="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$7?call$Q.bind(apply$g):function(){return call$Q.apply(apply$g,arguments)}),uncurryThis$1t=functionUncurryThis$1,arraySlice$o=uncurryThis$1t([].slice),$TypeError$y=TypeError,validateArgumentsLength$a=function(e,t){if(e<t)throw $TypeError$y("Not enough arguments");return e},global$1b=global$1l,apply$f=functionApply$1,isCallable$O=isCallable$Z,userAgent$f=engineUserAgent$1,arraySlice$n=arraySlice$o,validateArgumentsLength$9=validateArgumentsLength$a,MSIE=/MSIE .\./.test(userAgent$f),Function$4=global$1b.Function,wrap$1=function(e){return MSIE?function(t,r){var n=validateArgumentsLength$9(arguments.length,1)>2,o=isCallable$O(t)?t:Function$4(t),i=n?arraySlice$n(arguments,2):void 0;return e(n?function(){apply$f(o,this,i)}:o,r)}:e},schedulersFix$3={setTimeout:wrap$1(global$1b.setTimeout),setInterval:wrap$1(global$1b.setInterval)},$$22=_export$1,global$1a=global$1l,setInterval$6=schedulersFix$3.setInterval;$$22({global:!0,bind:!0,forced:global$1a.setInterval!==setInterval$6},{setInterval:setInterval$6});var $$21=_export$1,global$19=global$1l,setTimeout$2=schedulersFix$3.setTimeout;$$21({global:!0,bind:!0,forced:global$19.setTimeout!==setTimeout$2},{setTimeout:setTimeout$2});var classofRaw$4=classofRaw$5,uncurryThis$1s=functionUncurryThis$1,functionUncurryThisClause$1=function(e){if("Function"===classofRaw$4(e))return uncurryThis$1s(e)},uncurryThis$1r=functionUncurryThisClause$1,aCallable$u=aCallable$w,NATIVE_BIND$6=functionBindNative$1,bind$x=functionUncurryThisClause$1(functionUncurryThisClause$1.bind),functionBindContext$1=function(e,t){return aCallable$u(e),void 0===t?e:NATIVE_BIND$6?bind$x(e,t):function(){return e.apply(t,arguments)}},classof$z=classofRaw$5,isArray$9=Array.isArray||function(e){return"Array"==classof$z(e)},wellKnownSymbol$P=wellKnownSymbol$R,TO_STRING_TAG$9=wellKnownSymbol$P("toStringTag"),test$4={};test$4[TO_STRING_TAG$9]="z";var toStringTagSupport$1="[object z]"===String(test$4),TO_STRING_TAG_SUPPORT$5=toStringTagSupport$1,isCallable$N=isCallable$Z,classofRaw$3=classofRaw$5,wellKnownSymbol$O=wellKnownSymbol$R,TO_STRING_TAG$8=wellKnownSymbol$O("toStringTag"),$Object$6=Object,CORRECT_ARGUMENTS$1="Arguments"==classofRaw$3(function(){return arguments}()),tryGet$1=function(e,t){try{return e[t]}catch(e){}},classof$y=TO_STRING_TAG_SUPPORT$5?classofRaw$3:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet$1(t=$Object$6(e),TO_STRING_TAG$8))?r:CORRECT_ARGUMENTS$1?classofRaw$3(t):"Object"==(n=classofRaw$3(t))&&isCallable$N(t.callee)?"Arguments":n},uncurryThis$1q=functionUncurryThis$1,fails$1t=fails$1C,isCallable$M=isCallable$Z,classof$x=classof$y,getBuiltIn$j=getBuiltIn$n,inspectSource$5=inspectSource$7,noop$2=function(){},empty$1=[],construct$3=getBuiltIn$j("Reflect","construct"),constructorRegExp$1=/^\s*(?:class|function)\b/,exec$a=uncurryThis$1q(constructorRegExp$1.exec),INCORRECT_TO_STRING$1=!constructorRegExp$1.exec(noop$2),isConstructorModern$1=function(e){if(!isCallable$M(e))return!1;try{return construct$3(noop$2,empty$1,e),!0}catch(e){return!1}},isConstructorLegacy$1=function(e){if(!isCallable$M(e))return!1;switch(classof$x(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$1||!!exec$a(constructorRegExp$1,inspectSource$5(e))}catch(e){return!0}};isConstructorLegacy$1.sham=!0;var isConstructor$8=!construct$3||fails$1t((function(){var e;return isConstructorModern$1(isConstructorModern$1.call)||!isConstructorModern$1(Object)||!isConstructorModern$1((function(){e=!0}))||e}))?isConstructorLegacy$1:isConstructorModern$1,isArray$8=isArray$9,isConstructor$7=isConstructor$8,isObject$K=isObject$Q,wellKnownSymbol$N=wellKnownSymbol$R,SPECIES$c=wellKnownSymbol$N("species"),$Array$8=Array,arraySpeciesConstructor$3=function(e){var t;return isArray$8(e)&&(t=e.constructor,(isConstructor$7(t)&&(t===$Array$8||isArray$8(t.prototype))||isObject$K(t)&&null===(t=t[SPECIES$c]))&&(t=void 0)),void 0===t?$Array$8:t},arraySpeciesConstructor$2=arraySpeciesConstructor$3,arraySpeciesCreate$5=function(e,t){return new(arraySpeciesConstructor$2(e))(0===t?0:t)},bind$w=functionBindContext$1,uncurryThis$1p=functionUncurryThis$1,IndexedObject$8=indexedObject$1,toObject$s=toObject$u,lengthOfArrayLike$y=lengthOfArrayLike$A,arraySpeciesCreate$4=arraySpeciesCreate$5,push$p=uncurryThis$1p([].push),createMethod$e=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,$){for(var d,p,y=toObject$s(l),f=IndexedObject$8(y),h=bind$w(c,u),m=lengthOfArrayLike$y(f),b=0,g=$||arraySpeciesCreate$4,S=t?g(l,m):r||a?g(l,0):void 0;m>b;b++)if((s||b in f)&&(p=h(d=f[b],b,y),e))if(t)S[b]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:push$p(S,d)}else switch(e){case 4:return!1;case 7:push$p(S,d)}return i?-1:n||o?o:S}},arrayIteration$1={forEach:createMethod$e(0),map:createMethod$e(1),filter:createMethod$e(2),some:createMethod$e(3),every:createMethod$e(4),find:createMethod$e(5),findIndex:createMethod$e(6),filterReject:createMethod$e(7)},fails$1s=fails$1C,wellKnownSymbol$M=wellKnownSymbol$R,V8_VERSION$5=engineV8Version$1,SPECIES$b=wellKnownSymbol$M("species"),arrayMethodHasSpeciesSupport$8=function(e){return V8_VERSION$5>=51||!fails$1s((function(){var t=[];return(t.constructor={})[SPECIES$b]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$20=_export$1,$filter$2=arrayIteration$1.filter,arrayMethodHasSpeciesSupport$7=arrayMethodHasSpeciesSupport$8,HAS_SPECIES_SUPPORT$5=arrayMethodHasSpeciesSupport$7("filter");$$20({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$5},{filter:function(e){return $filter$2(this,e,arguments.length>1?arguments[1]:void 0)}});var TO_STRING_TAG_SUPPORT$4=toStringTagSupport$1,classof$w=classof$y,objectToString$1=TO_STRING_TAG_SUPPORT$4?{}.toString:function(){return"[object "+classof$w(this)+"]"},TO_STRING_TAG_SUPPORT$3=toStringTagSupport$1,defineBuiltIn$v=defineBuiltIn$x,toString$B=objectToString$1;TO_STRING_TAG_SUPPORT$3||defineBuiltIn$v(Object.prototype,"toString",toString$B,{unsafe:!0});var $TypeError$x=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$3=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$x("Maximum allowed index exceeded");return e},toPropertyKey$7=toPropertyKey$a,definePropertyModule$a=objectDefineProperty$1,createPropertyDescriptor$b=createPropertyDescriptor$e,createProperty$8=function(e,t,r){var n=toPropertyKey$7(t);n in e?definePropertyModule$a.f(e,n,createPropertyDescriptor$b(0,r)):e[n]=r},$$1$=_export$1,fails$1r=fails$1C,isArray$7=isArray$9,isObject$J=isObject$Q,toObject$r=toObject$u,lengthOfArrayLike$x=lengthOfArrayLike$A,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$7=createProperty$8,arraySpeciesCreate$3=arraySpeciesCreate$5,arrayMethodHasSpeciesSupport$6=arrayMethodHasSpeciesSupport$8,wellKnownSymbol$L=wellKnownSymbol$R,V8_VERSION$4=engineV8Version$1,IS_CONCAT_SPREADABLE=wellKnownSymbol$L("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$4>=51||!fails$1r((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport$6("concat"),isConcatSpreadable=function(e){if(!isObject$J(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$7(e)},FORCED$q=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;$$1$({target:"Array",proto:!0,arity:1,forced:FORCED$q},{concat:function(e){var t,r,n,o,i,a=toObject$r(this),s=arraySpeciesCreate$3(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(i=-1===t?a:arguments[t]))for(o=lengthOfArrayLike$x(i),doesNotExceedSafeInteger$2(l+o),r=0;r<o;r++,l++)r in i&&createProperty$7(s,l,i[r]);else doesNotExceedSafeInteger$2(l+1),createProperty$7(s,l++,i);return s.length=l,s}});var fails$1q=fails$1C,arrayMethodIsStrict$h=function(e,t){var r=[][e];return!!r&&fails$1q((function(){r.call(null,t||function(){return 1},1)}))},$$1_=_export$1,$every$2=arrayIteration$1.every,arrayMethodIsStrict$g=arrayMethodIsStrict$h,STRICT_METHOD$d=arrayMethodIsStrict$g("every");$$1_({target:"Array",proto:!0,forced:!STRICT_METHOD$d},{every:function(e){return $every$2(this,e,arguments.length>1?arguments[1]:void 0)}});var internalObjectKeys$2=objectKeysInternal$1,enumBugKeys$5=enumBugKeys$7,objectKeys$7=Object.keys||function(e){return internalObjectKeys$2(e,enumBugKeys$5)},$$1Z=_export$1,toObject$q=toObject$u,nativeKeys$1=objectKeys$7,fails$1p=fails$1C,FAILS_ON_PRIMITIVES$6=fails$1p((function(){nativeKeys$1(1)}));$$1Z({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$6},{keys:function(e){return nativeKeys$1(toObject$q(e))}});var $$1Y=_export$1,getBuiltIn$i=getBuiltIn$n,apply$e=functionApply$1,call$P=functionCall$1,uncurryThis$1o=functionUncurryThis$1,fails$1o=fails$1C,isArray$6=isArray$9,isCallable$L=isCallable$Z,isObject$I=isObject$Q,isSymbol$8=isSymbol$b,arraySlice$m=arraySlice$o,NATIVE_SYMBOL$6=symbolConstructorDetection$1,$stringify=getBuiltIn$i("JSON","stringify"),exec$9=uncurryThis$1o(/./.exec),charAt$e=uncurryThis$1o("".charAt),charCodeAt$6=uncurryThis$1o("".charCodeAt),replace$c=uncurryThis$1o("".replace),numberToString$2=uncurryThis$1o(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$6||fails$1o((function(){var e=getBuiltIn$i("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$1o((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$m(arguments),n=t;if((isObject$I(t)||void 0!==e)&&!isSymbol$8(e))return isArray$6(t)||(t=function(e,t){if(isCallable$L(n)&&(t=call$P(n,this,e,t)),!isSymbol$8(t))return t}),r[1]=t,apply$e($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$e(r,t-1),o=charAt$e(r,t+1);return exec$9(low,e)&&!exec$9(hi,o)||exec$9(hi,e)&&!exec$9(low,n)?"\\u"+numberToString$2(charCodeAt$6(e,0),16):e};$stringify&&$$1Y({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$m(arguments),o=apply$e(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$c(o,tester,fixIllFormed):o}});var $$1X=_export$1,uncurryThis$1n=functionUncurryThisClause$1,$indexOf$3=arrayIncludes$1.indexOf,arrayMethodIsStrict$f=arrayMethodIsStrict$h,nativeIndexOf$1=uncurryThis$1n([].indexOf),NEGATIVE_ZERO$4=!!nativeIndexOf$1&&1/nativeIndexOf$1([1],1,-0)<0,STRICT_METHOD$c=arrayMethodIsStrict$f("indexOf");$$1X({target:"Array",proto:!0,forced:NEGATIVE_ZERO$4||!STRICT_METHOD$c},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$4?nativeIndexOf$1(this,e,t)||0:$indexOf$3(this,e,t)}});var uncurryThis$1m=functionUncurryThis$1,aCallable$t=aCallable$w,isObject$H=isObject$Q,hasOwn$D=hasOwnProperty_1$1,arraySlice$l=arraySlice$o,NATIVE_BIND$5=functionBindNative$1,$Function$1=Function,concat$5=uncurryThis$1m([].concat),join$a=uncurryThis$1m([].join),factories$1={},construct$2=function(e,t,r){if(!hasOwn$D(factories$1,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories$1[t]=$Function$1("C,a","return new C("+join$a(n,",")+")")}return factories$1[t](e,r)},functionBind$1=NATIVE_BIND$5?$Function$1.bind:function(e){var t=aCallable$t(this),r=t.prototype,n=arraySlice$l(arguments,1),o=function(){var r=concat$5(n,arraySlice$l(arguments));return this instanceof o?construct$2(t,r.length,r):t.apply(e,r)};return isObject$H(r)&&(o.prototype=r),o},$$1W=_export$1,bind$v=functionBind$1;$$1W({target:"Function",proto:!0,forced:Function.bind!==bind$v},{bind:bind$v});var $$1V=_export$1,$map$3=arrayIteration$1.map,arrayMethodHasSpeciesSupport$5=arrayMethodHasSpeciesSupport$8,HAS_SPECIES_SUPPORT$4=arrayMethodHasSpeciesSupport$5("map");$$1V({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$4},{map:function(e){return $map$3(this,e,arguments.length>1?arguments[1]:void 0)}});var $forEach$4=arrayIteration$1.forEach,arrayMethodIsStrict$e=arrayMethodIsStrict$h,STRICT_METHOD$b=arrayMethodIsStrict$e("forEach"),arrayForEach$1=STRICT_METHOD$b?[].forEach:function(e){return $forEach$4(this,e,arguments.length>1?arguments[1]:void 0)},$$1U=_export$1,forEach$7=arrayForEach$1;$$1U({target:"Array",proto:!0,forced:[].forEach!=arrayForEach$1},{forEach:arrayForEach$1});var domIterables$1={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},documentCreateElement$4=documentCreateElement$5,classList$1=documentCreateElement$4("span").classList,DOMTokenListPrototype$5=classList$1&&classList$1.constructor&&classList$1.constructor.prototype,domTokenListPrototype$1=DOMTokenListPrototype$5===Object.prototype?void 0:DOMTokenListPrototype$5,global$18=global$1l,DOMIterables$6=domIterables$1,DOMTokenListPrototype$4=domTokenListPrototype$1,forEach$6=arrayForEach$1,createNonEnumerableProperty$g=createNonEnumerableProperty$j,handlePrototype$3=function(e){if(e&&e.forEach!==forEach$6)try{createNonEnumerableProperty$g(e,"forEach",forEach$6)}catch(t){e.forEach=forEach$6}};for(var COLLECTION_NAME$3 in DOMIterables$6)DOMIterables$6[COLLECTION_NAME$3]&&handlePrototype$3(global$18[COLLECTION_NAME$3]&&global$18[COLLECTION_NAME$3].prototype);handlePrototype$3(DOMTokenListPrototype$4);var DESCRIPTORS$D=descriptors$1,uncurryThis$1l=functionUncurryThis$1,call$O=functionCall$1,fails$1n=fails$1C,objectKeys$6=objectKeys$7,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols$1,propertyIsEnumerableModule$2=objectPropertyIsEnumerable$1,toObject$p=toObject$u,IndexedObject$7=indexedObject$1,$assign=Object.assign,defineProperty$n=Object.defineProperty,concat$4=uncurryThis$1l([].concat),objectAssign=!$assign||fails$1n((function(){if(DESCRIPTORS$D&&1!==$assign({b:1},$assign(defineProperty$n({},"a",{enumerable:!0,get:function(){defineProperty$n(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$6($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$p(e),n=arguments.length,o=1,i=getOwnPropertySymbolsModule$3.f,a=propertyIsEnumerableModule$2.f;n>o;)for(var s,l=IndexedObject$7(arguments[o++]),c=i?concat$4(objectKeys$6(l),i(l)):objectKeys$6(l),u=c.length,$=0;u>$;)s=c[$++],DESCRIPTORS$D&&!call$O(a,l,s)||(r[s]=l[s]);return r}:$assign,$$1T=_export$1,assign$4=objectAssign;$$1T({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$4},{assign:assign$4});var objectDefineProperties$1={},DESCRIPTORS$C=descriptors$1,V8_PROTOTYPE_DEFINE_BUG$2=v8PrototypeDefineBug$1,definePropertyModule$9=objectDefineProperty$1,anObject$B=anObject$E,toIndexedObject$l=toIndexedObject$p,objectKeys$5=objectKeys$7;objectDefineProperties$1.f=DESCRIPTORS$C&&!V8_PROTOTYPE_DEFINE_BUG$2?Object.defineProperties:function(e,t){anObject$B(e);for(var r,n=toIndexedObject$l(t),o=objectKeys$5(t),i=o.length,a=0;i>a;)definePropertyModule$9.f(e,r=o[a++],n[r]);return e};var activeXDocument$1,getBuiltIn$h=getBuiltIn$n,html$5=getBuiltIn$h("document","documentElement"),anObject$A=anObject$E,definePropertiesModule$2=objectDefineProperties$1,enumBugKeys$4=enumBugKeys$7,hiddenKeys$9=hiddenKeys$d,html$4=html$5,documentCreateElement$3=documentCreateElement$5,sharedKey$6=sharedKey$8,GT$1=">",LT$1="<",PROTOTYPE$4="prototype",SCRIPT$1="script",IE_PROTO$3=sharedKey$6("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(e){return LT$1+SCRIPT$1+GT$1+e+LT$1+"/"+SCRIPT$1+GT$1},NullProtoObjectViaActiveX$1=function(e){e.write(scriptTag$1("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame$1=function(){var e,t=documentCreateElement$3("iframe"),r="java"+SCRIPT$1+":";return t.style.display="none",html$4.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag$1("document.F=Object")),e.close(),e.F},NullProtoObject$1=function(){try{activeXDocument$1=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject$1="undefined"!=typeof document?document.domain&&activeXDocument$1?NullProtoObjectViaActiveX$1(activeXDocument$1):NullProtoObjectViaIFrame$1():NullProtoObjectViaActiveX$1(activeXDocument$1);for(var e=enumBugKeys$4.length;e--;)delete NullProtoObject$1[PROTOTYPE$4][enumBugKeys$4[e]];return NullProtoObject$1()};hiddenKeys$9[IE_PROTO$3]=!0;var objectCreate$1=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor$1[PROTOTYPE$4]=anObject$A(e),r=new EmptyConstructor$1,EmptyConstructor$1[PROTOTYPE$4]=null,r[IE_PROTO$3]=e):r=NullProtoObject$1(),void 0===t?r:definePropertiesModule$2.f(r,t)},wellKnownSymbol$K=wellKnownSymbol$R,create$d=objectCreate$1,defineProperty$m=objectDefineProperty$1.f,UNSCOPABLES$1=wellKnownSymbol$K("unscopables"),ArrayPrototype$d=Array.prototype;null==ArrayPrototype$d[UNSCOPABLES$1]&&defineProperty$m(ArrayPrototype$d,UNSCOPABLES$1,{configurable:!0,value:create$d(null)});var IteratorPrototype$5,PrototypeOfArrayIteratorPrototype$1,arrayIterator$1,addToUnscopables$5=function(e){ArrayPrototype$d[UNSCOPABLES$1][e]=!0},iterators$1={},fails$1m=fails$1C,correctPrototypeGetter$1=!fails$1m((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$C=hasOwnProperty_1$1,isCallable$K=isCallable$Z,toObject$o=toObject$u,sharedKey$5=sharedKey$8,CORRECT_PROTOTYPE_GETTER$2=correctPrototypeGetter$1,IE_PROTO$2=sharedKey$5("IE_PROTO"),$Object$5=Object,ObjectPrototype$7=$Object$5.prototype,objectGetPrototypeOf$1=CORRECT_PROTOTYPE_GETTER$2?$Object$5.getPrototypeOf:function(e){var t=toObject$o(e);if(hasOwn$C(t,IE_PROTO$2))return t[IE_PROTO$2];var r=t.constructor;return isCallable$K(r)&&t instanceof r?r.prototype:t instanceof $Object$5?ObjectPrototype$7:null},fails$1l=fails$1C,isCallable$J=isCallable$Z,isObject$G=isObject$Q,getPrototypeOf$8=objectGetPrototypeOf$1,defineBuiltIn$u=defineBuiltIn$x,wellKnownSymbol$J=wellKnownSymbol$R,ITERATOR$m=wellKnownSymbol$J("iterator"),BUGGY_SAFARI_ITERATORS$3=!1;[].keys&&("next"in(arrayIterator$1=[].keys())?(PrototypeOfArrayIteratorPrototype$1=getPrototypeOf$8(getPrototypeOf$8(arrayIterator$1)))!==Object.prototype&&(IteratorPrototype$5=PrototypeOfArrayIteratorPrototype$1):BUGGY_SAFARI_ITERATORS$3=!0);var NEW_ITERATOR_PROTOTYPE$1=!isObject$G(IteratorPrototype$5)||fails$1l((function(){var e={};return IteratorPrototype$5[ITERATOR$m].call(e)!==e}));NEW_ITERATOR_PROTOTYPE$1&&(IteratorPrototype$5={}),isCallable$J(IteratorPrototype$5[ITERATOR$m])||defineBuiltIn$u(IteratorPrototype$5,ITERATOR$m,(function(){return this}));var iteratorsCore$1={IteratorPrototype:IteratorPrototype$5,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$3},defineProperty$l=objectDefineProperty$1.f,hasOwn$B=hasOwnProperty_1$1,wellKnownSymbol$I=wellKnownSymbol$R,TO_STRING_TAG$7=wellKnownSymbol$I("toStringTag"),setToStringTag$h=function(e,t,r){e&&!r&&(e=e.prototype),e&&!hasOwn$B(e,TO_STRING_TAG$7)&&defineProperty$l(e,TO_STRING_TAG$7,{configurable:!0,value:t})},IteratorPrototype$4=iteratorsCore$1.IteratorPrototype,create$c=objectCreate$1,createPropertyDescriptor$a=createPropertyDescriptor$e,setToStringTag$g=setToStringTag$h,Iterators$9=iterators$1,returnThis$3=function(){return this},iteratorCreateConstructor$1=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$c(IteratorPrototype$4,{next:createPropertyDescriptor$a(+!n,r)}),setToStringTag$g(e,o,!1),Iterators$9[o]=returnThis$3,e},isCallable$I=isCallable$Z,$String$8=String,$TypeError$w=TypeError,aPossiblePrototype$3=function(e){if("object"==typeof e||isCallable$I(e))return e;throw $TypeError$w("Can't set "+$String$8(e)+" as a prototype")},uncurryThis$1k=functionUncurryThis$1,anObject$z=anObject$E,aPossiblePrototype$2=aPossiblePrototype$3,objectSetPrototypeOf$1=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThis$1k(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$z(r),aPossiblePrototype$2(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1S=_export$1,call$N=functionCall$1,FunctionName$3=functionName$1,isCallable$H=isCallable$Z,createIteratorConstructor$3=iteratorCreateConstructor$1,getPrototypeOf$7=objectGetPrototypeOf$1,setPrototypeOf$b=objectSetPrototypeOf$1,setToStringTag$f=setToStringTag$h,createNonEnumerableProperty$f=createNonEnumerableProperty$j,defineBuiltIn$t=defineBuiltIn$x,wellKnownSymbol$H=wellKnownSymbol$R,Iterators$8=iterators$1,IteratorsCore$1=iteratorsCore$1,PROPER_FUNCTION_NAME$7=FunctionName$3.PROPER,CONFIGURABLE_FUNCTION_NAME$4=FunctionName$3.CONFIGURABLE,IteratorPrototype$3=IteratorsCore$1.IteratorPrototype,BUGGY_SAFARI_ITERATORS$2=IteratorsCore$1.BUGGY_SAFARI_ITERATORS,ITERATOR$l=wellKnownSymbol$H("iterator"),KEYS$1="keys",VALUES$1="values",ENTRIES$1="entries",returnThis$2=function(){return this},iteratorDefine$1=function(e,t,r,n,o,i,a){createIteratorConstructor$3(r,t,n);var s,l,c,u=function(e){if(e===o&&f)return f;if(!BUGGY_SAFARI_ITERATORS$2&&e in p)return p[e];switch(e){case KEYS$1:case VALUES$1:case ENTRIES$1:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",d=!1,p=e.prototype,y=p[ITERATOR$l]||p["@@iterator"]||o&&p[o],f=!BUGGY_SAFARI_ITERATORS$2&&y||u(o),h="Array"==t&&p.entries||y;if(h&&(s=getPrototypeOf$7(h.call(new e)))!==Object.prototype&&s.next&&(getPrototypeOf$7(s)!==IteratorPrototype$3&&(setPrototypeOf$b?setPrototypeOf$b(s,IteratorPrototype$3):isCallable$H(s[ITERATOR$l])||defineBuiltIn$t(s,ITERATOR$l,returnThis$2)),setToStringTag$f(s,$,!0)),PROPER_FUNCTION_NAME$7&&o==VALUES$1&&y&&y.name!==VALUES$1&&(CONFIGURABLE_FUNCTION_NAME$4?createNonEnumerableProperty$f(p,"name",VALUES$1):(d=!0,f=function(){return call$N(y,this)})),o)if(l={values:u(VALUES$1),keys:i?f:u(KEYS$1),entries:u(ENTRIES$1)},a)for(c in l)(BUGGY_SAFARI_ITERATORS$2||d||!(c in p))&&defineBuiltIn$t(p,c,l[c]);else $$1S({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS$2||d},l);return p[ITERATOR$l]!==f&&defineBuiltIn$t(p,ITERATOR$l,f,{name:o}),Iterators$8[t]=f,l},createIterResultObject$8=function(e,t){return{value:e,done:t}},toIndexedObject$k=toIndexedObject$p,addToUnscopables$4=addToUnscopables$5,Iterators$7=iterators$1,InternalStateModule$l=internalState$1,defineProperty$k=objectDefineProperty$1.f,defineIterator$6=iteratorDefine$1,createIterResultObject$7=createIterResultObject$8,DESCRIPTORS$B=descriptors$1,ARRAY_ITERATOR$1="Array Iterator",setInternalState$i=InternalStateModule$l.set,getInternalState$b=InternalStateModule$l.getterFor(ARRAY_ITERATOR$1),es_array_iterator$1=defineIterator$6(Array,"Array",(function(e,t){setInternalState$i(this,{type:ARRAY_ITERATOR$1,target:toIndexedObject$k(e),index:0,kind:t})}),(function(){var e=getInternalState$b(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$7(void 0,!0)):createIterResultObject$7("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),values$e=Iterators$7.Arguments=Iterators$7.Array;if(addToUnscopables$4("keys"),addToUnscopables$4("values"),addToUnscopables$4("entries"),DESCRIPTORS$B&&"values"!==values$e.name)try{defineProperty$k(values$e,"name",{value:"values"})}catch(e){}var $location$1,defer$1,channel$1,port$1,classof$v=classofRaw$5,global$17=global$1l,engineIsNode$1="process"==classof$v(global$17.process),getBuiltIn$g=getBuiltIn$n,definePropertyModule$8=objectDefineProperty$1,wellKnownSymbol$G=wellKnownSymbol$R,DESCRIPTORS$A=descriptors$1,SPECIES$a=wellKnownSymbol$G("species"),setSpecies$9=function(e){var t=getBuiltIn$g(e),r=definePropertyModule$8.f;DESCRIPTORS$A&&t&&!t[SPECIES$a]&&r(t,SPECIES$a,{configurable:!0,get:function(){return this}})},isPrototypeOf$t=objectIsPrototypeOf$1,$TypeError$v=TypeError,anInstance$h=function(e,t){if(isPrototypeOf$t(t,e))return e;throw $TypeError$v("Incorrect invocation")},isConstructor$6=isConstructor$8,tryToString$d=tryToString$f,$TypeError$u=TypeError,aConstructor$7=function(e){if(isConstructor$6(e))return e;throw $TypeError$u(tryToString$d(e)+" is not a constructor")},anObject$y=anObject$E,aConstructor$6=aConstructor$7,isNullOrUndefined$f=isNullOrUndefined$i,wellKnownSymbol$F=wellKnownSymbol$R,SPECIES$9=wellKnownSymbol$F("species"),speciesConstructor$9=function(e,t){var r,n=anObject$y(e).constructor;return void 0===n||isNullOrUndefined$f(r=anObject$y(n)[SPECIES$9])?t:aConstructor$6(r)},userAgent$e=engineUserAgent$1,engineIsIos$1=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$e),global$16=global$1l,apply$d=functionApply$1,bind$u=functionBindContext$1,isCallable$G=isCallable$Z,hasOwn$A=hasOwnProperty_1$1,fails$1k=fails$1C,html$3=html$5,arraySlice$k=arraySlice$o,createElement$2=documentCreateElement$5,validateArgumentsLength$8=validateArgumentsLength$a,IS_IOS$3=engineIsIos$1,IS_NODE$9=engineIsNode$1,set$a=global$16.setImmediate,clear$1=global$16.clearImmediate,process$8=global$16.process,Dispatch$1=global$16.Dispatch,Function$3=global$16.Function,MessageChannel$1=global$16.MessageChannel,String$2=global$16.String,counter$1=0,queue$4={},ONREADYSTATECHANGE$1="onreadystatechange";try{$location$1=global$16.location}catch(e){}var run$1=function(e){if(hasOwn$A(queue$4,e)){var t=queue$4[e];delete queue$4[e],t()}},runner$1=function(e){return function(){run$1(e)}},listener=function(e){run$1(e.data)},post=function(e){global$16.postMessage(String$2(e),$location$1.protocol+"//"+$location$1.host)};set$a&&clear$1||(set$a=function(e){validateArgumentsLength$8(arguments.length,1);var t=isCallable$G(e)?e:Function$3(e),r=arraySlice$k(arguments,1);return queue$4[++counter$1]=function(){apply$d(t,void 0,r)},defer$1(counter$1),counter$1},clear$1=function(e){delete queue$4[e]},IS_NODE$9?defer$1=function(e){process$8.nextTick(runner$1(e))}:Dispatch$1&&Dispatch$1.now?defer$1=function(e){Dispatch$1.now(runner$1(e))}:MessageChannel$1&&!IS_IOS$3?(port$1=(channel$1=new MessageChannel$1).port2,channel$1.port1.onmessage=listener,defer$1=bind$u(port$1.postMessage,port$1)):global$16.addEventListener&&isCallable$G(global$16.postMessage)&&!global$16.importScripts&&$location$1&&"file:"!==$location$1.protocol&&!fails$1k(post)?(defer$1=post,global$16.addEventListener("message",listener,!1)):defer$1=ONREADYSTATECHANGE$1 in createElement$2("script")?function(e){html$3.appendChild(createElement$2("script"))[ONREADYSTATECHANGE$1]=function(){html$3.removeChild(this),run$1(e)}}:function(e){setTimeout(runner$1(e),0)});var flush$1,head,last,notify$3,toggle$1,node$1,promise$1,then$1,task$3={set:set$a,clear:clear$1},userAgent$d=engineUserAgent$1,global$15=global$1l,engineIsIosPebble$1=/ipad|iphone|ipod/i.test(userAgent$d)&&void 0!==global$15.Pebble,userAgent$c=engineUserAgent$1,engineIsWebosWebkit$1=/web0s(?!.*chrome)/i.test(userAgent$c),global$14=global$1l,bind$t=functionBindContext$1,getOwnPropertyDescriptor$9=objectGetOwnPropertyDescriptor$1.f,macrotask$1=task$3.set,IS_IOS$2=engineIsIos$1,IS_IOS_PEBBLE$1=engineIsIosPebble$1,IS_WEBOS_WEBKIT$1=engineIsWebosWebkit$1,IS_NODE$8=engineIsNode$1,MutationObserver$1=global$14.MutationObserver||global$14.WebKitMutationObserver,document$5=global$14.document,process$7=global$14.process,Promise$2=global$14.Promise,queueMicrotaskDescriptor$1=getOwnPropertyDescriptor$9(global$14,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor$1&&queueMicrotaskDescriptor$1.value;queueMicrotask||(flush$1=function(){var e,t;for(IS_NODE$8&&(e=process$7.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$3():last=void 0,e}}last=void 0,e&&e.enter()},IS_IOS$2||IS_NODE$8||IS_WEBOS_WEBKIT$1||!MutationObserver$1||!document$5?!IS_IOS_PEBBLE$1&&Promise$2&&Promise$2.resolve?((promise$1=Promise$2.resolve(void 0)).constructor=Promise$2,then$1=bind$t(promise$1.then,promise$1),notify$3=function(){then$1(flush$1)}):IS_NODE$8?notify$3=function(){process$7.nextTick(flush$1)}:(macrotask$1=bind$t(macrotask$1,global$14),notify$3=function(){macrotask$1(flush$1)}):(toggle$1=!0,node$1=document$5.createTextNode(""),new MutationObserver$1(flush$1).observe(node$1,{characterData:!0}),notify$3=function(){node$1.data=toggle$1=!toggle$1}));var microtask$3=queueMicrotask||function(e){var t={fn:e,next:void 0};last&&(last.next=t),head||(head=t,notify$3()),last=t},global$13=global$1l,hostReportErrors$3=function(e,t){var r=global$13.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},perform$7=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$4=function(){this.head=null,this.tail=null};Queue$4.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var queue$3=Queue$4,global$12=global$1l,promiseNativeConstructor$1=global$12.Promise,engineIsDeno$1="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$3=engineIsDeno$1,IS_NODE$7=engineIsNode$1,engineIsBrowser$1=!IS_DENO$3&&!IS_NODE$7&&"object"==typeof window&&"object"==typeof document,global$11=global$1l,NativePromiseConstructor$8=promiseNativeConstructor$1,isCallable$F=isCallable$Z,isForced$7=isForced_1$1,inspectSource$4=inspectSource$7,wellKnownSymbol$E=wellKnownSymbol$R,IS_BROWSER$1=engineIsBrowser$1,IS_DENO$2=engineIsDeno$1,V8_VERSION$3=engineV8Version$1;NativePromiseConstructor$8&&NativePromiseConstructor$8.prototype;var SPECIES$8=wellKnownSymbol$E("species"),SUBCLASSING$1=!1,NATIVE_PROMISE_REJECTION_EVENT$3=isCallable$F(global$11.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$b=isForced$7("Promise",(function(){var e=inspectSource$4(NativePromiseConstructor$8),t=e!==String(NativePromiseConstructor$8);if(!t&&66===V8_VERSION$3)return!0;if(!V8_VERSION$3||V8_VERSION$3<51||!/native code/.test(e)){var r=new NativePromiseConstructor$8((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$8]=n,!(SUBCLASSING$1=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER$1||IS_DENO$2)&&!NATIVE_PROMISE_REJECTION_EVENT$3})),promiseConstructorDetection$1={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$b,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$3,SUBCLASSING:SUBCLASSING$1},newPromiseCapability$5={},aCallable$s=aCallable$w,$TypeError$t=TypeError,PromiseCapability$1=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$t("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$s(t),this.reject=aCallable$s(r)};newPromiseCapability$5.f=function(e){return new PromiseCapability$1(e)};var Internal$1,OwnPromiseCapability$1,PromiseWrapper$1,nativeThen$1,$$1R=_export$1,IS_NODE$6=engineIsNode$1,global$10=global$1l,call$M=functionCall$1,defineBuiltIn$s=defineBuiltIn$x,setPrototypeOf$a=objectSetPrototypeOf$1,setToStringTag$e=setToStringTag$h,setSpecies$8=setSpecies$9,aCallable$r=aCallable$w,isCallable$E=isCallable$Z,isObject$F=isObject$Q,anInstance$g=anInstance$h,speciesConstructor$8=speciesConstructor$9,task$2=task$3.set,microtask$2=microtask$3,hostReportErrors$2=hostReportErrors$3,perform$6=perform$7,Queue$3=queue$3,InternalStateModule$k=internalState$1,NativePromiseConstructor$7=promiseNativeConstructor$1,PromiseConstructorDetection$1=promiseConstructorDetection$1,newPromiseCapabilityModule$7=newPromiseCapability$5,PROMISE$1="Promise",FORCED_PROMISE_CONSTRUCTOR$a=PromiseConstructorDetection$1.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT$2=PromiseConstructorDetection$1.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING$1=PromiseConstructorDetection$1.SUBCLASSING,getInternalPromiseState$1=InternalStateModule$k.getterFor(PROMISE$1),setInternalState$h=InternalStateModule$k.set,NativePromisePrototype$4=NativePromiseConstructor$7&&NativePromiseConstructor$7.prototype,PromiseConstructor$1=NativePromiseConstructor$7,PromisePrototype$1=NativePromisePrototype$4,TypeError$c=global$10.TypeError,document$4=global$10.document,process$6=global$10.process,newPromiseCapability$4=newPromiseCapabilityModule$7.f,newGenericPromiseCapability$1=newPromiseCapability$4,DISPATCH_EVENT$1=!!(document$4&&document$4.createEvent&&global$10.dispatchEvent),UNHANDLED_REJECTION$1="unhandledrejection",REJECTION_HANDLED$1="rejectionhandled",PENDING$1=0,FULFILLED$1=1,REJECTED$1=2,HANDLED$1=1,UNHANDLED$1=2,isThenable$1=function(e){var t;return!(!isObject$F(e)||!isCallable$E(t=e.then))&&t},callReaction$1=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED$1,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED$1&&onHandleUnhandled$1(t),t.rejection=HANDLED$1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),o=!0)),r===e.promise?c(TypeError$c("Promise-chain cycle")):(n=isThenable$1(r))?call$M(n,r,l,c):l(r)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}},notify$2=function(e,t){e.notified||(e.notified=!0,microtask$2((function(){for(var r,n=e.reactions;r=n.get();)callReaction$1(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled$1(e)})))},dispatchEvent$1=function(e,t,r){var n,o;DISPATCH_EVENT$1?((n=document$4.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$10.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT$2&&(o=global$10["on"+e])?o(n):e===UNHANDLED_REJECTION$1&&hostReportErrors$2("Unhandled promise rejection",r)},onUnhandled$1=function(e){call$M(task$2,global$10,(function(){var t,r=e.facade,n=e.value;if(isUnhandled$1(e)&&(t=perform$6((function(){IS_NODE$6?process$6.emit("unhandledRejection",n,r):dispatchEvent$1(UNHANDLED_REJECTION$1,r,n)})),e.rejection=IS_NODE$6||isUnhandled$1(e)?UNHANDLED$1:HANDLED$1,t.error))throw t.value}))},isUnhandled$1=function(e){return e.rejection!==HANDLED$1&&!e.parent},onHandleUnhandled$1=function(e){call$M(task$2,global$10,(function(){var t=e.facade;IS_NODE$6?process$6.emit("rejectionHandled",t):dispatchEvent$1(REJECTION_HANDLED$1,t,e.value)}))},bind$s=function(e,t,r){return function(n){e(t,n,r)}},internalReject$1=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED$1,notify$2(e,!0))},internalResolve$1=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$c("Promise can't be resolved itself");var n=isThenable$1(t);n?microtask$2((function(){var r={done:!1};try{call$M(n,t,bind$s(internalResolve$1,r,e),bind$s(internalReject$1,r,e))}catch(t){internalReject$1(r,t,e)}})):(e.value=t,e.state=FULFILLED$1,notify$2(e,!1))}catch(t){internalReject$1({done:!1},t,e)}}};if(FORCED_PROMISE_CONSTRUCTOR$a&&(PromisePrototype$1=(PromiseConstructor$1=function(e){anInstance$g(this,PromisePrototype$1),aCallable$r(e),call$M(Internal$1,this);var t=getInternalPromiseState$1(this);try{e(bind$s(internalResolve$1,t),bind$s(internalReject$1,t))}catch(e){internalReject$1(t,e)}}).prototype,(Internal$1=function(e){setInternalState$h(this,{type:PROMISE$1,done:!1,notified:!1,parent:!1,reactions:new Queue$3,rejection:!1,state:PENDING$1,value:void 0})}).prototype=defineBuiltIn$s(PromisePrototype$1,"then",(function(e,t){var r=getInternalPromiseState$1(this),n=newPromiseCapability$4(speciesConstructor$8(this,PromiseConstructor$1));return r.parent=!0,n.ok=!isCallable$E(e)||e,n.fail=isCallable$E(t)&&t,n.domain=IS_NODE$6?process$6.domain:void 0,r.state==PENDING$1?r.reactions.add(n):microtask$2((function(){callReaction$1(n,r)})),n.promise})),OwnPromiseCapability$1=function(){var e=new Internal$1,t=getInternalPromiseState$1(e);this.promise=e,this.resolve=bind$s(internalResolve$1,t),this.reject=bind$s(internalReject$1,t)},newPromiseCapabilityModule$7.f=newPromiseCapability$4=function(e){return e===PromiseConstructor$1||e===PromiseWrapper$1?new OwnPromiseCapability$1(e):newGenericPromiseCapability$1(e)},isCallable$E(NativePromiseConstructor$7)&&NativePromisePrototype$4!==Object.prototype)){nativeThen$1=NativePromisePrototype$4.then,NATIVE_PROMISE_SUBCLASSING$1||defineBuiltIn$s(NativePromisePrototype$4,"then",(function(e,t){var r=this;return new PromiseConstructor$1((function(e,t){call$M(nativeThen$1,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete NativePromisePrototype$4.constructor}catch(e){}setPrototypeOf$a&&setPrototypeOf$a(NativePromisePrototype$4,PromisePrototype$1)}$$1R({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$a},{Promise:PromiseConstructor$1}),setToStringTag$e(PromiseConstructor$1,PROMISE$1,!1),setSpecies$8(PROMISE$1);var wellKnownSymbol$D=wellKnownSymbol$R,Iterators$6=iterators$1,ITERATOR$k=wellKnownSymbol$D("iterator"),ArrayPrototype$c=Array.prototype,isArrayIteratorMethod$6=function(e){return void 0!==e&&(Iterators$6.Array===e||ArrayPrototype$c[ITERATOR$k]===e)},classof$u=classof$y,getMethod$8=getMethod$a,isNullOrUndefined$e=isNullOrUndefined$i,Iterators$5=iterators$1,wellKnownSymbol$C=wellKnownSymbol$R,ITERATOR$j=wellKnownSymbol$C("iterator"),getIteratorMethod$a=function(e){if(!isNullOrUndefined$e(e))return getMethod$8(e,ITERATOR$j)||getMethod$8(e,"@@iterator")||Iterators$5[classof$u(e)]},call$L=functionCall$1,aCallable$q=aCallable$w,anObject$x=anObject$E,tryToString$c=tryToString$f,getIteratorMethod$9=getIteratorMethod$a,$TypeError$s=TypeError,getIterator$e=function(e,t){var r=arguments.length<2?getIteratorMethod$9(e):t;if(aCallable$q(r))return anObject$x(call$L(r,e));throw $TypeError$s(tryToString$c(e)+" is not iterable")},call$K=functionCall$1,anObject$w=anObject$E,getMethod$7=getMethod$a,iteratorClose$4=function(e,t,r){var n,o;anObject$w(e);try{if(!(n=getMethod$7(e,"return"))){if("throw"===t)throw r;return r}n=call$K(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$w(n),r},bind$r=functionBindContext$1,call$J=functionCall$1,anObject$v=anObject$E,tryToString$b=tryToString$f,isArrayIteratorMethod$5=isArrayIteratorMethod$6,lengthOfArrayLike$w=lengthOfArrayLike$A,isPrototypeOf$s=objectIsPrototypeOf$1,getIterator$d=getIterator$e,getIteratorMethod$8=getIteratorMethod$a,iteratorClose$3=iteratorClose$4,$TypeError$r=TypeError,Result$1=function(e,t){this.stopped=e,this.result=t},ResultPrototype$1=Result$1.prototype,iterate$p=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),f=bind$r(t,u),h=function(e){return n&&iteratorClose$3(n,"normal",e),new Result$1(!0,e)},m=function(e){return $?(anObject$v(e),y?f(e[0],e[1],h):f(e[0],e[1])):y?f(e,h):f(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(o=getIteratorMethod$8(e)))throw $TypeError$r(tryToString$b(e)+" is not iterable");if(isArrayIteratorMethod$5(o)){for(i=0,a=lengthOfArrayLike$w(e);a>i;i++)if((s=m(e[i]))&&isPrototypeOf$s(ResultPrototype$1,s))return s;return new Result$1(!1)}n=getIterator$d(e,o)}for(l=d?e.next:n.next;!(c=call$J(l,n)).done;){try{s=m(c.value)}catch(e){iteratorClose$3(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$s(ResultPrototype$1,s))return s}return new Result$1(!1)},wellKnownSymbol$B=wellKnownSymbol$R,ITERATOR$i=wellKnownSymbol$B("iterator"),SAFE_CLOSING$1=!1;try{var called$1=0,iteratorWithReturn$1={next:function(){return{done:!!called$1++}},return:function(){SAFE_CLOSING$1=!0}};iteratorWithReturn$1[ITERATOR$i]=function(){return this},Array.from(iteratorWithReturn$1,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$8=function(e,t){if(!t&&!SAFE_CLOSING$1)return!1;var r=!1;try{var n={};n[ITERATOR$i]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$6=promiseNativeConstructor$1,checkCorrectnessOfIteration$7=checkCorrectnessOfIteration$8,FORCED_PROMISE_CONSTRUCTOR$9=promiseConstructorDetection$1.CONSTRUCTOR,promiseStaticsIncorrectIteration$1=FORCED_PROMISE_CONSTRUCTOR$9||!checkCorrectnessOfIteration$7((function(e){NativePromiseConstructor$6.all(e).then(void 0,(function(){}))})),$$1Q=_export$1,call$I=functionCall$1,aCallable$p=aCallable$w,newPromiseCapabilityModule$6=newPromiseCapability$5,perform$5=perform$7,iterate$o=iterate$p,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration$1;$$1Q({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$6.f(t),n=r.resolve,o=r.reject,i=perform$5((function(){var r=aCallable$p(t.resolve),i=[],a=0,s=1;iterate$o(e,(function(e){var l=a++,c=!1;s++,call$I(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 $$1P=_export$1,FORCED_PROMISE_CONSTRUCTOR$8=promiseConstructorDetection$1.CONSTRUCTOR,NativePromiseConstructor$5=promiseNativeConstructor$1,getBuiltIn$f=getBuiltIn$n,isCallable$D=isCallable$Z,defineBuiltIn$r=defineBuiltIn$x,NativePromisePrototype$3=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype;if($$1P({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$8,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable$D(NativePromiseConstructor$5)){var method$e=getBuiltIn$f("Promise").prototype.catch;NativePromisePrototype$3.catch!==method$e&&defineBuiltIn$r(NativePromisePrototype$3,"catch",method$e,{unsafe:!0})}var $$1O=_export$1,call$H=functionCall$1,aCallable$o=aCallable$w,newPromiseCapabilityModule$5=newPromiseCapability$5,perform$4=perform$7,iterate$n=iterate$p,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration$1;$$1O({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.reject,o=perform$4((function(){var o=aCallable$o(t.resolve);iterate$n(e,(function(e){call$H(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$1N=_export$1,call$G=functionCall$1,newPromiseCapabilityModule$4=newPromiseCapability$5,FORCED_PROMISE_CONSTRUCTOR$7=promiseConstructorDetection$1.CONSTRUCTOR;$$1N({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$7},{reject:function(e){var t=newPromiseCapabilityModule$4.f(this);return call$G(t.reject,void 0,e),t.promise}});var anObject$u=anObject$E,isObject$E=isObject$Q,newPromiseCapability$3=newPromiseCapability$5,promiseResolve$4=function(e,t){if(anObject$u(e),isObject$E(t)&&t.constructor===e)return t;var r=newPromiseCapability$3.f(e);return(0,r.resolve)(t),r.promise},$$1M=_export$1,getBuiltIn$e=getBuiltIn$n,FORCED_PROMISE_CONSTRUCTOR$6=promiseConstructorDetection$1.CONSTRUCTOR,promiseResolve$3=promiseResolve$4;getBuiltIn$e("Promise"),$$1M({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$6},{resolve:function(e){return promiseResolve$3(this,e)}});var classof$t=classof$y,$String$7=String,toString$A=function(e){if("Symbol"===classof$t(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$7(e)},uncurryThis$1j=functionUncurryThis$1,toIntegerOrInfinity$k=toIntegerOrInfinity$n,toString$z=toString$A,requireObjectCoercible$i=requireObjectCoercible$l,charAt$d=uncurryThis$1j("".charAt),charCodeAt$5=uncurryThis$1j("".charCodeAt),stringSlice$i=uncurryThis$1j("".slice),createMethod$d=function(e){return function(t,r){var n,o,i=toString$z(requireObjectCoercible$i(t)),a=toIntegerOrInfinity$k(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$5(i,a))<55296||n>56319||a+1===s||(o=charCodeAt$5(i,a+1))<56320||o>57343?e?charAt$d(i,a):n:e?stringSlice$i(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte$1={codeAt:createMethod$d(!1),charAt:createMethod$d(!0)},charAt$c=stringMultibyte$1.charAt,toString$y=toString$A,InternalStateModule$j=internalState$1,defineIterator$5=iteratorDefine$1,createIterResultObject$6=createIterResultObject$8,STRING_ITERATOR$1="String Iterator",setInternalState$g=InternalStateModule$j.set,getInternalState$a=InternalStateModule$j.getterFor(STRING_ITERATOR$1);defineIterator$5(String,"String",(function(e){setInternalState$g(this,{type:STRING_ITERATOR$1,string:toString$y(e),index:0})}),(function(){var e,t=getInternalState$a(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$6(void 0,!0):(e=charAt$c(r,n),t.index+=e.length,createIterResultObject$6(e,!1))}));var global$$=global$1l,DOMIterables$5=domIterables$1,DOMTokenListPrototype$3=domTokenListPrototype$1,ArrayIteratorMethods$1=es_array_iterator$1,createNonEnumerableProperty$e=createNonEnumerableProperty$j,wellKnownSymbol$A=wellKnownSymbol$R,ITERATOR$h=wellKnownSymbol$A("iterator"),TO_STRING_TAG$6=wellKnownSymbol$A("toStringTag"),ArrayValues$1=ArrayIteratorMethods$1.values,handlePrototype$2=function(e,t){if(e){if(e[ITERATOR$h]!==ArrayValues$1)try{createNonEnumerableProperty$e(e,ITERATOR$h,ArrayValues$1)}catch(t){e[ITERATOR$h]=ArrayValues$1}if(e[TO_STRING_TAG$6]||createNonEnumerableProperty$e(e,TO_STRING_TAG$6,t),DOMIterables$5[t])for(var r in ArrayIteratorMethods$1)if(e[r]!==ArrayIteratorMethods$1[r])try{createNonEnumerableProperty$e(e,r,ArrayIteratorMethods$1[r])}catch(t){e[r]=ArrayIteratorMethods$1[r]}}};for(var COLLECTION_NAME$2 in DOMIterables$5)handlePrototype$2(global$$[COLLECTION_NAME$2]&&global$$[COLLECTION_NAME$2].prototype,COLLECTION_NAME$2);handlePrototype$2(DOMTokenListPrototype$3,"DOMTokenList");var uncurryThis$1i=functionUncurryThis$1,defineBuiltIn$q=defineBuiltIn$x,DatePrototype$1=Date.prototype,INVALID_DATE$1="Invalid Date",TO_STRING$3="toString",nativeDateToString$1=uncurryThis$1i(DatePrototype$1[TO_STRING$3]),thisTimeValue$3=uncurryThis$1i(DatePrototype$1.getTime);String(new Date(NaN))!=INVALID_DATE$1&&defineBuiltIn$q(DatePrototype$1,TO_STRING$3,(function(){var e=thisTimeValue$3(this);return e==e?nativeDateToString$1(this):INVALID_DATE$1}));var $$1L=_export$1,NativePromiseConstructor$4=promiseNativeConstructor$1,fails$1j=fails$1C,getBuiltIn$d=getBuiltIn$n,isCallable$C=isCallable$Z,speciesConstructor$7=speciesConstructor$9,promiseResolve$2=promiseResolve$4,defineBuiltIn$p=defineBuiltIn$x,NativePromisePrototype$2=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,NON_GENERIC=!!NativePromiseConstructor$4&&fails$1j((function(){NativePromisePrototype$2.finally.call({then:function(){}},(function(){}))}));if($$1L({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor$7(this,getBuiltIn$d("Promise")),r=isCallable$C(e);return this.then(r?function(r){return promiseResolve$2(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve$2(t,e()).then((function(){throw r}))}:e)}}),isCallable$C(NativePromiseConstructor$4)){var method$d=getBuiltIn$d("Promise").prototype.finally;NativePromisePrototype$2.finally!==method$d&&defineBuiltIn$p(NativePromisePrototype$2,"finally",method$d,{unsafe:!0})}var isCallable$B=isCallable$Z,isObject$D=isObject$Q,setPrototypeOf$9=objectSetPrototypeOf$1,inheritIfRequired$7=function(e,t,r){var n,o;return setPrototypeOf$9&&isCallable$B(n=t.constructor)&&n!==r&&isObject$D(o=n.prototype)&&o!==r.prototype&&setPrototypeOf$9(e,o),e},uncurryThis$1h=functionUncurryThis$1,thisNumberValue$4=uncurryThis$1h(1..valueOf),whitespaces$a="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$1g=functionUncurryThis$1,requireObjectCoercible$h=requireObjectCoercible$l,toString$x=toString$A,whitespaces$9=whitespaces$a,replace$b=uncurryThis$1g("".replace),whitespace="["+whitespaces$9+"]",ltrim$1=RegExp("^"+whitespace+whitespace+"*"),rtrim$1=RegExp(whitespace+whitespace+"*$"),createMethod$c=function(e){return function(t){var r=toString$x(requireObjectCoercible$h(t));return 1&e&&(r=replace$b(r,ltrim$1,"")),2&e&&(r=replace$b(r,rtrim$1,"")),r}},stringTrim$1={start:createMethod$c(1),end:createMethod$c(2),trim:createMethod$c(3)},DESCRIPTORS$z=descriptors$1,global$_=global$1l,uncurryThis$1f=functionUncurryThis$1,isForced$6=isForced_1$1,defineBuiltIn$o=defineBuiltIn$x,hasOwn$z=hasOwnProperty_1$1,inheritIfRequired$6=inheritIfRequired$7,isPrototypeOf$r=objectIsPrototypeOf$1,isSymbol$7=isSymbol$b,toPrimitive$b=toPrimitive$d,fails$1i=fails$1C,getOwnPropertyNames$5=objectGetOwnPropertyNames$1.f,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor$1.f,defineProperty$j=objectDefineProperty$1.f,thisNumberValue$3=thisNumberValue$4,trim$d=stringTrim$1.trim,NUMBER$1="Number",NativeNumber$1=global$_[NUMBER$1],NumberPrototype$1=NativeNumber$1.prototype,TypeError$b=global$_.TypeError,arraySlice$j=uncurryThis$1f("".slice),charCodeAt$4=uncurryThis$1f("".charCodeAt),toNumeric$1=function(e){var t=toPrimitive$b(e,"number");return"bigint"==typeof t?t:toNumber$1(t)},toNumber$1=function(e){var t,r,n,o,i,a,s,l,c=toPrimitive$b(e,"number");if(isSymbol$7(c))throw TypeError$b("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=trim$d(c),43===(t=charCodeAt$4(c,0))||45===t){if(88===(r=charCodeAt$4(c,2))||120===r)return NaN}else if(48===t){switch(charCodeAt$4(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=arraySlice$j(c,2)).length,s=0;s<a;s++)if((l=charCodeAt$4(i,s))<48||l>o)return NaN;return parseInt(i,n)}return+c};if(isForced$6(NUMBER$1,!NativeNumber$1(" 0o1")||!NativeNumber$1("0b1")||NativeNumber$1("+0x1"))){for(var key$2,NumberWrapper$1=function(e){var t=arguments.length<1?0:NativeNumber$1(toNumeric$1(e)),r=this;return isPrototypeOf$r(NumberPrototype$1,r)&&fails$1i((function(){thisNumberValue$3(r)}))?inheritIfRequired$6(Object(t),r,NumberWrapper$1):t},keys$b=DESCRIPTORS$z?getOwnPropertyNames$5(NativeNumber$1):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),j$2=0;keys$b.length>j$2;j$2++)hasOwn$z(NativeNumber$1,key$2=keys$b[j$2])&&!hasOwn$z(NumberWrapper$1,key$2)&&defineProperty$j(NumberWrapper$1,key$2,getOwnPropertyDescriptor$8(NativeNumber$1,key$2));NumberWrapper$1.prototype=NumberPrototype$1,NumberPrototype$1.constructor=NumberWrapper$1,defineBuiltIn$o(global$_,NUMBER$1,NumberWrapper$1,{constructor:!0})}var DESCRIPTORS$y=descriptors$1,FUNCTION_NAME_EXISTS=functionName$1.EXISTS,uncurryThis$1e=functionUncurryThis$1,defineProperty$i=objectDefineProperty$1.f,FunctionPrototype$3=Function.prototype,functionToString$2=uncurryThis$1e(FunctionPrototype$3.toString),nameRE=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,regExpExec$2=uncurryThis$1e(nameRE.exec),NAME$2="name";DESCRIPTORS$y&&!FUNCTION_NAME_EXISTS&&defineProperty$i(FunctionPrototype$3,NAME$2,{configurable:!0,get:function(){try{return regExpExec$2(nameRE,functionToString$2(this))[1]}catch(e){return""}}});var DESCRIPTORS$x=descriptors$1,isArray$5=isArray$9,$TypeError$q=TypeError,getOwnPropertyDescriptor$7=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$x&&!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(isArray$5(e)&&!getOwnPropertyDescriptor$7(e,"length").writable)throw $TypeError$q("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$a=tryToString$f,$TypeError$p=TypeError,deletePropertyOrThrow$7=function(e,t){if(!delete e[t])throw $TypeError$p("Cannot delete property "+tryToString$a(t)+" of "+tryToString$a(e))},$$1K=_export$1,toObject$n=toObject$u,toAbsoluteIndex$e=toAbsoluteIndex$g,toIntegerOrInfinity$j=toIntegerOrInfinity$n,lengthOfArrayLike$v=lengthOfArrayLike$A,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,arraySpeciesCreate$2=arraySpeciesCreate$5,createProperty$6=createProperty$8,deletePropertyOrThrow$6=deletePropertyOrThrow$7,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$8,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$4("splice"),max$6=Math.max,min$b=Math.min;$$1K({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{splice:function(e,t){var r,n,o,i,a,s,l=toObject$n(this),c=lengthOfArrayLike$v(l),u=toAbsoluteIndex$e(e,c),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=c-u):(r=$-2,n=min$b(max$6(toIntegerOrInfinity$j(t),0),c-u)),doesNotExceedSafeInteger$1(c+r-n),o=arraySpeciesCreate$2(l,n),i=0;i<n;i++)(a=u+i)in l&&createProperty$6(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$6(l,s);for(i=c;i>c-n+r;i--)deletePropertyOrThrow$6(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$6(l,s);for(i=0;i<r;i++)l[i+u]=arguments[i+2];return setArrayLength$1(l,c-n+r),o}});var global$Z=global$1l,fails$1h=fails$1C,uncurryThis$1d=functionUncurryThis$1,toString$w=toString$A,trim$c=stringTrim$1.trim,whitespaces$8=whitespaces$a,$parseInt$3=global$Z.parseInt,Symbol$6=global$Z.Symbol,ITERATOR$g=Symbol$6&&Symbol$6.iterator,hex$1=/^[+-]?0x/i,exec$8=uncurryThis$1d(hex$1.exec),FORCED$p=8!==$parseInt$3(whitespaces$8+"08")||22!==$parseInt$3(whitespaces$8+"0x16")||ITERATOR$g&&!fails$1h((function(){$parseInt$3(Object(ITERATOR$g))})),numberParseInt$1=FORCED$p?function(e,t){var r=trim$c(toString$w(e));return $parseInt$3(r,t>>>0||(exec$8(hex$1,r)?16:10))}:$parseInt$3,$$1J=_export$1,$parseInt$2=numberParseInt$1;$$1J({global:!0,forced:parseInt!=numberParseInt$1},{parseInt:numberParseInt$1});var $$1I=_export$2,$find$3=arrayIteration$2.find,FIND$1="find",SKIPS_HOLES$1=!0;FIND$1 in[]&&Array(1)[FIND$1]((function(){SKIPS_HOLES$1=!1})),$$1I({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find$3(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$d=entryVirtual$o,find$8=entryVirtual$d("Array").find,isPrototypeOf$q=objectIsPrototypeOf$2,method$c=find$8,ArrayPrototype$b=Array.prototype,find$7=function(e){var t=e.find;return e===ArrayPrototype$b||isPrototypeOf$q(ArrayPrototype$b,e)&&t===ArrayPrototype$b.find?method$c:t},parent$1i=find$7,find$6=parent$1i,parent$1h=find$6,find$5=parent$1h,parent$1g=find$5,find$4=parent$1g,find$3=find$4,find$2=find$3,_findInstanceProperty=getDefaultExportFromCjs(find$2),$$1H=_export$2;$$1H({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var path$f=path$C,isNan$5=path$f.Number.isNaN,parent$1f=isNan$5,isNan$4=parent$1f,parent$1e=isNan$4,isNan$3=parent$1e,parent$1d=isNan$3,isNan$2=parent$1d,isNan$1=isNan$2,isNan=isNan$1,_Number$isNaN=getDefaultExportFromCjs(isNan),entryVirtual$c=entryVirtual$o,keys$a=entryVirtual$c("Array").keys,parent$1c=keys$a,keys$9=parent$1c,classof$s=classof$K,hasOwn$y=hasOwnProperty_1$2,isPrototypeOf$p=objectIsPrototypeOf$2,method$b=keys$9,ArrayPrototype$a=Array.prototype,DOMIterables$4={DOMTokenList:!0,NodeList:!0},keys$8=function(e){var t=e.keys;return e===ArrayPrototype$a||isPrototypeOf$p(ArrayPrototype$a,e)&&t===ArrayPrototype$a.keys||hasOwn$y(DOMIterables$4,classof$s(e))?method$b:t},parent$1b=keys$8,keys$7=parent$1b,parent$1a=keys$7,keys$6=parent$1a,keys$5=keys$6,keys$4=keys$5,_keysInstanceProperty=getDefaultExportFromCjs(keys$4),hasOwn$x=hasOwnProperty_1$2,isDataDescriptor$1=function(e){return void 0!==e&&(hasOwn$x(e,"value")||hasOwn$x(e,"writable"))},$$1G=_export$2,call$F=functionCall$2,isObject$C=isObject$13,anObject$t=anObject$S,isDataDescriptor=isDataDescriptor$1,getOwnPropertyDescriptorModule$4=objectGetOwnPropertyDescriptor$2,getPrototypeOf$6=objectGetPrototypeOf$2;function get$b(e,t){var r,n,o=arguments.length<3?e:arguments[2];return anObject$t(e)===o?e[t]:(r=getOwnPropertyDescriptorModule$4.f(e,t))?isDataDescriptor(r)?r.value:void 0===r.get?void 0:call$F(r.get,o):isObject$C(n=getPrototypeOf$6(e))?get$b(n,t,o):void 0}$$1G({target:"Reflect",stat:!0},{get:get$b});var path$e=path$C,get$a=path$e.Reflect.get,parent$19=get$a,get$9=parent$19,parent$18=get$9,get$8=parent$18,parent$17=get$8,get$7=parent$17,get$6=get$7,_Reflect$get$1=getDefaultExportFromCjs(get$6),get$5=get$6,_Reflect$get=getDefaultExportFromCjs(get$5),WrappedWellKnownSymbolModule=wellKnownSymbolWrapped$1,toPrimitive$a=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$16=toPrimitive$a,toPrimitive$9=parent$16,parent$15=toPrimitive$9,toPrimitive$8=parent$15,parent$14=toPrimitive$8,toPrimitive$7=parent$14,toPrimitive$6=toPrimitive$7,_Symbol$toPrimitive$1=getDefaultExportFromCjs(toPrimitive$6),toPrimitive$5=toPrimitive$6,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive$5);function ownKeys$4(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$2(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$4(Object(o),!0)).call(r,(function(t){_defineProperty$4(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys$4(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _typeof$3(e){return(_typeof$3="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$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(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$7(e,t,r){return t&&_defineProperties$7(e.prototype,t),r&&_defineProperties$7(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$4(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 _toConsumableArray$3(e){return _arrayWithoutHoles$3(e)||_iterableToArray$3(e)||_unsupportedIterableToArray$4(e)||_nonIterableSpread$3()}function _arrayWithoutHoles$3(e){if(_Array$isArray(e))return _arrayLikeToArray$4(e)}function _iterableToArray$3(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$4(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$4(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$4(e,t):void 0}}function _arrayLikeToArray$4(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$3(){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$5(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$5(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$5(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],$=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),$){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($-1);c<$;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),$){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(d=1,l=new Array($-1);d<$;d++)l[d-1]=arguments[d];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,EventEmitter$1=getDefaultExportFromCjs(eventemitter3Exports),$$1F=_export$2,$some$3=arrayIteration$2.some,arrayMethodIsStrict$d=arrayMethodIsStrict$l,STRICT_METHOD$a=arrayMethodIsStrict$d("some");$$1F({target:"Array",proto:!0,forced:!STRICT_METHOD$a},{some:function(e){return $some$3(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$b=entryVirtual$o,some$6=entryVirtual$b("Array").some,isPrototypeOf$o=objectIsPrototypeOf$2,method$a=some$6,ArrayPrototype$9=Array.prototype,some$5=function(e){var t=e.some;return e===ArrayPrototype$9||isPrototypeOf$o(ArrayPrototype$9,e)&&t===ArrayPrototype$9.some?method$a:t},parent$13=some$5,some$4=parent$13,parent$12=some$4,some$3=parent$12,parent$11=some$3,some$2=parent$11,some$1=some$2,some2=some$1,_someInstanceProperty=getDefaultExportFromCjs(some2),toIntegerOrInfinity$i=toIntegerOrInfinity$s,toString$v=toString$M,requireObjectCoercible$g=requireObjectCoercible$q,$RangeError$b=RangeError,stringRepeat$2=function(e){var t=toString$v(requireObjectCoercible$g(this)),r="",n=toIntegerOrInfinity$i(e);if(n<0||n==1/0)throw $RangeError$b("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$1c=functionUncurryThis$2,toLength$i=toLength$m,toString$u=toString$M,$repeat$2=stringRepeat$2,requireObjectCoercible$f=requireObjectCoercible$q,repeat$2=uncurryThis$1c($repeat$2),stringSlice$h=uncurryThis$1c("".slice),ceil$2=Math.ceil,createMethod$b=function(e){return function(t,r,n){var o,i,a=toString$u(requireObjectCoercible$f(t)),s=toLength$i(r),l=a.length,c=void 0===n?" ":toString$u(n);return s<=l||""==c?a:((i=repeat$2(c,ceil$2((o=s-l)/c.length))).length>o&&(i=stringSlice$h(i,0,o)),e?a+i:i+a)}},stringPad$1={start:createMethod$b(!1),end:createMethod$b(!0)},userAgent$b=engineUserAgent$2,stringPadWebkitBug$1=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$b),$$1E=_export$2,$padStart$1=stringPad$1.start,WEBKIT_BUG$1=stringPadWebkitBug$1;$$1E({target:"String",proto:!0,forced:WEBKIT_BUG$1},{padStart:function(e){return $padStart$1(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$o,padStart$7=entryVirtual$a("String").padStart,isPrototypeOf$n=objectIsPrototypeOf$2,method$9=padStart$7,StringPrototype$3=String.prototype,padStart$6=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$3||isPrototypeOf$n(StringPrototype$3,e)&&t===StringPrototype$3.padStart?method$9:t},parent$10=padStart$6,padStart$5=parent$10,parent$$=padStart$5,padStart$4=parent$$,parent$_=padStart$4,padStart$3=parent$_,padStart$2=padStart$3,padStart$1=padStart$2,_padStartInstanceProperty=getDefaultExportFromCjs(padStart$1),path$d=path$C,setInterval$5=path$d.setInterval,parent$Z=setInterval$5,setInterval$4=parent$Z,parent$Y=setInterval$4,setInterval$3=parent$Y,setInterval$2=setInterval$3,setInterval$1=setInterval$2,_setInterval=getDefaultExportFromCjs(setInterval$1),global$Y=global$1I,fails$1g=fails$20,uncurryThis$1b=functionUncurryThis$2,toString$t=toString$M,trim$b=stringTrim$2.trim,whitespaces$7=whitespaces$d,charAt$b=uncurryThis$1b("".charAt),$parseFloat$5=global$Y.parseFloat,Symbol$5=global$Y.Symbol,ITERATOR$f=Symbol$5&&Symbol$5.iterator,FORCED$o=1/$parseFloat$5(whitespaces$7+"-0")!=-1/0||ITERATOR$f&&!fails$1g((function(){$parseFloat$5(Object(ITERATOR$f))})),numberParseFloat$2=FORCED$o?function(e){var t=trim$b(toString$t(e)),r=$parseFloat$5(t);return 0===r&&"-"==charAt$b(t,0)?-0:r}:$parseFloat$5,$$1D=_export$2,$parseFloat$4=numberParseFloat$2;$$1D({global:!0,forced:parseFloat!=numberParseFloat$2},{parseFloat:numberParseFloat$2});var path$c=path$C,_parseFloat$6=path$c.parseFloat,parent$X=_parseFloat$6,_parseFloat$5=parent$X,parent$W=_parseFloat$5,_parseFloat$4=parent$W,parent$V=_parseFloat$4,_parseFloat$3=parent$V,_parseFloat$2=_parseFloat$3,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME$6=functionName$2.PROPER,fails$1f=fails$20,whitespaces$6=whitespaces$d,non$1="
",stringTrimForced$1=function(e){return fails$1f((function(){return!!whitespaces$6[e]()||non$1[e]()!==non$1||PROPER_FUNCTION_NAME$6&&whitespaces$6[e].name!==e}))},$$1C=_export$2,$trim$1=stringTrim$2.trim,forcedStringTrimMethod$1=stringTrimForced$1;$$1C({target:"String",proto:!0,forced:forcedStringTrimMethod$1("trim")},{trim:function(){return $trim$1(this)}});var entryVirtual$9=entryVirtual$o,trim$a=entryVirtual$9("String").trim,isPrototypeOf$m=objectIsPrototypeOf$2,method$8=trim$a,StringPrototype$2=String.prototype,trim$9=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$m(StringPrototype$2,e)&&t===StringPrototype$2.trim?method$8:t},parent$U=trim$9,trim$8=parent$U,parent$T=trim$8,trim$7=parent$T,parent$S=trim$7,trim$6=parent$S,trim$5=trim$6,trim$4=trim$5,_trimInstanceProperty=getDefaultExportFromCjs(trim$4),arraySlice$i=arraySliceSimple$2,floor$h=Math.floor,mergeSort$2=function(e,t){var r=e.length,n=floor$h(r/2);return r<8?insertionSort$2(e,t):merge$2(e,mergeSort$2(arraySlice$i(e,0,n),t),mergeSort$2(arraySlice$i(e,n),t),t)},insertionSort$2=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$2=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$4=mergeSort$2,userAgent$a=engineUserAgent$2,firefox$2=userAgent$a.match(/firefox\/(\d+)/i),engineFfVersion$2=!!firefox$2&&+firefox$2[1],UA$2=engineUserAgent$2,engineIsIeOrEdge$2=/MSIE|Trident/.test(UA$2),userAgent$9=engineUserAgent$2,webkit$2=userAgent$9.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion$2=!!webkit$2&&+webkit$2[1],$$1B=_export$2,uncurryThis$1a=functionUncurryThis$2,aCallable$n=aCallable$I,toObject$m=toObject$F,lengthOfArrayLike$u=lengthOfArrayLike$J,deletePropertyOrThrow$5=deletePropertyOrThrow$9,toString$s=toString$M,fails$1e=fails$20,internalSort$4=arraySort$4,arrayMethodIsStrict$c=arrayMethodIsStrict$l,FF$5=engineFfVersion$2,IE_OR_EDGE$4=engineIsIeOrEdge$2,V8$4=engineV8Version$2,WEBKIT$4=engineWebkitVersion$2,test$3=[],nativeSort$4=uncurryThis$1a(test$3.sort),push$o=uncurryThis$1a(test$3.push),FAILS_ON_UNDEFINED$2=fails$1e((function(){test$3.sort(void 0)})),FAILS_ON_NULL$2=fails$1e((function(){test$3.sort(null)})),STRICT_METHOD$9=arrayMethodIsStrict$c("sort"),STABLE_SORT$4=!fails$1e((function(){if(V8$4)return V8$4<70;if(!(FF$5&&FF$5>3)){if(IE_OR_EDGE$4)return!0;if(WEBKIT$4)return WEBKIT$4<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$3.push({k:t+n,v:r})}for(test$3.sort((function(e,t){return t.v-e.v})),n=0;n<test$3.length;n++)t=test$3[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$n=FAILS_ON_UNDEFINED$2||!FAILS_ON_NULL$2||!STRICT_METHOD$9||!STABLE_SORT$4,getSortCompare$4=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$s(t)>toString$s(r)?1:-1}};$$1B({target:"Array",proto:!0,forced:FORCED$n},{sort:function(e){void 0!==e&&aCallable$n(e);var t=toObject$m(this);if(STABLE_SORT$4)return void 0===e?nativeSort$4(t):nativeSort$4(t,e);var r,n,o=[],i=lengthOfArrayLike$u(t);for(n=0;n<i;n++)n in t&&push$o(o,t[n]);for(internalSort$4(o,getSortCompare$4(e)),r=lengthOfArrayLike$u(o),n=0;n<r;)t[n]=o[n++];for(;n<i;)deletePropertyOrThrow$5(t,n++);return t}});var entryVirtual$8=entryVirtual$o,sort$6=entryVirtual$8("Array").sort,isPrototypeOf$l=objectIsPrototypeOf$2,method$7=sort$6,ArrayPrototype$8=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$8||isPrototypeOf$l(ArrayPrototype$8,e)&&t===ArrayPrototype$8.sort?method$7:t},parent$R=sort$5,sort$4=parent$R,parent$Q=sort$4,sort$3=parent$Q,parent$P=sort$3,sort$2=parent$P,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),$$1A=_export$2,uncurryThis$19=functionUncurryThis$2,$Date$1=Date,thisTimeValue$2=uncurryThis$19($Date$1.prototype.getTime);$$1A({target:"Date",stat:!0},{now:function(){return thisTimeValue$2(new $Date$1)}});var _context,path$b=path$C,now$5=path$b.Date.now,parent$O=now$5,now$4=parent$O,parent$N=now$4,now$3=parent$N,parent$M=now$3,now$2=parent$M,now$1=now$2,now2=now$1,_Date$now=getDefaultExportFromCjs(now2),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$7(this,e),this.bufferedList=t}return _createClass$7(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$1={};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$1.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$1.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$1.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$1.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$3(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util$1.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$1.hasClass(e,t)||(e.className&&"object"===_typeof$3(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util$1.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$1.hasClass(e,t))_forEachInstanceProperty(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof$3(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util$1.toggleClass=function(e,t){var r;e&&_forEachInstanceProperty(r=t.split(/\s+/g)).call(r,(function(t){util$1.hasClass(e,t)?util$1.removeClass(e,t):util$1.addClass(e,t)}))},util$1.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util$1.typeOf(e[r]))t.push(e[r]);else if("Object"===util$1.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$1.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$1.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util$1.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$1.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util$1).call(util$1,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util$1).call(util$1,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util$1).call(util$1,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util$1.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$1.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util$1.deepCopy=function(e,t){var r;if("Object"===util$1.typeOf(t)&&"Object"===util$1.typeOf(e))return _forEachInstanceProperty(r=_Object$keys(t)).call(r,(function(r){if("Object"!==util$1.typeOf(t[r])||t[r]instanceof Node)if("Array"===util$1.typeOf(t[r])){var n;e[r]="Array"===util$1.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$1.deepCopy(e[r],t[r])})),e},util$1.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util$1.typeOf(t[r])&&"Array"===util$1.typeOf(e[r])?"Array"===util$1.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray$3(t[r])):util$1.typeOf(e[r])!==util$1.typeOf(t[r])||null===e[r]||"Object"!==util$1.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util$1.deepMerge(e[r],t[r])})),e},util$1.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$1.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$1.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=_setInterval(_bindInstanceProperty(r).call(r,e),n))},util$1.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util$1.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=_setTimeout((function(){t(),util$1.clearTimeout(e,n)}),r);return e._timers.push(n),n},util$1.clearTimeout=function(e,t){var r=e._timers;if("Array"===util$1.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$1.clearAllTimers=function(e){var t=e._timers;"Array"===util$1.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util$1.createImgBtn=function(e,t,r,n){var o,i,a,s,l,c,u,$,d,p,y,f,h=util$1.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(h.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)),$=_parseFloat$1(_trimInstanceProperty(o=_sliceInstanceProperty(n).call(n,0,_indexOfInstanceProperty(n).call(n,e))).call(o)),d=e,!1)})),h.style.width=_concatInstanceProperty(i="".concat(u)).call(i,d),h.style.height=_concatInstanceProperty(a="".concat($)).call(a,d),h.style.backgroundSize=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="".concat(u)).call(c,d," ")).call(l,$)).call(s,d),h.style.margin="start"===e?_concatInstanceProperty(p=_concatInstanceProperty(y=_concatInstanceProperty(f="-".concat($/2)).call(f,d," auto auto -")).call(y,u/2)).call(p,d):"auto 5px auto 5px");return h},util$1.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$1.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util$1.checkIsFunction=function(e){return e&&"function"==typeof e},util$1.checkIsObject=function(e){return null!==e&&"object"===_typeof$3(e)},util$1.hide=function(e){e.style.display="none"},util$1.show=function(e,t){e.style.display=t||"block"},util$1.isUndefined=function(e){if(null==e)return!0},util$1.isNotNull=function(e){return!(null==e)},util$1.setStyleFromCsstext=function(e,t){if(t)if("String"===util$1.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$1.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$1.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$1.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$1.stopPropagation=function(e){e&&e.stopPropagation()},util$1.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util$1.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util$1.checkTouchSupport=function(){return"ontouchstart"in window},util$1.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$1.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$1.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util$1.getHostFromUrl=function(e){if("String"!==util$1.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util$1.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util$1.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util$1.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},util$1.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$1.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util$1.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util$1.createPositionBar=function(e,t){var r=util$1.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util$1.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$1.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},util$1.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$1.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$1.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$1.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","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],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)}}},version$2="3.0.12",ERROR_MAP={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Errors=_createClass$7((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};_classCallCheck$7(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var o,i=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,c=t.src,u=t.currentSrc,$=t.media,d=$.readyState,p=$.networkState,y=r.errorCode||i.code;ERROR_MAP[y]&&(y=ERROR_MAP[y]);var f={playerVersion:version$2,currentTime:s,duration:a,ended:l,readyState:d,networkState:p,src:c||u,errorType:r.errorType,errorCode:y,message:r.errorMessage||i.message,mediaError:i,originError:r.originError?r.originError.stack:"",host:util$1.getHostFromUrl(c||u)};return r.ext&&_mapInstanceProperty(o=_Object$keys(r.ext)).call(o,(function(e){f[e]=r.ext[e]})),f}if(arguments.length>1){for(var h={playerVersion:version$2,domain:document.domain},m=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],b=0;b<arguments.length;b++)h[m[b]]=arguments[b];return h.ex=n?(n[arguments[0]]||{}).msg:"",h}})),TIME_UPDATE="timeupdate",WAITING="waiting",LOADED_DATA="loadeddata",LOAD_START="loadstart",DEFINITION_CHANGE="definition_change",AFTER_DEFINITION_CHANGE="after_definition_change";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,$,d,p=($=this.__hooks[e]).call.apply($,_concatInstanceProperty(u=[this,this]).call(u,_sliceInstanceProperty(Array.prototype).call(arguments)));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$3(o)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty(d=[this,t,n.next]).call(d,_sliceInstanceProperty(Array.prototype).call(arguments)));else if(void 0===p){var y;callHandler.apply(void 0,_concatInstanceProperty(y=[this,t,n.next]).call(y,_sliceInstanceProperty(Array.prototype).call(arguments)))}}catch(t){var f,h;throw t.message=_concatInstanceProperty(f=_concatInstanceProperty(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(f,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 useHooks(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(r&&(r[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function removeHooks(e,t){var r=this.__hooks;r&&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 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$7(this,e),util$1.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$7(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$1.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$2(_objectSpread2$2({},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$1.clearAllTimers(this),util$1.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:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),fails$1d=fails$20,wellKnownSymbol$z=wellKnownSymbol$1c,DESCRIPTORS$w=descriptors$2,IS_PURE$2=isPure$2,ITERATOR$e=wellKnownSymbol$z("iterator"),urlConstructorDetection$1=!fails$1d((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$2&&!e.toJSON||!t.size&&(IS_PURE$2||!DESCRIPTORS$w)||!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$e]||"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$18=functionUncurryThis$2,maxInt$1=2147483647,base$1=36,tMin$1=1,tMax$1=26,skew$1=38,damp$1=700,initialBias$1=72,initialN$1=128,delimiter$1="-",regexNonASCII$1=/[^\0-\u007E]/,regexSeparators$1=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR$1="Overflow: input needs wider integers to process",baseMinusTMin$1=base$1-tMin$1,$RangeError$a=RangeError,exec$7=uncurryThis$18(regexSeparators$1.exec),floor$g=Math.floor,fromCharCode$1=String.fromCharCode,charCodeAt$3=uncurryThis$18("".charCodeAt),join$9=uncurryThis$18([].join),push$n=uncurryThis$18([].push),replace$a=uncurryThis$18("".replace),split$6=uncurryThis$18("".split),toLowerCase$3=uncurryThis$18("".toLowerCase),ucs2decode$1=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt$3(e,r++);if(o>=55296&&o<=56319&&r<n){var i=charCodeAt$3(e,r++);56320==(64512&i)?push$n(t,((1023&o)<<10)+(1023&i)+65536):(push$n(t,o),r--)}else push$n(t,o)}return t},digitToBasic$1=function(e){return e+22+75*(e<26)},adapt$1=function(e,t,r){var n=0;for(e=r?floor$g(e/damp$1):e>>1,e+=floor$g(e/t);e>baseMinusTMin$1*tMax$1>>1;)e=floor$g(e/baseMinusTMin$1),n+=base$1;return floor$g(n+(baseMinusTMin$1+1)*e/(e+skew$1))},encode$2=function(e){var t,r,n=[],o=(e=ucs2decode$1(e)).length,i=initialN$1,a=0,s=initialBias$1;for(t=0;t<e.length;t++)(r=e[t])<128&&push$n(n,fromCharCode$1(r));var l=n.length,c=l;for(l&&push$n(n,delimiter$1);c<o;){var u=maxInt$1;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var $=c+1;if(u-i>floor$g((maxInt$1-a)/$))throw $RangeError$a(OVERFLOW_ERROR$1);for(a+=(u-i)*$,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++a>maxInt$1)throw $RangeError$a(OVERFLOW_ERROR$1);if(r==i){for(var d=a,p=base$1;;){var y=p<=s?tMin$1:p>=s+tMax$1?tMax$1:p-s;if(d<y)break;var f=d-y,h=base$1-y;push$n(n,fromCharCode$1(digitToBasic$1(y+f%h))),d=floor$g(f/h),p+=base$1}push$n(n,fromCharCode$1(digitToBasic$1(d))),s=adapt$1(a,$,c==l),a=0,c++}}a++,i++}return join$9(n,"")},stringPunycodeToAscii$1=function(e){var t,r,n=[],o=split$6(replace$a(toLowerCase$3(e),regexSeparators$1,"."),".");for(t=0;t<o.length;t++)r=o[t],push$n(n,exec$7(regexNonASCII$1,r)?"xn--"+encode$2(r):r);return join$9(n,".")},defineBuiltIn$n=defineBuiltIn$D,defineBuiltIns$9=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$n(e,n,t[n],r);return e},$$1z=_export$2,global$X=global$1I,call$E=functionCall$2,uncurryThis$17=functionUncurryThis$2,DESCRIPTORS$v=descriptors$2,USE_NATIVE_URL$4=urlConstructorDetection$1,defineBuiltIn$m=defineBuiltIn$D,defineBuiltInAccessor$b=defineBuiltInAccessor$e,defineBuiltIns$8=defineBuiltIns$9,setToStringTag$d=setToStringTag$o,createIteratorConstructor$2=iteratorCreateConstructor$2,InternalStateModule$i=internalState$2,anInstance$f=anInstance$j,isCallable$A=isCallable$1j,hasOwn$w=hasOwnProperty_1$2,bind$q=functionBindContext$2,classof$r=classof$K,anObject$s=anObject$S,isObject$B=isObject$13,$toString$6=toString$M,create$b=objectCreate$2,createPropertyDescriptor$9=createPropertyDescriptor$m,getIterator$c=getIterator$h,getIteratorMethod$7=getIteratorMethod$k,validateArgumentsLength$7=validateArgumentsLength$d,wellKnownSymbol$y=wellKnownSymbol$1c,arraySort$3=arraySort$4,ITERATOR$d=wellKnownSymbol$y("iterator"),URL_SEARCH_PARAMS$1="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR$1=URL_SEARCH_PARAMS$1+"Iterator",setInternalState$f=InternalStateModule$i.set,getInternalParamsState$1=InternalStateModule$i.getterFor(URL_SEARCH_PARAMS$1),getInternalIteratorState$1=InternalStateModule$i.getterFor(URL_SEARCH_PARAMS_ITERATOR$1),getOwnPropertyDescriptor$6=Object.getOwnPropertyDescriptor,safeGetBuiltIn$1=function(e){if(!DESCRIPTORS$v)return global$X[e];var t=getOwnPropertyDescriptor$6(global$X,e);return t&&t.value},nativeFetch$1=safeGetBuiltIn$1("fetch"),NativeRequest$1=safeGetBuiltIn$1("Request"),Headers$2=safeGetBuiltIn$1("Headers"),RequestPrototype$1=NativeRequest$1&&NativeRequest$1.prototype,HeadersPrototype$1=Headers$2&&Headers$2.prototype,RegExp$3=global$X.RegExp,TypeError$a=global$X.TypeError,decodeURIComponent$2=global$X.decodeURIComponent,encodeURIComponent$2=global$X.encodeURIComponent,charAt$a=uncurryThis$17("".charAt),join$8=uncurryThis$17([].join),push$m=uncurryThis$17([].push),replace$9=uncurryThis$17("".replace),shift$3=uncurryThis$17([].shift),splice$1=uncurryThis$17([].splice),split$5=uncurryThis$17("".split),stringSlice$g=uncurryThis$17("".slice),plus$1=/\+/g,sequences$1=Array(4),percentSequence$1=function(e){return sequences$1[e-1]||(sequences$1[e-1]=RegExp$3("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode$1=function(e){try{return decodeURIComponent$2(e)}catch(t){return e}},deserialize$1=function(e){var t=replace$9(e,plus$1," "),r=4;try{return decodeURIComponent$2(t)}catch(e){for(;r;)t=replace$9(t,percentSequence$1(r--),percentDecode$1);return t}},find$1=/[!'()~]|%20/g,replacements$1={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer$1=function(e){return replacements$1[e]},serialize$1=function(e){return replace$9(encodeURIComponent$2(e),find$1,replacer$1)},URLSearchParamsIterator$1=createIteratorConstructor$2((function(e,t){setInternalState$f(this,{type:URL_SEARCH_PARAMS_ITERATOR$1,iterator:getIterator$c(getInternalParamsState$1(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState$1(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$1=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$B(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$a(e,0)?stringSlice$g(e,1):e:$toString$6(e)))};URLSearchParamsState$1.prototype={type:URL_SEARCH_PARAMS$1,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,l=getIteratorMethod$7(e);if(l)for(r=(t=getIterator$c(e,l)).next;!(n=call$E(r,t)).done;){if(i=(o=getIterator$c(anObject$s(n.value))).next,(a=call$E(i,o)).done||(s=call$E(i,o)).done||!call$E(i,o).done)throw TypeError$a("Expected sequence with length 2");push$m(this.entries,{key:$toString$6(a.value),value:$toString$6(s.value)})}else for(var c in e)hasOwn$w(e,c)&&push$m(this.entries,{key:c,value:$toString$6(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$5(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$5(t,"="),push$m(this.entries,{key:deserialize$1(shift$3(r)),value:deserialize$1(join$8(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$m(r,serialize$1(e.key)+"="+serialize$1(e.value));return join$8(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor$1=function(){anInstance$f(this,URLSearchParamsPrototype$1);var e=setInternalState$f(this,new URLSearchParamsState$1(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$v||(this.length=e.entries.length)},URLSearchParamsPrototype$1=URLSearchParamsConstructor$1.prototype;if(defineBuiltIns$8(URLSearchParamsPrototype$1,{append:function(e,t){validateArgumentsLength$7(arguments.length,2);var r=getInternalParamsState$1(this);push$m(r.entries,{key:$toString$6(e),value:$toString$6(t)}),DESCRIPTORS$v||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$7(arguments.length,1);for(var t=getInternalParamsState$1(this),r=t.entries,n=$toString$6(e),o=0;o<r.length;)r[o].key===n?splice$1(r,o,1):o++;DESCRIPTORS$v||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$7(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$6(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$7(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$6(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$m(n,t[o].value);return n},has:function(e){validateArgumentsLength$7(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$6(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$7(arguments.length,1);for(var r,n=getInternalParamsState$1(this),o=n.entries,i=!1,a=$toString$6(e),s=$toString$6(t),l=0;l<o.length;l++)(r=o[l]).key===a&&(i?splice$1(o,l--,1):(i=!0,r.value=s));i||push$m(o,{key:a,value:s}),DESCRIPTORS$v||(this.length=o.length),n.updateURL()},sort:function(){var e=getInternalParamsState$1(this);arraySort$3(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState$1(this).entries,n=bind$q(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$1(this,"keys")},values:function(){return new URLSearchParamsIterator$1(this,"values")},entries:function(){return new URLSearchParamsIterator$1(this,"entries")}},{enumerable:!0}),defineBuiltIn$m(URLSearchParamsPrototype$1,ITERATOR$d,URLSearchParamsPrototype$1.entries,{name:"entries"}),defineBuiltIn$m(URLSearchParamsPrototype$1,"toString",(function(){return getInternalParamsState$1(this).serialize()}),{enumerable:!0}),DESCRIPTORS$v&&defineBuiltInAccessor$b(URLSearchParamsPrototype$1,"size",{get:function(){return getInternalParamsState$1(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$d(URLSearchParamsConstructor$1,URL_SEARCH_PARAMS$1),$$1z({global:!0,constructor:!0,forced:!USE_NATIVE_URL$4},{URLSearchParams:URLSearchParamsConstructor$1}),!USE_NATIVE_URL$4&&isCallable$A(Headers$2)){var headersHas$1=uncurryThis$17(HeadersPrototype$1.has),headersSet$1=uncurryThis$17(HeadersPrototype$1.set),wrapRequestOptions$1=function(e){if(isObject$B(e)){var t,r=e.body;if(classof$r(r)===URL_SEARCH_PARAMS$1)return t=e.headers?new Headers$2(e.headers):new Headers$2,headersHas$1(t,"content-type")||headersSet$1(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$b(e,{body:createPropertyDescriptor$9(0,$toString$6(r)),headers:createPropertyDescriptor$9(0,t)})}return e};if(isCallable$A(nativeFetch$1)&&$$1z({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch$1(e,arguments.length>1?wrapRequestOptions$1(arguments[1]):{})}}),isCallable$A(NativeRequest$1)){var RequestConstructor$1=function(e){return anInstance$f(this,RequestPrototype$1),new NativeRequest$1(e,arguments.length>1?wrapRequestOptions$1(arguments[1]):{})};RequestPrototype$1.constructor=RequestConstructor$1,RequestConstructor$1.prototype=RequestPrototype$1,$$1z({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor$1})}}var EOF$1,web_urlSearchParams_constructor$1={URLSearchParams:URLSearchParamsConstructor$1,getState:getInternalParamsState$1},$$1y=_export$2,DESCRIPTORS$u=descriptors$2,USE_NATIVE_URL$3=urlConstructorDetection$1,global$W=global$1I,bind$p=functionBindContext$2,uncurryThis$16=functionUncurryThis$2,defineBuiltIn$l=defineBuiltIn$D,defineBuiltInAccessor$a=defineBuiltInAccessor$e,anInstance$e=anInstance$j,hasOwn$v=hasOwnProperty_1$2,assign$3=objectAssign$1,arrayFrom$2=arrayFrom$3,arraySlice$h=arraySliceSimple$2,codeAt$1=stringMultibyte$2.codeAt,toASCII$1=stringPunycodeToAscii$1,$toString$5=toString$M,setToStringTag$c=setToStringTag$o,validateArgumentsLength$6=validateArgumentsLength$d,URLSearchParamsModule$1=web_urlSearchParams_constructor$1,InternalStateModule$h=internalState$2,setInternalState$e=InternalStateModule$h.set,getInternalURLState$1=InternalStateModule$h.getterFor("URL"),URLSearchParams$2=URLSearchParamsModule$1.URLSearchParams,getInternalSearchParamsState$1=URLSearchParamsModule$1.getState,NativeURL$1=global$W.URL,TypeError$9=global$W.TypeError,parseInt$2=global$W.parseInt,floor$f=Math.floor,pow$6=Math.pow,charAt$9=uncurryThis$16("".charAt),exec$6=uncurryThis$16(/./.exec),join$7=uncurryThis$16([].join),numberToString$1=uncurryThis$16(1..toString),pop$1=uncurryThis$16([].pop),push$l=uncurryThis$16([].push),replace$8=uncurryThis$16("".replace),shift$2=uncurryThis$16([].shift),split$4=uncurryThis$16("".split),stringSlice$f=uncurryThis$16("".slice),toLowerCase$2=uncurryThis$16("".toLowerCase),unshift$1=uncurryThis$16([].unshift),INVALID_AUTHORITY$1="Invalid authority",INVALID_SCHEME$1="Invalid scheme",INVALID_HOST$1="Invalid host",INVALID_PORT$1="Invalid port",ALPHA$1=/[a-z]/i,ALPHANUMERIC$1=/[\d+-.a-z]/i,DIGIT$1=/\d/,HEX_START$1=/^0x/i,OCT$1=/^[0-7]+$/,DEC$1=/^\d+$/,HEX$1=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT$1=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT$1=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE$1=/[\t\n\r]/g,parseIPv4$1=function(e){var t,r,n,o,i,a,s,l=split$4(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$9(o,0)&&(i=exec$6(HEX_START$1,o)?16:8,o=stringSlice$f(o,8==i?1:2)),""===o)a=0;else{if(!exec$6(10==i?DEC$1:8==i?OCT$1:HEX$1,o))return e;a=parseInt$2(o,i)}push$l(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow$6(256,5-t))return null}else if(a>255)return null;for(s=pop$1(r),n=0;n<r.length;n++)s+=r[n]*pow$6(256,3-n);return s},parseIPv6$1=function(e){var t,r,n,o,i,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,$=0,d=function(){return charAt$9(e,$)};if(":"==d()){if(":"!=charAt$9(e,1))return;$+=2,u=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=r=0;r<4&&exec$6(HEX$1,d());)t=16*t+parseInt$2(d(),16),$++,r++;if("."==d()){if(0==r)return;if($-=r,c>6)return;for(n=0;d();){if(o=null,n>0){if(!("."==d()&&n<4))return;$++}if(!exec$6(DIGIT$1,d()))return;for(;exec$6(DIGIT$1,d());){if(i=parseInt$2(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;$++}l[c]=256*l[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if($++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;$++,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$1=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$1=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift$1(t,e%256),e=floor$f(e/256);return join$7(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence$1(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString$1(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet$1={},fragmentPercentEncodeSet$1=assign$3({},C0ControlPercentEncodeSet$1,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet$1=assign$3({},fragmentPercentEncodeSet$1,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet$1=assign$3({},pathPercentEncodeSet$1,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode$1=function(e,t){var r=codeAt$1(e,0);return r>32&&r<127&&!hasOwn$v(t,e)?e:encodeURIComponent(e)},specialSchemes$1={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter$1=function(e,t){var r;return 2==e.length&&exec$6(ALPHA$1,charAt$9(e,0))&&(":"==(r=charAt$9(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter$1=function(e){var t;return e.length>1&&isWindowsDriveLetter$1(stringSlice$f(e,0,2))&&(2==e.length||"/"===(t=charAt$9(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot$1=function(e){return"."===e||"%2e"===toLowerCase$2(e)},isDoubleDot$1=function(e){return".."===(e=toLowerCase$2(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START$1={},SCHEME$1={},NO_SCHEME$1={},SPECIAL_RELATIVE_OR_AUTHORITY$1={},PATH_OR_AUTHORITY$1={},RELATIVE$1={},RELATIVE_SLASH$1={},SPECIAL_AUTHORITY_SLASHES$1={},SPECIAL_AUTHORITY_IGNORE_SLASHES$1={},AUTHORITY$1={},HOST$1={},HOSTNAME$1={},PORT$1={},FILE$1={},FILE_SLASH$1={},FILE_HOST$1={},PATH_START$1={},PATH$1={},CANNOT_BE_A_BASE_URL_PATH$1={},QUERY$1={},FRAGMENT$1={},URLState$1=function(e,t,r){var n,o,i,a=$toString$5(e);if(t){if(o=this.parse(a))throw TypeError$9(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState$1(r,!0)),o=this.parse(a,null,n))throw TypeError$9(o);(i=getInternalSearchParamsState$1(new URLSearchParams$2)).bindURL(this),this.searchParams=i}};URLState$1.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,l=t||SCHEME_START$1,c=0,u="",$=!1,d=!1,p=!1;for(e=$toString$5(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$8(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace$8(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace$8(e,TAB_AND_NEW_LINE$1,""),n=arrayFrom$2(e);c<=n.length;){switch(o=n[c],l){case SCHEME_START$1:if(!o||!exec$6(ALPHA$1,o)){if(t)return INVALID_SCHEME$1;l=NO_SCHEME$1;continue}u+=toLowerCase$2(o),l=SCHEME$1;break;case SCHEME$1:if(o&&(exec$6(ALPHANUMERIC$1,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase$2(o);else{if(":"!=o){if(t)return INVALID_SCHEME$1;u="",l=NO_SCHEME$1,c=0;continue}if(t&&(s.isSpecial()!=hasOwn$v(specialSchemes$1,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes$1[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?l=FILE$1:s.isSpecial()&&r&&r.scheme==s.scheme?l=SPECIAL_RELATIVE_OR_AUTHORITY$1:s.isSpecial()?l=SPECIAL_AUTHORITY_SLASHES$1:"/"==n[c+1]?(l=PATH_OR_AUTHORITY$1,c++):(s.cannotBeABaseURL=!0,push$l(s.path,""),l=CANNOT_BE_A_BASE_URL_PATH$1)}break;case NO_SCHEME$1:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME$1;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice$h(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,l=FRAGMENT$1;break}l="file"==r.scheme?FILE$1:RELATIVE$1;continue;case SPECIAL_RELATIVE_OR_AUTHORITY$1:if("/"!=o||"/"!=n[c+1]){l=RELATIVE$1;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES$1,c++;break;case PATH_OR_AUTHORITY$1:if("/"==o){l=AUTHORITY$1;break}l=PATH$1;continue;case RELATIVE$1:if(s.scheme=r.scheme,o==EOF$1)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$h(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())l=RELATIVE_SLASH$1;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$h(r.path),s.query="",l=QUERY$1;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$h(r.path),s.path.length--,l=PATH$1;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$h(r.path),s.query=r.query,s.fragment="",l=FRAGMENT$1}break;case RELATIVE_SLASH$1: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$1;continue}l=AUTHORITY$1}else l=SPECIAL_AUTHORITY_IGNORE_SLASHES$1;break;case SPECIAL_AUTHORITY_SLASHES$1:if(l=SPECIAL_AUTHORITY_IGNORE_SLASHES$1,"/"!=o||"/"!=charAt$9(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES$1:if("/"!=o&&"\\"!=o){l=AUTHORITY$1;continue}break;case AUTHORITY$1:if("@"==o){$&&(u="%40"+u),$=!0,i=arrayFrom$2(u);for(var y=0;y<i.length;y++){var f=i[y];if(":"!=f||p){var h=percentEncode$1(f,userinfoPercentEncodeSet$1);p?s.password+=h:s.username+=h}else p=!0}u=""}else if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if($&&""==u)return INVALID_AUTHORITY$1;c-=arrayFrom$2(u).length+1,u="",l=HOST$1}else u+=o;break;case HOST$1:case HOSTNAME$1:if(t&&"file"==s.scheme){l=FILE_HOST$1;continue}if(":"!=o||d){if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST$1;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",l=PATH_START$1,t)return;continue}"["==o?d=!0:"]"==o&&(d=!1),u+=o}else{if(""==u)return INVALID_HOST$1;if(a=s.parseHost(u))return a;if(u="",l=PORT$1,t==HOSTNAME$1)return}break;case PORT$1:if(!exec$6(DIGIT$1,o)){if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var m=parseInt$2(u,10);if(m>65535)return INVALID_PORT$1;s.port=s.isSpecial()&&m===specialSchemes$1[s.scheme]?null:m,u=""}if(t)return;l=PATH_START$1;continue}return INVALID_PORT$1}u+=o;break;case FILE$1:if(s.scheme="file","/"==o||"\\"==o)l=FILE_SLASH$1;else{if(!r||"file"!=r.scheme){l=PATH$1;continue}if(o==EOF$1)s.host=r.host,s.path=arraySlice$h(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$h(r.path),s.query="",l=QUERY$1;else{if("#"!=o){startsWithWindowsDriveLetter$1(join$7(arraySlice$h(n,c),""))||(s.host=r.host,s.path=arraySlice$h(r.path),s.shortenPath()),l=PATH$1;continue}s.host=r.host,s.path=arraySlice$h(r.path),s.query=r.query,s.fragment="",l=FRAGMENT$1}}break;case FILE_SLASH$1:if("/"==o||"\\"==o){l=FILE_HOST$1;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter$1(join$7(arraySlice$h(n,c),""))&&(isWindowsDriveLetter$1(r.path[0],!0)?push$l(s.path,r.path[0]):s.host=r.host),l=PATH$1;continue;case FILE_HOST$1:if(o==EOF$1||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter$1(u))l=PATH$1;else if(""==u){if(s.host="",t)return;l=PATH_START$1}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",l=PATH_START$1}continue}u+=o;break;case PATH_START$1:if(s.isSpecial()){if(l=PATH$1,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF$1&&(l=PATH$1,"/"!=o))continue}else s.fragment="",l=FRAGMENT$1;else s.query="",l=QUERY$1;break;case PATH$1:if(o==EOF$1||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot$1(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push$l(s.path,"")):isSingleDot$1(u)?"/"==o||"\\"==o&&s.isSpecial()||push$l(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter$1(u)&&(s.host&&(s.host=""),u=charAt$9(u,0)+":"),push$l(s.path,u)),u="","file"==s.scheme&&(o==EOF$1||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift$2(s.path);"?"==o?(s.query="",l=QUERY$1):"#"==o&&(s.fragment="",l=FRAGMENT$1)}else u+=percentEncode$1(o,pathPercentEncodeSet$1);break;case CANNOT_BE_A_BASE_URL_PATH$1:"?"==o?(s.query="",l=QUERY$1):"#"==o?(s.fragment="",l=FRAGMENT$1):o!=EOF$1&&(s.path[0]+=percentEncode$1(o,C0ControlPercentEncodeSet$1));break;case QUERY$1:t||"#"!=o?o!=EOF$1&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode$1(o,C0ControlPercentEncodeSet$1)):(s.fragment="",l=FRAGMENT$1);break;case FRAGMENT$1:o!=EOF$1&&(s.fragment+=percentEncode$1(o,fragmentPercentEncodeSet$1))}c++}},parseHost:function(e){var t,r,n;if("["==charAt$9(e,0)){if("]"!=charAt$9(e,e.length-1))return INVALID_HOST$1;if(!(t=parseIPv6$1(stringSlice$f(e,1,-1))))return INVALID_HOST$1;this.host=t}else if(this.isSpecial()){if(e=toASCII$1(e),exec$6(FORBIDDEN_HOST_CODE_POINT$1,e))return INVALID_HOST$1;if(null===(t=parseIPv4$1(e)))return INVALID_HOST$1;this.host=t}else{if(exec$6(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT$1,e))return INVALID_HOST$1;for(t="",r=arrayFrom$2(e),n=0;n<r.length;n++)t+=percentEncode$1(r[n],C0ControlPercentEncodeSet$1);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$v(specialSchemes$1,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter$1(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$1(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+join$7(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$9(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor$1(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost$1(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString$5(e)+":",SCHEME_START$1)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom$2($toString$5(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode$1(t[r],userinfoPercentEncodeSet$1)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom$2($toString$5(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode$1(t[r],userinfoPercentEncodeSet$1)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost$1(e):serializeHost$1(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST$1)},getHostname:function(){var e=this.host;return null===e?"":serializeHost$1(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME$1)},getPort:function(){var e=this.port;return null===e?"":$toString$5(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString$5(e))?this.port=null:this.parse(e,PORT$1))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join$7(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START$1))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString$5(e))?this.query=null:("?"==charAt$9(e,0)&&(e=stringSlice$f(e,1)),this.query="",this.parse(e,QUERY$1)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString$5(e))?("#"==charAt$9(e,0)&&(e=stringSlice$f(e,1)),this.fragment="",this.parse(e,FRAGMENT$1)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor$1=function(e){var t=anInstance$e(this,URLPrototype$1),r=validateArgumentsLength$6(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$e(t,new URLState$1(e,!1,r));DESCRIPTORS$u||(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$1=URLConstructor$1.prototype,accessorDescriptor$1=function(e,t){return{get:function(){return getInternalURLState$1(this)[e]()},set:t&&function(e){return getInternalURLState$1(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$u&&(defineBuiltInAccessor$a(URLPrototype$1,"href",accessorDescriptor$1("serialize","setHref")),defineBuiltInAccessor$a(URLPrototype$1,"origin",accessorDescriptor$1("getOrigin")),defineBuiltInAccessor$a(URLPrototype$1,"protocol",accessorDescriptor$1("getProtocol","setProtocol")),defineBuiltInAccessor$a(URLPrototype$1,"username",accessorDescriptor$1("getUsername","setUsername")),defineBuiltInAccessor$a(URLPrototype$1,"password",accessorDescriptor$1("getPassword","setPassword")),defineBuiltInAccessor$a(URLPrototype$1,"host",accessorDescriptor$1("getHost","setHost")),defineBuiltInAccessor$a(URLPrototype$1,"hostname",accessorDescriptor$1("getHostname","setHostname")),defineBuiltInAccessor$a(URLPrototype$1,"port",accessorDescriptor$1("getPort","setPort")),defineBuiltInAccessor$a(URLPrototype$1,"pathname",accessorDescriptor$1("getPathname","setPathname")),defineBuiltInAccessor$a(URLPrototype$1,"search",accessorDescriptor$1("getSearch","setSearch")),defineBuiltInAccessor$a(URLPrototype$1,"searchParams",accessorDescriptor$1("getSearchParams")),defineBuiltInAccessor$a(URLPrototype$1,"hash",accessorDescriptor$1("getHash","setHash"))),defineBuiltIn$l(URLPrototype$1,"toJSON",(function(){return getInternalURLState$1(this).serialize()}),{enumerable:!0}),defineBuiltIn$l(URLPrototype$1,"toString",(function(){return getInternalURLState$1(this).serialize()}),{enumerable:!0}),NativeURL$1){var nativeCreateObjectURL$1=NativeURL$1.createObjectURL,nativeRevokeObjectURL$1=NativeURL$1.revokeObjectURL;nativeCreateObjectURL$1&&defineBuiltIn$l(URLConstructor$1,"createObjectURL",bind$p(nativeCreateObjectURL$1,NativeURL$1)),nativeRevokeObjectURL$1&&defineBuiltIn$l(URLConstructor$1,"revokeObjectURL",bind$p(nativeRevokeObjectURL$1,NativeURL$1))}setToStringTag$c(URLConstructor$1,"URL"),$$1y({global:!0,constructor:!0,forced:!USE_NATIVE_URL$3,sham:!DESCRIPTORS$u},{URL:URLConstructor$1});var $$1x=_export$2,getBuiltIn$c=getBuiltIn$D,fails$1c=fails$20,validateArgumentsLength$5=validateArgumentsLength$d,toString$r=toString$M,USE_NATIVE_URL$2=urlConstructorDetection$1,URL$1=getBuiltIn$c("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL$2&&fails$1c((function(){URL$1.canParse()}));$$1x({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength$5(arguments.length,1),r=toString$r(e),n=t<2||void 0===arguments[1]?void 0:toString$r(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$a=path$C,url$5=path$a.URL,parent$L=url$5,url$4=parent$L,parent$K=url$4,url$3=parent$K,parent$J=url$3,url$2=parent$J,url$1=url$2,url=url$1,_URL=getDefaultExportFromCjs(url),isObject$A=isObject$13,classof$q=classofRaw$8,wellKnownSymbol$x=wellKnownSymbol$1c,MATCH$3=wellKnownSymbol$x("match"),isRegexp$1=function(e){var t;return isObject$A(e)&&(void 0!==(t=e[MATCH$3])?!!t:"RegExp"==classof$q(e))},isRegExp$2=isRegexp$1,$TypeError$o=TypeError,notARegexp$1=function(e){if(isRegExp$2(e))throw $TypeError$o("The method doesn't accept regular expressions");return e},wellKnownSymbol$w=wellKnownSymbol$1c,MATCH$2=wellKnownSymbol$w("match"),correctIsRegexpLogic$1=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$2]=!1,"/./"[e](t)}catch(e){}}return!1},$$1w=_export$2,uncurryThis$15=functionUncurryThisClause$2;objectGetOwnPropertyDescriptor$2.f;var toLength$h=toLength$m,toString$q=toString$M,notARegExp$3=notARegexp$1,requireObjectCoercible$e=requireObjectCoercible$q,correctIsRegExpLogic$3=correctIsRegexpLogic$1,nativeStartsWith$1=uncurryThis$15("".startsWith),stringSlice$e=uncurryThis$15("".slice),min$a=Math.min,CORRECT_IS_REGEXP_LOGIC$1=correctIsRegExpLogic$3("startsWith");$$1w({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC$1},{startsWith:function(e){var t=toString$q(requireObjectCoercible$e(this));notARegExp$3(e);var r=toLength$h(min$a(arguments.length>1?arguments[1]:void 0,t.length)),n=toString$q(e);return nativeStartsWith$1?nativeStartsWith$1(t,n,r):stringSlice$e(t,r,r+n.length)===n}});var entryVirtual$7=entryVirtual$o,startsWith$6=entryVirtual$7("String").startsWith,isPrototypeOf$k=objectIsPrototypeOf$2,method$6=startsWith$6,StringPrototype$1=String.prototype,startsWith$5=function(e){var t=e.startsWith;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$k(StringPrototype$1,e)&&t===StringPrototype$1.startsWith?method$6:t},parent$I=startsWith$5,startsWith$4=parent$I,parent$H=startsWith$4,startsWith$3=parent$H,parent$G=startsWith$3,startsWith$2=parent$G,startsWith$1=startsWith$2,startsWith2=startsWith$1,_startsWithInstanceProperty=getDefaultExportFromCjs(startsWith2),$$1v=_export$2,$includes$3=arrayIncludes$2.includes,fails$1b=fails$20,BROKEN_ON_SPARSE$1=fails$1b((function(){return!Array(1).includes()}));$$1v({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE$1},{includes:function(e){return $includes$3(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$6=entryVirtual$o,includes$7=entryVirtual$6("Array").includes,$$1u=_export$2,uncurryThis$14=functionUncurryThis$2,notARegExp$2=notARegexp$1,requireObjectCoercible$d=requireObjectCoercible$q,toString$p=toString$M,correctIsRegExpLogic$2=correctIsRegexpLogic$1,stringIndexOf$2=uncurryThis$14("".indexOf);$$1u({target:"String",proto:!0,forced:!correctIsRegExpLogic$2("includes")},{includes:function(e){return!!~stringIndexOf$2(toString$p(requireObjectCoercible$d(this)),toString$p(notARegExp$2(e)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$5=entryVirtual$o,includes$6=entryVirtual$5("String").includes,isPrototypeOf$j=objectIsPrototypeOf$2,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$7=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$7||isPrototypeOf$j(ArrayPrototype$7,e)&&t===ArrayPrototype$7.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$j(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$F=includes$5,includes$4=parent$F,parent$E=includes$4,includes$3=parent$E,parent$D=includes$3,includes$2=parent$D,includes$1=includes$2,includes3=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes3);function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(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,n.key,n)}}function _createClass$6(e,t,r){return t&&_defineProperties$6(e.prototype,t),r&&_defineProperties$6(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$3(e,t,r){return t in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$4(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$4(e,t)}function _getPrototypeOf$4(e){var t;return(_getPrototypeOf$4=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$4(e,t){var r;return(_setPrototypeOf$4=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$4(){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$4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$4(e,t){if(t&&("object"===_typeof$5(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$4(e)}function _createSuper$4(e){var t=_isNativeReflectConstruct$4();return function(){var r,n=_getPrototypeOf$4(e);if(t){var o=_getPrototypeOf$4(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$4(this,r)}}var fails$1a=fails$1C,wellKnownSymbol$v=wellKnownSymbol$R,IS_PURE$1=isPure$1,ITERATOR$c=wellKnownSymbol$v("iterator"),urlConstructorDetection=!fails$1a((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$1&&!e.toJSON||!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$c]||"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})),makeBuiltIn$4=makeBuiltInExports$1,defineProperty$h=objectDefineProperty$1,defineBuiltInAccessor$9=function(e,t,r){return r.get&&makeBuiltIn$4(r.get,t,{getter:!0}),r.set&&makeBuiltIn$4(r.set,t,{setter:!0}),defineProperty$h.f(e,t,r)},anObject$r=anObject$E,iteratorClose$2=iteratorClose$4,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$r(r)[0],r[1]):t(r)}catch(t){iteratorClose$2(e,"throw",t)}},bind$o=functionBindContext$1,call$D=functionCall$1,toObject$l=toObject$u,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod$4=isArrayIteratorMethod$6,isConstructor$5=isConstructor$8,lengthOfArrayLike$t=lengthOfArrayLike$A,createProperty$5=createProperty$8,getIterator$b=getIterator$e,getIteratorMethod$6=getIteratorMethod$a,$Array$7=Array,arrayFrom$1=function(e){var t=toObject$l(e),r=isConstructor$5(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=bind$o(o,n>2?arguments[2]:void 0));var a,s,l,c,u,$,d=getIteratorMethod$6(t),p=0;if(!d||this===$Array$7&&isArrayIteratorMethod$4(d))for(a=lengthOfArrayLike$t(t),s=r?new this(a):$Array$7(a);a>p;p++)$=i?o(t[p],p):t[p],createProperty$5(s,p,$);else for(u=(c=getIterator$b(t,d)).next,s=r?new this:[];!(l=call$D(u,c)).done;p++)$=i?callWithSafeIterationClosing(c,o,[l.value,p],!0):l.value,createProperty$5(s,p,$);return s.length=p,s},toAbsoluteIndex$d=toAbsoluteIndex$g,lengthOfArrayLike$s=lengthOfArrayLike$A,createProperty$4=createProperty$8,$Array$6=Array,max$5=Math.max,arraySliceSimple$1=function(e,t,r){for(var n=lengthOfArrayLike$s(e),o=toAbsoluteIndex$d(t,n),i=toAbsoluteIndex$d(void 0===r?n:r,n),a=$Array$6(max$5(i-o,0)),s=0;o<i;o++,s++)createProperty$4(a,s,e[o]);return a.length=s,a},uncurryThis$13=functionUncurryThis$1,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$9=RangeError,exec$5=uncurryThis$13(regexSeparators.exec),floor$e=Math.floor,fromCharCode=String.fromCharCode,charCodeAt$2=uncurryThis$13("".charCodeAt),join$6=uncurryThis$13([].join),push$k=uncurryThis$13([].push),replace$7=uncurryThis$13("".replace),split$3=uncurryThis$13("".split),toLowerCase$1=uncurryThis$13("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt$2(e,r++);if(o>=55296&&o<=56319&&r<n){var i=charCodeAt$2(e,r++);56320==(64512&i)?push$k(t,((1023&o)<<10)+(1023&i)+65536):(push$k(t,o),r--)}else push$k(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$e(e/damp):e>>1,e+=floor$e(e/t);e>baseMinusTMin*tMax>>1;)e=floor$e(e/baseMinusTMin),n+=base;return floor$e(n+(baseMinusTMin+1)*e/(e+skew))},encode$1=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$k(n,fromCharCode(r));var l=n.length,c=l;for(l&&push$k(n,delimiter);c<o;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var $=c+1;if(u-i>floor$e((maxInt-a)/$))throw $RangeError$9(OVERFLOW_ERROR);for(a+=(u-i)*$,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++a>maxInt)throw $RangeError$9(OVERFLOW_ERROR);if(r==i){for(var d=a,p=base;;){var y=p<=s?tMin:p>=s+tMax?tMax:p-s;if(d<y)break;var f=d-y,h=base-y;push$k(n,fromCharCode(digitToBasic(y+f%h))),d=floor$e(f/h),p+=base}push$k(n,fromCharCode(digitToBasic(d))),s=adapt(a,$,c==l),a=0,c++}}a++,i++}return join$6(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],o=split$3(replace$7(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<o.length;t++)r=o[t],push$k(n,exec$5(regexNonASCII,r)?"xn--"+encode$1(r):r);return join$6(n,".")},defineBuiltIn$k=defineBuiltIn$x,defineBuiltIns$7=function(e,t,r){for(var n in t)defineBuiltIn$k(e,n,t[n],r);return e},arraySlice$g=arraySliceSimple$1,floor$d=Math.floor,mergeSort$1=function(e,t){var r=e.length,n=floor$d(r/2);return r<8?insertionSort$1(e,t):merge$1(e,mergeSort$1(arraySlice$g(e,0,n),t),mergeSort$1(arraySlice$g(e,n),t),t)},insertionSort$1=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$1=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$2=mergeSort$1,$$1t=_export$1,global$V=global$1l,call$C=functionCall$1,uncurryThis$12=functionUncurryThis$1,DESCRIPTORS$t=descriptors$1,USE_NATIVE_URL$1=urlConstructorDetection,defineBuiltIn$j=defineBuiltIn$x,defineBuiltIns$6=defineBuiltIns$7,setToStringTag$b=setToStringTag$h,createIteratorConstructor$1=iteratorCreateConstructor$1,InternalStateModule$g=internalState$1,anInstance$d=anInstance$h,isCallable$z=isCallable$Z,hasOwn$u=hasOwnProperty_1$1,bind$n=functionBindContext$1,classof$p=classof$y,anObject$q=anObject$E,isObject$z=isObject$Q,$toString$4=toString$A,create$a=objectCreate$1,createPropertyDescriptor$8=createPropertyDescriptor$e,getIterator$a=getIterator$e,getIteratorMethod$5=getIteratorMethod$a,validateArgumentsLength$4=validateArgumentsLength$a,wellKnownSymbol$u=wellKnownSymbol$R,arraySort$1=arraySort$2,ITERATOR$b=wellKnownSymbol$u("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$d=InternalStateModule$g.set,getInternalParamsState=InternalStateModule$g.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$g.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor$5=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$t)return global$V[e];var t=getOwnPropertyDescriptor$5(global$V,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$2=global$V.RegExp,TypeError$8=global$V.TypeError,decodeURIComponent$1=global$V.decodeURIComponent,encodeURIComponent$1=global$V.encodeURIComponent,charAt$8=uncurryThis$12("".charAt),join$5=uncurryThis$12([].join),push$j=uncurryThis$12([].push),replace$6=uncurryThis$12("".replace),shift$1=uncurryThis$12([].shift),splice3=uncurryThis$12([].splice),split$2=uncurryThis$12("".split),stringSlice$d=uncurryThis$12("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$2("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent$1(e)}catch(t){return e}},deserialize=function(e){var t=replace$6(e,plus," "),r=4;try{return decodeURIComponent$1(t)}catch(e){for(;r;)t=replace$6(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$6(encodeURIComponent$1(e),find2,replacer)},URLSearchParamsIterator=createIteratorConstructor$1((function(e,t){setInternalState$d(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator$a(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$z(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$8(e,0)?stringSlice$d(e,1):e:$toString$4(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$5(e);if(l)for(r=(t=getIterator$a(e,l)).next;!(n=call$C(r,t)).done;){if(i=(o=getIterator$a(anObject$q(n.value))).next,(a=call$C(i,o)).done||(s=call$C(i,o)).done||!call$C(i,o).done)throw TypeError$8("Expected sequence with length 2");push$j(this.entries,{key:$toString$4(a.value),value:$toString$4(s.value)})}else for(var c in e)hasOwn$u(e,c)&&push$j(this.entries,{key:c,value:$toString$4(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$2(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$2(t,"="),push$j(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$5(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$j(r,serialize(e.key)+"="+serialize(e.value));return join$5(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$d(this,URLSearchParamsPrototype),setInternalState$d(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns$6(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$4(arguments.length,2);var r=getInternalParamsState(this);push$j(r.entries,{key:$toString$4(e),value:$toString$4(t)}),r.updateURL()},delete:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$4(e),o=0;o<r.length;)r[o].key===n?splice3(r,o,1):o++;t.updateURL()},get:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$4(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$4(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$j(n,t[o].value);return n},has:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$4(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$4(arguments.length,1);for(var r,n=getInternalParamsState(this),o=n.entries,i=!1,a=$toString$4(e),s=$toString$4(t),l=0;l<o.length;l++)(r=o[l]).key===a&&(i?splice3(o,l--,1):(i=!0,r.value=s));i||push$j(o,{key:a,value:s}),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort$1(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$n(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$j(URLSearchParamsPrototype,ITERATOR$b,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$j(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),setToStringTag$b(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$1t({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$1&&isCallable$z(Headers$1)){var headersHas=uncurryThis$12(HeadersPrototype.has),headersSet=uncurryThis$12(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$z(e)){var t,r=e.body;if(classof$p(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers$1(e.headers):new Headers$1,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$a(e,{body:createPropertyDescriptor$8(0,$toString$4(r)),headers:createPropertyDescriptor$8(0,t)})}return e};if(isCallable$z(nativeFetch)&&$$1t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$z(NativeRequest)){var RequestConstructor=function(e){return anInstance$d(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$1t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$1s=_export$1,DESCRIPTORS$s=descriptors$1,USE_NATIVE_URL=urlConstructorDetection,global$U=global$1l,bind$m=functionBindContext$1,uncurryThis$11=functionUncurryThis$1,defineBuiltIn$i=defineBuiltIn$x,defineBuiltInAccessor$8=defineBuiltInAccessor$9,anInstance$c=anInstance$h,hasOwn$t=hasOwnProperty_1$1,assign$2=objectAssign,arrayFrom=arrayFrom$1,arraySlice$f=arraySliceSimple$1,codeAt=stringMultibyte$1.codeAt,toASCII=stringPunycodeToAscii,$toString$3=toString$A,setToStringTag$a=setToStringTag$h,validateArgumentsLength$3=validateArgumentsLength$a,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule$f=internalState$1,setInternalState$c=InternalStateModule$f.set,getInternalURLState=InternalStateModule$f.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$U.URL,TypeError$7=global$U.TypeError,parseInt$1=global$U.parseInt,floor$c=Math.floor,pow$5=Math.pow,charAt$7=uncurryThis$11("".charAt),exec$4=uncurryThis$11(/./.exec),join$4=uncurryThis$11([].join),numberToString=uncurryThis$11(1..toString),pop=uncurryThis$11([].pop),push$i=uncurryThis$11([].push),replace$5=uncurryThis$11("".replace),shift=uncurryThis$11([].shift),split$1=uncurryThis$11("".split),stringSlice$c=uncurryThis$11("".slice),toLowerCase=uncurryThis$11("".toLowerCase),unshift=uncurryThis$11([].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_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,o,i,a,s,l=split$1(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$7(o,0)&&(i=exec$4(HEX_START,o)?16:8,o=stringSlice$c(o,8==i?1:2)),""===o)a=0;else{if(!exec$4(10==i?DEC:8==i?OCT:HEX,o))return e;a=parseInt$1(o,i)}push$i(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow$5(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$5(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,$=0,d=function(){return charAt$7(e,$)};if(":"==d()){if(":"!=charAt$7(e,1))return;$+=2,u=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=r=0;r<4&&exec$4(HEX,d());)t=16*t+parseInt$1(d(),16),$++,r++;if("."==d()){if(0==r)return;if($-=r,c>6)return;for(n=0;d();){if(o=null,n>0){if(!("."==d()&&n<4))return;$++}if(!exec$4(DIGIT,d()))return;for(;exec$4(DIGIT,d());){if(i=parseInt$1(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;$++}l[c]=256*l[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==d()){if($++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;$++,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$c(e/256);return join$4(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=assign$2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign$2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign$2({},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$t(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$4(ALPHA,charAt$7(e,0))&&(":"==(r=charAt$7(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice$c(e,0,2))&&(2==e.length||"/"===(t=charAt$7(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$3(e);if(t){if(o=this.parse(a))throw TypeError$7(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),o=this.parse(a,null,n))throw TypeError$7(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="",$=!1,d=!1,p=!1;for(e=$toString$3(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$5(e,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),e=replace$5(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);c<=n.length;){switch(o=n[c],l){case SCHEME_START:if(!o||!exec$4(ALPHA,o)){if(t)return INVALID_SCHEME;l=NO_SCHEME;continue}u+=toLowerCase(o),l=SCHEME;break;case SCHEME:if(o&&(exec$4(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$t(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$i(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$f(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$f(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$f(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$f(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$f(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$7(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){$&&(u="%40"+u),$=!0,i=arrayFrom(u);for(var y=0;y<i.length;y++){var f=i[y];if(":"!=f||p){var h=percentEncode(f,userinfoPercentEncodeSet);p?s.password+=h:s.username+=h}else p=!0}u=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if($&&""==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||d){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?d=!0:"]"==o&&(d=!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$4(DIGIT,o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var m=parseInt$1(u,10);if(m>65535)return INVALID_PORT;s.port=s.isSpecial()&&m===specialSchemes[s.scheme]?null:m,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$f(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$f(r.path),s.query="",l=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(join$4(arraySlice$f(n,c),""))||(s.host=r.host,s.path=arraySlice$f(r.path),s.shortenPath()),l=PATH;continue}s.host=r.host,s.path=arraySlice$f(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$4(arraySlice$f(n,c),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$i(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$i(s.path,"")):isSingleDot(u)?"/"==o||"\\"==o&&s.isSpecial()||push$i(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt$7(u,0)+":"),push$i(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$7(e,0)){if("]"!=charAt$7(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice$c(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec$4(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec$4(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$t(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$4(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$7(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$3(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString$3(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$3(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$3(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString$3(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join$4(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$3(e))?this.query=null:("?"==charAt$7(e,0)&&(e=stringSlice$c(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$3(e))?("#"==charAt$7(e,0)&&(e=stringSlice$c(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$c(this,URLPrototype),r=validateArgumentsLength$3(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$c(t,new URLState(e,!1,r));DESCRIPTORS$s||(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$s&&(defineBuiltInAccessor$8(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$8(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$8(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$8(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$8(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$8(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$8(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$8(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$8(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$8(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$8(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$8(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn$i(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn$i(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn$i(URLConstructor,"createObjectURL",bind$m(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn$i(URLConstructor,"revokeObjectURL",bind$m(nativeRevokeObjectURL,NativeURL))}setToStringTag$a(URLConstructor,"URL"),$$1s({global:!0,constructor:!0,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$s},{URL:URLConstructor});var $$1r=_export$1,isArray$4=isArray$9,isConstructor$4=isConstructor$8,isObject$y=isObject$Q,toAbsoluteIndex$c=toAbsoluteIndex$g,lengthOfArrayLike$r=lengthOfArrayLike$A,toIndexedObject$j=toIndexedObject$p,createProperty$3=createProperty$8,wellKnownSymbol$t=wellKnownSymbol$R,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$8,nativeSlice$1=arraySlice$o,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$3("slice"),SPECIES$7=wellKnownSymbol$t("species"),$Array$5=Array,max$4=Math.max;$$1r({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{slice:function(e,t){var r,n,o,i=toIndexedObject$j(this),a=lengthOfArrayLike$r(i),s=toAbsoluteIndex$c(e,a),l=toAbsoluteIndex$c(void 0===t?a:t,a);if(isArray$4(i)&&(r=i.constructor,(isConstructor$4(r)&&(r===$Array$5||isArray$4(r.prototype))||isObject$y(r)&&null===(r=r[SPECIES$7]))&&(r=void 0),r===$Array$5||void 0===r))return nativeSlice$1(i,s,l);for(n=new(void 0===r?$Array$5:r)(max$4(l-s,0)),o=0;s<l;s++,o++)s in i&&createProperty$3(n,o,i[s]);return n.length=o,n}});var check=function(e){return e&&e.Math==Math&&e},global$T=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")(),objectGetOwnPropertyDescriptor={},fails$19=function(e){try{return!!e()}catch(e){return!0}},fails$18=fails$19,descriptors=!fails$18((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),fails$17=fails$19,functionBindNative=!fails$17((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,call$B=Function.prototype.call,functionCall=NATIVE_BIND$4?call$B.bind(call$B):function(){return call$B.apply(call$B,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$3={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable$3.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$4(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$3;var match,version$1,createPropertyDescriptor$7=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},NATIVE_BIND$3=functionBindNative,FunctionPrototype$2=Function.prototype,call$A=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$2.bind.bind(call$A,call$A),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$A.apply(e,arguments)}},uncurryThis$10=functionUncurryThis,toString$o=uncurryThis$10({}.toString),stringSlice$b=uncurryThis$10("".slice),classofRaw$2=function(e){return stringSlice$b(toString$o(e),8,-1)},uncurryThis$$=functionUncurryThis,fails$16=fails$19,classof$o=classofRaw$2,$Object$4=Object,split=uncurryThis$$("".split),indexedObject=fails$16((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$o(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$d=function(e){return null==e},isNullOrUndefined$c=isNullOrUndefined$d,$TypeError$n=TypeError,requireObjectCoercible$c=function(e){if(isNullOrUndefined$c(e))throw $TypeError$n("Can't call method on "+e);return e},IndexedObject$6=indexedObject,requireObjectCoercible$b=requireObjectCoercible$c,toIndexedObject$i=function(e){return IndexedObject$6(requireObjectCoercible$b(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$y=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},isCallable$x=isCallable$y,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$x=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$x(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$x(e)},global$S=global$T,isCallable$w=isCallable$y,aFunction=function(e){return isCallable$w(e)?e:void 0},getBuiltIn$b=function(e,t){return arguments.length<2?aFunction(global$S[e]):global$S[e]&&global$S[e][t]},uncurryThis$_=functionUncurryThis,objectIsPrototypeOf=uncurryThis$_({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$R=global$T,userAgent$8=engineUserAgent,process$5=global$R.process,Deno$1=global$R.Deno,versions=process$5&&process$5.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version$1=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version$1&&userAgent$8&&(!(match=userAgent$8.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$8.match(/Chrome\/(\d+)/))&&(version$1=+match[1]);var engineV8Version=version$1,V8_VERSION$2=engineV8Version,fails$15=fails$19,global$Q=global$T,$String$6=global$Q.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$15((function(){var e=Symbol();return!$String$6(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$2&&V8_VERSION$2<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$a=getBuiltIn$b,isCallable$v=isCallable$y,isPrototypeOf$i=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$6=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$a("Symbol");return isCallable$v(t)&&isPrototypeOf$i(t.prototype,$Object$3(e))},$String$5=String,tryToString$9=function(e){try{return $String$5(e)}catch(e){return"Object"}},isCallable$u=isCallable$y,tryToString$8=tryToString$9,$TypeError$m=TypeError,aCallable$m=function(e){if(isCallable$u(e))return e;throw $TypeError$m(tryToString$8(e)+" is not a function")},aCallable$l=aCallable$m,isNullOrUndefined$b=isNullOrUndefined$d,getMethod$6=function(e,t){var r=e[t];return isNullOrUndefined$b(r)?void 0:aCallable$l(r)},call$z=functionCall,isCallable$t=isCallable$y,isObject$w=isObject$x,$TypeError$l=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$t(r=e.toString)&&!isObject$w(n=call$z(r,e)))return n;if(isCallable$t(r=e.valueOf)&&!isObject$w(n=call$z(r,e)))return n;if("string"!==t&&isCallable$t(r=e.toString)&&!isObject$w(n=call$z(r,e)))return n;throw $TypeError$l("Can't convert object to primitive value")},shared$7={exports:{}},isPure=!1,global$P=global$T,defineProperty$g=Object.defineProperty,defineGlobalProperty$3=function(e,t){try{defineProperty$g(global$P,e,{value:t,configurable:!0,writable:!0})}catch(r){global$P[e]=t}return t},global$O=global$T,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$O[SHARED]||defineGlobalProperty$2(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.31.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$7.exports,requireObjectCoercible$a=requireObjectCoercible$c,$Object$2=Object,toObject$k=function(e){return $Object$2(requireObjectCoercible$a(e))},uncurryThis$Z=functionUncurryThis,toObject$j=toObject$k,hasOwnProperty$2=uncurryThis$Z({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty$2(toObject$j(e),t)},uncurryThis$Y=functionUncurryThis,id$3=0,postfix=Math.random(),toString$n=uncurryThis$Y(1..toString),uid$8=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$n(++id$3+postfix,36)},global$N=global$T,shared$6=sharedExports,hasOwn$s=hasOwnProperty_1,uid$7=uid$8,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$4=global$N.Symbol,WellKnownSymbolsStore$1=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$4.for||Symbol$4:Symbol$4&&Symbol$4.withoutSetter||uid$7,wellKnownSymbol$s=function(e){return hasOwn$s(WellKnownSymbolsStore$1,e)||(WellKnownSymbolsStore$1[e]=NATIVE_SYMBOL$4&&hasOwn$s(Symbol$4,e)?Symbol$4[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$1[e]},call$y=functionCall,isObject$v=isObject$x,isSymbol$5=isSymbol$6,getMethod$5=getMethod$6,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$r=wellKnownSymbol$s,$TypeError$k=TypeError,TO_PRIMITIVE=wellKnownSymbol$r("toPrimitive"),toPrimitive$4=function(e,t){if(!isObject$v(e)||isSymbol$5(e))return e;var r,n=getMethod$5(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$y(n,e,t),!isObject$v(r)||isSymbol$5(r))return r;throw $TypeError$k("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$3=toPrimitive$4,isSymbol$4=isSymbol$6,toPropertyKey$6=function(e){var t=toPrimitive$3(e,"string");return isSymbol$4(t)?t:t+""},global$M=global$T,isObject$u=isObject$x,document$3=global$M.document,EXISTS$1=isObject$u(document$3)&&isObject$u(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$r=descriptors,fails$14=fails$19,createElement$1=documentCreateElement$2,ie8DomDefine=!DESCRIPTORS$r&&!fails$14((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$q=descriptors,call$x=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$6=createPropertyDescriptor$7,toIndexedObject$h=toIndexedObject$i,toPropertyKey$5=toPropertyKey$6,hasOwn$r=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$q?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$h(e),t=toPropertyKey$5(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$r(e,t))return createPropertyDescriptor$6(!call$x(propertyIsEnumerableModule$1.f,e,t),e[t])};var objectDefineProperty={},DESCRIPTORS$p=descriptors,fails$13=fails$19,v8PrototypeDefineBug=DESCRIPTORS$p&&fails$13((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$t=isObject$x,$String$4=String,$TypeError$j=TypeError,anObject$p=function(e){if(isObject$t(e))return e;throw $TypeError$j($String$4(e)+" is not an object")},DESCRIPTORS$o=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$o=anObject$p,toPropertyKey$4=toPropertyKey$6,$TypeError$i=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$o?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$o(e),t=toPropertyKey$4(t),anObject$o(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$o(e),t=toPropertyKey$4(t),anObject$o(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$i("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$n=descriptors,definePropertyModule$7=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$7,createNonEnumerableProperty$d=DESCRIPTORS$n?function(e,t,r){return definePropertyModule$7.f(e,t,createPropertyDescriptor$5(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$3={exports:{}},DESCRIPTORS$m=descriptors,hasOwn$q=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$m&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$q(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$m||DESCRIPTORS$m&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$X=functionUncurryThis,isCallable$s=isCallable$y,store$1=sharedStore,functionToString$1=uncurryThis$X(Function.toString);isCallable$s(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString$1(e)});var set$9,get$4,has$2,inspectSource$3=store$1.inspectSource,global$L=global$T,isCallable$r=isCallable$y,WeakMap$1=global$L.WeakMap,weakMapBasicDetection=isCallable$r(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$5=sharedExports,uid$6=uid$8,keys$3=shared$5("keys"),sharedKey$4=function(e){return keys$3[e]||(keys$3[e]=uid$6(e))},hiddenKeys$8={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$K=global$T,isObject$s=isObject$x,createNonEnumerableProperty$c=createNonEnumerableProperty$d,hasOwn$p=hasOwnProperty_1,shared$4=sharedStore,sharedKey$3=sharedKey$4,hiddenKeys$7=hiddenKeys$8,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$6=global$K.TypeError,WeakMap=global$K.WeakMap,enforce=function(e){return has$2(e)?get$4(e):set$9(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$s(t)||(r=get$4(t)).type!==e)throw TypeError$6("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$9=function(e,t){if(store.has(e))throw TypeError$6(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$4=function(e){return store.get(e)||{}},has$2=function(e){return store.has(e)}}else{var STATE=sharedKey$3("state");hiddenKeys$7[STATE]=!0,set$9=function(e,t){if(hasOwn$p(e,STATE))throw TypeError$6(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$c(e,STATE,t),t},get$4=function(e){return hasOwn$p(e,STATE)?e[STATE]:{}},has$2=function(e){return hasOwn$p(e,STATE)}}var internalState={set:set$9,get:get$4,has:has$2,enforce:enforce,getterFor:getterFor},uncurryThis$W=functionUncurryThis,fails$12=fails$19,isCallable$q=isCallable$y,hasOwn$o=hasOwnProperty_1,DESCRIPTORS$l=descriptors,CONFIGURABLE_FUNCTION_NAME$3=functionName.CONFIGURABLE,inspectSource$2=inspectSource$3,InternalStateModule$e=internalState,enforceInternalState$4=InternalStateModule$e.enforce,getInternalState$9=InternalStateModule$e.get,$String$3=String,defineProperty$f=Object.defineProperty,stringSlice$a=uncurryThis$W("".slice),replace$4=uncurryThis$W("".replace),join$3=uncurryThis$W([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$l&&!fails$12((function(){return 8!==defineProperty$f((function(){}),"length",{value:8}).length})),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(e,t,r){"Symbol("===stringSlice$a($String$3(t),0,7)&&(t="["+replace$4($String$3(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$o(e,"name")||CONFIGURABLE_FUNCTION_NAME$3&&e.name!==t)&&(DESCRIPTORS$l?defineProperty$f(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$o(r,"arity")&&e.length!==r.arity&&defineProperty$f(e,"length",{value:r.arity});try{r&&hasOwn$o(r,"constructor")&&r.constructor?DESCRIPTORS$l&&defineProperty$f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=enforceInternalState$4(e);return hasOwn$o(n,"source")||(n.source=join$3(TEMPLATE,"string"==typeof t?t:"")),e};Function.prototype.toString=makeBuiltIn$2((function(){return isCallable$q(this)&&getInternalState$9(this).source||inspectSource$2(this)}),"toString");var makeBuiltInExports=makeBuiltIn$3.exports,isCallable$p=isCallable$y,definePropertyModule$6=objectDefineProperty,makeBuiltIn$1=makeBuiltInExports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$h=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(isCallable$p(r)&&makeBuiltIn$1(r,i,n),n.global)o?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$6.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil$1=Math.ceil,floor$b=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$b:ceil$1)(t)},trunc$8=mathTrunc,toIntegerOrInfinity$h=function(e){var t=+e;return t!=t||0===t?0:trunc$8(t)},toIntegerOrInfinity$g=toIntegerOrInfinity$h,max$3=Math.max,min$9=Math.min,toAbsoluteIndex$b=function(e,t){var r=toIntegerOrInfinity$g(e);return r<0?max$3(r+t,0):min$9(r,t)},toIntegerOrInfinity$f=toIntegerOrInfinity$h,min$8=Math.min,toLength$g=function(e){return e>0?min$8(toIntegerOrInfinity$f(e),9007199254740991):0},toLength$f=toLength$g,lengthOfArrayLike$q=function(e){return toLength$f(e.length)},toIndexedObject$g=toIndexedObject$i,toAbsoluteIndex$a=toAbsoluteIndex$b,lengthOfArrayLike$p=lengthOfArrayLike$q,createMethod$a=function(e){return function(t,r,n){var o,i=toIndexedObject$g(t),a=lengthOfArrayLike$p(i),s=toAbsoluteIndex$a(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$a(!0),indexOf:createMethod$a(!1)},uncurryThis$V=functionUncurryThis,hasOwn$n=hasOwnProperty_1,toIndexedObject$f=toIndexedObject$i,indexOf$1=arrayIncludes.indexOf,hiddenKeys$6=hiddenKeys$8,push$h=uncurryThis$V([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$f(e),o=0,i=[];for(r in n)!hasOwn$n(hiddenKeys$6,r)&&hasOwn$n(n,r)&&push$h(i,r);for(;t.length>o;)hasOwn$n(n,r=t[o++])&&(~indexOf$1(i,r)||push$h(i,r));return i},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$5=enumBugKeys$2.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$5)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$9=getBuiltIn$b,uncurryThis$U=functionUncurryThis,getOwnPropertyNamesModule$4=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,anObject$n=anObject$p,concat$3=uncurryThis$U([].concat),ownKeys$3=getBuiltIn$9("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$4.f(anObject$n(e)),r=getOwnPropertySymbolsModule$2.f;return r?concat$3(t,r(e)):t},hasOwn$m=hasOwnProperty_1,ownKeys$2=ownKeys$3,getOwnPropertyDescriptorModule$3=objectGetOwnPropertyDescriptor,definePropertyModule$5=objectDefineProperty,copyConstructorProperties$3=function(e,t,r){for(var n=ownKeys$2(t),o=definePropertyModule$5.f,i=getOwnPropertyDescriptorModule$3.f,a=0;a<n.length;a++){var s=n[a];hasOwn$m(e,s)||r&&hasOwn$m(r,s)||o(e,s,i(t,s))}},fails$11=fails$19,isCallable$o=isCallable$y,replacement=/#|\.prototype\./,isForced$5=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$o(t)?fails$11(t):!!t)},normalize=isForced$5.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$5.data={},NATIVE=isForced$5.NATIVE="N",POLYFILL=isForced$5.POLYFILL="P",isForced_1=isForced$5,global$J=global$T,getOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$b=createNonEnumerableProperty$d,defineBuiltIn$g=defineBuiltIn$h,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$2=copyConstructorProperties$3,isForced$4=isForced_1,_export=function(e,t){var r,n,o,i,a,s=e.target,l=e.global,c=e.stat;if(r=l?global$J:c?global$J[s]||defineGlobalProperty(s,{}):(global$J[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=getOwnPropertyDescriptor$3(r,n))&&a.value:r[n],!isForced$4(l?n:s+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties$2(i,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$b(i,"sham",!0),defineBuiltIn$g(r,n,i,e)}},NATIVE_BIND$2=functionBindNative,FunctionPrototype=Function.prototype,apply$c=FunctionPrototype.apply,call$w=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$2?call$w.bind(apply$c):function(){return call$w.apply(apply$c,arguments)}),engineIsBun="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,uncurryThis$T=functionUncurryThis,arraySlice$e=uncurryThis$T([].slice),$TypeError$h=TypeError,validateArgumentsLength$2=function(e,t){if(e<t)throw $TypeError$h("Not enough arguments");return e},global$I=global$T,apply$b=functionApply,isCallable$n=isCallable$y,ENGINE_IS_BUN=engineIsBun,USER_AGENT=engineUserAgent,arraySlice$d=arraySlice$e,validateArgumentsLength$1=validateArgumentsLength$2,Function$2=global$I.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var e=global$I.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$1(arguments.length,1)>r,a=isCallable$n(n)?n:Function$2(n),s=i?arraySlice$d(arguments,r):[],l=i?function(){apply$b(a,this,s)}:a;return t?e(l,o):e(l)}:e},$$1q=_export,global$H=global$T,schedulersFix$1=schedulersFix$2,setInterval=schedulersFix$1(global$H.setInterval,!0);$$1q({global:!0,bind:!0,forced:global$H.setInterval!==setInterval},{setInterval:setInterval});var $$1p=_export,global$G=global$T,schedulersFix=schedulersFix$2,setTimeout$1=schedulersFix(global$G.setTimeout,!0);function debounce(e,t,r){var n;return function(){var o=this,i=arguments,a=r&&!n;clearTimeout(n),n=_setTimeout((function(){n=null,r||e.apply(o,i)}),t),a&&e.apply(o,i)}}function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(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,n.key,n)}}function _createClass$5(e,t,r){return t&&_defineProperties$5(e.prototype,t),r&&_defineProperties$5(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}$$1p({global:!0,bind:!0,forced:global$G.setTimeout!==setTimeout$1},{setTimeout:setTimeout$1});var wellKnownSymbol$q=wellKnownSymbol$s,TO_STRING_TAG$5=wellKnownSymbol$q("toStringTag"),test$2={};test$2[TO_STRING_TAG$5]="z";var toStringTagSupport="[object z]"===String(test$2),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$m=isCallable$y,classofRaw$1=classofRaw$2,wellKnownSymbol$p=wellKnownSymbol$s,TO_STRING_TAG$4=wellKnownSymbol$p("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$n=TO_STRING_TAG_SUPPORT$2?classofRaw$1: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$4))?r:CORRECT_ARGUMENTS?classofRaw$1(t):"Object"==(n=classofRaw$1(t))&&isCallable$m(t.callee)?"Arguments":n},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$m=classof$n,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$m(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineBuiltIn$f=defineBuiltIn$h,toString$m=objectToString;TO_STRING_TAG_SUPPORT||defineBuiltIn$f(Object.prototype,"toString",toString$m,{unsafe:!0});var classof$l=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$l(process),uncurryThis$S=functionUncurryThis,aCallable$k=aCallable$m,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$S(aCallable$k(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$l=isCallable$y,$String$2=String,$TypeError$g=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$l(e))return e;throw $TypeError$g("Can't set "+$String$2(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$m=anObject$p,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$m(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),defineProperty$e=objectDefineProperty.f,hasOwn$l=hasOwnProperty_1,wellKnownSymbol$o=wellKnownSymbol$s,TO_STRING_TAG$3=wellKnownSymbol$o("toStringTag"),setToStringTag$9=function(e,t,r){e&&!r&&(e=e.prototype),e&&!hasOwn$l(e,TO_STRING_TAG$3)&&defineProperty$e(e,TO_STRING_TAG$3,{configurable:!0,value:t})},makeBuiltIn=makeBuiltInExports,defineProperty$d=objectDefineProperty,defineBuiltInAccessor$7=function(e,t,r){return r.get&&makeBuiltIn(r.get,t,{getter:!0}),r.set&&makeBuiltIn(r.set,t,{setter:!0}),defineProperty$d.f(e,t,r)},getBuiltIn$8=getBuiltIn$b,defineBuiltInAccessor$6=defineBuiltInAccessor$7,wellKnownSymbol$n=wellKnownSymbol$s,DESCRIPTORS$k=descriptors,SPECIES$6=wellKnownSymbol$n("species"),setSpecies$7=function(e){var t=getBuiltIn$8(e);DESCRIPTORS$k&&t&&!t[SPECIES$6]&&defineBuiltInAccessor$6(t,SPECIES$6,{configurable:!0,get:function(){return this}})},isPrototypeOf$h=objectIsPrototypeOf,$TypeError$f=TypeError,anInstance$b=function(e,t){if(isPrototypeOf$h(t,e))return e;throw $TypeError$f("Incorrect invocation")},uncurryThis$R=functionUncurryThis,fails$10=fails$19,isCallable$k=isCallable$y,classof$k=classof$n,getBuiltIn$7=getBuiltIn$b,inspectSource$1=inspectSource$3,noop$1=function(){},empty=[],construct$1=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$3=uncurryThis$R(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop$1),isConstructorModern=function(e){if(!isCallable$k(e))return!1;try{return construct$1(noop$1,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$k(e))return!1;switch(classof$k(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$3(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var $location,defer,channel,port,isConstructor$3=!construct$1||fails$10((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isConstructor$2=isConstructor$3,tryToString$7=tryToString$9,$TypeError$e=TypeError,aConstructor$5=function(e){if(isConstructor$2(e))return e;throw $TypeError$e(tryToString$7(e)+" is not a constructor")},anObject$l=anObject$p,aConstructor$4=aConstructor$5,isNullOrUndefined$a=isNullOrUndefined$d,wellKnownSymbol$m=wellKnownSymbol$s,SPECIES$5=wellKnownSymbol$m("species"),speciesConstructor$6=function(e,t){var r,n=anObject$l(e).constructor;return void 0===n||isNullOrUndefined$a(r=anObject$l(n)[SPECIES$5])?t:aConstructor$4(r)},classofRaw=classofRaw$2,uncurryThis$Q=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$Q(e)},uncurryThis$P=functionUncurryThisClause,aCallable$j=aCallable$m,NATIVE_BIND$1=functionBindNative,bind$l=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$j(e),void 0===t?e:NATIVE_BIND$1?bind$l(e,t):function(){return e.apply(t,arguments)}},getBuiltIn$6=getBuiltIn$b,html$2=getBuiltIn$6("document","documentElement"),userAgent$7=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$7),global$F=global$T,apply$a=functionApply,bind$k=functionBindContext,isCallable$j=isCallable$y,hasOwn$k=hasOwnProperty_1,fails$$=fails$19,html$1=html$2,arraySlice$c=arraySlice$e,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$2,IS_IOS$1=engineIsIos,IS_NODE$5=engineIsNode,set$8=global$F.setImmediate,clear=global$F.clearImmediate,process$4=global$F.process,Dispatch=global$F.Dispatch,Function$1=global$F.Function,MessageChannel=global$F.MessageChannel,String$1=global$F.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$$((function(){$location=global$F.location}));var run=function(e){if(hasOwn$k(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$F.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$8&&clear||(set$8=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$j(e)?e:Function$1(e),r=arraySlice$c(arguments,1);return queue$2[++counter]=function(){apply$a(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$5?defer=function(e){process$4.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$k(port.postMessage,port)):global$F.addEventListener&&isCallable$j(global$F.postMessage)&&!global$F.importScripts&&$location&&"file:"!==$location.protocol&&!fails$$(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$F.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html$1.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html$1.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$8,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,then,queue$1=Queue$2,userAgent$6=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$6)&&"undefined"!=typeof Pebble,userAgent$5=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$5),global$E=global$T,bind$j=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$4=engineIsNode,MutationObserver=global$E.MutationObserver||global$E.WebKitMutationObserver,document$2=global$E.document,process$3=global$E.process,Promise$1=global$E.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$E,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$4&&(e=process$3.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&¬ify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$4||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$j(promise.then,promise),notify$1=function(){then(flush)}):IS_NODE$4?notify$1=function(){process$3.nextTick(flush)}:(macrotask=bind$j(macrotask,global$E),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$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$D=global$T,promiseNativeConstructor=global$D.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$3=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$3&&"object"==typeof window&&"object"==typeof document,global$C=global$T,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$i=isCallable$y,isForced$3=isForced_1,inspectSource=inspectSource$3,wellKnownSymbol$l=wellKnownSymbol$s,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION$1=engineV8Version;NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype;var SPECIES$4=wellKnownSymbol$l("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$i(global$C.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced$3("Promise",(function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION$1)return!0;if(!V8_VERSION$1||V8_VERSION$1<51||!/native code/.test(e)){var r=new NativePromiseConstructor$3((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$4]=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$i=aCallable$m,$TypeError$d=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$d("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$i(t),this.reject=aCallable$i(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,$$1o=_export,IS_NODE$2=engineIsNode,global$B=global$T,call$v=functionCall,defineBuiltIn$e=defineBuiltIn$h,setPrototypeOf$8=objectSetPrototypeOf,setToStringTag$8=setToStringTag$9,setSpecies$6=setSpecies$7,aCallable$h=aCallable$m,isCallable$h=isCallable$y,isObject$r=isObject$x,anInstance$a=anInstance$b,speciesConstructor$5=speciesConstructor$6,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue$1,InternalStateModule$d=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule$d.getterFor(PROMISE),setInternalState$b=InternalStateModule$d.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$5=global$B.TypeError,document$1=global$B.document,process$2=global$B.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$B.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$r(e)||!isCallable$h(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$5("Promise-chain cycle")):(n=isThenable(r))?call$v(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$B.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(o=global$B["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$v(task,global$B,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$2((function(){IS_NODE$2?process$2.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$2||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$v(task,global$B,(function(){var t=e.facade;IS_NODE$2?process$2.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$i=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$5("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$v(n,t,bind$i(internalResolve,r,e),bind$i(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)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$a(this,PromisePrototype),aCallable$h(e),call$v(Internal,this);var t=getInternalPromiseState(this);try{e(bind$i(internalResolve,t),bind$i(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$b(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$e(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$5(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$h(e)||e,n.fail=isCallable$h(t)&&t,n.domain=IS_NODE$2?process$2.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$i(internalResolve,t),this.reject=bind$i(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$h(NativePromiseConstructor$2)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$e(NativePromisePrototype$1,"then",(function(e,t){var r=this;return new PromiseConstructor((function(e,t){call$v(nativeThen,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf$8&&setPrototypeOf$8(NativePromisePrototype$1,PromisePrototype)}$$1o({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$8(PromiseConstructor,PROMISE,!1),setSpecies$6(PROMISE);var iterators={},wellKnownSymbol$k=wellKnownSymbol$s,Iterators$4=iterators,ITERATOR$a=wellKnownSymbol$k("iterator"),ArrayPrototype$6=Array.prototype,isArrayIteratorMethod$3=function(e){return void 0!==e&&(Iterators$4.Array===e||ArrayPrototype$6[ITERATOR$a]===e)},classof$j=classof$n,getMethod$4=getMethod$6,isNullOrUndefined$9=isNullOrUndefined$d,Iterators$3=iterators,wellKnownSymbol$j=wellKnownSymbol$s,ITERATOR$9=wellKnownSymbol$j("iterator"),getIteratorMethod$4=function(e){if(!isNullOrUndefined$9(e))return getMethod$4(e,ITERATOR$9)||getMethod$4(e,"@@iterator")||Iterators$3[classof$j(e)]},call$u=functionCall,aCallable$g=aCallable$m,anObject$k=anObject$p,tryToString$6=tryToString$9,getIteratorMethod$3=getIteratorMethod$4,$TypeError$c=TypeError,getIterator$9=function(e,t){var r=arguments.length<2?getIteratorMethod$3(e):t;if(aCallable$g(r))return anObject$k(call$u(r,e));throw $TypeError$c(tryToString$6(e)+" is not iterable")},call$t=functionCall,anObject$j=anObject$p,getMethod$3=getMethod$6,iteratorClose$1=function(e,t,r){var n,o;anObject$j(e);try{if(!(n=getMethod$3(e,"return"))){if("throw"===t)throw r;return r}n=call$t(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$j(n),r},bind$h=functionBindContext,call$s=functionCall,anObject$i=anObject$p,tryToString$5=tryToString$9,isArrayIteratorMethod$2=isArrayIteratorMethod$3,lengthOfArrayLike$o=lengthOfArrayLike$q,isPrototypeOf$g=objectIsPrototypeOf,getIterator$8=getIterator$9,getIteratorMethod$2=getIteratorMethod$4,iteratorClose=iteratorClose$1,$TypeError$b=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$m=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),f=bind$h(t,u),h=function(e){return n&&iteratorClose(n,"normal",e),new Result(!0,e)},m=function(e){return $?(anObject$i(e),y?f(e[0],e[1],h):f(e[0],e[1])):y?f(e,h):f(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(o=getIteratorMethod$2(e)))throw $TypeError$b(tryToString$5(e)+" is not iterable");if(isArrayIteratorMethod$2(o)){for(i=0,a=lengthOfArrayLike$o(e);a>i;i++)if((s=m(e[i]))&&isPrototypeOf$g(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$8(e,o)}for(l=d?e.next:n.next;!(c=call$s(l,n)).done;){try{s=m(c.value)}catch(e){iteratorClose(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$g(ResultPrototype,s))return s}return new Result(!1)},wellKnownSymbol$i=wellKnownSymbol$s,ITERATOR$8=wellKnownSymbol$i("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$8]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$6=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$8]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration$5=checkCorrectnessOfIteration$6,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$5((function(e){NativePromiseConstructor$1.all(e).then(void 0,(function(){}))})),$$1n=_export,call$r=functionCall,aCallable$f=aCallable$m,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$l=iterate$m,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$1n({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{all:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,o=r.reject,i=perform$1((function(){var r=aCallable$f(t.resolve),i=[],a=0,s=1;iterate$l(e,(function(e){var l=a++,c=!1;s++,call$r(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 $$1m=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$5=getBuiltIn$b,isCallable$g=isCallable$y,defineBuiltIn$d=defineBuiltIn$h,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype;if($$1m({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable$g(NativePromiseConstructor)){var method$5=getBuiltIn$5("Promise").prototype.catch;NativePromisePrototype.catch!==method$5&&defineBuiltIn$d(NativePromisePrototype,"catch",method$5,{unsafe:!0})}var $$1l=_export,call$q=functionCall,aCallable$e=aCallable$m,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate$k=iterate$m,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration;$$1l({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{race:function(e){var t=this,r=newPromiseCapabilityModule$1.f(t),n=r.reject,o=perform((function(){var o=aCallable$e(t.resolve);iterate$k(e,(function(e){call$q(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$1k=_export,call$p=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$1k({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call$p(t.reject,void 0,e),t.promise}});var anObject$h=anObject$p,isObject$q=isObject$x,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){if(anObject$h(e),isObject$q(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$1j=_export,getBuiltIn$4=getBuiltIn$b,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;getBuiltIn$4("Promise"),$$1j({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});var ProxyPromise$1=function(){function e(){var t,r;_classCallCheck$5(this,e);var n=new _Promise((function(e,n){t=e,r=n}));return n.resolve=t,n.reject=r,n}return _createClass$5(e,[{key:"resolve",value:function(e){}},{key:"reject",value:function(e){}}]),e}(),$$1i=_export,uncurryThis$O=functionUncurryThis,$Date=Date,thisTimeValue$1=uncurryThis$O($Date.prototype.getTime);$$1i({target:"Date",stat:!0},{now:function(){return thisTimeValue$1(new $Date)}});var uncurryThis$N=functionUncurryThis,defineBuiltIn$c=defineBuiltIn$h,DatePrototype=Date.prototype,INVALID_DATE="Invalid Date",TO_STRING$2="toString",nativeDateToString=uncurryThis$N(DatePrototype[TO_STRING$2]),thisTimeValue=uncurryThis$N(DatePrototype.getTime);String(new Date(NaN))!=INVALID_DATE&&defineBuiltIn$c(DatePrototype,TO_STRING$2,(function(){var e=thisTimeValue(this);return e==e?nativeDateToString(this):INVALID_DATE}));var Raf=function(){function e(){_classCallCheck$5(this,e)}return _createClass$5(e,null,[{key:"install",value:function(){if(window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,window.cancelAnimationFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame,!window.requestAnimationFrame){var e=_Date$now();window.requestAnimationFrame=function(t){var r=_Date$now(),n=Math.max(16.7-(r-e),0),o=_setTimeout(t,n);return e=r+n,o}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}}]),e}(),uncurryThis$M=functionUncurryThis,aCallable$d=aCallable$m,isObject$p=isObject$x,hasOwn$j=hasOwnProperty_1,arraySlice$b=arraySlice$e,NATIVE_BIND=functionBindNative,$Function=Function,concat$2=uncurryThis$M([].concat),join$2=uncurryThis$M([].join),factories={},construct2=function(e,t,r){if(!hasOwn$j(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=$Function("C,a","return new C("+join$2(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$d(this),r=t.prototype,n=arraySlice$b(arguments,1),o=function(){var r=concat$2(n,arraySlice$b(arguments));return this instanceof o?construct2(t,r.length,r):t.apply(e,r)};return isObject$p(r)&&(o.prototype=r),o},$$1h=_export,bind$g=functionBind;$$1h({target:"Function",proto:!0,forced:Function.bind!==bind$g},{bind:bind$g});var FpsDetection=function(){function e(){var t;_classCallCheck$5(this,e),this.fps=0,this.isStoped=!0,this.ticks=[],this.isSupport=!0,this.maxFps=0,this.step=_bindInstanceProperty(t=this._step).call(t,this),this.rafId=null}return _createClass$5(e,[{key:"_step",value:function(e){var t=this.ticks;if(t.unshift(e),t.length>10){var r=t.pop();r&&(this.fps=Math.floor(1e4/(e-r)),this.updateFpsInfo())}this.isStoped||(this.rafId=window.requestAnimationFrame(this.step))}},{key:"updateFpsInfo",value:function(){this.fps>this.maxFps&&(this.maxFps=this.fps)}},{key:"start",value:function(){void 0!==window.requestAnimationFrame&&(this.isStoped=!1,this.rafId=window.requestAnimationFrame(this.step))}},{key:"stop",value:function(){window.cancelAnimationFrame(this.rafId),this.isStoped=!0}}],[{key:"install",value:function(){Raf.install()}}]),e}(),classof$i=classof$n,$String$1=String,toString$l=function(e){if("Symbol"===classof$i(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$1(e)},anObject$g=anObject$p,regexpFlags$3=function(){var e=anObject$g(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},objectDefineProperties={},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$4=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$j=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$4=objectDefineProperty,anObject$f=anObject$p,toIndexedObject$e=toIndexedObject$i,objectKeys$3=objectKeys$4;objectDefineProperties.f=DESCRIPTORS$j&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$f(e);for(var r,n=toIndexedObject$e(t),o=objectKeys$3(t),i=o.length,a=0;i>a;)definePropertyModule$4.f(e,r=o[a++],n[r]);return e};var activeXDocument,anObject$e=anObject$p,definePropertiesModule$1=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys$4=hiddenKeys$8,html=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$2=sharedKey$4,GT=">",LT="<",PROTOTYPE$3="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$2("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$1("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html.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.length;e--;)delete NullProtoObject[PROTOTYPE$3][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$3]=anObject$e(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$3]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},fails$_=fails$19,arrayMethodIsStrict$b=function(e,t){var r=[][e];return!!r&&fails$_((function(){r.call(null,t||function(){return 1},1)}))},wellKnownSymbol$h=wellKnownSymbol$s,create$9=objectCreate,defineProperty$c=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$h("unscopables"),ArrayPrototype$5=Array.prototype;null==ArrayPrototype$5[UNSCOPABLES]&&defineProperty$c(ArrayPrototype$5,UNSCOPABLES,{configurable:!0,value:create$9(null)});var IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,addToUnscopables$3=function(e){ArrayPrototype$5[UNSCOPABLES][e]=!0},fails$Z=fails$19,correctPrototypeGetter=!fails$Z((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$i=hasOwnProperty_1,isCallable$f=isCallable$y,toObject$i=toObject$k,sharedKey$1=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey$1("IE_PROTO"),$Object=Object,ObjectPrototype$6=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object.getPrototypeOf:function(e){var t=toObject$i(e);if(hasOwn$i(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$f(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype$6:null},fails$Y=fails$19,isCallable$e=isCallable$y,isObject$o=isObject$x,getPrototypeOf$5=objectGetPrototypeOf,defineBuiltIn$b=defineBuiltIn$h,wellKnownSymbol$g=wellKnownSymbol$s,ITERATOR$7=wellKnownSymbol$g("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$5(getPrototypeOf$5(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$o(IteratorPrototype$2)||fails$Y((function(){var e={};return IteratorPrototype$2[ITERATOR$7].call(e)!==e}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),isCallable$e(IteratorPrototype$2[ITERATOR$7])||defineBuiltIn$b(IteratorPrototype$2,ITERATOR$7,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$8=objectCreate,createPropertyDescriptor$4=createPropertyDescriptor$7,setToStringTag$7=setToStringTag$9,Iterators$2=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$8(IteratorPrototype$1,{next:createPropertyDescriptor$4(+!n,r)}),setToStringTag$7(e,o,!1),Iterators$2[o]=returnThis$1,e},$$1g=_export,call$o=functionCall,FunctionName$2=functionName,isCallable$d=isCallable$y,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf$4=objectGetPrototypeOf,setPrototypeOf$7=objectSetPrototypeOf,setToStringTag$6=setToStringTag$9,createNonEnumerableProperty$a=createNonEnumerableProperty$d,defineBuiltIn$a=defineBuiltIn$h,wellKnownSymbol$f=wellKnownSymbol$s,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$5=FunctionName$2.PROPER,CONFIGURABLE_FUNCTION_NAME$2=FunctionName$2.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$6=wellKnownSymbol$f("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,i,a){createIteratorConstructor(r,t,n);var s,l,c,u=function(e){if(e===o&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",d=!1,p=e.prototype,y=p[ITERATOR$6]||p["@@iterator"]||o&&p[o],f=!BUGGY_SAFARI_ITERATORS&&y||u(o),h="Array"==t&&p.entries||y;if(h&&(s=getPrototypeOf$4(h.call(new e)))!==Object.prototype&&s.next&&(getPrototypeOf$4(s)!==IteratorPrototype&&(setPrototypeOf$7?setPrototypeOf$7(s,IteratorPrototype):isCallable$d(s[ITERATOR$6])||defineBuiltIn$a(s,ITERATOR$6,returnThis)),setToStringTag$6(s,$,!0)),PROPER_FUNCTION_NAME$5&&o==VALUES&&y&&y.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME$2?createNonEnumerableProperty$a(p,"name",VALUES):(d=!0,f=function(){return call$o(y,this)})),o)if(l={values:u(VALUES),keys:i?f:u(KEYS),entries:u(ENTRIES)},a)for(c in l)(BUGGY_SAFARI_ITERATORS||d||!(c in p))&&defineBuiltIn$a(p,c,l[c]);else $$1g({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||d},l);return p[ITERATOR$6]!==f&&defineBuiltIn$a(p,ITERATOR$6,f,{name:o}),Iterators$1[t]=f,l},createIterResultObject$5=function(e,t){return{value:e,done:t}},toIndexedObject$d=toIndexedObject$i,addToUnscopables$2=addToUnscopables$3,Iterators=iterators,InternalStateModule$c=internalState,defineProperty$b=objectDefineProperty.f,defineIterator$4=iteratorDefine,createIterResultObject$4=createIterResultObject$5,DESCRIPTORS$i=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$a=InternalStateModule$c.set,getInternalState$8=InternalStateModule$c.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator$4(Array,"Array",(function(e,t){setInternalState$a(this,{type:ARRAY_ITERATOR,target:toIndexedObject$d(e),index:0,kind:t})}),(function(){var e=getInternalState$8(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$4(void 0,!0)):createIterResultObject$4("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),values$d=Iterators.Arguments=Iterators.Array;if(addToUnscopables$2("keys"),addToUnscopables$2("values"),addToUnscopables$2("entries"),DESCRIPTORS$i&&"values"!==values$d.name)try{defineProperty$b(values$d,"name",{value:"values"})}catch(e){}var arrayBufferBasicDetection$1="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineBuiltIn$9=defineBuiltIn$h,defineBuiltIns$5=function(e,t,r){for(var n in t)defineBuiltIn$9(e,n,t[n],r);return e},toIntegerOrInfinity$e=toIntegerOrInfinity$h,toLength$e=toLength$g,$RangeError$8=RangeError,toIndex$5=function(e){if(void 0===e)return 0;var t=toIntegerOrInfinity$e(e),r=toLength$e(t);if(t!==r)throw $RangeError$8("Wrong length or index");return r},$Array$4=Array,abs$3=Math.abs,pow$4=Math.pow,floor$a=Math.floor,log$5=Math.log,LN2$1=Math.LN2,pack$1=function(e,t,r){var n,o,i,a=$Array$4(r),s=8*r-t-1,l=(1<<s)-1,c=l>>1,u=23===t?pow$4(2,-24)-pow$4(2,-77):0,$=e<0||0===e&&1/e<0?1:0,d=0;for((e=abs$3(e))!=e||e===1/0?(o=e!=e?1:0,n=l):(n=floor$a(log$5(e)/LN2$1),e*(i=pow$4(2,-n))<1&&(n--,i*=2),(e+=n+c>=1?u/i:u*pow$4(2,1-c))*i>=2&&(n++,i/=2),n+c>=l?(o=0,n=l):n+c>=1?(o=(e*i-1)*pow$4(2,t),n+=c):(o=e*pow$4(2,c-1)*pow$4(2,t),n=0));t>=8;)a[d++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)a[d++]=255&n,n/=256,s-=8;return a[--d]|=128*$,a},unpack$1=function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;)u=256*u+e[l--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[l--],s-=8;if(0===u)u=1-a;else{if(u===i)return r?NaN:c?-1/0:1/0;r+=pow$4(2,t),u-=a}return(c?-1:1)*r*pow$4(2,u-t)},ieee754$1={pack:pack$1,unpack:unpack$1},toObject$h=toObject$k,toAbsoluteIndex$9=toAbsoluteIndex$b,lengthOfArrayLike$n=lengthOfArrayLike$q,arrayFill$3=function(e){for(var t=toObject$h(this),r=lengthOfArrayLike$n(t),n=arguments.length,o=toAbsoluteIndex$9(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:toAbsoluteIndex$9(i,r);a>o;)t[o++]=e;return t},toPropertyKey$3=toPropertyKey$6,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$7,createProperty$2=function(e,t,r){var n=toPropertyKey$3(t);n in e?definePropertyModule$3.f(e,n,createPropertyDescriptor$3(0,r)):e[n]=r},toAbsoluteIndex$8=toAbsoluteIndex$b,lengthOfArrayLike$m=lengthOfArrayLike$q,createProperty$1=createProperty$2,$Array$3=Array,max$2=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$m(e),o=toAbsoluteIndex$8(t,n),i=toAbsoluteIndex$8(void 0===r?n:r,n),a=$Array$3(max$2(i-o,0)),s=0;o<i;o++,s++)createProperty$1(a,s,e[o]);return a.length=s,a},global$A=global$T,uncurryThis$L=functionUncurryThis,DESCRIPTORS$h=descriptors,NATIVE_ARRAY_BUFFER$3=arrayBufferBasicDetection$1,FunctionName$1=functionName,createNonEnumerableProperty$9=createNonEnumerableProperty$d,defineBuiltInAccessor$5=defineBuiltInAccessor$7,defineBuiltIns$4=defineBuiltIns$5,fails$X=fails$19,anInstance$9=anInstance$b,toIntegerOrInfinity$d=toIntegerOrInfinity$h,toLength$d=toLength$g,toIndex$4=toIndex$5,IEEE754$1=ieee754$1,getPrototypeOf$3=objectGetPrototypeOf,setPrototypeOf$6=objectSetPrototypeOf,getOwnPropertyNames$4=objectGetOwnPropertyNames.f,arrayFill$2=arrayFill$3,arraySlice$a=arraySliceSimple,setToStringTag$5=setToStringTag$9,InternalStateModule$b=internalState,PROPER_FUNCTION_NAME$4=FunctionName$1.PROPER,CONFIGURABLE_FUNCTION_NAME$1=FunctionName$1.CONFIGURABLE,ARRAY_BUFFER$2="ArrayBuffer",DATA_VIEW$1="DataView",PROTOTYPE$2="prototype",WRONG_LENGTH$3="Wrong length",WRONG_INDEX$1="Wrong index",getInternalArrayBufferState=InternalStateModule$b.getterFor(ARRAY_BUFFER$2),getInternalDataViewState=InternalStateModule$b.getterFor(DATA_VIEW$1),setInternalState$9=InternalStateModule$b.set,NativeArrayBuffer$2=global$A[ARRAY_BUFFER$2],$ArrayBuffer$1=NativeArrayBuffer$2,ArrayBufferPrototype$3=$ArrayBuffer$1&&$ArrayBuffer$1[PROTOTYPE$2],$DataView$1=global$A[DATA_VIEW$1],DataViewPrototype$3=$DataView$1&&$DataView$1[PROTOTYPE$2],ObjectPrototype$5=Object.prototype,Array$2=global$A.Array,RangeError$6=global$A.RangeError,fill$1=uncurryThis$L(arrayFill$2),reverse$1=uncurryThis$L([].reverse),packIEEE754$1=IEEE754$1.pack,unpackIEEE754$1=IEEE754$1.unpack,packInt8$1=function(e){return[255&e]},packInt16$1=function(e){return[255&e,e>>8&255]},packInt32$1=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32$1=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32$1=function(e){return packIEEE754$1(e,23,4)},packFloat64$1=function(e){return packIEEE754$1(e,52,8)},addGetter$3=function(e,t,r){defineBuiltInAccessor$5(e[PROTOTYPE$2],t,{configurable:!0,get:function(){return r(this)[t]}})},get$3=function(e,t,r,n){var o=getInternalDataViewState(e),i=toIndex$4(r),a=!!n;if(i+t>o.byteLength)throw RangeError$6(WRONG_INDEX$1);var s=o.bytes,l=i+o.byteOffset,c=arraySlice$a(s,l,l+t);return a?c:reverse$1(c)},set$7=function(e,t,r,n,o,i){var a=getInternalDataViewState(e),s=toIndex$4(r),l=n(+o),c=!!i;if(s+t>a.byteLength)throw RangeError$6(WRONG_INDEX$1);for(var u=a.bytes,$=s+a.byteOffset,d=0;d<t;d++)u[$+d]=l[c?d:t-d-1]};if(NATIVE_ARRAY_BUFFER$3){var INCORRECT_ARRAY_BUFFER_NAME$1=PROPER_FUNCTION_NAME$4&&NativeArrayBuffer$2.name!==ARRAY_BUFFER$2;if(fails$X((function(){NativeArrayBuffer$2(1)}))&&fails$X((function(){new NativeArrayBuffer$2(-1)}))&&!fails$X((function(){return new NativeArrayBuffer$2,new NativeArrayBuffer$2(1.5),new NativeArrayBuffer$2(NaN),1!=NativeArrayBuffer$2.length||INCORRECT_ARRAY_BUFFER_NAME$1&&!CONFIGURABLE_FUNCTION_NAME$1})))INCORRECT_ARRAY_BUFFER_NAME$1&&CONFIGURABLE_FUNCTION_NAME$1&&createNonEnumerableProperty$9(NativeArrayBuffer$2,"name",ARRAY_BUFFER$2);else{($ArrayBuffer$1=function(e){return anInstance$9(this,ArrayBufferPrototype$3),new NativeArrayBuffer$2(toIndex$4(e))})[PROTOTYPE$2]=ArrayBufferPrototype$3;for(var key$1,keys$2=getOwnPropertyNames$4(NativeArrayBuffer$2),j$1=0;keys$2.length>j$1;)(key$1=keys$2[j$1++])in $ArrayBuffer$1||createNonEnumerableProperty$9($ArrayBuffer$1,key$1,NativeArrayBuffer$2[key$1]);ArrayBufferPrototype$3.constructor=$ArrayBuffer$1}setPrototypeOf$6&&getPrototypeOf$3(DataViewPrototype$3)!==ObjectPrototype$5&&setPrototypeOf$6(DataViewPrototype$3,ObjectPrototype$5);var testView$1=new $DataView$1(new $ArrayBuffer$1(2)),$setInt8$1=uncurryThis$L(DataViewPrototype$3.setInt8);testView$1.setInt8(0,2147483648),testView$1.setInt8(1,2147483649),!testView$1.getInt8(0)&&testView$1.getInt8(1)||defineBuiltIns$4(DataViewPrototype$3,{setInt8:function(e,t){$setInt8$1(this,e,t<<24>>24)},setUint8:function(e,t){$setInt8$1(this,e,t<<24>>24)}},{unsafe:!0})}else ArrayBufferPrototype$3=($ArrayBuffer$1=function(e){anInstance$9(this,ArrayBufferPrototype$3);var t=toIndex$4(e);setInternalState$9(this,{type:ARRAY_BUFFER$2,bytes:fill$1(Array$2(t),0),byteLength:t}),DESCRIPTORS$h||(this.byteLength=t,this.detached=!1)})[PROTOTYPE$2],DataViewPrototype$3=($DataView$1=function(e,t,r){anInstance$9(this,DataViewPrototype$3),anInstance$9(e,ArrayBufferPrototype$3);var n=getInternalArrayBufferState(e),o=n.byteLength,i=toIntegerOrInfinity$d(t);if(i<0||i>o)throw RangeError$6("Wrong offset");if(i+(r=void 0===r?o-i:toLength$d(r))>o)throw RangeError$6(WRONG_LENGTH$3);setInternalState$9(this,{type:DATA_VIEW$1,buffer:e,byteLength:r,byteOffset:i,bytes:n.bytes}),DESCRIPTORS$h||(this.buffer=e,this.byteLength=r,this.byteOffset=i)})[PROTOTYPE$2],DESCRIPTORS$h&&(addGetter$3($ArrayBuffer$1,"byteLength",getInternalArrayBufferState),addGetter$3($DataView$1,"buffer",getInternalDataViewState),addGetter$3($DataView$1,"byteLength",getInternalDataViewState),addGetter$3($DataView$1,"byteOffset",getInternalDataViewState)),defineBuiltIns$4(DataViewPrototype$3,{getInt8:function(e){return get$3(this,1,e)[0]<<24>>24},getUint8:function(e){return get$3(this,1,e)[0]},getInt16:function(e){var t=get$3(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=get$3(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return unpackInt32$1(get$3(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return unpackInt32$1(get$3(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return unpackIEEE754$1(get$3(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return unpackIEEE754$1(get$3(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){set$7(this,1,e,packInt8$1,t)},setUint8:function(e,t){set$7(this,1,e,packInt8$1,t)},setInt16:function(e,t){set$7(this,2,e,packInt16$1,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){set$7(this,2,e,packInt16$1,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){set$7(this,4,e,packInt32$1,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){set$7(this,4,e,packInt32$1,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){set$7(this,4,e,packFloat32$1,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){set$7(this,8,e,packFloat64$1,t,arguments.length>2&&arguments[2])}});setToStringTag$5($ArrayBuffer$1,ARRAY_BUFFER$2),setToStringTag$5($DataView$1,DATA_VIEW$1);var arrayBuffer$1={ArrayBuffer:$ArrayBuffer$1,DataView:$DataView$1},$$1f=_export,uncurryThis$K=functionUncurryThisClause,fails$W=fails$19,ArrayBufferModule$3=arrayBuffer$1,anObject$d=anObject$p,toAbsoluteIndex$7=toAbsoluteIndex$b,toLength$c=toLength$g,speciesConstructor$4=speciesConstructor$6,ArrayBuffer$7=ArrayBufferModule$3.ArrayBuffer,DataView$4=ArrayBufferModule$3.DataView,DataViewPrototype$2=DataView$4.prototype,nativeArrayBufferSlice$1=uncurryThis$K(ArrayBuffer$7.prototype.slice),getUint8$1=uncurryThis$K(DataViewPrototype$2.getUint8),setUint8$1=uncurryThis$K(DataViewPrototype$2.setUint8),INCORRECT_SLICE$1=fails$W((function(){return!new ArrayBuffer$7(2).slice(1,void 0).byteLength}));$$1f({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE$1},{slice:function(e,t){if(nativeArrayBufferSlice$1&&void 0===t)return nativeArrayBufferSlice$1(anObject$d(this),e);for(var r=anObject$d(this).byteLength,n=toAbsoluteIndex$7(e,r),o=toAbsoluteIndex$7(void 0===t?r:t,r),i=new(speciesConstructor$4(this,ArrayBuffer$7))(toLength$c(o-n)),a=new DataView$4(this),s=new DataView$4(i),l=0;n<o;)setUint8$1(s,l++,getUint8$1(a,n++));return i}});var NAME$1,Constructor$1,Prototype$1,typedArrayConstructor$1={exports:{}},NATIVE_ARRAY_BUFFER$2=arrayBufferBasicDetection$1,DESCRIPTORS$g=descriptors,global$z=global$T,isCallable$c=isCallable$y,isObject$n=isObject$x,hasOwn$h=hasOwnProperty_1,classof$h=classof$n,tryToString$4=tryToString$9,createNonEnumerableProperty$8=createNonEnumerableProperty$d,defineBuiltIn$8=defineBuiltIn$h,defineBuiltInAccessor$4=defineBuiltInAccessor$7,isPrototypeOf$f=objectIsPrototypeOf,getPrototypeOf$2=objectGetPrototypeOf,setPrototypeOf$5=objectSetPrototypeOf,wellKnownSymbol$e=wellKnownSymbol$s,uid$5=uid$8,InternalStateModule$a=internalState,enforceInternalState$3=InternalStateModule$a.enforce,getInternalState$7=InternalStateModule$a.get,Int8Array$8=global$z.Int8Array,Int8ArrayPrototype$3=Int8Array$8&&Int8Array$8.prototype,Uint8ClampedArray$2=global$z.Uint8ClampedArray,Uint8ClampedArrayPrototype$1=Uint8ClampedArray$2&&Uint8ClampedArray$2.prototype,TypedArray$3=Int8Array$8&&getPrototypeOf$2(Int8Array$8),TypedArrayPrototype$5=Int8ArrayPrototype$3&&getPrototypeOf$2(Int8ArrayPrototype$3),ObjectPrototype$4=Object.prototype,TypeError$4=global$z.TypeError,TO_STRING_TAG$2=wellKnownSymbol$e("toStringTag"),TYPED_ARRAY_TAG$3=uid$5("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1="TypedArrayConstructor",NATIVE_ARRAY_BUFFER_VIEWS$5=NATIVE_ARRAY_BUFFER$2&&!!setPrototypeOf$5&&"Opera"!==classof$h(global$z.opera),TYPED_ARRAY_TAG_REQUIRED$1=!1,TypedArrayConstructorsList$1={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList$1={BigInt64Array:8,BigUint64Array:8},isView$1=function(e){if(!isObject$n(e))return!1;var t=classof$h(e);return"DataView"===t||hasOwn$h(TypedArrayConstructorsList$1,t)||hasOwn$h(BigIntArrayConstructorsList$1,t)},getTypedArrayConstructor$3=function(e){var t=getPrototypeOf$2(e);if(isObject$n(t)){var r=getInternalState$7(t);return r&&hasOwn$h(r,TYPED_ARRAY_CONSTRUCTOR$1)?r[TYPED_ARRAY_CONSTRUCTOR$1]:getTypedArrayConstructor$3(t)}},isTypedArray$3=function(e){if(!isObject$n(e))return!1;var t=classof$h(e);return hasOwn$h(TypedArrayConstructorsList$1,t)||hasOwn$h(BigIntArrayConstructorsList$1,t)},aTypedArray$M=function(e){if(isTypedArray$3(e))return e;throw TypeError$4("Target is not a typed array")},aTypedArrayConstructor$8=function(e){if(isCallable$c(e)&&(!setPrototypeOf$5||isPrototypeOf$f(TypedArray$3,e)))return e;throw TypeError$4(tryToString$4(e)+" is not a typed array constructor")},exportTypedArrayMethod$O=function(e,t,r,n){if(DESCRIPTORS$g){if(r)for(var o in TypedArrayConstructorsList$1){var i=global$z[o];if(i&&hasOwn$h(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}TypedArrayPrototype$5[e]&&!r||defineBuiltIn$8(TypedArrayPrototype$5,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$5&&Int8ArrayPrototype$3[e]||t,n)}},exportTypedArrayStaticMethod$2=function(e,t,r){var n,o;if(DESCRIPTORS$g){if(setPrototypeOf$5){if(r)for(n in TypedArrayConstructorsList$1)if((o=global$z[n])&&hasOwn$h(o,e))try{delete o[e]}catch(e){}if(TypedArray$3[e]&&!r)return;try{return defineBuiltIn$8(TypedArray$3,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$5&&TypedArray$3[e]||t)}catch(e){}}for(n in TypedArrayConstructorsList$1)!(o=global$z[n])||o[e]&&!r||defineBuiltIn$8(o,e,t)}};for(NAME$1 in TypedArrayConstructorsList$1)(Prototype$1=(Constructor$1=global$z[NAME$1])&&Constructor$1.prototype)?enforceInternalState$3(Prototype$1)[TYPED_ARRAY_CONSTRUCTOR$1]=Constructor$1:NATIVE_ARRAY_BUFFER_VIEWS$5=!1;for(NAME$1 in BigIntArrayConstructorsList$1)(Prototype$1=(Constructor$1=global$z[NAME$1])&&Constructor$1.prototype)&&(enforceInternalState$3(Prototype$1)[TYPED_ARRAY_CONSTRUCTOR$1]=Constructor$1);if((!NATIVE_ARRAY_BUFFER_VIEWS$5||!isCallable$c(TypedArray$3)||TypedArray$3===Function.prototype)&&(TypedArray$3=function(){throw TypeError$4("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$5))for(NAME$1 in TypedArrayConstructorsList$1)global$z[NAME$1]&&setPrototypeOf$5(global$z[NAME$1],TypedArray$3);if((!NATIVE_ARRAY_BUFFER_VIEWS$5||!TypedArrayPrototype$5||TypedArrayPrototype$5===ObjectPrototype$4)&&(TypedArrayPrototype$5=TypedArray$3.prototype,NATIVE_ARRAY_BUFFER_VIEWS$5))for(NAME$1 in TypedArrayConstructorsList$1)global$z[NAME$1]&&setPrototypeOf$5(global$z[NAME$1].prototype,TypedArrayPrototype$5);if(NATIVE_ARRAY_BUFFER_VIEWS$5&&getPrototypeOf$2(Uint8ClampedArrayPrototype$1)!==TypedArrayPrototype$5&&setPrototypeOf$5(Uint8ClampedArrayPrototype$1,TypedArrayPrototype$5),DESCRIPTORS$g&&!hasOwn$h(TypedArrayPrototype$5,TO_STRING_TAG$2))for(NAME$1 in TYPED_ARRAY_TAG_REQUIRED$1=!0,defineBuiltInAccessor$4(TypedArrayPrototype$5,TO_STRING_TAG$2,{configurable:!0,get:function(){return isObject$n(this)?this[TYPED_ARRAY_TAG$3]:void 0}}),TypedArrayConstructorsList$1)global$z[NAME$1]&&createNonEnumerableProperty$8(global$z[NAME$1],TYPED_ARRAY_TAG$3,NAME$1);var arrayBufferViewCore$1={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$5,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQUIRED$1&&TYPED_ARRAY_TAG$3,aTypedArray:aTypedArray$M,aTypedArrayConstructor:aTypedArrayConstructor$8,exportTypedArrayMethod:exportTypedArrayMethod$O,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod$2,getTypedArrayConstructor:getTypedArrayConstructor$3,isView:isView$1,isTypedArray:isTypedArray$3,TypedArray:TypedArray$3,TypedArrayPrototype:TypedArrayPrototype$5},global$y=global$T,fails$V=fails$19,checkCorrectnessOfIteration$4=checkCorrectnessOfIteration$6,NATIVE_ARRAY_BUFFER_VIEWS$4=arrayBufferViewCore$1.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$6=global$y.ArrayBuffer,Int8Array$7=global$y.Int8Array,typedArrayConstructorsRequireWrappers$1=!NATIVE_ARRAY_BUFFER_VIEWS$4||!fails$V((function(){Int8Array$7(1)}))||!fails$V((function(){new Int8Array$7(-1)}))||!checkCorrectnessOfIteration$4((function(e){new Int8Array$7,new Int8Array$7(null),new Int8Array$7(1.5),new Int8Array$7(e)}),!0)||fails$V((function(){return 1!==new Int8Array$7(new ArrayBuffer$6(2),1,void 0).length})),isObject$m=isObject$x,floor$9=Math.floor,isIntegralNumber$3=Number.isInteger||function(e){return!isObject$m(e)&&isFinite(e)&&floor$9(e)===e},toIntegerOrInfinity$c=toIntegerOrInfinity$h,$RangeError$7=RangeError,toPositiveInteger$3=function(e){var t=toIntegerOrInfinity$c(e);if(t<0)throw $RangeError$7("The argument can't be less than 0");return t},toPositiveInteger$2=toPositiveInteger$3,$RangeError$6=RangeError,toOffset$5=function(e,t){var r=toPositiveInteger$2(e);if(r%t)throw $RangeError$6("Wrong offset");return r},classof$g=classof$n,isBigIntArray$3=function(e){var t=classof$g(e);return"BigInt64Array"==t||"BigUint64Array"==t},toPrimitive$2=toPrimitive$4,$TypeError$a=TypeError,toBigInt$5=function(e){var t=toPrimitive$2(e,"number");if("number"==typeof t)throw $TypeError$a("Can't convert number to bigint");return BigInt(t)},bind$f=functionBindContext,call$n=functionCall,aConstructor$3=aConstructor$5,toObject$g=toObject$k,lengthOfArrayLike$l=lengthOfArrayLike$q,getIterator$7=getIterator$9,getIteratorMethod$1=getIteratorMethod$4,isArrayIteratorMethod$1=isArrayIteratorMethod$3,isBigIntArray$2=isBigIntArray$3,aTypedArrayConstructor$7=arrayBufferViewCore$1.aTypedArrayConstructor,toBigInt$4=toBigInt$5,typedArrayFrom$3=function(e){var t,r,n,o,i,a,s,l,c=aConstructor$3(this),u=toObject$g(e),$=arguments.length,d=$>1?arguments[1]:void 0,p=void 0!==d,y=getIteratorMethod$1(u);if(y&&!isArrayIteratorMethod$1(y))for(l=(s=getIterator$7(u,y)).next,u=[];!(a=call$n(l,s)).done;)u.push(a.value);for(p&&$>2&&(d=bind$f(d,arguments[2])),r=lengthOfArrayLike$l(u),n=new(aTypedArrayConstructor$7(c))(r),o=isBigIntArray$2(n),t=0;r>t;t++)i=p?d(u[t],t):u[t],n[t]=o?toBigInt$4(i):+i;return n},classof$f=classofRaw$2,isArray$3=Array.isArray||function(e){return"Array"==classof$f(e)},isArray$2=isArray$3,isConstructor$1=isConstructor$3,isObject$l=isObject$x,wellKnownSymbol$d=wellKnownSymbol$s,SPECIES$3=wellKnownSymbol$d("species"),$Array$2=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$2(e)&&(t=e.constructor,(isConstructor$1(t)&&(t===$Array$2||isArray$2(t.prototype))||isObject$l(t)&&null===(t=t[SPECIES$3]))&&(t=void 0)),void 0===t?$Array$2:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$1=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},bind$e=functionBindContext,uncurryThis$J=functionUncurryThis,IndexedObject$5=indexedObject,toObject$f=toObject$k,lengthOfArrayLike$k=lengthOfArrayLike$q,arraySpeciesCreate=arraySpeciesCreate$1,push$g=uncurryThis$J([].push),createMethod$9=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,$){for(var d,p,y=toObject$f(l),f=IndexedObject$5(y),h=bind$e(c,u),m=lengthOfArrayLike$k(f),b=0,g=$||arraySpeciesCreate,S=t?g(l,m):r||a?g(l,0):void 0;m>b;b++)if((s||b in f)&&(p=h(d=f[b],b,y),e))if(t)S[b]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:push$g(S,d)}else switch(e){case 4:return!1;case 7:push$g(S,d)}return i?-1:n||o?o:S}},arrayIteration={forEach:createMethod$9(0),map:createMethod$9(1),filter:createMethod$9(2),some:createMethod$9(3),every:createMethod$9(4),find:createMethod$9(5),findIndex:createMethod$9(6),filterReject:createMethod$9(7)},isCallable$b=isCallable$y,isObject$k=isObject$x,setPrototypeOf$4=objectSetPrototypeOf,inheritIfRequired$5=function(e,t,r){var n,o;return setPrototypeOf$4&&isCallable$b(n=t.constructor)&&n!==r&&isObject$k(o=n.prototype)&&o!==r.prototype&&setPrototypeOf$4(e,o),e},$$1e=_export,global$x=global$T,call$m=functionCall,DESCRIPTORS$f=descriptors,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$2=typedArrayConstructorsRequireWrappers$1,ArrayBufferViewCore$P=arrayBufferViewCore$1,ArrayBufferModule$2=arrayBuffer$1,anInstance$8=anInstance$b,createPropertyDescriptor$2=createPropertyDescriptor$7,createNonEnumerableProperty$7=createNonEnumerableProperty$d,isIntegralNumber$2=isIntegralNumber$3,toLength$b=toLength$g,toIndex$3=toIndex$5,toOffset$4=toOffset$5,toPropertyKey$2=toPropertyKey$6,hasOwn$g=hasOwnProperty_1,classof$e=classof$n,isObject$j=isObject$x,isSymbol$3=isSymbol$6,create$7=objectCreate,isPrototypeOf$e=objectIsPrototypeOf,setPrototypeOf$3=objectSetPrototypeOf,getOwnPropertyNames$3=objectGetOwnPropertyNames.f,typedArrayFrom$2=typedArrayFrom$3,forEach$5=arrayIteration.forEach,setSpecies$5=setSpecies$7,defineBuiltInAccessor$3=defineBuiltInAccessor$7,definePropertyModule$2=objectDefineProperty,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,InternalStateModule$9=internalState,inheritIfRequired$4=inheritIfRequired$5,getInternalState$6=InternalStateModule$9.get,setInternalState$8=InternalStateModule$9.set,enforceInternalState$2=InternalStateModule$9.enforce,nativeDefineProperty$2=definePropertyModule$2.f,nativeGetOwnPropertyDescriptor$3=getOwnPropertyDescriptorModule$2.f,round$1=Math.round,RangeError$5=global$x.RangeError,ArrayBuffer$5=ArrayBufferModule$2.ArrayBuffer,ArrayBufferPrototype$2=ArrayBuffer$5.prototype,DataView$3=ArrayBufferModule$2.DataView,NATIVE_ARRAY_BUFFER_VIEWS$3=ArrayBufferViewCore$P.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG$2=ArrayBufferViewCore$P.TYPED_ARRAY_TAG,TypedArray$2=ArrayBufferViewCore$P.TypedArray,TypedArrayPrototype$4=ArrayBufferViewCore$P.TypedArrayPrototype,aTypedArrayConstructor$6=ArrayBufferViewCore$P.aTypedArrayConstructor,isTypedArray$2=ArrayBufferViewCore$P.isTypedArray,BYTES_PER_ELEMENT$1="BYTES_PER_ELEMENT",WRONG_LENGTH$2="Wrong length",fromList$1=function(e,t){aTypedArrayConstructor$6(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},addGetter$2=function(e,t){defineBuiltInAccessor$3(e,t,{configurable:!0,get:function(){return getInternalState$6(this)[t]}})},isArrayBuffer$1=function(e){var t;return isPrototypeOf$e(ArrayBufferPrototype$2,e)||"ArrayBuffer"==(t=classof$e(e))||"SharedArrayBuffer"==t},isTypedArrayIndex$1=function(e,t){return isTypedArray$2(e)&&!isSymbol$3(t)&&t in e&&isIntegralNumber$2(+t)&&t>=0},wrappedGetOwnPropertyDescriptor$1=function(e,t){return t=toPropertyKey$2(t),isTypedArrayIndex$1(e,t)?createPropertyDescriptor$2(2,e[t]):nativeGetOwnPropertyDescriptor$3(e,t)},wrappedDefineProperty$1=function(e,t,r){return t=toPropertyKey$2(t),!(isTypedArrayIndex$1(e,t)&&isObject$j(r)&&hasOwn$g(r,"value"))||hasOwn$g(r,"get")||hasOwn$g(r,"set")||r.configurable||hasOwn$g(r,"writable")&&!r.writable||hasOwn$g(r,"enumerable")&&!r.enumerable?nativeDefineProperty$2(e,t,r):(e[t]=r.value,e)};DESCRIPTORS$f?(NATIVE_ARRAY_BUFFER_VIEWS$3||(getOwnPropertyDescriptorModule$2.f=wrappedGetOwnPropertyDescriptor$1,definePropertyModule$2.f=wrappedDefineProperty$1,addGetter$2(TypedArrayPrototype$4,"buffer"),addGetter$2(TypedArrayPrototype$4,"byteOffset"),addGetter$2(TypedArrayPrototype$4,"byteLength"),addGetter$2(TypedArrayPrototype$4,"length")),$$1e({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS$3},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor$1,defineProperty:wrappedDefineProperty$1}),typedArrayConstructor$1.exports=function(e,t,r){var n=e.match(/\d+/)[0]/8,o=e+(r?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=global$x[o],l=s,c=l&&l.prototype,u={},$=function(e,t){nativeDefineProperty$2(e,t,{get:function(){return function(e,t){var r=getInternalState$6(e);return r.view[i](t*n+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=getInternalState$6(e);r&&(o=(o=round$1(o))<0?0:o>255?255:255&o),i.view[a](t*n+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS$3?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$2&&(l=t((function(e,t,r,o){return anInstance$8(e,c),inheritIfRequired$4(isObject$j(t)?isArrayBuffer$1(t)?void 0!==o?new s(t,toOffset$4(r,n),o):void 0!==r?new s(t,toOffset$4(r,n)):new s(t):isTypedArray$2(t)?fromList$1(l,t):call$m(typedArrayFrom$2,l,t):new s(toIndex$3(t)),e,l)})),setPrototypeOf$3&&setPrototypeOf$3(l,TypedArray$2),forEach$5(getOwnPropertyNames$3(s),(function(e){e in l||createNonEnumerableProperty$7(l,e,s[e])})),l.prototype=c):(l=t((function(e,t,r,o){anInstance$8(e,c);var i,a,s,u=0,d=0;if(isObject$j(t)){if(!isArrayBuffer$1(t))return isTypedArray$2(t)?fromList$1(l,t):call$m(typedArrayFrom$2,l,t);i=t,d=toOffset$4(r,n);var p=t.byteLength;if(void 0===o){if(p%n)throw RangeError$5(WRONG_LENGTH$2);if((a=p-d)<0)throw RangeError$5(WRONG_LENGTH$2)}else if((a=toLength$b(o)*n)+d>p)throw RangeError$5(WRONG_LENGTH$2);s=a/n}else s=toIndex$3(t),i=new ArrayBuffer$5(a=s*n);for(setInternalState$8(e,{buffer:i,byteOffset:d,byteLength:a,length:s,view:new DataView$3(i)});u<s;)$(e,u++)})),setPrototypeOf$3&&setPrototypeOf$3(l,TypedArray$2),c=l.prototype=create$7(TypedArrayPrototype$4)),c.constructor!==l&&createNonEnumerableProperty$7(c,"constructor",l),enforceInternalState$2(c).TypedArrayConstructor=l,TYPED_ARRAY_TAG$2&&createNonEnumerableProperty$7(c,TYPED_ARRAY_TAG$2,o);var d=l!=s;u[o]=l,$$1e({global:!0,constructor:!0,forced:d,sham:!NATIVE_ARRAY_BUFFER_VIEWS$3},u),BYTES_PER_ELEMENT$1 in l||createNonEnumerableProperty$7(l,BYTES_PER_ELEMENT$1,n),BYTES_PER_ELEMENT$1 in c||createNonEnumerableProperty$7(c,BYTES_PER_ELEMENT$1,n),setSpecies$5(o)}):typedArrayConstructor$1.exports=function(){};var typedArrayConstructorExports$1=typedArrayConstructor$1.exports,tryToString$3=tryToString$9,$TypeError$9=TypeError,deletePropertyOrThrow$4=function(e,t){if(!delete e[t])throw $TypeError$9("Cannot delete property "+tryToString$3(t)+" of "+tryToString$3(e))},toObject$e=toObject$k,toAbsoluteIndex$6=toAbsoluteIndex$b,lengthOfArrayLike$j=lengthOfArrayLike$q,deletePropertyOrThrow$3=deletePropertyOrThrow$4,min$7=Math.min,arrayCopyWithin$1=[].copyWithin||function(e,t){var r=toObject$e(this),n=lengthOfArrayLike$j(r),o=toAbsoluteIndex$6(e,n),i=toAbsoluteIndex$6(t,n),a=arguments.length>2?arguments[2]:void 0,s=min$7((void 0===a?n:toAbsoluteIndex$6(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$3(r,o),o+=l,i+=l;return r},uncurryThis$I=functionUncurryThis,ArrayBufferViewCore$O=arrayBufferViewCore$1,$ArrayCopyWithin$1=arrayCopyWithin$1,u$ArrayCopyWithin$1=uncurryThis$I($ArrayCopyWithin$1),aTypedArray$L=ArrayBufferViewCore$O.aTypedArray,exportTypedArrayMethod$N=ArrayBufferViewCore$O.exportTypedArrayMethod;exportTypedArrayMethod$N("copyWithin",(function(e,t){return u$ArrayCopyWithin$1(aTypedArray$L(this),e,t,arguments.length>2?arguments[2]:void 0)}));var ArrayBufferViewCore$N=arrayBufferViewCore$1,$every$1=arrayIteration.every,aTypedArray$K=ArrayBufferViewCore$N.aTypedArray,exportTypedArrayMethod$M=ArrayBufferViewCore$N.exportTypedArrayMethod;exportTypedArrayMethod$M("every",(function(e){return $every$1(aTypedArray$K(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$M=arrayBufferViewCore$1,$fill$1=arrayFill$3,toBigInt$3=toBigInt$5,classof$d=classof$n,call$l=functionCall,uncurryThis$H=functionUncurryThis,fails$U=fails$19,aTypedArray$J=ArrayBufferViewCore$M.aTypedArray,exportTypedArrayMethod$L=ArrayBufferViewCore$M.exportTypedArrayMethod,slice$2=uncurryThis$H("".slice),CONVERSION_BUG$1=fails$U((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}));exportTypedArrayMethod$L("fill",(function(e){var t=arguments.length;aTypedArray$J(this);var r="Big"===slice$2(classof$d(this),0,3)?toBigInt$3(e):+e;return call$l($fill$1,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),CONVERSION_BUG$1);var lengthOfArrayLike$i=lengthOfArrayLike$q,arrayFromConstructorAndList$3=function(e,t){for(var r=0,n=lengthOfArrayLike$i(t),o=new e(n);n>r;)o[r]=t[r++];return o},ArrayBufferViewCore$L=arrayBufferViewCore$1,speciesConstructor$3=speciesConstructor$6,aTypedArrayConstructor$5=ArrayBufferViewCore$L.aTypedArrayConstructor,getTypedArrayConstructor$2=ArrayBufferViewCore$L.getTypedArrayConstructor,typedArraySpeciesConstructor$9=function(e){return aTypedArrayConstructor$5(speciesConstructor$3(e,getTypedArrayConstructor$2(e)))},arrayFromConstructorAndList$2=arrayFromConstructorAndList$3,typedArraySpeciesConstructor$8=typedArraySpeciesConstructor$9,typedArrayFromSpeciesAndList$1=function(e,t){return arrayFromConstructorAndList$2(typedArraySpeciesConstructor$8(e),t)},ArrayBufferViewCore$K=arrayBufferViewCore$1,$filter$1=arrayIteration.filter,fromSpeciesAndList$1=typedArrayFromSpeciesAndList$1,aTypedArray$I=ArrayBufferViewCore$K.aTypedArray,exportTypedArrayMethod$K=ArrayBufferViewCore$K.exportTypedArrayMethod;exportTypedArrayMethod$K("filter",(function(e){var t=$filter$1(aTypedArray$I(this),e,arguments.length>1?arguments[1]:void 0);return fromSpeciesAndList$1(this,t)}));var ArrayBufferViewCore$J=arrayBufferViewCore$1,$find$2=arrayIteration.find,aTypedArray$H=ArrayBufferViewCore$J.aTypedArray,exportTypedArrayMethod$J=ArrayBufferViewCore$J.exportTypedArrayMethod;exportTypedArrayMethod$J("find",(function(e){return $find$2(aTypedArray$H(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$I=arrayBufferViewCore$1,$findIndex$1=arrayIteration.findIndex,aTypedArray$G=ArrayBufferViewCore$I.aTypedArray,exportTypedArrayMethod$I=ArrayBufferViewCore$I.exportTypedArrayMethod;exportTypedArrayMethod$I("findIndex",(function(e){return $findIndex$1(aTypedArray$G(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$H=arrayBufferViewCore$1,$forEach$3=arrayIteration.forEach,aTypedArray$F=ArrayBufferViewCore$H.aTypedArray,exportTypedArrayMethod$H=ArrayBufferViewCore$H.exportTypedArrayMethod;exportTypedArrayMethod$H("forEach",(function(e){$forEach$3(aTypedArray$F(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$G=arrayBufferViewCore$1,$includes$2=arrayIncludes.includes,aTypedArray$E=ArrayBufferViewCore$G.aTypedArray,exportTypedArrayMethod$G=ArrayBufferViewCore$G.exportTypedArrayMethod;exportTypedArrayMethod$G("includes",(function(e){return $includes$2(aTypedArray$E(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$F=arrayBufferViewCore$1,$indexOf$2=arrayIncludes.indexOf,aTypedArray$D=ArrayBufferViewCore$F.aTypedArray,exportTypedArrayMethod$F=ArrayBufferViewCore$F.exportTypedArrayMethod;exportTypedArrayMethod$F("indexOf",(function(e){return $indexOf$2(aTypedArray$D(this),e,arguments.length>1?arguments[1]:void 0)}));var global$w=global$T,fails$T=fails$19,uncurryThis$G=functionUncurryThis,ArrayBufferViewCore$E=arrayBufferViewCore$1,ArrayIterators$1=es_array_iterator,wellKnownSymbol$c=wellKnownSymbol$s,ITERATOR$5=wellKnownSymbol$c("iterator"),Uint8Array$4=global$w.Uint8Array,arrayValues$1=uncurryThis$G(ArrayIterators$1.values),arrayKeys$1=uncurryThis$G(ArrayIterators$1.keys),arrayEntries$1=uncurryThis$G(ArrayIterators$1.entries),aTypedArray$C=ArrayBufferViewCore$E.aTypedArray,exportTypedArrayMethod$E=ArrayBufferViewCore$E.exportTypedArrayMethod,TypedArrayPrototype$3=Uint8Array$4&&Uint8Array$4.prototype,GENERIC$1=!fails$T((function(){TypedArrayPrototype$3[ITERATOR$5].call([1])})),ITERATOR_IS_VALUES$1=!!TypedArrayPrototype$3&&TypedArrayPrototype$3.values&&TypedArrayPrototype$3[ITERATOR$5]===TypedArrayPrototype$3.values&&"values"===TypedArrayPrototype$3.values.name,typedArrayValues$1=function(){return arrayValues$1(aTypedArray$C(this))};exportTypedArrayMethod$E("entries",(function(){return arrayEntries$1(aTypedArray$C(this))}),GENERIC$1),exportTypedArrayMethod$E("keys",(function(){return arrayKeys$1(aTypedArray$C(this))}),GENERIC$1),exportTypedArrayMethod$E("values",typedArrayValues$1,GENERIC$1||!ITERATOR_IS_VALUES$1,{name:"values"}),exportTypedArrayMethod$E(ITERATOR$5,typedArrayValues$1,GENERIC$1||!ITERATOR_IS_VALUES$1,{name:"values"});var ArrayBufferViewCore$D=arrayBufferViewCore$1,uncurryThis$F=functionUncurryThis,aTypedArray$B=ArrayBufferViewCore$D.aTypedArray,exportTypedArrayMethod$D=ArrayBufferViewCore$D.exportTypedArrayMethod,$join$1=uncurryThis$F([].join);exportTypedArrayMethod$D("join",(function(e){return $join$1(aTypedArray$B(this),e)}));var apply$9=functionApply,toIndexedObject$c=toIndexedObject$i,toIntegerOrInfinity$b=toIntegerOrInfinity$h,lengthOfArrayLike$h=lengthOfArrayLike$q,arrayMethodIsStrict$a=arrayMethodIsStrict$b,min$6=Math.min,$lastIndexOf$4=[].lastIndexOf,NEGATIVE_ZERO$3=!!$lastIndexOf$4&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$8=arrayMethodIsStrict$a("lastIndexOf"),FORCED$m=NEGATIVE_ZERO$3||!STRICT_METHOD$8,arrayLastIndexOf$2=FORCED$m?function(e){if(NEGATIVE_ZERO$3)return apply$9($lastIndexOf$4,this,arguments)||0;var t=toIndexedObject$c(this),r=lengthOfArrayLike$h(t),n=r-1;for(arguments.length>1&&(n=min$6(n,toIntegerOrInfinity$b(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf$4,ArrayBufferViewCore$C=arrayBufferViewCore$1,apply$8=functionApply,$lastIndexOf$3=arrayLastIndexOf$2,aTypedArray$A=ArrayBufferViewCore$C.aTypedArray,exportTypedArrayMethod$C=ArrayBufferViewCore$C.exportTypedArrayMethod;exportTypedArrayMethod$C("lastIndexOf",(function(e){var t=arguments.length;return apply$8($lastIndexOf$3,aTypedArray$A(this),t>1?[e,arguments[1]]:[e])}));var ArrayBufferViewCore$B=arrayBufferViewCore$1,$map$2=arrayIteration.map,typedArraySpeciesConstructor$7=typedArraySpeciesConstructor$9,aTypedArray$z=ArrayBufferViewCore$B.aTypedArray,exportTypedArrayMethod$B=ArrayBufferViewCore$B.exportTypedArrayMethod;exportTypedArrayMethod$B("map",(function(e){return $map$2(aTypedArray$z(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(typedArraySpeciesConstructor$7(e))(t)}))}));var aCallable$c=aCallable$m,toObject$d=toObject$k,IndexedObject$4=indexedObject,lengthOfArrayLike$g=lengthOfArrayLike$q,$TypeError$8=TypeError,createMethod$8=function(e){return function(t,r,n,o){aCallable$c(r);var i=toObject$d(t),a=IndexedObject$4(i),s=lengthOfArrayLike$g(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$8("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$2={left:createMethod$8(!1),right:createMethod$8(!0)},ArrayBufferViewCore$A=arrayBufferViewCore$1,$reduce$3=arrayReduce$2.left,aTypedArray$y=ArrayBufferViewCore$A.aTypedArray,exportTypedArrayMethod$A=ArrayBufferViewCore$A.exportTypedArrayMethod;exportTypedArrayMethod$A("reduce",(function(e){var t=arguments.length;return $reduce$3(aTypedArray$y(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$z=arrayBufferViewCore$1,$reduceRight$1=arrayReduce$2.right,aTypedArray$x=ArrayBufferViewCore$z.aTypedArray,exportTypedArrayMethod$z=ArrayBufferViewCore$z.exportTypedArrayMethod;exportTypedArrayMethod$z("reduceRight",(function(e){var t=arguments.length;return $reduceRight$1(aTypedArray$x(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$y=arrayBufferViewCore$1,aTypedArray$w=ArrayBufferViewCore$y.aTypedArray,exportTypedArrayMethod$y=ArrayBufferViewCore$y.exportTypedArrayMethod,floor$8=Math.floor;exportTypedArrayMethod$y("reverse",(function(){for(var e,t=this,r=aTypedArray$w(t).length,n=floor$8(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}));var global$v=global$T,call$k=functionCall,ArrayBufferViewCore$x=arrayBufferViewCore$1,lengthOfArrayLike$f=lengthOfArrayLike$q,toOffset$3=toOffset$5,toIndexedObject$b=toObject$k,fails$S=fails$19,RangeError$4=global$v.RangeError,Int8Array$6=global$v.Int8Array,Int8ArrayPrototype$2=Int8Array$6&&Int8Array$6.prototype,$set$1=Int8ArrayPrototype$2&&Int8ArrayPrototype$2.set,aTypedArray$v=ArrayBufferViewCore$x.aTypedArray,exportTypedArrayMethod$x=ArrayBufferViewCore$x.exportTypedArrayMethod,WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS=!fails$S((function(){var e=new Uint8ClampedArray(2);return call$k($set$1,e,{length:1,0:3},1),3!==e[1]})),TO_OBJECT_BUG$1=WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS&&ArrayBufferViewCore$x.NATIVE_ARRAY_BUFFER_VIEWS&&fails$S((function(){var e=new Int8Array$6(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));exportTypedArrayMethod$x("set",(function(e){aTypedArray$v(this);var t=toOffset$3(arguments.length>1?arguments[1]:void 0,1),r=toIndexedObject$b(e);if(WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS)return call$k($set$1,this,r,t);var n=this.length,o=lengthOfArrayLike$f(r),i=0;if(o+t>n)throw RangeError$4("Wrong length");for(;i<o;)this[t+i]=r[i++]}),!WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS||TO_OBJECT_BUG$1);var ArrayBufferViewCore$w=arrayBufferViewCore$1,typedArraySpeciesConstructor$6=typedArraySpeciesConstructor$9,fails$R=fails$19,arraySlice$9=arraySlice$e,aTypedArray$u=ArrayBufferViewCore$w.aTypedArray,exportTypedArrayMethod$w=ArrayBufferViewCore$w.exportTypedArrayMethod,FORCED$l=fails$R((function(){new Int8Array(1).slice()}));exportTypedArrayMethod$w("slice",(function(e,t){for(var r=arraySlice$9(aTypedArray$u(this),e,t),n=typedArraySpeciesConstructor$6(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),FORCED$l);var ArrayBufferViewCore$v=arrayBufferViewCore$1,$some$2=arrayIteration.some,aTypedArray$t=ArrayBufferViewCore$v.aTypedArray,exportTypedArrayMethod$v=ArrayBufferViewCore$v.exportTypedArrayMethod;exportTypedArrayMethod$v("some",(function(e){return $some$2(aTypedArray$t(this),e,arguments.length>1?arguments[1]:void 0)}));var arraySlice$8=arraySliceSimple,floor$7=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$7(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$8(e,0,n),t),mergeSort(arraySlice$8(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=mergeSort,userAgent$4=engineUserAgent,firefox$1=userAgent$4.match(/firefox\/(\d+)/i),engineFfVersion$1=!!firefox$1&&+firefox$1[1],UA$1=engineUserAgent,engineIsIeOrEdge$1=/MSIE|Trident/.test(UA$1),userAgent$3=engineUserAgent,webkit$1=userAgent$3.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion$1=!!webkit$1&&+webkit$1[1],global$u=global$T,uncurryThis$E=functionUncurryThisClause,fails$Q=fails$19,aCallable$b=aCallable$m,internalSort$3=arraySort,ArrayBufferViewCore$u=arrayBufferViewCore$1,FF$4=engineFfVersion$1,IE_OR_EDGE$3=engineIsIeOrEdge$1,V8$3=engineV8Version,WEBKIT$3=engineWebkitVersion$1,aTypedArray$s=ArrayBufferViewCore$u.aTypedArray,exportTypedArrayMethod$u=ArrayBufferViewCore$u.exportTypedArrayMethod,Uint16Array$2=global$u.Uint16Array,nativeSort$3=Uint16Array$2&&uncurryThis$E(Uint16Array$2.prototype.sort),ACCEPT_INCORRECT_ARGUMENTS$1=!(!nativeSort$3||fails$Q((function(){nativeSort$3(new Uint16Array$2(2),null)}))&&fails$Q((function(){nativeSort$3(new Uint16Array$2(2),{})}))),STABLE_SORT$3=!!nativeSort$3&&!fails$Q((function(){if(V8$3)return V8$3<74;if(FF$4)return FF$4<67;if(IE_OR_EDGE$3)return!0;if(WEBKIT$3)return WEBKIT$3<602;var e,t,r=new Uint16Array$2(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(nativeSort$3(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0})),getSortCompare$3=function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}};exportTypedArrayMethod$u("sort",(function(e){return void 0!==e&&aCallable$b(e),STABLE_SORT$3?nativeSort$3(this,e):internalSort$3(aTypedArray$s(this),getSortCompare$3(e))}),!STABLE_SORT$3||ACCEPT_INCORRECT_ARGUMENTS$1);var ArrayBufferViewCore$t=arrayBufferViewCore$1,toLength$a=toLength$g,toAbsoluteIndex$5=toAbsoluteIndex$b,typedArraySpeciesConstructor$5=typedArraySpeciesConstructor$9,aTypedArray$r=ArrayBufferViewCore$t.aTypedArray,exportTypedArrayMethod$t=ArrayBufferViewCore$t.exportTypedArrayMethod;exportTypedArrayMethod$t("subarray",(function(e,t){var r=aTypedArray$r(this),n=r.length,o=toAbsoluteIndex$5(e,n);return new(typedArraySpeciesConstructor$5(r))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,toLength$a((void 0===t?n:toAbsoluteIndex$5(t,n))-o))}));var global$t=global$T,apply$7=functionApply,ArrayBufferViewCore$s=arrayBufferViewCore$1,fails$P=fails$19,arraySlice$7=arraySlice$e,Int8Array$5=global$t.Int8Array,aTypedArray$q=ArrayBufferViewCore$s.aTypedArray,exportTypedArrayMethod$s=ArrayBufferViewCore$s.exportTypedArrayMethod,$toLocaleString$1=[].toLocaleString,TO_LOCALE_STRING_BUG$1=!!Int8Array$5&&fails$P((function(){$toLocaleString$1.call(new Int8Array$5(1))})),FORCED$k=fails$P((function(){return[1,2].toLocaleString()!=new Int8Array$5([1,2]).toLocaleString()}))||!fails$P((function(){Int8Array$5.prototype.toLocaleString.call([1,2])}));exportTypedArrayMethod$s("toLocaleString",(function(){return apply$7($toLocaleString$1,TO_LOCALE_STRING_BUG$1?arraySlice$7(aTypedArray$q(this)):aTypedArray$q(this),arraySlice$7(arguments))}),FORCED$k);var exportTypedArrayMethod$r=arrayBufferViewCore$1.exportTypedArrayMethod,fails$O=fails$19,global$s=global$T,uncurryThis$D=functionUncurryThis,Uint8Array$3=global$s.Uint8Array,Uint8ArrayPrototype$1=Uint8Array$3&&Uint8Array$3.prototype||{},arrayToString$1=[].toString,join$1=uncurryThis$D([].join);fails$O((function(){arrayToString$1.call({})}))&&(arrayToString$1=function(){return join$1(this)});var IS_NOT_ARRAY_METHOD$1=Uint8ArrayPrototype$1.toString!=arrayToString$1;exportTypedArrayMethod$r("toString",arrayToString$1,IS_NOT_ARRAY_METHOD$1);var uncurryThis$C=functionUncurryThis,toIntegerOrInfinity$a=toIntegerOrInfinity$h,toString$k=toString$l,requireObjectCoercible$9=requireObjectCoercible$c,charAt$6=uncurryThis$C("".charAt),charCodeAt$1=uncurryThis$C("".charCodeAt),stringSlice$9=uncurryThis$C("".slice),createMethod$7=function(e){return function(t,r){var n,o,i=toString$k(requireObjectCoercible$9(t)),a=toIntegerOrInfinity$a(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$6(i,a):n:e?stringSlice$9(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$7(!1),charAt:createMethod$7(!0)},whitespaces$5="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$B=functionUncurryThis,requireObjectCoercible$8=requireObjectCoercible$c,toString$j=toString$l,whitespaces$4=whitespaces$5,replace$3=uncurryThis$B("".replace),ltrim=RegExp("^["+whitespaces$4+"]+"),rtrim=RegExp("(^|[^"+whitespaces$4+"])["+whitespaces$4+"]+$"),createMethod$6=function(e){return function(t){var r=toString$j(requireObjectCoercible$8(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"$1")),r}},stringTrim={start:createMethod$6(1),end:createMethod$6(2),trim:createMethod$6(3)},$forEach$2=arrayIteration.forEach,arrayMethodIsStrict$9=arrayMethodIsStrict$b,STRICT_METHOD$7=arrayMethodIsStrict$9("forEach"),arrayForEach=STRICT_METHOD$7?[].forEach:function(e){return $forEach$2(this,e,arguments.length>1?arguments[1]:void 0)},$$1d=_export,forEach$4=arrayForEach;$$1d({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});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},documentCreateElement=documentCreateElement$2,classList=documentCreateElement("span").classList,DOMTokenListPrototype$2=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$2===Object.prototype?void 0:DOMTokenListPrototype$2,global$r=global$T,DOMIterables$3=domIterables,DOMTokenListPrototype$1=domTokenListPrototype,forEach$3=arrayForEach,createNonEnumerableProperty$6=createNonEnumerableProperty$d,handlePrototype$1=function(e){if(e&&e.forEach!==forEach$3)try{createNonEnumerableProperty$6(e,"forEach",forEach$3)}catch(t){e.forEach=forEach$3}};for(var COLLECTION_NAME$1 in DOMIterables$3)DOMIterables$3[COLLECTION_NAME$1]&&handlePrototype$1(global$r[COLLECTION_NAME$1]&&global$r[COLLECTION_NAME$1].prototype);handlePrototype$1(DOMTokenListPrototype$1);var IntervalTimer=function(){function e(){_classCallCheck$5(this,e),this.timeID=null,this.func=null}return _createClass$5(e,[{key:"repeat",value:function(e,t){this.timeID=1,this.repeatInterval(e,t)}},{key:"repeatInterval",value:function(e,t){var r=this;this.timeID&&(null===this.func&&(this.func=e),this.func===e&&(this.timeID&&clearTimeout(this.timeID),this.timeID=null,this.timeID=_setTimeout((function(){e(),r.repeatInterval(e,t)}),t)))}},{key:"clear",value:function(){clearTimeout(this.timeID),this.timeID=null}}]),e}(),IntervalTimer$1=IntervalTimer,$$1c=_export,uncurryThis$A=functionUncurryThisClause,$indexOf$1=arrayIncludes.indexOf,arrayMethodIsStrict$8=arrayMethodIsStrict$b,nativeIndexOf=uncurryThis$A([].indexOf),NEGATIVE_ZERO$2=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$j=NEGATIVE_ZERO$2||!arrayMethodIsStrict$8("indexOf");$$1c({target:"Array",proto:!0,forced:FORCED$j},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$2?nativeIndexOf(this,e,t)||0:$indexOf$1(this,e,t)}});var isSupport$1=_isLocalStorageUsable$1();function probeSupport$1(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function checkIfLocalStorageThrows$1(){var e="_localstorage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function _isLocalStorageUsable$1(){return probeSupport$1&&!checkIfLocalStorageThrows$1()}var proxyLocalStorage={length:isSupport$1?localStorage.length:0,clear:function(e){try{for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===_indexOfInstanceProperty(r).call(r,e)&&localStorage.removeItem(r)}}catch(e){}},getItem:function(e){try{return localStorage.getItem(e)}catch(e){return null}},key:function(e){try{return localStorage.key(e)}catch(e){return null}},setItem:function(e,t){try{localStorage.setItem(e,t)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},isSupport:isSupport$1},proxyLocalStorage$1=proxyLocalStorage,CONTENT_TYPES={VIDEO:"video",AUDIO:"audio"},OP_NAME={APPEND:"appendBuffer",REMOVE:"removeBuffer"},MSE_EVENTS={MSE_ERROR:"mse_error",UPDATE_END:"updateend",MSE_OPEN:"mse_open",MSE_OPEN_DONE:"mse_open_done"},MSE=function(e){_inherits$4(r,EventEmitter$1);var t=_createSuper$4(r);function r(e,n){var o,i,a,s;return _classCallCheck$6(this,r),(s=t.call(this)).mediaSource=new window.MediaSource(e),s.url=_URL.createObjectURL(s.mediaSource),s.queue=[],s._hasDestroyed=!1,s._onSourceOpen=_bindInstanceProperty(o=s._onSourceOpen).call(o,_assertThisInitialized$4(s)),s._onSourceBufferError=_bindInstanceProperty(i=s._onSourceBufferError).call(i,_assertThisInitialized$4(s)),s._onSourceBufferUpdateEnd=_bindInstanceProperty(a=s._onSourceBufferUpdateEnd).call(a,_assertThisInitialized$4(s)),s._mseStart=nowTime$1(),s._appendStart=-1,s.mediaSource.addEventListener("sourceopen",s._onSourceOpen),s.opQueues={},s.sourceBuffers={},s.updateHanders={},s.errorHandlers={},s.logger=n||function(){},s._sourceOpenDonePromise=new ProxyPromise$1,s._mseAppendFlag=!1,s._mseOpenTime=-1,s.mseFullFlag={},s}return _createClass$6(r,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_defineProperty$3({},CONTENT_TYPES.VIDEO,{mimeType:"video/mp4",codec:'video/mp4; codecs="avc1.64001E, mp4a.40.5"'});return this.contentTypes=e,this._sourceOpenDonePromise}},{key:"_onSourceOpen",value:function(){var e=this;this._mseOpenTime=nowTime$1()-this._mseStart,console.log("[mseOpen]==> costtime",this._mseOpenTime),this.mediaSource.removeEventListener("sourceopen",this._onSourceOpen),this.emit(MSE_EVENTS.MSE_OPEN,{costtime:this._mseOpenTime});for(var t=_Object$keys(this.contentTypes),r=0;r<t.length;r++)try{!function(){var n=t[r],o=e.contentTypes[n].codec,i=e.mediaSource.addSourceBuffer(o),a=function(){return e._onSourceBufferError(n)};i.addEventListener("error",a);var s=function(){return e._onSourceBufferUpdateEnd(n)};i.addEventListener("updateend",s),e.updateHanders={},e.sourceBuffers[n]=i,e.opQueues[n]=[],e.updateHanders[n]=s,e.errorHandlers[n]=a}()}catch(e){e.errtype="open_error",this.emit(MSE_EVENTS.MSE_ERROR,e)}this.logger("[debug mse] mse init ready, readyState",this.mediaSource.readyState),this._mseAppendFlag=!0,this.emit(MSE_EVENTS.MSE_OPEN_DONE,{costtime:nowTime$1()-this._mseStart}),this._sourceOpenDonePromise.resolve()}},{key:"ready",get:function(){return this._mseAppendFlag}},{key:"_onSourceBufferError",value:function(e){if(!this._hasDestroyed){this.logger("[debug mse] sourceBuffer error, contentType",e,"readyState",this.mediaSource.readyState);var t=this.opQueues[e][0];this.emit(MSE_EVENTS.MSE_ERROR,{errtype:"append_error",name:t.name,context:t.context})}}},{key:"_onSourceBufferUpdateEnd",value:function(e){if(!this._hasDestroyed){var t=this.opQueues[e][0];t&&(this.emit(MSE_EVENTS.UPDATE_END,{name:t.name,context:t.context,costtime:nowTime$1()-this._appendStart}),this.pop(e))}}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration}},{key:"setDuration",value:function(e){var t=this;this.mediaSource.duration>e||this.enqueueBlockOp((function(){t.ended()?t.logger("[debug mse] setDuration ended"):(t.logger("[debug mse] setDuration"),t.mediaSource.duration=e)}),"setDuration")}},{key:"appendBuffer",value:function(e,t,r){var n=this;return this.enqueueOp(e,(function(){return n._append(e,t,r)}),OP_NAME.APPEND,r)}},{key:"_append",value:function(e,t,r){this._appendStart=nowTime$1(),this.logger("[real appendBuffer], context,",r),this.sourceBuffers[e].appendBuffer(t)}},{key:"enqueueOp",value:function(e,t,r,n){var o=this;if(!this._hasDestroyed){var i={handler:t,context:n,name:r};return this._mseAppendFlag?this._enQueue(e,i):this._sourceOpenDonePromise.then((function(){o._hasDestroyed||o._enQueue(e,i)})),i.p}}},{key:"_enQueue",value:function(e,t){var r;(this.opQueues[e]||(this.opQueues[e]=[]),this.mseFullFlag[e]&&t.name===OP_NAME.REMOVE)?(_spliceInstanceProperty(r=this.opQueues[e]).call(r,0,0,t),this.mseFullFlag[e]=!1,this.handleOp(e)):(this.opQueues[e].push(t),1===this.opQueues[e].length&&this.handleOp(e))}},{key:"enqueueBlockOp",value:function(e,t){var r=this;this._hasDestroyed||this._sourceOpenDonePromise.then((function(){if(!r._hasDestroyed){for(var n=[],o=_Object$keys(r.contentTypes),i=function(e){var i=o[e],a=new ProxyPromise$1,s={handler:function(){return a.resolve()},p:a,name:t};r.opQueues[i]||(r.opQueues[i]=[]),r.opQueues[i].push(s),n.push(a),1===r.opQueues[i].length&&s.handler()},a=0;a<o.length;a++)i(a);_Promise.all(n).then((function(){try{e()}catch(e){console.log(e)}finally{for(var t=0;t<o.length;t++){var n=o[t];r.pop(n)}}})).catch((function(e){console.log("waiting cath",e)}))}}))}},{key:"isFull",value:function(e){return e?this.mseFullFlag[e]:this.mseFullFlag[CONTENT_TYPES.VIDEO]}},{key:"handleOp",value:function(e){if(!this._hasDestroyed){var t=this.opQueues[e][0];if(t&&!this.mseFullFlag[e])try{t.handler()}catch(n){var r;n&&_indexOfInstanceProperty(r=n.message).call(r,"SourceBuffer is full")>=0?(this.mseFullFlag[e]=!0,this.logger("[MSE error], context,",t.context,",name,",t.name,",err,SourceBuffer is full")):this.pop(e),this.emit(MSE_EVENTS.MSE_ERROR,{errtype:"append_error",context:t.context,errMsg:n?n.message:null})}}}},{key:"pop",value:function(e){this._hasDestroyed||(this.opQueues[e].shift(),this.handleOp(e))}},{key:"clearOpqueues",value:function(e){var t,r,n=[];if(_mapInstanceProperty(t=this.opQueues[e]).call(t,(function(e){e.context.isinit&&n.push(e)})),this.opQueues&&this.opQueues[e]&&this.opQueues[e].length>1)if(this.opQueues[e][0].name===OP_NAME.APPEND||this.opQueues[e][0].name===OP_NAME.REMOVE){var o;this.logger("[debug mse] clearOpqueues, left:",1,", len,",this.opQueues[e].length),this.opQueues[e]=_sliceInstanceProperty(o=this.opQueues[e]).call(o,0,1)}else{var i,a=Math.min(this.opQueues[e].length,_Object$keys(this.contentTypes).length);this.logger("[debug mse] clearOpqueues, left:",a,", len,",this.opQueues[e].length),this.opQueues[e]=_sliceInstanceProperty(i=this.opQueues[e]).call(i,0,a)}n.length>0&&(r=this.opQueues[e]).push.apply(r,n)}},{key:"removeBuffer",value:function(e,t,r,n){var o=this;return this.enqueueOp(e,(function(){return o._remove(e,t,r,n)}),OP_NAME.REMOVE,n)}},{key:"_remove",value:function(e,t,r,n){r<=t?this._onSourceBufferUpdateEnd(e):(this.logger("[debug mse],real removeBuffer, context,",n),this._appendStart=nowTime$1(),this.sourceBuffers[e].remove(t,r))}},{key:"endOfStream",value:function(){var e=this;this._hasDestroyed||this.ended()||this.enqueueBlockOp((function(){e._hasDestroyed||e.ended()||(e.logger("[debug mse] endOfStream"),e.mediaSource.endOfStream())}),"endOfStream")}},{key:"ended",value:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"isMediaSourceOpen",value:function(){return!!this.mediaSource&&"open"===this.mediaSource.readyState}},{key:"abort",value:function(e){var t=this;return this.isMediaSourceOpen()?this.enqueueOp(e,(function(){t.sourceBuffers[e].abort(),t._onSourceBufferUpdateEnd(e)}),"abort"):_Promise.resolve()}},{key:"reuse",value:function(e,t){for(var r=_Object$keys(this.contentTypes),n=0;n<r.length;n++){var o=r[n];this.removeBuffer(o,e,t,{start:e,end:t})}}},{key:"_forceAbort",value:function(){try{for(var e=_Object$keys(this.contentTypes),t=0;t<e.length;t++){var r=e[t];this.sourceBuffers[r].abort()}}catch(e){console.log("forceAbort error")}}},{key:"destroy",value:function(){if(this.logger("[debug mse] destroy execute"),!this._hasDestroyed){this._forceAbort(),this._hasDestroyed=!0,_URL.revokeObjectURL(this.url),this.mediaSource&&(this.mediaSource.removeEventListener("sourceclose",this._onMediaSourceClose),this.mediaSource.removeEventListener("sourceopen",this._onSourceOpen));for(var e=_Object$keys(this.contentTypes),t=0;t<e.length;t++){var r=e[t],n=this.sourceBuffers[r];if(n){var o=this.errorHandlers[r];n.removeEventListener("error",o);var i=this.updateHanders[r];n.removeEventListener("updateend",i)}}this.opQueues={},this.sourceBuffers={}}}},{key:"buffered",value:function(e){return this.sourceBuffers[e]&&this.sourceBuffers[e].buffered}},{key:"sourceBuffer",value:function(e){return this.sourceBuffers[e]}},{key:"removeSourceBuffer",value:function(e){var t=this.sourceBuffer(e);if(t){this.mediaSource.removeSourceBuffer(t);var r=this.errorHandlers[e];t.removeEventListener("error",r);var n=this.updateHanders[e];t.removeEventListener("updateend",n),delete this.errorHandlers[e],delete this.sourceBuffers[e],delete this.updateHanders[e]}}},{key:"setTimeoffset",value:function(e,t){var r=this;return this.enqueueOp(e,(function(){t<0&&(t+=.001),r.sourceBuffers[e].timestampOffset=t,r._onSourceBufferUpdateEnd(e)}),"setTimeoffset")}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),r}(),nowTime$1=function(){try{return _parseInt$1(performance.now(),10)}catch(e){return(new Date).getTime()}},internalMetadata$2={exports:{}},fails$N=fails$20,arrayBufferNonExtensible$2=fails$N((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$M=fails$20,isObject$i=isObject$13,classof$c=classofRaw$8,ARRAY_BUFFER_NON_EXTENSIBLE$2=arrayBufferNonExtensible$2,$isExtensible$2=Object.isExtensible,FAILS_ON_PRIMITIVES$5=fails$M((function(){$isExtensible$2(1)})),objectIsExtensible$2=FAILS_ON_PRIMITIVES$5||ARRAY_BUFFER_NON_EXTENSIBLE$2?function(e){return!!isObject$i(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE$2||"ArrayBuffer"!=classof$c(e))&&(!$isExtensible$2||$isExtensible$2(e)))}:$isExtensible$2,fails$L=fails$20,freezing$2=!fails$L((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$1b=_export$2,uncurryThis$z=functionUncurryThis$2,hiddenKeys$3=hiddenKeys$j,isObject$h=isObject$13,hasOwn$f=hasOwnProperty_1$2,defineProperty$a=objectDefineProperty$2.f,getOwnPropertyNamesModule$3=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternalModule$2=objectGetOwnPropertyNamesExternal$2,isExtensible$2=objectIsExtensible$2,uid$4=uid$f,FREEZING$2=freezing$2,REQUIRED$2=!1,METADATA$2=uid$4("meta"),id$2=0,setMetadata$2=function(e){defineProperty$a(e,METADATA$2,{value:{objectID:"O"+id$2++,weakData:{}}})},fastKey$5=function(e,t){if(!isObject$h(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$f(e,METADATA$2)){if(!isExtensible$2(e))return"F";if(!t)return"E";setMetadata$2(e)}return e[METADATA$2].objectID},getWeakData$2=function(e,t){if(!hasOwn$f(e,METADATA$2)){if(!isExtensible$2(e))return!0;if(!t)return!1;setMetadata$2(e)}return e[METADATA$2].weakData},onFreeze$2=function(e){return FREEZING$2&&REQUIRED$2&&isExtensible$2(e)&&!hasOwn$f(e,METADATA$2)&&setMetadata$2(e),e},enable$2=function(){meta$2.enable=function(){},REQUIRED$2=!0;var e=getOwnPropertyNamesModule$3.f,t=uncurryThis$z([].splice),r={};r[METADATA$2]=1,e(r).length&&(getOwnPropertyNamesModule$3.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===METADATA$2){t(n,o,1);break}return n},$$1b({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule$2.f}))},meta$2=internalMetadata$2.exports={enable:enable$2,fastKey:fastKey$5,getWeakData:getWeakData$2,onFreeze:onFreeze$2};hiddenKeys$3[METADATA$2]=!0;var internalMetadataExports$2=internalMetadata$2.exports,$$1a=_export$2,global$q=global$1I,InternalMetadataModule$2=internalMetadataExports$2,fails$K=fails$20,createNonEnumerableProperty$5=createNonEnumerableProperty$s,iterate$j=iterate$v,anInstance$7=anInstance$j,isCallable$a=isCallable$1j,isObject$g=isObject$13,setToStringTag$4=setToStringTag$o,defineProperty$9=objectDefineProperty$2.f,forEach$2=arrayIteration$2.forEach,DESCRIPTORS$e=descriptors$2,InternalStateModule$8=internalState$2,setInternalState$7=InternalStateModule$8.set,internalStateGetterFor$3=InternalStateModule$8.getterFor,collection$5=function(e,t,r){var n,o=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=o?"set":"add",s=global$q[e],l=s&&s.prototype,c={};if(DESCRIPTORS$e&&isCallable$a(s)&&(i||l.forEach&&!fails$K((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$7(anInstance$7(t,u),{type:e,collection:new s}),null!=r&&iterate$j(r,t[a],{that:t,AS_ENTRIES:o})}))).prototype,$=internalStateGetterFor$3(e);forEach$2(["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$5(u,e,(function(r,n){var o=$(this).collection;if(!t&&i&&!isObject$g(r))return"get"==e&&void 0;var a=o[e](0===r?0:r,n);return t?this:a}))})),i||defineProperty$9(u,"size",{configurable:!0,get:function(){return $(this).collection.size}})}else n=r.getConstructor(t,e,o,a),InternalMetadataModule$2.enable();return setToStringTag$4(n,e,!1,!0),c[e]=n,$$1a({global:!0,forced:!0},c),i||r.setStrong(n,e,o),n},create$6=objectCreate$2,defineBuiltInAccessor$2=defineBuiltInAccessor$e,defineBuiltIns$3=defineBuiltIns$9,bind$d=functionBindContext$2,anInstance$6=anInstance$j,isNullOrUndefined$8=isNullOrUndefined$n,iterate$i=iterate$v,defineIterator$3=iteratorDefine$2,createIterResultObject$3=createIterResultObject$b,setSpecies$4=setSpecies$b,DESCRIPTORS$d=descriptors$2,fastKey$4=internalMetadataExports$2.fastKey,InternalStateModule$7=internalState$2,setInternalState$6=InternalStateModule$7.set,internalStateGetterFor$2=InternalStateModule$7.getterFor,collectionStrong$5={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance$6(e,i),setInternalState$6(e,{type:t,index:create$6(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$d||(e.size=0),isNullOrUndefined$8(o)||iterate$i(o,e[n],{that:e,AS_ENTRIES:r})})),i=o.prototype,a=internalStateGetterFor$2(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$4(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$d?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},l=function(e,t){var r,n=a(e),o=fastKey$4(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns$3(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$d?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$d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$d(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$3(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$d&&defineBuiltInAccessor$2(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor$2(t),i=internalStateGetterFor$2(n);defineIterator$3(e,t,(function(e,t){setInternalState$6(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$3("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject$3(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies$4(t)}},collection$4=collection$5,collectionStrong$4=collectionStrong$5;collection$4("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong$4);var path$9=path$C,map$6=path$9.Map,parent$C=map$6,map$5=parent$C,parent$B=map$5,map$4=parent$B,bind$c=functionBindContext$2,call$j=functionCall$2,aCallable$a=aCallable$I,aConstructor$2=aConstructor$a,isNullOrUndefined$7=isNullOrUndefined$n,iterate$h=iterate$v,push$f=[].push,collectionFrom=function(e){var t,r,n,o,i=arguments.length,a=i>1?arguments[1]:void 0;return aConstructor$2(this),(t=void 0!==a)&&aCallable$a(a),isNullOrUndefined$7(e)?new this:(r=[],t?(n=0,o=bind$c(a,i>2?arguments[2]:void 0),iterate$h(e,(function(e){call$j(push$f,r,o(e,n++))}))):iterate$h(e,push$f,{that:r}),new this(r))},$$19=_export$2,from$1=collectionFrom;$$19({target:"Map",stat:!0,forced:!0},{from:from$1});var arraySlice$6=arraySlice$u,collectionOf=function(){return new this(arraySlice$6(arguments))},$$18=_export$2,of2=collectionOf;$$18({target:"Map",stat:!0,forced:!0},{of:of2});var tryToString$2=tryToString$m,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$2(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$3=getBuiltIn$D,caller=caller$1,Map$5=getBuiltIn$3("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},$$17=_export$2,aMap$d=aMap$e,remove=mapHelpers.remove;$$17({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 $$16=_export$2,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$2=MapHelpers$4.get,has$1=MapHelpers$4.has,set$6=MapHelpers$4.set;$$16({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$2(o,e),"update"in t&&(r=t.update(r,e,o),set$6(o,e,r)),r):(n=t.insert(e,o),set$6(o,e,n),n)}});var call$i=functionCall$2,iterateSimple$1=function(e,t,r){for(var n,o,i=r||e.next;!(n=call$i(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)},$$15=_export$2,bind$b=functionBindContext$2,aMap$b=aMap$e,iterate$g=mapIterate;$$15({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$b(this),r=bind$b(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$g(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$14=_export$2,bind$a=functionBindContext$2,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$f=mapIterate,Map$4=MapHelpers$3.Map,set$5=MapHelpers$3.set;$$14({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$a(this),r=bind$a(e,arguments.length>1?arguments[1]:void 0),n=new Map$4;return iterate$f(t,(function(e,o){r(e,o,t)&&set$5(n,o,e)})),n}});var $$13=_export$2,bind$9=functionBindContext$2,aMap$9=aMap$e,iterate$e=mapIterate;$$13({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$9(this),r=bind$9(e,arguments.length>1?arguments[1]:void 0),n=iterate$e(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$12=_export$2,bind$8=functionBindContext$2,aMap$8=aMap$e,iterate$d=mapIterate;$$12({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$8(this),r=bind$8(e,arguments.length>1?arguments[1]:void 0),n=iterate$d(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$11=_export$2,call$h=functionCall$2,uncurryThis$y=functionUncurryThis$2,isCallable$9=isCallable$1j,aCallable$9=aCallable$I,iterate$c=iterate$v,Map$3=mapHelpers.Map,push$e=uncurryThis$y([].push);$$11({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$9(this)?this:Map$3);aCallable$9(t);var n=aCallable$9(r.has),o=aCallable$9(r.get),i=aCallable$9(r.set);return iterate$c(e,(function(e){var a=t(e);call$h(n,r,a)?push$e(call$h(o,r,a),e):call$h(i,r,a,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$10=_export$2,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$b=mapIterate;$$10({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$b(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$$=_export$2,call$g=functionCall$2,iterate$a=iterate$v,isCallable$8=isCallable$1j,aCallable$8=aCallable$I,Map$2=mapHelpers.Map;$$$({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$8(this)?this:Map$2);aCallable$8(t);var n=aCallable$8(r.set);return iterate$a(e,(function(e){call$g(n,r,t(e),e)})),r}});var $$_=_export$2,aMap$6=aMap$e,iterate$9=mapIterate;$$_({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$9(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$Z=_export$2,bind$7=functionBindContext$2,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$8=mapIterate,Map$1=MapHelpers$2.Map,set$4=MapHelpers$2.set;$$Z({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$7(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$8(t,(function(e,o){set$4(n,r(e,o,t),e)})),n}});var $$Y=_export$2,bind$6=functionBindContext$2,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$7=mapIterate,Map=MapHelpers$1.Map,set$3=MapHelpers$1.set;$$Y({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$6(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$7(t,(function(e,o){set$3(n,o,r(e,o,t))})),n}});var $$X=_export$2,aMap$3=aMap$e,iterate$6=iterate$v,set$2=mapHelpers.set;$$X({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$6(arguments[n++],(function(e,r){set$2(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$W=_export$2,aCallable$7=aCallable$I,aMap$2=aMap$e,iterate$5=mapIterate,$TypeError$7=TypeError;$$W({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$7(e),iterate$5(t,(function(o,i){r?(r=!1,n=o):n=e(n,o,i,t)})),r)throw $TypeError$7("Reduce of empty map with no initial value");return n}});var $$V=_export$2,bind$5=functionBindContext$2,aMap$1=aMap$e,iterate$4=mapIterate;$$V({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0);return!0===iterate$4(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$U=_export$2,aCallable$6=aCallable$I,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$6=TypeError,get$1=MapHelpers.get,has3=MapHelpers.has,set$1=MapHelpers.set;$$U({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$6(t);var o=has3(r,e);if(!o&&n<3)throw $TypeError$6("Updating absent value");var i=o?get$1(r,e):aCallable$6(n>2?arguments[2]:void 0)(e,r);return set$1(r,e,t(i,e,r)),r}});var call$f=functionCall$2,aCallable$5=aCallable$I,isCallable$7=isCallable$1j,anObject$c=anObject$S,$TypeError$5=TypeError,mapUpsert=function(e,t){var r,n=anObject$c(this),o=aCallable$5(n.get),i=aCallable$5(n.has),a=aCallable$5(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$7(t)&&!isCallable$7(s))throw $TypeError$5("At least one callback required");return call$f(i,n,e)?(r=call$f(o,n,e),isCallable$7(t)&&(r=t(r),call$f(a,n,e,r))):isCallable$7(s)&&(r=s(),call$f(a,n,e,r)),r},$$T=_export$2,upsert$1=mapUpsert;$$T({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$S=_export$2,upsert2=mapUpsert;$$S({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$A=map$4,map$3=parent$A,map$2=map$3,map$1=map$2,_Map=getDefaultExportFromCjs(map$1),arrayBufferBasicDetection="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,toIntegerOrInfinity$9=toIntegerOrInfinity$n,toLength$9=toLength$k,$RangeError$5=RangeError,toIndex$2=function(e){if(void 0===e)return 0;var t=toIntegerOrInfinity$9(e),r=toLength$9(t);if(t!==r)throw $RangeError$5("Wrong length or index");return r},$Array$1=Array,abs$2=Math.abs,pow$3=Math.pow,floor$6=Math.floor,log$4=Math.log,LN2=Math.LN2,pack=function(e,t,r){var n,o,i,a=$Array$1(r),s=8*r-t-1,l=(1<<s)-1,c=l>>1,u=23===t?pow$3(2,-24)-pow$3(2,-77):0,$=e<0||0===e&&1/e<0?1:0,d=0;for((e=abs$2(e))!=e||e===1/0?(o=e!=e?1:0,n=l):(n=floor$6(log$4(e)/LN2),e*(i=pow$3(2,-n))<1&&(n--,i*=2),(e+=n+c>=1?u/i:u*pow$3(2,1-c))*i>=2&&(n++,i/=2),n+c>=l?(o=0,n=l):n+c>=1?(o=(e*i-1)*pow$3(2,t),n+=c):(o=e*pow$3(2,c-1)*pow$3(2,t),n=0));t>=8;)a[d++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)a[d++]=255&n,n/=256,s-=8;return a[--d]|=128*$,a},unpack=function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;)u=256*u+e[l--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[l--],s-=8;if(0===u)u=1-a;else{if(u===i)return r?NaN:c?-1/0:1/0;r+=pow$3(2,t),u-=a}return(c?-1:1)*r*pow$3(2,u-t)},ieee754={pack:pack,unpack:unpack},toObject$c=toObject$u,toAbsoluteIndex$4=toAbsoluteIndex$g,lengthOfArrayLike$e=lengthOfArrayLike$A,arrayFill$1=function(e){for(var t=toObject$c(this),r=lengthOfArrayLike$e(t),n=arguments.length,o=toAbsoluteIndex$4(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:toAbsoluteIndex$4(i,r);a>o;)t[o++]=e;return t},global$p=global$1l,uncurryThis$x=functionUncurryThis$1,DESCRIPTORS$c=descriptors$1,NATIVE_ARRAY_BUFFER$1=arrayBufferBasicDetection,FunctionName=functionName$1,createNonEnumerableProperty$4=createNonEnumerableProperty$j,defineBuiltIns$2=defineBuiltIns$7,fails$J=fails$1C,anInstance$5=anInstance$h,toIntegerOrInfinity$8=toIntegerOrInfinity$n,toLength$8=toLength$k,toIndex$1=toIndex$2,IEEE754=ieee754,getPrototypeOf$1=objectGetPrototypeOf$1,setPrototypeOf$2=objectSetPrototypeOf$1,getOwnPropertyNames$2=objectGetOwnPropertyNames$1.f,defineProperty$8=objectDefineProperty$1.f,arrayFill=arrayFill$1,arraySlice$5=arraySliceSimple$1,setToStringTag$3=setToStringTag$h,InternalStateModule$6=internalState$1,PROPER_FUNCTION_NAME$3=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,getInternalState$5=InternalStateModule$6.get,setInternalState$5=InternalStateModule$6.set,ARRAY_BUFFER$1="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE$1="prototype",WRONG_LENGTH$1="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer$1=global$p[ARRAY_BUFFER$1],$ArrayBuffer=NativeArrayBuffer$1,ArrayBufferPrototype$1=$ArrayBuffer&&$ArrayBuffer[PROTOTYPE$1],$DataView=global$p[DATA_VIEW],DataViewPrototype$1=$DataView&&$DataView[PROTOTYPE$1],ObjectPrototype$3=Object.prototype,Array$1=global$p.Array,RangeError$3=global$p.RangeError,fill4=uncurryThis$x(arrayFill),reverse3=uncurryThis$x([].reverse),packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter$1=function(e,t){defineProperty$8(e[PROTOTYPE$1],t,{get:function(){return getInternalState$5(this)[t]}})},get3=function(e,t,r,n){var o=toIndex$1(r),i=getInternalState$5(e);if(o+t>i.byteLength)throw RangeError$3(WRONG_INDEX);var a=getInternalState$5(i.buffer).bytes,s=o+i.byteOffset,l=arraySlice$5(a,s,s+t);return n?l:reverse3(l)},set4=function(e,t,r,n,o,i){var a=toIndex$1(r),s=getInternalState$5(e);if(a+t>s.byteLength)throw RangeError$3(WRONG_INDEX);for(var l=getInternalState$5(s.buffer).bytes,c=a+s.byteOffset,u=n(+o),$=0;$<t;$++)l[c+$]=u[i?$:t-$-1]};if(NATIVE_ARRAY_BUFFER$1){var INCORRECT_ARRAY_BUFFER_NAME=PROPER_FUNCTION_NAME$3&&NativeArrayBuffer$1.name!==ARRAY_BUFFER$1;if(fails$J((function(){NativeArrayBuffer$1(1)}))&&fails$J((function(){new NativeArrayBuffer$1(-1)}))&&!fails$J((function(){return new NativeArrayBuffer$1,new NativeArrayBuffer$1(1.5),new NativeArrayBuffer$1(NaN),1!=NativeArrayBuffer$1.length||INCORRECT_ARRAY_BUFFER_NAME&&!CONFIGURABLE_FUNCTION_NAME})))INCORRECT_ARRAY_BUFFER_NAME&&CONFIGURABLE_FUNCTION_NAME&&createNonEnumerableProperty$4(NativeArrayBuffer$1,"name",ARRAY_BUFFER$1);else{($ArrayBuffer=function(e){return anInstance$5(this,ArrayBufferPrototype$1),new NativeArrayBuffer$1(toIndex$1(e))})[PROTOTYPE$1]=ArrayBufferPrototype$1;for(var key2,keys$1=getOwnPropertyNames$2(NativeArrayBuffer$1),j=0;keys$1.length>j;)(key2=keys$1[j++])in $ArrayBuffer||createNonEnumerableProperty$4($ArrayBuffer,key2,NativeArrayBuffer$1[key2]);ArrayBufferPrototype$1.constructor=$ArrayBuffer}setPrototypeOf$2&&getPrototypeOf$1(DataViewPrototype$1)!==ObjectPrototype$3&&setPrototypeOf$2(DataViewPrototype$1,ObjectPrototype$3);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=uncurryThis$x(DataViewPrototype$1.setInt8);testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||defineBuiltIns$2(DataViewPrototype$1,{setInt8:function(e,t){$setInt8(this,e,t<<24>>24)},setUint8:function(e,t){$setInt8(this,e,t<<24>>24)}},{unsafe:!0})}else ArrayBufferPrototype$1=($ArrayBuffer=function(e){anInstance$5(this,ArrayBufferPrototype$1);var t=toIndex$1(e);setInternalState$5(this,{bytes:fill4(Array$1(t),0),byteLength:t}),DESCRIPTORS$c||(this.byteLength=t)})[PROTOTYPE$1],DataViewPrototype$1=($DataView=function(e,t,r){anInstance$5(this,DataViewPrototype$1),anInstance$5(e,ArrayBufferPrototype$1);var n=getInternalState$5(e).byteLength,o=toIntegerOrInfinity$8(t);if(o<0||o>n)throw RangeError$3("Wrong offset");if(o+(r=void 0===r?n-o:toLength$8(r))>n)throw RangeError$3(WRONG_LENGTH$1);setInternalState$5(this,{buffer:e,byteLength:r,byteOffset:o}),DESCRIPTORS$c||(this.buffer=e,this.byteLength=r,this.byteOffset=o)})[PROTOTYPE$1],DESCRIPTORS$c&&(addGetter$1($ArrayBuffer,"byteLength"),addGetter$1($DataView,"buffer"),addGetter$1($DataView,"byteLength"),addGetter$1($DataView,"byteOffset")),defineBuiltIns$2(DataViewPrototype$1,{getInt8:function(e){return get3(this,1,e)[0]<<24>>24},getUint8:function(e){return get3(this,1,e)[0]},getInt16:function(e){var t=get3(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=get3(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return unpackInt32(get3(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return unpackInt32(get3(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return unpackIEEE754(get3(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return unpackIEEE754(get3(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){set4(this,1,e,packInt8,t)},setUint8:function(e,t){set4(this,1,e,packInt8,t)},setInt16:function(e,t){set4(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){set4(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){set4(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){set4(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){set4(this,4,e,packFloat32,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){set4(this,8,e,packFloat64,t,arguments.length>2?arguments[2]:void 0)}});setToStringTag$3($ArrayBuffer,ARRAY_BUFFER$1),setToStringTag$3($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},$$R=_export$1,uncurryThis$w=functionUncurryThisClause$1,fails$I=fails$1C,ArrayBufferModule$1=arrayBuffer,anObject$b=anObject$E,toAbsoluteIndex$3=toAbsoluteIndex$g,toLength$7=toLength$k,speciesConstructor$2=speciesConstructor$9,ArrayBuffer$4=ArrayBufferModule$1.ArrayBuffer,DataView$2=ArrayBufferModule$1.DataView,DataViewPrototype=DataView$2.prototype,nativeArrayBufferSlice=uncurryThis$w(ArrayBuffer$4.prototype.slice),getUint8=uncurryThis$w(DataViewPrototype.getUint8),setUint8=uncurryThis$w(DataViewPrototype.setUint8),INCORRECT_SLICE=fails$I((function(){return!new ArrayBuffer$4(2).slice(1,void 0).byteLength}));$$R({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE},{slice:function(e,t){if(nativeArrayBufferSlice&&void 0===t)return nativeArrayBufferSlice(anObject$b(this),e);for(var r=anObject$b(this).byteLength,n=toAbsoluteIndex$3(e,r),o=toAbsoluteIndex$3(void 0===t?r:t,r),i=new(speciesConstructor$2(this,ArrayBuffer$4))(toLength$7(o-n)),a=new DataView$2(this),s=new DataView$2(i),l=0;n<o;)setUint8(s,l++,getUint8(a,n++));return i}});var NAME,Constructor,Prototype,typedArrayConstructor={exports:{}},NATIVE_ARRAY_BUFFER=arrayBufferBasicDetection,DESCRIPTORS$b=descriptors$1,global$o=global$1l,isCallable$6=isCallable$Z,isObject$f=isObject$Q,hasOwn$e=hasOwnProperty_1$1,classof$b=classof$y,tryToString$1=tryToString$f,createNonEnumerableProperty$3=createNonEnumerableProperty$j,defineBuiltIn$7=defineBuiltIn$x,defineProperty$7=objectDefineProperty$1.f,isPrototypeOf$d=objectIsPrototypeOf$1,getPrototypeOf2=objectGetPrototypeOf$1,setPrototypeOf$1=objectSetPrototypeOf$1,wellKnownSymbol$b=wellKnownSymbol$R,uid$3=uid$b,InternalStateModule$5=internalState$1,enforceInternalState$1=InternalStateModule$5.enforce,getInternalState$4=InternalStateModule$5.get,Int8Array$4=global$o.Int8Array,Int8ArrayPrototype$1=Int8Array$4&&Int8Array$4.prototype,Uint8ClampedArray$1=global$o.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray$1&&Uint8ClampedArray$1.prototype,TypedArray$1=Int8Array$4&&getPrototypeOf2(Int8Array$4),TypedArrayPrototype$2=Int8ArrayPrototype$1&&getPrototypeOf2(Int8ArrayPrototype$1),ObjectPrototype$2=Object.prototype,TypeError$3=global$o.TypeError,TO_STRING_TAG$1=wellKnownSymbol$b("toStringTag"),TYPED_ARRAY_TAG$1=uid$3("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR="TypedArrayConstructor",NATIVE_ARRAY_BUFFER_VIEWS$2=NATIVE_ARRAY_BUFFER&&!!setPrototypeOf$1&&"Opera"!==classof$b(global$o.opera),TYPED_ARRAY_TAG_REQUIRED=!1,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView2=function(e){if(!isObject$f(e))return!1;var t=classof$b(e);return"DataView"===t||hasOwn$e(TypedArrayConstructorsList,t)||hasOwn$e(BigIntArrayConstructorsList,t)},getTypedArrayConstructor$1=function(e){var t=getPrototypeOf2(e);if(isObject$f(t)){var r=getInternalState$4(t);return r&&hasOwn$e(r,TYPED_ARRAY_CONSTRUCTOR)?r[TYPED_ARRAY_CONSTRUCTOR]:getTypedArrayConstructor$1(t)}},isTypedArray$1=function(e){if(!isObject$f(e))return!1;var t=classof$b(e);return hasOwn$e(TypedArrayConstructorsList,t)||hasOwn$e(BigIntArrayConstructorsList,t)},aTypedArray$p=function(e){if(isTypedArray$1(e))return e;throw TypeError$3("Target is not a typed array")},aTypedArrayConstructor$4=function(e){if(isCallable$6(e)&&(!setPrototypeOf$1||isPrototypeOf$d(TypedArray$1,e)))return e;throw TypeError$3(tryToString$1(e)+" is not a typed array constructor")},exportTypedArrayMethod$q=function(e,t,r,n){if(DESCRIPTORS$b){if(r)for(var o in TypedArrayConstructorsList){var i=global$o[o];if(i&&hasOwn$e(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}TypedArrayPrototype$2[e]&&!r||defineBuiltIn$7(TypedArrayPrototype$2,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$2&&Int8ArrayPrototype$1[e]||t,n)}},exportTypedArrayStaticMethod$1=function(e,t,r){var n,o;if(DESCRIPTORS$b){if(setPrototypeOf$1){if(r)for(n in TypedArrayConstructorsList)if((o=global$o[n])&&hasOwn$e(o,e))try{delete o[e]}catch(e){}if(TypedArray$1[e]&&!r)return;try{return defineBuiltIn$7(TypedArray$1,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$2&&TypedArray$1[e]||t)}catch(e){}}for(n in TypedArrayConstructorsList)!(o=global$o[n])||o[e]&&!r||defineBuiltIn$7(o,e,t)}};for(NAME in TypedArrayConstructorsList)(Prototype=(Constructor=global$o[NAME])&&Constructor.prototype)?enforceInternalState$1(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor:NATIVE_ARRAY_BUFFER_VIEWS$2=!1;for(NAME in BigIntArrayConstructorsList)(Prototype=(Constructor=global$o[NAME])&&Constructor.prototype)&&(enforceInternalState$1(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||!isCallable$6(TypedArray$1)||TypedArray$1===Function.prototype)&&(TypedArray$1=function(){throw TypeError$3("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$o[NAME]&&setPrototypeOf$1(global$o[NAME],TypedArray$1);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||!TypedArrayPrototype$2||TypedArrayPrototype$2===ObjectPrototype$2)&&(TypedArrayPrototype$2=TypedArray$1.prototype,NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$o[NAME]&&setPrototypeOf$1(global$o[NAME].prototype,TypedArrayPrototype$2);if(NATIVE_ARRAY_BUFFER_VIEWS$2&&getPrototypeOf2(Uint8ClampedArrayPrototype)!==TypedArrayPrototype$2&&setPrototypeOf$1(Uint8ClampedArrayPrototype,TypedArrayPrototype$2),DESCRIPTORS$b&&!hasOwn$e(TypedArrayPrototype$2,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQUIRED=!0,defineProperty$7(TypedArrayPrototype$2,TO_STRING_TAG$1,{get:function(){return isObject$f(this)?this[TYPED_ARRAY_TAG$1]:void 0}}),TypedArrayConstructorsList)global$o[NAME]&&createNonEnumerableProperty$3(global$o[NAME],TYPED_ARRAY_TAG$1,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$2,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQUIRED&&TYPED_ARRAY_TAG$1,aTypedArray:aTypedArray$p,aTypedArrayConstructor:aTypedArrayConstructor$4,exportTypedArrayMethod:exportTypedArrayMethod$q,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod$1,getTypedArrayConstructor:getTypedArrayConstructor$1,isView:isView2,isTypedArray:isTypedArray$1,TypedArray:TypedArray$1,TypedArrayPrototype:TypedArrayPrototype$2},global$n=global$1l,fails$H=fails$1C,checkCorrectnessOfIteration$3=checkCorrectnessOfIteration$8,NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$3=global$n.ArrayBuffer,Int8Array$3=global$n.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS$1||!fails$H((function(){Int8Array$3(1)}))||!fails$H((function(){new Int8Array$3(-1)}))||!checkCorrectnessOfIteration$3((function(e){new Int8Array$3,new Int8Array$3(null),new Int8Array$3(1.5),new Int8Array$3(e)}),!0)||fails$H((function(){return 1!==new Int8Array$3(new ArrayBuffer$3(2),1,void 0).length})),isObject$e=isObject$Q,floor$5=Math.floor,isIntegralNumber$1=Number.isInteger||function(e){return!isObject$e(e)&&isFinite(e)&&floor$5(e)===e},toIntegerOrInfinity$7=toIntegerOrInfinity$n,$RangeError$4=RangeError,toPositiveInteger$1=function(e){var t=toIntegerOrInfinity$7(e);if(t<0)throw $RangeError$4("The argument can't be less than 0");return t},toPositiveInteger=toPositiveInteger$1,$RangeError$3=RangeError,toOffset$2=function(e,t){var r=toPositiveInteger(e);if(r%t)throw $RangeError$3("Wrong offset");return r},classof$a=classof$y,uncurryThis$v=functionUncurryThis$1,slice$1=uncurryThis$v("".slice),isBigIntArray$1=function(e){return"Big"===slice$1(classof$a(e),0,3)},toPrimitive$1=toPrimitive$d,$TypeError$4=TypeError,toBigInt$2=function(e){var t=toPrimitive$1(e,"number");if("number"==typeof t)throw $TypeError$4("Can't convert number to bigint");return BigInt(t)},bind$4=functionBindContext$1,call$e=functionCall$1,aConstructor$1=aConstructor$7,toObject$b=toObject$u,lengthOfArrayLike$d=lengthOfArrayLike$A,getIterator$6=getIterator$e,getIteratorMethod=getIteratorMethod$a,isArrayIteratorMethod=isArrayIteratorMethod$6,isBigIntArray=isBigIntArray$1,aTypedArrayConstructor$3=arrayBufferViewCore.aTypedArrayConstructor,toBigInt$1=toBigInt$2,typedArrayFrom$1=function(e){var t,r,n,o,i,a,s,l,c=aConstructor$1(this),u=toObject$b(e),$=arguments.length,d=$>1?arguments[1]:void 0,p=void 0!==d,y=getIteratorMethod(u);if(y&&!isArrayIteratorMethod(y))for(l=(s=getIterator$6(u,y)).next,u=[];!(a=call$e(l,s)).done;)u.push(a.value);for(p&&$>2&&(d=bind$4(d,arguments[2])),r=lengthOfArrayLike$d(u),n=new(aTypedArrayConstructor$3(c))(r),o=isBigIntArray(n),t=0;r>t;t++)i=p?d(u[t],t):u[t],n[t]=o?toBigInt$1(i):+i;return n},$$Q=_export$1,global$m=global$1l,call$d=functionCall$1,DESCRIPTORS$a=descriptors$1,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$1=typedArrayConstructorsRequireWrappers,ArrayBufferViewCore$r=arrayBufferViewCore,ArrayBufferModule=arrayBuffer,anInstance$4=anInstance$h,createPropertyDescriptor$1=createPropertyDescriptor$e,createNonEnumerableProperty$2=createNonEnumerableProperty$j,isIntegralNumber=isIntegralNumber$1,toLength$6=toLength$k,toIndex=toIndex$2,toOffset$1=toOffset$2,toPropertyKey$1=toPropertyKey$a,hasOwn$d=hasOwnProperty_1$1,classof$9=classof$y,isObject$d=isObject$Q,isSymbol$2=isSymbol$b,create$5=objectCreate$1,isPrototypeOf$c=objectIsPrototypeOf$1,setPrototypeOf=objectSetPrototypeOf$1,getOwnPropertyNames$1=objectGetOwnPropertyNames$1.f,typedArrayFrom=typedArrayFrom$1,forEach$1=arrayIteration$1.forEach,setSpecies$3=setSpecies$9,definePropertyModule$1=objectDefineProperty$1,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor$1,InternalStateModule$4=internalState$1,inheritIfRequired$3=inheritIfRequired$7,getInternalState$3=InternalStateModule$4.get,setInternalState$4=InternalStateModule$4.set,enforceInternalState=InternalStateModule$4.enforce,nativeDefineProperty$1=definePropertyModule$1.f,nativeGetOwnPropertyDescriptor$2=getOwnPropertyDescriptorModule$1.f,round=Math.round,RangeError$2=global$m.RangeError,ArrayBuffer$2=ArrayBufferModule.ArrayBuffer,ArrayBufferPrototype=ArrayBuffer$2.prototype,DataView$1=ArrayBufferModule.DataView,NATIVE_ARRAY_BUFFER_VIEWS=ArrayBufferViewCore$r.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG=ArrayBufferViewCore$r.TYPED_ARRAY_TAG,TypedArray=ArrayBufferViewCore$r.TypedArray,TypedArrayPrototype$1=ArrayBufferViewCore$r.TypedArrayPrototype,aTypedArrayConstructor$2=ArrayBufferViewCore$r.aTypedArrayConstructor,isTypedArray=ArrayBufferViewCore$r.isTypedArray,BYTES_PER_ELEMENT="BYTES_PER_ELEMENT",WRONG_LENGTH="Wrong length",fromList=function(e,t){aTypedArrayConstructor$2(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},addGetter=function(e,t){nativeDefineProperty$1(e,t,{get:function(){return getInternalState$3(this)[t]}})},isArrayBuffer=function(e){var t;return isPrototypeOf$c(ArrayBufferPrototype,e)||"ArrayBuffer"==(t=classof$9(e))||"SharedArrayBuffer"==t},isTypedArrayIndex=function(e,t){return isTypedArray(e)&&!isSymbol$2(t)&&t in e&&isIntegralNumber(+t)&&t>=0},wrappedGetOwnPropertyDescriptor=function(e,t){return t=toPropertyKey$1(t),isTypedArrayIndex(e,t)?createPropertyDescriptor$1(2,e[t]):nativeGetOwnPropertyDescriptor$2(e,t)},wrappedDefineProperty=function(e,t,r){return t=toPropertyKey$1(t),!(isTypedArrayIndex(e,t)&&isObject$d(r)&&hasOwn$d(r,"value"))||hasOwn$d(r,"get")||hasOwn$d(r,"set")||r.configurable||hasOwn$d(r,"writable")&&!r.writable||hasOwn$d(r,"enumerable")&&!r.enumerable?nativeDefineProperty$1(e,t,r):(e[t]=r.value,e)};DESCRIPTORS$a?(NATIVE_ARRAY_BUFFER_VIEWS||(getOwnPropertyDescriptorModule$1.f=wrappedGetOwnPropertyDescriptor,definePropertyModule$1.f=wrappedDefineProperty,addGetter(TypedArrayPrototype$1,"buffer"),addGetter(TypedArrayPrototype$1,"byteOffset"),addGetter(TypedArrayPrototype$1,"byteLength"),addGetter(TypedArrayPrototype$1,"length")),$$Q({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor,defineProperty:wrappedDefineProperty}),typedArrayConstructor.exports=function(e,t,r){var n=e.match(/\d+$/)[0]/8,o=e+(r?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=global$m[o],l=s,c=l&&l.prototype,u={},$=function(e,t){nativeDefineProperty$1(e,t,{get:function(){return function(e,t){var r=getInternalState$3(e);return r.view[i](t*n+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=getInternalState$3(e);r&&(o=(o=round(o))<0?0:o>255?255:255&o),i.view[a](t*n+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$1&&(l=t((function(e,t,r,o){return anInstance$4(e,c),inheritIfRequired$3(isObject$d(t)?isArrayBuffer(t)?void 0!==o?new s(t,toOffset$1(r,n),o):void 0!==r?new s(t,toOffset$1(r,n)):new s(t):isTypedArray(t)?fromList(l,t):call$d(typedArrayFrom,l,t):new s(toIndex(t)),e,l)})),setPrototypeOf&&setPrototypeOf(l,TypedArray),forEach$1(getOwnPropertyNames$1(s),(function(e){e in l||createNonEnumerableProperty$2(l,e,s[e])})),l.prototype=c):(l=t((function(e,t,r,o){anInstance$4(e,c);var i,a,s,u=0,d=0;if(isObject$d(t)){if(!isArrayBuffer(t))return isTypedArray(t)?fromList(l,t):call$d(typedArrayFrom,l,t);i=t,d=toOffset$1(r,n);var p=t.byteLength;if(void 0===o){if(p%n)throw RangeError$2(WRONG_LENGTH);if((a=p-d)<0)throw RangeError$2(WRONG_LENGTH)}else if((a=toLength$6(o)*n)+d>p)throw RangeError$2(WRONG_LENGTH);s=a/n}else s=toIndex(t),i=new ArrayBuffer$2(a=s*n);for(setInternalState$4(e,{buffer:i,byteOffset:d,byteLength:a,length:s,view:new DataView$1(i)});u<s;)$(e,u++)})),setPrototypeOf&&setPrototypeOf(l,TypedArray),c=l.prototype=create$5(TypedArrayPrototype$1)),c.constructor!==l&&createNonEnumerableProperty$2(c,"constructor",l),enforceInternalState(c).TypedArrayConstructor=l,TYPED_ARRAY_TAG&&createNonEnumerableProperty$2(c,TYPED_ARRAY_TAG,o);var d=l!=s;u[o]=l,$$Q({global:!0,constructor:!0,forced:d,sham:!NATIVE_ARRAY_BUFFER_VIEWS},u),BYTES_PER_ELEMENT in l||createNonEnumerableProperty$2(l,BYTES_PER_ELEMENT,n),BYTES_PER_ELEMENT in c||createNonEnumerableProperty$2(c,BYTES_PER_ELEMENT,n),setSpecies$3(o)}):typedArrayConstructor.exports=function(){};var typedArrayConstructorExports=typedArrayConstructor.exports,createTypedArrayConstructor$8=typedArrayConstructorExports;createTypedArrayConstructor$8("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var ArrayBufferViewCore$q=arrayBufferViewCore,lengthOfArrayLike$c=lengthOfArrayLike$A,toIntegerOrInfinity$6=toIntegerOrInfinity$n,aTypedArray$o=ArrayBufferViewCore$q.aTypedArray,exportTypedArrayMethod$p=ArrayBufferViewCore$q.exportTypedArrayMethod;exportTypedArrayMethod$p("at",(function(e){var t=aTypedArray$o(this),r=lengthOfArrayLike$c(t),n=toIntegerOrInfinity$6(e),o=n>=0?n:r+n;return o<0||o>=r?void 0:t[o]}));var toObject$a=toObject$u,toAbsoluteIndex$2=toAbsoluteIndex$g,lengthOfArrayLike$b=lengthOfArrayLike$A,deletePropertyOrThrow$2=deletePropertyOrThrow$7,min$5=Math.min,arrayCopyWithin=[].copyWithin||function(e,t){var r=toObject$a(this),n=lengthOfArrayLike$b(r),o=toAbsoluteIndex$2(e,n),i=toAbsoluteIndex$2(t,n),a=arguments.length>2?arguments[2]:void 0,s=min$5((void 0===a?n:toAbsoluteIndex$2(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$2(r,o),o+=l,i+=l;return r},uncurryThis$u=functionUncurryThis$1,ArrayBufferViewCore$p=arrayBufferViewCore,$ArrayCopyWithin=arrayCopyWithin,u$ArrayCopyWithin=uncurryThis$u($ArrayCopyWithin),aTypedArray$n=ArrayBufferViewCore$p.aTypedArray,exportTypedArrayMethod$o=ArrayBufferViewCore$p.exportTypedArrayMethod;exportTypedArrayMethod$o("copyWithin",(function(e,t){return u$ArrayCopyWithin(aTypedArray$n(this),e,t,arguments.length>2?arguments[2]:void 0)}));var ArrayBufferViewCore$o=arrayBufferViewCore,$every=arrayIteration$1.every,aTypedArray$m=ArrayBufferViewCore$o.aTypedArray,exportTypedArrayMethod$n=ArrayBufferViewCore$o.exportTypedArrayMethod;exportTypedArrayMethod$n("every",(function(e){return $every(aTypedArray$m(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$n=arrayBufferViewCore,$fill=arrayFill$1,toBigInt=toBigInt$2,classof$8=classof$y,call$c=functionCall$1,uncurryThis$t=functionUncurryThis$1,fails$G=fails$1C,aTypedArray$l=ArrayBufferViewCore$n.aTypedArray,exportTypedArrayMethod$m=ArrayBufferViewCore$n.exportTypedArrayMethod,slice6=uncurryThis$t("".slice),CONVERSION_BUG=fails$G((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}));exportTypedArrayMethod$m("fill",(function(e){var t=arguments.length;aTypedArray$l(this);var r="Big"===slice6(classof$8(this),0,3)?toBigInt(e):+e;return call$c($fill,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),CONVERSION_BUG);var lengthOfArrayLike$a=lengthOfArrayLike$A,arrayFromConstructorAndList$1=function(e,t){for(var r=0,n=lengthOfArrayLike$a(t),o=new e(n);n>r;)o[r]=t[r++];return o},ArrayBufferViewCore$m=arrayBufferViewCore,speciesConstructor$1=speciesConstructor$9,aTypedArrayConstructor$1=ArrayBufferViewCore$m.aTypedArrayConstructor,getTypedArrayConstructor=ArrayBufferViewCore$m.getTypedArrayConstructor,typedArraySpeciesConstructor$4=function(e){return aTypedArrayConstructor$1(speciesConstructor$1(e,getTypedArrayConstructor(e)))},arrayFromConstructorAndList=arrayFromConstructorAndList$1,typedArraySpeciesConstructor$3=typedArraySpeciesConstructor$4,typedArrayFromSpeciesAndList=function(e,t){return arrayFromConstructorAndList(typedArraySpeciesConstructor$3(e),t)},ArrayBufferViewCore$l=arrayBufferViewCore,$filter=arrayIteration$1.filter,fromSpeciesAndList=typedArrayFromSpeciesAndList,aTypedArray$k=ArrayBufferViewCore$l.aTypedArray,exportTypedArrayMethod$l=ArrayBufferViewCore$l.exportTypedArrayMethod;exportTypedArrayMethod$l("filter",(function(e){var t=$filter(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0);return fromSpeciesAndList(this,t)}));var ArrayBufferViewCore$k=arrayBufferViewCore,$find$1=arrayIteration$1.find,aTypedArray$j=ArrayBufferViewCore$k.aTypedArray,exportTypedArrayMethod$k=ArrayBufferViewCore$k.exportTypedArrayMethod;exportTypedArrayMethod$k("find",(function(e){return $find$1(aTypedArray$j(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$j=arrayBufferViewCore,$findIndex=arrayIteration$1.findIndex,aTypedArray$i=ArrayBufferViewCore$j.aTypedArray,exportTypedArrayMethod$j=ArrayBufferViewCore$j.exportTypedArrayMethod;exportTypedArrayMethod$j("findIndex",(function(e){return $findIndex(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0)}));var bind$3=functionBindContext$1,IndexedObject$3=indexedObject$1,toObject$9=toObject$u,lengthOfArrayLike$9=lengthOfArrayLike$A,createMethod$5=function(e){var t=1==e;return function(r,n,o){for(var i,a=toObject$9(r),s=IndexedObject$3(a),l=bind$3(n,o),c=lengthOfArrayLike$9(s);c-- >0;)if(l(i=s[c],c,a))switch(e){case 0:return i;case 1:return c}return t?-1:void 0}},arrayIterationFromLast={findLast:createMethod$5(0),findLastIndex:createMethod$5(1)},ArrayBufferViewCore$i=arrayBufferViewCore,$findLast=arrayIterationFromLast.findLast,aTypedArray$h=ArrayBufferViewCore$i.aTypedArray,exportTypedArrayMethod$i=ArrayBufferViewCore$i.exportTypedArrayMethod;exportTypedArrayMethod$i("findLast",(function(e){return $findLast(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$h=arrayBufferViewCore,$findLastIndex=arrayIterationFromLast.findLastIndex,aTypedArray$g=ArrayBufferViewCore$h.aTypedArray,exportTypedArrayMethod$h=ArrayBufferViewCore$h.exportTypedArrayMethod;exportTypedArrayMethod$h("findLastIndex",(function(e){return $findLastIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$g=arrayBufferViewCore,$forEach$1=arrayIteration$1.forEach,aTypedArray$f=ArrayBufferViewCore$g.aTypedArray,exportTypedArrayMethod$g=ArrayBufferViewCore$g.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$f=arrayBufferViewCore,$includes$1=arrayIncludes$1.includes,aTypedArray$e=ArrayBufferViewCore$f.aTypedArray,exportTypedArrayMethod$f=ArrayBufferViewCore$f.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function(e){return $includes$1(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$e=arrayBufferViewCore,$indexOf=arrayIncludes$1.indexOf,aTypedArray$d=ArrayBufferViewCore$e.aTypedArray,exportTypedArrayMethod$e=ArrayBufferViewCore$e.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var global$l=global$1l,fails$F=fails$1C,uncurryThis$s=functionUncurryThis$1,ArrayBufferViewCore$d=arrayBufferViewCore,ArrayIterators=es_array_iterator$1,wellKnownSymbol$a=wellKnownSymbol$R,ITERATOR$4=wellKnownSymbol$a("iterator"),Uint8Array$2=global$l.Uint8Array,arrayValues=uncurryThis$s(ArrayIterators.values),arrayKeys=uncurryThis$s(ArrayIterators.keys),arrayEntries=uncurryThis$s(ArrayIterators.entries),aTypedArray$c=ArrayBufferViewCore$d.aTypedArray,exportTypedArrayMethod$d=ArrayBufferViewCore$d.exportTypedArrayMethod,TypedArrayPrototype=Uint8Array$2&&Uint8Array$2.prototype,GENERIC=!fails$F((function(){TypedArrayPrototype[ITERATOR$4].call([1])})),ITERATOR_IS_VALUES=!!TypedArrayPrototype&&TypedArrayPrototype.values&&TypedArrayPrototype[ITERATOR$4]===TypedArrayPrototype.values&&"values"===TypedArrayPrototype.values.name,typedArrayValues=function(){return arrayValues(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function(){return arrayEntries(aTypedArray$c(this))}),GENERIC),exportTypedArrayMethod$d("keys",(function(){return arrayKeys(aTypedArray$c(this))}),GENERIC),exportTypedArrayMethod$d("values",typedArrayValues,GENERIC||!ITERATOR_IS_VALUES,{name:"values"}),exportTypedArrayMethod$d(ITERATOR$4,typedArrayValues,GENERIC||!ITERATOR_IS_VALUES,{name:"values"});var ArrayBufferViewCore$c=arrayBufferViewCore,uncurryThis$r=functionUncurryThis$1,aTypedArray$b=ArrayBufferViewCore$c.aTypedArray,exportTypedArrayMethod$c=ArrayBufferViewCore$c.exportTypedArrayMethod,$join=uncurryThis$r([].join);exportTypedArrayMethod$c("join",(function(e){return $join(aTypedArray$b(this),e)}));var apply$6=functionApply$1,toIndexedObject$a=toIndexedObject$p,toIntegerOrInfinity$5=toIntegerOrInfinity$n,lengthOfArrayLike$8=lengthOfArrayLike$A,arrayMethodIsStrict$7=arrayMethodIsStrict$h,min$4=Math.min,$lastIndexOf$2=[].lastIndexOf,NEGATIVE_ZERO$1=!!$lastIndexOf$2&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$6=arrayMethodIsStrict$7("lastIndexOf"),FORCED$i=NEGATIVE_ZERO$1||!STRICT_METHOD$6,arrayLastIndexOf$1=FORCED$i?function(e){if(NEGATIVE_ZERO$1)return apply$6($lastIndexOf$2,this,arguments)||0;var t=toIndexedObject$a(this),r=lengthOfArrayLike$8(t),n=r-1;for(arguments.length>1&&(n=min$4(n,toIntegerOrInfinity$5(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf$2,ArrayBufferViewCore$b=arrayBufferViewCore,apply$5=functionApply$1,$lastIndexOf$1=arrayLastIndexOf$1,aTypedArray$a=ArrayBufferViewCore$b.aTypedArray,exportTypedArrayMethod$b=ArrayBufferViewCore$b.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function(e){var t=arguments.length;return apply$5($lastIndexOf$1,aTypedArray$a(this),t>1?[e,arguments[1]]:[e])}));var ArrayBufferViewCore$a=arrayBufferViewCore,$map$1=arrayIteration$1.map,typedArraySpeciesConstructor$2=typedArraySpeciesConstructor$4,aTypedArray$9=ArrayBufferViewCore$a.aTypedArray,exportTypedArrayMethod$a=ArrayBufferViewCore$a.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function(e){return $map$1(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(typedArraySpeciesConstructor$2(e))(t)}))}));var aCallable$4=aCallable$w,toObject$8=toObject$u,IndexedObject$2=indexedObject$1,lengthOfArrayLike$7=lengthOfArrayLike$A,$TypeError$3=TypeError,createMethod$4=function(e){return function(t,r,n,o){aCallable$4(r);var i=toObject$8(t),a=IndexedObject$2(i),s=lengthOfArrayLike$7(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$3("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$1={left:createMethod$4(!1),right:createMethod$4(!0)},ArrayBufferViewCore$9=arrayBufferViewCore,$reduce$2=arrayReduce$1.left,aTypedArray$8=ArrayBufferViewCore$9.aTypedArray,exportTypedArrayMethod$9=ArrayBufferViewCore$9.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function(e){var t=arguments.length;return $reduce$2(aTypedArray$8(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$8=arrayBufferViewCore,$reduceRight=arrayReduce$1.right,aTypedArray$7=ArrayBufferViewCore$8.aTypedArray,exportTypedArrayMethod$8=ArrayBufferViewCore$8.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function(e){var t=arguments.length;return $reduceRight(aTypedArray$7(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$7=arrayBufferViewCore,aTypedArray$6=ArrayBufferViewCore$7.aTypedArray,exportTypedArrayMethod$7=ArrayBufferViewCore$7.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function(){for(var e,t=this,r=aTypedArray$6(t).length,n=floor$4(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}));var global$k=global$1l,call$b=functionCall$1,ArrayBufferViewCore$6=arrayBufferViewCore,lengthOfArrayLike$6=lengthOfArrayLike$A,toOffset=toOffset$2,toIndexedObject$9=toObject$u,fails$E=fails$1C,RangeError$1=global$k.RangeError,Int8Array$2=global$k.Int8Array,Int8ArrayPrototype=Int8Array$2&&Int8Array$2.prototype,$set=Int8ArrayPrototype&&Int8ArrayPrototype.set,aTypedArray$5=ArrayBufferViewCore$6.aTypedArray,exportTypedArrayMethod$6=ArrayBufferViewCore$6.exportTypedArrayMethod,WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS=!fails$E((function(){var e=new Uint8ClampedArray(2);return call$b($set,e,{length:1,0:3},1),3!==e[1]})),TO_OBJECT_BUG=WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS&&ArrayBufferViewCore$6.NATIVE_ARRAY_BUFFER_VIEWS&&fails$E((function(){var e=new Int8Array$2(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));exportTypedArrayMethod$6("set",(function(e){aTypedArray$5(this);var t=toOffset(arguments.length>1?arguments[1]:void 0,1),r=toIndexedObject$9(e);if(WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS)return call$b($set,this,r,t);var n=this.length,o=lengthOfArrayLike$6(r),i=0;if(o+t>n)throw RangeError$1("Wrong length");for(;i<o;)this[t+i]=r[i++]}),!WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS||TO_OBJECT_BUG);var ArrayBufferViewCore$5=arrayBufferViewCore,typedArraySpeciesConstructor$1=typedArraySpeciesConstructor$4,fails$D=fails$1C,arraySlice$4=arraySlice$o,aTypedArray$4=ArrayBufferViewCore$5.aTypedArray,exportTypedArrayMethod$5=ArrayBufferViewCore$5.exportTypedArrayMethod,FORCED$h=fails$D((function(){new Int8Array(1).slice()}));exportTypedArrayMethod$5("slice",(function(e,t){for(var r=arraySlice$4(aTypedArray$4(this),e,t),n=typedArraySpeciesConstructor$1(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),FORCED$h);var ArrayBufferViewCore$4=arrayBufferViewCore,$some$1=arrayIteration$1.some,aTypedArray$3=ArrayBufferViewCore$4.aTypedArray,exportTypedArrayMethod$4=ArrayBufferViewCore$4.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function(e){return $some$1(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var userAgent$2=engineUserAgent$1,firefox=userAgent$2.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent$1,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$1=engineUserAgent$1,webkit=userAgent$1.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],global$j=global$1l,uncurryThis$q=functionUncurryThisClause$1,fails$C=fails$1C,aCallable$3=aCallable$w,internalSort$2=arraySort$2,ArrayBufferViewCore$3=arrayBufferViewCore,FF$3=engineFfVersion,IE_OR_EDGE$2=engineIsIeOrEdge,V8$2=engineV8Version$1,WEBKIT$2=engineWebkitVersion,aTypedArray$2=ArrayBufferViewCore$3.aTypedArray,exportTypedArrayMethod$3=ArrayBufferViewCore$3.exportTypedArrayMethod,Uint16Array$1=global$j.Uint16Array,nativeSort$2=Uint16Array$1&&uncurryThis$q(Uint16Array$1.prototype.sort),ACCEPT_INCORRECT_ARGUMENTS=!(!nativeSort$2||fails$C((function(){nativeSort$2(new Uint16Array$1(2),null)}))&&fails$C((function(){nativeSort$2(new Uint16Array$1(2),{})}))),STABLE_SORT$2=!!nativeSort$2&&!fails$C((function(){if(V8$2)return V8$2<74;if(FF$3)return FF$3<67;if(IE_OR_EDGE$2)return!0;if(WEBKIT$2)return WEBKIT$2<602;var e,t,r=new Uint16Array$1(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(nativeSort$2(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0})),getSortCompare$2=function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}};exportTypedArrayMethod$3("sort",(function(e){return void 0!==e&&aCallable$3(e),STABLE_SORT$2?nativeSort$2(this,e):internalSort$2(aTypedArray$2(this),getSortCompare$2(e))}),!STABLE_SORT$2||ACCEPT_INCORRECT_ARGUMENTS);var ArrayBufferViewCore$2=arrayBufferViewCore,toLength$5=toLength$k,toAbsoluteIndex$1=toAbsoluteIndex$g,typedArraySpeciesConstructor=typedArraySpeciesConstructor$4,aTypedArray$1=ArrayBufferViewCore$2.aTypedArray,exportTypedArrayMethod$2=ArrayBufferViewCore$2.exportTypedArrayMethod;exportTypedArrayMethod$2("subarray",(function(e,t){var r=aTypedArray$1(this),n=r.length,o=toAbsoluteIndex$1(e,n);return new(typedArraySpeciesConstructor(r))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,toLength$5((void 0===t?n:toAbsoluteIndex$1(t,n))-o))}));var global$i=global$1l,apply$4=functionApply$1,ArrayBufferViewCore$1=arrayBufferViewCore,fails$B=fails$1C,arraySlice$3=arraySlice$o,Int8Array$1=global$i.Int8Array,aTypedArray=ArrayBufferViewCore$1.aTypedArray,exportTypedArrayMethod$1=ArrayBufferViewCore$1.exportTypedArrayMethod,$toLocaleString=[].toLocaleString,TO_LOCALE_STRING_BUG=!!Int8Array$1&&fails$B((function(){$toLocaleString.call(new Int8Array$1(1))})),FORCED$g=fails$B((function(){return[1,2].toLocaleString()!=new Int8Array$1([1,2]).toLocaleString()}))||!fails$B((function(){Int8Array$1.prototype.toLocaleString.call([1,2])}));exportTypedArrayMethod$1("toLocaleString",(function(){return apply$4($toLocaleString,TO_LOCALE_STRING_BUG?arraySlice$3(aTypedArray(this)):aTypedArray(this),arraySlice$3(arguments))}),FORCED$g);var exportTypedArrayMethod=arrayBufferViewCore.exportTypedArrayMethod,fails$A=fails$1C,global$h=global$1l,uncurryThis$p=functionUncurryThis$1,Uint8Array$1=global$h.Uint8Array,Uint8ArrayPrototype=Uint8Array$1&&Uint8Array$1.prototype||{},arrayToString=[].toString,join3=uncurryThis$p([].join);fails$A((function(){arrayToString.call({})}))&&(arrayToString=function(){return join3(this)});var IS_NOT_ARRAY_METHOD=Uint8ArrayPrototype.toString!=arrayToString;exportTypedArrayMethod("toString",arrayToString,IS_NOT_ARRAY_METHOD);var internalMetadata$1={exports:{}},objectGetOwnPropertyNamesExternal$1={},classof$7=classofRaw$5,toIndexedObject$8=toIndexedObject$p,$getOwnPropertyNames$2=objectGetOwnPropertyNames$1.f,arraySlice$2=arraySliceSimple$1,windowNames$1="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames$1=function(e){try{return $getOwnPropertyNames$2(e)}catch(e){return arraySlice$2(windowNames$1)}};objectGetOwnPropertyNamesExternal$1.f=function(e){return windowNames$1&&"Window"==classof$7(e)?getWindowNames$1(e):$getOwnPropertyNames$2(toIndexedObject$8(e))};var fails$z=fails$1C,arrayBufferNonExtensible$1=fails$z((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$y=fails$1C,isObject$c=isObject$Q,classof$6=classofRaw$5,ARRAY_BUFFER_NON_EXTENSIBLE$1=arrayBufferNonExtensible$1,$isExtensible$1=Object.isExtensible,FAILS_ON_PRIMITIVES$4=fails$y((function(){$isExtensible$1(1)})),objectIsExtensible$1=FAILS_ON_PRIMITIVES$4||ARRAY_BUFFER_NON_EXTENSIBLE$1?function(e){return!!isObject$c(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE$1||"ArrayBuffer"!=classof$6(e))&&(!$isExtensible$1||$isExtensible$1(e)))}:$isExtensible$1,fails$x=fails$1C,freezing$1=!fails$x((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$P=_export$1,uncurryThis$o=functionUncurryThis$1,hiddenKeys$2=hiddenKeys$d,isObject$b=isObject$Q,hasOwn$c=hasOwnProperty_1$1,defineProperty$6=objectDefineProperty$1.f,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternalModule$1=objectGetOwnPropertyNamesExternal$1,isExtensible$1=objectIsExtensible$1,uid$2=uid$b,FREEZING$1=freezing$1,REQUIRED$1=!1,METADATA$1=uid$2("meta"),id$1=0,setMetadata$1=function(e){defineProperty$6(e,METADATA$1,{value:{objectID:"O"+id$1++,weakData:{}}})},fastKey$3=function(e,t){if(!isObject$b(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$c(e,METADATA$1)){if(!isExtensible$1(e))return"F";if(!t)return"E";setMetadata$1(e)}return e[METADATA$1].objectID},getWeakData$1=function(e,t){if(!hasOwn$c(e,METADATA$1)){if(!isExtensible$1(e))return!0;if(!t)return!1;setMetadata$1(e)}return e[METADATA$1].weakData},onFreeze$1=function(e){return FREEZING$1&&REQUIRED$1&&isExtensible$1(e)&&!hasOwn$c(e,METADATA$1)&&setMetadata$1(e),e},enable$1=function(){meta$1.enable=function(){},REQUIRED$1=!0;var e=getOwnPropertyNamesModule$2.f,t=uncurryThis$o([].splice),r={};r[METADATA$1]=1,e(r).length&&(getOwnPropertyNamesModule$2.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===METADATA$1){t(n,o,1);break}return n},$$P({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule$1.f}))},meta$1=internalMetadata$1.exports={enable:enable$1,fastKey:fastKey$3,getWeakData:getWeakData$1,onFreeze:onFreeze$1};hiddenKeys$2[METADATA$1]=!0;var internalMetadataExports$1=internalMetadata$1.exports,$$O=_export$1,global$g=global$1l,uncurryThis$n=functionUncurryThis$1,isForced$2=isForced_1$1,defineBuiltIn$6=defineBuiltIn$x,InternalMetadataModule$1=internalMetadataExports$1,iterate$3=iterate$p,anInstance$3=anInstance$h,isCallable$5=isCallable$Z,isNullOrUndefined$6=isNullOrUndefined$i,isObject$a=isObject$Q,fails$w=fails$1C,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$8,setToStringTag$2=setToStringTag$h,inheritIfRequired$2=inheritIfRequired$7,collection$3=function(e,t,r){var n=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=n?"set":"add",a=global$g[e],s=a&&a.prototype,l=a,c={},u=function(e){var t=uncurryThis$n(s[e]);defineBuiltIn$6(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!isObject$a(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!isObject$a(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!isObject$a(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(isForced$2(e,!isCallable$5(a)||!(o||s.forEach&&!fails$w((function(){(new a).entries().next()})))))l=r.getConstructor(t,e,n,i),InternalMetadataModule$1.enable();else if(isForced$2(e,!0)){var $=new l,d=$[i](o?{}:-0,1)!=$,p=fails$w((function(){$.has(1)})),y=checkCorrectnessOfIteration$2((function(e){new a(e)})),f=!o&&fails$w((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));y||((l=t((function(e,t){anInstance$3(e,s);var r=inheritIfRequired$2(new a,e,l);return isNullOrUndefined$6(t)||iterate$3(t,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=l),(p||f)&&(u("delete"),u("has"),n&&u("get")),(f||d)&&u(i),o&&s.clear&&delete s.clear}return c[e]=l,$$O({global:!0,constructor:!0,forced:l!=a},c),setToStringTag$2(l,e),o||r.setStrong(l,e,n),l},defineProperty$5=objectDefineProperty$1.f,create$4=objectCreate$1,defineBuiltIns$1=defineBuiltIns$7,bind$2=functionBindContext$1,anInstance$2=anInstance$h,isNullOrUndefined$5=isNullOrUndefined$i,iterate$2=iterate$p,defineIterator$2=iteratorDefine$1,createIterResultObject$2=createIterResultObject$8,setSpecies$2=setSpecies$9,DESCRIPTORS$9=descriptors$1,fastKey$2=internalMetadataExports$1.fastKey,InternalStateModule$3=internalState$1,setInternalState$3=InternalStateModule$3.set,internalStateGetterFor$1=InternalStateModule$3.getterFor,collectionStrong$3={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance$2(e,i),setInternalState$3(e,{type:t,index:create$4(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$9||(e.size=0),isNullOrUndefined$5(o)||iterate$2(o,e[n],{that:e,AS_ENTRIES:r})})),i=o.prototype,a=internalStateGetterFor$1(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$2(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$9?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},l=function(e,t){var r,n=a(e),o=fastKey$2(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns$1(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$9?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$9?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$2(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$1(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$9&&defineProperty$5(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor$1(t),i=internalStateGetterFor$1(n);defineIterator$2(e,t,(function(e,t){setInternalState$3(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$2("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject$2(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies$2(t)}},collection$2=collection$3,collectionStrong$2=collectionStrong$3;collection$2("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong$2);var $$N=_export$1,$find=arrayIteration$1.find,addToUnscopables$1=addToUnscopables$5,FIND="find",SKIPS_HOLES=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES=!1})),$$N({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables$1(FIND);var getIterator$5=getIterator$h,getIterator_1=getIterator$5,parent$z=getIterator_1,getIterator$4=parent$z,parent$y=getIterator$4,getIterator$3=parent$y,parent$x=getIterator$3,getIterator$2=parent$x,getIterator$1=getIterator$2,getIterator=getIterator$1,_getIterator=getDefaultExportFromCjs(getIterator),concat$1={};_Object$defineProperty(concat$1,"__esModule",{value:!0}),concat$1.default=function(e){for(var t=0,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=!0,a=!1,s=void 0;try{for(var l,c=_getIterator(n);!(i=(l=c.next()).done);i=!0){t+=l.value.length}}catch(e){a=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw s}}var u=new e(t),$=0,d=!0,p=!1,y=void 0;try{for(var f,h=_getIterator(n);!(d=(f=h.next()).done);d=!0){var m=f.value;u.set(m,$),$+=m.length}}catch(e){p=!0,y=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw y}}return u};var _concat=concat$1,_concat2=_interopRequireDefault(_concat);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var lib=_concat2.default,Concat=getDefaultExportFromCjs(lib);function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(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,n.key,n)}}function _createClass$4(e,t,r){return t&&_defineProperties$4(e.prototype,t),r&&_defineProperties$4(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$2(e,t,r){return t in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray$3(e,t)||_nonIterableRest$1()}function _toConsumableArray$2(e){return _arrayWithoutHoles$2(e)||_iterableToArray$2(e)||_unsupportedIterableToArray$3(e)||_nonIterableSpread$2()}function _arrayWithoutHoles$2(e){if(_Array$isArray(e))return _arrayLikeToArray$3(e)}function _arrayWithHoles$1(e){if(_Array$isArray(e))return e}function _iterableToArray$2(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _iterableToArrayLimit$1(e,t){var r=null==e?null:void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}function _unsupportedIterableToArray$3(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$3(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$3(e,t):void 0}}function _arrayLikeToArray$3(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$2(){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 _nonIterableRest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var $$M=_export$1,$includes=arrayIncludes$1.includes,fails$v=fails$1C,addToUnscopables=addToUnscopables$5,BROKEN_ON_SPARSE=fails$v((function(){return!Array(1).includes()}));$$M({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var isObject$9=isObject$Q,classof$5=classofRaw$5,wellKnownSymbol$9=wellKnownSymbol$R,MATCH$1=wellKnownSymbol$9("match"),isRegexp=function(e){var t;return isObject$9(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$5(e))},isRegExp$1=isRegexp,$TypeError$2=TypeError,notARegexp=function(e){if(isRegExp$1(e))throw $TypeError$2("The method doesn't accept regular expressions");return e},wellKnownSymbol$8=wellKnownSymbol$R,MATCH=wellKnownSymbol$8("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},$$L=_export$1,uncurryThis$m=functionUncurryThis$1,notARegExp$1=notARegexp,requireObjectCoercible$7=requireObjectCoercible$l,toString$i=toString$A,correctIsRegExpLogic$1=correctIsRegexpLogic,stringIndexOf$1=uncurryThis$m("".indexOf);$$L({target:"String",proto:!0,forced:!correctIsRegExpLogic$1("includes")},{includes:function(e){return!!~stringIndexOf$1(toString$i(requireObjectCoercible$7(this)),toString$i(notARegExp$1(e)),arguments.length>1?arguments[1]:void 0)}});var TrackType={VIDEO:"video",AUDIO:"audio",METADATA:"metadata"},VideoCodecType={AVC:"avc",HEVC:"hevc"},AudioCodecType={AAC:"aac",G711PCMA:"g7110a",G711PCMU:"g7110m"},VideoTrack=function(){function e(){_classCallCheck$4(this,e),_defineProperty$2(this,"id",1),_defineProperty$2(this,"type",TrackType.VIDEO),_defineProperty$2(this,"codecType",VideoCodecType.AVC),_defineProperty$2(this,"pid",-1),_defineProperty$2(this,"hvcC",void 0),_defineProperty$2(this,"codec",""),_defineProperty$2(this,"timescale",0),_defineProperty$2(this,"formatTimescale",0),_defineProperty$2(this,"sequenceNumber",0),_defineProperty$2(this,"baseMediaDecodeTime",0),_defineProperty$2(this,"baseDts",0),_defineProperty$2(this,"duration",0),_defineProperty$2(this,"warnings",[]),_defineProperty$2(this,"samples",[]),_defineProperty$2(this,"pps",[]),_defineProperty$2(this,"sps",[]),_defineProperty$2(this,"vps",[]),_defineProperty$2(this,"fpsNum",0),_defineProperty$2(this,"fpsDen",0),_defineProperty$2(this,"sarRatio",[]),_defineProperty$2(this,"width",0),_defineProperty$2(this,"height",0),_defineProperty$2(this,"nalUnitSize",4),_defineProperty$2(this,"present",!1),_defineProperty$2(this,"isVideoEncryption",!1),_defineProperty$2(this,"isAudioEncryption",!1),_defineProperty$2(this,"kid",null),_defineProperty$2(this,"pssh",null),_defineProperty$2(this,"ext",void 0)}return _createClass$4(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"exist",value:function(){return!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}}]),e}(),AudioTrack=function(){function e(){_classCallCheck$4(this,e),_defineProperty$2(this,"id",2),_defineProperty$2(this,"type",TrackType.AUDIO),_defineProperty$2(this,"codecType",AudioCodecType.AAC),_defineProperty$2(this,"pid",-1),_defineProperty$2(this,"codec",""),_defineProperty$2(this,"sequenceNumber",0),_defineProperty$2(this,"sampleDuration",0),_defineProperty$2(this,"timescale",0),_defineProperty$2(this,"formatTimescale",0),_defineProperty$2(this,"baseMediaDecodeTime",0),_defineProperty$2(this,"duration",0),_defineProperty$2(this,"warnings",[]),_defineProperty$2(this,"samples",[]),_defineProperty$2(this,"baseDts",0),_defineProperty$2(this,"sampleSize",16),_defineProperty$2(this,"sampleRate",0),_defineProperty$2(this,"channelCount",0),_defineProperty$2(this,"objectType",0),_defineProperty$2(this,"sampleRateIndex",0),_defineProperty$2(this,"config",[]),_defineProperty$2(this,"present",!1),_defineProperty$2(this,"isVideoEncryption",!1),_defineProperty$2(this,"isAudioEncryption",!1),_defineProperty$2(this,"kid",null),_defineProperty$2(this,"ext",void 0)}return _createClass$4(e,[{key:"reset",value:function(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}},{key:"exist",value:function(){return!!(this.sampleRate&&this.channelCount&&this.codec&&this.codecType===AudioCodecType.AAC)}},{key:"hasSample",value:function(){return!!this.samples.length}}]),e}(),VideoSample=function(){function e(t,r,n){_classCallCheck$4(this,e),_defineProperty$2(this,"flag",{}),_defineProperty$2(this,"keyframe",!1),_defineProperty$2(this,"gopId",0),_defineProperty$2(this,"duration",0),_defineProperty$2(this,"size",0),_defineProperty$2(this,"units",[]),_defineProperty$2(this,"chromaFormat",420),this.originPts=this.pts=t,this.originDts=this.dts=r,n&&(this.units=n)}return _createClass$4(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}(),AudioSample=_createClass$4((function e(t,r,n,o){_classCallCheck$4(this,e),_defineProperty$2(this,"duration",1024),_defineProperty$2(this,"flag",{dependsOn:2,isNonSyncSample:0}),_defineProperty$2(this,"keyframe",!0),this.originPts=this.pts=this.dts=t,this.data=r,this.size=r.byteLength,this.sampleOffset=o,n&&(this.duration=n)})),MetadataTrack=function(){function e(){_classCallCheck$4(this,e),_defineProperty$2(this,"id",3),_defineProperty$2(this,"type",TrackType.METADATA),_defineProperty$2(this,"timescale",0),_defineProperty$2(this,"flvScriptSamples",[]),_defineProperty$2(this,"seiSamples",[])}return _createClass$4(e,[{key:"exist",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length||!this.timescale)}},{key:"reset",value:function(){this.timescale=0,this.flvScriptSamples=[],this.seiSamples=[]}},{key:"hasSample",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length)}}]),e}(),anObject$a=anObject$E,regexpFlags$2=function(){var e=anObject$a(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call$a=functionCall$1,hasOwn$b=hasOwnProperty_1$1,isPrototypeOf$b=objectIsPrototypeOf$1,regExpFlags$3=regexpFlags$2,RegExpPrototype$7=RegExp.prototype,regexpGetFlags$2=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$7||hasOwn$b(e,"flags")||!isPrototypeOf$b(RegExpPrototype$7,e)?t:call$a(regExpFlags$3,e)},PROPER_FUNCTION_NAME$2=functionName$1.PROPER,defineBuiltIn$5=defineBuiltIn$x,anObject$9=anObject$E,$toString$2=toString$A,fails$u=fails$1C,getRegExpFlags$2=regexpGetFlags$2,TO_STRING$1="toString",RegExpPrototype$6=RegExp.prototype,nativeToString$1=RegExpPrototype$6[TO_STRING$1],NOT_GENERIC$1=fails$u((function(){return"/a/b"!=nativeToString$1.call({source:"a",flags:"b"})})),INCORRECT_NAME$1=PROPER_FUNCTION_NAME$2&&nativeToString$1.name!=TO_STRING$1;(NOT_GENERIC$1||INCORRECT_NAME$1)&&defineBuiltIn$5(RegExp.prototype,TO_STRING$1,(function(){var e=anObject$9(this);return"/"+$toString$2(e.source)+"/"+$toString$2(getRegExpFlags$2(e))}),{unsafe:!0});var $$K=_export$1,uncurryThis$l=functionUncurryThis$1,IndexedObject$1=indexedObject$1,toIndexedObject$7=toIndexedObject$p,arrayMethodIsStrict$6=arrayMethodIsStrict$h,nativeJoin=uncurryThis$l([].join),ES3_STRINGS=IndexedObject$1!=Object,STRICT_METHOD$5=arrayMethodIsStrict$6("join",",");$$K({target:"Array",proto:!0,forced:ES3_STRINGS||!STRICT_METHOD$5},{join:function(e){return nativeJoin(toIndexedObject$7(this),void 0===e?",":e)}});var fails$t=fails$1C,global$f=global$1l,$RegExp$2=global$f.RegExp,UNSUPPORTED_Y$2=fails$t((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),MISSED_STICKY=UNSUPPORTED_Y$2||fails$t((function(){return!$RegExp$2("a","y").sticky})),BROKEN_CARET=UNSUPPORTED_Y$2||fails$t((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$2},fails$s=fails$1C,global$e=global$1l,$RegExp$1=global$e.RegExp,regexpUnsupportedDotAll=fails$s((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),fails$r=fails$1C,global$d=global$1l,$RegExp=global$d.RegExp,regexpUnsupportedNcg=fails$r((function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),call$9=functionCall$1,uncurryThis$k=functionUncurryThis$1,toString$h=toString$A,regexpFlags$1=regexpFlags$2,stickyHelpers$1=regexpStickyHelpers,shared$3=sharedExports$1,create$3=objectCreate$1,getInternalState$2=internalState$1.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared$3("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$5=uncurryThis$k("".charAt),indexOf6=uncurryThis$k("".indexOf),replace$2=uncurryThis$k("".replace),stringSlice$8=uncurryThis$k("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$9(nativeExec,e,"a"),call$9(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y$1=stickyHelpers$1.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(e){var t,r,n,o,i,a,s,l=this,c=getInternalState$2(l),u=toString$h(e),$=c.raw;if($)return $.lastIndex=l.lastIndex,t=call$9(patchedExec,$,u),l.lastIndex=$.lastIndex,t;var d=c.groups,p=UNSUPPORTED_Y$1&&l.sticky,y=call$9(regexpFlags$1,l),f=l.source,h=0,m=u;if(p&&(y=replace$2(y,"y",""),-1===indexOf6(y,"g")&&(y+="g"),m=stringSlice$8(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==charAt$5(u,l.lastIndex-1))&&(f="(?: "+f+")",m=" "+m,h++),r=new RegExp("^(?:"+f+")",y)),NPCG_INCLUDED&&(r=new RegExp("^"+f+"$(?!\\s)",y)),UPDATES_LAST_INDEX_WRONG&&(n=l.lastIndex),o=call$9(nativeExec,p?r:l,m),p?o?(o.input=stringSlice$8(o.input,h),o[0]=stringSlice$8(o[0],h),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&o&&(l.lastIndex=l.global?o.index+o[0].length:n),NPCG_INCLUDED&&o&&o.length>1&&call$9(nativeReplace,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=create$3(null),i=0;i<d.length;i++)a[(s=d[i])[0]]=o[s[1]];return o});var regexpExec$3=patchedExec,$$J=_export$1,exec$2=regexpExec$3;$$J({target:"RegExp",proto:!0,forced:/./.exec!==regexpExec$3},{exec:regexpExec$3});var $$I=_export$1,call$8=functionCall$1,isCallable$4=isCallable$Z,anObject$8=anObject$E,toString$g=toString$A,DELEGATES_TO_EXEC=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),nativeTest=/./.test;$$I({target:"RegExp",proto:!0,forced:!DELEGATES_TO_EXEC},{test:function(e){var t=anObject$8(this),r=toString$g(e),n=t.exec;if(!isCallable$4(n))return call$8(nativeTest,t,r);var o=call$8(n,t,r);return null!==o&&(anObject$8(o),!0)}});var isBrowser="undefined"!=typeof window,ua=isBrowser&&navigator.userAgent.toLocaleLowerCase(),isFirefox=isBrowser&&_includesInstanceProperty(ua).call(ua,"firefox"),isAndroid=isBrowser&&_includesInstanceProperty(ua).call(ua,"android"),AAC=function(){function e(){_classCallCheck$4(this,e)}return _createClass$4(e,null,[{key:"getRateIndexByRate",value:function(t){var r;return _indexOfInstanceProperty(r=e.FREQ).call(r,t)}},{key:"parseADTS",value:function(t,r){for(var n=t.length,o=0;o+2<n&&(255!==t[o]||240!=(246&t[o+1]));)o++;if(!(o>=n)){var i=o,a=[],s=(60&t[o+2])>>>2,l=e.FREQ[s];if(!l)throw new Error("Invalid sampling index: ".concat(s));for(var c,u,$=1+((192&t[o+2])>>>6),d=(1&t[o+2])<<2|(192&t[o+3])>>>6,p=e._getConfig(s,d,$),y=p.config,f=p.codec,h=0,m=e.getFrameDuration(l);o+7<n;)if(255===t[o]&&240==(246&t[o+1])){if(n-o<(u=(3&t[o+3])<<11|t[o+4]<<3|(224&t[o+5])>>5))break;c=2*(1&~t[o+1]),a.push({pts:r+h*m,data:t.subarray(o+7+c,o+u)}),h++,o+=u}else o++;return{skip:i,remaining:o>=n?void 0:t.subarray(o),frames:a,samplingFrequencyIndex:s,sampleRate:l,objectType:$,channelCount:d,codec:f,config:y,originCodec:"mp4a.40.".concat($)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var r=t[0]>>>3,n=(7&t[0])<<1|t[1]>>>7,o=(120&t[1])>>>3,i=e.FREQ[n];if(!i)throw new Error("Invalid sampling index: ".concat(n));var a=e._getConfig(n,o,r);return{samplingFrequencyIndex:n,sampleRate:i,objectType:r,channelCount:o,config:a.config,codec:a.codec,originCodec:"mp4a.40.".concat(r)}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,r){var n,o,i=[];return isFirefox?e>=6?(n=5,o=e-3):(n=2,o=e):isAndroid?(n=2,o=e):(n=2===r||5===r?r:5,o=e,e>=6?o=e-3:1===t&&(n=2,o=e)),i[0]=n<<3,i[0]|=(14&e)>>1,i[1]=(1&e)<<7,i[1]|=t<<3,5===n&&(i[1]|=(14&o)>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{config:i,codec:"mp4a.40.".concat(n)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}();_defineProperty$2(AAC,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);var aCallable$2=aCallable$I,toObject$7=toObject$F,IndexedObject=indexedObject$2,lengthOfArrayLike$5=lengthOfArrayLike$J,$TypeError$1=TypeError,createMethod$3=function(e){return function(t,r,n,o){aCallable$2(r);var i=toObject$7(t),a=IndexedObject(i),s=lengthOfArrayLike$5(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$1("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$3(!1),right:createMethod$3(!0)},$$H=_export$2,$reduce$1=arrayReduce.left,arrayMethodIsStrict$5=arrayMethodIsStrict$l,CHROME_VERSION$1=engineV8Version$2,IS_NODE$1=engineIsNode$2,CHROME_BUG$1=!IS_NODE$1&&engineV8Version$2>79&&engineV8Version$2<83,FORCED$f=CHROME_BUG$1||!arrayMethodIsStrict$5("reduce");$$H({target:"Array",proto:!0,forced:FORCED$f},{reduce:function(e){var t=arguments.length;return $reduce$1(this,e,t,t>1?arguments[1]:void 0)}});var entryVirtual$4=entryVirtual$o,reduce$6=entryVirtual$4("Array").reduce,isPrototypeOf$a=objectIsPrototypeOf$2,method$4=reduce$6,ArrayPrototype$4=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$4||isPrototypeOf$a(ArrayPrototype$4,e)&&t===ArrayPrototype$4.reduce?method$4:t},parent$w=reduce$5,reduce$4=parent$w,parent$v=reduce$4,reduce$3=parent$v,parent$u=reduce$3,reduce$2=parent$u,reduce$1=reduce$2,reduce5=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce5);function concatUint8Array$1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=_filterInstanceProperty(t).call(t,Boolean);var n=new Uint8Array(_reduceInstanceProperty(t).call(t,(function(e,t){return e+t.byteLength}),0)),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set(e,o),o+=e.byteLength})),n}var MAX_SIZE=Math.pow(2,32);function readBig16(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function readBig24(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}function readBig32(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function readBig64(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return readBig32(e,t)*MAX_SIZE+readBig32(e,t+4)}function getAvcCodec(e){for(var t,r="avc1.",n=0;n<3;n++)(t=e[n].toString(16)).length<2&&(t="0".concat(t)),r+=t;return r}function formatIV(e){var t="";if(_forEachInstanceProperty(e).call(e,(function(e){t+=bufferToString(e)})),t.length<=32)for(var r=32-t.length,n=0;n<r;n++)t+="0";return t}function parse(e){if(!_Array$isArray(e)){for(var t=[],r="",n=0;n<e.length;n++)n%2&&(r=e[n-1]+e[n],t.push(_parseInt$1(r,16)),r="");return t}return _mapInstanceProperty(e).call(e,(function(e){return _parseInt$1(e,16)}))}function bufferToString(e){var t;return _sliceInstanceProperty(t="0"+Number(e).toString(16)).call(t,-2).toUpperCase()}var anObject$7=anObject$S,regexpFlags=function(){var e=anObject$7(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call$7=functionCall$2,hasOwn$a=hasOwnProperty_1$2,isPrototypeOf$9=objectIsPrototypeOf$2,regExpFlags$2=regexpFlags,RegExpPrototype$5=RegExp.prototype,regexpGetFlags$1=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$5||hasOwn$a(e,"flags")||!isPrototypeOf$9(RegExpPrototype$5,e)?t:call$7(regExpFlags$2,e)},getRegExpFlags$1=regexpGetFlags$1,flags$6=getRegExpFlags$1,isPrototypeOf$8=objectIsPrototypeOf$2,flags$5=flags$6,RegExpPrototype$4=RegExp.prototype,flags_1=function(e){return e===RegExpPrototype$4||isPrototypeOf$8(RegExpPrototype$4,e)?flags$5(e):e.flags},parent$t=flags_1,flags$4=parent$t,parent$s=flags$4,flags$3=parent$s,parent$r=flags$3,flags$2=parent$r,flags$1=flags$2,flags=flags$1,_flagsInstanceProperty=getDefaultExportFromCjs(flags),entryVirtual$3=entryVirtual$o,entries$6=entryVirtual$3("Array").entries,parent$q=entries$6,entries$5=parent$q,classof$4=classof$K,hasOwn$9=hasOwnProperty_1$2,isPrototypeOf$7=objectIsPrototypeOf$2,method$3=entries$5,ArrayPrototype$3=Array.prototype,DOMIterables$2={DOMTokenList:!0,NodeList:!0},entries$4=function(e){var t=e.entries;return e===ArrayPrototype$3||isPrototypeOf$7(ArrayPrototype$3,e)&&t===ArrayPrototype$3.entries||hasOwn$9(DOMIterables$2,classof$4(e))?method$3:t},parent$p=entries$4,entries$3=parent$p,parent$o=entries$3,entries$2=parent$o,entries$1=entries$2,entries5=entries$1,_entriesInstanceProperty=getDefaultExportFromCjs(entries5),global$c=global$1l,DESCRIPTORS$8=descriptors$1,defineBuiltInAccessor$1=defineBuiltInAccessor$9,regExpFlags$1=regexpFlags$2,fails$q=fails$1C,RegExp$1=global$c.RegExp,RegExpPrototype$3=RegExp$1.prototype,FORCED$e=DESCRIPTORS$8&&fails$q((function(){var e=!0;try{RegExp$1(".","d")}catch(t){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)o(a,i[a]);return Object.getOwnPropertyDescriptor(RegExpPrototype$3,"flags").get.call(t)!==n||r!==n}));FORCED$e&&defineBuiltInAccessor$1(RegExpPrototype$3,"flags",{configurable:!0,get:regExpFlags$1});var toIntegerOrInfinity$4=toIntegerOrInfinity$n,toString$f=toString$A,requireObjectCoercible$6=requireObjectCoercible$l,$RangeError$2=RangeError,stringRepeat$1=function(e){var t=toString$f(requireObjectCoercible$6(this)),r="",n=toIntegerOrInfinity$4(e);if(n<0||n==1/0)throw $RangeError$2("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$j=functionUncurryThis$1,toLength$4=toLength$k,toString$e=toString$A,$repeat$1=stringRepeat$1,requireObjectCoercible$5=requireObjectCoercible$l,repeat$1=uncurryThis$j($repeat$1),stringSlice$7=uncurryThis$j("".slice),ceil=Math.ceil,createMethod$2=function(e){return function(t,r,n){var o,i,a=toString$e(requireObjectCoercible$5(t)),s=toLength$4(r),l=a.length,c=void 0===n?" ":toString$e(n);return s<=l||""==c?a:((i=repeat$1(c,ceil((o=s-l)/c.length))).length>o&&(i=stringSlice$7(i,0,o)),e?a+i:i+a)}},stringPad={start:createMethod$2(!1),end:createMethod$2(!0)},userAgent=engineUserAgent$1,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent),$$G=_export$1,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$G({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var $$F=_export$1,from6=arrayFrom$1,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$8,INCORRECT_ITERATION=!checkCorrectnessOfIteration$1((function(e){Array.from(e)}));$$F({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from6});var MP4Parser=function(){function e(){_classCallCheck$4(this,e)}return _createClass$4(e,null,[{key:"findBox",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=[];if(!t)return o;for(var i=0,a="",s=0;t.length>7;){if(i=readBig32(t),a=String.fromCharCode.apply(null,t.subarray(4,8)),s=8,1===i?(i=readBig64(t,8),s+=8):i||(i=t.length),!r[0]||a===r[0]){var l=t.subarray(0,i);if(!(r.length<2))return e.findBox(l.subarray(s),_sliceInstanceProperty(r).call(r,1),n+s);o.push({start:n,size:i,headerSize:s,type:a,data:l})}n+=i,t=t.subarray(i)}return o}},{key:"tfhd",value:function(e){return parseBox(e,!0,(function(e,t){e.trackId=readBig32(t);var r=4,n=1&_flagsInstanceProperty(e),o=2&_flagsInstanceProperty(e),i=8&_flagsInstanceProperty(e),a=16&_flagsInstanceProperty(e),s=32&_flagsInstanceProperty(e);n&&(r+=4,e.baseDataOffset=readBig32(t,r),r+=4),o&&(e.sampleDescriptionIndex=readBig32(t,r),r+=4),i&&(e.defaultSampleDuration=readBig32(t,r),r+=4),a&&(e.defaultSampleSize=readBig32(t,r),r+=4),s&&(e.defaultSampleFlags=readBig32(t,r))}))}},{key:"sidx",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;e.reference_ID=readBig32(t,r),r+=4,e.timescale=readBig32(t,r),r+=4,0===e.version?(e.earliest_presentation_time=readBig32(t,r),r+=4,e.first_offset=readBig32(t,r),r+=4):(e.earliest_presentation_time=readBig64(t,r),r+=8,e.first_offset=readBig64(t,r),r+=8),r+=2,e.references=[];var n=readBig16(t,r);r+=2;for(var o=0;o<n;o++){var i={};e.references.push(i);var a=readBig32(t,r);r+=4,i.reference_type=a>>31&1,i.referenced_size=2147483647&a,i.subsegment_duration=readBig32(t,r),a=readBig32(t,r+=4),r+=4,i.starts_with_SAP=a>>31&1,i.SAP_type=a>>28&7,i.SAP_delta_time=268435455&a}}))}},{key:"moov",value:function(t){return parseBox(t,!1,(function(t,r,n){var o;t.mvhd=e.mvhd(e.findBox(r,["mvhd"],n)[0]),t.trak=_mapInstanceProperty(o=e.findBox(r,["trak"],n)).call(o,(function(t){return e.trak(t)})),t.pssh=e.pssh(e.findBox(r,["pssh"],n)[0])}))}},{key:"mvhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.timescale=readBig32(t,16),e.duration=readBig64(t,20),r+=28):(e.timescale=readBig32(t,8),e.duration=readBig32(t,12),r+=16),e.nextTrackId=readBig32(t,r+76)}))}},{key:"trak",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tkhd=e.tkhd(e.findBox(r,["tkhd"],n)[0]),t.mdia=e.mdia(e.findBox(r,["mdia"],n)[0])}))}},{key:"tkhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.trackId=readBig32(t,16),e.duration=readBig64(t,24),r+=32):(e.trackId=readBig32(t,8),e.duration=readBig32(t,16),r+=20),e.width=readBig32(t,r+52),e.height=readBig32(t,r+56)}))}},{key:"mdia",value:function(t){return parseBox(t,!1,(function(t,r,n){t.mdhd=e.mdhd(e.findBox(r,["mdhd"],n)[0]),t.hdlr=e.hdlr(e.findBox(r,["hdlr"],n)[0]),t.minf=e.minf(e.findBox(r,["minf"],n)[0])}))}},{key:"mdhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.timescale=readBig32(t,16),e.duration=readBig64(t,20),r+=28):(e.timescale=readBig32(t,8),e.duration=readBig32(t,12),r+=16);var n=readBig16(t,r);e.language=String.fromCharCode(96+(n>>10&31),96+(n>>5&31),96+(31&n))}))}},{key:"hdlr",value:function(e){return parseBox(e,!0,(function(e,t){0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}},{key:"minf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.vmhd=e.vmhd(e.findBox(r,["vmhd"],n)[0]),t.smhd=e.smhd(e.findBox(r,["smhd"],n)[0]),t.stbl=e.stbl(e.findBox(r,["stbl"],n)[0])}))}},{key:"vmhd",value:function(e){return parseBox(e,!0,(function(e,t){e.graphicsmode=readBig16(t),e.opcolor=[readBig16(t,2),readBig16(t,4),readBig16(t,6)]}))}},{key:"smhd",value:function(e){return parseBox(e,!0,(function(e,t){e.balance=readBig16(t)}))}},{key:"stbl",value:function(t){return parseBox(t,!1,(function(t,r,n){t.stsd=e.stsd(e.findBox(r,["stsd"],n)[0]),t.stts=e.stts(e.findBox(r,["stts"],n)[0]),t.ctts=e.ctts(e.findBox(r,["ctts"],n)[0]),t.stsc=e.stsc(e.findBox(r,["stsc"],n)[0]),t.stsz=e.stsz(e.findBox(r,["stsz"],n)[0]),t.stco=e.stco(e.findBox(r,["stco"],n)[0]),t.stco||(t.co64=e.co64(e.findBox(r,["co64"],n)[0]),t.stco=t.co64),t.stss=e.stss(e.findBox(r,["stss"],n)[0]),t.senc=e.senc(e.findBox(r,["senc"],n)[0])}))}},{key:"senc",value:function(e){return parseBox(e,!0,(function(e,t){var r=0,n=readBig32(t,r);r+=4,e.samples=[];for(var o=0;o<n;o++){var i={};if(i.InitializationVector=[t[r],t[r+1],t[r+2],t[r+3],t[r+4],t[r+5],t[r+6],t[r+7]],r+=8,2&_flagsInstanceProperty(e)){i.subsamples=[];var a=readBig16(t,r);r+=2;for(var s=0;s<a;s++){var l={};l.BytesOfClearData=readBig16(t,r),r+=2,l.BytesOfProtectedData=readBig32(t,r),r+=4,i.subsamples.push(l)}}e.samples.push(i)}}))}},{key:"pssh",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=[],n=[],o=0,i=0;i<16;i++)n.push(toHex(t[o+i]));if(o+=16,e.version>0){var a=readBig32(t,o);o+=4;for(var s=0;s<(""+a).length;s++)for(var l=0;l<16;l++){var c=t[o];o+=1,r.push(toHex(c))}}var u=readBig32(t,o);e.data_size=u,o+=4,e.kid=r,e.system_id=n,e.buffer=t}))}},{key:"stsd",value:function(t){return parseBox(t,!0,(function(t,r,n){var o,i;t.entryCount=readBig32(r),t.entries=_filterInstanceProperty(o=_mapInstanceProperty(i=e.findBox(r.subarray(4),[],n+4)).call(i,(function(t){switch(t.type){case"avc1":case"avc2":case"avc3":case"avc4":return e.avc1(t);case"hvc1":case"hev1":return e.hvc1(t);case"mp4a":return e.mp4a(t);case"alaw":case"ulaw":return e.alaw(t);case"enca":return parseBox(t,!1,(function(t,r,n){t.channelCount=readBig16(r,16),t.samplesize=readBig16(r,18),t.sampleRate=readBig32(r,24)/65536,r=r.subarray(28),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.esds=e.esds(e.findBox(r,["esds"],n)[0])}));case"encv":return parseBox(t,!1,(function(t,r,n){t.width=readBig16(r,24),t.height=readBig16(r,26),t.horizresolution=readBig32(r,28),t.vertresolution=readBig32(r,32),r=r.subarray(78),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.avcC=e.avcC(e.findBox(r,["avcC"],n)[0]),t.hvcC=e.hvcC(e.findBox(r,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(r,["pasp"],n)[0])}))}}))).call(o,Boolean)}))}},{key:"tenc",value:function(e){return parseBox(e,!1,(function(e,t){var r=6;e.default_IsEncrypted=t[r],r+=1,e.default_IV_size=t[r],r+=1,e.default_KID=[];for(var n=0;n<16;n++)e.default_KID.push(toHex(t[r])),r+=1}))}},{key:"schi",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tenc=e.tenc(e.findBox(r,["tenc"],n)[0])}))}},{key:"sinf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.schi=e.schi(e.findBox(r,["schi"],n)[0]),t.frma=e.frma(e.findBox(r,["frma"],n)[0])}))}},{key:"frma",value:function(e){return parseBox(e,!1,(function(e,t){e.data_format="";for(var r=0;r<4;r++)e.data_format+=String.fromCharCode(t[r])}))}},{key:"avc1",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseVisualSampleEntry(t,r),i=r.subarray(o);n+=o,t.avcC=e.avcC(e.findBox(i,["avcC"],n)[0]),t.pasp=e.pasp(e.findBox(i,["pasp"],n)[0])}))}},{key:"avcC",value:function(e){return parseBox(e,!1,(function(e,t){e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=getAvcCodec([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];for(var r=6,n=0;n<e.spsLength;n++){var o=readBig16(t,r);r+=2,e.sps.push(t.subarray(r,r+o)),r+=o}e.ppsLength=t[r],r+=1,e.pps=[];for(var i=0;i<e.ppsLength;i++){var a=readBig16(t,r);r+=2,e.pps.push(t.subarray(r,r+=a)),r+=a}}))}},{key:"hvc1",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseVisualSampleEntry(t,r),i=r.subarray(o);n+=o,t.hvcC=e.hvcC(e.findBox(i,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(i,["pasp"],n)[0])}))}},{key:"hvcC",value:function(e){return parseBox(e,!1,(function(t,r){t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=r[0];var n=r[1];t.generalProfileSpace=n>>6,t.generalTierFlag=(32&n)>>5,t.generalProfileIdc=31&n,t.generalProfileCompatibility=readBig32(r,2),t.generalConstraintIndicatorFlags=r.subarray(6,12),t.generalLevelIdc=r[12],t.avgFrameRate=readBig16(r,19),t.numOfArrays=r[22],t.vps=[],t.sps=[],t.pps=[];for(var o=23,i=0,a=0,s=0,l=0;l<t.numOfArrays;l++){i=63&r[o],a=readBig16(r,o+1),o+=3;for(var c,u=[],$=0;$<a;$++)s=readBig16(r,o),o+=2,u.push(r.subarray(o,o+s)),o+=s;if(32===i)(c=t.vps).push.apply(c,u);else if(33===i){var d;(d=t.sps).push.apply(d,u)}else if(34===i){var p;(p=t.pps).push.apply(p,u)}}}))}},{key:"pasp",value:function(e){return parseBox(e,!1,(function(e,t){e.hSpacing=readBig32(t),e.vSpacing=readBig32(t,4)}))}},{key:"mp4a",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseAudioSampleEntry(t,r);t.esds=e.esds(e.findBox(r.subarray(o),["esds"],n+o)[0])}))}},{key:"esds",value:function(e){return parseBox(e,!0,(function(e,t){e.codec="mp4a.";for(var r=0,n=0,o=0,i=0;t.length;){for(i=t[r=0],n=t[r+1],r+=2;128&n;)o=(127&n)<<7,n=t[r],r+=1;if(o+=127&n,3===i)t=t.subarray(r+3);else{if(4!==i){if(5===i){var a=e.config=t.subarray(r,r+o),s=(248&a[0])>>3;return 31===s&&a.length>=2&&(s=32+((7&a[0])<<3)+((224&a[1])>>5)),e.objectType=s,e.codec+=s.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}var l;e.codec+=_padStartInstanceProperty(l=t[r].toString(16)+".").call(l,3,"0"),t=t.subarray(r+13)}}}))}},{key:"alaw",value:function(e){return parseBox(e,!1,(function(e,t){parseAudioSampleEntry(e,t)}))}},{key:"stts",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,i=0;i<r;i++)n.push({count:readBig32(t,o),delta:readBig32(t,o+4)}),o+=8;e.entryCount=r,e.entries=n}))}},{key:"ctts",value:function(e){return parseBox(e,!0,(function(e,t){var r=readBig32(t),n=[],o=4;if(1===e.version)for(var i=0;i<r;i++)n.push({count:readBig32(t,o),offset:readBig32(t,o+4)}),o+=8;else for(var a=0;a<r;a++)n.push({count:readBig32(t,o),offset:-(1+~readBig32(t,o+4))}),o+=8;e.entryCount=r,e.entries=n}))}},{key:"stsc",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,i=0;i<r;i++)n.push({firstChunk:readBig32(t,o),samplesPerChunk:readBig32(t,o+4),sampleDescriptionIndex:readBig32(t,o+8)}),o+=12;e.entryCount=r,e.entries=n}))}},{key:"stsz",value:function(e){return parseBox(e,!0,(function(e,t){var r=readBig32(t),n=readBig32(t,4),o=[];if(!r)for(var i=8,a=0;a<n;a++)o.push(readBig32(t,i)),i+=4;e.sampleSize=r,e.sampleCount=n,e.entrySizes=o}))}},{key:"stco",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,i=0;i<r;i++)n.push(readBig32(t,o)),o+=4;e.entryCount=r,e.entries=n}))}},{key:"co64",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,i=0;i<r;i++)n.push(readBig64(t,o)),o+=8;e.entryCount=r,e.entries=n}))}},{key:"stss",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,i=0;i<r;i++)n.push(readBig32(t,o)),o+=4;e.entryCount=r,e.entries=n}))}},{key:"moof",value:function(t){return parseBox(t,!1,(function(t,r,n){var o;t.mfhd=e.mfhd(e.findBox(r,["mfhd"],n)[0]),t.traf=_mapInstanceProperty(o=e.findBox(r,["traf"],n)).call(o,(function(t){return e.traf(t)}))}))}},{key:"mfhd",value:function(e){return parseBox(e,!0,(function(e,t){e.sequenceNumber=readBig32(t)}))}},{key:"traf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tfhd=e.tfhd(e.findBox(r,["tfhd"],n)[0]),t.tfdt=e.tfdt(e.findBox(r,["tfdt"],n)[0]),t.trun=e.trun(e.findBox(r,["trun"],n)[0])}))}},{key:"trun",value:function(e){return parseBox(e,!0,(function(e,t){var r=e.version,n=_flagsInstanceProperty(e),o=t.length,i=e.sampleCount=readBig32(t),a=4;if(o>a&&1&n&&(e.dataOffset=-(1+~readBig32(t,a)),a+=4),o>a&&4&n&&(e.firstSampleFlags=readBig32(t,a),a+=4),e.samples=[],o>a)for(var s,l=0;l<i;l++)s={},256&n&&(s.duration=readBig32(t,a),a+=4),512&n&&(s.size=readBig32(t,a),a+=4),1024&n&&(s.flags=readBig32(t,a),a+=4),2048&n&&(s.cts=r?-(1+~readBig32(t,a+4)):readBig32(t,a),a+=4),e.samples.push(s)}))}},{key:"tfdt",value:function(e){return parseBox(e,!0,(function(e,t){1===e.version?e.baseMediaDecodeTime=readBig64(t):e.baseMediaDecodeTime=readBig32(t)}))}},{key:"probe",value:function(t){return!!e.findBox(t,["ftyp"])}},{key:"parseSampleFlags",value:function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},{key:"moovToTrack",value:function(e,t,r){var n,o,i=e.trak;if(i&&i.length){var a=_findInstanceProperty(i).call(i,(function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),s=_findInstanceProperty(i).call(i,(function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}));if(a&&t){var l,c,u,$,d,p,y,f=t,h=null===(l=a.tkhd)||void 0===l?void 0:l.trackId;null!=h&&(f.id=a.tkhd.trackId),f.tkhdDuration=a.tkhd.duration,f.mvhdDurtion=e.mvhd.duration,f.mvhdTimecale=e.mvhd.timescale,f.timescale=f.formatTimescale=a.mdia.mdhd.timescale,f.duration=a.mdia.mdhd.duration||f.mvhdDurtion/f.mvhdTimecale*f.timescale;var m,b,g,S,I,T,v,_,P=_entriesInstanceProperty(a.mdia.minf.stbl.stsd)[0];if(f.width=P.width,f.height=P.height,P.pasp&&(f.sarRatio=[P.pasp.hSpacing,P.pasp.vSpacing]),P.hvcC)f.codecType=VideoCodecType.HEVC,f.codec=P.hvcC.codec,f.vps=P.hvcC.vps,f.sps=P.hvcC.sps,f.pps=P.hvcC.pps,f.hvcC=P.hvcC.data;else{if(!P.avcC)throw new Error("unknown video stsd entry");f.codec=P.avcC.codec,f.sps=P.avcC.sps,f.pps=P.avcC.pps}if(f.present=!0,f.ext={},f.ext.stss=null===(c=a.mdia)||void 0===c||null===(u=c.minf)||void 0===u||null===($=u.stbl)||void 0===$?void 0:$.stss,f.ext.ctts=null===(d=a.mdia)||void 0===d||null===(p=d.minf)||void 0===p||null===(y=p.stbl)||void 0===y?void 0:y.ctts,P&&"encv"===P.type)f.isVideoEncryption=!0,P.default_KID=null===(m=P.sinf)||void 0===m||null===(b=m.schi)||void 0===b?void 0:b.tenc.default_KID,P.default_IsEncrypted=null===(g=P.sinf)||void 0===g||null===(S=g.schi)||void 0===S?void 0:S.tenc.default_IsEncrypted,P.default_IV_size=null===(I=P.sinf)||void 0===I||null===(T=I.schi)||void 0===T?void 0:T.tenc.default_IV_size,f.videoSenc=a.mdia.minf.stbl.senc&&a.mdia.minf.stbl.senc.samples,P.data_format=null===(v=P.sinf)||void 0===v||null===(_=v.frma)||void 0===_?void 0:_.data_format,f.useEME=e.useEME,f.kidValue=e.kidValue,f.pssh=e.pssh,f.encv=P}if(s&&r){var E,R,O,C,w,A,L,x,Z,N=r,M=null===(E=s.tkhd)||void 0===E?void 0:E.trackId;null!=M&&(N.id=s.tkhd.trackId),N.tkhdDuration=s.tkhd.duration,N.mvhdDurtion=e.mvhd.duration,N.mvhdTimecale=e.mvhd.timescale,N.timescale=N.formatTimescale=s.mdia.mdhd.timescale,N.duration=s.mdia.mdhd.duration||N.mvhdDurtion/N.mvhdTimecale*N.timescale;var G,k,V,X,D,W,j,K,F=_entriesInstanceProperty(s.mdia.minf.stbl.stsd)[0];switch(N.sampleSize=F.sampleSize,N.sampleRate=F.sampleRate,N.channelCount=F.channelCount,N.present=!0,F.type){case"alaw":N.codecType=N.codec=AudioCodecType.G711PCMA,N.sampleRate=8e3;break;case"ulaw":N.codecType=N.codec=AudioCodecType.G711PCMU,N.sampleRate=8e3;break;default:N.sampleDuration=AAC.getFrameDuration(N.sampleRate,N.timescale),N.sampleRateIndex=AAC.getRateIndexByRate(N.sampleRate),N.objectType=(null===(n=F.esds)||void 0===n?void 0:n.objectType)||2,F.esds&&(N.config=_Array$from(F.esds.config)),N.codec=(null===(o=F.esds)||void 0===o?void 0:o.codec)||"mp4a.40.2"}if(N.sampleDuration=AAC.getFrameDuration(N.sampleRate,N.timescale),N.objectType=(null===(R=F.esds)||void 0===R?void 0:R.objectType)||2,F.esds&&(F.esds.config?N.config=_Array$from(F.esds.config):console.warn("esds config is null")),N.codec=(null===(O=F.esds)||void 0===O?void 0:O.codec)||"mp4a.40.2",N.sampleRateIndex=AAC.getRateIndexByRate(N.sampleRate),N.ext={},N.ext.stss=null===(C=s.mdia)||void 0===C||null===(w=C.minf)||void 0===w||null===(A=w.stbl)||void 0===A?void 0:A.stss,N.ext.ctts=null===(L=s.mdia)||void 0===L||null===(x=L.minf)||void 0===x||null===(Z=x.stbl)||void 0===Z?void 0:Z.ctts,N.present=!0,F&&"enca"===F.type)N.isAudioEncryption=!0,F.data_format=null===(G=F.sinf)||void 0===G||null===(k=G.frma)||void 0===k?void 0:k.data_format,F.default_KID=null===(V=F.sinf)||void 0===V||null===(X=V.schi)||void 0===X?void 0:X.tenc.default_KID,F.default_IsEncrypted=null===(D=F.sinf)||void 0===D||null===(W=D.schi)||void 0===W?void 0:W.tenc.default_IsEncrypted,F.default_IV_size=null===(j=F.sinf)||void 0===j||null===(K=j.schi)||void 0===K?void 0:K.tenc.default_IV_size,N.audioSenc=s.mdia.minf.stbl.senc&&s.mdia.minf.stbl.senc.samples,N.useEME=e.useEME,N.kidValue=e.kidValue,N.enca=F}if(r&&(r.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!r&&r.isAudioEncryption),null!=t&&t.encv||null!=r&&r.enca){var U,Y,H=null==t||null===(U=t.encv)||void 0===U?void 0:U.default_KID,B=null==r||null===(Y=r.enca)||void 0===Y?void 0:Y.default_KID,J=H||B?(H||B).join(""):null;t&&(t.kid=J),r&&(r.kid=J)}return t&&(t.flags=3841),r&&(r.flags=1793),{videoTrack:t,audioTrack:r}}}},{key:"evaluateDefaultDuration",value:function(e,t,r){var n,o=null==t||null===(n=t.samples)||void 0===n?void 0:n.length;return o?1024*o/t.timescale*e.timescale/r:1024}},{key:"moofToSamples",value:function(t,r,n){var o,i={};return t.mfhd&&(r&&(r.sequenceNumber=t.mfhd.sequenceNumber),n&&(n.sequenceNumber=t.mfhd.sequenceNumber)),_forEachInstanceProperty(o=t.traf).call(o,(function(t){var o=t.tfhd,a=t.tfdt,s=t.trun;if(o&&s){a&&(r&&r.id===o.trackId&&(r.baseMediaDecodeTime=a.baseMediaDecodeTime),n&&n.id===o.trackId&&(n.baseMediaDecodeTime=a.baseMediaDecodeTime));var l=o.defaultSampleSize||0,c=o.defaultSampleDuration||e.evaluateDefaultDuration(r,n,s.samples.length||s.sampleCount),u=s.dataOffset||0,$=0,d=-1;if(!s.samples.length&&s.sampleCount){i[o.trackId]=[];for(var p=0;p<s.sampleCount;p++)i[o.trackId].push({offset:u,dts:$,duration:c,size:l}),$+=c,u+=l}else{var y;i[o.trackId]=_mapInstanceProperty(y=s.samples).call(y,(function(e,t){return(e={offset:u,dts:$,pts:$+(e.cts||0),duration:e.duration||c,size:e.size||l,gopId:d,keyframe:0===t||null!==_flagsInstanceProperty(e)&&void 0!==_flagsInstanceProperty(e)&&(65536&_flagsInstanceProperty(e))>>>0!=65536}).keyframe&&(d++,e.gopId=d),$+=e.duration,u+=e.size,e}))}}})),i}},{key:"moovToSamples",value:function(e){var t=e.trak;if(t&&t.length){var r=_findInstanceProperty(t).call(t,(function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),n=_findInstanceProperty(t).call(t,(function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}));if(r||n){var o,i;if(r){var a,s,l=null===(a=r.mdia)||void 0===a||null===(s=a.minf)||void 0===s?void 0:s.stbl;if(!l)return;var c=l.stts,u=l.stsc,$=l.stsz,d=l.stco,p=l.stss,y=l.ctts;if(!(c&&u&&$&&d&&p))return;o=getSamples(c,u,$,d,y,p)}if(n){var f,h,m,b=null===(f=n.mdia)||void 0===f||null===(h=f.minf)||void 0===h?void 0:h.stbl;if(!b)return;var g=null===(m=n.mdia.mdhd)||void 0===m?void 0:m.timescale,S=b.stts,I=b.stsc,T=b.stsz,v=b.stco;if(!(g&&S&&I&&T&&v))return;i=getSamples(S,I,T,v)}return{videoSamples:o,audioSamples:i}}}}}]),e}();function getSamples(e,t,r,n,o,i){var a,s,l,c,u=[],$=null==o?void 0:_entriesInstanceProperty(o),d=_entriesInstanceProperty(t),p=_entriesInstanceProperty(n),y=r.entrySizes,f=null==i?void 0:_entriesInstanceProperty(i);f&&(s={},_forEachInstanceProperty(f).call(f,(function(e){s[e-1]=!0}))),$&&(l=[],_forEachInstanceProperty($).call($,(function(e){for(var t=e.count,r=e.offset,n=0;n<t;n++)l.push(r)})));var h=-1,m=0,b=0,g=0,S=0,I=0,T=d[0].samplesPerChunk,v=d[1]?d[1].firstChunk-1:1/0;return _forEachInstanceProperty(a=_entriesInstanceProperty(e)).call(a,(function(e){for(var t=e.count,n=e.delta,o=0;o<t;o++)c={dts:m,duration:n,size:y[b]||r.sampleSize,offset:p[g]+I,index:b},f&&(c.keyframe=s[b],c.keyframe&&h++,c.gopId=h),l&&b<l.length&&(c.pts=c.dts+l[b]),u.push(c),m+=n,++b<T?I+=c.size:(g++,I=0,g>=v&&(S++,v=d[S+1]?d[S+1].firstChunk-1:1/0),T+=d[S].samplesPerChunk)})),u}function parseVisualSampleEntry(e,t){return e.dataReferenceIndex=readBig16(t,6),e.width=readBig16(t,24),e.height=readBig16(t,26),e.horizresolution=readBig32(t,28),e.vertresolution=readBig32(t,32),e.frameCount=readBig16(t,40),e.depth=readBig16(t,74),78}function parseAudioSampleEntry(e,t){return e.dataReferenceIndex=readBig16(t,6),e.channelCount=readBig16(t,16),e.sampleSize=readBig16(t,18),e.sampleRate=readBig32(t,24)/65536,28}function parseBox(e,t,r){if(e){if(e.size!==e.data.length)throw new Error("box ".concat(e.type," size !== data.length"));var n={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(n.version=e.data[e.headerSize],n.flags=readBig24(e.data,e.headerSize+1),n.headerSize+=4),r(n,e.data.subarray(n.headerSize),n.start+n.headerSize),n}}var padStart3=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},toHex=function(){for(var e=[],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _forEachInstanceProperty(r).call(r,(function(t){e.push(padStart3(Number(t).toString(16),2,0))})),e[0]},$$E=_export$1,global$b=global$1l,arrayBufferModule=arrayBuffer,setSpecies$1=setSpecies$9,ARRAY_BUFFER="ArrayBuffer",ArrayBuffer$1=arrayBufferModule[ARRAY_BUFFER],NativeArrayBuffer=global$b[ARRAY_BUFFER];$$E({global:!0,constructor:!0,forced:NativeArrayBuffer!==ArrayBuffer$1},{ArrayBuffer:ArrayBuffer$1}),setSpecies$1(ARRAY_BUFFER);var _context21,Buffer=function(){function e(){_classCallCheck$4(this,e),this.buffer=new Uint8Array(0)}return _createClass$4(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];_forEachInstanceProperty(r).call(r,(function(t){t?e.buffer=Concat(Uint8Array,e.buffer,t):window.console.warn(t)}))}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),UINT32_MAX=Math.pow(2,32)-1,MP4$1=function(){function e(){_classCallCheck$4(this,e)}return _createClass$4(e,null,[{key:"box",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r=_filterInstanceProperty(r).call(r,Boolean);var o=8+_reduceInstanceProperty(r).call(r,(function(e,t){return e+t.byteLength}),0),i=new Uint8Array(o);i[0]=o>>24&255,i[1]=o>>16&255,i[2]=o>>8&255,i[3]=255&o,i.set(e,4);var a=8;return _forEachInstanceProperty(r).call(r,(function(e){i.set(e,a),a+=e.byteLength})),i}},{key:"ftyp",value:function(t){var r=_findInstanceProperty(t).call(t,(function(e){return e.type===TrackType.VIDEO&&e.codecType===VideoCodecType.HEVC}));return r?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return concatUint8Array$1(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var r,n=new Uint8Array(_concatInstanceProperty(r=[1,0,0,0]).call(r,[16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],parse(t.kid),[0,0,0,0]));return e.box(e.types.pssh,n)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){var r;t[0].pssh||(t[0].pssh={kid:t[0].kid});var n=this.pssh(t[0].pssh);return e.box.apply(e,_concatInstanceProperty(r=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)]).call(r,_toConsumableArray$2(_mapInstanceProperty(t).call(t,(function(t){return e.trak(t)}))),[n]))}var o;return e.box.apply(e,_concatInstanceProperty(o=[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)]).call(o,_toConsumableArray$2(_mapInstanceProperty(t).call(t,(function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,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,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,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,n>>8&255,255&n,0,0,o>>8&255,255&o,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===TrackType.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var r=[];return t&&t.ext&&t.ext.stss&&r.push(e.stss(_entriesInstanceProperty(t.ext.stss))),e.box(e.types.stbl,e.stsd(t),e.STTS,r[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var r;return r="audio"===t.type?t.useEME&&t.enca?e.enca(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),r)}},{key:"enca",value:function(t){var r=t.enca.channelCount,n=t.enca.sampleRate,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>8&255,255&n,0,0]),i=e.esds(t.config),a=e.sinf(t.enca);return e.box(e.types.enca,o,i,a)}},{key:"encv",value:function(t){var r,n,o,i=t.sps.length>0?t.sps[0]:[],a=t.pps.length>0?t.pps[0]:[],s=t.width,l=t.height,c=t.sarRatio[0],u=t.sarRatio[1],$=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,255&s,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),d=new Uint8Array(_concatInstanceProperty(n=_concatInstanceProperty(r=_concatInstanceProperty(o=[1,i[1],i[2],i[3],255,225,i.length>>>8&255,255&i.length]).apply(o,_toConsumableArray$2(i))).call(r,[1,a.length>>>8&255,255&a.length])).apply(n,_toConsumableArray$2(a))),p=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),y=e.sinf(t.encv),f=new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,u>>24,u>>16&255,u>>8&255,255&u]);return e.box(e.types.encv,$,e.box(e.types.avcC,d),e.box(e.types.btrt,p),y,e.box(e.types.pasp,f))}},{key:"schi",value:function(t){var r=new Uint8Array([]),n=e.tenc(t);return e.box(e.types.schi,r,n)}},{key:"tenc",value:function(t){var r,n=new Uint8Array(_concatInstanceProperty(r=[0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size]).call(r,parse(t.default_KID)));return e.box(e.types.tenc,n)}},{key:"sinf",value:function(t){var r=new Uint8Array([]),n=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),o=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),i=e.schi(t);return e.box(e.types.sinf,r,e.box(e.types.frma,n),e.box(e.types.schm,o),i)}},{key:"avc1hev1",value:function(t){var r,n=t.codecType===VideoCodecType.HEVC,o=n?e.types.hvc1:e.types.avc1,i=n?e.hvcC(t):e.avcC(t),a=[new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i];return n?a.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&a.push(e.pasp(t.sarRatio)),e.box.apply(e,_concatInstanceProperty(r=[o]).call(r,a))}},{key:"avcC",value:function(t){var r,n,o,i,a,s,l=[],c=[];return _forEachInstanceProperty(r=t.sps).call(r,(function(e){s=e.byteLength,l.push(s>>>8&255),l.push(255&s),l.push.apply(l,_toConsumableArray$2(e))})),_forEachInstanceProperty(n=t.pps).call(n,(function(e){s=e.byteLength,c.push(s>>>8&255),c.push(255&s),c.push.apply(c,_toConsumableArray$2(e))})),e.box(e.types.avcC,new Uint8Array(_concatInstanceProperty(i=_concatInstanceProperty(o=_concatInstanceProperty(a=[1,l[3],l[4],l[5],255,224|t.sps.length]).apply(a,l)).call(o,[t.pps.length])).apply(i,c)))}},{key:"hvcC",value:function(t){var r=t.hvcC;if(r instanceof ArrayBuffer||r instanceof Uint8Array)return r;var n,o=t.vps,i=t.sps,a=t.pps;if(r){var s=r.generalProfileCompatibilityFlags,l=r.generalConstraintIndicatorFlags,c=(o.length&&1)+(i.length&&1)+(a.length&&1);n=[1,r.generalProfileSpace<<6|r.generalTierFlag<<5|r.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,l[0],l[1],l[2],l[3],l[4],l[5],r.generalLevelIdc,240,0,252,252|r.chromaFormatIdc,248|r.bitDepthLumaMinus8,248|r.bitDepthChromaMinus8,0,0,r.numTemporalLayers<<3|r.temporalIdNested<<2|3,c];var u=function(e){var t;n.push(e.length>>8,e.length),(t=n).push.apply(t,_toConsumableArray$2(e))};o.length&&(n.push(160,0,o.length),_forEachInstanceProperty(o).call(o,u)),i.length&&(n.push(161,0,i.length),_forEachInstanceProperty(i).call(i,u)),a.length&&(n.push(162,0,a.length),_forEachInstanceProperty(a).call(a,u))}else n=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(n))}},{key:"pasp",value:function(t){var r=_slicedToArray$1(t,2),n=r[0],o=r[1];return e.box(e.types.pasp,new Uint8Array([n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var r,n,o,i=t.length;return e.box(e.types.esds,new Uint8Array(_concatInstanceProperty(r=_concatInstanceProperty(n=_concatInstanceProperty(o=[0,0,0,0,3,23+i,0,0,0,4,15+i,64,21,0,6,0,0,0,218,192,0,0,218,192,5]).call(o,[i])).call(n,t)).call(r,[6,1,2])))}},{key:"mvex",value:function(t){var r,n=e.box.apply(e,_concatInstanceProperty(r=[e.types.mvex]).call(r,_toConsumableArray$2(_mapInstanceProperty(t).call(t,(function(t){return e.trex(t.id)})))));return n}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){var r,n=e.box.apply(e,_concatInstanceProperty(r=[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)]).call(r,_toConsumableArray$2(_mapInstanceProperty(t).call(t,(function(t){return e.traf(t)})))));return n}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var r=e.tfhd(t.id),n=e.tfdt(t,t.baseMediaDecodeTime);if(t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(1===t.id){var o=e.saiz(t),i=e.saio(t),a=e.trun1(t),s=e.senc(t);return e.box(e.types.traf,r,n,o,i,a,s)}if(t.isAudioEncryption){var l=e.sbgp(),c=e.saiz(t),u=e.saio(t),$=e.senc(t),d=e.trun1(t);return e.box(e.types.traf,r,n,l,c,u,$,d)}var p=e.sbgp(),y=e.trun1(t);return e.box(e.types.traf,r,n,p,y)}if(1===t.id){var f=e.trun1(t);return e.box(e.types.traf,r,n,f)}var h=e.sbgp(),m=e.saiz(t),b=e.saio(t),g=e.senc(t),S=e.trun1(t);return e.box(e.types.traf,r,n,h,m,b,g,S)}var I=e.sdtp(t);return e.box(e.types.traf,r,n,I,e.trun(t.samples,I.byteLength+76))}},{key:"sdtp",value:function(t){var r,n=new Buffer;return _forEachInstanceProperty(r=t.samples).call(r,(function(e){n.write(new Uint8Array(1===t.id?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),n.buffer)}},{key:"trun1",value:function(t){var r,n=new Buffer,o=Buffer.writeUint32(t.samples.length),i=null;if(1===t.id){var a=t.videoSencLength;i=Buffer.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(i=Buffer.writeUint32(16*t.samples.length+92))}else{var s=12*t.samples.length+124;t.isAudioEncryption&&(s=12*t.samples.length+8*t.audioSenc.length+177),i=Buffer.writeUint32(s)}return _forEachInstanceProperty(r=t.samples).call(r,(function(e){n.write(Buffer.writeUint32(e.duration)),n.write(Buffer.writeUint32(e.size)),n.write(Buffer.writeUint32(e.keyframe?33554432:65536)),1===t.id&&n.write(Buffer.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,_flagsInstanceProperty(t)),o,i,n.buffer)}},{key:"senc",value:function(t){var r=new Buffer,n=t.samples.length,o=1===t.id?16:8,i=1===t.id?2:0,a=[],s=0;return 1===t.id?(a=t.videoSenc,s=t.videoSencLength):a=t.audioSenc,s=s||o*n,r.write(Buffer.writeUint32(16+s),e.types.senc,this.extension(0,i)),r.write(Buffer.writeUint32(n)),_forEachInstanceProperty(a).call(a,(function(e){for(var t=0;t<e.InitializationVector.length;t++)r.write(new Uint8Array([e.InitializationVector[t]]));var n;e.subsamples&&e.subsamples.length&&(r.write(Buffer.writeUint16(e.subsamples.length)),_forEachInstanceProperty(n=e.subsamples).call(n,(function(e){r.write(Buffer.writeUint16(e.BytesOfClearData)),r.write(Buffer.writeUint32(e.BytesOfProtectedData))})))})),r.buffer}},{key:"saio",value:function(t){var r=12*t.samples.length+141;2===t.id&&t.isAudioEncryption&&(r=149);var n=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saio,n)}},{key:"saiz",value:function(t){var r=t.samples.length,n=new Uint8Array([0,0,0,0,16,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saiz,n)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,r){var n=Math.floor(r/(UINT32_MAX+1)),o=Math.floor(r%(UINT32_MAX+1));return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o]))}},{key:"trun",value:function(t,r){var n=t.length,o=12+16*n;r+=8+o;var i=new Uint8Array(o);i.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var a=0;a<n;a++){var s=t[a],l=s.duration,c=s.size,u=s.flag,$=void 0===u?{}:u,d=s.cts,p=void 0===d?0:d;i.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,$.isLeading<<2|(null===$.dependsOn||void 0===$.dependsOn?1:$.dependsOn),$.isDependedOn<<6|$.hasRedundancy<<4|$.paddingValue<<1|(null===$.isNonSyncSample||void 0===$.isNonSyncSample?1:$.isNonSyncSample),61440&$.degradationPriority,15&$.degradationPriority,p>>>24&255,p>>>16&255,p>>>8&255,255&p],12+16*a)}return e.box(e.types.trun,i)}},{key:"moovMP4",value:function(t){var r;return e.box.apply(e,_concatInstanceProperty(r=[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)]).call(r,_toConsumableArray$2(_mapInstanceProperty(t).call(t,(function(t){return e.trackMP4(t)})))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===TrackType.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var r,n=t.ext,o=[e.stsd(t),e.stts(n.stts),e.stsc(n.stsc),e.stsz(n.stsz),e.stco(n.stco)];return n.stss.length&&o.push(e.stss(n.stss)),n.ctts.length&&o.push(e.ctts(n.ctts)),e.box.apply(e,_concatInstanceProperty(r=[e.types.stbl]).call(r,o))}},{key:"stts",value:function(t){var r=t.length,n=new Uint8Array(8*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],o),o+=8})),e.box(e.types.stts,concatUint8Array$1(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsc",value:function(t){var r=t.length,n=new Uint8Array(12*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){var t=e.firstChunk,r=e.samplesPerChunk,i=e.sampleDescIndex;n.set([t>>24,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i],o),o+=12})),e.box(e.types.stsc,concatUint8Array$1(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsz",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stsz,concatUint8Array$1(new Uint8Array([0,0,0,0,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stco",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stco,concatUint8Array$1(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stss",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stss,concatUint8Array$1(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"ctts",value:function(t){var r=t.length,n=new Uint8Array(8*r),o=0;return _forEachInstanceProperty(t).call(t,(function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],o),o+=8})),e.box(e.types.ctts,concatUint8Array$1(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var r,n=t.timescale,o=t.samples[0].duration,i=o*t.samples.length,a=t.samples[0].sampleOffset*o,s=8;_forEachInstanceProperty(r=t.samples).call(r,(function(e){s+=e.size}));var l=0;if(1===t.id){var c,u=0;t.videoSenc&&(c=t.videoSenc),1===t.id&&_forEachInstanceProperty(c).call(c,(function(e){u+=8,e.subsamples&&e.subsamples.length&&(u+=2,u+=6*e.subsamples.length)})),t.videoSencLength=u,l=s+141+16*t.samples.length+u,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(l=s+16*t.samples.length+84)}else l=s+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(l=s+169+12*t.samples.length+8*t.audioSenc.length);var $=new Uint8Array([0,0,0,0,0,0,0,255&t.id,n>>24&255,n>>16&255,n>>8&255,255&n,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,1,0,l>>16&255,l>>8&255,255&l,i>>24&255,i>>16&255,i>>8&255,255&i,144,0,0,0]);return e.box(e.types.sidx,$)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();_defineProperty$2(MP4$1,"types",_reduceInstanceProperty(_context21=["avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"]).call(_context21,(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),_Object$create(null))),_defineProperty$2(MP4$1,"HDLR_TYPES",{video:new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),audio:new Uint8Array([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])}),_defineProperty$2(MP4$1,"FTYPAVC1",MP4$1.box(MP4$1.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),_defineProperty$2(MP4$1,"FTYPHEV1",MP4$1.box(MP4$1.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),_defineProperty$2(MP4$1,"DINF",MP4$1.box(MP4$1.types.dinf,MP4$1.box(MP4$1.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),_defineProperty$2(MP4$1,"VMHD",MP4$1.box(MP4$1.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),_defineProperty$2(MP4$1,"SMHD",MP4$1.box(MP4$1.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),_defineProperty$2(MP4$1,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),_defineProperty$2(MP4$1,"STTS",MP4$1.box(MP4$1.types.stts,MP4$1.StblTable)),_defineProperty$2(MP4$1,"STSC",MP4$1.box(MP4$1.types.stsc,MP4$1.StblTable)),_defineProperty$2(MP4$1,"STSZ",MP4$1.box(MP4$1.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),_defineProperty$2(MP4$1,"STCO",MP4$1.box(MP4$1.types.stco,MP4$1.StblTable));var Logger$1=function(){function e(t,r){_classCallCheck$4(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=r}return _createClass$4(e,[{key:"debug",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).debug.apply(r,_concatInstanceProperty(t=[this._prefix]).call(t,o))}}},{key:"log",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).log.apply(r,_concatInstanceProperty(t=[this._prefix]).call(t,o))}}},{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).warn.apply(r,_concatInstanceProperty(t=[this._prefix]).call(t,o))}}},{key:"error",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).error.apply(r,_concatInstanceProperty(t=[this._prefix]).call(t,o))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();_defineProperty$2(Logger$1,"disabled",!0);var FMP4Remuxer=function(){function e(t,r,n){_classCallCheck$4(this,e),this.videoTrack=t,this.audioTrack=r;var o=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=o&&Number(o[1])<50,this.log=new Logger$1("FMP4Remuxer",!n||!n.openLog||!n.openLog)}return _createClass$4(e,[{key:"remux",value:function(){var e,t,r,n,o,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,l=this.audioTrack,c=s.exist(),u=l.exist(),$=[];return i&&(a&&a.initMerge?(c&&$.push(this.videoTrack),u&&$.push(this.audioTrack),r=MP4$1.initSegment($)):(c&&(e=MP4$1.initSegment([this.videoTrack])),u&&(t=MP4$1.initSegment([this.audioTrack])))),c&&s.hasSample()&&(n=this._remuxVideo()),u&&l.hasSample()&&(o=this._remuxAudio()),s.samples=[],l.samples=[],{initSegment:r,videoInitSegment:e,audioInitSegment:t,videoSegment:n,audioSegment:o}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,r=0;_forEachInstanceProperty(t).call(t,(function(e){var t;r+=_reduceInstanceProperty(t=e.units).call(t,(function(e,t){return e+t.byteLength}),0),r+=4*e.units.length}));for(var n,o=new Uint8Array(r),i=new DataView(o.buffer),a=function(e,r,a,s){var l;s=t[e];var u=0;_forEachInstanceProperty(l=s.units).call(l,(function(e){i.setUint32(a,e.byteLength),a+=4,o.set(e,a),a+=e.byteLength,u+=4+e.byteLength})),s.size=u,c=a,n=s},s=0,l=t.length,c=0;s<l;s++)a(s,0,c,n);var u=MP4$1.mdat(o);return e.isVideoEncryption||e.isAudioEncryption?concatUint8Array$1(MP4$1.styp(),MP4$1.sidx(e),MP4$1.moof([e]),u):concatUint8Array$1(MP4$1.moof([e]),u)}},{key:"_remuxAudio",value:function(){var e,t,r=this.audioTrack,n=new Uint8Array(_reduceInstanceProperty(e=r.samples).call(e,(function(e,t){return e+t.size}),0));_reduceInstanceProperty(t=r.samples).call(t,(function(e,t){return n.set(t.data,e),e+t.size}),0);var o=MP4$1.mdat(n);return r.isVideoEncryption||r.isAudioEncryption?concatUint8Array$1(MP4$1.styp(),MP4$1.sidx(r),MP4$1.moof([r]),o):concatUint8Array$1(MP4$1.moof([r]),o)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}();function _getPrototypeOf$3(e){var t;return(_getPrototypeOf$3=_Object$setPrototypeOf$1?_bindInstanceProperty$1(t=_Object$getPrototypeOf$1).call(t):function(e){return e.__proto__||_Object$getPrototypeOf$1(e)})(e)}function _superPropBase$1(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$3(e)););return e}function _get$1(){var e;"undefined"!=typeof Reflect&&_Reflect$get$1?_get$1=_bindInstanceProperty$1(e=_Reflect$get$1).call(e):_get$1=function(e,t,r){var n=_superPropBase$1(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$1.apply(this,arguments)}function _setPrototypeOf$3(e,t){var r;return(_setPrototypeOf$3=_Object$setPrototypeOf$1?_bindInstanceProperty$1(r=_Object$setPrototypeOf$1).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits$3(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$3(e,t)}function _isNativeReflectConstruct$3(){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 _assertThisInitialized$3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$3(e,t){if(t&&("object"===_typeof$5(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(e)}function _createSuper$3(e){var t=_isNativeReflectConstruct$3();return function(){var r,n=_getPrototypeOf$3(e);if(t){var o=_getPrototypeOf$3(this).constructor;r=_Reflect$construct$1(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$3(this,r)}}var $$D=_export$2,toObject$6=toObject$F,lengthOfArrayLike$4=lengthOfArrayLike$J,setArrayLength=arraySetLength$1,doesNotExceedSafeInteger=doesNotExceedSafeInteger$6,fails$p=fails$20,INCORRECT_TO_LENGTH=fails$p((function(){return 4294967297!==[].push.call({length:4294967296},1)})),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},FORCED$d=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$D({target:"Array",proto:!0,arity:1,forced:FORCED$d},{push:function(e){var t=toObject$6(this),r=lengthOfArrayLike$4(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$o,push$d=entryVirtual$2("Array").push,isPrototypeOf$6=objectIsPrototypeOf$2,method$2=push$d,ArrayPrototype$2=Array.prototype,push$c=function(e){var t=e.push;return e===ArrayPrototype$2||isPrototypeOf$6(ArrayPrototype$2,e)&&t===ArrayPrototype$2.push?method$2:t},parent$n=push$c,push$b=parent$n,parent$m=push$b,push$a=parent$m,parent$l=push$a,push$9=parent$l,push$8=push$9,_pushInstanceProperty=getDefaultExportFromCjs(push$8);function _construct$1(e,t,r){var n;_isNativeReflectConstruct$3()?_construct$1=_bindInstanceProperty$1(n=_Reflect$construct$1).call(n):_construct$1=function(e,t,r){var n=[null];_pushInstanceProperty(n).apply(n,t);var o=new(_bindInstanceProperty$1(Function).apply(e,n));return r&&_setPrototypeOf$3(o,r.prototype),o};return _construct$1.apply(null,arguments)}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _toPrimitive(e,t){if("object"!==_typeof$5(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$5(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$5(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(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}for(var Base=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,[{key:"mixIn",value:function(e){return _Object$assign(this,e)}},{key:"clone",value:function(){var e=new this.constructor;return _Object$assign(e,this),e}}],[{key:"create",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return _construct$1(this,t)}}]),e}(),WordArray=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4*n.length;_classCallCheck$3(this,r),e=t.call(this);var i=n;if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),(i instanceof Int8Array||i instanceof Uint8ClampedArray||i instanceof Int16Array||i instanceof Uint16Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),i instanceof Uint8Array){for(var a=i.byteLength,s=[],l=0;l<a;l+=1)s[l>>>2]|=i[l]<<24-l%4*8;e.words=s,e.sigBytes=a}else e.words=n,e.sigBytes=o;return e}return _createClass$3(r,[{key:"toString",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hex).stringify(this)}},{key:"concat",value:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i+=1){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this}},{key:"clamp",value:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=Math.ceil(t/4)}},{key:"clone",value:function(){var e,t=_get$1(_getPrototypeOf$3(r.prototype),"clone",this).call(this);return t.words=_sliceInstanceProperty(e=this.words).call(e,0),t}}],[{key:"random",value:function(e){for(var t,n=[],o=function(e){var t=e,r=987654321,n=4294967295;return function(){var e=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return e/=4294967296,(e+=.5)*(Math.random()>.5?1:-1)}},i=0;i<e;i+=4){var a=o(4294967296*(t||Math.random()));t=987654071*a(),n.push(4294967296*a()|0)}return new r(n,e)}}]),r}(),Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=1){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=_parseInt$1(e.substr(n,2),16)<<24-n%8*4;return new WordArray(r,t/2)}},Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=1){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=1)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new WordArray(r,t)}},Utf8={stringify:function(e){try{return decodeURIComponent(escape(Latin1.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return Latin1.parse(unescape(encodeURIComponent(e)))}},BufferedBlockAlgorithm=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(){var e;return _classCallCheck$3(this,r),(e=t.call(this))._minBufferSize=0,e}return _createClass$3(r,[{key:"reset",value:function(){this._data=new WordArray,this._nDataBytes=0}},{key:"_append",value:function(e){var t,r=e;"string"==typeof r&&(r=Utf8.parse(r)),_concatInstanceProperty(t=this._data).call(t,r),this._nDataBytes+=r.sigBytes}},{key:"_process",value:function(e){var t,r=this._data,n=this.blockSize,o=r.words,i=r.sigBytes,a=i/(4*n),s=(a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0))*n,l=Math.min(4*s,i);if(s){for(var c=0;c<s;c+=n)this._doProcessBlock(o,c);t=_spliceInstanceProperty(o).call(o,0,s),r.sigBytes-=l}return new WordArray(t,l)}},{key:"clone",value:function(){var e=_get$1(_getPrototypeOf$3(r.prototype),"clone",this).call(this);return e._data=this._data.clone(),e}}]),r}(),Hasher=function(e){_inherits$3(r,BufferedBlockAlgorithm);var t=_createSuper$3(r);function r(e){var n;return _classCallCheck$3(this,r),(n=t.call(this)).blockSize=16,n.cfg=_Object$assign(new Base,e),n.reset(),n}return _createClass$3(r,[{key:"reset",value:function(){_get$1(_getPrototypeOf$3(r.prototype),"reset",this).call(this),this._doReset()}},{key:"update",value:function(e){return this._append(e),this._process(),this}},{key:"finalize",value:function(e){return e&&this._append(e),this._doFinalize()}}],[{key:"_createHelper",value:function(e){return function(t,r){return new e(r).finalize(t)}}},{key:"_createHmacHelper",value:function(e){return function(t,r){return new HMAC(e,r).finalize(t)}}}]),r}(),HMAC=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(e,n){var o;_classCallCheck$3(this,r),o=t.call(this);var i=new e;o._hasher=i;var a=n;"string"==typeof a&&(a=Utf8.parse(a));var s=i.blockSize,l=4*s;a.sigBytes>l&&(a=i.finalize(n)),a.clamp();var c=a.clone();o._oKey=c;var u=a.clone();o._iKey=u;for(var $=c.words,d=u.words,p=0;p<s;p+=1)$[p]^=1549556828,d[p]^=909522486;return c.sigBytes=l,u.sigBytes=l,o.reset(),o}return _createClass$3(r,[{key:"reset",value:function(){var e=this._hasher;e.reset(),e.update(this._iKey)}},{key:"update",value:function(e){return this._hasher.update(e),this}},{key:"finalize",value:function(e){var t,r=this._hasher,n=r.finalize(e);return r.reset(),r.finalize(_concatInstanceProperty(t=this._oKey.clone()).call(t,n))}}]),r}(),parseLoop=function(e,t,r){for(var n=[],o=0,i=0;i<t;i+=1)if(i%4){var a=r[e.charCodeAt(i-1)]<<i%4*2|r[e.charCodeAt(i)]>>>6-i%4*2;n[o>>>2]|=a<<24-o%4*8,o+=1}return WordArray.create(n,o)},Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s+=1)o.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){this._reverseMap=[],n=this._reverseMap;for(var o=0;o<r.length;o+=1)n[r.charCodeAt(o)]=o}var i=r.charAt(64);if(i){var a=_indexOfInstanceProperty(e).call(e,i);-1!==a&&(t=a)}return parseLoop(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},T=[],i$1=0;i$1<64;i$1+=1)T[i$1]=4294967296*Math.abs(Math.sin(i$1+1))|0;var FF$2=function(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+o+a;return(s<<i|s>>>32-i)+t},GG=function(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+o+a;return(s<<i|s>>>32-i)+t},HH=function(e,t,r,n,o,i,a){var s=e+(t^r^n)+o+a;return(s<<i|s>>>32-i)+t},II=function(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+o+a;return(s<<i|s>>>32-i)+t},MD5Algo=function(e){_inherits$3(r,Hasher);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,[{key:"_doReset",value:function(){this._hash=new WordArray([1732584193,4023233417,2562383102,271733878])}},{key:"_doProcessBlock",value:function(e,t){for(var r=e,n=0;n<16;n+=1){var o=t+n,i=e[o];r[o]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,s=r[t+0],l=r[t+1],c=r[t+2],u=r[t+3],$=r[t+4],d=r[t+5],p=r[t+6],y=r[t+7],f=r[t+8],h=r[t+9],m=r[t+10],b=r[t+11],g=r[t+12],S=r[t+13],I=r[t+14],v=r[t+15],_=a[0],P=a[1],E=a[2],R=a[3];_=FF$2(_,P,E,R,s,7,T[0]),R=FF$2(R,_,P,E,l,12,T[1]),E=FF$2(E,R,_,P,c,17,T[2]),P=FF$2(P,E,R,_,u,22,T[3]),_=FF$2(_,P,E,R,$,7,T[4]),R=FF$2(R,_,P,E,d,12,T[5]),E=FF$2(E,R,_,P,p,17,T[6]),P=FF$2(P,E,R,_,y,22,T[7]),_=FF$2(_,P,E,R,f,7,T[8]),R=FF$2(R,_,P,E,h,12,T[9]),E=FF$2(E,R,_,P,m,17,T[10]),P=FF$2(P,E,R,_,b,22,T[11]),_=FF$2(_,P,E,R,g,7,T[12]),R=FF$2(R,_,P,E,S,12,T[13]),E=FF$2(E,R,_,P,I,17,T[14]),P=FF$2(P,E,R,_,v,22,T[15]),_=GG(_,P,E,R,l,5,T[16]),R=GG(R,_,P,E,p,9,T[17]),E=GG(E,R,_,P,b,14,T[18]),P=GG(P,E,R,_,s,20,T[19]),_=GG(_,P,E,R,d,5,T[20]),R=GG(R,_,P,E,m,9,T[21]),E=GG(E,R,_,P,v,14,T[22]),P=GG(P,E,R,_,$,20,T[23]),_=GG(_,P,E,R,h,5,T[24]),R=GG(R,_,P,E,I,9,T[25]),E=GG(E,R,_,P,u,14,T[26]),P=GG(P,E,R,_,f,20,T[27]),_=GG(_,P,E,R,S,5,T[28]),R=GG(R,_,P,E,c,9,T[29]),E=GG(E,R,_,P,y,14,T[30]),P=GG(P,E,R,_,g,20,T[31]),_=HH(_,P,E,R,d,4,T[32]),R=HH(R,_,P,E,f,11,T[33]),E=HH(E,R,_,P,b,16,T[34]),P=HH(P,E,R,_,I,23,T[35]),_=HH(_,P,E,R,l,4,T[36]),R=HH(R,_,P,E,$,11,T[37]),E=HH(E,R,_,P,y,16,T[38]),P=HH(P,E,R,_,m,23,T[39]),_=HH(_,P,E,R,S,4,T[40]),R=HH(R,_,P,E,s,11,T[41]),E=HH(E,R,_,P,u,16,T[42]),P=HH(P,E,R,_,p,23,T[43]),_=HH(_,P,E,R,h,4,T[44]),R=HH(R,_,P,E,g,11,T[45]),E=HH(E,R,_,P,v,16,T[46]),P=HH(P,E,R,_,c,23,T[47]),_=II(_,P,E,R,s,6,T[48]),R=II(R,_,P,E,y,10,T[49]),E=II(E,R,_,P,I,15,T[50]),P=II(P,E,R,_,d,21,T[51]),_=II(_,P,E,R,g,6,T[52]),R=II(R,_,P,E,u,10,T[53]),E=II(E,R,_,P,m,15,T[54]),P=II(P,E,R,_,l,21,T[55]),_=II(_,P,E,R,f,6,T[56]),R=II(R,_,P,E,v,10,T[57]),E=II(E,R,_,P,p,15,T[58]),P=II(P,E,R,_,S,21,T[59]),_=II(_,P,E,R,$,6,T[60]),R=II(R,_,P,E,b,10,T[61]),E=II(E,R,_,P,c,15,T[62]),P=II(P,E,R,_,h,21,T[63]),a[0]=a[0]+_|0,a[1]=a[1]+P|0,a[2]=a[2]+E|0,a[3]=a[3]+R|0}},{key:"_doFinalize",value:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32;var o=Math.floor(r/4294967296),i=r;t[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,s=a.words,l=0;l<4;l+=1){var c=s[l];s[l]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return a}},{key:"clone",value:function(){var e=_get$1(_getPrototypeOf$3(r.prototype),"clone",this).call(this);return e._hash=this._hash.clone(),e}}]),r}();Hasher._createHelper(MD5Algo),Hasher._createHmacHelper(MD5Algo);var EvpKDFAlgo=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(e){var n;return _classCallCheck$3(this,r),(n=t.call(this)).cfg=_Object$assign(new Base,{keySize:4,hasher:MD5Algo,iterations:1},e),n}return _createClass$3(r,[{key:"compute",value:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),i=WordArray.create(),a=i.words,s=n.keySize,l=n.iterations;a.length<s;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var c=1;c<l;c+=1)r=o.finalize(r),o.reset();_concatInstanceProperty(i).call(i,r)}return i.sigBytes=4*s,i}}]),r}(),Cipher=function(e){_inherits$3(r,BufferedBlockAlgorithm);var t=_createSuper$3(r);function r(e,n,o){var i;return _classCallCheck$3(this,r),(i=t.call(this)).cfg=_Object$assign(new Base,o),i._xformMode=e,i._key=n,i.reset(),i}return _createClass$3(r,[{key:"reset",value:function(){_get$1(_getPrototypeOf$3(r.prototype),"reset",this).call(this),this._doReset()}},{key:"process",value:function(e){return this._append(e),this._process()}},{key:"finalize",value:function(e){return e&&this._append(e),this._doFinalize()}}],[{key:"createEncryptor",value:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)}},{key:"createDecryptor",value:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)}},{key:"_createHelper",value:function(e){var t=function(e){return"string"==typeof e?PasswordBasedCipher:SerializableCipher};return{encrypt:function(r,n,o){return t(n).encrypt(e,r,n,o)},decrypt:function(r,n,o){return t(n).decrypt(e,r,n,o)}}}}]),r}();Cipher._ENC_XFORM_MODE=1,Cipher._DEC_XFORM_MODE=2,Cipher.keySize=4,Cipher.ivSize=4;var BlockCipherMode=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(e,n){var o;return _classCallCheck$3(this,r),(o=t.call(this))._cipher=e,o._iv=n,o}return _createClass$3(r,null,[{key:"createEncryptor",value:function(e,t){return this.Encryptor.create(e,t)}},{key:"createDecryptor",value:function(e,t){return this.Decryptor.create(e,t)}}]),r}();function xorBlock(e,t,r){var n,o=e,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var a=0;a<r;a+=1)o[t+a]^=n[a]}var CBC=function(e){_inherits$3(r,BlockCipherMode);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r)}();CBC.Encryptor=function(e){_inherits$3(r,CBC);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,[{key:"processBlock",value:function(e,t){var r=this._cipher,n=r.blockSize;xorBlock.call(this,e,t,n),r.encryptBlock(e,t),this._prevBlock=_sliceInstanceProperty(e).call(e,t,t+n)}}]),r}(),CBC.Decryptor=function(e){_inherits$3(r,CBC);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,[{key:"processBlock",value:function(e,t){var r=this._cipher,n=r.blockSize,o=_sliceInstanceProperty(e).call(e,t,t+n);r.decryptBlock(e,t),xorBlock.call(this,e,t,n),this._prevBlock=o}}]),r}();var Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,o=n<<24|n<<16|n<<8|n,i=[],a=0;a<n;a+=4)i.push(o);var s=WordArray.create(i,n);_concatInstanceProperty(e).call(e,s)},unpad:function(e){var t=e,r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},BlockCipher=function(e){_inherits$3(r,Cipher);var t=_createSuper$3(r);function r(e,n,o){var i;return _classCallCheck$3(this,r),(i=t.call(this,e,n,_Object$assign({mode:CBC,padding:Pkcs7},o))).blockSize=4,i}return _createClass$3(r,[{key:"reset",value:function(){var e;_get$1(_getPrototypeOf$3(r.prototype),"reset",this).call(this);var t=this.cfg,n=t.iv,o=t.mode;this._xformMode===this.constructor._ENC_XFORM_MODE?e=o.createEncryptor:(e=o.createDecryptor,this._minBufferSize=1),this._mode=e.call(o,this,n&&n.words),this._mode.__creator=e}},{key:"_doProcessBlock",value:function(e,t){this._mode.processBlock(e,t)}},{key:"_doFinalize",value:function(){var e,t=this.cfg.padding;return this._xformMode===this.constructor._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e}}]),r}(),CipherParams=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(e){var n;return _classCallCheck$3(this,r),(n=t.call(this)).mixIn(e),n}return _createClass$3(r,[{key:"toString",value:function(e){return(e||this.formatter).stringify(this)}}]),r}(),OpenSSLFormatter={stringify:function(e){var t,r,n,o=e.ciphertext,i=e.salt;i?t=_concatInstanceProperty(r=_concatInstanceProperty(n=WordArray.create([1398893684,1701076831])).call(n,i)).call(r,o):t=o;return t.toString(Base64)},parse:function(e){var t,r=Base64.parse(e),n=r.words;return 1398893684===n[0]&&1701076831===n[1]&&(t=WordArray.create(_sliceInstanceProperty(n).call(n,2,4)),_spliceInstanceProperty(n).call(n,0,4),r.sigBytes-=16),CipherParams.create({ciphertext:r,salt:t})}},SerializableCipher=function(e){_inherits$3(r,Base);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,null,[{key:"encrypt",value:function(e,t,r,n){var o=_Object$assign(new Base,this.cfg,n),i=e.createEncryptor(r,o),a=i.finalize(t),s=i.cfg;return CipherParams.create({ciphertext:a,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:i.blockSize,formatter:o.format})}},{key:"decrypt",value:function(e,t,r,n){var o=t,i=_Object$assign(new Base,this.cfg,n);return o=this._parse(o,i.format),e.createDecryptor(r,i).finalize(o.ciphertext)}},{key:"_parse",value:function(e,t){return"string"==typeof e?t.parse(e,this):e}}]),r}();SerializableCipher.cfg=_Object$assign(new Base,{format:OpenSSLFormatter});var OpenSSLKdf={execute:function(e,t,r,n){var o,i=n;i||(i=WordArray.random(8));var a=EvpKDFAlgo.create({keySize:t+r}).compute(e,i),s=WordArray.create(_sliceInstanceProperty(o=a.words).call(o,t),4*r);return a.sigBytes=4*t,CipherParams.create({key:a,iv:s,salt:i})}},PasswordBasedCipher=function(e){_inherits$3(r,SerializableCipher);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,null,[{key:"encrypt",value:function(e,t,r,n){var o=_Object$assign(new Base,this.cfg,n),i=o.kdf.execute(r,e.keySize,e.ivSize);o.iv=i.iv;var a=SerializableCipher.encrypt.call(this,e,t,i.key,o);return a.mixIn(i),a}},{key:"decrypt",value:function(e,t,r,n){var o=t,i=_Object$assign(new Base,this.cfg,n);o=this._parse(o,i.format);var a=i.kdf.execute(r,e.keySize,e.ivSize,o.salt);return i.iv=a.iv,SerializableCipher.decrypt.call(this,e,o,a.key,i)}}]),r}();PasswordBasedCipher.cfg=_Object$assign(SerializableCipher.cfg,{kdf:OpenSSLKdf});for(var _SBOX=[],INV_SBOX=[],_SUB_MIX_0=[],_SUB_MIX_1=[],_SUB_MIX_2=[],_SUB_MIX_3=[],INV_SUB_MIX_0=[],INV_SUB_MIX_1=[],INV_SUB_MIX_2=[],INV_SUB_MIX_3=[],d$2=[],i=0;i<256;i+=1)d$2[i]=i<128?i<<1:i<<1^283;for(var x=0,xi=0,_i=0;_i<256;_i+=1){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,_SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d$2[x],x4=d$2[x2],x8=d$2[x4],t=257*d$2[sx]^16843008*sx;_SUB_MIX_0[x]=t<<24|t>>>8,_SUB_MIX_1[x]=t<<16|t>>>16,_SUB_MIX_2[x]=t<<8|t>>>24,_SUB_MIX_3[x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,INV_SUB_MIX_0[sx]=t<<24|t>>>8,INV_SUB_MIX_1[sx]=t<<16|t>>>16,INV_SUB_MIX_2[sx]=t<<8|t>>>24,INV_SUB_MIX_3[sx]=t,x?(x=x2^d$2[d$2[d$2[x8^x2]]],xi^=d$2[d$2[xi]]):x=xi=1}var RCON=[0,1,2,4,8,16,32,64,128,27,54],AESAlgo=function(e){_inherits$3(r,BlockCipher);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,[{key:"_doReset",value:function(){var e;if(!this._nRounds||this._keyPriorReset!==this._key){this._keyPriorReset=this._key;var t=this._keyPriorReset,r=t.words,n=t.sigBytes/4;this._nRounds=n+6;var o=4*(this._nRounds+1);this._keySchedule=[];for(var i=this._keySchedule,a=0;a<o;a+=1)a<n?i[a]=r[a]:(e=i[a-1],a%n?n>6&&a%n==4&&(e=_SBOX[e>>>24]<<24|_SBOX[e>>>16&255]<<16|_SBOX[e>>>8&255]<<8|_SBOX[255&e]):(e=_SBOX[(e=e<<8|e>>>24)>>>24]<<24|_SBOX[e>>>16&255]<<16|_SBOX[e>>>8&255]<<8|_SBOX[255&e],e^=RCON[a/n|0]<<24),i[a]=i[a-n]^e);this._invKeySchedule=[];for(var s=this._invKeySchedule,l=0;l<o;l+=1){var c=o-l;e=l%4?i[c]:i[c-4],s[l]=l<4||c<=4?e:INV_SUB_MIX_0[_SBOX[e>>>24]]^INV_SUB_MIX_1[_SBOX[e>>>16&255]]^INV_SUB_MIX_2[_SBOX[e>>>8&255]]^INV_SUB_MIX_3[_SBOX[255&e]]}}}},{key:"encryptBlock",value:function(e,t){this._doCryptBlock(e,t,this._keySchedule,_SUB_MIX_0,_SUB_MIX_1,_SUB_MIX_2,_SUB_MIX_3,_SBOX)}},{key:"decryptBlock",value:function(e,t){var r=e,n=r[t+1];r[t+1]=r[t+3],r[t+3]=n,this._doCryptBlock(r,t,this._invKeySchedule,INV_SUB_MIX_0,INV_SUB_MIX_1,INV_SUB_MIX_2,INV_SUB_MIX_3,INV_SBOX),n=r[t+1],r[t+1]=r[t+3],r[t+3]=n}},{key:"_doCryptBlock",value:function(e,t,r,n,o,i,a,s){for(var l=e,c=this._nRounds,u=l[t]^r[0],$=l[t+1]^r[1],d=l[t+2]^r[2],p=l[t+3]^r[3],y=4,f=1;f<c;f+=1){var h=n[u>>>24]^o[$>>>16&255]^i[d>>>8&255]^a[255&p]^r[y];y+=1;var m=n[$>>>24]^o[d>>>16&255]^i[p>>>8&255]^a[255&u]^r[y];y+=1;var b=n[d>>>24]^o[p>>>16&255]^i[u>>>8&255]^a[255&$]^r[y];y+=1;var g=n[p>>>24]^o[u>>>16&255]^i[$>>>8&255]^a[255&d]^r[y];y+=1,u=h,$=m,d=b,p=g}var S=(s[u>>>24]<<24|s[$>>>16&255]<<16|s[d>>>8&255]<<8|s[255&p])^r[y];y+=1;var I=(s[$>>>24]<<24|s[d>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^r[y];y+=1;var T=(s[d>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&$])^r[y];y+=1;var v=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[$>>>8&255]<<8|s[255&d])^r[y];y+=1,l[t]=S,l[t+1]=I,l[t+2]=T,l[t+3]=v}}]),r}();AESAlgo.keySize=8;var AES=BlockCipher._createHelper(AESAlgo),CTR=function(e){_inherits$3(r,BlockCipherMode);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r)}();CTR.Encryptor=function(e){_inherits$3(r,CTR);var t=_createSuper$3(r);function r(){return _classCallCheck$3(this,r),t.apply(this,arguments)}return _createClass$3(r,[{key:"processBlock",value:function(e,t){var r=e,n=this._cipher,o=n.blockSize,i=this._iv,a=this._counter;i&&(this._counter=_sliceInstanceProperty(i).call(i,0),a=this._counter,this._iv=void 0);var s=_sliceInstanceProperty(a).call(a,0);n.encryptBlock(s,0),a[o-1]=a[o-1]+1|0;for(var l=0;l<o;l+=1)r[t+l]^=s[l]}}]),r}(),CTR.Decryptor=CTR.Encryptor;var NoPadding={pad:function(){},unpad:function(){}},Crypto={decryptWordArray:function(e,t,r){var n=Hex.parse(t),o=Hex.parse(formatIV(r)),i=WordArray.create(new Uint8Array(e)),a=AES.decrypt(CipherParams.create({ciphertext:i}),n,{iv:o,mode:CTR,padding:NoPadding});return Crypto.wordArrayToUint8Array(a)},wordArrayToUint8Array:function(e){for(var t=e.sigBytes,r=e.words,n=new Uint8Array(t),o=0,i=0;o!==t;){var a=r[i++];if(n[o++]=(4278190080&a)>>>24,o===t)break;if(n[o++]=(16711680&a)>>>16,o===t)break;if(n[o++]=(65280&a)>>>8,o===t)break;n[o++]=255&a}return n}},NEW_ARRAY_MAX_CNT=20,MP4Demuxer=function(){function e(t,r,n,o){var i=this;_classCallCheck$4(this,e),_defineProperty$2(this,"_videoSamples",[]),_defineProperty$2(this,"_audioSamples",[]),_defineProperty$2(this,"_lastRemainBuffer",[]),_defineProperty$2(this,"_lastRemainBufferStartPos",0),this.videoTrack=new VideoTrack,this.audioTrack=new AudioTrack,this.metadataTrack=n||new MetadataTrack,this.log=new Logger$1("MP4Demuxer",!o||!o.openLog||!o.openLog),t&&_forEachInstanceProperty(t).call(t,(function(e){var t;(t=i._videoSamples).push.apply(t,_toConsumableArray$2(e.frames))})),r&&_forEachInstanceProperty(r).call(r,(function(e){var t;(t=i._audioSamples).push.apply(t,_toConsumableArray$2(e.frames))}))}return _createClass$4(e,[{key:"parseSamples",value:function(e){if(!e)throw new Error("moov is required");if(this.videoTrack.codec||this.audioTrack.codec||(MP4Parser.moovToTrack(e,this.videoTrack,this.audioTrack),this.videoSenc=this.videoTrack.videoSenc,this.audioSenc=this.audioTrack.audioSenc),!this._audioSamples.length&&!this._videoSamples.length){var t=MP4Parser.moovToSamples(e);if(!t)throw new Error("cannot parse samples from moov box");this._videoSamples=t.videoSamples||[],this._audioSamples=t.audioSamples||[]}}},{key:"demux",value:function(e,t,r,n,o){this.parseSamples(o);var i,a,s,l=this.videoTrack,c=this.audioTrack;if(l.samples=[],c.samples=[],r){for(var u,$=0,d=r[0],p=r[1];d<=p;d++){if(!(i=this._videoSamples[d]))throw new Error("cannot found video frame #".concat(d));s=i.offset-t,a=e.subarray(s,s+i.size),(u=new VideoSample(i.pts||i.dts,i.dts)).duration=i.duration,u.gopId=i.gopId,i.keyframe&&u.setToKeyframe();for(var y=0,f=a.length-1;y<f;)$=readBig32(a,y),y+=4,u.units.push(a.subarray(y,y+$)),y+=$;l.samples.push(u)}l.baseMediaDecodeTime=l.samples[0].dts}if(n){for(var h=n[0],m=n[1];h<=m;h++){if(!(i=this._audioSamples[h]))throw new Error("cannot found video frame #".concat(h));s=i.offset-t,a=e.subarray(s,s+i.size),c.samples.push(new AudioSample(i.dts,a,i.duration))}c.baseMediaDecodeTime=c.samples[0].dts}return{videoTrack:l,audioTrack:c,metadataTrack:this.metadataTrack}}},{key:"demuxPart",value:function(e,t,r,n,o,i,a){if(this.parseSamples(o),this.videoTrack.useEME=i,this.audioTrack.useEME=i,this._lastRemainBuffer&&this._lastRemainBuffer.byteLength>0&&t>this._lastRemainBufferStartPos&&t<=this._lastRemainBufferStartPos+this._lastRemainBuffer.byteLength)for(var s=0;s<NEW_ARRAY_MAX_CNT;)try{var l=this._lastRemainBuffer.subarray(0,t-this._lastRemainBufferStartPos),c=new Uint8Array(e.byteLength+l.byteLength);c.set(l,0),c.set(new Uint8Array(e),l.byteLength),e=c,t-=l.byteLength,this._lastRemainBuffer=null,this._lastRemainBufferStartPos=0;break}catch(e){if(!(s<NEW_ARRAY_MAX_CNT))throw new Error("new Uint8Array error:,"+e.errorMessage);s++}var u,$,d,p=this.videoTrack,y=this.audioTrack;p.samples=[],y.samples=[],p.videoSenc=null,y.audioSenc=null;var f=0,h=0;if(this._videoSamples.length>0&&r.length>0){for(var m,b,g=e.byteLength+t,S=r[0];S<=r[1];S++){if(!(u=this._videoSamples[S]))throw new Error("cannot found video frame #".concat(S));u.offset>=t&&u.offset+u.size<=g&&(f=(d=u.offset-t)+u.size,$=e.subarray(d,f),(m=new VideoSample(u.pts||u.dts,u.dts)).duration=u.duration,m.gopId=u.gopId,m.sampleOffset=u.index,u.keyframe&&m.setToKeyframe(),m.data=$,m.size=u.size,p.samples.push(m))}if(p.samples.length>0)if(p.gopId=p.samples[0].gopId,p.baseMediaDecodeTime=p.samples[0].dts,p.startPts=p.samples[0].pts/p.timescale,p.endPts=p.samples[p.samples.length-1].pts/p.timescale,this.videoSenc)p.videoSenc=_sliceInstanceProperty(b=this.videoSenc).call(b,p.samples[0].sampleOffset,p.samples[0].sampleOffset+p.samples.length),p.kidValue=a}if(this._audioSamples.length>0&&n.length>0){for(var I=n[0];I<=n[1];I++){if(!(u=this._audioSamples[I]))throw new Error("cannot found video frame #".concat(I));u.offset>=t&&u.offset+u.size<=e.byteLength+t&&(h=(d=u.offset-t)+u.size,$=e.subarray(d,h),y.samples.push(new AudioSample(u.dts,$,u.duration,u.index)))}var T;if(y.samples.length>0)if(y.gopId=y.samples[0].gopId||p.gopId,y.baseMediaDecodeTime=y.samples[0].dts,y.startPts=y.samples[0].pts/y.timescale,y.endPts=y.samples[y.samples.length-1].pts/y.timescale,this.audioSenc)y.audioSenc=_sliceInstanceProperty(T=this.audioSenc).call(T,y.samples[0].sampleOffset,y.samples[0].sampleOffset+y.samples.length),y.kidValue=a}this.decoderData(p,y);for(var v=0,_=0;_<p.samples.length;_++)for(var P=0,E=p.samples[_].data,R=E.length-1;P<R;)v=readBig32(E,P),P+=4,p.samples[_].units.push(E.subarray(P,P+v)),P+=v;return this._lastRemainBuffer=e.subarray(Math.max(f,h)),this._lastRemainBuffer.byteLength>0?this._lastRemainBufferStartPos=t+e.byteLength-this._lastRemainBuffer.byteLength:this._lastRemainBufferStartPos=0,{videoTrack:p,audioTrack:y,metadataTrack:this.metadataTrack}}},{key:"reset",value:function(){this._videoSamples=[],this._audioSamples=[],this._lastRemainBuffer=null,this._lastRemainBufferStartPos=0,this.videoTrack.reset(),this.audioTrack.reset(),this.metadataTrack.reset()}},{key:"decoderData",value:function(e,t){if(!e.useEME&&!t.useEME){if(e.videoSenc&&1===e.id){var r,n=e.kidValue,o=e.videoSenc;_forEachInstanceProperty(r=e.samples).call(r,(function(t,r){var i=o[r],a=t.data,s=[],l=[],c=i.InitializationVector;if(i.subsamples&&i.subsamples.length){var u;_forEachInstanceProperty(u=i.subsamples).call(u,(function(e){var t=e.BytesOfClearData+e.BytesOfProtectedData,r=_sliceInstanceProperty(a).call(a,0,t);s.push(_sliceInstanceProperty(r).call(r,0,e.BytesOfClearData)),l.push(_sliceInstanceProperty(r).call(r,e.BytesOfClearData)),a=_sliceInstanceProperty(a).call(a,t)}))}else{var $=t.size;s.push(_sliceInstanceProperty(a).call(a,0,0)),l.push(_sliceInstanceProperty(a).call(a,0,$)),a=_sliceInstanceProperty(a).call(a,$)}var d=new Buffer;d.write.apply(d,l);var p=Crypto.decryptWordArray(d.buffer,n,c),y=new Buffer;_forEachInstanceProperty(s).call(s,(function(e,t){var r=l[t].length,n=_sliceInstanceProperty(p).call(p,0,r);y.write(e),y.write(n),p=_sliceInstanceProperty(p).call(p,r)})),e.samples[r].data=y.buffer}))}if(t.audioSenc&&2===t.id){var i,a=t.kidValue,s=t.audioSenc;_forEachInstanceProperty(i=t.samples).call(i,(function(e,r){var n=s[r],o=Crypto.decryptWordArray(e.data,a,n.InitializationVector);t.samples[r].data=o}))}}}}],[{key:"probe",value:function(e){return MP4Parser.probe(e)}}]),e}(),version="3.0.0-alpha.36-3",ERROR_CODES={416:-499899,401:-499898,403:-499897,404:-499896,timeout:-499895,"4xx":-499894,"5xx":-499893,networkError:-499892,contentError:-499891,mse:-499971,mseOpen:-499972,mseAppend:-499973,boxsError:-499980,moovError:-499981,notH264:-499982,mdatError:-499983,mdhdError:-499984,metaError:-499985,muxError:-499986,h265Error:-499987,noneURL:-499988,other:-499989,other1:-499990,waitTimeout:-499791,onWaitInBufferRange:-499792},ERROR_TYPES={network:1003,format:1005,runtime:1002,other:9999,demux:1006,remux:1007};function getErrorCodeByHttpCode(e){var t=0;switch(e){case 0:t=0;break;case-1:t=ERROR_CODES.networkError;break;case-2:t=ERROR_CODES.timeout;break;case-3:t=ERROR_CODES.contentError;break;default:t=e<500?ERROR_CODES[e]||e["4xx"]:ERROR_CODES[e]||e["5xx"]}return t}var NetWorkError=_createClass$8((function e(t,r,n){_classCallCheck$8(this,e);var o=0,i=0;n&&n.range&&n.range.length>1&&(o=n.range[0],i=n.range[1]);var a=getErrorCodeByHttpCode(r);return{errorCode:a,errorType:t,errorTypeCode:ERROR_TYPES[t],errorMessage:(null==n?void 0:n.httpText)||(null==n?void 0:n.message),url:null==n?void 0:n.url,httpCode:r,version:version,rangeStart:o,rangeEnd:i,ext:n,mediaError:{code:a,message:(null==n?void 0:n.httpText)||(null==n?void 0:n.message)}}})),ParserError=_createClass$8((function e(t,r,n){return _classCallCheck$8(this,e),{errorCode:r,errorType:t,errorTypeCode:ERROR_TYPES[t],version:version,errorMessage:n.msg,ext:n,mediaError:{code:r,message:n.msg}}})),uncurryThis$i=functionUncurryThisClause$1,defineBuiltIn$4=defineBuiltIn$x,regexpExec$2=regexpExec$3,fails$o=fails$1C,wellKnownSymbol$7=wellKnownSymbol$R,createNonEnumerableProperty$1=createNonEnumerableProperty$j,SPECIES$2=wellKnownSymbol$7("species"),RegExpPrototype$2=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol$7(e),i=!fails$o((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!fails$o((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[SPECIES$2]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=uncurryThis$i(/./[o]),l=t(o,""[e],(function(e,t,r,n,o){var a=uncurryThis$i(e),l=t.exec;return l===regexpExec$2||l===RegExpPrototype$2.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));defineBuiltIn$4(String.prototype,e,l[0]),defineBuiltIn$4(RegExpPrototype$2,o,l[1])}n&&createNonEnumerableProperty$1(RegExpPrototype$2[o],"sham",!0)},charAt$4=stringMultibyte$1.charAt,advanceStringIndex$3=function(e,t,r){return t+(r?charAt$4(e,t).length:1)},uncurryThis$h=functionUncurryThis$1,toObject$5=toObject$u,floor$3=Math.floor,charAt$3=uncurryThis$h("".charAt),replace$1=uncurryThis$h("".replace),stringSlice$6=uncurryThis$h("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,l=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==o&&(o=toObject$5(o),l=SUBSTITUTION_SYMBOLS),replace$1(i,l,(function(i,l){var c;switch(charAt$3(l,0)){case"$":return"$";case"&":return e;case"`":return stringSlice$6(t,0,r);case"'":return stringSlice$6(t,a);case"<":c=o[stringSlice$6(l,1,-1)];break;default:var u=+l;if(0===u)return i;if(u>s){var $=floor$3(u/10);return 0===$?i:$<=s?void 0===n[$-1]?charAt$3(l,1):n[$-1]+charAt$3(l,1):i}c=n[u-1]}return void 0===c?"":c}))},call$6=functionCall$1,anObject$6=anObject$E,isCallable$3=isCallable$Z,classof$3=classofRaw$5,regexpExec$1=regexpExec$3,$TypeError=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$3(r)){var n=call$6(r,e,t);return null!==n&&anObject$6(n),n}if("RegExp"===classof$3(e))return call$6(regexpExec$1,e,t);throw $TypeError("RegExp#exec called on incompatible receiver")},apply$3=functionApply$1,call$5=functionCall$1,uncurryThis$g=functionUncurryThis$1,fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic,fails$n=fails$1C,anObject$5=anObject$E,isCallable$2=isCallable$Z,isNullOrUndefined$4=isNullOrUndefined$i,toIntegerOrInfinity$3=toIntegerOrInfinity$n,toLength$3=toLength$k,toString$d=toString$A,requireObjectCoercible$4=requireObjectCoercible$l,advanceStringIndex$2=advanceStringIndex$3,getMethod$2=getMethod$a,getSubstitution=getSubstitution$1,regExpExec$1=regexpExecAbstract,wellKnownSymbol$6=wellKnownSymbol$R,REPLACE=wellKnownSymbol$6("replace"),max$1=Math.max,min$3=Math.min,concat3=uncurryThis$g([].concat),push$7=uncurryThis$g([].push),stringIndexOf=uncurryThis$g("".indexOf),stringSlice$5=uncurryThis$g("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$n((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));fixRegExpWellKnownSymbolLogic$2("replace",(function(e,t,r){var n=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,r){var n=requireObjectCoercible$4(this),o=isNullOrUndefined$4(e)?void 0:getMethod$2(e,REPLACE);return o?call$5(o,e,n,r):call$5(t,toString$d(n),e,r)},function(e,o){var i=anObject$5(this),a=toString$d(e);if("string"==typeof o&&-1===stringIndexOf(o,n)&&-1===stringIndexOf(o,"$<")){var s=r(t,i,a,o);if(s.done)return s.value}var l=isCallable$2(o);l||(o=toString$d(o));var c=i.global;if(c){var u=i.unicode;i.lastIndex=0}for(var $=[];;){var d=regExpExec$1(i,a);if(null===d)break;if(push$7($,d),!c)break;""===toString$d(d[0])&&(i.lastIndex=advanceStringIndex$2(a,toLength$3(i.lastIndex),u))}for(var p="",y=0,f=0;f<$.length;f++){for(var h=toString$d((d=$[f])[0]),m=max$1(min$3(toIntegerOrInfinity$3(d.index),a.length),0),b=[],g=1;g<d.length;g++)push$7(b,maybeToString(d[g]));var S=d.groups;if(l){var I=concat3([h],b,m,a);void 0!==S&&push$7(I,S);var T=toString$d(apply$3(o,void 0,I))}else T=getSubstitution(h,a,m,b,S,o);m>=y&&(p+=stringSlice$5(a,y,m)+T,y=m+h.length)}return p+stringSlice$5(a,y)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var $$C=_export$1,isArray$1=isArray$9;$$C({target:"Array",stat:!0},{isArray:isArray$1});var call$4=functionCall$1,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$4=anObject$E,isNullOrUndefined$3=isNullOrUndefined$i,toLength$2=toLength$k,toString$c=toString$A,requireObjectCoercible$3=requireObjectCoercible$l,getMethod$1=getMethod$a,advanceStringIndex$1=advanceStringIndex$3,regExpExec=regexpExecAbstract;fixRegExpWellKnownSymbolLogic$1("match",(function(e,t,r){return[function(t){var r=requireObjectCoercible$3(this),n=isNullOrUndefined$3(t)?void 0:getMethod$1(t,e);return n?call$4(n,t,r):new RegExp(t)[e](toString$c(r))},function(e){var n=anObject$4(this),o=toString$c(e),i=r(t,n,o);if(i.done)return i.value;if(!n.global)return regExpExec(n,o);var a=n.unicode;n.lastIndex=0;for(var s,l=[],c=0;null!==(s=regExpExec(n,o));){var u=toString$c(s[0]);l[c]=u,""===u&&(n.lastIndex=advanceStringIndex$1(o,toLength$2(n.lastIndex),a)),c++}return 0===c?null:l}]}));var util={};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$1(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 d?t:d,a=_Object$create(i.prototype),s=new _(o||[]);return n(a,"_invoke",{value:S(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 $={};function d(){}function p(){}function y(){}var f={};l(f,i,(function(){return this}));var h=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(P([])));h&&h!==t&&r.call(h,i)&&(f=h);var m=y.prototype=d.prototype=_Object$create(f);function b(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,$=c.value;return $&&"object"==_typeof$5($)&&r.call($,"__await")?t.resolve($.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve($).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 S(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=I(a,r);if(s){if(s===$)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===$)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function I(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method))return $;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return $}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,$;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,$):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,$)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,T,this),this.reset(!0)}function P(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:E}}function E(){return{value:void 0,done:!0}}return p.prototype=y,n(m,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:p,configurable:!0}),p.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"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(m),e},e.awrap=function(e){return{__await:e}},b(g.prototype),l(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise);var a=new g(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(m),l(m,s,"Generator"),l(m,i,(function(){return this})),l(m,"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=P,_.prototype={constructor:_,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,_forEachInstanceProperty(t=this.tryEntries).call(t,v),!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,$):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),$},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),v(r),$}},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;v(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),$}},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,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$1(e,t,r){return t in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}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(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}function _getPrototypeOf$2(e){var t;return(_getPrototypeOf$2=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$2(e,t){var r;return(_setPrototypeOf$2=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$2(){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 _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};var r,n,o={},i=_Object$keys(e);for(n=0;n<i.length;n++)r=i[n],_indexOfInstanceProperty(t).call(t,r)>=0||(o[r]=e[r]);return o}function _objectWithoutProperties$1(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose$1(e,t);if(_Object$getOwnPropertySymbols){var i=_Object$getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],_indexOfInstanceProperty(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$2(e,t){if(t&&("object"===_typeof$5(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(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$2(this,r)}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$2(e,t)||_nonIterableRest()}function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$2(e)||_nonIterableSpread$1()}function _arrayWithoutHoles$1(e){if(_Array$isArray(e))return _arrayLikeToArray$2(e)}function _arrayWithHoles(e){if(_Array$isArray(e))return e}function _iterableToArray$1(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}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 _nonIterableSpread$1(){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 _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 ownKeys4(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=ownKeys4(Object(o),!0)).call(r,(function(t){_defineProperty(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys4(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 d?t:d,a=_Object$create(i.prototype),s=new _(o||[]);return n(a,"_invoke",{value:S(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 $={};function d(){}function p(){}function y(){}var f={};l(f,i,(function(){return this}));var h=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(P([])));h&&h!==t&&r.call(h,i)&&(f=h);var m=y.prototype=d.prototype=_Object$create(f);function b(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function o(n,i,a,s){var l=u(e[n],e,i);if("throw"!==l.type){var c=l.arg,$=c.value;return $&&"object"==_typeof$5($)&&r.call($,"__await")?t.resolve($.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve($).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 S(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=I(a,r);if(s){if(s===$)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===$)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function I(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method))return $;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return $}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,$;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,$):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,$)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,T,this),this.reset(!0)}function P(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:E}}function E(){return{value:void 0,done:!0}}return p.prototype=y,n(m,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:p,configurable:!0}),p.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"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(m),e},e.awrap=function(e){return{__await:e}},b(g.prototype),l(g.prototype,a,(function(){return this})),e.AsyncIterator=g,e.async=function(t,r,n,o,i){void 0===i&&(i=_Promise);var a=new g(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(m),l(m,s,"Generator"),l(m,i,(function(){return this})),l(m,"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=P,_.prototype={constructor:_,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,_forEachInstanceProperty(t=this.tryEntries).call(t,v),!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,$):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),$},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),v(r),$}},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;v(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),$}},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$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,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(e,t,r){return 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 _construct(e,t,r){var n;_isNativeReflectConstruct$1()?_construct=_bindInstanceProperty(n=_Reflect$construct).call(n):_construct=function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(_bindInstanceProperty(Function).apply(e,n));return r&&_setPrototypeOf$1(o,r.prototype),o};return _construct.apply(null,arguments)}function _isNativeFunction(e){var t;return-1!==_indexOfInstanceProperty(t=Function.toString.call(e)).call(t,"[native code]")}function _wrapNativeSuper(e){var t="function"==typeof _Map?new _Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_getPrototypeOf$1(this).constructor)}return r.prototype=_Object$create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$1(r,e)},_wrapNativeSuper(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},i=_Object$keys(e);for(n=0;n<i.length;n++)r=i[n],_indexOfInstanceProperty(t).call(t,r)>=0||(o[r]=e[r]);return o}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(_Object$getOwnPropertySymbols){var i=_Object$getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],_indexOfInstanceProperty(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}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$5(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(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$1(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 _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 _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(!r){if(_Array$isArray(e)||(r=_unsupportedIterableToArray$1(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}}}}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}function nowTime(){try{return _parseInt$1(performance.now(),10)}catch(e){return(new Date).getTime()}}util.findBox=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.type!==t){if(e&&e.subBox){var o,i,a=_filterInstanceProperty(o=e.subBox).call(o,(function(e){return e.type===t}));if(a.length)_forEachInstanceProperty(a).call(a,(function(e){return n.push(e)}));else _forEachInstanceProperty(i=e.subBox).call(i,(function(e){return util.findBox(e,t,n)}))}}else n.push(e);return(n=_concatInstanceProperty(r=[]).call(r,n)).length>1?n:n[0]},util.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.toHex=function(){for(var e=[],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _forEachInstanceProperty(r).call(r,(function(t){e.push(_padStartInstanceProperty(util).call(util,Number(t).toString(16),2,0))})),e},util.sum=function(){for(var e=0,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _forEachInstanceProperty(r).call(r,(function(t){e+=t})),e},util.StringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return t},util.fromHex=function(e){for(var t=new Uint8Array(e.length/2),r=0;r<e.length;r+=2)t[r/2]=_parseInt$1(e.substr(r,2),16);return t},util.fromCharCode=function(e){for(var t="",r=0;r<e.length;r+=16e3){var n=e.subarray(r,r+16e3);t+=String.fromCharCode.apply(null,n)}return t},util.ArrayBufferToString=function(e){for(var t="",r=new Uint8Array(e),n=0;n<r.length;n++)t+=String.fromCharCode(r[n]);return t},util.Base64ToHex=function(e){for(var t=window.atob(e.replace(/-/g,"+").replace(/_/g,"/")),r="",n=0;n<t.length;n++)r+=("0"+t.charCodeAt(n).toString(16)).substr(-2);return r},util.toBase64=function(e,t){var r=util.fromCharCode(e);t=void 0===t||t;var n=window.btoa(r).replace(/\+/g,"-").replace(/\//g,"_");return t?n:n.replace(/=*$/,"")},util.toUTF8=function(e){for(var t=encodeURIComponent(e),r=unescape(t),n=new Uint8Array(r.length),o=0;o<r.length;++o)n[o]=r.charCodeAt(o);return n.buffer},util.bufferToString=function(e){var t;return _sliceInstanceProperty(t="0"+Number(e).toString(16)).call(t,-2).toUpperCase()},util.strToBuf=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(_parseInt$1(e[r]+e[r+1],16));return new Uint8Array(t)},util.formatIV=function(e){var t="";if(_forEachInstanceProperty(e).call(e,(function(e){t+=util.bufferToString(e)})),t.length<=32)for(var r=32-t.length,n=0;n<r;n++)t+="0";return t},util.str2hex=function(e){if(""===e)return"";for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t},util.parse=function(e){if(!_Array$isArray(e)){for(var t=[],r="",n=0;n<e.length;n++)n%2&&(r=e[n-1]+e[n],t.push(_parseInt$1(r,16)),r="");return t}return _mapInstanceProperty(e).call(e,(function(e){return _parseInt$1(e,16)}))},util.generateUniqueKey=function(e){var t,r,n=e.vid;e.start,e.end;var o=e.mediaType,i=e.definition;return e.preloadTime,o=o||"video",i=i||"0",n?_concatInstanceProperty(t=_concatInstanceProperty(r="".concat(n,"#")).call(r,o,"#")).call(t,i,"#mp4"):null},util.validateFragment=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e instanceof ArrayBuffer){try{if(2===t.length){var r=t[1]-t[0]+1;if(!(e.byteLength===r))return}}catch(e){return console.error(e),!1}return!0}return!1},util.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util.getBufferSplits=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e5;if(t-e-r<r/2||!t)return[[e,t]];for(var n=[];e<t;){var o=e+r;(o>t||t-o<r/2)&&(o=t),n.push([e,o]),e=o+1}return n},util.nowTime=function(){try{return _parseInt$1(performance.now(),10)}catch(e){return(new Date).getTime()}},util.extUrl=function(e,t){try{var r,n,o=_indexOfInstanceProperty(e).call(e,"?");if(o<0)_mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r,n){var o,i;0===n?e+=_concatInstanceProperty(o="?".concat(r,"=")).call(o,t[r]):e+=_concatInstanceProperty(i="&".concat(r,"=")).call(i,t[r])}));else _mapInstanceProperty(n=_Object$keys(t)).call(n,(function(r,n){var i,a;o===e.length-1?e+=_concatInstanceProperty(i="".concat(r,"=")).call(i,t[r]):e+=_concatInstanceProperty(a="&".concat(r,"=")).call(a,t[r])}));return e}catch(t){return e}},util.getFileSize=function(e,t){try{return e&&t?_parseInt$1(t*e/8,10):0}catch(e){return 0}},util.hashVal=function(e){var t,r=0;if(0===e.length)return r;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r},util.getFileSize=function(e,t){try{return e&&t?_parseInt$1(t*e/8,10):0}catch(e){return 0}},util.concatData=function(e,t){var r=[],n=0;e&&r.push(e),t&&r.push(t),_everyInstanceProperty(r).call(r,(function(e){return e&&(n+=e.byteLength),!0}));var o=new Uint8Array(n),i=0;return _everyInstanceProperty(r).call(r,(function(e){return e&&(o.set(e,i),i+=e.byteLength),!0})),o},util.getFragRange=function(e,t,r){var n=e<t.length?t[e]:null,o=e<r.length?r[e]:null,i=0,a=0;return e===t.length-1&&(i=-1),e===r.length-1&&(a=-1),[Math.min((null==n?void 0:n.range[0])||1/0,(null==o?void 0:o.range[0])||1/0),Math.max((null==n?void 0:n.range[1])+i||0,(null==o?void 0:o.range[1])+a||0)]};var Logger=function(){function e(t){_classCallCheck$1(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return _createClass$1(e,[{key:"debug",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).debug.apply(r,_concatInstanceProperty(t=[this._prefix,nowTime()]).call(t,o))}}},{key:"log",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).log.apply(r,_concatInstanceProperty(t=[this._prefix,nowTime()]).call(t,o))}}},{key:"warn",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).warn.apply(r,_concatInstanceProperty(t=[this._prefix,nowTime()]).call(t,o))}}},{key:"error",value:function(){var t,r;if(!e.disabled){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];(r=console).error.apply(r,_concatInstanceProperty(t=[this._prefix,nowTime()]).call(t,o))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();_defineProperty(Logger,"disabled",!0);var LoaderType={FETCH:"fetch",XHR:"xhr"},ResponseType={ARRAY_BUFFER:"arraybuffer",TEXT:"text",JSON:"json"},NetError=function(e){_inherits$1(r,_wrapNativeSuper(Error));var t=_createSuper$1(r);function r(e,n,o,i){var a;return _classCallCheck$1(this,r),_defineProperty(_assertThisInitialized$1(a=t.call(this,i)),"retryCount",0),_defineProperty(_assertThisInitialized$1(a),"isTimeout",!1),_defineProperty(_assertThisInitialized$1(a),"loaderType",LoaderType.FETCH),_defineProperty(_assertThisInitialized$1(a),"startTime",0),_defineProperty(_assertThisInitialized$1(a),"endTime",0),a.url=e,a.request=n,a.response=o,a}return _createClass$1(r)}(),$$B=_export$1;$$B({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var $$A=_export$1,fails$m=fails$1C,toObject$4=toObject$u,nativeGetPrototypeOf=objectGetPrototypeOf$1,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter$1,FAILS_ON_PRIMITIVES$3=fails$m((function(){nativeGetPrototypeOf(1)}));$$A({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$3,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$4(e))}});var toString$b=Object.prototype.toString;function isObject$8(e){return null!==e&&"object"===_typeof$2(e)}function isPlainObject(e){if("[object Object]"!==toString$b.call(e))return!1;var t=_Object$getPrototypeOf(e);return null===t||t===Object.prototype}function isDate(e){return"[object Date]"===toString$b.call(e)}function getRangeValue(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function setUrlParams(e,t){var r,n;if(e){if(!t)return e;var o,i=_filterInstanceProperty(r=_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(e){if(null!=(o=t[e]))return _Array$isArray(o)?e+="[]":o=[o],_mapInstanceProperty(o).call(o,(function(t){var r;return isDate(t)?t=t.toISOString():isObject$8(t)&&(t=_JSON$stringify(t)),_concatInstanceProperty(r="".concat(encode(e),"=")).call(r,encode(t))})).join("&")}))).call(r,Boolean).join("&");if(i){var a=_indexOfInstanceProperty(e).call(e,"#");-1!==a&&(e=_sliceInstanceProperty(e).call(e,0,a)),e+=(-1===_indexOfInstanceProperty(e).call(e,"?")?"?":"&")+i}return e}}function createResponse(e,t,r,n,o,i,a,s,l,c,u){return o=null!=o?_parseFloat$1(o):null,n=_parseInt$1(n||"0",10),_Number$isNaN(n)&&(n=0),{data:e,done:t,option:{range:l,vid:c,index:s,contentLength:n,age:o,startTime:i,firstByteTime:a,endTime:_Date$now(),priOptions:u},response:r}}function calculateSpeed(e,t){return Math.round(8*e*1e3/t/1024)}var EVENT={ERROR:"error",TTFB:"core.ttfb",LOAD_START:"core.loadstart",LOAD_RESPONSE_HEADERS:"core.loadresponseheaders",LOAD_COMPLETE:"core.loadcomplete",LOAD_RETRY:"core.loadretry",SOURCEBUFFER_CREATED:"core.sourcebuffercreated",ANALYZE_DURATION_EXCEEDED:"core.analyzedurationexceeded",REMOVE_BUFFER:"core.removebuffer",BUFFEREOS:"core.buffereos",KEYFRAME:"core.keyframe",METADATA_PARSED:"core.metadataparsed",SEI:"core.sei",SEI_IN_TIME:"core.seiintime",FLV_SCRIPT_DATA:"core.flvscriptdata",LOWDECODE:"core.lowdecode",SWITCH_URL_SUCCESS:"core.switchurlsuccess",SWITCH_URL_FAILED:"core.switchurlfailed",SPEED:"core.speed",HLS_MANIFEST_LOADED:"core.hlsmanifestloaded",HLS_LEVEL_LOADED:"core.hlslevelloaded",STREAM_EXCEPTION:"core.streamexception",LARGE_AV_FIRST_FRAME_GAP_DETECT:"LARGE_AV_FIRST_FRAME_GAP_DETECT",LARGE_VIDEO_DTS_GAP_DETECT:"LARGE_VIDEO_DTS_GAP_DETECT",LARGE_AUDIO_DTS_GAP_DETECT:"LARGE_AUDIO_DTS_GAP_DETECT",AUDIO_GAP_DETECT:"AUDIO_GAP_DETECT",AUDIO_OVERLAP_DETECT:"AUDIO_OVERLAP_DETECT",MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:"MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",REAL_TIME_SPEED:"real_time_speed"},CACHESIZE=2097152,FetchLoader=function(e){_inherits$1(n,EventEmitter$1);var t,r=_createSuper$1(n);function n(){var e;return _classCallCheck$1(this,n),_defineProperty(_assertThisInitialized$1(e=r.call(this)),"_abortController",null),_defineProperty(_assertThisInitialized$1(e),"_timeoutTimer",null),_defineProperty(_assertThisInitialized$1(e),"_reader",null),_defineProperty(_assertThisInitialized$1(e),"_response",null),_defineProperty(_assertThisInitialized$1(e),"_aborted",!1),_defineProperty(_assertThisInitialized$1(e),"_index",-1),_defineProperty(_assertThisInitialized$1(e),"_range",null),_defineProperty(_assertThisInitialized$1(e),"_receivedLength",0),_defineProperty(_assertThisInitialized$1(e),"_running",!1),_defineProperty(_assertThisInitialized$1(e),"_logger",null),_defineProperty(_assertThisInitialized$1(e),"_vid",""),_defineProperty(_assertThisInitialized$1(e),"_onProcessMinLen",0),_defineProperty(_assertThisInitialized$1(e),"_onCancel",null),_defineProperty(_assertThisInitialized$1(e),"_priOptions",null),e}return _createClass$1(n,[{key:"load",value:function(e){var t,r=this,n=e.url,o=e.vid,i=e.timeout,a=e.responseType,s=e.onProgress,l=e.index,c=e.onTimeout,u=e.onCancel,$=e.range,d=e.transformResponse,p=e.request,y=e.params,f=e.logger,h=e.method,m=e.headers,b=e.body,g=e.mode,S=e.credentials,I=e.cache,T=e.redirect,v=e.referrer,_=e.referrerPolicy,P=e.onProcessMinLen,E=e.priOptions;this._logger=f,this._aborted=!1,this._onProcessMinLen=P,this._onCancel=u,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=l,this._range=$||[0,0],this._vid=o||n,this._priOptions=E||{};var R={method:h,headers:m,body:b,mode:g,credentials:S,cache:I,redirect:T,referrer:v,referrerPolicy:_,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},O=!1;clearTimeout(this._timeoutTimer),n=setUrlParams(n,y);var C=getRangeValue($);C&&((m=p?p.headers:R.headers=R.headers||new Headers)instanceof Headers?m.append("Range",C):m.Range=C),i&&(this._timeoutTimer=_setTimeout((function(){if(O=!0,r.cancel(),c){var e=new NetError(n,R,null,"timeout");e.isTimeout=!0,c(e,r._index)}}),i));var w=_Date$now();return this._logger.debug("[fetch load start], index,",l,",range,",$),new _Promise((function(e,t){fetch(p||n,p?void 0:R).then(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark((function o(i){var c,u,p,y;return _regeneratorRuntime().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=i,!r._aborted&&r._running){o.next=4;break}return o.abrupt("return");case 4:if(d&&(i=d(i,n)||i),i.ok){o.next=7;break}throw new NetError(n,R,i,"bad network response");case 7:if(c=_Date$now(),a!==ResponseType.TEXT){o.next=15;break}return o.next=11,i.text();case 11:u=o.sent,r._running=!1,o.next=37;break;case 15:if(a!==ResponseType.JSON){o.next=22;break}return o.next=18,i.json();case 18:u=o.sent,r._running=!1,o.next=37;break;case 22:if(!s){o.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(i,s,w,c),o.abrupt("return");case 29:return o.next=31,i.arrayBuffer();case 31:u=o.sent,u=new Uint8Array(u),r._running=!1,p=_Date$now()-w,y=calculateSpeed(u.byteLength,p),r.emit(EVENT.REAL_TIME_SPEED,{speed:y});case 37:r._logger.debug("[fetch load end], index,",l,",range,",$),e(createResponse(u,!0,i,i.headers.get("Content-Length"),i.headers.get("age"),w,c,l,$,r._vid,r._priOptions));case 39:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}()).catch((function(e){clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!O||((e=e instanceof NetError?e:new NetError(n,R,null,_JSON$stringify(e))).startTime=w,e.endTime=_Date$now(),e.isTimeout=O,t(e))}))}))}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel(this._index);case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var o=this;if(!e.body||!e.body.getReader)return this._running=!1,void this.reject(NetError(e.url,"",e,"onProgress of bad response.body.getReader"));this._onProcessMinLen>0&&(this._cache=new Uint8Array(CACHESIZE),this._writeIdx=0);var i,a,s,l=this._reader=e.body.getReader(),c=function(){var u=_asyncToGenerator(_regeneratorRuntime().mark((function u(){var $,d,p,y,f,h;return _regeneratorRuntime().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return a=_Date$now(),u.prev=1,u.next=4,l.read();case 4:i=u.sent,s=_Date$now(),u.next=13;break;case 8:return u.prev=8,u.t0=u.catch(1),s=_Date$now(),o._aborted||(o._running=!1,o.reject(u.t0)),u.abrupt("return");case 13:if($=o._range[0]+o._receivedLength,!o._aborted){u.next=18;break}return o._running=!1,t(void 0,!1,{range:[$,$],vid:o._vid,index:o._index,startTime:a,endTime:s,priOptions:o._priOptions},e),u.abrupt("return");case 18:var m;if(d=i.value?i.value.byteLength:0,o._receivedLength+=d,o._logger.debug("【fetchLoader,onProgress call】,task,",o._range,", start,",$,", end,",o._range[0]+o._receivedLength,", done,",i.done),o._onProcessMinLen>0){if(o._writeIdx+d>=o._onProcessMinLen||i.done)(p=new Uint8Array(o._writeIdx+d)).set(_sliceInstanceProperty(m=o._cache).call(m,0,o._writeIdx),0),d>0&&p.set(i.value,o._writeIdx),o._writeIdx=0,o._logger.debug("【fetchLoader,onProgress enough】,done,",i.done,",len,",p.byteLength,", writeIdx,",o._writeIdx);else if(d>0&&o._writeIdx+d<CACHESIZE)o._cache.set(i.value,o._writeIdx),o._writeIdx+=d,o._logger.debug("【fetchLoader,onProgress cache】,len,",d,", writeIdx,",o._writeIdx);else if(d>0){var b;y=new Uint8Array(o._writeIdx+d+2048),o._logger.debug("【fetchLoader,onProgress extra start】,size,",o._writeIdx+d+2048,", datalen,",d,", writeIdx,",o._writeIdx),y.set(_sliceInstanceProperty(b=o._cache).call(b,0,o._writeIdx),0),d>0&&y.set(i.value,o._writeIdx),o._writeIdx+=d,delete o._cache,o._cache=y,o._logger.debug("【fetchLoader,onProgress extra end】,len,",d,", writeIdx,",o._writeIdx)}}else p=i.value;(p&&p.byteLength>0||i.done)&&t(p,i.done,{range:[o._range[0]+o._receivedLength-(p?p.byteLength:0),o._range[0]+o._receivedLength],vid:o._vid,index:o._index,startTime:a,endTime:s,priOptions:o._priOptions},e),f=_Date$now()-r,h=calculateSpeed(o._receivedLength,f),o.emit(EVENT.REAL_TIME_SPEED,{speed:h}),i.done?(o._running=!1,o._logger.debug("[fetchLoader onProgress end],task,",o._range,",done,",i.done),o.resolve(createResponse(i,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),a,n,o._index,o._range,o._vid,o._priOptions))):c();case 27:case"end":return u.stop()}}),u,null,[[1,8]])})));return function(){return u.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}();function getConfig$1(e){return _objectSpread2({loaderType:LoaderType.FETCH,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:ResponseType.TEXT,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}var PROPER_FUNCTION_NAME$1=functionName$1.PROPER,fails$l=fails$1C,whitespaces$3=whitespaces$a,non="
",stringTrimForced=function(e){return fails$l((function(){return!!whitespaces$3[e]()||non[e]()!==non||PROPER_FUNCTION_NAME$1&&whitespaces$3[e].name!==e}))},$$z=_export$1,$trim=stringTrim$1.trim,forcedStringTrimMethod=stringTrimForced;$$z({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var XhrLoader=function(e){_inherits$1(r,EventEmitter$1);var t=_createSuper$1(r);function r(){var e;return _classCallCheck$1(this,r),_defineProperty(_assertThisInitialized$1(e=t.call(this)),"_xhr",null),_defineProperty(_assertThisInitialized$1(e),"_aborted",!1),_defineProperty(_assertThisInitialized$1(e),"_timeoutTimer",null),_defineProperty(_assertThisInitialized$1(e),"_range",null),_defineProperty(_assertThisInitialized$1(e),"_receivedLength",0),_defineProperty(_assertThisInitialized$1(e),"_url",null),_defineProperty(_assertThisInitialized$1(e),"_onProgress",null),_defineProperty(_assertThisInitialized$1(e),"_index",-1),_defineProperty(_assertThisInitialized$1(e),"_headers",null),_defineProperty(_assertThisInitialized$1(e),"_currentChunkSizeKB",384),_defineProperty(_assertThisInitialized$1(e),"_timeout",null),_defineProperty(_assertThisInitialized$1(e),"_xhr",null),_defineProperty(_assertThisInitialized$1(e),"_withCredentials",null),_defineProperty(_assertThisInitialized$1(e),"_startTime",-1),_defineProperty(_assertThisInitialized$1(e),"_loadCompleteResolve",null),_defineProperty(_assertThisInitialized$1(e),"_loadCompleteReject",null),_defineProperty(_assertThisInitialized$1(e),"_runing",!1),_defineProperty(_assertThisInitialized$1(e),"_logger",!1),_defineProperty(_assertThisInitialized$1(e),"_vid",""),_defineProperty(_assertThisInitialized$1(e),"_responseType",void 0),_defineProperty(_assertThisInitialized$1(e),"_credentials",void 0),_defineProperty(_assertThisInitialized$1(e),"_method",void 0),_defineProperty(_assertThisInitialized$1(e),"_transformResponse",void 0),_defineProperty(_assertThisInitialized$1(e),"_firstRtt",void 0),_defineProperty(_assertThisInitialized$1(e),"_subRangeStartTime",void 0),_defineProperty(_assertThisInitialized$1(e),"_onCancel",null),_defineProperty(_assertThisInitialized$1(e),"_priOptions",null),e}return _createClass$1(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range||[0,0],this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._credentials=e.credentials,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=setUrlParams(e.url,e.params);var r=_Date$now();return new _Promise((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof NetError?e:new NetError(t._url,t._request)).startTime=r,e.endTime=_Date$now(),e}))}},{key:"_startLoad",value:function(){var e=null;if(this._range&&this._range.length>1)if(this._onProgress){this._subRangeStartTime=_Date$now(),this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_Date$now();var o=this._xhr=new XMLHttpRequest;o.open(this._method||"GET",this._url,!0),o.responseType=this._responseType,this._timeout&&(o.timeout=this._timeout),o.withCredentials=this._credentials,o.onload=_bindInstanceProperty(r=this._onLoad).call(r,this),o.onreadystatechange=_bindInstanceProperty(n=this._onReadyStatechange).call(n,this),o.onerror=function(e){t._running=!1;var r=new NetError(t._url,t._request,{status:0},"onerror");t._loadCompleteReject(r)},o.ontimeout=function(e){t.cancel();var r=new NetError(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,t._index)),t._loadCompleteReject(r)};var i,a=getRangeValue(e),s=null;if(a&&((s=this._headers||{}).Range=a),s)_forEachInstanceProperty(i=_Object$keys(s)).call(i,(function(e){o.setRequestHeader(e,s[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),o.send()}catch(e){this._loadCompleteReject(e)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_Date$now())}},{key:"_onLoad",value:function(e){var t=e.target.status;if(t<200||t>299)return this._loadCompleteReject(new NetError(this._url,null,_objectSpread2(_objectSpread2({},e.target.response),{},{status:t}),"bad response,status:"+t));var r,n=null,o=!1;if(this._responseType===ResponseType.ARRAY_BUFFER){var i=new Uint8Array(e.target.response);if(r=this._range[0]+this._receivedLength,i&&i.byteLength>0){this._receivedLength+=i.byteLength;var a=_Date$now()-this._subRangeStartTime,s=calculateSpeed(this._receivedLength,a);this.emit(EVENT.REAL_TIME_SPEED,{speed:s})}n=i,o=!(this._range.length>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",r,"end ",this._range[0]+this._receivedLength,",dataLen,",i?i.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",o)}else o=!0,n=e.target.response;var l={ok:t>=200&&t<300,status:t,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(l=this._transformResponse(l,this._url)||l),this._onProgress&&this._onProgress(n,o,{index:this._index,vid:this._vid,range:[r,this._range[0]+this._receivedLength],startTime:this._startTime,endTime:_Date$now(),priOptions:this._priOptions},l),o?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(createResponse(this._onProgress?null:n,o,l,l.headers["content-length"],l.headers.age,this._startTime,-1,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,_get(_getPrototypeOf$1(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel(this._index),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},o=_createForOfIteratorHelper(_trimInstanceProperty(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split(": ");n[i[0].toLowerCase()]=_sliceInstanceProperty(i).call(i,1).join(": ")}}catch(e){o.e(e)}finally{o.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(),_excluded$1=["retry","retryDelay","onRetryError","transformError"],Task=function(){function e(t,r){_classCallCheck$1(this,e),this.promise=createPublicPromise(),this.alive=!!r.onProgress,!r.logger&&(r.logger=new Logger("Loader")),this._loaderType=t,this._loader=t===LoaderType.FETCH?new FetchLoader:new XhrLoader,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._logger=r.logger}var t;return _createClass$1(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,o=t.onRetryError,i=t.transformError,a=_objectWithoutProperties(t,_excluded$1),s=function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(){var l,c;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:l=t.sent,e.promise.resolve(l),t.next=28;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(!(t.t0.response&&t.t0.response.status>=400&&t.t0.response.status<=599)){t.next=16;break}return e.promise.reject(t.t0),t.abrupt("return");case 16:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,c=t.t0,i&&(c=i(c)||c),o&&e._retryCount>0&&o(c,e._retryCount,r),e._retryCount++,!(e._retryCount<=r)){t.next=27;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=_setTimeout(s,n),t.abrupt("return");case 27:e.promise.reject(c);case 28:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function concatUint8Array(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if((t=_filterInstanceProperty(t).call(t,Boolean)).length<2)return t[0];var n=new Uint8Array(_reduceInstanceProperty(t).call(t,(function(e,t){return e+t.byteLength}),0)),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set(e,o),o+=e.byteLength})),n}function sleep(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new _Promise((function(t){return _setTimeout(t,e)}))}var NetLoader=function(e){_inherits$1(n,EventEmitter$1);var t,r=_createSuper$1(n);function n(e){var t;return _classCallCheck$1(this,n),_defineProperty(_assertThisInitialized$1(t=r.call(this,e)),"type",LoaderType.FETCH),_defineProperty(_assertThisInitialized$1(t),"_queue",[]),_defineProperty(_assertThisInitialized$1(t),"_alive",[]),_defineProperty(_assertThisInitialized$1(t),"_currentTask",null),_defineProperty(_assertThisInitialized$1(t),"_config",void 0),t._config=getConfig$1(e),t._config.loaderType!==LoaderType.XHR&&FetchLoader.isSupported()||(t.type=LoaderType.XHR),t.log=e.logger,t}return _createClass$1(n,[{key:"isFetch",value:function(){return this.type===LoaderType.FETCH}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=_Object$assign({},this._config,r)).params&&(r.params=_Object$assign({},r.params)),r.headers&&isPlainObject(r.headers)&&(r.headers=_Object$assign({},r.headers)),r.body&&isPlainObject(r.body)&&(r.body=_Object$assign({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new Task(this.type,r);return n.loader.on(EVENT.REAL_TIME_SPEED,(function(e){t.emit(EVENT.REAL_TIME_SPEED,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(var r,n,o;;)switch(e.prev=e.next){case 0:return t=_concatInstanceProperty(r=_mapInstanceProperty(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,_mapInstanceProperty(o=this._alive).call(o,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,_Promise.all(t);case 6:return e.next=8,sleep();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;this._currentTask=this._queue.shift(),this._currentTask&&(this._currentTask.alive&&this._alive.push(this._currentTask),this._currentTask.exec().catch((function(e){})).finally((function(){e._processTask()})))}}],[{key:"isFetchSupport",value:function(){return FetchLoader.isSupported()}}]),n}();function getConfig(e){return _objectSpread2$1({vid:"",moovEnd:8e4,segmentDuration:2,maxDownloadInfoSize:30,responseType:"arraybuffer",cache:null},e)}var MediaError=_createClass$2((function e(t,r){_classCallCheck$2(this,e),this.type="file",this.message=t,this.data=r})),Cache=function(){function e(){_classCallCheck$2(this,e),_defineProperty$1(this,"_data",_Object$create(null))}return _createClass$2(e,[{key:"set",value:function(e,t){this._data[e]=t}},{key:"get",value:function(e){return this._data[e]}},{key:"clear",value:function(){this._data=_Object$create(null)}}]),e}();function moovToSegments(e,t){var r=e.trak;if(r&&r.length){var n=_findInstanceProperty(r).call(r,(function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),o=_findInstanceProperty(r).call(r,(function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}));if(n||o){var i,a=[],s=[];if(n){var l,c,u,$=null===(l=n.mdia)||void 0===l||null===(c=l.minf)||void 0===c?void 0:c.stbl;if(!$)return;var d=null===(u=n.mdia.mdhd)||void 0===u?void 0:u.timescale,p=$.stts,y=$.stsc,f=$.stsz,h=$.stco,m=$.stss,b=$.ctts;if(!(d&&p&&y&&f&&h&&m))return;a=getSegments(t,d,p,y,f,h,m,b),i=_mapInstanceProperty(a).call(a,(function(e){return e.duration}))}if(o){var g,S,I,T=null===(g=o.mdia)||void 0===g||null===(S=g.minf)||void 0===S?void 0:S.stbl;if(!T)return;var v=null===(I=o.mdia.mdhd)||void 0===I?void 0:I.timescale,_=T.stts,P=T.stsc,E=T.stsz,R=T.stco;if(!(v&&_&&P&&E&&R))return;s=getSegments(t,v,_,P,E,R,null,null,i)}return{videoSegments:a,audioSegments:s}}}}function getSegments(e,t,r,n,o,i,a,s,l){var c,u,$,d,p,y=[],f=[],h=[],m=_entriesInstanceProperty(n),b=_entriesInstanceProperty(i),g=o.entrySizes,S=null==a?void 0:_entriesInstanceProperty(a),I=null==s?void 0:_entriesInstanceProperty(s);I&&(u=[],_forEachInstanceProperty(I).call(I,(function(e){for(var t=e.count,r=e.offset,n=0;n<t;n++)u.push(r)}))),S&&($={},_forEachInstanceProperty(S).call(S,(function(e){$[e-1]=!0})));var T=0,v=0,_=0,P=0,E=0,R=m[0].samplesPerChunk,O=m[1]?m[1].firstChunk-1:1/0,C=0,w=-1;_forEachInstanceProperty(c=_entriesInstanceProperty(r)).call(c,(function(e){var t=e.count,r=e.delta;p=r;for(var n=0;n<t;n++)d={dts:C,startTime:T,duration:p,size:g[v]||o.sampleSize,offset:b[_]+E,index:v},S&&(d.keyframe=$[v],d.keyframe?(w++,f.push([d]),h.push(d.duration)):(f[f.length-1].push(d),h[f.length-1]+=d.duration),d.gopId=w),u&&v<u.length&&(d.pts=C+u[v]),0===v&&(d.pts=0),y.push(d),T+=p,C+=r,++v<R?E+=d.size:(_++,E=0,_>=O&&(P++,O=m[P+1]?m[P+1].firstChunk-1:1/0),R+=m[P].samplesPerChunk)}));var A=y.length;if(A&&(!a||y[0].keyframe)){var L,x=[],Z=[],N=0,M=function(e){var r;L=Z[Z.length-1],x.push({index:x.length,startTime:(null===(r=x[x.length-1])||void 0===r?void 0:r.endTime)||Z[0].startTime/t,endTime:(L.startTime+L.duration)/t,duration:e,range:[Z[0].offset,L.offset+L.size],frames:Z}),N=0,Z=[]};if(a)for(var G=e*t,k=0,V=f.length;k<V;k++){var X;N+=h[k],(X=Z).push.apply(X,_toConsumableArray$1(f[k])),k+1<V?(0===k||N>G)&&M(N/t):M(N/t)}else for(var D=(l=l||[])[0]||e,W=0;W<A;W++)Z.push(y[W]),N+=y[W].duration,(W+1>=A||N/t>=D)&&(M(N/t),D=l[x.length]||e);return x}}function moovToMeta(e){var t="",r="",n=0,o=0,i=0,a=0,s=0,l=0,c=0;e.mvhd&&(s=e.mvhd.duration/e.mvhd.timescale);var u=e.trak;if(u){var $,d,p,y,f,h,m,b,g,S,I,T,v,_,P,E,R,O=_findInstanceProperty(u).call(u,(function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),C=_findInstanceProperty(u).call(u,(function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),w=null;if(O)if(w=null===(d=O.mdia)||void 0===d||null===(p=d.minf)||void 0===p||null===(y=p.stbl)||void 0===y?void 0:_entriesInstanceProperty(y.stsd)[0])if(n=w.width,o=w.height,l=null===(f=O.mdia)||void 0===f||null===(h=f.mdhd)||void 0===h?void 0:h.timescale,t=null===(m=w.avcC||w.hvcC)||void 0===m?void 0:m.codec,"encv"===w.type)$=null===(b=w.sinf)||void 0===b||null===(g=b.schi)||void 0===g?void 0:g.tenc.default_KID;if(C)if(w=null===(S=C.mdia)||void 0===S||null===(I=S.minf)||void 0===I||null===(T=I.stbl)||void 0===T?void 0:_entriesInstanceProperty(T.stsd)[0])if(i=w.channelCount,a=w.sampleRate,r=null===(v=w.esds)||void 0===v?void 0:v.codec,c=null===(_=C.mdia)||void 0===_||null===(P=_.mdhd)||void 0===P?void 0:P.timescale,"enca"===w.type)$=$||(null===(E=w.sinf)||void 0===E||null===(R=E.schi)||void 0===R?void 0:R.tenc.default_KID);return{kid:$?$.join(""):null,videoCodec:t,audioCodec:r,width:n,height:o,videoTimescale:l,audioChannelCount:i,audioSampleRate:a,duration:s,audioTimescale:c,moov:e}}}function isNumber(e){return"number"==typeof e&&!_Number$isNaN(e)}var _excluded=["vid","cache"],MP4Loader=function(e){_inherits$2(p,EventEmitter$1);var t,r,n,o,i,a,s,l,c,u,$,d=_createSuper$2(p);function p(e){var t;_classCallCheck$2(this,p),_defineProperty$1(_assertThisInitialized$2(t=d.call(this)),"vid",""),_defineProperty$1(_assertThisInitialized$2(t),"url",""),_defineProperty$1(_assertThisInitialized$2(t),"meta",{}),_defineProperty$1(_assertThisInitialized$2(t),"downloadInfo",[]),_defineProperty$1(_assertThisInitialized$2(t),"videoSegments",[]),_defineProperty$1(_assertThisInitialized$2(t),"audioSegments",[]),_defineProperty$1(_assertThisInitialized$2(t),"cache",null),_defineProperty$1(_assertThisInitialized$2(t),"_currentSegmentIndex",-1),_defineProperty$1(_assertThisInitialized$2(t),"_currentLoadingSegmentIndex",-1),_defineProperty$1(_assertThisInitialized$2(t),"buffer",void 0),_defineProperty$1(_assertThisInitialized$2(t),"_error",void 0),_defineProperty$1(_assertThisInitialized$2(t),"_transformError",(function(e){return e})),t._config=getConfig(e);var r=t._config,n=r.vid,o=r.cache,i=_objectWithoutProperties$1(r,_excluded);return t.cache=o||new Cache,t.vid=n||i.url,t.url=i.url,i.transformError=t._transformError,t.logger=new Logger("MP4Loader_"+t.vid),e.openLog&&Logger.enable(),i.logger=t.logger,t._loader=new NetLoader(i),t._loader.on(EVENT.REAL_TIME_SPEED,(function(e){t.emit(EVENT.REAL_TIME_SPEED,e)})),t}return _createClass$2(p,[{key:"isMetaLoaded",get:function(){return this.videoSegments.length||this.audioSegments.length}},{key:"setCurrentSegment",value:function(e){isNumber(e)&&(this._currentSegmentIndex=e)}},{key:"isLastSegment",value:function(e){var t,r;return!!isNumber(e)&&e===((null===(t=this.videoSegments[this.videoSegments.length-1])||void 0===t?void 0:t.index)||(null===(r=this.audioSegments[this.audioSegments.length-1])||void 0===r?void 0:r.index)||0)}},{key:"isSegmentLoading",value:function(e){return e===this._currentLoadingSegmentIndex}},{key:"changeUrl",value:($=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,i=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:t,n=i.length>2?i[2]:void 0,o=i.length>3?i[3]:void 0,e.next=5,this.reset(o);case 5:t&&(this.url=t),r&&(this.vid=r),n&&(this._config.moovEnd=n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return $.apply(this,arguments)})},{key:"getOrLoadMeta",value:(u=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMetaLoaded){e.next=3;break}return e.next=3,this.loadMeta(t);case 3:return e.abrupt("return",this.meta);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"loadMetaProcess",value:(c=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n,o){var i,a,s,l,c=this;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=_slicedToArray(r,2),a=i[0],s=i[1],this._error=!1,this.logger.debug("[loadMetaProcess start], range,",[a,s]),l=function(){var e=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(r,i,l){var u,$,d,p,y,f,h,m;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.meta&&null!=l&&l.range&&l.range.length>0&&l.range[1]>=s&&(i=!0,c.logger.debug("[loadMetaProcess],data done,setstate true,[",a,s,"]")),i&&null!=l&&l.range&&l.range.length>0&&l.range[1]<s&&(i=!1,c.logger.debug("[loadMetaProcess],data not done,setstate false,[",a,s,"]")),c.logger.debug("[loadMetaProcess],task,[",a,s,"], range,",l.range,",dataLen,",r?r.byteLength:void 0,", state,",i,",err,",c._error),!c._error&&r&&r.byteLength>0&&n(r,i,l),!c.meta.moov&&!c._error){e.next=6;break}return e.abrupt("return");case 6:if(!(r&&r.byteLength>0)){e.next=44;break}if(c.buffer=concatUint8Array(c.buffer,r),u=MP4Parser.findBox(c.buffer,["moov"])[0]){e.next=23;break}if($=MP4Parser.findBox(c.buffer,["mdat"])[0],!i){e.next=23;break}if($){e.next=18;break}return c._error=!0,n(null,i,l,{err:"cannot find moov or mdat box"}),e.abrupt("return");case 18:return d=$.start+$.size,e.next=21,c.loadData([d,""],t,o);case 21:(p=e.sent)&&(u=MP4Parser.findBox(p.data,["moov"])[0]);case 23:if(!(u&&i&&u.size>u.data.length)){e.next=27;break}return c.logger.debug("[loadMetaProcess],moov not all, range,",l.range[1],",dataLen,",c.buffer.byteLength,", state,",i),e.next=27,c.loadMetaProcess(t,[l.range[1],u.start+u.size-1],n);case 27:if(!(u&&u.size<=u.data.length)||c.meta.moov){e.next=44;break}if(y=MP4Parser.moov(u)){e.next=33;break}return c._error=!0,n(null,i,l,{err:"cannot parse moov box"}),e.abrupt("return");case 33:if(f=moovToSegments(y,c._config.segmentDuration)){e.next=38;break}return c._error=!0,n(null,i,l,{err:"cannot parse segments"}),e.abrupt("return");case 38:c.meta=moovToMeta(y),h=f.videoSegments,m=f.audioSegments,c.videoSegments=h,c.audioSegments=m,c.logger.debug("[loadMetaProcess] moov ok"),n(void 0,i,{meta:{meta:c.meta,videoSegments:h,audioSegments:m}});case 44:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),e.next=6,this.loadData([a,s||this._config.moovEnd],t,_objectSpread2$1({onProgress:l},o));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return c.apply(this,arguments)})},{key:"loadMeta",value:(l=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n){var o,i,a,s,l,c,u,$,d;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=[],this.logger.debug("[loadMeta start]"),e.next=4,this.loadData([0,r||this._config.moovEnd],t,n);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:if(o.push(i),a=MP4Parser.findBox(i.data,["moov"])[0]){e.next=23;break}if(s=MP4Parser.findBox(i.data,["mdat"])[0]){e.next=13;break}throw new MediaError("cannot find moov or mdat box",i.data);case 13:return l=s.start+s.size,e.next=16,this.loadData([l],t,n);case 16:if(i=e.sent){e.next=19;break}return e.abrupt("return");case 19:if(o.push(i),a=MP4Parser.findBox(i.data,["moov"],l)[0]){e.next=23;break}throw new MediaError("cannot find moov box",i.data);case 23:if(!(a.size>a.data.length)){e.next=31;break}return e.next=26,this.loadData([i.data.length,a.start+a.size-1],t,n);case 26:if(i=e.sent){e.next=29;break}return e.abrupt("return");case 29:o.push(i),a.data=concatUint8Array(a.data,i.data);case 31:if(c=MP4Parser.moov(a)){e.next=34;break}throw new MediaError("cannot parse moov box",a.data);case 34:if(u=moovToSegments(c,this._config.segmentDuration)){e.next=37;break}throw new MediaError("cannot parse segments",a.data);case 37:return this.meta=moovToMeta(c),$=u.videoSegments,d=u.audioSegments,this.videoSegments=$,this.audioSegments=d,this.logger.debug("[load moov end!!!!!]"),e.abrupt("return",{meta:this.meta,videoSegments:$,audioSegments:d,responses:o});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return l.apply(this,arguments)})},{key:"getSegmentByTime",value:function(e){var t,r,n,o;this.videoSegments.length?(t=_findInstanceProperty(n=this.videoSegments).call(n,(function(t){return t.startTime<=e&&t.endTime>e})),t&&(r=this.audioSegments[t.index])):r=_findInstanceProperty(o=this.audioSegments).call(o,(function(t){return t.startTime<=e&&t.endTime>e}));return{video:t,audio:r}}},{key:"loadSegmentByTime",value:(s=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r){var n,o,i,a,s,l=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(l.length>2&&void 0!==l[2])||l[2],o=l.length>3&&void 0!==l[3]?l[3]:{},this.isMetaLoaded){e.next=5;break}return e.next=5,this.loadMeta(r);case 5:return i=this.getSegmentByTime(t),a=i.video,s=i.audio,e.abrupt("return",this._loadSegment(a,s,r,n,o));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"loadNextSegment",value:(a=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,i,a=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(a.length>1&&void 0!==a[1])||a[1],n=a.length>2&&void 0!==a[2]?a[2]:{},this.isMetaLoaded){e.next=5;break}return e.next=5,this.loadMeta();case 5:return o=this.videoSegments[this._currentSegmentIndex+1],i=this.audioSegments[this._currentSegmentIndex+1],e.abrupt("return",this._loadSegment(o,i,t,r,n));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"preload",value:(i=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,i,a,s,l,c=this;return _regeneratorRuntime$1().wrap((function(e){for(var u,$;;)switch(e.prev=e.next){case 0:if(this.isMetaLoaded){e.next=3;break}return e.next=3,this.loadMeta(!0);case 3:if(t&&!(t<0)){e.next=5;break}return e.abrupt("return");case 5:if(r=this.getSegmentByTime(t),n=r.video,o=r.audio,i=Math.max((null==n?void 0:n.index)||0,(null==o?void 0:o.index)||0)){e.next=9;break}return e.abrupt("return");case 9:return a=_sliceInstanceProperty(u=this.videoSegments).call(u,0,i),s=_sliceInstanceProperty($=this.audioSegments).call($,0,i),l=function(){var e=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>i)){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,c._loadSegment(a[t],s[t],!0,!1);case 4:return e.next=6,l(t+1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=14,l(0);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"cancel",value:function(){return this._loader.cancel()}},{key:"reset",value:(o=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length>0&&void 0!==t[0]&&t[0]){e.next=5;break}return this.logger.debug("[MP4loader reset func call loader.cancel]"),e.next=5,this._loader.cancel();case 5:this.vid=this.url="",this.meta={},this.downloadInfo=[],this.videoSegments=[],this.audioSegments=[],this._currentSegmentIndex=-1,this._currentLoadingSegmentIndex=-1;case 12:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"destroy",value:(n=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.reset();case 2:this.cache.clear();case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_loadSegment",value:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n,o,i){var a,s;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t||r){e.next=2;break}return e.abrupt("return");case 2:return a=(null==t?void 0:t.index)||(null==r?void 0:r.index)||0,this._currentLoadingSegmentIndex=a,e.prev=4,e.next=7,this.loadData([Math.min((null==t?void 0:t.range[0])||1/0,(null==r?void 0:r.range[0])||1/0),Math.max((null==t?void 0:t.range[1])||0,(null==r?void 0:r.range[1])||0)],n,i);case 7:s=e.sent;case 8:return e.prev=8,this._currentLoadingSegmentIndex=-1,e.finish(8);case 11:if(s){e.next=13;break}return e.abrupt("return");case 13:return o&&(this._currentSegmentIndex=a),s.video=t,s.audio=r,e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,this,[[4,,8,11]])}))),function(e,t,n,o,i){return r.apply(this,arguments)})},{key:"loadData",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n){var o,i,a;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._getCacheKey(t),e.next=3,this.cache.get(o);case 3:if(i=e.sent){e.next=10;break}return e.next=7,this._loader.load(this.url,_objectSpread2$1({range:t,vid:this.vid},n));case 7:a=e.sent,e.next=11;break;case 10:a={data:i,state:!0,options:{fromCache:!0,range:t,vid:this.vid}};case 11:if(a){e.next=13;break}return e.abrupt("return");case 13:var r;return i||(a.data&&this.downloadInfo.push({startTime:a.startTime,endTime:a.endTime,size:a.data.byteLength,range:t}),this.downloadInfo&&this.downloadInfo.length>this._config.maxDownloadInfoSize&&(this.downloadInfo=_sliceInstanceProperty(r=this.downloadInfo).call(r,-this._config.maxDownloadInfoSize))),e.abrupt("return",a);case 16:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"_getCacheKey",value:function(e){return(this.vid||this.url)+":"+e}}]),p}(),isSupport=_isLocalStorageUsable(),openLog=checkOpenLog();function probeSupport(){try{return"undefined"!=typeof localStorage&&"setItem"in window.localStorage&&!!window.localStorage.setItem}catch(e){return!1}}function checkIfLocalStorageThrows(){var e="_localstorage_support_test";try{return window.localStorage.setItem(e,!0),window.localStorage.removeItem(e),!1}catch(e){return!0}}function checkOpenLog(){if(isSupport)try{return!!window.localStorage.getItem("playerlog")}catch(e){return!1}return!1}function _isLocalStorageUsable(){return probeSupport()&&!checkIfLocalStorageThrows()}function log$3(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];openLog&&console.log&&(r=console).log.apply(r,_concatInstanceProperty(t=["[logger]",util.nowTime(),e]).call(t,o))}var apply$2=functionApply$1,call$3=functionCall$1,uncurryThis$f=functionUncurryThis$1,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject$3=anObject$E,isNullOrUndefined$2=isNullOrUndefined$i,isRegExp=isRegexp,requireObjectCoercible$2=requireObjectCoercible$l,speciesConstructor=speciesConstructor$9,advanceStringIndex=advanceStringIndex$3,toLength$1=toLength$k,toString$a=toString$A,getMethod=getMethod$a,arraySlice$1=arraySliceSimple$1,callRegExpExec=regexpExecAbstract,regexpExec=regexpExec$3,stickyHelpers=regexpStickyHelpers,fails$k=fails$1C,UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y,MAX_UINT32=4294967295,min$2=Math.min,$push=[].push,exec$1=uncurryThis$f(/./.exec),push$6=uncurryThis$f($push),stringSlice$4=uncurryThis$f("".slice),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails$k((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));fixRegExpWellKnownSymbolLogic("split",(function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=toString$a(requireObjectCoercible$2(this)),o=void 0===r?MAX_UINT32:r>>>0;if(0===o)return[];if(void 0===e)return[n];if(!isRegExp(e))return call$3(t,n,e,o);for(var i,a,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,$=new RegExp(e.source,c+"g");(i=call$3(regexpExec,$,n))&&!((a=$.lastIndex)>u&&(push$6(l,stringSlice$4(n,u,i.index)),i.length>1&&i.index<n.length&&apply$2($push,l,arraySlice$1(i,1)),s=i[0].length,u=a,l.length>=o));)$.lastIndex===i.index&&$.lastIndex++;return u===n.length?!s&&exec$1($,"")||push$6(l,""):push$6(l,stringSlice$4(n,u)),l.length>o?arraySlice$1(l,0,o):l}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:call$3(t,this,e,r)}:t,[function(t,r){var o=requireObjectCoercible$2(this),i=isNullOrUndefined$2(t)?void 0:getMethod(t,e);return i?call$3(i,t,o,r):call$3(n,toString$a(o),t,r)},function(e,o){var i=anObject$3(this),a=toString$a(e),s=r(n,i,a,o,n!==t);if(s.done)return s.value;var l=speciesConstructor(i,RegExp),c=i.unicode,u=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),$=new l(UNSUPPORTED_Y?"^(?:"+i.source+")":i,u),d=void 0===o?MAX_UINT32:o>>>0;if(0===d)return[];if(0===a.length)return null===callRegExpExec($,a)?[a]:[];for(var p=0,y=0,f=[];y<a.length;){$.lastIndex=UNSUPPORTED_Y?0:y;var h,m=callRegExpExec($,UNSUPPORTED_Y?stringSlice$4(a,y):a);if(null===m||(h=min$2(toLength$1($.lastIndex+(UNSUPPORTED_Y?y:0)),a.length))===p)y=advanceStringIndex(a,y,c);else{if(push$6(f,stringSlice$4(a,p,y)),f.length===d)return f;for(var b=1;b<=m.length-1;b++)if(push$6(f,m[b]),f.length===d)return f;y=p=h}}return push$6(f,stringSlice$4(a,p)),f}]}),!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y);var MONITOR_HEADERS={"x-cache":"x_cache","x-response-sinfo":"server_ip","x-response-cinfo":"x-response-cinfo"};function transformHeaders(e){var t,r={};return _forEachInstanceProperty(t=_Object$keys(MONITOR_HEADERS)).call(t,(function(t){var n=MONITOR_HEADERS[t];e&&e.get&&e.get(t)&&(r[n]=e.get(t))})),r}var metaSizeConfig=[{range:[0,90],size:614400},{range:[90,120],size:1228800},{range:[120,Number.MAX_VALUE],size:2048e3}];function getMetaSize(e,t,r){var n=r>51200?Math.min(r,t):t;if(!e)return n;for(var o=0;o<metaSizeConfig.length;o++)if(e>=metaSizeConfig[o].range[0]&&e<metaSizeConfig[o].range[1]){n=Math.min(Math.max(n,metaSizeConfig[o].size),r>0?r:t);break}return n}var encodedJs="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIH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suZW5kUHRzLG8uYXVkaW9UcmFjay5lbmRQdHMpfSxpbml0U2VnOnMuaW5pdFNlZ21lbnR9fXRoaXMucG9zdE1lc3NhZ2Uoe21ldGhvZDoidHJhbnNtdXgiLGlkOnQuZGF0YS5pZCxhcmdzOmUoe30sYSl9KTticmVhaztjYXNlInJlc2V0Ijp0aGlzLkZNUDRSZW11eGVyJiZ0aGlzLkZNUDRSZW11eGVyLnJlc2V0KCksdGhpcy5NUDREZW11eGVyJiZ0aGlzLk1QNERlbXV4ZXIucmVzZXQoKSx0aGlzLkZNUDRSZW11eGVyPW51bGwsdGhpcy5NUDREZW11eGVyPW51bGwsdGhpcy5fbmVlZEluaXRTZWdtZW50PSEwfX19KCk7Cg==",blob="undefined"!=typeof window&&window.Blob&&new Blob([atob(encodedJs)],{type:"text/javascript;charset=utf-8"});function WorkerWrapper(){var e=blob&&(_URL||window.webkitURL).createObjectURL(blob);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+encodedJs,{type:"module"})}finally{e&&(_URL||window.webkitURL).revokeObjectURL(e)}}var TransmuxerWorkerControl=function(e){_inherits$5(r,EventEmitter$1);var t=_createSuper$5(r);function r(e){var n;return _classCallCheck$8(this,r),(n=t.call(this)).openlog=e.openLog,n.codecType=e.codecType,n.supportHevc=e.supportHevc,n.worker=new WorkerWrapper,n.worker.onmessage=function(e){n.emit(e.data.method,e.data)},n.worker.postMessage({method:"init",id:e.id||0,args:{openlog:n.openlog,supportHevc:n.supportHevc,codecType:n.codecType}}),n}return _createClass$8(r,[{key:"transmux",value:function(e,t,r,n,o,i,a,s,l){var c=t.buffer;this.worker&&this.worker.postMessage({method:"transmux",id:e,buffer:c,args:{start:r,videoIdx:n,audioIdx:o,moov:i,useEME:a,kidValue:s,context:l}},[c])}},{key:"reset",value:function(){this.worker&&this.worker.postMessage({method:"reset"})}},{key:"destroy",value:function(){this.worker&&this.worker.terminate()}}]),r}(),MP4_EVENTS={ERROR:"error",META_READY:"metaReady",MOOV_READY:"moovReady",MOOV_REQ_PROGRESS:"moov_request_Progress",TASK_PROGRESS:"progress_event",REMOVE_URL:"remove_url",FRAGMENT:"fragment",UPDATEEME:"updateEME",CHANGE_URL:"chaneg_url"},MP4=function(e){_inherits$5($,EventEmitter$1);var t,r,n,o,i,a,s,l,c,u=_createSuper$5($);function $(e,t,r,n){var o,i,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0;if(_classCallCheck$8(this,$),_defineProperty$5(_assertThisInitialized$5(i=u.call(this)),"onprogressDataArrive",function(){var e=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r,n){var o;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.byteLength>0&&((o=i.timeRange[n.index].range)&&n.range[1]>=o[1]&&!r&&(r=!0),i.log("[mp4.loadFragment onprogressDataArrive ] receive data, >>> index,",n.index,",range,",_JSON$stringify(n.range),", dataLen,",t.byteLength),i._mux(t,n.range[0],n.index,r)),r&&(i.timeRange[n.index].downloaded=!0,i.bufferLoadedPos=-1,i.log("[FragLoadDowned],fragmentIdx,",n.index,",rangeEnd,",n.range[1]));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),i.timeRecord={startMuxTime:-1,startLoadTime:-1,newMP4Time:util.nowTime(),startLoadMetaTime:-1},i.url=e,i.backUrl=a||[],i._bitRate=t,i.options=$.getDefaultConfig(),_mapInstanceProperty(o=_Object$keys(r)).call(o,(function(e){void 0!==r[e]&&null!==r[e]&&(i.options[e]=r[e])})),i.timeRange=[],i.firstFrameTime=s||{},i._logTag=l||"",i.CHUNK_SIZE=getMetaSize(r.duration,i.options.chunkSize,r.fileSize),i.player=n,i.bufferLoaded=new Uint8Array(0),i.bufferLoadedPos=0,i.meta=null,i.preloadCache=null,i.videoTrak=null,i.audioTrak=null,i.canDownload=!0,i._loadSuccessCallBack=null,i._isPending=!1,i._metaLoading=!1,i.MP4Loader=new MP4Loader(_objectSpread2$3(_objectSpread2$3({segmentDuration:r.segmentDuration,url:e,vid:r.vid+"-"+t,retry:r.retryCount||2,retryDelay:r.retryDelay||1e3,timeout:3e3},r.reqOptions),{},{openLog:checkOpenLog()})),i.MP4Demuxer=null,i.FMP4Remuxer=null,i._needInitSegment=!0,i._bitRateInfoMap=new _Map,i._switchBitRate=!1,i._segmentToBitRateMap=new _Map,i.useEME=!1,i.kidValue=null,i.enableWorker=r.enableWorker&&("h265"!==r.codecType||r.supportHevc),i.enableWorker&&"undefined"!=typeof Worker)try{i.workerSequence=0,i.transmuxerWorkerControl=new TransmuxerWorkerControl({id:i.workerSequence,codecType:r.codecType,supportHevc:i.options.supportHevc,openLog:checkOpenLog()}),i.transmuxerWorkerControl.on("transmux",(function(e){var t=e.args;i.log("[transmuxerworker end] ,range, ",_JSON$stringify(t.range),",dataLen,",t.buffer.byteLength,t.context),i.firstFrameTime.firstmux<0&&i.timeRecord.startMuxTime>0&&(i.firstFrameTime.firstmux=util.nowTime()-i.timeRecord.startMuxTime),i._loadSuccessCallBack&&i._loadSuccessCallBack(t)}))}catch(e){i.log("Error in worker:",e),i.enableWorker=!1,i.transmuxerWorkerControl=null}return i.enableWorker||(i.MP4Demuxer=null,i.FMP4Remuxer=null),i.seekTime=-1,i}return _createClass$8($,[{key:"changeBitRate",value:(c=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t){return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.bitrate===this._bitRate){e.next=9;break}return this.url=t.url,this._bitRate=t.bitrate,this.backUrl=t.backupURL,e.next=6,this.MP4Loader.changeUrl(this.url,this.options.vid+"-"+this._bitRate,this.CHUNK_SIZE);case 6:this.emit(MP4_EVENTS.CHANGE_URL,this.url),this._switchBitRate=!0,this.log("[switchBitrate] changeUrl, bitRate,",this._bitRate,this.url);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_getByPreload",value:function(e,t,r,n){try{if(e&&e.byteLength>=t){var o={endTime:(new Date).getTime(),startTime:(new Date).getTime(),index:n,range:[],vid:this.options.vid,from:"local"};if(r<=e.byteLength){var i=_sliceInstanceProperty(e).call(e,t,r);return o.range=[t,r],o.state=!0,{buffer:i,context:o,state:!0}}var a=e.byteLength-1,s=_sliceInstanceProperty(e).call(e,t,a);return o.range=[t,a],{context:o,buffer:s,state:!1}}return null}catch(e){return console.error("[MP4] _getByPreload",t,r,e),null}}},{key:"log",value:function(e){for(var t,r,n,o,i=this.options,a=i&&i.vid?_concatInstanceProperty(t=_concatInstanceProperty(r="[MP4]".concat(this._logTag," ")).call(r,i.vid," ")).call(t,e):_concatInstanceProperty(n="[MP4]".concat(this._logTag," ")).call(n,e),s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];log$3.apply(void 0,_concatInstanceProperty(o=[a]).call(o,l))}},{key:"errorHandler",value:(l=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r){var n,o,i,a,s,l,c,u,$,d=arguments;return _regeneratorRuntime$2().wrap((function(e){for(var p,y;;)switch(e.prev=e.next){case 0:if(n=d.length>2&&void 0!==d[2]?d[2]:{},o=t.response,i=t.message,a=this.options?this.options.vid:"",s=null,this._isPending=!0,!o){e.next=33;break}if(l=transformHeaders(o.headers),s=new NetWorkError("network",o.status,{httpText:o.httpText,message:i,url:o.url,headers:l}),console.log(_concatInstanceProperty(p=_concatInstanceProperty(y="[MP4] [".concat(a,"] errorHandler error state:[")).call(y,r,"], _isPending:[")).call(p,this._isPending,"] "),s),!(this.backUrl&&this.backUrl.length>0)){e.next=29;break}if(console.log("[MP4] [".concat(a,"] errorHandler start backUpUrl retry"),this.backUrl.length,this.backUrl),c=this.backUrl.shift(),this.update(c),this._isPending=!1,!this.MP4Loader){e.next=18;break}return e.next=17,this.MP4Loader.changeUrl(this.url,this.url+"-"+this._bitRate,this.CHUNK_SIZE);case 17:this.emit(MP4_EVENTS.CHANGE_URL,this.url);case 18:if(this.emit(MP4_EVENTS.TASK_PROGRESS,{type:"error",error:t}),"getMetaInfo"!==r){e.next=24;break}return this.getMetaInfo(),e.abrupt("return");case 24:if("loadFragment"!==r){e.next=29;break}if(u=n.index,$=n.range,!u||!$){e.next=29;break}return this.loadFragment(u,$),e.abrupt("return");case 29:console.log("[MP4] [".concat(a,"] errorHandler backUpUrl is null emit error")),this.emit(MP4_EVENTS.ERROR,s),e.next=36;break;case 33:console.log("[MP4] [".concat(a,"] errorHandler,"),t),s=t,this.emit(MP4_EVENTS.ERROR,s);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"init",value:(s=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t){var r,n,o,i,a,s,l,c;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.url){e.next=3;break}return e.next=3,this.MP4Loader.changeUrl(this.url,this.options.vid+"-"+this._bitRate,this.CHUNK_SIZE);case 3:if(this.emit(MP4_EVENTS.CHANGE_URL,this.url),this.meta=null,r=t.meta,n=t.mediaSegList,o=t.buffer,i=t.fileSize,a=t.initSeg,s=t.bitrate,!r||!r.ext){e.next=21;break}this.meta=r,this._bitRate=s,this.videoTrak=r.ext.videoTrak,this.audioTrak=r.ext.audioTrak,this.timeRange=this.getTimeRange(),n?this.preloadCache={segList:n||[],initSeg:a}:o&&(this.size=i,this.bufferLoaded=o),l={meta:r,videoSegments:r.ext.videoTrak,audioSegments:r.ext.audioTrak,bufferLoaded:o||null},this._bitRateInfoMap.set(this._bitRate,l),c=(new Date).getTime(),_setTimeout((function(){console.log(">>>>metaReady setTimeout",(new Date).getTime()-c)})),console.log(">>>>metaReady",util.nowTime()),this.emit(MP4_EVENTS.META_READY,this.meta),e.next=23;break;case 21:return e.next=23,this.getMetaInfo();case 23:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"getTimeRange",value:function(){for(var e=[],t=null,r=0;this.videoTrak&&r<this.videoTrak.length;r++)t={startTime:this.videoTrak[r].startTime,endTime:this.videoTrak[r].endTime,downloaded:!1,isLoading:!1},e.push(t);if(this.audioTrak&&this.audioTrak.length>e.length)for(var n=e.length;n<this.audioTrak.length;n++)t={startTime:Math.max(this.audioTrak[n].startTime,t?t.endTime:0),endTime:Math.max(this.audioTrak[n].endTime,t?t.endTime:0),downloaded:!1,isLoading:!1},e.push(t);return e}},{key:"getMetaInfo",value:(a=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){var t,r,n,o,i=this,a=arguments;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(a.length>0&&void 0!==a[0])||a[0],e.prev=1,r=util.nowTime(),this._metaLoading=!0,this.log("getMetaInfo start, bitRate,",this._bitRate),this.bufferLoaded=new Uint8Array(0),n=0,o=function(){var e=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(o,a,s,l){var c,u;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.log("getMetaInfo onProgressHandle, dataLen,",o?o.byteLength:-1,", state,",a,",range,",_JSON$stringify(s.range)),!l){e.next=7;break}return e.next=4,i.cancelLoading();case 4:return c=new ParserError(ERROR_TYPES.demux,ERROR_CODES.metaError,{msg:_JSON$stringify(l)}),i.errorHandler(c,"getMetaInfo"),e.abrupt("return");case 7:o&&s.range[0]===n&&(i.bufferLoaded=Concat(Uint8Array,i.bufferLoaded,new Uint8Array(o)),n+=o.byteLength),s.meta&&!i.meta&&(i.firstFrameTime.metaload=util.nowTime()-r,u=s.meta,i.videoTrak=u.videoSegments,i.audioTrak=u.audioSegments,i.timeRange=i.getTimeRange(),i.meta=_objectSpread2$3(_objectSpread2$3({},u.meta),{},{ext:{videoTrak:i.videoTrak,audioTrak:i.audioTrak}}),u.bufferLoaded=i.bufferLoaded,i._bitRateInfoMap.set(i._bitRate,u),i.log("meta reach, bitRate,",i._bitRate),t&&i.emit(MP4_EVENTS.META_READY,i.meta)),i.meta&&a&&(i.log("[getMetaInfo req end]"),i._metaLoading=!1),i.meta&&(o||a)&&(i.log("emit moov_req_progress"),i.emit(MP4_EVENTS.MOOV_REQ_PROGRESS));case 11:case"end":return e.stop()}}),e)})));return function(t,r,n,o){return e.apply(this,arguments)}}(),e.next=10,this.MP4Loader.loadMetaProcess(this.MP4Loader.cache,[0,this.CHUNK_SIZE],o);case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(1),console.error("[MP4] trigger errorHandler getMetaInfo",e.t0),this.errorHandler(e.t0,"getMetaInfo");case 16:case"end":return e.stop()}}),e,this,[[1,12]])}))),function(){return a.apply(this,arguments)})},{key:"getFragmentIdx",value:function(e){var t,r,n;if(this.videoTrak.length){var o,i;if(t=_findInstanceProperty(o=this.videoTrak).call(o,(function(t){return t.startTime<=e&&t.endTime>e})),r=_findInstanceProperty(i=this.audioTrak).call(i,(function(t){return t.startTime<=e&&t.endTime>e})),t&&r)return Math.min(t.index,r.index);if(t||r)return t?t.index:r.index;var a=Number.MAX_VALUE;return this.videoTrak&&this.videoTrak.length>0&&(a=this.videoTrak.length-1),this.audioTrak&&this.audioTrak.length>0&&(a=Math.min(this.audioTrak.length-1,a)),a}return r=_findInstanceProperty(n=this.audioTrak).call(n,(function(t){return t.startTime<=e&&t.endTime>e})),r?r.index:0}},{key:"_checkHasMeta",value:(i=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){var t,r;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._bitRateInfoMap.get(this._bitRate)){e.next=19;break}return this.log("[ABR], need load InitSegment, bitRate, ",this._bitRate),this._metaLoading=!0,e.next=6,this.MP4Loader.loadMeta(this.MP4Loader.cache,Math.round(this.CHUNK_SIZE/2));case 6:return r=e.sent,this._metaLoading=!1,this.videoTrak=r.videoSegments,this.audioTrak=r.audioSegments,this.meta=_objectSpread2$3(_objectSpread2$3({},r.meta),{},{ext:{videoTrak:this.videoTrak,audioTrak:this.audioTrak}}),this.emit(MP4_EVENTS.UPDATEEME,this.meta),this.timeRange=this.getTimeRange(),this.bufferLoaded=new Uint8Array(0),r.bufferLoaded=this.bufferLoaded,this._bitRateInfoMap.set(this._bitRate,r),e.abrupt("return",!0);case 19:return this.log("[ABR], not need load InitSegment, bitRate, ",this._bitRate),this.videoTrak=t.videoSegments,this.audioTrak=t.audioSegments,this.meta=t.meta,this.emit(MP4_EVENTS.UPDATEEME,this.meta),this.timeRange=this.getTimeRange(),this.bufferLoaded=new Uint8Array(0),e.abrupt("return",!0);case 27:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"resetFragmentLoadState",value:function(e){for(var t=0;t<this.timeRange.length;t++)t<e?(this.timeRange[t].downloaded=!0,this.timeRange[t].isLoading=!0):(this.timeRange[t].downloaded=!1,this.timeRange[t].isLoading=!1)}},{key:"getFragRange",value:function(e){var t,r,n,o,i=null;this.videoTrak&&(i=e<this.videoTrak.length?this.videoTrak[e]:this.videoTrak[this.videoTrak.length-1]);var a=null;this.audioTrak&&(a=e<this.audioTrak.length?this.audioTrak[e]:this.audioTrak[this.audioTrak.length-1]);var s=0,l=0;this.videoTrak&&e>=this.videoTrak.length-1&&(s=-1),this.audioTrak&&e>=this.audioTrak.length-1&&(l=-1);var c=[Math.min((null===(t=i)||void 0===t?void 0:t.range[0])||1/0,(null===(r=a)||void 0===r?void 0:r.range[0])||1/0),Math.max((null===(n=i)||void 0===n?void 0:n.range[1])+s||0,(null===(o=a)||void 0===o?void 0:o.range[1])+l||0)];return e<this.timeRange.length&&(this.timeRange[e].range=c),c}},{key:"load",value:(o=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r){var n,o,i,a;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._loadSuccessCallBack=r,!this._switchBitRate||this._metaLoading){e.next=11;break}return this.log("[switchBitrate], switch bitRate start load, bitRate,",this._bitRate,", time,",t>=this.videoTrak.length?this.audioTrak[t].startTime:this.videoTrak[t].startTime,", fragIndex,",t),e.next=5,this._checkHasMeta();case 5:n=e.sent,this.resetFragmentLoadState(t),this.log("[switchBitrate], reset timerange state,",t),this._needInitSegment=!0,this.resetTansmuxer(),n&&(this._switchBitRate=!1);case 11:if(!this._switchBitRate||!this._metaLoading){e.next=13;break}return e.abrupt("return");case 13:o=this.getFragRange(t),(i=this.getFragmentFromCache(t,o))?(this.log("[mp4.load], segment ,",t,"Data In Cache",_JSON$stringify(o),", needInit,",this._needInitSegment),this.timeRange[t].downloaded=!0,this.timeRange[t].isLoading=!1,this._needInitSegment=!1,this._loadSuccessCallBack&&this._loadSuccessCallBack(i)):(this.log("loadFragment,",t,",bitRate,",this._bitRate,",range,",_JSON$stringify(o)),this.seekTime>0?(a=this.getSubRange(t,this.seekTime,o),this.loadFragment(t,a),this.seekTime=-1):this.loadFragment(t,o));case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getSubRange",value:function(e,t,r){var n=r[0],o=r[0],i=1,a=!1;if(this.log(">>>>>getSubRange time,",t,_JSON$stringify(r)),this.videoTrak){var s,l=e<this.videoTrak.length?this.videoTrak[e]:this.videoTrak[this.videoTrak.length-1],c=_filterInstanceProperty(s=l.frames).call(s,getKeyFrameList),u=this.meta.videoTimescale,$=c[0].startTime/u;this.log(">>>>>getSubRange video, startTime,",l.startTime,",endTime,",l.endTime);for(var d=0;d<c.length;d++)this.log(">>>>>getSubRange video keyFrameList, startTime,",c[d].startTime/u,",range,",c[d].offset);for(;i<c.length;i++){var p=c[i].startTime/u;if($<=t&&t<p&&r[0]<c[i-1].offset){n=c[i-1].offset,a=!0,this.log(">>>>>getSubRange video end, startTime,",$,",endTime,",p,",startRange,",n,", keyFrameIndex,",i-1);break}$=p}!a&&$<=t&&t<l.endTime+.8&&(n=c[i-1].offset,this.log(">>>>>getSubRange video last, startTime,",$,",endTime,",l.endTime,",startRange,",n))}if(i=1,this.audioTrak){var y=e<this.audioTrak.length?this.audioTrak[e]:this.audioTrak[this.audioTrak.length-1],f=y.frames,h=this.meta.audioTimescale;i=Math.floor((t*h-f[0].startTime)/y.frames[0].duration);for(var m=(i=Math.min(f.length-1,i))>0?f[i-1].startTime/h:f[0].startTime/h;i>=0&&i<f.length;)if(i>0&&m>t)m=f[i-=1].startTime/h;else{var b=(f[i].startTime+f[i].duration)/h;if(m<=t&&t<b&&r[0]<f[i].offset){o=f[i].offset,a=!0,this.log(">>>>>getSubRange audio end, startTime,",m,",endTime,",b,",startRange,",o,", index,",i);break}m=b,i++}}var g=[Math.min(o,n),r[1]];return this.log(">>>>>getSubRange finalRange ",_JSON$stringify(g),",oldRange,",_JSON$stringify(r)),g}},{key:"getFragmentFromCache",value:function(e,t){var r=this.preloadCache;if(!r||!r.segList)return null;for(var n=-1,o=r.segList,i=r.initSeg,a=0;a<o.length;a++)if(o[a].index===e){n=a;break}if(n<0)return null;var s=o[n];if(console.log(">>>>preloadCache",n,s,s.range,t[1],s.range[1]>=t[1]),s.range[1]>=t[1]){var l=[this.timeRange[e].startTime,this.timeRange[e].endTime];return{buffer:s.buffer,range:t,context:{range:t,fragIndex:e,state:!0,timeRange:[l[0],l[1]]},state:!0,initSeg:this._needInitSegment?i:void 0}}return null}},{key:"_mux",value:function(e,t,r,n){this.firstFrameTime.firstmux<0&&this.timeRecord.startMuxTime<0&&(this.timeRecord.startMuxTime=util.nowTime(),this.firstFrameTime.startMuxTime=util.nowTime()-this.timeRecord.startLoadTime);var o=this.getSamplesRange(r,"video"),i=this.getSamplesRange(r,"audio"),a=[t,t+e.byteLength];if(this.transmuxerWorkerControl){var s={range:a,state:n,fragIndex:r};this.log("[transmuxerworker start] ,range, ",_JSON$stringify(a),",dataLen,",e.byteLength,s),this.transmuxerWorkerControl.transmux(this.workerSequence,e,t,o,i,this.meta.moov,this.useEME,this.kidValue,s)}else try{this.MP4Demuxer||(this.MP4Demuxer=new MP4Demuxer(this.videoTrak,this.audioTrak,null,{openLog:checkOpenLog()}));var l,c=this.MP4Demuxer.demuxPart(e,t,o,i,this.meta.moov,this.useEME,this.kidValue);this.FMP4Remuxer||this.checkCodecH265()&&!this.options.supportHevc||(this.FMP4Remuxer=new FMP4Remuxer(this.MP4Demuxer.videoTrack,this.MP4Demuxer.audioTrack,{openLog:checkOpenLog()})),this.log("[mux], videoTimeRange,",c.videoTrack?[c.videoTrack.startPts,c.videoTrack.endPts]:null,",audioTimeRange,",c.audioTrack?[c.audioTrack.startPts,c.audioTrack.endPts]:null);var u=[Math.min(c.videoTrack.startPts,c.audioTrack.startPts),Math.max(c.videoTrack.endPts,c.audioTrack.endPts)];if(this.FMP4Remuxer){var $=this.FMP4Remuxer.remux(this._needInitSegment,{initMerge:!0,range:a});$.initSegment&&(this._needInitSegment=!1),l={buffer:util.concatData($.audioSegment,$.videoSegment),range:a,state:n,context:{range:a,fragIndex:r,timeRange:u},initSeg:$.initSegment}}else l={videoTrack:c.videoTrack,audioTrack:c.audioTrack,buffer:null,range:a,state:n,context:{range:a,fragIndex:r,timeRange:u}};this.firstFrameTime.firstmux<0&&this.timeRecord.startMuxTime>0&&(this.firstFrameTime.firstmux=util.nowTime()-this.timeRecord.startMuxTime),this._loadSuccessCallBack&&this._loadSuccessCallBack(l)}catch(n){console.error("mux err:",n);var d=new ParserError(ERROR_TYPES.remux,ERROR_CODES.muxError,{msg:_JSON$stringify(n)});this.errorHandler(d,"mux",{fragIndex:r,range:[t,t+e.byteLength]})}}},{key:"getSamplesRange",value:function(e,t){var r=[];switch(t){case"video":if(this.videoTrak&&e<this.videoTrak.length){var n=this.videoTrak[e].frames;r.push(n[0].index),r.push(n[n.length-1].index)}break;case"audio":if(this.audioTrak&&e<this.audioTrak.length){var o=this.audioTrak[e].frames;r.push(o[0].index),r.push(o[o.length-1].index)}break;default:console.warn("[getSamplesRange] type ",t," is invalid")}return r}},{key:"loadFragment",value:(n=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r){var n,o,i,a;return _regeneratorRuntime$2().wrap((function(e){for(var s,l;;)switch(e.prev=e.next){case 0:if(!this._isPending&&r!==[0,0]&&!this.timeRange[t].isLoading){e.next=2;break}return e.abrupt("return");case 2:if(this.log("[MP4.loadFragment] ,fragIndex,",t,",range ",r,",len ,",r[1]-r[0],", bufferLoaded_Len,",this.bufferLoaded.byteLength),this._segmentToBitRateMap.set(t,this._bitRate),this.timeRecord.startLoadTime<0&&(this.timeRecord.startLoadTime=util.nowTime()),!(r.length>=2&&r[1]&&r[1]>0&&r[1]<=this.bufferLoaded.byteLength)){e.next=15;break}this.timeRange[t].isLoading=!0,n=Math.max(r[0],this.bufferLoadedPos),o=new Uint8Array(_sliceInstanceProperty(s=this.bufferLoaded).call(s,n,r[1])),this.log("[mp4.loadFragment] has all data: ",n,r[1]),this.timeRange[t].downloaded=!0,this.bufferLoadedPos=-1,this._mux(o,n,t,!0),e.next=38;break;case 15:if(!(r.length>=2&&r[0]&&r[0]<=this.bufferLoaded.byteLength)){e.next=27;break}if(this.timeRange[t].isLoading){e.next=25;break}if(i=Math.max(r[0],this.bufferLoadedPos),!((a=new Uint8Array(_sliceInstanceProperty(l=this.bufferLoaded).call(l,i,r[1]))).byteLength>0)){e.next=24;break}return this.bufferLoadedPos=i+a.byteLength,this.log("[mp4.loadFragment] has part data: ",i,i+a.byteLength),this._mux(a,i,t,r[1]<=this.bufferLoadedPos),e.abrupt("return");case 24:if(!this._metaLoading&&!this.timeRange[t].isLoading)try{this.log("[mp4.loadFragment] ready to load part data >>> ",this.bufferLoaded.byteLength,r[1]),this.timeRange[t].isLoading=!0,this.MP4Loader.loadData([this.bufferLoaded.byteLength,r[1]],this.MP4Loader.cache,{index:t,onProgress:this.onprogressDataArrive,onProcessMinLen:this.options.onProcessMinLen})}catch(e){this.errorHandler(e,"MP4Loader.loadData",{range:[this.bufferLoaded.byteLength,r[1]],fragIndex:t})}case 25:e.next=38;break;case 27:if(this._metaLoading&&!(r[0]>=this.CHUNK_SIZE)||this.timeRange[t].isLoading){e.next=38;break}return this.timeRange[t].isLoading=!0,this.log("[mp4.loadFragment],ready to load all data ,segmentIdx, ",t,",range >>> ",_JSON$stringify(r)),e.prev=30,e.next=33,this.MP4Loader.loadData(r,this.MP4Loader.cache,{index:t,onProgress:this.onprogressDataArrive,onProcessMinLen:this.options.onProcessMinLen});case 33:e.next=38;break;case 35:e.prev=35,e.t0=e.catch(30),this.errorHandler(e.t0,"MP4Loader.loadData",{range:r,fragIndex:t});case 38:case"end":return e.stop()}}),e,this,[[30,35]])}))),function(e,t){return n.apply(this,arguments)})},{key:"loadAllFragmentData",value:(r=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r,n){var o,i,a;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasDestroyed){e.next=2;break}return e.abrupt("return");case 2:return o=this.getFragRange(t),e.prev=3,e.next=6,this.MP4Loader.loadData(o,this.MP4Loader.cache,{index:t});case 6:if(i=e.sent,this.log("loadAllFragmentData after",_JSON$stringify(o),i),i&&i.data){e.next=11;break}return n(new Error("response null")),e.abrupt("return");case 11:a=i.data,this._loadSuccessCallBack=r,this._mux(a,o[0],t,!0),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(3),console.error("[MP4] loadAllFragmentData error",e.t0),n(e.t0);case 20:case"end":return e.stop()}}),e,this,[[3,16]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"cancelLoading",value:(t=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.MP4Loader;case 2:if(e.t0=e.sent,!e.t0){e.next=5;break}this.MP4Loader.cancel();case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"update",value:function(e){this.url=e}},{key:"getDataBitRate",value:function(e){return this._segmentToBitRateMap.get(e)}},{key:"checkCodecH265",value:function(){var e,t;return this.meta&&(_indexOfInstanceProperty(e=this.meta.videoCodec).call(e,"hvc1")>-1||_indexOfInstanceProperty(t=this.meta.videoCodec).call(t,"hev1")>-1)}},{key:"destroy",value:function(){this.hasDestroyed||(this.resetTansmuxer(),this.transmuxerWorkerControl&&this.transmuxerWorkerControl.destroy(),this.size=0,this._isPending=!1,this._metaLoading=!1,this.bufferLoadedPos=0,this.bufferLoaded=new Uint8Array(0),this._bitRateInfoMap.clear(),this._segmentToBitRateMap.clear(),this.MP4Loader&&(this.MP4Loader.cancel(),this.MP4Loader.destroy()),this.hasDestroyed=!0)}},{key:"resetTansmuxer",value:function(){this.MP4Demuxer&&this.MP4Demuxer.reset(),this.MP4Demuxer=null,this.FMP4Remuxer&&this.FMP4Remuxer.reset(),this.FMP4Remuxer=null,this.transmuxerWorkerControl&&this.transmuxerWorkerControl.reset()}}],[{key:"getDefaultConfig",value:function(){return{onProcessMinLen:5120,xhrSetup:null,chunkSize:8e5,loadSize:800,isCache:!1,playerId:"",vid:"",ext:{}}}}]),$}();function getKeyFrameList(e){if(e.keyframe)return e}var ProxyPromise=function(){function e(){var t,r;_classCallCheck$8(this,e);var n=new _Promise((function(e,n){t=e,r=n}));return n.resolve=function(e){t(e),n.state="fulfilled"},n.reject=function(e){r(e),n.state="rejected",n.isBreak="DESTROYED"===e},n.state="pending",n}return _createClass$8(e,[{key:"resolve",value:function(e){}},{key:"reject",value:function(e){}}]),e}(),XHR=_createClass$8((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.url,n=t.method,o=void 0===n?"GET":n,i=t.type,a=void 0===i?"arraybuffer":i,s=t.data,l=void 0===s?{}:s;return _classCallCheck$8(this,e),new _Promise((function(e,t){var n,i=new window.XMLHttpRequest,s=o.toUpperCase(),c=[];if(a&&(i.responseType=a),_mapInstanceProperty(n=_Object$keys(l)).call(n,(function(e){c.push("k=".concat(l[e]))})),"GET"===s){var u;i.open(s,_concatInstanceProperty(u="".concat(r,"?")).call(u,c.join("&"))),i.send()}else{if("POST"!==s)throw new Error("xhr ".concat(s," is not supported"));i.open(s,r,!0),i.setRequestHeader("Content-Type","application/json"),i.send(_JSON$stringify(l))}i.onload=function(){200===i.status||206===i.status?e(i):t(i)},i.onerror=function(){t(i)}}))}));function getPlayLicenses(e,t,r){var n,o=new ProxyPromise;return new XHR({type:"json",method:"POST",url:r,data:{drm_type:"22",license_request:[{vid:e,kids:_concatInstanceProperty(n=[]).call(n,t)}]}}).then((function(r){var n=r.response;if(n){var i=n.play_licenses[e][t];o.resolve(i)}else o.reject()})).catch((function(){o.reject()})),o}function getKeyValue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=new ProxyPromise;if(r){log$3("[getKeyValue]>before openBox");var i=n.awManager.openBox(r);if(log$3("[getKeyValue]>after openBox: ",i),t){var a={clearKeys:{}};a.clearKeys[t]=i,o.resolve(a)}else o.resolve(i)}else{var s=getPlayLicenses(e,t,n.config.getLicenseUrl);s.id="requestPromise",n._addPendingPromise(s),s.then((function(e){if(n._removePendingPromise(s),n.awManager){log$3("[getKeyValue]>before openBox");var r=n.awManager.openBox(e);log$3("[getKeyValue]>after openBox: ",r);var i={clearKeys:{}};i.clearKeys[t]=r,o.resolve(i)}else o.reject({errDes:"awManager not exist, player destroyed"}),log$3("[getKeyValue]>awManager not exist, player destroyed")})).catch((function(e){o.reject(e),log$3("[getKeyValue]>requestPromise reject")}))}return o}var userGestureEventMiddleware={playBtnClick:function(e,t,r,n){e.paused||e.waitingMoreBuffer&&(e.waitingMoreBuffer=!1),n.call(e,t,r)}},videoEventMiddleware={waiting:function(e,t){var r=e.player,n=e.eventName;r.waitingMoreBuffer=!0,t(n,e)},play:function(e,t){var r=e.player,n=e.eventName;r.waitingMoreBuffer||t(n,e)},pause:function(e,t){var r=e.player,n=e.eventName;r.waitingMoreBuffer||t(n,e)},seeking:function(e,t){var r=e.player,n=e.eventName;r.isSeekingStart=!0,t(n,e)},progress:function(e,t){log$3(">>>>progress");var r=e.player,n=e.eventName;if(r.waitingMoreBuffer){var o=r.getBufferedRange(r.buffered2);0===o[0]&&0===o[1]||(void 0===r.inWaitingStart||r.isSeekingStart?(log$3("progress 起播或seek结束"),o[1]-r.currentTime>=(r.config.canplayWaterLevel||1)||o[1]>r.duration-1?(log$3("progress 出起播水位"),r.play()):(log$3("progress 未出起播水位"),r.emit("waiting"))):(log$3("progress video卡顿结束"),o[1]-r.currentTime>=(r.config.bufferWaterLevel||5)||o[1]>r.duration-1?(log$3("progress 出卡顿水位"),r.play()):(log$3("progress 未出卡顿水位"),r.emit("waiting"))))}t(n,e)},playing:function(e,t){var r=e.player,n=e.eventName;log$3("playing");var o=r.getBufferedRange(r.buffered2);if(0===o[0]&&0===o[1])return log$3("playing 当前播放时刻没有缓存 未出水位"),r.waitingMoreBuffer=!0,r.pause(),void t.call("waiting",e);void 0===r.inWaitingStart||r.isSeekingStart?(log$3("playing 起播或seek结束"),o[1]-r.currentTime>=(r.config.canplayWaterLevel||1)||o[1]>r.duration-1?(log$3("playing 出起播水位"),r.waitingMoreBuffer=!1,r.isSeekingStart=!1,t(n,e)):(log$3("playing 未出起播水位"),r.waitingMoreBuffer=!0,r.pause(),t.call("waiting",e))):(log$3("playing video卡顿结束"),o[1]-r.currentTime>=(r.config.bufferWaterLevel||5)||o[1]>r.duration-1?(log$3("playing 出卡顿水位"),r.waitingMoreBuffer=!1,t(n,e)):(log$3("playing 未出卡顿水位"),r.waitingMoreBuffer=!0,r.pause(),t.call("waiting",e)))}};function offInDestroy(e,t,r,n){e.once(n,(function o(){e.off(t,r),e.off(n,o)}))}function on(e,t,r,n){if(n)e.on(t,r),offInDestroy(e,t,r,n);else{e.on(t,(function(e){r(e)}))}}var EME=function(e){_inherits$5(r,EventEmitter$1);var t=_createSuper$5(r);function r(e){var n;return _classCallCheck$8(this,r),(n=t.call(this)).drm=e,n.KEYSYSTEM_TYPE="",n.keys={},n.drm.clearKeys&&(n.KEYSYSTEM_TYPE="org.w3.clearkey",n.keys=n.drm.clearKeys),n.options=[],n.ensurePromise=void 0,n}return _createClass$8(r,[{key:"updateDrm",value:function(e){this.drm=e,this.keys=this.drm.clearKeys}},{key:"setOptions",value:function(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t={videoCapabilities:e},r={videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]};this.options=[r,t]}},{key:"bail",value:function(e){}},{key:"UpdateSessionFunc",value:function(e){var t=this;return function(r){var n,o=[],i=[];_forEachInstanceProperty(n=_Object$keys(e)).call(n,(function(t){var r=e[t],n=util.fromHex(t),a=util.fromHex(r),s={kty:"oct",kid:util.toBase64(n,!1),k:util.toBase64(a,!1)};o.push(s),i.push(s.kid)}));var a=_JSON$stringify({keys:o});r.target.update(util.StringToArrayBuffer(a)).then((function(){}),t.bail(" MediaKeySession update failed"))}}},{key:"KeysChange",value:function(e){}},{key:"EnsureMediaKeysCreated",value:function(e,t,r){return this.ensurePromise||(this.ensurePromise=navigator.requestMediaKeySystemAccess(t,r).then((function(e){return e.createMediaKeys()}),this.bail(" Failed to request key system access.")).then((function(t){return e.setMediaKeys(t)}),this.bail(" failed to create MediaKeys object"))),this.ensurePromise}},{key:"SetupEME",value:function(e,t){var r=this;e.sessions=[],on(this,"encrypted",(function(){var t=_JSON$stringify({kids:["0123456789abcdef0123456789abcdef"]}),n=new Uint8Array(util.toUTF8(t));r.EnsureMediaKeysCreated(e,r.KEYSYSTEM_TYPE,r.options).then((function(){var t=e.mediaKeys.createSession();return e.sessions.push(t),t.addEventListener("message",r.UpdateSessionFunc(_keysInstanceProperty(r))),t.addEventListener("keystatuseschange",r.KeysChange),t.generateRequest("keyids",n.buffer)}),r.bail(" failed to ensure MediaKeys on HTMLMediaElement")).then((function(){}),r.bail(" Failed to generate request."))}))}}]),r}(),WasmManager=function(){function e(){_classCallCheck$8(this,e),this.queue=[]}return _createClass$8(e,[{key:"push",value:function(e){this.queue.push(e)}},{key:"startup",value:function(){return _Promise.all(this.queue)}},{key:"destroy",value:function(){this.queue=[]}}]),e}(),apply$1=functionApply$2,toIndexedObject$6=toIndexedObject$A,toIntegerOrInfinity$2=toIntegerOrInfinity$s,lengthOfArrayLike$3=lengthOfArrayLike$J,arrayMethodIsStrict$4=arrayMethodIsStrict$l,min$1=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$4=arrayMethodIsStrict$4("lastIndexOf"),FORCED$c=NEGATIVE_ZERO||!STRICT_METHOD$4,arrayLastIndexOf=FORCED$c?function(e){if(NEGATIVE_ZERO)return apply$1($lastIndexOf,this,arguments)||0;var t=toIndexedObject$6(this),r=lengthOfArrayLike$3(t),n=r-1;for(arguments.length>1&&(n=min$1(n,toIntegerOrInfinity$2(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$y=_export$2,lastIndexOf$8=arrayLastIndexOf;$$y({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var entryVirtual$1=entryVirtual$o,lastIndexOf$7=entryVirtual$1("Array").lastIndexOf,isPrototypeOf$5=objectIsPrototypeOf$2,method$1=lastIndexOf$7,ArrayPrototype$1=Array.prototype,lastIndexOf$6=function(e){var t=e.lastIndexOf;return e===ArrayPrototype$1||isPrototypeOf$5(ArrayPrototype$1,e)&&t===ArrayPrototype$1.lastIndexOf?method$1:t},parent$k=lastIndexOf$6,lastIndexOf$5=parent$k,parent$j=lastIndexOf$5,lastIndexOf$4=parent$j,parent$i=lastIndexOf$4,lastIndexOf$3=parent$i,lastIndexOf$2=lastIndexOf$3,lastIndexOf$1=lastIndexOf$2,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf$1),$$x=_export$2,fails$j=fails$20,$imul$1=Math.imul,FORCED$b=fails$j((function(){return-5!=$imul$1(4294967295,5)||2!=$imul$1.length}));$$x({target:"Math",stat:!0,forced:FORCED$b},{imul:function(e,t){var r=65535,n=+e,o=+t,i=r&n,a=r&o;return 0|i*a+((r&n>>>16)*a+i*(r&o>>>16)<<16>>>0)}});var path$8=path$C,imul$5=path$8.Math.imul,parent$h=imul$5,imul$4=parent$h,parent$g=imul$4,imul$3=parent$g,parent$f=imul$3,imul$2=parent$f,imul$1=imul$2,imul2=imul$1,_Math$imul=getDefaultExportFromCjs(imul2),mathSign$1=Math.sign||function(e){var t=+e;return 0==t||t!=t?t:t<0?-1:1},sign$1=mathSign$1,abs$1=Math.abs,pow$2=Math.pow,EPSILON$1=pow$2(2,-52),EPSILON32$1=pow$2(2,-23),MAX32$1=pow$2(2,127)*(2-EPSILON32$1),MIN32$1=pow$2(2,-126),roundTiesToEven$1=function(e){return e+1/EPSILON$1-1/EPSILON$1},mathFround$1=Math.fround||function(e){var t,r,n=+e,o=abs$1(n),i=sign$1(n);return o<MIN32$1?i*roundTiesToEven$1(o/MIN32$1/EPSILON32$1)*MIN32$1*EPSILON32$1:(r=(t=(1+EPSILON32$1/EPSILON$1)*o)-(t-o))>MAX32$1||r!=r?i*(1/0):i*r},$$w=_export$2,fround$7=mathFround$1;$$w({target:"Math",stat:!0},{fround:fround$7});var path$7=path$C,fround$6=path$7.Math.fround,parent$e=fround$6,fround$5=parent$e,parent$d=fround$5,fround$4=parent$d,parent$c=fround$4,fround$3=parent$c,fround$2=fround$3,fround$1=fround$2,_Math$fround=getDefaultExportFromCjs(fround$1),$$v=_export$2,floor$2=Math.floor,log$2=Math.log,LOG2E$1=Math.LOG2E;$$v({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-floor$2(log$2(t+.5)*LOG2E$1):32}});var path$6=path$C,clz32$5=path$6.Math.clz32,parent$b=clz32$5,clz32$4=parent$b,parent$a=clz32$4,clz32$3=parent$a,parent$9=clz32$3,clz32$2=parent$9,clz32$1=clz32$2,clz322=clz32$1,_Math$clz=getDefaultExportFromCjs(clz322),$$u=_export$2,trunc$7=mathTrunc$2;$$u({target:"Math",stat:!0},{trunc:trunc$7});var path$5=path$C,trunc$6=path$5.Math.trunc,parent$8=trunc$6,trunc$5=parent$8,parent$7=trunc$5,trunc$4=parent$7,parent$6=trunc$4,trunc$3=parent$6,trunc$2=trunc$3,trunc$1=trunc$2,_Math$trunc=getDefaultExportFromCjs(trunc$1),$$t=_export$1,lastIndexOf6=arrayLastIndexOf$1;$$t({target:"Array",proto:!0,forced:arrayLastIndexOf$1!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf$1});var $$s=_export$1,fails$i=fails$1C,toIndexedObject$5=toIndexedObject$p,nativeGetOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor$1.f,DESCRIPTORS$7=descriptors$1,FAILS_ON_PRIMITIVES$2=fails$i((function(){nativeGetOwnPropertyDescriptor$1(1)})),FORCED$a=!DESCRIPTORS$7||FAILS_ON_PRIMITIVES$2;$$s({target:"Object",stat:!0,forced:FORCED$a,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor$1(toIndexedObject$5(e),t)}});var $$r=_export$1,DESCRIPTORS$6=descriptors$1,defineProperty$4=objectDefineProperty$1.f;$$r({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$4,sham:!DESCRIPTORS$6},{defineProperty:defineProperty$4});var createTypedArrayConstructor$7=typedArrayConstructorExports;createTypedArrayConstructor$7("Int8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$6=typedArrayConstructorExports;createTypedArrayConstructor$6("Int16",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$5=typedArrayConstructorExports;createTypedArrayConstructor$5("Int32",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$4=typedArrayConstructorExports;createTypedArrayConstructor$4("Uint16",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$3=typedArrayConstructorExports;createTypedArrayConstructor$3("Uint32",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$2=typedArrayConstructorExports;createTypedArrayConstructor$2("Float32",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var createTypedArrayConstructor$1=typedArrayConstructorExports;createTypedArrayConstructor$1("Float64",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var $$q=_export$1,fails$h=fails$1C,$imul=Math.imul,FORCED$9=fails$h((function(){return-5!=$imul(4294967295,5)||2!=$imul.length}));$$q({target:"Math",stat:!0,forced:FORCED$9},{imul:function(e,t){var r=65535,n=+e,o=+t,i=r&n,a=r&o;return 0|i*a+((r&n>>>16)*a+i*(r&o>>>16)<<16>>>0)}});var mathSign=Math.sign||function(e){var t=+e;return 0==t||t!=t?t:t<0?-1:1},sign3=mathSign,abs=Math.abs,pow$1=Math.pow,EPSILON=pow$1(2,-52),EPSILON32=pow$1(2,-23),MAX32=pow$1(2,127)*(2-EPSILON32),MIN32=pow$1(2,-126),roundTiesToEven=function(e){return e+1/EPSILON-1/EPSILON},mathFround=Math.fround||function(e){var t,r,n=+e,o=abs(n),i=sign3(n);return o<MIN32?i*roundTiesToEven(o/MIN32/EPSILON32)*MIN32*EPSILON32:(r=(t=(1+EPSILON32/EPSILON)*o)-(t-o))>MAX32||r!=r?i*(1/0):i*r},$$p=_export$1,fround3=mathFround;$$p({target:"Math",stat:!0},{fround:fround3});var $$o=_export$1,floor$1=Math.floor,log$1=Math.log,LOG2E=Math.LOG2E;$$o({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-floor$1(log$1(t+.5)*LOG2E):32}});var $$n=_export$1,trunc4=mathTrunc$1;$$n({target:"Math",stat:!0},{trunc:trunc4});var $$m=_export$1,uncurryThis$e=functionUncurryThisClause$1,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor$1.f,toLength=toLength$k,toString$9=toString$A,notARegExp=notARegexp,requireObjectCoercible$1=requireObjectCoercible$l,correctIsRegExpLogic=correctIsRegexpLogic,nativeStartsWith=uncurryThis$e("".startsWith),stringSlice$3=uncurryThis$e("".slice),min=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic("startsWith"),MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var e=getOwnPropertyDescriptor$1(String.prototype,"startsWith");return e&&!e.writable}();$$m({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function(e){var t=toString$9(requireObjectCoercible$1(this));notARegExp(e);var r=toLength(min(arguments.length>1?arguments[1]:void 0,t.length)),n=toString$9(e);return nativeStartsWith?nativeStartsWith(t,n,r):stringSlice$3(t,r,r+n.length)===n}});var aw=function(){var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(t){var r,n,o,i=void 0!==(t=t||{})?t:{},a={};for(o in i)i.hasOwnProperty(o)&&(a[o]=i[o]);var s=!0;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var l,c="";if(document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=0!==_indexOfInstanceProperty(c).call(c,"blob:")?c.substr(0,_lastIndexOfInstanceProperty(c).call(c,"/")+1):"","object"!==("undefined"==typeof window?"undefined":_typeof$4(window))&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var u,$=i.print||_bindInstanceProperty(r=console.log).call(r,console),d=i.printErr||_bindInstanceProperty(n=console.warn).call(n,console);for(o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);function p(e){p.shown||(p.shown={}),p.shown[e]||(p.shown[e]=1,d(e))}a=null,i.arguments&&i.arguments,_Object$getOwnPropertyDescriptor(i,"arguments")||_Object$defineProperty(i,"arguments",{configurable:!0,get:function(){K("Module.arguments has been replaced with plain arguments_")}}),i.thisProgram&&i.thisProgram,_Object$getOwnPropertyDescriptor(i,"thisProgram")||_Object$defineProperty(i,"thisProgram",{configurable:!0,get:function(){K("Module.thisProgram has been replaced with plain thisProgram")}}),i.quit&&i.quit,_Object$getOwnPropertyDescriptor(i,"quit")||_Object$defineProperty(i,"quit",{configurable:!0,get:function(){K("Module.quit has been replaced with plain quit_")}}),b(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),b(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),b(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),b(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),b(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),b(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),b(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),b(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),_Object$getOwnPropertyDescriptor(i,"read")||_Object$defineProperty(i,"read",{configurable:!0,get:function(){K("Module.read has been replaced with plain read_")}}),_Object$getOwnPropertyDescriptor(i,"readAsync")||_Object$defineProperty(i,"readAsync",{configurable:!0,get:function(){K("Module.readAsync has been replaced with plain readAsync")}}),_Object$getOwnPropertyDescriptor(i,"readBinary")||_Object$defineProperty(i,"readBinary",{configurable:!0,get:function(){K("Module.readBinary has been replaced with plain readBinary")}}),pe=function(){K("cannot use the stack before compiled code is ready to run, and has provided stack access")},i.wasmBinary&&(u=i.wasmBinary),_Object$getOwnPropertyDescriptor(i,"wasmBinary")||_Object$defineProperty(i,"wasmBinary",{configurable:!0,get:function(){K("Module.wasmBinary has been replaced with plain wasmBinary")}}),i.noExitRuntime&&i.noExitRuntime,_Object$getOwnPropertyDescriptor(i,"noExitRuntime")||_Object$defineProperty(i,"noExitRuntime",{configurable:!0,get:function(){K("Module.noExitRuntime has been replaced with plain noExitRuntime")}});var y,f={Memory:function(e){return{buffer:new ArrayBuffer(65536*e.initial),grow:function(e){var t=this.buffer,r=fe(e);return b(this.buffer!==t),r}}},Table:function(e){var t=new Array(e.initial);return t.grow=function(e){t.length>=1&&K("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."),t.push(null)},t.set=function(e,r){t[e]=r},t.get=function(e){return t[e]},t},Module:function(e){return{}},Instance:function(e,t){var r,n=(r=h,function(e,t,n){var o=t.memory,i=r,a=new e.Int8Array(n);new e.Int16Array(n);var s=new e.Int32Array(n),l=new e.Uint8Array(n);new e.Uint16Array(n);var c=new e.Uint32Array(n);new e.Float32Array(n),new e.Float64Array(n);var u=e.Math.imul;e.Math.fround,e.Math.abs,e.Math.clz32,e.Math.min,e.Math.max,e.Math.floor,e.Math.ceil,e.Math.sqrt,t.abort,e.NaN,e.Infinity;var $=t.emscripten_memcpy_big,d=t.emscripten_resize_heap,p=t.__unlock,y=t.__lock,f=9744;function h(e){var t,r=0;return t=T(),(e=(r=s[388])+e|0)>>>0<=t<<16>>>0||d(0|e)?(s[388]=e,r):(s[256]=48,-1)}function m(e){var t,r=0,n=0,o=0,i=0,a=0,u=0,$=0,d=0,p=0,y=0,m=0,b=0;f=t=f-16|0;e:{t:{r:{n:{o:{i:{a:{s:{l:{c:{u:{if((e|=0)>>>0<=244){if(3&(r=(a=s[261])>>>(e=(u=e>>>0<11?16:e+11&-8)>>>3))){e=(r=s[1092+(i=(n=e+(1&(-1^r))|0)<<3)>>2])+8|0,(0|(o=s[r+8>>2]))!=(0|(i=i+1084|0))?(s[o+12>>2]=i,s[i+8>>2]=o):(m=1044,b=I(n)&a,s[m>>2]=b),n<<=3,s[r+4>>2]=3|n,s[4+(r=r+n|0)>>2]=1|s[r+4>>2];break e}if(u>>>0<=(d=s[263])>>>0)break u;if(r){n=r=(e=(0-(e=(0-(n=2<<e)|n)&r<<e)&e)-1|0)>>>12&16,n|=r=(e>>>=r)>>>5&8,n|=r=(e>>>=r)>>>2&4,r=s[1092+(o=(n=((n|=r=(e>>>=r)>>>1&2)|(r=(e>>>=r)>>>1&1))+(e>>>r)|0)<<3)>>2],(0|(e=s[r+8>>2]))!=(0|(o=o+1084|0))?(s[e+12>>2]=o,s[o+8>>2]=e):(a=I(n)&a,s[261]=a),e=r+8|0,s[r+4>>2]=3|u,i=(n<<=3)-u|0,s[4+($=r+u|0)>>2]=1|i,s[r+n>>2]=i,d&&(r=1084+((n=d>>>3)<<3)|0,o=s[266],(n=1<<n)&a?n=s[r+8>>2]:(s[261]=n|a,n=r),s[r+8>>2]=o,s[n+12>>2]=o,s[o+12>>2]=r,s[o+8>>2]=n),s[266]=$,s[263]=i;break e}if(!(y=s[262]))break u;for(n=r=(e=(y&0-y)-1|0)>>>12&16,n|=r=(e>>>=r)>>>5&8,n|=r=(e>>>=r)>>>2&4,r=s[1348+(((n|=r=(e>>>=r)>>>1&2)|(r=(e>>>=r)>>>1&1))+(e>>>r)<<2)>>2],o=(-8&s[r+4>>2])-u|0,n=r;(e=s[n+16>>2])||(e=s[n+20>>2]);)o=(n=(i=(-8&s[e+4>>2])-u|0)>>>0<o>>>0)?i:o,r=n?e:r,n=e;if(p=s[r+24>>2],(0|(i=s[r+12>>2]))!=(0|r)){e=s[r+8>>2],s[e+12>>2]=i,s[i+8>>2]=e;break t}if(!(e=s[(n=r+20|0)>>2])){if(!(e=s[r+16>>2]))break c;n=r+16|0}for(;$=n,i=e,(e=s[(n=e+20|0)>>2])||(n=i+16|0,e=s[i+16>>2]););s[$>>2]=0;break t}if(u=-1,!(e>>>0>4294967231)&&(u=-8&(r=e+11|0),d=s[262])){n=0-u|0,a=0,(r>>>=8)&&(a=31,u>>>0>16777215||(a=28+((e=((a=(r<<=o=r+1048320>>>16&8)<<(e=r+520192>>>16&4))<<(r=a+245760>>>16&2)>>>15)-(r|e|o)|0)<<1|u>>>e+21&1)|0));$:{d:{if(o=s[1348+(a<<2)>>2])for(r=u<<(31==(0|a)?0:25-(a>>>1)|0),e=0;;){if(!(($=(-8&s[o+4>>2])-u|0)>>>0>=n>>>0||(i=o,n=$))){n=0,e=o;break d}if($=s[o+20>>2],o=s[16+((r>>>29&4)+o|0)>>2],e=$?(0|$)==(0|o)?e:$:e,r<<=0!=(0|o),!o)break}else e=0;if(!(e|i)){if(!(e=(0-(e=2<<a)|e)&d))break u;o=r=(e=(e&0-e)-1|0)>>>12&16,o|=r=(e>>>=r)>>>5&8,o|=r=(e>>>=r)>>>2&4,e=s[1348+(((o|=r=(e>>>=r)>>>1&2)|(r=(e>>>=r)>>>1&1))+(e>>>r)<<2)>>2]}if(!e)break $}for(;n=(r=(o=(-8&s[e+4>>2])-u|0)>>>0<n>>>0)?o:n,i=r?e:i,e=(r=s[e+16>>2])||s[e+20>>2];);}if(!(!i|n>>>0>=s[263]-u>>>0)){if($=s[i+24>>2],(0|i)!=(0|(r=s[i+12>>2]))){e=s[i+8>>2],s[e+12>>2]=r,s[r+8>>2]=e;break r}if(!(e=s[(o=i+20|0)>>2])){if(!(e=s[i+16>>2]))break l;o=i+16|0}for(;a=o,r=e,(e=s[(o=e+20|0)>>2])||(o=r+16|0,e=s[r+16>>2]););s[a>>2]=0;break r}}}if((r=s[263])>>>0>=u>>>0){e=s[266],(n=r-u|0)>>>0>=16?(s[263]=n,o=e+u|0,s[266]=o,s[o+4>>2]=1|n,s[e+r>>2]=n,s[e+4>>2]=3|u):(s[266]=0,s[263]=0,s[e+4>>2]=3|r,s[4+(r=e+r|0)>>2]=1|s[r+4>>2]),e=e+8|0;break e}if((o=s[264])>>>0>u>>>0){r=o-u|0,s[264]=r,n=(e=s[267])+u|0,s[267]=n,s[n+4>>2]=1|r,s[e+4>>2]=3|u,e=e+8|0;break e}if(e=0,n=i=u+47|0,s[379]?r=s[381]:(s[382]=-1,s[383]=-1,s[380]=4096,s[381]=4096,s[379]=t+12&-16^1431655768,s[384]=0,s[372]=0,r=4096),(n=(a=n+r|0)&($=0-r|0))>>>0<=u>>>0)break e;if((r=s[371])&&(p=(d=s[369])+n|0)>>>0<=d>>>0|p>>>0>r>>>0)break e;if(4&l[1488])break i;u:{$:{if(r=s[267])for(e=1492;;){if((d=s[e>>2])+s[e+4>>2]>>>0>r>>>0&&d>>>0<=r>>>0)break $;if(!(e=s[e+8>>2]))break}if(-1==(0|(r=h(0))))break a;if(a=n,(o=(e=s[380])+-1|0)&r&&(a=(n-r|0)+(r+o&0-e)|0),a>>>0<=u>>>0|a>>>0>2147483646)break a;if((e=s[371])&&($=(o=s[369])+a|0)>>>0<=o>>>0|$>>>0>e>>>0)break a;if((0|r)!=(0|(e=h(a))))break u;break o}if((a=$&a-o)>>>0>2147483646)break a;if((0|(r=h(a)))==(s[e>>2]+s[e+4>>2]|0))break s;e=r}if(r=e,!(u+48>>>0<=a>>>0|a>>>0>2147483646|-1==(0|e))){if((e=(e=s[381])+(i-a|0)&0-e)>>>0>2147483646)break o;if(-1!=(0|h(e))){a=e+a|0;break o}h(0-a|0);break a}if(-1!=(0|r))break o;break a}i=0;break t}r=0;break r}if(-1!=(0|r))break o}s[372]=4|s[372]}if(n>>>0>2147483646)break n;if((r=h(n))>>>0>=(e=h(0))>>>0|-1==(0|r)|-1==(0|e))break n;if((a=e-r|0)>>>0<=u+40>>>0)break n}e=s[369]+a|0,s[369]=e,e>>>0>c[370]&&(s[370]=e);o:{i:{a:{if(n=s[267]){for(e=1492;;){if(((o=s[e>>2])+(i=s[e+4>>2])|0)==(0|r))break a;if(!(e=s[e+8>>2]))break}break i}for(r>>>0>=(e=s[265])>>>0&&e||(s[265]=r),e=0,s[374]=a,s[373]=r,s[269]=-1,s[270]=s[379],s[376]=0;o=1084+(n=e<<3)|0,s[n+1092>>2]=o,s[n+1096>>2]=o,32!=(0|(e=e+1|0)););o=(e=a+-40|0)-(n=r+8&7?-8-r&7:0)|0,s[264]=o,n=r+n|0,s[267]=n,s[n+4>>2]=1|o,s[4+(e+r|0)>>2]=40,s[268]=s[383];break o}if(!(8&l[e+12|0]|r>>>0<=n>>>0|o>>>0>n>>>0)){s[e+4>>2]=i+a,r=(e=n+8&7?-8-n&7:0)+n|0,s[267]=r,e=(o=s[264]+a|0)-e|0,s[264]=e,s[r+4>>2]=1|e,s[4+(n+o|0)>>2]=40,s[268]=s[383];break o}}r>>>0<(i=s[265])>>>0&&(s[265]=r,i=0),o=r+a|0,e=1492;i:{a:{s:{l:{c:{u:{for(;;){if((0|o)!=s[e>>2]){if(e=s[e+8>>2])continue;break u}break}if(!(8&l[e+12|0]))break c}for(e=1492;;){if((o=s[e>>2])>>>0<=n>>>0&&(i=o+s[e+4>>2]|0)>>>0>n>>>0)break l;e=s[e+8>>2]}}if(s[e>>2]=r,s[e+4>>2]=s[e+4>>2]+a,s[4+(p=(r+8&7?-8-r&7:0)+r|0)>>2]=3|u,e=((r=o+(o+8&7?-8-o&7:0)|0)-p|0)-u|0,$=u+p|0,(0|r)==(0|n)){s[267]=$,e=s[264]+e|0,s[264]=e,s[$+4>>2]=1|e;break a}if(s[266]==(0|r)){s[266]=$,e=s[263]+e|0,s[263]=e,s[$+4>>2]=1|e,s[e+$>>2]=e;break a}if(1==(3&(n=s[r+4>>2]))){y=-8&n;c:if(n>>>0<=255){if(i=n>>>3,n=s[r+8>>2],(0|(o=s[r+12>>2]))==(0|n)){m=1044,b=s[261]&I(i),s[m>>2]=b;break c}s[n+12>>2]=o,s[o+8>>2]=n}else{if(d=s[r+24>>2],(0|(a=s[r+12>>2]))==(0|r))if((u=s[(o=r+20|0)>>2])||(u=s[(o=r+16|0)>>2])){for(;n=o,a=u,(u=s[(o=u+20|0)>>2])||(o=a+16|0,u=s[a+16>>2]););s[n>>2]=0}else a=0;else n=s[r+8>>2],s[n+12>>2]=a,s[a+8>>2]=n;if(d){n=s[r+28>>2];u:{if(s[(o=1348+(n<<2)|0)>>2]==(0|r)){if(s[o>>2]=a,a)break u;m=1048,b=s[262]&I(n),s[m>>2]=b;break c}if(s[d+(s[d+16>>2]==(0|r)?16:20)>>2]=a,!a)break c}s[a+24>>2]=d,(n=s[r+16>>2])&&(s[a+16>>2]=n,s[n+24>>2]=a),(n=s[r+20>>2])&&(s[a+20>>2]=n,s[n+24>>2]=a)}}r=r+y|0,e=e+y|0}if(s[r+4>>2]=-2&s[r+4>>2],s[$+4>>2]=1|e,s[e+$>>2]=e,e>>>0<=255){e=1084+((r=e>>>3)<<3)|0,(n=s[261])&(r=1<<r)?r=s[e+8>>2]:(s[261]=r|n,r=e),s[e+8>>2]=$,s[r+12>>2]=$,s[$+12>>2]=e,s[$+8>>2]=r;break a}if(r=0,(o=e>>>8)&&(r=31,e>>>0>16777215||(r=28+((r=((u=(o<<=i=o+1048320>>>16&8)<<(r=o+520192>>>16&4))<<(o=u+245760>>>16&2)>>>15)-(o|r|i)|0)<<1|e>>>r+21&1)|0)),s[(n=$)+28>>2]=r,s[$+16>>2]=0,s[$+20>>2]=0,n=1348+(r<<2)|0,(o=s[262])&(i=1<<r)){for(o=e<<(31==(0|r)?0:25-(r>>>1)|0),r=s[n>>2];;){if(n=r,(-8&s[r+4>>2])==(0|e))break s;if(r=o>>>29,o<<=1,!(r=s[16+(i=(4&r)+n|0)>>2]))break}s[i+16>>2]=$}else s[262]=o|i,s[n>>2]=$;s[$+24>>2]=n,s[$+12>>2]=$,s[$+8>>2]=$;break a}for($=(e=a+-40|0)-(o=r+8&7?-8-r&7:0)|0,s[264]=$,o=r+o|0,s[267]=o,s[o+4>>2]=1|$,s[4+(e+r|0)>>2]=40,s[268]=s[383],s[(o=(e=(i+(i+-39&7?39-i&7:0)|0)-47|0)>>>0<n+16>>>0?n:e)+4>>2]=27,e=s[376],s[o+16>>2]=s[375],s[o+20>>2]=e,e=s[374],s[o+8>>2]=s[373],s[o+12>>2]=e,s[375]=o+8,s[374]=a,s[373]=r,s[376]=0,e=o+24|0;s[e+4>>2]=7,r=e+8|0,e=e+4|0,r>>>0<i>>>0;);if((0|n)==(0|o))break o;if(s[o+4>>2]=-2&s[o+4>>2],i=o-n|0,s[n+4>>2]=1|i,s[o>>2]=i,i>>>0<=255){e=1084+((r=i>>>3)<<3)|0,(o=s[261])&(r=1<<r)?r=s[e+8>>2]:(s[261]=r|o,r=e),s[e+8>>2]=n,s[r+12>>2]=n,s[n+12>>2]=e,s[n+8>>2]=r;break o}if(s[n+16>>2]=0,s[n+20>>2]=0,e=0,(o=i>>>8)&&(e=31,i>>>0>16777215||(e=28+((e=(($=(o<<=a=o+1048320>>>16&8)<<(e=o+520192>>>16&4))<<(o=$+245760>>>16&2)>>>15)-(o|e|a)|0)<<1|i>>>e+21&1)|0)),s[(r=n)+28>>2]=e,r=1348+(e<<2)|0,(o=s[262])&(a=1<<e)){for(e=i<<(31==(0|e)?0:25-(e>>>1)|0),r=s[r>>2];;){if(o=r,(0|i)==(-8&s[r+4>>2]))break i;if(r=e>>>29,e<<=1,!(r=s[16+(a=o+(4&r)|0)>>2]))break}s[a+16>>2]=n,s[n+24>>2]=o}else s[262]=o|a,s[r>>2]=n,s[n+24>>2]=r;s[n+12>>2]=n,s[n+8>>2]=n;break o}e=s[n+8>>2],s[e+12>>2]=$,s[n+8>>2]=$,s[$+24>>2]=0,s[$+12>>2]=n,s[$+8>>2]=e}e=p+8|0;break e}e=s[o+8>>2],s[e+12>>2]=n,s[o+8>>2]=n,s[n+24>>2]=0,s[n+12>>2]=o,s[n+8>>2]=e}if(!((e=s[264])>>>0<=u>>>0)){r=e-u|0,s[264]=r,n=(e=s[267])+u|0,s[267]=n,s[n+4>>2]=1|r,s[e+4>>2]=3|u,e=e+8|0;break e}}s[256]=48,e=0;break e}r:if($){e=s[i+28>>2];n:{if(s[(o=1348+(e<<2)|0)>>2]==(0|i)){if(s[o>>2]=r,r)break n;d=I(e)&d,s[262]=d;break r}if(s[$+(s[$+16>>2]==(0|i)?16:20)>>2]=r,!r)break r}s[r+24>>2]=$,(e=s[i+16>>2])&&(s[r+16>>2]=e,s[e+24>>2]=r),(e=s[i+20>>2])&&(s[r+20>>2]=e,s[e+24>>2]=r)}r:if(n>>>0<=15)e=n+u|0,s[i+4>>2]=3|e,s[4+(e=e+i|0)>>2]=1|s[e+4>>2];else if(s[i+4>>2]=3|u,s[4+(o=i+u|0)>>2]=1|n,s[n+o>>2]=n,n>>>0<=255)e=1084+((r=n>>>3)<<3)|0,(n=s[261])&(r=1<<r)?r=s[e+8>>2]:(s[261]=r|n,r=e),s[e+8>>2]=o,s[r+12>>2]=o,s[o+12>>2]=e,s[o+8>>2]=r;else{e=0,(u=n>>>8)&&(e=31,n>>>0>16777215||(e=28+((e=(($=(u<<=a=u+1048320>>>16&8)<<(e=u+520192>>>16&4))<<(u=$+245760>>>16&2)>>>15)-(u|e|a)|0)<<1|n>>>e+21&1)|0)),s[(r=o)+28>>2]=e,s[o+16>>2]=0,s[o+20>>2]=0,r=1348+(e<<2)|0;n:{if((u=1<<e)&d){for(e=n<<(31==(0|e)?0:25-(e>>>1)|0),u=s[r>>2];;){if((-8&s[(r=u)+4>>2])==(0|n))break n;if(u=e>>>29,e<<=1,!(u=s[16+(a=(4&u)+r|0)>>2]))break}s[a+16>>2]=o}else s[262]=u|d,s[r>>2]=o;s[o+24>>2]=r,s[o+12>>2]=o,s[o+8>>2]=o;break r}e=s[r+8>>2],s[e+12>>2]=o,s[r+8>>2]=o,s[o+24>>2]=0,s[o+12>>2]=r,s[o+8>>2]=e}e=i+8|0;break e}t:if(p){e=s[r+28>>2];r:{if(s[(n=1348+(e<<2)|0)>>2]==(0|r)){if(s[n>>2]=i,i)break r;m=1048,b=I(e)&y,s[m>>2]=b;break t}if(s[p+(s[p+16>>2]==(0|r)?16:20)>>2]=i,!i)break t}s[i+24>>2]=p,(e=s[r+16>>2])&&(s[i+16>>2]=e,s[e+24>>2]=i),(e=s[r+20>>2])&&(s[i+20>>2]=e,s[e+24>>2]=i)}o>>>0<=15?(e=o+u|0,s[r+4>>2]=3|e,s[4+(e=e+r|0)>>2]=1|s[e+4>>2]):(s[r+4>>2]=3|u,s[4+(u=r+u|0)>>2]=1|o,s[o+u>>2]=o,d&&(e=1084+((n=d>>>3)<<3)|0,i=s[266],(n=1<<n)&a?n=s[e+8>>2]:(s[261]=n|a,n=e),s[e+8>>2]=i,s[n+12>>2]=i,s[i+12>>2]=e,s[i+8>>2]=n),s[266]=u,s[263]=o),e=r+8|0}return f=t+16|0,0|e}function b(e){var t=0,r=0,n=0,o=0,i=0,a=0,l=0,u=0,$=0;e:if(e|=0){i=(n=e+-8|0)+(e=-8&(r=s[e+-4>>2]))|0;t:if(!(1&r)){if(!(3&r))break e;if((n=n-(r=s[n>>2])|0)>>>0<c[265])break e;if(e=e+r|0,s[266]==(0|n)){if(3==(3&(r=s[i+4>>2])))return s[263]=e,s[i+4>>2]=-2&r,s[n+4>>2]=1|e,void(s[e+n>>2]=e)}else{if(r>>>0<=255){if(o=s[n+8>>2],r>>>=3,(0|(t=s[n+12>>2]))==(0|o)){u=1044,$=s[261]&I(r),s[u>>2]=$;break t}s[o+12>>2]=t,s[t+8>>2]=o;break t}if(l=s[n+24>>2],(0|n)==(0|(r=s[n+12>>2])))if((t=s[(o=n+20|0)>>2])||(t=s[(o=n+16|0)>>2])){for(;a=o,(t=s[(o=(r=t)+20|0)>>2])||(o=r+16|0,t=s[r+16>>2]););s[a>>2]=0}else r=0;else t=s[n+8>>2],s[t+12>>2]=r,s[r+8>>2]=t;if(!l)break t;o=s[n+28>>2];r:{if(s[(t=1348+(o<<2)|0)>>2]==(0|n)){if(s[t>>2]=r,r)break r;u=1048,$=s[262]&I(o),s[u>>2]=$;break t}if(s[l+(s[l+16>>2]==(0|n)?16:20)>>2]=r,!r)break t}if(s[r+24>>2]=l,(t=s[n+16>>2])&&(s[r+16>>2]=t,s[t+24>>2]=r),!(t=s[n+20>>2]))break t;s[r+20>>2]=t,s[t+24>>2]=r}}if(!(i>>>0<=n>>>0)&&1&(r=s[i+4>>2])){t:{if(!(2&r)){if(s[267]==(0|i)){if(s[267]=n,e=s[264]+e|0,s[264]=e,s[n+4>>2]=1|e,s[266]!=(0|n))break e;return s[263]=0,void(s[266]=0)}if(s[266]==(0|i))return s[266]=n,e=s[263]+e|0,s[263]=e,s[n+4>>2]=1|e,void(s[e+n>>2]=e);e=(-8&r)+e|0;r:if(r>>>0<=255){if(r>>>=3,(0|(t=s[i+8>>2]))==(0|(o=s[i+12>>2]))){u=1044,$=s[261]&I(r),s[u>>2]=$;break r}s[t+12>>2]=o,s[o+8>>2]=t}else{if(l=s[i+24>>2],(0|i)==(0|(r=s[i+12>>2])))if((t=s[(o=i+20|0)>>2])||(t=s[(o=i+16|0)>>2])){for(;a=o,(t=s[(o=(r=t)+20|0)>>2])||(o=r+16|0,t=s[r+16>>2]););s[a>>2]=0}else r=0;else t=s[i+8>>2],s[t+12>>2]=r,s[r+8>>2]=t;if(l){o=s[i+28>>2];n:{if(s[(t=1348+(o<<2)|0)>>2]==(0|i)){if(s[t>>2]=r,r)break n;u=1048,$=s[262]&I(o),s[u>>2]=$;break r}if(s[l+(s[l+16>>2]==(0|i)?16:20)>>2]=r,!r)break r}s[r+24>>2]=l,(t=s[i+16>>2])&&(s[r+16>>2]=t,s[t+24>>2]=r),(t=s[i+20>>2])&&(s[r+20>>2]=t,s[t+24>>2]=r)}}if(s[n+4>>2]=1|e,s[e+n>>2]=e,s[266]!=(0|n))break t;return void(s[263]=e)}s[i+4>>2]=-2&r,s[n+4>>2]=1|e,s[e+n>>2]=e}if(e>>>0<=255)return r=1084+((e>>>=3)<<3)|0,(t=s[261])&(e=1<<e)?e=s[r+8>>2]:(s[261]=e|t,e=r),s[r+8>>2]=n,s[e+12>>2]=n,s[n+12>>2]=r,void(s[n+8>>2]=e);s[n+16>>2]=0,s[n+20>>2]=0,t=0,(o=e>>>8)&&(t=31,e>>>0>16777215||(t=o,t<<=o=o+1048320>>>16&8,t=28+((t=((t<<=l=t+520192>>>16&4)<<(a=t+245760>>>16&2)>>>15)-(a|o|l)|0)<<1|e>>>t+21&1)|0)),s[(r=n)+28>>2]=t,a=1348+(t<<2)|0;t:if((o=s[262])&(r=1<<t)){o=e<<(31==(0|t)?0:25-(t>>>1)|0),r=s[a>>2];r:{for(;;){if(t=r,(-8&s[r+4>>2])==(0|e))break r;if(r=o>>>29,o<<=1,!(r=s[16+(a=t+(4&r)|0)>>2]))break}s[a+16>>2]=n,s[n+12>>2]=n,s[n+24>>2]=t,s[n+8>>2]=n;break t}e=s[t+8>>2],s[e+12>>2]=n,s[t+8>>2]=n,s[n+24>>2]=0,s[n+12>>2]=t,s[n+8>>2]=e}else s[262]=r|o,s[a>>2]=n,s[n+12>>2]=n,s[n+24>>2]=a,s[n+8>>2]=n;if(e=s[269]+-1|0,s[269]=e,!e){for(n=1500;n=(e=s[n>>2])+8|0,e;);s[269]=-1}}}}function g(e){var t,r=0;return c[e+20>>2]<=c[e+28>>2]||(i[s[e+36>>2]](e,0,0),s[e+20>>2])?((r=s[e+4>>2])>>>0<(t=s[e+8>>2])>>>0&&(r=r-t|0,i[s[e+40>>2]](e,r,r>>31,1)),s[e+28>>2]=0,s[e+16>>2]=0,s[e+20>>2]=0,s[e+4>>2]=0,s[e+8>>2]=0,0):-1}function S(e){for(var t=0,r=0;r=t,e;)e&=e-1,t=t+1|0;return r}function I(e){var t;return(-1>>>(t=31&e)&-2)<<t|(-1<<(e=0-e&31)&-2)>>>e}function T(){return n.byteLength/65536|0}return{__wasm_call_ctors:function(){},malloc:m,openBox:function(e,t){e|=0,t|=0;var r,n,o,i=0;return f=r=f-16|0,s[r+12>>2]=0,s[r+8>>2]=0,s[r+4>>2]=0,s[r>>2]=0,function(e,t,r,n,o,i){var c=0,u=0,$=0,d=0,p=0,y=0;if(c=(l[e+2|0]^l[e+1|0]^l[0|e])<<24>>24,s[i>>2]=c+-48,c=47+(t-c|0)|0,s[n>>2]=c,p=r,y=m(c),s[p>>2]=y,u=s[i>>2],$=m(u),s[o>>2]=$,(0|u)>0)for(c=u;;){if($=(u-c|0)+$|0,u=(t-u|0)+e|0,a[0|$]=l[(t-c|0)+e|0]^l[u+-1|0]^l[u+-2|0],(0|(c=c+-1|0))<1){c=s[n>>2];break}$=s[o>>2],u=s[i>>2]}if((0|c)>0)for(;t=s[r>>2]+d|0,d=d+1|0,a[0|t]=l[d+e|0],(0|d)<s[n>>2];);}(e,t,r+12|0,r+4|0,r+8|0,r),function(e,t){var r=0,n=0,o=0,i=0,s=0,c=0,u=0;if((0|t)>=1)for(o=85,i=250;n=S(r),s=l[0|(c=e+r|0)],u=n,n=1&r,a[0|c]=u+(21+((s^(n?o:i))<<24>>24)|0),i=n?i:s,o=n?s:o,(0|(r=r+1|0))!=(0|t););}(e=s[r+12>>2],t=s[r+4>>2]),n=function(e){var t=0;return(255&(t=e+-48|0))>>>0<=9?t<<24>>24:((e+-97&255)>>>0<26?e+-87|0:-1)<<24>>24}(a[0|e]),s[r>>2]=n,o=m(i=t-n|0),a[o+(i=i+-1|0)|0]=0,(0|i)>=1&&function(e,t,r){var n,o=0;if(r>>>0>=8192)$(0|e,0|t,0|r);else{n=e+r|0;e:if(3&(e^t))if(n>>>0<4)r=e;else if((o=n+-4|0)>>>0<e>>>0)r=e;else for(r=e;a[0|r]=l[0|t],a[r+1|0]=l[t+1|0],a[r+2|0]=l[t+2|0],a[r+3|0]=l[t+3|0],t=t+4|0,(r=r+4|0)>>>0<=o>>>0;);else{t:if((0|r)<1)r=e;else if(3&e)for(r=e;;){if(a[0|r]=l[0|t],t=t+1|0,(r=r+1|0)>>>0>=n>>>0)break t;if(!(3&r))break}else r=e;if(!((e=-4&n)>>>0<64||r>>>0>(o=e+-64|0)>>>0))for(;s[r>>2]=s[t>>2],s[r+4>>2]=s[t+4>>2],s[r+8>>2]=s[t+8>>2],s[r+12>>2]=s[t+12>>2],s[r+16>>2]=s[t+16>>2],s[r+20>>2]=s[t+20>>2],s[r+24>>2]=s[t+24>>2],s[r+28>>2]=s[t+28>>2],s[r+32>>2]=s[t+32>>2],s[r+36>>2]=s[t+36>>2],s[r+40>>2]=s[t+40>>2],s[r+44>>2]=s[t+44>>2],s[r+48>>2]=s[t+48>>2],s[r+52>>2]=s[t+52>>2],s[r+56>>2]=s[t+56>>2],s[r+60>>2]=s[t+60>>2],t=t- -64|0,(r=r- -64|0)>>>0<=o>>>0;);if(r>>>0>=e>>>0)break e;for(;s[r>>2]=s[t>>2],t=t+4|0,(r=r+4|0)>>>0<e>>>0;);}if(r>>>0<n>>>0)for(;a[0|r]=l[0|t],t=t+1|0,(0|n)!=(0|(r=r+1|0)););}}(o,e+1|0,t+(-1^n)|0),b(e),b(s[r+8>>2]),f=r+16|0,0|o},free:b,__errno_location:function(){return 1024},fflush:function e(t){var r=0;if(t|=0)return s[t+76>>2],0|g(t);if(s[260]&&(r=e(s[260])),y(1028),t=s[259])for(;c[t+20>>2]>c[t+28>>2]&&(r=g(t)|r),t=s[t+56>>2];);return p(1028),0|r},setThrew:function(e,t){e|=0,t|=0,s[385]||(s[386]=t,s[385]=e)},stackSave:function(){return 0|f},stackAlloc:function(e){return f=e=f-(e|=0)&-16,0|e},stackRestore:function(e){f=e|=0},__growWasmMemory:function(t){return 0|function(t){t|=0;var r=0|T(),i=r+t|0;if(r<i&&i<65536){var $=new ArrayBuffer(u(i,65536)),d=new e.Int8Array($);d.set(a),a=d,a=new e.Int8Array($),new e.Int16Array($),s=new e.Int32Array($),l=new e.Uint8Array($),new e.Uint16Array($),c=new e.Uint32Array($),new e.Float32Array($),new e.Float64Array($),n=$,o.buffer=$}return r}(0|(t|=0))}}}({Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,Math:Math},Q,y.buffer));return{exports:n}},instantiate:function(e,t){return{then:function(r,n){r({instance:new f.Instance(new f.Module(e,t))})}}},RuntimeError:Error};u=[],"object"!==_typeof$4(f)&&K("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var h=new f.Table({initial:1,maximum:1,element:"anyfunc"}),m=!1;function b(e,t){e||K("Assertion failed: "+t)}var g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>=2097152&&p("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function I(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var T,v,_,P,E;function R(e,t){return e%t>0&&(e+=t-e%t),e}function O(e){T=e,i.HEAP8=v=new Int8Array(e),i.HEAP16=new Int16Array(e),i.HEAP32=P=new Int32Array(e),i.HEAPU8=_=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAPU32=E=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e)}var C=1712;b(!0,"stack must start aligned"),b(!0,"heap must start aligned");var w=8192;i.TOTAL_STACK&&b(w===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var A=i.TOTAL_MEMORY||65536;function L(){b(0==(3&C)),E[1+(C>>2)]=34821223,E[2+(C>>2)]=2310721022,P[0]=1668509029}function x(){var e=E[1+(C>>2)],t=E[2+(C>>2)];34821223==e&&2310721022==t||K("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==P[0]&&K("Runtime error: The application has corrupted its heap memory area (address zero)!")}function Z(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?i.dynCall_v(r):i.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}_Object$getOwnPropertyDescriptor(i,"TOTAL_MEMORY")||_Object$defineProperty(i,"TOTAL_MEMORY",{configurable:!0,get:function(){K("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),b(A>=w,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+w+")"),b("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),(y=i.wasmMemory?i.wasmMemory:new f.Memory({initial:A/65536}))&&(T=y.buffer),b((A=T.byteLength)%65536==0),O(T),P[388]=9904,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var N=[],M=[],G=[],k=[],V=!1;b(_Math$imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(_Math$fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(_Math$clz,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(_Math$trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var X=0,D=null,W=null,j={};function K(e){i.onAbort&&i.onAbort(e),$(e+=""),d(e),m=!0;var t="abort("+e+") at "+function(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();i.extraStackTrace&&(e+="\n"+i.extraStackTrace());return t=e,r=/\b_Z[\w\d_]+/g,t.replace(r,(function(e){var t,r=(t=e,p("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t);return e===r?e:r+" ["+e+"]"}));var t,r}();throw e=t,new f.RuntimeError(e)}i.preloadedImages={},i.preloadedAudios={};var F={error:function(){K("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){F.error()},createDataFile:function(){F.error()},createPreloadedFile:function(){F.error()},createLazyFile:function(){F.error()},open:function(){F.error()},mkdev:function(){F.error()},registerDevice:function(){F.error()},analyzePath:function(){F.error()},loadFilesFromDB:function(){F.error()},ErrnoError:function(){F.error()}};i.FS_createDataFile=F.createDataFile,i.FS_createPreloadedFile=F.createPreloadedFile;var U="data:application/octet-stream;base64,";function Y(e){return _startsWithInstanceProperty(String.prototype)?_startsWithInstanceProperty(e).call(e,U):0===_indexOfInstanceProperty(e).call(e,U)}var H,B="aw.wasm";function J(){try{if(u)return new Uint8Array(u);var e=function(e){if(!Y(e))return;return function(e){try{for(var t=z(e),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}catch(e){throw new Error("Converting base64 string to bytes failed.")}}(_sliceInstanceProperty(e).call(e,U.length))}(B);if(e)return e;if(!l)throw"both async and sync fetching of the wasm failed"}catch(e){K(e)}}Y(B)||(H=B,B=i.locateFile?i.locateFile(H,c):c+H),M.push({func:function(){$e()}});var z="function"==typeof atob?atob:function(e){var t,r,n,o,i,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=_indexOfInstanceProperty(s).call(s,e.charAt(c++))<<2|(o=_indexOfInstanceProperty(s).call(s,e.charAt(c++)))>>4,r=(15&o)<<4|(i=_indexOfInstanceProperty(s).call(s,e.charAt(c++)))>>2,n=(3&i)<<6|(a=_indexOfInstanceProperty(s).call(s,e.charAt(c++))),l+=String.fromCharCode(t),64!==i&&(l+=String.fromCharCode(r)),64!==a&&(l+=String.fromCharCode(n))}while(c<e.length);return l};var Q={__lock:function(){},__unlock:function(){},emscripten_memcpy_big:function(e,t,r){_.set(_.subarray(t,t+r),e)},emscripten_resize_heap:function(e){var t=v.length;b(e>t);var r=65536,n=2147418112;if(e>n)return d("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+n+" bytes!"),!1;for(var o=Math.max(t,16777216);o<e;)(o=o<=536870912?R(2*o,r):Math.min(R((3*o+2147483648)/4,r),n))===t&&p("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+v.length);return function(e){try{return y.grow(e-T.byteLength+65535>>16),O(y.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+T.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}(o)?(d("Warning: Enlarging memory arrays, this is not fast! "+[t,o]),!0):(d("Failed to grow the heap from "+t+" bytes to "+o+" bytes, not enough memory!"),!1)},memory:y,table:h},q=function(){var e,t={env:Q,wasi_unstable:Q};function r(e,t){var r=e.exports;i.asm=r,function(e){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),e?(b(j[e]),delete j[e]):d("warning: run dependency removed without ID"),0==X&&(null!==D&&(clearInterval(D),D=null),W)){var t=W;W=null,t()}}("wasm-instantiate")}e="wasm-instantiate",X++,i.monitorRunDependencies&&i.monitorRunDependencies(X),e?(b(!j[e]),j[e]=1,null===D&&void 0!==_setInterval&&(D=_setInterval((function(){if(m)return clearInterval(D),void(D=null);var e=!1;for(var t in j)e||(e=!0,d("still waiting on run dependencies:")),d("dependency: "+t);e&&d("(end of list)")}),1e4))):d("warning: run dependency added without ID");var n=i;function o(e){b(i===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,r(e.instance)}function a(e){return(!u&&s&&"function"==typeof fetch?fetch(B,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+B+"'";return e.arrayBuffer()})).catch((function(){return J()})):new _Promise((function(e,t){e(J())}))).then((function(e){return f.instantiate(e,t)})).then(e,(function(e){d("failed to asynchronously prepare wasm: "+e),K(e)}))}if(i.instantiateWasm)try{return i.instantiateWasm(t,r)}catch(e){return d("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(u||"function"!=typeof f.instantiateStreaming||Y(B)||"function"!=typeof fetch)return a(o);fetch(B,{credentials:"same-origin"}).then((function(e){return f.instantiateStreaming(e,t).then(o,(function(e){d("wasm streaming compile failed: "+e),d("falling back to ArrayBuffer instantiation"),a(o)}))}))}(),{}}(),ee=q.__wasm_call_ctors;q.__wasm_call_ctors=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ee.apply(null,arguments)};var te=q.malloc;q.malloc=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),te.apply(null,arguments)};var re=q.openBox;q.openBox=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),re.apply(null,arguments)};var ne=q.free;q.free=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ne.apply(null,arguments)};var oe=q.__errno_location;q.__errno_location=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),oe.apply(null,arguments)};var ie=q.fflush;q.fflush=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ie.apply(null,arguments)};var ae=q.setThrew;q.setThrew=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ae.apply(null,arguments)};var se=q.stackSave;q.stackSave=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),se.apply(null,arguments)};var le=q.stackAlloc;q.stackAlloc=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),le.apply(null,arguments)};var ce=q.stackRestore;q.stackRestore=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ce.apply(null,arguments)};var ue=q.__growWasmMemory;q.__growWasmMemory=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ue.apply(null,arguments)},i.asm=q;var $e=i.___wasm_call_ctors=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.__wasm_call_ctors.apply(null,arguments)},de=i._malloc=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.malloc.apply(null,arguments)};i._openBox=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.openBox.apply(null,arguments)},i._free=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.free.apply(null,arguments)},i.___errno_location=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.__errno_location.apply(null,arguments)},i._fflush=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.fflush.apply(null,arguments)},i._setThrew=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.setThrew.apply(null,arguments)};var pe=i.stackSave=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.stackSave.apply(null,arguments)};i.stackAlloc=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.stackAlloc.apply(null,arguments)},i.stackRestore=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.stackRestore.apply(null,arguments)};var ye,fe=i.__growWasmMemory=function(){return b(V,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),b(!0,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i.asm.__growWasmMemory.apply(null,arguments)};function he(e){function t(){ye||(ye=!0,m||(x(),b(!V),V=!0,Z(M),x(),Z(G),i.onRuntimeInitialized&&i.onRuntimeInitialized(),b(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(x(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),k.unshift(e);var e;Z(k)}()))}X>0||(L(),function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),N.unshift(e);var e;Z(N)}(),X>0||(i.setStatus?(i.setStatus("Running..."),_setTimeout((function(){_setTimeout((function(){i.setStatus("")}),1),t()}),1)):t(),x()))}if(i.asm=q,i.intArrayFromString=function(e,t,r){var n=r>0?r:I(e)+1,o=new Array(n),i=S(e,o,0,o.length);return t&&(o.length=i),o},_Object$getOwnPropertyDescriptor(i,"intArrayToString")||(i.intArrayToString=function(){K("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"ccall")||(i.ccall=function(){K("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"cwrap")||(i.cwrap=function(){K("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"setValue")||(i.setValue=function(){K("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getValue")||(i.getValue=function(){K("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"allocate")||(i.allocate=function(){K("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getMemory")||(i.getMemory=function(){K("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"AsciiToString")||(i.AsciiToString=function(){K("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stringToAscii")||(i.stringToAscii=function(){K("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"UTF8ArrayToString")||(i.UTF8ArrayToString=function(){K("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.UTF8ToString=function(e,t){return e?function(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&g)return g.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|l:(240!=(248&a)&&p("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),a=(7&a)<<18|s<<12|l<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(_,e,t):""},_Object$getOwnPropertyDescriptor(i,"stringToUTF8Array")||(i.stringToUTF8Array=function(){K("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stringToUTF8")||(i.stringToUTF8=function(){K("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"lengthBytesUTF8")||(i.lengthBytesUTF8=function(){K("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"UTF16ToString")||(i.UTF16ToString=function(){K("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stringToUTF16")||(i.stringToUTF16=function(){K("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"lengthBytesUTF16")||(i.lengthBytesUTF16=function(){K("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"UTF32ToString")||(i.UTF32ToString=function(){K("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stringToUTF32")||(i.stringToUTF32=function(){K("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"lengthBytesUTF32")||(i.lengthBytesUTF32=function(){K("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.allocateUTF8=function(e){var t=I(e)+1,r=de(t);return r&&S(e,v,r,t),r},_Object$getOwnPropertyDescriptor(i,"stackTrace")||(i.stackTrace=function(){K("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addOnPreRun")||(i.addOnPreRun=function(){K("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addOnInit")||(i.addOnInit=function(){K("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addOnPreMain")||(i.addOnPreMain=function(){K("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addOnExit")||(i.addOnExit=function(){K("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addOnPostRun")||(i.addOnPostRun=function(){K("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"writeStringToMemory")||(i.writeStringToMemory=function(){K("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"writeArrayToMemory")||(i.writeArrayToMemory=function(){K("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"writeAsciiToMemory")||(i.writeAsciiToMemory=function(){K("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addRunDependency")||(i.addRunDependency=function(){K("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"removeRunDependency")||(i.removeRunDependency=function(){K("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"ENV")||(i.ENV=function(){K("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"FS")||(i.FS=function(){K("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"FS_createFolder")||(i.FS_createFolder=function(){K("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createPath")||(i.FS_createPath=function(){K("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createDataFile")||(i.FS_createDataFile=function(){K("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createPreloadedFile")||(i.FS_createPreloadedFile=function(){K("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createLazyFile")||(i.FS_createLazyFile=function(){K("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createLink")||(i.FS_createLink=function(){K("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_createDevice")||(i.FS_createDevice=function(){K("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"FS_unlink")||(i.FS_unlink=function(){K("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_Object$getOwnPropertyDescriptor(i,"GL")||(i.GL=function(){K("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"dynamicAlloc")||(i.dynamicAlloc=function(){K("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"loadDynamicLibrary")||(i.loadDynamicLibrary=function(){K("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"loadWebAssemblyModule")||(i.loadWebAssemblyModule=function(){K("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getLEB")||(i.getLEB=function(){K("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getFunctionTables")||(i.getFunctionTables=function(){K("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"alignFunctionTables")||(i.alignFunctionTables=function(){K("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"registerFunctions")||(i.registerFunctions=function(){K("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"addFunction")||(i.addFunction=function(){K("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"removeFunction")||(i.removeFunction=function(){K("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getFuncWrapper")||(i.getFuncWrapper=function(){K("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"prettyPrint")||(i.prettyPrint=function(){K("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"makeBigInt")||(i.makeBigInt=function(){K("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"dynCall")||(i.dynCall=function(){K("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getCompilerSetting")||(i.getCompilerSetting=function(){K("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stackSave")||(i.stackSave=function(){K("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stackRestore")||(i.stackRestore=function(){K("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"stackAlloc")||(i.stackAlloc=function(){K("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"establishStackSpace")||(i.establishStackSpace=function(){K("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"print")||(i.print=function(){K("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"printErr")||(i.printErr=function(){K("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"getTempRet0")||(i.getTempRet0=function(){K("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"setTempRet0")||(i.setTempRet0=function(){K("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"callMain")||(i.callMain=function(){K("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"abort")||(i.abort=function(){K("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.Pointer_stringify=function(e,t){K("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!")},_Object$getOwnPropertyDescriptor(i,"warnOnce")||(i.warnOnce=function(){K("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.writeStackCookie=L,i.checkStackCookie=x,i.abortStackOverflow=function(e){K("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(C-pe()+e)+" bytes available!")},_Object$getOwnPropertyDescriptor(i,"intArrayFromBase64")||(i.intArrayFromBase64=function(){K("'intArrayFromBase64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"tryParseAsDataURI")||(i.tryParseAsDataURI=function(){K("'tryParseAsDataURI' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_Object$getOwnPropertyDescriptor(i,"ALLOC_NORMAL")||_Object$defineProperty(i,"ALLOC_NORMAL",{configurable:!0,get:function(){K("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_Object$getOwnPropertyDescriptor(i,"ALLOC_STACK")||_Object$defineProperty(i,"ALLOC_STACK",{configurable:!0,get:function(){K("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_Object$getOwnPropertyDescriptor(i,"ALLOC_DYNAMIC")||_Object$defineProperty(i,"ALLOC_DYNAMIC",{configurable:!0,get:function(){K("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_Object$getOwnPropertyDescriptor(i,"ALLOC_NONE")||_Object$defineProperty(i,"ALLOC_NONE",{configurable:!0,get:function(){K("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_Object$getOwnPropertyDescriptor(i,"calledRun")||_Object$defineProperty(i,"calledRun",{configurable:!0,get:function(){K("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}}),i.then=function(e){if(ye)e(i);else{var t=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){t&&t(),e(i)}}return i},W=function e(){ye||he(),ye||(W=e)},i.run=he,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return he(),t}}(),AwManager=function(){function e(t,r){_classCallCheck$8(this,e),this.cdnHost=t,this.cdnBucket=r}return _createClass$8(e,[{key:"init",value:function(){var e=new ProxyPromise;this.module={onRuntimeInitialized:function(){e.resolve()},onAbort:function(t){e.reject(t)}},this.cdnHost&&(this.module.cdnHost=this.cdnHost);var t=this.cdnBucket?"-".concat(this.cdnBucket):"";return this.module.cdnBucket="media-fe".concat(t),aw(this.module),e}},{key:"openBox",value:function(e){try{var t=window.atob(e),r=util.str2hex(t),n=this.module._malloc(Number(r.length));this.module.HEAP8.set(r,n);var o=this.module._openBox(Number(n),r.length),i=this.module.UTF8ToString(o);return this.module._free(n),i}catch(e){}}},{key:"destroy",value:function(){this.module=null}}]),e}(),$$l=_export$1,$some=arrayIteration$1.some,arrayMethodIsStrict$3=arrayMethodIsStrict$h,STRICT_METHOD$3=arrayMethodIsStrict$3("some");$$l({target:"Array",proto:!0,forced:!STRICT_METHOD$3},{some:function(e){return $some(this,e,arguments.length>1?arguments[1]:void 0)}});var wellKnownSymbolWrapped={},wellKnownSymbol$5=wellKnownSymbol$R;wellKnownSymbolWrapped.f=wellKnownSymbol$5;var global$a=global$1l,path$4=global$a,path$3=path$4,hasOwn$8=hasOwnProperty_1$1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$3=objectDefineProperty$1.f,wellKnownSymbolDefine=function(e){var t=path$3.Symbol||(path$3.Symbol={});hasOwn$8(t,e)||defineProperty$3(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$2=functionCall$1,getBuiltIn$2=getBuiltIn$n,wellKnownSymbol$4=wellKnownSymbol$R,defineBuiltIn$3=defineBuiltIn$x,symbolDefineToPrimitive=function(){var e=getBuiltIn$2("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$4("toPrimitive");t&&!t[n]&&defineBuiltIn$3(t,n,(function(e){return call$2(r,this)}),{arity:1})},$$k=_export$1,global$9=global$1l,call$1=functionCall$1,uncurryThis$d=functionUncurryThis$1,DESCRIPTORS$5=descriptors$1,NATIVE_SYMBOL$3=symbolConstructorDetection$1,fails$g=fails$1C,hasOwn$7=hasOwnProperty_1$1,isPrototypeOf$4=objectIsPrototypeOf$1,anObject$2=anObject$E,toIndexedObject$4=toIndexedObject$p,toPropertyKey=toPropertyKey$a,$toString$1=toString$A,createPropertyDescriptor=createPropertyDescriptor$e,nativeObjectCreate=objectCreate$1,objectKeys$2=objectKeys$7,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal$1,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor$1,definePropertyModule=objectDefineProperty$1,definePropertiesModule=objectDefineProperties$1,propertyIsEnumerableModule=objectPropertyIsEnumerable$1,defineBuiltIn$2=defineBuiltIn$x,shared$2=sharedExports$1,sharedKey=sharedKey$8,hiddenKeys$1=hiddenKeys$d,uid$1=uid$b,wellKnownSymbol$3=wellKnownSymbol$R,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive,setToStringTag$1=setToStringTag$h,InternalStateModule$2=internalState$1,$forEach=arrayIteration$1.forEach,HIDDEN=sharedKey("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$2=InternalStateModule$2.set,getInternalState$1=InternalStateModule$2.getterFor(SYMBOL),ObjectPrototype$1=Object[PROTOTYPE],$Symbol=global$9.Symbol,SymbolPrototype$1=$Symbol&&$Symbol[PROTOTYPE],TypeError$2=global$9.TypeError,QObject=global$9.QObject,nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule.f,push$5=uncurryThis$d([].push),AllSymbols=shared$2("symbols"),ObjectPrototypeSymbols=shared$2("op-symbols"),WellKnownSymbolsStore=shared$2("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDescriptor=DESCRIPTORS$5&&fails$g((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor(ObjectPrototype$1,t);n&&delete ObjectPrototype$1[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$1&&nativeDefineProperty(ObjectPrototype$1,t,n)}:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype$1);return setInternalState$2(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$5||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$1&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$2(e);var n=toPropertyKey(t);return anObject$2(r),hasOwn$7(AllSymbols,n)?(r.enumerable?(hasOwn$7(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor(0,!1)})):(hasOwn$7(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$2(e);var r=toIndexedObject$4(t),n=objectKeys$2(r).concat($getOwnPropertySymbols(r));return $forEach(n,(function(t){DESCRIPTORS$5&&!call$1($propertyIsEnumerable$2,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable$2=function(e){var t=toPropertyKey(e),r=call$1(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$1&&hasOwn$7(AllSymbols,t)&&!hasOwn$7(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$7(this,t)||!hasOwn$7(AllSymbols,t)||hasOwn$7(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$4(e),n=toPropertyKey(t);if(r!==ObjectPrototype$1||!hasOwn$7(AllSymbols,n)||hasOwn$7(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor(r,n);return!o||!hasOwn$7(AllSymbols,n)||hasOwn$7(r,HIDDEN)&&r[HIDDEN][n]||(o.enumerable=!0),o}},$getOwnPropertyNames$1=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$4(e)),r=[];return $forEach(t,(function(e){hasOwn$7(AllSymbols,e)||hasOwn$7(hiddenKeys$1,e)||push$5(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$1,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$4(e)),n=[];return $forEach(r,(function(e){!hasOwn$7(AllSymbols,e)||t&&!hasOwn$7(ObjectPrototype$1,e)||push$5(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$2(SymbolPrototype$1=($Symbol=function(){if(isPrototypeOf$4(SymbolPrototype$1,this))throw TypeError$2("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$1(arguments[0]):void 0,t=uid$1(e),r=function(e){this===ObjectPrototype$1&&call$1(r,ObjectPrototypeSymbols,e),hasOwn$7(this,HIDDEN)&&hasOwn$7(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor(1,e))};return DESCRIPTORS$5&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$1,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$1(this).tag})),defineBuiltIn$2($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule.f=$propertyIsEnumerable$2,definePropertyModule.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$1.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames$1,getOwnPropertySymbolsModule$1.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$3(e),e)},DESCRIPTORS$5&&(nativeDefineProperty(SymbolPrototype$1,"description",{configurable:!0,get:function(){return getInternalState$1(this).description}}),defineBuiltIn$2(ObjectPrototype$1,"propertyIsEnumerable",$propertyIsEnumerable$2,{unsafe:!0}))),$$k({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach(objectKeys$2(WellKnownSymbolsStore),(function(e){defineWellKnownSymbol(e)})),$$k({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$k({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$5},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$k({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames$1}),defineSymbolToPrimitive(),setToStringTag$1($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection$1,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$j=_export$1,getBuiltIn$1=getBuiltIn$n,hasOwn$6=hasOwnProperty_1$1,toString$8=toString$A,shared$1=sharedExports$1,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$1("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$1("symbol-to-string-registry");$$j({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$8(e);if(hasOwn$6(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$1("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$i=_export$1,hasOwn$5=hasOwnProperty_1$1,isSymbol$1=isSymbol$b,tryToString=tryToString$f,shared=sharedExports$1,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared("symbol-to-string-registry");$$i({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$1(e))throw TypeError(tryToString(e)+" is not a symbol");if(hasOwn$5(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var $$h=_export$1,NATIVE_SYMBOL$1=symbolConstructorDetection$1,fails$f=fails$1C,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols$1,toObject$3=toObject$u,FORCED$8=!NATIVE_SYMBOL$1||fails$f((function(){getOwnPropertySymbolsModule.f(1)}));$$h({target:"Object",stat:!0,forced:FORCED$8},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule.f;return t?t(toObject$3(e)):[]}});var $$g=_export$1,DESCRIPTORS$4=descriptors$1,global$8=global$1l,uncurryThis$c=functionUncurryThis$1,hasOwn$4=hasOwnProperty_1$1,isCallable$1=isCallable$Z,isPrototypeOf$3=objectIsPrototypeOf$1,toString$7=toString$A,defineProperty$2=objectDefineProperty$1.f,copyConstructorProperties$1=copyConstructorProperties$5,NativeSymbol=global$8.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype;if(DESCRIPTORS$4&&isCallable$1(NativeSymbol)&&(!("description"in SymbolPrototype)||void 0!==NativeSymbol().description)){var EmptyStringDescriptionStore={},SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$7(arguments[0]),t=isPrototypeOf$3(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t};copyConstructorProperties$1(SymbolWrapper,NativeSymbol),SymbolWrapper.prototype=SymbolPrototype,SymbolPrototype.constructor=SymbolWrapper;var NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),thisSymbolValue=uncurryThis$c(SymbolPrototype.valueOf),symbolDescriptiveString=uncurryThis$c(SymbolPrototype.toString),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$c("".replace),stringSlice$2=uncurryThis$c("".slice);defineProperty$2(SymbolPrototype,"description",{configurable:!0,get:function(){var e=thisSymbolValue(this);if(hasOwn$4(EmptyStringDescriptionStore,e))return"";var t=symbolDescriptiveString(e),r=NATIVE_SYMBOL?stringSlice$2(t,7,-1):replace(t,regexp,"$1");return""===r?void 0:r}}),$$g({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})}var ArrayBufferViewCore=arrayBufferViewCore,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS=typedArrayConstructorsRequireWrappers,aTypedArrayConstructor=ArrayBufferViewCore.aTypedArrayConstructor,exportTypedArrayStaticMethod=ArrayBufferViewCore.exportTypedArrayStaticMethod;function isMSBrowser(){var e=window.navigator.userAgent,t=_indexOfInstanceProperty(e).call(e,"MSIE "),r=_indexOfInstanceProperty(e).call(e,"Trident/");return t>0||r>0}function checkIsQihuBrowser(){var e,t=navigator.mimeTypes,r=navigator.userAgent,n=!1;t&&_indexOfInstanceProperty(r).call(r,"Chrome")>1&&(n=_someInstanceProperty(e=_Object$keys(t)).call(e,(function(e){var r,n,o;return!!(t[e].type&&_indexOfInstanceProperty(r=t[e].type).call(r,"360")>-1)||(!!(t[e].type&&_indexOfInstanceProperty(n=t[e].type).call(n,"application/vnd.chromium.remoting-viewer")>-1)||!!(t[e].description&&_indexOfInstanceProperty(o=t[e].description).call(o,"360")>-1))})));return n}function isEMESupported(){var e,t,r,n,o,i,a;return!(!navigator.requestMediaKeySystemAccess||(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),n=isMSBrowser(),o=checkIsQihuBrowser(),i=_indexOfInstanceProperty(e=navigator.userAgent).call(e,"Firefox")>0,a=_indexOfInstanceProperty(t=navigator.userAgent).call(t,"Edge")>0,r||n||o||i||a))}function isWebAssemblySupported(){try{if("object"===("undefined"==typeof WebAssembly?"undefined":_typeof$4(WebAssembly))&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){console.log(e)}return!1}function isMediaSourceSupported(){var e=window.MediaSource=window.MediaSource||window.WebKitMediaSource;return e&&"function"==typeof e.isTypeSupported}function isSupported(){return isMediaSourceSupported()&&isWebAssemblySupported()&&!isMSBrowser()}function isSupportedWithXgmse(){return isWebAssemblySupported()&&!isMSBrowser()}exportTypedArrayStaticMethod("of",(function(){for(var e=0,t=arguments.length,r=new(aTypedArrayConstructor(this))(t);t>e;)r[e]=arguments[e++];return r}),TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);var Timer=function(){function e(t){_classCallCheck$8(this,e),this.onTick_=t,this.cancelPending_=null}return _createClass$8(e,[{key:"tickAfter",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.stop();var n=!0,o=null;this.cancelPending_=function(){window.clearTimeout(o),n=!1};return o=_setTimeout((function(){n&&(t.onTick_(),r&&r())}),1e3*e),this}},{key:"tickEvery",value:function(e){var t=this;this.tickAfter(e,(function(){t.tickEvery(e)}))}},{key:"stop",value:function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)}}]),e}(),global$7=global$1l,fails$e=fails$1C,uncurryThis$b=functionUncurryThis$1,toString$6=toString$A,trim$3=stringTrim$1.trim,whitespaces$2=whitespaces$a,charAt$2=uncurryThis$b("".charAt),$parseFloat$3=global$7.parseFloat,Symbol$3=global$7.Symbol,ITERATOR$3=Symbol$3&&Symbol$3.iterator,FORCED$7=1/$parseFloat$3(whitespaces$2+"-0")!=-1/0||ITERATOR$3&&!fails$e((function(){$parseFloat$3(Object(ITERATOR$3))})),numberParseFloat$1=FORCED$7?function(e){var t=trim$3(toString$6(e)),r=$parseFloat$3(t);return 0===r&&"-"==charAt$2(t,0)?-0:r}:$parseFloat$3,$$f=_export$1,$parseFloat$2=numberParseFloat$1;$$f({global:!0,forced:parseFloat!=numberParseFloat$1},{parseFloat:numberParseFloat$1});var PRELOAD_NEXT="PRELOAD_NEXT",PRELOAD_SEG_DONE="PRELOAD_SEG_DONE",STATES={PREPARE:"PREPARE",IDLE:"IDLE",PRELOADING:"PRELOADING",FINISH:"FINISH"},ONE_STEP_DONE="ONE_STEP_DONE",PRELOAD_TYPES$1={DURATION:0,SIZE:1},CACHE_TYPES={INDEXDB:0,MEMORY:1},DOWN_STATES={FAIL:-1,SUCCESS:0,DOWNLOADING:1},VTYPES$1={MP4:"MP4",DASH:"DASH",HLS:"HLS"};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(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,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}var isImplemented$1,hasRequiredIsImplemented,eventEmitter={exports:{}},d$1={exports:{}},_undefined$1=void 0,is$4=function(e){return e!==_undefined$1&&null!==e},isValue$4=is$4,possibleTypes={object:!0,function:!0,undefined:!0},is$3=function(e){return!!isValue$4(e)&&hasOwnProperty.call(possibleTypes,_typeof$5(e))},isObject$7=is$3,is$2=function(e){if(!isObject$7(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}},isPrototype=is$2,is$1=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!isPrototype(e)},isFunction=is$1,classRe=/^\s*class[\s{/}]/,functionToString=Function.prototype.toString,is5=function(e){return!!isFunction(e)&&!classRe.test(functionToString.call(e))},isImplemented$2=function(){var e;return"function"==typeof _Object$assign&&(_Object$assign(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")};function requireIsImplemented(){return hasRequiredIsImplemented?isImplemented$1:(hasRequiredIsImplemented=1,isImplemented$1=function(){try{return _Object$keys("primitive"),!0}catch(e){return!1}})}var shim$2,hasRequiredShim$2,keys10,hasRequiredKeys,validValue,hasRequiredValidValue,shim$1,hasRequiredShim$1,noop=function(){},_undefined=noop(),isValue$3=function(e){return e!==_undefined&&null!==e};function requireShim$2(){if(hasRequiredShim$2)return shim$2;hasRequiredShim$2=1;var e=isValue$3,t=_Object$keys;return shim$2=function(r){return t(e(r)?Object(r):r)}}function requireKeys(){return hasRequiredKeys?keys10:(hasRequiredKeys=1,keys10=requireIsImplemented()()?_Object$keys:requireShim$2())}function requireValidValue(){if(hasRequiredValidValue)return validValue;hasRequiredValidValue=1;var e=isValue$3;return validValue=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}function requireShim$1(){if(hasRequiredShim$1)return shim$1;hasRequiredShim$1=1;var e=requireKeys(),t=requireValidValue(),r=Math.max;return shim$1=function(n,o){var i,a,s,l=r(arguments.length,2);for(n=Object(t(n)),s=function(e){try{n[e]=o[e]}catch(e){i||(i=e)}},a=1;a<l;++a){var c;_forEachInstanceProperty(c=e(o=arguments[a])).call(c,s)}if(void 0!==i)throw i;return n},shim$1}var shim,hasRequiredShim,assign$1=isImplemented$2()?_Object$assign:requireShim$1(),isValue$2=isValue$3,forEach8=_forEachInstanceProperty(Array.prototype),create$2=_Object$create,process$1=function(e,t){var r;for(r in e)t[r]=e[r]},normalizeOptions=function(e){var t=create$2(null);return forEach8.call(arguments,(function(e){isValue$2(e)&&process$1(Object(e),t)})),t},str="razdwatrzy",isImplemented2=function(){return"function"==typeof str.contains&&(!0===str.contains("dwa")&&!1===str.contains("foo"))};function requireShim(){if(hasRequiredShim)return shim;hasRequiredShim=1;var e=_indexOfInstanceProperty(String.prototype);return shim=function(t){return e.call(this,t,arguments[1])>-1},shim}var contains$1=isImplemented2()?String.prototype.contains:requireShim(),isValue$1=is$4,isPlainFunction=is5,assign3=assign$1,normalizeOpts=normalizeOptions,contains=contains$1,d=d$1.exports=function(e,t){var r,n,o,i,a;return arguments.length<2||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],isValue$1(e)?(r=contains.call(e,"c"),n=contains.call(e,"e"),o=contains.call(e,"w")):(r=o=!0,n=!1),a={value:t,configurable:r,enumerable:n,writable:o},i?assign3(normalizeOpts(i),a):a};d.gs=function(e,t,r){var n,o,i,a;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],isValue$1(t)?isPlainFunction(t)?isValue$1(r)?isPlainFunction(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,isValue$1(e)?(n=contains.call(e,"c"),o=contains.call(e,"e")):(n=!0,o=!1),a={get:t,set:r,configurable:n,enumerable:o},i?assign3(normalizeOpts(i),a):a};var dExports=d$1.exports,validCallable=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e};!function(e,t){var r,n,o,i,a,s,l,c=dExports,u=validCallable,$=Function.prototype.apply,d=Function.prototype.call,p=_Object$create,y=_Object$defineProperty,f=_Object$defineProperties,h=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return u(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),$.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(u(t),!h.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===_typeof$5(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:_spliceInstanceProperty(n).call(n,i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(h.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===_typeof$5(o)){for(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];for(o=_sliceInstanceProperty(o).call(o),t=0;n=o[t];++t)$.call(n,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];$.call(o,this,i)}},a={on:r=function(e,t){var r;return u(t),h.call(this,"__ee__")?r=this.__ee__:(r=m.value=p(null),y(this,"__ee__",m),m.value=null),r[e]?"object"===_typeof$5(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},s={on:c(r),once:c(n),off:c(o),emit:c(i)},l=f({},s),e.exports=t=function(e){return null==e?p(l):f(Object(e),s)},t.methods=a}(eventEmitter,eventEmitter.exports);var eventEmitterExports=eventEmitter.exports,EventEmitter=getDefaultExportFromCjs(eventEmitterExports),DESCRIPTORS$3=descriptors$2,uncurryThis$a=functionUncurryThis$2,objectKeys$1=objectKeys$b,toIndexedObject$3=toIndexedObject$A,$propertyIsEnumerable$1=objectPropertyIsEnumerable$2.f,propertyIsEnumerable$1=uncurryThis$a($propertyIsEnumerable$1),push$4=uncurryThis$a([].push),createMethod$1=function(e){return function(t){for(var r,n=toIndexedObject$3(t),o=objectKeys$1(n),i=o.length,a=0,s=[];i>a;)r=o[a++],DESCRIPTORS$3&&!propertyIsEnumerable$1(n,r)||push$4(s,e?[r,n[r]]:n[r]);return s}},objectToArray$1={entries:createMethod$1(!0),values:createMethod$1(!1)},$$e=_export$2,$values$1=objectToArray$1.values;$$e({target:"Object",stat:!0},{values:function(e){return $values$1(e)}});var path$2=path$C,values$c=path$2.Object.values,parent$5=values$c,values$b=parent$5,parent$4=values$b,values$a=parent$4,parent$3=values$a,values$9=parent$3,values$8=values$9,values$7=values$8,_Object$values=getDefaultExportFromCjs(values$7),$$d=_export$1,uncurryThis$9=functionUncurryThis$1,aCallable$1=aCallable$w,toObject$2=toObject$u,lengthOfArrayLike$2=lengthOfArrayLike$A,deletePropertyOrThrow$1=deletePropertyOrThrow$7,toString$5=toString$A,fails$d=fails$1C,internalSort$1=arraySort$2,arrayMethodIsStrict$2=arrayMethodIsStrict$h,FF$1=engineFfVersion,IE_OR_EDGE$1=engineIsIeOrEdge,V8$1=engineV8Version$1,WEBKIT$1=engineWebkitVersion,test$1=[],nativeSort$1=uncurryThis$9(test$1.sort),push$3=uncurryThis$9(test$1.push),FAILS_ON_UNDEFINED$1=fails$d((function(){test$1.sort(void 0)})),FAILS_ON_NULL$1=fails$d((function(){test$1.sort(null)})),STRICT_METHOD$2=arrayMethodIsStrict$2("sort"),STABLE_SORT$1=!fails$d((function(){if(V8$1)return V8$1<70;if(!(FF$1&&FF$1>3)){if(IE_OR_EDGE$1)return!0;if(WEBKIT$1)return WEBKIT$1<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$1.push({k:t+n,v:r})}for(test$1.sort((function(e,t){return t.v-e.v})),n=0;n<test$1.length;n++)t=test$1[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$6=FAILS_ON_UNDEFINED$1||!FAILS_ON_NULL$1||!STRICT_METHOD$2||!STABLE_SORT$1,getSortCompare$1=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$5(t)>toString$5(r)?1:-1}};$$d({target:"Array",proto:!0,forced:FORCED$6},{sort:function(e){void 0!==e&&aCallable$1(e);var t=toObject$2(this);if(STABLE_SORT$1)return void 0===e?nativeSort$1(t):nativeSort$1(t,e);var r,n,o=[],i=lengthOfArrayLike$2(t);for(n=0;n<i;n++)n in t&&push$3(o,t[n]);for(internalSort$1(o,getSortCompare$1(e)),r=lengthOfArrayLike$2(o),n=0;n<r;)t[n]=o[n++];for(;n<i;)deletePropertyOrThrow$1(t,n++);return t}});var DESCRIPTORS$2=descriptors$1,uncurryThis$8=functionUncurryThis$1,objectKeys=objectKeys$7,toIndexedObject$2=toIndexedObject$p,$propertyIsEnumerable=objectPropertyIsEnumerable$1.f,propertyIsEnumerable6=uncurryThis$8($propertyIsEnumerable),push$2=uncurryThis$8([].push),createMethod=function(e){return function(t){for(var r,n=toIndexedObject$2(t),o=objectKeys(n),i=o.length,a=0,s=[];i>a;)r=o[a++],DESCRIPTORS$2&&!propertyIsEnumerable6(n,r)||push$2(s,e?[r,n[r]]:n[r]);return s}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$$c=_export$1,$values=objectToArray.values;$$c({target:"Object",stat:!0},{values:function(e){return $values(e)}});var isValue2=isValue$3,map5={function:!0,object:!0},isObject$6=function(e){return isValue2(e)&&map5[_typeof$5(e)]||!1},isObject$5=isObject$6,validObject=function(e){if(!isObject$5(e))throw new TypeError(e+" is not an Object");return e},value=validObject,hasOwnProperty$1=Object.prototype.hasOwnProperty,allOff=function(e){var t,r=arguments[1];if(value(e),void 0===r)hasOwnProperty$1.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=hasOwnProperty$1.call(e,"__ee__")&&e.__ee__))return;t[r]&&delete t[r]}},allOff$1=getDefaultExportFromCjs(allOff),RETRY_MAX=10,PRELOADER=function(){function e(t,r,n,o,i){_classCallCheck(this,e),EventEmitter(this),this.state=STATES.PREPARE,this.options=t||{},this.logger=t.logger||function(){},this._preloadManager=r,this.player=r.player;var a=n.handlers,s=n.predictInst,l=n.readyPromise;this._predictInst=s,this._handlers=a,this._predictInstReadyPromise=l,this._toLoadList=[],this.retryCount=0,this._cachedHandler=o,this._cachedDataHanlder=i,this.cnt=0}return _createClass(e,[{key:"start",value:function(){var e=this,t=new ProxyPromise$1;return this._handlers.start(this.options).then((function(r){r.onObtain().then((function(n){e._predictInstReadyPromise.then((function(){e._predictInst.updateMediaInfos(n);var o=e._predictInst.preloadPredict(e.options),i=e._predictInst.cachedData;e._cachedDataHanlder(_Object$assign({vid:e.options.vid},{data:i}));var a=_Object$assign(o,e.options);r.onTransform(a).then((function(r){e._toLoadList=r,t.resolve(r)}))}))}))})).catch((function(e){t.reject(new Error("preload unit start error"))})),t}},{key:"preloadSeg",value:function(){var e=this;if(0===this._toLoadList.length)return this.state=STATES.FINISH,void this.emit(PRELOAD_SEG_DONE,!0);this.state="PRELOADING";var t=this._toLoadList.shift();this._handlers.onRequest(t,(function(r){var n=_Object$assign({},t.extData,r);e._cachedHandler(n)})).then((function(){e.state=STATES.IDLE,e.emit(PRELOAD_SEG_DONE)})).catch((function(t){e.requestError(),e.emit(PRELOAD_SEG_DONE,!1)}))}},{key:"requestError",value:function(){this.retryCount++,this.state=STATES.IDLE,this.retryCount>=RETRY_MAX&&(this.state=STATES.FINISH),this.emit(ONE_STEP_DONE),this.logger("preload request error")}},{key:"cancelLoading",value:function(){this._toLoadList=[]}},{key:"destroy",value:function(){allOff$1(this)}}]),e}();function getIDB(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){}}var idb=getIDB();function isIndexedDBValid(){try{var e;if(!idb||!idb.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r="function"==typeof fetch&&-1!==_indexOfInstanceProperty(e=fetch.toString()).call(e,"[native code");return(!t||r)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function executeCallback(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function executeTwoCallbacks(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function normalizeKey(e){return"string"!=typeof e&&(console.warn("".concat(e," used as a key, but it is not a string.")),e=String(e)),e}var dbContexts={},READ_ONLY="readonly",READ_WRITE="readwrite";function _deferReadiness(e){var t=dbContexts[e.name],r={};r.promise=new _Promise((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function _advanceReadiness(e){var t=dbContexts[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function _rejectReadiness(e,t){var r=dbContexts[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function _getConnection(e,t){return new _Promise((function(r,n){if(dbContexts[e.name]=dbContexts[e.name]||createDbContext(),e.db){if(!t)return r(e.db);_deferReadiness(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=idb.open.apply(idb,o);t&&(i.onupgradeneeded=function(t){var r=i.result;try{r.createObjectStore(e.storeName)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),n(i.error)},i.onsuccess=function(){r(i.result),_advanceReadiness(e)}}))}function _getOriginalConnection(e){return _getConnection(e,!1)}function _getUpgradedConnection(e){return _getConnection(e,!0)}function _isUpgradeNeeded(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,o=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function _tryReconnect(e){_deferReadiness(e);for(var t=dbContexts[e.name],r=t.forages,n=0;n<r.length;n++){var o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,_getOriginalConnection(e).then((function(t){return e.db=t,_isUpgradeNeeded(e)?_getUpgradedConnection(e):t})).then((function(n){e.db=t.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(t){throw _rejectReadiness(e,t),t}))}function createTransaction(e,t,r,n){void 0===n&&(n=1);try{var o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return _Promise.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_getUpgradedConnection(e)})).then((function(){return _tryReconnect(e).then((function(){createTransaction(e,t,r,n-1)}))})).catch(r);r(o)}}function createDbContext(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var AsyncStorage=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"ready",value:function(){return this._ready}},{key:"_initStorage",value:function(e){var t,r=this;r._defaultConfig=e;var n={db:null};if(e)for(var o in e)n[o]=e[o];var i=dbContexts[n.name];i||(i=createDbContext(),dbContexts[n.name]=i),i.forages.push(r),r._initReady||(r._initReady=r.ready,r.ready=r._fullyReady);var a=[];function s(){return _Promise.resolve()}for(var l=0;l<i.forages.length;l++){var c=i.forages[l];c!==r&&a.push(c._initReady().catch(s))}var u=_sliceInstanceProperty(t=i.forages).call(t,0);return r._ready=_Promise.all(a).then((function(){return n.db=i.db,_getOriginalConnection(n)})).then((function(e){return n.db=e,_isUpgradeNeeded(n,r._defaultConfig.version)?_getUpgradedConnection(n):e})).then((function(e){n.db=i.db=e,r._dbInfo=n;for(var t=0;t<u.length;t++){var o=u[t];o!==r&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}})),r._ready}},{key:"probeSupport",get:function(){return isIndexedDBValid()}},{key:"getItem",value:function(e,t){var r=this;e=normalizeKey(e);var n=new _Promise((function(t,n){r.ready().then((function(){createTransaction(r._dbInfo,READ_ONLY,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),t(e)},a.onerror=function(){n(a.error)}}catch(e){n(e)}}))})).catch(n)}));return executeCallback(n,t),n}},{key:"setItem",value:function(e,t,r){var n=this;e=normalizeKey(e);var o=new _Promise((function(r,o){n.ready().then((function(){return n._dbInfo,t})).then((function(t){createTransaction(n._dbInfo,READ_WRITE,(function(i,a){if(i)return o(i);try{var s=a.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),r(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;o(e)}}catch(e){o(e)}}))})).catch(o)}));return executeCallback(o,r),o}},{key:"removeItem",value:function(e,t){var r=this;e=normalizeKey(e);var n=new _Promise((function(t,n){r.ready().then((function(){createTransaction(r._dbInfo,READ_WRITE,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){n(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return executeCallback(n,t),n}},{key:"clear",value:function(e){var t=this,r=new _Promise((function(e,r){t.ready().then((function(){createTransaction(t._dbInfo,READ_WRITE,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return executeCallback(r,e),r}},{key:"length",value:function(e){var t=this,r=new _Promise((function(e,r){t.ready().then((function(){createTransaction(t._dbInfo,READ_ONLY,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){r(i.error)}}catch(e){r(e)}}))})).catch(r)}));return executeCallback(r,e),r}},{key:"all",value:function(e){var t=this,r=new _Promise((function(e,r){t.ready().then((function(){createTransaction(t._dbInfo,READ_ONLY,(function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).openCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push({key:t.key,value:t.value}),t.continue()):e(a)},i.onerror=function(){r(i.error)}}catch(e){r(e)}}))})).catch(r)}));return executeCallback(r,e),r}},{key:"_fullyReady",value:function(e){var t=this,r=t._initReady().then((function(){var e=dbContexts[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return executeTwoCallbacks(r,e,e),r}}]),e}(),MemoryCache=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"_initStorage",value:function(e){var t=e.name+"_"+e.storeName;return this.key=t,window[t]&&"object"===_typeof$1(window[t])||(window[t]={}),this.store=window[t],_Promise.resolve()}},{key:"getItem",value:function(e,t){var r=this.store[e];return void 0===r&&(r=null),this._internalPromise(t,r)}},{key:"setItem",value:function(e,t,r){return this.store[e]=t,this._internalPromise(r)}},{key:"removeItem",value:function(e,t){return delete this.store[e],this._internalPromise(t)}},{key:"clear",value:function(e){return this.store={},window[this.key]={},this._internalPromise(e)}},{key:"length",value:function(e){var t=_Object$keys(this.store).length;return this._internalPromise(e,t)}},{key:"_internalPromise",value:function(e,t){var r=t?_Promise.resolve(t):_Promise.resolve();return executeCallback(r,e),r}},{key:"all",value:function(e){for(var t=[],r=_Object$keys(this.store),n=0;n<r.length;n++){var o=r[n];t.push({key:o,value:this.store[o]})}return this._internalPromise(e,t)}},{key:"probeSupport",value:function(){return!0}}]),e}(),DefaultConfig={description:"",name:"__PRE_CACHE__",storeName:"keyvaluepairs",version:1},SPLIT="|",SESSION_KEY="__PRE_CACHE__KEYS",TIMESPLIT="$",MAX_CACHE=200,PreloadCache=function(){function e(t,r){_classCallCheck(this,e);var n=r===CACHE_TYPES.MEMORY?MemoryCache:AsyncStorage;this._driver=new n,this._driver._initStorage(DefaultConfig).catch((function(){})),this._hasIdbForbidden=!1,this._maxCache=!t||t<=0?MAX_CACHE:t,this.setMaxCache(this._maxCache),this._allCachedKeys={},this._allCachedTimeKeys={},this.getCachedKeysFromLocal(),this._readyPromise=new ProxyPromise$1,this.init()}return _createClass(e,[{key:"getCachedKeysFromLocal",value:function(){var e=proxyLocalStorage$1.getItem(SESSION_KEY);if(e)for(var t=e.split(SPLIT),r=0;r<t.length;r++){var n=t[r],o=this._getCacheKeyInfos(n),i=o.time,a=o.cachedKey;this._allCachedKeys[a]=1,this._allCachedTimeKeys[a]=i}}},{key:"_getCacheKeyInfos",value:function(e){var t,r=e.split(TIMESPLIT);return 2===r.length&&(t=r[0],e=r[1]),{time:t,cachedKey:e}}},{key:"writeCachedKeysToLocal",value:function(e){var t=[];this._allCachedKeys={},this._allCachedTimeKeys={};for(var r=0;r<e.length;r++){var n=e[r].key,o=this._getCacheKeyInfos(n),i=o.time,a=o.cachedKey;this._allCachedKeys[a]=1,this._allCachedTimeKeys[a]=i,t.push(n)}var s=t.join(SPLIT);proxyLocalStorage$1.setItem(SESSION_KEY,s)}},{key:"init",value:function(){var e=this;this._driver.setItem("test","test").then((function(){})).catch((function(){e._hasIdbForbidden=!0})).finally((function(){e._driver.removeItem("test").catch((function(){})),e._hasIdbForbidden&&(e._driver=new MemoryCache,e._driver._initStorage(DefaultConfig)),e._getAll(),e._readyPromise.resolve()}))}},{key:"_getAll",value:function(){var e=this;this._driver.all().then((function(t){e._cachedLength=t.length;var r=t.length-e._maxCache,n=t;if(r>0){var o=_sliceInstanceProperty(t).call(t,0,r);n=_sliceInstanceProperty(t).call(t,r);for(var i=0;i<o.length;i++)e.removeItem(o[i].key).then((function(){}))}e.writeCachedKeysToLocal(n)})).catch((function(){}))}},{key:"getItem",value:function(e,t){if(!this.hasItem(e))return _Promise.resolve(!1);var r=this._getTimeKey(e).timeKey;return this._driver.getItem(r,t)}},{key:"setItem",value:function(e,t,r){var n=this;this._getTimeKey(e).timeKey&&this.removeItem(e);var o=(new Date).getTime();this._allCachedKeys[e]=1,this._allCachedTimeKeys[e]=o;var i=this._genTimeKey(e,o);return r=r?function(){n._getAll(),r()}:function(){n._getAll()},this._driver.setItem(i,t,r)}},{key:"_getTimeKey",value:function(e){var t=this._allCachedTimeKeys[e],r=e;return t&&(r=this._genTimeKey(e,t)),{timeKey:r,time:t}}},{key:"_genTimeKey",value:function(e,t){var r,n;return _concatInstanceProperty(r=_concatInstanceProperty(n="".concat(t)).call(n,TIMESPLIT)).call(r,e)}},{key:"removeItem",value:function(e,t){var r=this._getTimeKey(e).timeKey,n=this._driver.removeItem(r,t);return delete this._allCachedKeys[e],delete this._allCachedTimeKeys[e],n}},{key:"hasItem",value:function(e){return!!this._allCachedKeys[e]}},{key:"clear",value:function(e){return this._driver.clear(e)}},{key:"length",value:function(e){return this._driver.length(e)}},{key:"setMaxCache",value:function(e){"number"==typeof e&&e>0&&(this._maxCache=e)}}]),e}(),PRELOADER_KEY="DEFAULT",PreloaderManager=function(){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;_classCallCheck(this,e),EventEmitter(this),this._preloadDataList=[],this._currentPreloadInst=null,this._dashPreloadList=[],this.autoPreload=r.autoPreload||!1,this._onPreloadNext=_bindInstanceProperty(t=this.onPreloadNextReady).call(t,this),this.on(PRELOAD_NEXT,this._onPreloadNext),this._preloaderConfigs={},this.update(r,n,o),this._cacheInst=new PreloadCache(r.preloadMaxCacheCount,r.preloadCacheType),this._preloadCacheProgress={},this._ptag_=!0,this._cachedDatas={}}return _createClass(e,[{key:"_getProloaderKey",value:function(e){return e.vtype?e.vtype:PRELOADER_KEY}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!r)throw new Error("PreloaderManager predictInst is null");var n=this._getProloaderKey(e);this._preloaderConfigs[n]={predictInst:r,readyPromise:r.init(e),handlers:t}}},{key:"cachedDatas",get:function(){return this._cachedDatas}},{key:"onCacheSegment",value:function(e){var t=e.vid,r=e.format,n=e.cacheKey,o=e.total,i=e.loaded,a=e.isInitSegment,s=e.mediaType,l=this.getProgressCacheKey(t,r,s),c=this._preloadCacheProgress[l];c||(c=this._preloadCacheProgress[l]={}),c[n]={total:o,loaded:i,isInitSegment:a}}},{key:"onCachePredict",value:function(e){var t=e.vid,r=e.data;t&&r&&(this._cachedDatas[t]=r)}},{key:"getProgressCacheKey",value:function(e,t,r){var n,o;return _concatInstanceProperty(n=_concatInstanceProperty(o="".concat(e,"-")).call(o,t,"-")).call(n,r)}},{key:"onPreloadNextReady",value:function(){this.onPreloadNext()}},{key:"onPreloadSegDone",value:function(){this.autoPreload&&this.emit(PRELOAD_NEXT)}},{key:"onPreloadNext",value:function(){var e=this;if(null==this._currentPreloadInst&&this._preloadDataList.length>0){if(this._preloadDataList.length>0){var t=this._preloadDataList.shift().data;if(t.payload){var r,n=this._getProloaderKey(t),o=this._preloaderConfigs[n];if(!o)return void console.warn("need to set vtype, no preloader",t);this._currentPreloadInst=new PRELOADER(t,this,o,(function(t){e.onCacheSegment(t)}),(function(t){e.onCachePredict(t)})),this._currentPreloadInst.on(PRELOAD_SEG_DONE,_bindInstanceProperty(r=this.onPreloadSegDone).call(r,this)),this._currentPreloadInst.start().then((function(){e._currentPreloadInst.preloadSeg()})).catch((function(){e._currentPreloadInst=null}))}}}else null!=this._currentPreloadInst&&(this._currentPreloadInst.state===STATES.IDLE?this._currentPreloadInst.preloadSeg():this._currentPreloadInst.state===STATES.FINISH?(this._currentPreloadInst.destroy(),this._currentPreloadInst=null):this._currentPreloadInst.state===STATES.PREPARE&&(this._currentPreloadInst.cnt++,this._currentPreloadInst.cnt>2&&(this._currentPreloadInst.destroy(),this._currentPreloadInst=null)))}},{key:"addDashPreloader",value:function(e){e&&e.data&&(this._preloadDataList.push(e),_sortInstanceProperty(this).call(this,this._preloadDataList),this.autoPreload&&this.emit(PRELOAD_NEXT))}},{key:"_addDashPreloader",value:function(e){e&&e.data&&this._preloadDataList.push(e)}},{key:"addDashPreloaderList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_sortInstanceProperty(this).call(this,e);for(var t=0;t<e.length;t++)this._addDashPreloader(e[t])}},{key:"sort",value:function(e){_sortInstanceProperty(e).call(e,(function(e,t){return void 0===e.order&&void 0===e.order||e.order<t.order?-1:1}))}},{key:"destroy",value:function(){this.off(PRELOAD_NEXT,this._onPreloadNext)}},{key:"cancelLoading",value:function(){this._currentPreloadInst&&(this._currentPreloadInst.cancelLoading(),this._currentPreloadInst=null),this._preloadDataList=[]}},{key:"preloadCacheProgress",value:function(e){var t=e.vid,r=e.format,n=e.mediaType,o=e.prelaodType,i=e.bitrate,a=e.set_duration,s=e.set_size,l=e.media_type,c=e.start_time,u=this.getProgressCacheKey(t,r,n),$=this._preloadCacheProgress[u];if($){for(var d=_Object$values($),p=0,y=0,f=0,h=0,m=0,b=0;b<d.length;b++){var g=d[b];g.isInitSegment&&(p=g.total,f=g.loaded,h=g.loaded===g.total?DOWN_STATES.SUCCESS:DOWN_STATES.DOWNLOADING),y+=g.total,m+=g.loaded}return{media_type:l,preload_type:o,stream_bitrate:i,header_size:p,content_total_size:y,start_time:c||-1,state_info:{set_duration:a,set_size:s,current_header_download_size:f,current_content_download_size:m,header_download_state:h,content_download_state:m===y?DOWN_STATES.SUCCESS:DOWN_STATES.DOWNLOADING}}}return null}},{key:"getPreloadTaskInfos",value:function(){}},{key:"getItem",value:function(e,t){return this._cacheInst.getItem(e,t)}},{key:"setItem",value:function(e,t,r){return this._cacheInst.setItem(e,t,r)}},{key:"removeItem",value:function(e,t){return this.removeItem(e,t)}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=e.GLOBAL_KEY+(t.globalKey?t.globalKey:""),i=window[o];if(i&&i._ptag_)return i.update(t,r,n),i;var a=new e(t,r,n);return window[o]=a,a}}]),e}();PreloaderManager.GLOBAL_KEY="__preloadcontext__";var PreloaderBase=function(){function e(t){_classCallCheck(this,e),EventEmitter(this),this.options=t,this.promisePolyfill(),this.before(),this.check(),this._preloadManager=PreloaderManager.getInstance(t,this.handlers,this.predictInst),this.loadingTasks=[]}return _createClass(e,[{key:"promisePolyfill",value:function(){_Promise.prototype.finally||(_Promise.prototype.finally={finally:function(e){var t=function(t){return _Promise.resolve(e()).then(t)};return this.then((function(e){return t((function(){return e}))}),(function(e){return t((function(){return _Promise.reject(e)}))}))}}.finally)}},{key:"before",value:function(){throw new Error("need")}},{key:"check",value:function(){if(!this.handlers)throw new Error("handlers null");if(!this.handlers.start||!this.handlers.onRequest)throw new Error("handlers callback null");if(!this.predictInst)throw new Error("predictInst null");if(!this.predictInst.__p__)throw new Error("predictInst need extends predictbase")}},{key:"preloadNext",value:function(){this._preloadManager.emit(PRELOAD_NEXT)}},{key:"preloadManager",get:function(){return this._preloadManager}},{key:"start",value:function(e){throw new Error("start need implment, return Promise")}},{key:"cancelLoading",value:function(){for(var e=0;e<this.loadingTasks.length;e++)try{var t=this.loadingTasks[e];"function"==typeof t.cancel&&t.cancel()}catch(e){}this.loadingTasks=[],this._preloadManager.cancelLoading()}},{key:"addTasker",value:function(e){this.loadingTasks.push(e)}},{key:"removeTasker",value:function(e){var t=this;_setTimeout((function(){for(var r=t.loadingTasks.length-1;r>-1;r--)if(t.loadingTasks[r]===e){var n;_spliceInstanceProperty(n=t.loadingTasks).call(n,r,1);break}}))}},{key:"addDashPreloader",value:function(e){this._preloadManager.addDashPreloader(e)}},{key:"addDashPreloaderList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._preloadManager.addDashPreloaderList(e)}}]),e}(),PredictBase=function(){function e(){_classCallCheck(this,e),this.bandwidth2item={},this._mediaInfos=null,this.__p__=!0}return _createClass(e,[{key:"init",value:function(){throw new Error("init func not implement, return promise")}},{key:"preloadPredict",value:function(e){throw new Error("preloadPredict error",e)}},{key:"updateMediaInfos",value:function(e){if(this._mediaInfos=e,this.bandwidth2item={},this.dynamic_video=e&&e.dynamic_video_list,this.dynamic_video&&this.dynamic_video.length>0)for(var t=0;t<this.dynamic_video.length;t++){var r=this.dynamic_video[t];this.bandwidth2item[r.bitrate||r.bandwidth]=r}}},{key:"getIdx",value:function(e,t){var r=0;return _forEachInstanceProperty(e).call(e,(function(e,n){e.definition===t&&(r=n)})),r}},{key:"cachedData",get:function(){return null}}]),e}(),VTYPES=VTYPES$1,CODEC_TYPE$1={H264:"h264",H265:"h265"},MAX_LOADING_COUNT=1,PRELOAD_TYPES=PRELOAD_TYPES$1,DEFAULT_TRUNK=8e5,_BITRATE_SELECTOR=null,Predict=function(e){_inherits$5(r,PredictBase);var t=_createSuper$5(r);function r(){return _classCallCheck$8(this,r),t.apply(this,arguments)}return _createClass$8(r,[{key:"init",value:function(){return _Promise.resolve()}},{key:"preloadPredict",value:function(e){return e}}]),r}(),Mp4Preloader=function(e){_inherits$5(a,PreloaderBase);var t,r,n,o,i=_createSuper$5(a);function a(e,t){var r;return _classCallCheck$8(this,a),e.vtype=VTYPES.MP4,(r=i.call(this,e)).player=t,r.loadingCount=0,r._mp4=null,r._loader=null,r._pendingPromise=null,r.playerId=t.playerId,r}return _createClass$8(a,[{key:"log",value:function(e){for(var t,r="[Preloader] ".concat(e),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];log$3.apply(void 0,_concatInstanceProperty(t=[r]).call(t,o))}},{key:"before",value:function(){var e=this;this.handlers={start:function(t){var r,n,o,i,s,l=t.payload||[];if(0===l.length)return _Promise.reject();var c=t.vid,u=t.vtype||VTYPES.MP4,$=t.codecType||CODEC_TYPE$1.H264,d=e.getUserSelectDefinition(),p=e.checkCacheKey(c,l,d,u,$);if(console.log(_concatInstanceProperty(r=_concatInstanceProperty(n=_concatInstanceProperty(o="[Preloader] ".concat(c," codecType:")).call(o,$," vtype:")).call(n,u," hasCache:")).call(r,p)),p||"MP3"===u)return _Promise.reject();var y=e.getInitDefinition(l,e.options.definition,d);if(console.log("[Preloader] ".concat(c," getInitDefinition"),y),!y)return _Promise.reject();var f=y.definition,h=t.preloadTime||e.options.preloadTime,m=t.preloadSize||e.options.preloadSize||Math.pow(25,4)-1,b=a.generateUniqueKey({vid:c,definition:f,vtype:u,codecType:$});log$3(_concatInstanceProperty(i=_concatInstanceProperty(s="[Preloader] ".concat(c," start duration:")).call(s,y.duration," cacheKey:")).call(i,b));var g=_objectSpread2$3({vid:c,definition:f,preloadTime:h,preloadSize:m,cacheKey:b,codecType:$,vtype:u},y);return e.loadingCount++,e.start(g)},onRequest:function(t,r){var n=t.url,o=t.range,i=t.extData;return e.getData(n,o,i,r)}},this.loggerConfig={logger:function(){},openLog:!1},this.predictInst=new Predict(this.loggerConfig)}},{key:"start",value:function(e){var t=this,r={mediaInfos:{dynamic_video_list:[],dynamic_audio_list:[]},onObtain:function(){var e=new ProxyPromise;return e.resolve(r.mediaInfos),e},onTransform:function(r){var n=new ProxyPromise;t._pendingPromise=n;var o=e.preloadTime,i=e.codecType;return o&&(i!==CODEC_TYPE$1.H265||t.options.supportHevc)?t.loadByPreloadTime(e,n):t.loadByChunkSize(e,n),n}};return _Promise.resolve(r)}},{key:"getInitDefinition",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=null;if(a.BitRateAdapter)n=a.BitRateAdapter.getSuitableBitrate(e,r),this.log("Mp4Preloader.BitRateAdapter",n);else{for(var o=0,i=0;i<e.length;i++){if(e[i].definition===t){o=i;break}}n=e[o]}return n||(n=e[0]),n}},{key:"getPreLoadData",value:function(e){var t=this,r=new ProxyPromise;return this.getItemSameVid(e).then((function(e){if(t.log("getPreLoadData",e.value),e.value){var n=e.value,o=n.mediaSegList,i=n.meta,a=n.type,s=n.buffer,l=n.preloadTime,c=n.vid,u=n.cacheKey,$=n.definition,d=n.byteLength,p=n.duration,y=n.fileSize,f=n.from,h=n.vtype,m=n.codecType,b=n.initSeg,g={vid:c,type:a,vtype:h,codecType:m,definition:$,bitrate:n.bitrate,cacheKey:u,duration:p||0,byteLength:d,from:f,meta:i};a===PRELOAD_TYPES.SIZE?(g.buffer=s,g.fileSize=y||0):(g.mediaSegList=o,g.preloadTime=l,g.initSeg=b),r.resolve(g)}else r.resolve(null)})).catch((function(e){r.reject(e)})),r}},{key:"setPreLoadData",value:(o=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r){var n,o,i,a,s,l,c,u,$,d,p,y,f,h,m,b,g,S,I=this;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new ProxyPromise,o=r.mediaSegList,i=r.meta,a=r.vid,s=r.definition,l=r.type,c=r.buffer,u=r.duration,$=r.byteLength,d=r.preloadTime,p=r.preloadSize,y=r.fileSize,f=r.from,h=r.vtype,m=r.codecType,b=r.initSeg,g=r.bitrate,S={codecType:m,vtype:h,vid:a,definition:s,cacheKey:t,type:l,from:f,meta:i,fileSize:y,bitrate:g},l===PRELOAD_TYPES.SIZE?(S.buffer=c,S.byteLength=$||0,S.preloadSize=p||0,S.fileSize=y,S.buffer&&S.buffer.byteLength>0&&(this.setItem(t,S),n.resolve(!0))):(S.mediaSegList=o||[],S.duration=u,S.byteLength=$||0,S.preloadTime=d||0,S.initSeg=b,i&&0===o.length?(this.setItem(t,S),n.resolve(!0)):(_everyInstanceProperty(o).call(o,(function(e){return!!e.buffer&&e.state}))||n.resolve(!1),this.setItem(t,S).then((function(){I.log("setPreLoadData1 success",t,(new Date).getTime())})),n.resolve(!0))),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getInitCacheData",value:function(e,t){var r,n={type:e,meta:null,byteLength:0,fileSize:0,bitrate:0};return e===PRELOAD_TYPES.DURATION?(n.mediaSegList=[],n.initSeg=null,n.duration=0):n.buffer=null,_mapInstanceProperty(r=_Object$keys(t)).call(r,(function(e){n[e]=t[e]})),n}},{key:"updatePreCacheData",value:function(e,t,r,n,o,i,a){var s=e.mediaSegList;if(e.type===PRELOAD_TYPES.SIZE||-1===o)return e.buffer=Concat(Uint8Array,e.buffer.buffer||[],new Uint8Array(t)),e;for(var l=-1,c=0;c<s.length;c++)if(s[c].index===o){l=c;break}var u=i||[0,0];return l>-1?(t&&(s[l].buffer=Concat(Uint8Array,s[l].buffer||[],new Uint8Array(t))),r.length>1&&(s[l].range.length>1?s[l].range[1]=r[1]:s[l].range=r),-1!==a[1]&&(n=s[l].range[1]>=a[1]),s[l].state=n):(e.duration=u[1],s.push({buffer:t,range:r||[],index:o,totalRange:a||[],timeRange:[u[0],u[1]],state:n})),n&&(e.byteLength=r[1]),n}},{key:"checkCacheKey",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:VTYPES.MP4,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:CODEC_TYPE$1.H264;if(r){var i=a.generateUniqueKey({vid:e,definition:r,vtype:n,codecType:o});return this.hasItemSameVid(i)?i:null}for(var s=0;s<t.length;s++){var l=a.generateUniqueKey({vid:e,definition:t[s].definition,vtype:n,codecType:o});if(this.hasItemSameVid(l))return l}return null}},{key:"checkCanPreloadNext",value:function(){var e=!0;return this.loadingCount>=MAX_LOADING_COUNT&&(e=!1),e&&this.preloadNext(),e}},{key:"loadByPreloadTime",value:function(e,t){var r,n,o=this,i=e.vid,a=e.cacheKey,s=e.preloadTime,l=e.definition,c=e.duration,u=e.bitrate,$=e.codecType,d=e.vtype,p=null;if(p="Array"===util.typeOf(e.url)?e.url.length>1?e.url[1].src:e.url[0].src:e.url){p=util.extUrl(p,{__vid:i});var y=s>=this.options.segmentMinDuration?this.options.segmentMinDuration:s;this.log("loadByPreloadTime",_concatInstanceProperty(r=_concatInstanceProperty(n="".concat(e.cacheKey,", definition:")).call(n,e.definition,",segmentMinDuration:")).call(r,y),e);var f=util.getFileSize(u,c);this._mp4=new MP4(p,u,_objectSpread2$3({segmentDuration:y,codecType:this.codecType,chunkSize:this.options.preloadSize,duration:c,fileSize:f,playerId:this.playerId,vid:i,useUrlRange:!1,retryCount:1,retryDelay:1e3,supportHevc:this.options.supportHevc},this.options.reqOptions),null,null,{},[],this.firstFrameTime,"");var h=this.getInitCacheData(PRELOAD_TYPES.DURATION,{vid:i,preloadTime:s,definition:l,cacheKey:a,codecType:$,vtype:d,bitrate:u||0});this._mp4.once("metaReady",(function(r){o.log("".concat(i," metaReady this._pendingPromise"),o._pendingPromise.state),h.meta=r,h.from=2,o._mp4.cancelLoading(),o.startLoadByFragments(h,e,t)})),this._mp4.on("error",(function(e){console.error("[Preloader] ".concat(i," loadByPreloadTime error"),e),o._endLoadFragments()})),this._mp4.init({})}else this._endLoadFragments()}},{key:"loadByChunkSize",value:(n=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t){var r,n,o,i,a,s,l,c,u,$,d,p,y,f,h,m,b,g=this;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.vid,n=t.cacheKey,o=t.definition,i=t.duration,a=t.bitrate,s=t.codecType,l=t.vtype,c=this.options,u="Array"===util.typeOf(t.url)?t.url[0].src:t.url){e.next=6;break}return this._endLoadChunk(),e.abrupt("return");case 6:return u=util.extUrl(u,{__vid:r}),$=util.getFileSize(a,i),d=getMetaSize(i,DEFAULT_TRUNK,$),this.log("".concat(r,"loadByChunkSize"),t.cacheKey,t.definition,d,t),p=this.getInitCacheData(PRELOAD_TYPES.SIZE,{vid:r,definition:o,cacheKey:n,codecType:s,vtype:l,fileSize:$,bitrate:a||0}),this.MP4Loader=new MP4Loader(_objectSpread2$3(_objectSpread2$3({url:u,retry:c.retry||2,retryDelay:c.retryDelay||1e3,timeout:3e3},c.reqOptions),{},{segmentDuration:c.segmentDuration})),e.prev=12,y=new Uint8Array(0),f=0,h=null,m=null,b=function(e,t,r){if(e&&r.range[0]===f&&(y=Concat(Uint8Array,y,new Uint8Array(e)),f+=e.byteLength),r.meta){g.MP4Loader.cancel();var o=r.meta,i=o.videoSegments,a=o.audioSegments;m=_objectSpread2$3(_objectSpread2$3({},o.meta),{},{ext:{videoTrak:i,audioTrak:a}}),p.meta=m,p.buffer=y,p.byteLength=y.byteLength,g.setPreLoadData(n,p),h=util.getFragRange(0,i,a),g.log("".concat(n," onProgressHandle4 meta"),t,h,f,y.byteLength),h[0]<f&&(h[0]=f),g._loadOneChunk(p,h)}},e.next=20,this.MP4Loader.loadMetaProcess(this.MP4Loader.cache,[0,d],b);case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(12),console.error("[Preloader] ".concat(n," loadByChunkSize error"),e.t0),this._endLoadChunk();case 26:case"end":return e.stop()}}),e,this,[[12,22]])}))),function(e){return n.apply(this,arguments)})},{key:"_loadOneChunk",value:(r=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r){var n,o,i,a,s,l,c,u;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.vid,o=t.cacheKey,i=t.buffer,e.prev=1,e.next=4,this.MP4Loader.loadData(r,this.MP4Loader.cache,{});case 4:a=e.sent,this.log("".concat(n," _loadOneChunk"),r,a),s=a.response,(l=a.data)?(this._endLoadChunk(),s&&s.headers&&(c=util.getFileSize(s.headers))&&(t.fileSize=c),u=Concat(Uint8Array,i,new Uint8Array(l)),t.buffer=u,t.byteLength=u.byteLength,this.log("".concat(n," _loadOneChunk ret"),o,u.byteLength,t),t.from=4,this.setPreLoadData(o,t)):this._endLoadChunk(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),console.error("[Preloader] ".concat(n," loadByChunkSize error"),e.t0),this._endLoadChunk();case 14:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return r.apply(this,arguments)})},{key:"_endLoadChunk",value:function(){this.log("_endLoadChunk loadingCount:".concat(this.loadingCount),this._pendingPromise?this._pendingPromise.state:null),this._pendingPromise&&(this._pendingPromise.resolve(),this._pendingPromise=null),this.loadingCount>0&&this.loadingCount--,this.MP4Loader&&(this.MP4Loader.cancel(),this.MP4Loader.destroy(),this.MP4Loader=null)}},{key:"startLoadByFragments",value:(t=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t,r,n){var o,i,a,s,l,c,u=this;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=r.preloadTime,i=r.vid,console.log("[Preloader] ".concat(i," startLoadByFragments")),a=[],s=0;s<this._mp4.timeRange.length;s++)this._mp4.timeRange[s].startTime<=o&&a.push(s);return l=function(e){u.log("[Preloader] _failedCallback",e),u._endLoadFragments()},c=function(){var e=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(r){var n,o,i,s,$,d,p,y,f;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u._mp4){e.next=2;break}return e.abrupt("return");case 2:if(n=r.buffer,o=r.context,i=r.state,s=r.initSeg,$=o.fragIndex,d=o.range,p=o.timeRange,y=u._mp4.getFragRange($),!t.initSeg&&s&&(t.initSeg=s),f=u.updatePreCacheData(t,n,d,i,$,p,y),console.log("[Preloader] ".concat(t.cacheKey," _successCallback"),$,i,f,d,p,y,r),t.from=3,!f){e.next=20;break}return e.next=12,u.setPreLoadData(t.cacheKey,t);case 12:if(!($>=a.length-1)){e.next=17;break}u.log("".concat(t.cacheKey," mp4.load end"),$),u._endLoadFragments(),e.next=20;break;case 17:return u.log("".concat(t.cacheKey," mp4.load start"),$+1),e.next=20,u._mp4.loadAllFragmentData($+1,c,l);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=8,this._mp4.loadAllFragmentData(0,c,l);case 8:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"_endLoadFragments",value:function(){this.log("_endLoadFragments loadingCount:".concat(this.loadingCount),this._pendingPromise?this._pendingPromise.state:null),this._pendingPromise&&(this._pendingPromise.resolve(),this._pendingPromise=null),this.loadingCount>0&&this.loadingCount--,this._mp4&&(this._mp4.destroy(),this._mp4=null)}},{key:"getFragment",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=new ProxyPromise;return this.getData(e,t,i,!1).then((function(e){n.createFragment(new Uint8Array(e.res),t[0]-n.mdatStart,r,{range:t,context:e.context}).then((function(e){a.resolve(e)}))})),a}},{key:"getPreloadUrl",value:function(e){var t=e.url,r=e.range,n=e.definition,o=e.vid;return[{url:t,range:r,extData:{cacheKey:a.generateUniqueKey({vid:o,start:r[0],end:r[1],definition:n}),vid:o,format:"mp4"}}]}},{key:"getRangeList",value:function(e){var t=this.allCachedKeys,r={timeRange:[],contentRange:[]};for(var n in t)if(t.hasOwnProperty(n)&&_indexOfInstanceProperty(n).call(n,e)>-1){var o,i,a=n.split("#");if(0===_indexOfInstanceProperty(o=a[2]).call(o,"pretime"))r.timeRange.push([0,_parseFloat$1(_sliceInstanceProperty(i=a[2]).call(i,7))]);else r.contentRange.push([_parseInt$1(a[2]),_parseInt$1(a[3])])}return r}},{key:"hasItemSameVid",value:function(e){if(!e)return!1;var t=this.allCachedKeys;for(var r in t)if(t.hasOwnProperty(r)){if(r===e)return r;var n=r.split("#"),o=e.split("#");if(n.length>=4&&o.length>=4&&n[0]===o[0]){var i,a;if(0===_indexOfInstanceProperty(i=n[2]).call(i,"pretime")&&0===_indexOfInstanceProperty(a=o[2]).call(a,"pretime"))return r;var s=[_parseInt$1(n[2]),_parseInt$1(n[3])],l=[_parseInt$1(o[2]),_parseInt$1(o[3])];if(l[0]>=s[0]&&l[1]>l[0]&&l[1]<=s[1])return r}}return!1}},{key:"removeOthers",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.allCachedKeys;for(var n in r)r.hasOwnProperty(n)&&n.split("#").length>=1&&function(){var r=n.split("#")[0];_everyInstanceProperty(t).call(t,(function(e){return e.split("#").length>=1&&e.split("#")[0]!==r}))&&(e.log("remove cache:".concat(n)),e.cacheInst.removeItem(n))}()}},{key:"getItemSameVid",value:function(e,t){var r,n=this.hasItemSameVid(e);return this.log(_concatInstanceProperty(r="getItemSameVid: key:".concat(e," checkResult:")).call(r,n)),n?this.cacheInst.getItem(n,t).then((function(e){return{value:e,key:n}})):_Promise.resolve({})}},{key:"setItem",value:function(e,t){return this.cacheInst.setItem(e,t)}},{key:"allCachedKeys",get:function(){return this.cacheInst._allCachedKeys}},{key:"cacheInst",get:function(){return this._preloadManager._cacheInst}},{key:"cancelPreloadByVid",value:function(e){if(e){for(var t=this._preloadManager._preloadDataList,r=[],n=0;n<t.length;n++){t[n].data.vid!==e?r.push(t[n]):(console.log("[Preloader] cancelPreloadByVid",e),this.log("cancelPreloadByVid",e))}this._preloadManager._preloadDataList=r}}},{key:"cancelLoading",value:function(e){var t;this._endLoadFragments(),this._endLoadChunk();var r=this._preloadManager;if(r._currentPreloadInst){var n=r._currentPreloadInst._toLoadList,o=[];_mapInstanceProperty(n).call(n,(function(t){return t.playerId!==e&&o.push(t),t})),r._currentPreloadInst._toLoadList=o}var i=[],a=[];_mapInstanceProperty(t=r._preloadDataList).call(t,(function(t){return t.playerId!==e?i.push(t):a.push(t.data.vid),t})),this.log("cancelLoading",e,a.join(",")),r._preloadDataList=i}},{key:"checkIfExistInList",value:function(e){for(var t=this._preloadManager._preloadDataList,r=0;r<t.length;r++)if(e===t[r].data.vid)return!0;return!1}},{key:"addPreloader",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e.data){e.data.vtype||(e.data.vtype=VTYPES.MP4);var n=e.data.vid,o=this.checkIfExistInList(n);console.log("[Preloader] addPreloader checkIfExistInList",n,o),r&&n===r||o||(e.playerId=t,this.addDashPreloader(e))}}},{key:"addPreloaderList",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=[],n=0;n<e.length;n++){var o=e[n].data,i=o.vid,a=o.vtype,s=this.checkIfExistInList(i);console.log("[Preloader] addPreloaderList checkIfExistInList",i,i===t,s),t&&i===t||s||(a||(e[n].data.vtype=VTYPES.MP4),r.push(e[n]))}console.log("[Preloader] addPreloaderList length is ".concat(r.length)),this.addDashPreloaderList(r)}},{key:"setUserSelectDefinition",value:function(e){this._preloadManager&&(this._preloadManager.userDefinition=e)}},{key:"getUserSelectDefinition",value:function(){return this._preloadManager.userDefinition||null}},{key:"destroy",value:function(){this._endLoadFragments(),this._endLoadChunk(),this.cancelLoading(this.playerId)}}],[{key:"PRELOAD_TYPES",get:function(){return PRELOAD_TYPES}},{key:"BitRateAdapter",get:function(){return _BITRATE_SELECTOR},set:function(e){_BITRATE_SELECTOR=e}},{key:"generateUniqueKey",value:function(e){var t,r,n,o,i=e.vid,a=e.mediaType,s=e.definition,l=e.codecType,c=e.vtype;return a=a||"video",s=s||"-1",l=l||CODEC_TYPE$1.H264,c=c||VTYPES.MP4,i?_concatInstanceProperty(t=_concatInstanceProperty(r=_concatInstanceProperty(n=_concatInstanceProperty(o="".concat(i,"#")).call(o,a,"#")).call(n,l,"#")).call(r,c,"#")).call(t,s):null}}]),a}(),CUSTOM_EVENTS={MEDIA_EXPIRED:"MEDIA_EXPIRED",INIT_FAIL:"INIT_FAIL",PARSE_ERROR:"PARSE_ERROR",PLAYER_LOG:"PLAYER_LOG",BUFFERED_RESET:"BUFFERED_RESET"},BUFFER_BREAK=1e4,$$b=_export$1,$reduce=arrayReduce$1.left,arrayMethodIsStrict$1=arrayMethodIsStrict$h,CHROME_VERSION=engineV8Version$1,IS_NODE=engineIsNode$1,STRICT_METHOD$1=arrayMethodIsStrict$1("reduce"),CHROME_BUG=!IS_NODE&&CHROME_VERSION>79&&CHROME_VERSION<83;$$b({target:"Array",proto:!0,forced:!STRICT_METHOD$1||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var GapJump=function(){function e(t,r){var n,o;_classCallCheck$8(this,e),this.player=t,this.mediaElem=t.video,this.config=r,this.timer=new IntervalTimer$1,this.prevReadyState=this.mediaElem.readyState,this.didFireLargeGap=!1,this.seekingEventReceived=!1,this.onWaitFunc=_bindInstanceProperty(n=this._onWaiting).call(n,this),this.onPlayFunc=_bindInstanceProperty(o=this._onPlay).call(o,this),this.isSafari=/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),!1!==this.config.useGapJump&&this._start(),this.hasPlayed=!1}return _createClass$8(e,[{key:"_onWaiting",value:function(){this.onGapJump()}},{key:"_onPlay",value:function(){this.hasPlayed=!0}},{key:"_start",value:function(){this.mediaElem.addEventListener("waiting",this.onWaitFunc),this.mediaElem.addEventListener("play",this.onPlayFunc)}},{key:"onSegmentAppend",value:function(e){if(this.config.enableCheckBufferDiff&&this.mediaElem){var t,r=_reduceInstanceProperty(e).call(e,(function(e,t){return e+t.downloaded?t[1]-t[0]:0}),0);_reduceInstanceProperty(t=this._getBuffered(this.mediaElem.buffered)).call(t,(function(e,t){return e+(t.end-t.start)}),0)/r<.8&&(log$3("onSegmentAppend detectGap"),this.player&&this.player.emit("detectGap"))}this.onGapJump()}},{key:"onSeeking",value:function(){this.seekingEventReceived=!0,this.didFireLargeGap=!1}},{key:"onGapJump",value:function(){if(this.mediaElem.readyState!==HTMLMediaElement.HAVE_NOTHING){if(this.mediaElem.seeking){if(!this.seekingEventReceived)return}else this.seekingEventReceived=!1;if(!this.mediaElem.paused||0===this.mediaElem.currentTime||!this.hasPlayed){this.mediaElem.readyState!==this.prevReadyState&&(this.didFireLargeGap=!1,this.prevReadyState=this.mediaElem.readyState);var t=this.mediaElem.buffered,r=this.config.smallGapLimit||.5,n=this.config.gapDetectionThreshold||.1,o=this.mediaElem.currentTime,i=this._getIndex(t,o,n);if(null!==i&&(0!==i||t&&t.length)){var a=t.start(i)+.1;if(!(a>this.mediaElem.duration)){var s=a-o,l=s<=r;s<e.BROWSER_GAP_TOLERANCE||l&&(!0!==this.config.disableGapSetPosition&&(log$3("onGapJump this.mediaElem.currentTime"),this.mediaElem.currentTime=this.isSafari?a+.1:a),this.player&&this.player.emit("detectGap"),log$3("gapJump gapIndex",i,"isGapSamll",l,"jumpLargeGap",!1,"currentTime",this.mediaElem.currentTime),.08!==a&&this.player&&this.player.emit("log",{type:"oneevent",end_type:"gap",vid:this.player.config.vid,ext:{video_postion:Math.floor(1e3*a)}}))}}}}}},{key:"_getIndex",value:function(e,t,r){if(!e||!e.length)return null;if(1===e.length&&e.end(0)-e.start(0)<1e-6)return null;for(var n=this._getBuffered(e),o=null,i=0;i<n.length;i++){if(n[i].start>t&&(0===i||n[i-1].end-t<=r)){o=i;break}}return o}},{key:"_getBuffered",value:function(e){if(!e)return[];for(var t=[],r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}},{key:"destroy",value:function(){this.mediaElem.removeEventListener("waiting",this.onWaitFunc),this.mediaElem.removeEventListener("play",this.onPlayFunc),this.timer.clear(),this.timer=null}}]),e}();GapJump.BROWSER_GAP_TOLERANCE=.001;var call=functionCall,hasOwn$3=hasOwnProperty_1,isPrototypeOf$2=objectIsPrototypeOf,regExpFlags=regexpFlags$3,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn$3(e,"flags")||!isPrototypeOf$2(RegExpPrototype$1,e)?t:call(regExpFlags,e)},PROPER_FUNCTION_NAME=functionName.PROPER,defineBuiltIn$1=defineBuiltIn$h,anObject$1=anObject$p,$toString=toString$l,fails$c=fails$19,getRegExpFlags=regexpGetFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$c((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$1(RegExp.prototype,TO_STRING,(function(){var e=anObject$1(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags(e))}),{unsafe:!0});var global$6=global$T,fails$b=fails$19,uncurryThis$7=functionUncurryThis,toString$4=toString$l,trim$2=stringTrim.trim,whitespaces$1=whitespaces$5,$parseInt$1=global$6.parseInt,Symbol$2=global$6.Symbol,ITERATOR$2=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec=uncurryThis$7(hex.exec),FORCED$5=8!==$parseInt$1(whitespaces$1+"08")||22!==$parseInt$1(whitespaces$1+"0x16")||ITERATOR$2&&!fails$b((function(){$parseInt$1(Object(ITERATOR$2))})),numberParseInt=FORCED$5?function(e,t){var r=trim$2(toString$4(e));return $parseInt$1(r,t>>>0||(exec(hex,r)?16:10))}:$parseInt$1,$$a=_export,$parseInt=numberParseInt;$$a({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var internalMetadata={exports:{}},objectGetOwnPropertyNamesExternal={},classof$2=classofRaw$2,toIndexedObject$1=toIndexedObject$i,$getOwnPropertyNames=objectGetOwnPropertyNames.f,arraySlice=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames(e)}catch(e){return arraySlice(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$2(e)?getWindowNames(e):$getOwnPropertyNames(toIndexedObject$1(e))};var fails$a=fails$19,arrayBufferNonExtensible=fails$a((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$9=fails$19,isObject$4=isObject$x,classof$1=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES$1=fails$9((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES$1||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$4(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof$1(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$8=fails$19,freezing=!fails$8((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$9=_export,uncurryThis$6=functionUncurryThis,hiddenKeys=hiddenKeys$8,isObject$3=isObject$x,hasOwn$2=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible4=objectIsExtensible,uid=uid$8,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$3(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$2(e,METADATA)){if(!isExtensible4(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn$2(e,METADATA)){if(!isExtensible4(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible4(e)&&!hasOwn$2(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$6([].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},$$9({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,$$8=_export,global$5=global$T,uncurryThis$5=functionUncurryThis,isForced$1=isForced_1,defineBuiltIn=defineBuiltIn$h,InternalMetadataModule=internalMetadataExports,iterate$1=iterate$m,anInstance$1=anInstance$b,isCallable=isCallable$y,isNullOrUndefined$1=isNullOrUndefined$d,isObject$2=isObject$x,fails$7=fails$19,checkCorrectnessOfIteration=checkCorrectnessOfIteration$6,setToStringTag=setToStringTag$9,inheritIfRequired$1=inheritIfRequired$5,collection$1=function(e,t,r){var n=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=n?"set":"add",a=global$5[e],s=a&&a.prototype,l=a,c={},u=function(e){var t=uncurryThis$5(s[e]);defineBuiltIn(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!isObject$2(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!isObject$2(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!isObject$2(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(isForced$1(e,!isCallable(a)||!(o||s.forEach&&!fails$7((function(){(new a).entries().next()})))))l=r.getConstructor(t,e,n,i),InternalMetadataModule.enable();else if(isForced$1(e,!0)){var $=new l,d=$[i](o?{}:-0,1)!=$,p=fails$7((function(){$.has(1)})),y=checkCorrectnessOfIteration((function(e){new a(e)})),f=!o&&fails$7((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));y||((l=t((function(e,t){anInstance$1(e,s);var r=inheritIfRequired$1(new a,e,l);return isNullOrUndefined$1(t)||iterate$1(t,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=l),(p||f)&&(u("delete"),u("has"),n&&u("get")),(f||d)&&u(i),o&&s.clear&&delete s.clear}return c[e]=l,$$8({global:!0,constructor:!0,forced:l!=a},c),setToStringTag(l,e),o||r.setStrong(l,e,n),l},create$1=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$7,defineBuiltIns=defineBuiltIns$5,bind$1=functionBindContext,anInstance=anInstance$b,isNullOrUndefined=isNullOrUndefined$d,iterate=iterate$m,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$5,setSpecies=setSpecies$7,DESCRIPTORS$1=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor=InternalStateModule$1.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,i),setInternalState$1(e,{type:t,index:create$1(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$1||(e.size=0),isNullOrUndefined(o)||iterate(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$1?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$1?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$1?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$1(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$1&&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$1(e,t,(function(e,t){setInternalState$1(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$1("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject$1(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 charAt$1=stringMultibyte.charAt,toString$3=toString$l,InternalStateModule=internalState,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$5,STRING_ITERATOR="String Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState(this,{type:STRING_ITERATOR,string:toString$3(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject(void 0,!0):(e=charAt$1(r,n),t.index+=e.length,createIterResultObject(e,!1))}));var global$4=global$T,DOMIterables$1=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$d,wellKnownSymbol$2=wellKnownSymbol$s,ITERATOR$1=wellKnownSymbol$2("iterator"),TO_STRING_TAG=wellKnownSymbol$2("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(e,t){if(e){if(e[ITERATOR$1]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$1,ArrayValues)}catch(t){e[ITERATOR$1]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty(e,TO_STRING_TAG,t),DOMIterables$1[t])for(var r in ArrayIteratorMethods)if(e[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty(e,r,ArrayIteratorMethods[r])}catch(t){e[r]=ArrayIteratorMethods[r]}}};for(var COLLECTION_NAME in DOMIterables$1)handlePrototype(global$4[COLLECTION_NAME]&&global$4[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var global$3=global$T,path$1=global$3,uncurryThis$4=functionUncurryThis,thisNumberValue$2=uncurryThis$4(1..valueOf),$$7=_export,IS_PURE=isPure,DESCRIPTORS=descriptors,global$2=global$T,path=path$1,uncurryThis$3=functionUncurryThis,isForced=isForced_1,hasOwn$1=hasOwnProperty_1,inheritIfRequired=inheritIfRequired$5,isPrototypeOf$1=objectIsPrototypeOf,isSymbol=isSymbol$6,toPrimitive=toPrimitive$4,fails$6=fails$19,getOwnPropertyNames9=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor11=objectGetOwnPropertyDescriptor.f,defineProperty12=objectDefineProperty.f,thisNumberValue$1=thisNumberValue$2,trim$1=stringTrim.trim,NUMBER="Number",NativeNumber=global$2[NUMBER];path[NUMBER];var NumberPrototype=NativeNumber.prototype,TypeError$1=global$2.TypeError,stringSlice$1=uncurryThis$3("".slice),charCodeAt=uncurryThis$3("".charCodeAt),toNumeric=function(e){var t=toPrimitive(e,"number");return"bigint"==typeof t?t:toNumber(t)},toNumber=function(e){var t,r,n,o,i,a,s,l,c=toPrimitive(e,"number");if(isSymbol(c))throw TypeError$1("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=trim$1(c),43===(t=charCodeAt(c,0))||45===t){if(88===(r=charCodeAt(c,2))||120===r)return NaN}else if(48===t){switch(charCodeAt(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=stringSlice$1(c,2)).length,s=0;s<a;s++)if((l=charCodeAt(i,s))<48||l>o)return NaN;return parseInt(i,n)}return+c},FORCED$4=isForced(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1")),calledWithNew=function(e){return isPrototypeOf$1(NumberPrototype,e)&&fails$6((function(){thisNumberValue$1(e)}))},NumberWrapper=function(e){var t=arguments.length<1?0:NativeNumber(toNumeric(e));return calledWithNew(this)?inheritIfRequired(Object(t),this,NumberWrapper):t};NumberWrapper.prototype=NumberPrototype,FORCED$4&&!IS_PURE&&(NumberPrototype.constructor=NumberWrapper),$$7({global:!0,constructor:!0,wrap:!0,forced:FORCED$4},{Number:NumberWrapper});var copyConstructorProperties=function(e,t){for(var r,n=DESCRIPTORS?getOwnPropertyNames9(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)hasOwn$1(t,r=n[o])&&!hasOwn$1(e,r)&&defineProperty12(e,r,getOwnPropertyDescriptor11(t,r))};(FORCED$4||IS_PURE)&©ConstructorProperties(path[NUMBER],NativeNumber);var global$1=global$T,fails$5=fails$19,uncurryThis$2=functionUncurryThis,toString$2=toString$l,trim3=stringTrim.trim,whitespaces=whitespaces$5,charAt=uncurryThis$2("".charAt),$parseFloat$1=global$1.parseFloat,Symbol$1=global$1.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,FORCED$3=1/$parseFloat$1(whitespaces+"-0")!=-1/0||ITERATOR&&!fails$5((function(){$parseFloat$1(Object(ITERATOR))})),numberParseFloat=FORCED$3?function(e){var t=trim3(toString$2(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt(t,0)?-0:r}:$parseFloat$1,$$6=_export,$parseFloat=numberParseFloat;$$6({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var createTypedArrayConstructor=typedArrayConstructorExports$1;createTypedArrayConstructor("Int32",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var SPPED_CACHE="danger_d_speed";function convert32ToC64(e){var t=e.toString(16);return t.length<=8?{high:0,low:e}:{high:_parseInt$1(t.substr(0,t.length-8),16),low:_parseInt$1(t.substr(t.length-8),16)}}var BaseAbr=function(){function e(t,r,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{logger:function(){},openLog:!1};_classCallCheck$5(this,e),this.bitrate=r,this.segment_duration=o||5e3,this.logger=i.logger,this.openLog=i.openLog,this.cdnHost=t.cdnHost,this._loadedPromise=new ProxyPromise$1,this._wasmPromise=new ProxyPromise$1,this.config=t,this.autoBitrateOpts=t.autoBitrateOpts||{},this.stall_penalty=this.autoBitrateOpts.stall_penalty||11,this.switch_penalty=this.autoBitrateOpts.switch_penalty||4,this.interval=this.autoBitrateOpts.interval||1e3;var a=t.progressTimer||1e3,s=this.autoBitrateOpts.startInterval||a;this.initInterval=.8*s,this._prealodMethod=t.preloadmethod||0,this._videoWidth=0,this._videoHeight=0,this._hasDeviceInfoChanged=!0,this.updateMediaInfos(n,!1)}return _createClass$5(e,[{key:"onLoadWasm",value:function(){var e=this,t=this.module={onRuntimeInitialized:function(){e._wasmPromise.resolve()}};return(0,this.autoBitrateOpts.module)(t),this._wasmPromise}},{key:"updateMediaInfos",value:function(e){var t,r=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._heightToDefitionConfig=new _Map,this._bitrateToDefitionConfig=new _Map,e?(this.mediaInfos=e,_forEachInstanceProperty(t=this.mediaInfos.dynamic_video_list).call(t,(function(e){r._heightToDefitionConfig.set(e.vheight,e),r._bitrateToDefitionConfig.set(e.bitrate,e)}))):n&&console.error("baseAbr mediaInfos null")}},{key:"parseMPD",value:function(){if(this.setDebugModel(this.openLog),this.mediaInfos){this.logger("mediaInfos",this.mediaInfos);try{for(var e=[],t=this.mediaInfos.dynamic_video_list,r=0;r<t.length;r++){var n=t[r];e.push({stream_id:"s".concat(r),bandwidth:n.bitrate||n.bandwidth,width:n.vwidth||n.width,height:n.vheight||n.height,codec:n.codecs||n.codec_type||"h264",frame_rate:Number(n.fps)||-1,segment_duration:this.segment_duration})}var o=_JSON$stringify({v_adaptation:e});this.module.ccall("parseMPD","null",["string"],[o])}catch(e){}}else console.warn("mediaInfos is null")}},{key:"_getDefautSpeed",value:function(e){var t=0,r=window.navigator.connection;if(r&&r.downlink)t=1024*navigator.connection.downlink/8,this.logger("initSpeed connect",t);else try{t=_parseFloat$1(proxyLocalStorage$1.getItem(SPPED_CACHE))||0,this.logger("initSpeed connect",t)}catch(e){}return 0===t&&(t=e&&e.historyAvspeed||0,this.logger("initSpeed history",t)),t}},{key:"setDebugModel",value:function(e){this.module._setDebugModel(e)}},{key:"updateBitrate",value:function(e){this.bitrate=e}},{key:"_updatePreloadSupplier",value:function(e,t){this.module._updatePreloadSupplier(e,t)}},{key:"updatePreloadSupplier",value:function(e){var t=this._getDefautSpeed();this._updatePreloadSupplier(t,e)}},{key:"getPreloadBitrate",value:function(){var e,t=null,r=[];try{this.logger("preloadMethod",this._prealodMethod),e=this.module._getPreloadBitrate(this._prealodMethod);for(var n=0;n<5;n++)r.push(this.module.HEAP32[e/Int32Array.BYTES_PER_ELEMENT+n]);var o={bitrate:r[0],pduration:r[1],preloadType:r[2],size:r[3],mediaType:r[4]};return this.logger("getPreloadBitrate",o),o}catch(e){t=null,console.log("getPreloadBitrate",e)}finally{this.module._free(e)}return t}},{key:"_updateDeviceInfo",value:function(e){try{if(this._hasDeviceInfoChanged){var t=window.devicePixelRatio||1;this.module._updateDeviceInfo(this._videoWidth||Number(this.config.width),this._videoHeight||Number(this.config.height),t,e||-1)}this._hasDeviceInfoChanged=!1}catch(e){console.log("_updateDeviceInfo")}}},{key:"preload",value:function(e){this.parseMPD(),this.updatePreloadSupplier(e),this._updateDeviceInfo(-1);var t=window.devicePixelRatio||1;return this.logger("baseAbr updateDeviceInfo width",this._videoWidth||Number(this.config.width),"height",this._videoHeight||Number(this.config.height),"dpr",t),this.getPreloadBitrate()}}]),e}();BaseAbr.SPPED_CACHE=SPPED_CACHE;var entryVirtual=entryVirtual$o,values$6=entryVirtual("Array").values,parent$2=values$6,values$5=parent$2,classof=classof$K,hasOwn4=hasOwnProperty_1$2,isPrototypeOf=objectIsPrototypeOf$2,method=values$5,ArrayPrototype=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},values$4=function(e){var t=e.values;return e===ArrayPrototype||isPrototypeOf(ArrayPrototype,e)&&t===ArrayPrototype.values||hasOwn4(DOMIterables,classof(e))?method:t},parent$1=values$4,values$3=parent$1,parent=values$3,values$2=parent,values$1=values$2,values7=values$1,_valuesInstanceProperty=getDefaultExportFromCjs(values7),$$5=_export,getBuiltIn=getBuiltIn$b,apply=functionApply,bind4=functionBind,aConstructor=aConstructor$5,anObject=anObject$p,isObject$1=isObject$x,create7=objectCreate,fails$4=fails$19,nativeConstruct=getBuiltIn("Reflect","construct"),ObjectPrototype=Object.prototype,push$1=[].push,NEW_TARGET_BUG=fails$4((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$4((function(){nativeConstruct((function(){}))})),FORCED$2=NEW_TARGET_BUG||ARGS_BUG;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 _arrayWithoutHoles(e){if(_Array$isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray(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(e,t):void 0}}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 _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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 _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 _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 _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(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 _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}$$5({target:"Reflect",stat:!0,forced:FORCED$2,sham:FORCED$2},{construct:function(e,t){aConstructor(e),anObject(t);var r=arguments.length<3?e:aConstructor(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(push$1,n,t),new(apply(bind4,e,n))}var o=r.prototype,i=create7(isObject$1(o)?o:ObjectPrototype),a=apply(e,i,t);return isObject$1(a)?a:i}});var $$4=_export,toObject$1=toObject$k,nativeKeys=objectKeys$4,fails$3=fails$19,FAILS_ON_PRIMITIVES=fails$3((function(){nativeKeys(1)}));$$4({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{keys:function(e){return nativeKeys(toObject$1(e))}});var $$3=_export,uncurryThis$1=functionUncurryThis,aCallable=aCallable$m,toObject=toObject$k,lengthOfArrayLike$1=lengthOfArrayLike$q,deletePropertyOrThrow=deletePropertyOrThrow$4,toString$1=toString$l,fails$2=fails$19,internalSort=arraySort,arrayMethodIsStrict=arrayMethodIsStrict$b,FF2=engineFfVersion$1,IE_OR_EDGE=engineIsIeOrEdge$1,V8=engineV8Version,WEBKIT=engineWebkitVersion$1,test=[],nativeSort=uncurryThis$1(test.sort),push2=uncurryThis$1(test.push),FAILS_ON_UNDEFINED=fails$2((function(){test.sort(void 0)})),FAILS_ON_NULL=fails$2((function(){test.sort(null)})),STRICT_METHOD=arrayMethodIsStrict("sort"),STABLE_SORT=!fails$2((function(){if(V8)return V8<70;if(!(FF2&&FF2>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$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD||!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$1(t)>toString$1(r)?1:-1}};$$3({target:"Array",proto:!0,forced:FORCED$1},{sort:function(e){void 0!==e&&aCallable(e);var t=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);var r,n,o=[],i=lengthOfArrayLike$1(t);for(n=0;n<i;n++)n in t&&push2(o,t[n]);for(internalSort(o,getSortCompare(e)),r=lengthOfArrayLike$1(o),n=0;n<r;)t[n]=o[n++];for(;n<i;)deletePropertyOrThrow(t,n++);return t}});var fails$1=fails$19,wellKnownSymbol$1=wellKnownSymbol$s,V8_VERSION=engineV8Version,SPECIES$1=wellKnownSymbol$1("species"),arrayMethodHasSpeciesSupport$2=function(e){return V8_VERSION>=51||!fails$1((function(){var t=[];return(t.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$2=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$2,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("map");$$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var $$1=_export,isArray4=isArray$3,isConstructor7=isConstructor$3,isObject2=isObject$x,toAbsoluteIndex=toAbsoluteIndex$b,lengthOfArrayLike=lengthOfArrayLike$q,toIndexedObject=toIndexedObject$i,createProperty=createProperty$2,wellKnownSymbol=wellKnownSymbol$s,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$2,nativeSlice=arraySlice$e,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),$Array=Array,max=Math.max;$$1({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{slice:function(e,t){var r,n,o,i=toIndexedObject(this),a=lengthOfArrayLike(i),s=toAbsoluteIndex(e,a),l=toAbsoluteIndex(void 0===t?a:t,a);if(isArray4(i)&&(r=i.constructor,(isConstructor7(r)&&(r===$Array||isArray4(r.prototype))||isObject2(r)&&null===(r=r[SPECIES]))&&(r=void 0),r===$Array||void 0===r))return nativeSlice(i,s,l);for(n=new(void 0===r?$Array:r)(max(l-s,0)),o=0;s<l;s++,o++)s in i&&createProperty(n,o,i[s]);return n.length=o,n}});var toIntegerOrInfinity$1=toIntegerOrInfinity$h,toString10=toString$l,requireObjectCoercible=requireObjectCoercible$c,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString10(requireObjectCoercible(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},$=_export,uncurryThis=functionUncurryThis,toIntegerOrInfinity=toIntegerOrInfinity$h,thisNumberValue=thisNumberValue$2,$repeat=stringRepeat,fails=fails$19,$RangeError=RangeError,$String=String,floor=Math.floor,repeat4=uncurryThis($repeat),stringSlice=uncurryThis("".slice),nativeToFixed=uncurryThis(1..toFixed),pow=function(e,t,r){return 0===t?r:t%2==1?pow(e,t-1,r*e):pow(e*e,t/2,r)},log=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t},multiply=function(e,t,r){for(var n=-1,o=r;++n<6;)o+=t*e[n],e[n]=o%1e7,o=floor(o/1e7)},divide=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=floor(n/t),n=n%t*1e7},dataToString=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=$String(e[t]);r=""===r?n:r+repeat4("0",7-n.length)+n}return r},FORCED=fails((function(){return"0.000"!==nativeToFixed(8e-5,3)||"1"!==nativeToFixed(.9,0)||"1.25"!==nativeToFixed(1.255,2)||"1000000000000000128"!==nativeToFixed(0xde0b6b3a7640080,0)}))||!fails((function(){nativeToFixed({})}));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 _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}}$({target:"Number",proto:!0,forced:FORCED},{toFixed:function(e){var t,r,n,o,i=thisNumberValue(this),a=toIntegerOrInfinity(e),s=[0,0,0,0,0,0],l="",c="0";if(a<0||a>20)throw $RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return $String(i);if(i<0&&(l="-",i=-i),i>1e-21)if(r=(t=log(i*pow(2,69,1))-69)<0?i*pow(2,-t,1):i/pow(2,t,1),r*=4503599627370496,(t=52-t)>0){for(multiply(s,0,r),n=a;n>=7;)multiply(s,1e7,0),n-=7;for(multiply(s,pow(10,n,1),0),n=t-1;n>=23;)divide(s,1<<23),n-=23;divide(s,1<<n),multiply(s,1,1),divide(s,2),c=dataToString(s)}else multiply(s,0,r),multiply(s,1<<-t,0),c=dataToString(s)+repeat4("0",a);return c=a>0?l+((o=c.length)<=a?"0."+repeat4("0",a-o)+c:stringSlice(c,0,o-a)+"."+stringSlice(c,o-a)):l+c}});var ABR_EVENTS={ABR_CHANGE:"ABR_CHANGE_A",ABR_UPDATE_SPEC:"ABR_UPDATE_SPEC",START_ABR:"START_ABR",UPDATE_AUTO_DESC:"UPDATE_AUTO_DESC",ABR_START_PROGRESS:"ABR_START_PROGRESS",MAX_BUFFER_CHANGE:"MAX_BUFFER_CHANGE"},INIT_BIRTATE=0,MIN_WAITIONG=200,SEEKING_STATE={SEEK_NO:0,SEEK_FORWARD:1,SEEK_BACKWORD:-1},STALL_STATE={STALL_NO:0,STALL:1},AVG_ARGS={PLAYBACK_BITRATE:"avg_play_bitrate",DOWNLOAD_BITRATE:"avg_download_bitrate",DOWNLOAD_NETWORK_SPEED:"avg_download_speed",PREDICT_NETWORK_SPEED:"avg_predict_speed",BUFFER_LENGTH:"avg_buffer_length",QOE:"avg_qoe"},ABR=function(e){_inherits(r,BaseAbr);var t=_createSuper(r);function r(e,n,o,i,a){var s,l,c,u,$,d,p,y,f,h,m,b,g,S,I=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{logger:function(){},openLog:!1};_classCallCheck$5(this,r),(S=t.call(this,n,o,i,a,I)).player=e,S.timerId=0,S.isOpenAutoDefi=!!S.autoBitrateOpts.isOpenAutoDefi,S.onPlayrateChange=_bindInstanceProperty(s=S._onPlayrateChange).call(s,_assertThisInitialized(S)),S.onPlay=_bindInstanceProperty(l=S._onPlay).call(l,_assertThisInitialized(S)),S._stop=_bindInstanceProperty(c=S.stop).call(c,_assertThisInitialized(S)),S._bufferRange=new _Map,S._sortedBufferRange=[],S._lastCheckResolutionStamp=0,S._currentDefinition=null,S._isSeeking=!1,S._waitingStartTime=0,S._stallCount=0,S._seekState=SEEKING_STATE.SEEK_NO,S._stallState=STALL_STATE.STALL_NO,S._videoCurrentTime=0,S.listeners=[{evt:"playbackrateChange",handler:S.onPlayrateChange},{evt:"ended",handler:S._stop},{evt:"error",handler:S._stop},{evt:"timeupdate",handler:_bindInstanceProperty(u=S._onTimeUpdate).call(u,_assertThisInitialized(S))},{evt:"addVideoBufferEnd",handler:_bindInstanceProperty($=S._bufferRangeUpdate).call($,_assertThisInitialized(S))},{evt:"canplay",handler:_bindInstanceProperty(d=S._updateAutoDesc).call(d,_assertThisInitialized(S))},{evt:"play",handler:_bindInstanceProperty(p=S._onplayStart).call(p,_assertThisInitialized(S))},{evt:ABR_EVENTS.MAX_BUFFER_CHANGE,handler:_bindInstanceProperty(y=S._onMaxBufferChange).call(y,_assertThisInitialized(S))},{evt:"seeking",handler:_bindInstanceProperty(f=S._onSeeking).call(f,_assertThisInitialized(S))},{evt:"seeked",handler:_bindInstanceProperty(h=S._onSeekEnd).call(h,_assertThisInitialized(S))},{evt:"waiting",handler:_bindInstanceProperty(m=S._onWaiting).call(m,_assertThisInitialized(S))},{evt:"playing",handler:_bindInstanceProperty(b=S._onPlaying).call(b,_assertThisInitialized(S))}],S._hasStart=!1,_forEachInstanceProperty(g=S.listeners).call(g,(function(e){var t=e.evt,r=e.handler;S.player.on(t,r)})),S._isPaused=!1,S._hasAddFrament=!1,S._eventInfo={local_time_ms:0,internet_speed:0,buffer_length:0,last_bitrate:0,now_bitrate:0,play_speed:1},S._bitrateSet=[],S._generalInfo={},S._currentInAbr=!1,S._hasCalcTimelineLog=!1,S._abr_play_info={start_play_time_ms:0,is_hint:0,playback_info:{internet_speed_record:[],play_bitrate_record:[],buffer_length_record:[],play_speed_record:[],qoe_record:[],qoe_a_record:[],qoe_b_record:[],qoe_c_record:[]}},S._abrMethod=S.autoBitrateOpts.method||0,S.logger("abr: constructor"),S._loopInterval=S.initInterval,S._tickCount=0,S._fps=30,FpsDetection.install(),S.startTime=performance.now(),S.logger("time abr",(new Date).getTime()),S._maxCacheTimeVideo=S.config.maxBufferLength||S.config.preloadTime||50,S._maxCacheTimeAudio=S._maxCacheTimeVideo,S._prevDefinitionItem=null,S._currentItem=null,S._switchCount=0,S._switchBitrate=0,S._avgStatItems={};for(var T=_Object$keys(AVG_ARGS),v=0;v<T.length;v++){var _=T[v],P=AVG_ARGS[_];S._avgStatItems[P]=new AvgStat}return S._qoeArgs=[0,0,0,0],S._abrUsed=-1,S._abrAlwaysOn=1,S._prelaodInfo=null,S._hasLogStartInfo=!1,S._hasExecuteAbrAlgo=!1,S._lastExecuteTimeInMs=0,S}return _createClass$5(r,[{key:"init",value:function(e){return this._mediaList=e,this.isOpenAutoDefi?this.onLoadWasm():this._wasmPromise.resolve(),this._wasmPromise}},{key:"execute",value:function(){return this.listenSize(),this.initFps(),this.onWinElemSizeChange(),this.onPlay()}},{key:"_onSeeking",value:function(){this._isSeeking=!0,this.player.currentTime<this._videoCurrentTime?this._seekState=SEEKING_STATE.SEEK_BACKWORD:this._seekState=SEEKING_STATE.SEEK_FORWARD,this.logger("seekState",this._seekState)}},{key:"_onSeekEnd",value:function(){this._isSeeking=!1}},{key:"_onWaiting",value:function(){var e=this;this._isSeeking||this._waitingStartTime>0||(this._waitingStartTime=(new Date).getTime(),this._stallId=_setTimeout((function(){clearTimeout(e._stallId),e._stallCount++,e._stallState=STALL_STATE.STALL}),MIN_WAITIONG))}},{key:"_onPlaying",value:function(){this._waitingStartTime=0,this._stallState=STALL_STATE.STALL_NO,clearTimeout(this._stallId)}},{key:"initFps",value:function(){this.fpsDetection=new FpsDetection,this.fpsDetection.start(),this._fps=this.fpsDetection.fps,this._hasDeviceInfoChanged=!0}},{key:"listenSize",value:function(){var e;this.mediaElem=this.player.video,this._onWinSizeChange=debounce(_bindInstanceProperty(e=this.onWinElemSizeChange).call(e,this),1e3,!1),window.addEventListener("resize",this._onWinSizeChange)}},{key:"onWinElemSizeChange",value:function(){if(this.mediaElem){var e=this.mediaElem.getBoundingClientRect();this._videoWidth=Math.floor(e.width),this._videoHeight=Math.floor(e.height),this._hasDeviceInfoChanged=!0}}},{key:"_onMaxBufferChange",value:function(e){var t=e.videoCacheTime,r=e.audioCacheTime;this._maxCacheTimeAudio=r,this._maxCacheTimeVideo=t}},{key:"_onTimeUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._sortedBufferRange&&0!==this._sortedBufferRange.length&&this._currentInAbr){this._videoCurrentTime=this.player.currentTime;var r=_Date$now();if(!(r-this._lastCheckResolutionStamp<1e3&&0!==this._lastCheckResolutionStamp)||t){this._lastCheckResolutionStamp=r;for(var n=this.player.currentTime,o=0,i=this._sortedBufferRange.length-1,a=null;o<=i;){var s=Math.floor(o+(i-o)/2),l=this._sortedBufferRange[s];if(n<l.start)i=s-1;else{if(!(n>=l.end)){a=l;break}o=s+1}}if(a){var c=this._bitrateToDefitionConfig.get(a.bandwidth),u=c&&c.definition;if(this._currentDefinition===u&&!t||!u)return void(u||this.logger("error defintion, mpd配置与接口配置不一致"));this._currentDefinition=u,this._prevDefinitionItem=this._currentItem,this._currentFps=c.fps,this._currentItem=c,this._emitAutoDescChange(u,!1,this._currentFps,c)}}}}},{key:"_emitAutoDescChange",value:function(e,t,r,n){console.log("[ABR],emitAutoDescChange, definition, ",e,",item,",n,",pre_item,",this._prevDefinitionItem),this.player.emit(ABR_EVENTS.UPDATE_AUTO_DESC,{definition:e,reset:t,fps:r,item:n,pre_item:this._prevDefinitionItem})}},{key:"_onplayStart",value:function(){this._hasStart=!0,this.logger("onplaystart")}},{key:"_updateAutoDesc",value:function(){var e=this;this._currentInAbr&&this._currentDefinition&&(this._updateId=_setTimeout((function(){clearTimeout(e._updateId),e._emitAutoDescChange(e._currentDefinition,!1,e._currentFps,e._currentItem)}),0))}},{key:"_bufferRangeUpdate",value:function(e){var t;if(void 0!==e.start){null===this._currentItem&&this._onTimeUpdate(null,!0);var r=e.start;this._hasAddFrament=!0,this._bufferRange.set(r,e);var n=_toConsumableArray(_valuesInstanceProperty(t=this._bufferRange).call(t));this._sortedBufferRange=_sortInstanceProperty(n).call(n,(function(e,t){return e.start-t.start})),this.avgStat(AVG_ARGS.DOWNLOAD_BITRATE,e.bandwidth)}}},{key:"_onPlayrateChange",value:function(){this.module&&this.updateBufferInfo()}},{key:"_onPlay",value:function(){var e=this;if(!this.isOpenAutoDefi)return this.logger("onPlay"),INIT_BIRTATE;var t=INIT_BIRTATE;try{this.logger("abr: loadeddata"),this.updateSwitchInfo(),this.parseMPD(),this.updateDeviceInfo();var n=r.getIsPlayAutoDefi(this.autoBitrateOpts);if(this.isOpenAutoDefi&&n){this._abrUsed=1;var o=this._getDefautSpeed(this.player);t=this._loopAbr(o),this.start(),this.logger("time abr start prgress",(new Date).getTime()),this.logger("time abr costTime",performance.now()-this.startTime),this.logger("abr onplay"),this.startTimer=_setTimeout((function(){e._loopInterval=e.interval,clearTimeout(e.startTimer),e.logger("interval change")}),5e3)}}catch(e){this.logger("abr: loadeddata error",e),this.logger("time abr costTime err",performance.now()-this.startTime)}return t}},{key:"start",value:function(){if(this.logger("abr: start"),this._isPaused=!1,!this._hasCalcTimelineLog){var e=1===Math.floor(100*Math.random());this._abr_play_info.is_hint=e?1:0}this._hasCalcTimelineLog=!0,this._loop()}},{key:"_loop",value:function(){var e=this;this._isPaused||(clearTimeout(this.timerId),this.timerId=_setTimeout((function(){if(!e.player.paused||!e.player.config.autoplay&&!e._hasStart){var t=e._hasAddFrament?void 0:e._getDefautSpeed(e.player);e._loopAbr(t)}e._loop()}),this._loopInterval))}},{key:"updateDeviceInfo",value:function(){try{if(this.fpsDetection){var e=this.fpsDetection.fps;e!==this._fps&&(this._fps=e,this._hasDeviceInfoChanged=!0)}this._updateDeviceInfo(this._fps)}catch(e){}}},{key:"updateBufferInfo",value:function(e){var t=this.player.playbackRate,r=this.bufferLength,n=e||Math.floor(this.player.downloadSpeed);return this._tickCount<5&&0===n&&(n=this._getDefautSpeed(this.player),this.logger("initSpeed fix")),this.logger("maxCacheTimeAudio:",this._maxCacheTimeAudio,"maxCacheVideoTime",this._maxCacheTimeVideo,"seekState",this._seekState,"stallState",this._stallState),this.module._updateBufferInfo(t,this._maxCacheTimeAudio,this._maxCacheTimeVideo,r,r,n,this._seekState,this.player.currentTime,this._stallState),this._seekState=SEEKING_STATE.SEEK_NO,this._eventInfo={internet_speed:n,buffer_length:r,last_bitrate:this.bitrate,play_speed:t},this.logger("playRate:",t,"buff:",r,"downloadSpeed:",n),{buffer:r,downloadSpeed:n}}},{key:"updateSwitchInfo",value:function(){var e=(new Date).getTime();this._openTimeMs=e,this._abr_play_info.start_play_time_ms=e;var t=this.player.config.preloadTime||50,r=convert32ToC64(e),n=this.autoBitrateOpts.noStallCheckTime||5,o=this.openLog;this.logger("openTime:",e,"this.logger",o),this.module._updateSwitchInfo(r.low,r.high,n,o,this.stall_penalty,this.switch_penalty);var i=this._mediaList.video,a=_mapInstanceProperty(i).call(i,(function(e){var t=e.bandwidth,r=e.bitrate;return t||r}));this._bitrateSet=_mapInstanceProperty(a).call(a,(function(e,t){return{bitrate:e,codecs:i[t].codecs||i[t].codec_type}})),this._generalInfo={max_cache_time:t,bitrate_set:this._bitrateSet,segment_duration:this.segment_duration,preload_info:{},startup_info:{}}}},{key:"updatePreloadCacheInfo",value:function(e){try{this._prelaodInfo=e,this.logger("update preloadInfo",e),e&&e.item_num!==e.items.length&&(this.logger("preloadInfo invalid"),this._prelaodInfo=null)}catch(e){this.logger("updatePreloadCacheInfo",e),this._prelaodInfo=null}}},{key:"updatePreloadLogInfo",value:function(e){this._generalInfo.preload_info=e||{}}},{key:"_updatePreloadInfo",value:function(){try{var e=this.player.getPreloadInfos();if(e){var t=e.preloadInfo,r=e.abr;this.updatePreloadLogInfo(t),r&&this.updatePreloadCacheInfo(t)}if(this.logger("_updatePreloadInfo preloadinfos",e),null!=this._prelaodInfo){var n=_JSON$stringify(this._prelaodInfo);this.module.ccall("updatePreloadInfo","null",["string"],[n])}else this.logger("_updatePreloadInfo preloadinfo null, no preload")}catch(e){this.logger("_updatePreloadInfo err",e)}}},{key:"_loopAbr",value:function(e){var t;this._tickCount++;var r=[];try{this.updateDeviceInfo();var n=this.updateBufferInfo(e),o=n.downloadSpeed,i=n.buffer;t=this.module._getPredictedBitrate(this.bitrate,this._abrMethod);for(var a=0;a<7;a++)r.push(this.module.HEAP32[t/Int32Array.BYTES_PER_ELEMENT+a]);var s=r[0],l=1===r[1];this._eventInfo.now_bitrate=s,this._eventInfo.local_time_ms=(new Date).getTime();var c=0;if(s!==this.bitrate&&0!==s){var u=this.bitrate;c=Math.abs(u-s);for(var $=[],d=this.player.video.buffered,p=0;p<d.length;p++)$.push({start:d.start(p),end:d.end(p)});var y=this._videoWidth||Number(this.config.width),f=this._videoHeight||Number(this.config.height),h=(new Date).getTime(),m={speed:"".concat(o," KB/s"),buffer_length:"".concat(i," s"),video_pos:this.player.currentTime,all_buffers:$,seek_state:this._seekState,stall_state:this._stallState,screen_width:y,screen_height:f,dpr:window&&window.devicePixelRatio,playbackRate:this.player.playbackRate,bitrateSet:this._bitrateSet,abrMethod:this._abrMethod,delta:this._hasExecuteAbrAlgo?h-this._lastExecuteTimeInMs:0};this._lastExecuteTimeInMs=h,this._hasExecuteAbrAlgo=!0,this.player.emit(ABR_EVENTS.ABR_CHANGE,this.bitrate,s,l,_JSON$stringify(m)),this.logger("abr loop predicte:",s,"willStall:",l,"switchBitrate",c,"cur",u),this.bitrate=s}this._hasLogStartInfo||(this._hasLogStartInfo=!0,this._generalInfo.startup_info={predict_bitrate:s,download_speed:o,screen_width:this._videoWidth||Number(this.config.width),screen_height:this._videoHeight||Number(this.config.height),device_pixel_ratio:window&&window.devicePixelRatio,screen_fps:this._fps,startup_method:this._abrMethod}),this.player.emit("ABR_LOOP"),this.onAbrLoop(o,r[2],c,_sliceInstanceProperty(r).call(r,3))}catch(e){this.logger("abr error",e),console.log("error",e)}finally{this.module._free(t)}return this.bitrate}},{key:"stop",value:function(){!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&(this._abrAlwaysOn=-1),clearTimeout(this.timerId),this._isPaused=!0,this.logger("abr: stop")}},{key:"destroy",value:function(){var e,t=this;this._stop(),_forEachInstanceProperty(e=this.listeners).call(e,(function(e){var r=e.evt,n=e.handler;t.player.off(r,n)})),this.player=null,this._heightToDefitionConfig=null,this._bitrateToDefitionConfig=null,this._bufferRange=null,this._sortedBufferRange=null,this.module=null,clearTimeout(this._stallId),clearTimeout(this._updateId),clearTimeout(this.startTimer),window.removeEventListener("resize",this._onWinSizeChange),this.fpsDetection&&this.fpsDetection.stop(),this.player=null}},{key:"eventInfo",get:function(){return this._eventInfo}},{key:"generalInfo",get:function(){return this._generalInfo}},{key:"bufferLength",get:function(){var e=this.player.getBufferedRange(),t=this.player.video.currentTime,r=e[1]-Math.max(e[0],t);return r=Math.max(0,r).toFixed(2),_parseFloat$1(r)}},{key:"downloadSpeed",get:function(){return Math.floor(this.player.downloadSpeed)}},{key:"nowBitrate",get:function(){return this.bitrate}},{key:"openTimeMs",get:function(){return this._openTimeMs}},{key:"isCurrentInAbr",get:function(){return this._currentInAbr},set:function(e){this._currentInAbr=e}},{key:"onAbrLoop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(this._qoeArgs=n,this._currentItem&&this.avgStat(AVG_ARGS.PLAYBACK_BITRATE,this._currentItem.bitrate),this.avgStat(AVG_ARGS.DOWNLOAD_NETWORK_SPEED,1e3*e*8),this.avgStat(AVG_ARGS.PREDICT_NETWORK_SPEED,t),this.avgStat(AVG_ARGS.BUFFER_LENGTH,this.bufferLength),this.avgStat(AVG_ARGS.QOE,this.getQoeRelValue(0)),r>0&&(this._switchCount++,this._switchBitrate+=r),this._abr_play_info.is_hint){var o=this,i=((new Date).getTime()-this.openTimeMs)/1e3;i=_parseFloat$1(i.toFixed(2)),this._abr_play_info.playback_info.internet_speed_record.push([i,o.downloadSpeed]),this._abr_play_info.playback_info.play_bitrate_record.push([i,o.nowBitrate]),this._abr_play_info.playback_info.buffer_length_record.push([i,o.bufferLength]),this._abr_play_info.playback_info.play_speed_record.push([i,this.player.playbackRate]),this._abr_play_info.playback_info.qoe_record.push([i,this.getQoeRelValue(0)]),this._abr_play_info.playback_info.qoe_a_record.push([i,this.getQoeRelValue(1)]),this._abr_play_info.playback_info.qoe_b_record.push([i,this.getQoeRelValue(2)]),this._abr_play_info.playback_info.qoe_c_record.push([i,this.getQoeRelValue(3)])}}},{key:"getQoeRelValue",value:function(e){return this._qoeArgs[e]/100}},{key:"avgStat",value:function(e,t){var r=this._avgStatItems[e];r&&r.add(t)}},{key:"getAbrPlayInfo",value:function(){return this._abr_play_info}},{key:"updateAbrMethod",value:function(e){this._abrMethod=e}},{key:"getAbrMethod",value:function(){return this._abrMethod}},{key:"getAbrVVStats",value:function(){for(var e={},t=_Object$keys(AVG_ARGS),r=0;r<t.length;r++){var n=t[r],o=AVG_ARGS[n],i=this._avgStatItems[o];e[o]=i.avg()}return e.switch_counts=this._switchCount,e.avg_switch_bitrate=0===this._switchCount?0:this._switchBitrate/this._switchCount,e.abr_qoe=this.getQoeRelValue(0),e.abr_qoe_a=this.getQoeRelValue(1),e.abr_qoe_b=this.getQoeRelValue(2),e.abr_qoe_c=this.getQoeRelValue(3),e.abr_method=this._abrMethod,e.abr_used=this._abrUsed,e.abr_always_on=this._abrAlwaysOn,this.logger("abrVVStats",e),e}}],[{key:"getIsPlayAutoDefi",value:function(e){return!!e.isPlayAutoDefi}}]),r}(),AvgStat=function(){function e(){_classCallCheck$5(this,e),this.total=0,this.count=0}return _createClass$5(e,[{key:"add",value:function(e){this.total+=e,this.count++}},{key:"avg",value:function(){if(0===this.count)return 0;var e=this.total/this.count;return Math.floor(e)}}]),e}(),START_TYPES={FIXED:"FIXED",AUTO:"AUTO"},AbrService=function(){function e(t,r){var n=this;_classCallCheck$8(this,e),_defineProperty$5(this,"_onAbrChange",(function(e,t,r,o){var i=n._pluginInst.player,a=n.bitrateMap[e],s=n.bitrateMap[t],l=a.definition,c=s&&s.definition?s.definition:l;console.log("[ABR] _onAbrChange ",l,c),l!==c&&(n._abrSwitchHandler(s),i.emit("ABR_CHANGE",{prev:l,cur:c,prevName:a.definitionName,curName:s.definitionName,abrInfo:o}))})),_defineProperty$5(this,"_onAutoDescChange",(function(e){var t=e.definition,r=e.reset,o=e.fps,i=e.item;n.updateAutoDefiDesc(t,r,o,i)})),this._pluginInst=t;var o=this._pluginInst.config.autoBitrateOpts||{};this.isPlayAutoDefi=ABR.getIsPlayAutoDefi(o),this.isOpenAutoDefi=!!o.isOpenAutoDefi,this.isCurrentAutoDefi=this.isOpenAutoDefi&&this.isPlayAutoDefi,this.bitrateMap={},this.defiIdMap={},this._abrSwitchHandler=r}var t;return _createClass$8(e,[{key:"_destroyAbr",value:function(){var e=this._pluginInst.player;this.abrInstance&&(e&&e.off(ABR_EVENTS.UPDATE_AUTO_DESC,this._onAutoDescChange),this.abrInstance.destroy(),this.abrInstance=null)}},{key:"init",value:(t=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t){var r,n,o,i;return _regeneratorRuntime$2().wrap((function(e){for(var a;;)switch(e.prev=e.next){case 0:if(this.isOpenAutoDefi){e.next=2;break}return e.abrupt("return",{type:START_TYPES.FIXED});case 2:return r=this._pluginInst,n=r.player,o=r.playerConfig,i=r.config,n.on(ABR_EVENTS.UPDATE_AUTO_DESC,this._onAutoDescChange),this.bitrateMap={},this.defiIdMap={},this.abrInstance=new ABR(n,i,0,{dynamic_video_list:_concatInstanceProperty(a=o.definition.list).call(a)},5e3,{logger:log$3,openLog:openLog}),e.next=9,this.abrInstance.init(t);case 9:n.on(ABR_EVENTS.ABR_CHANGE,this._onAbrChange),this.abrInstance.isCurrentInAbr=this.isCurrentAutoDefi;case 11:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"execute",value:function(){var e=this.abrInstance.execute();return{bitrate:e,type:-1===e?START_TYPES.FIXED:START_TYPES.AUTO}}},{key:"updateBitrate",value:function(e){this.abrInstance&&this.abrInstance.updateBitrate(e)}},{key:"enable",value:function(){this.abrInstance.start(),this.isCurrentAutoDefi=!0,this.abrInstance.isCurrentInAbr=!0,this.abrInstance._onTimeUpdate(null,!0)}},{key:"disable",value:function(){this.abrInstance&&(this.updateAutoDefiDesc("",!0),this.isCurrentAutoDefi=!1,this.abrInstance.isCurrentInAbr=!1,this.abrInstance.stop(!0))}},{key:"isCurrentInAbr",value:function(){return!!this.abrInstance&&this.abrInstance.isCurrentInAbr}},{key:"updateAutoDefiDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this._pluginInst,i=o.player,a=(o.config.autoBitrateOpts||{}).autoDefiText||"auto";i.emit("ABR_AUTO_DESC_CHANGE",a,t?void 0:e,r,n)}},{key:"updateAbrCacheData",value:function(){var e=this,t=this._pluginInst,r=t.player,n=t.config,o=t.playerConfig,i=n.autoBitrateOpts||{},a=o.definition.list,s=!1;if(_forEachInstanceProperty(a).call(a,(function(t){e.bitrateMap[t.bitrate]={url:t.url,definition:t.definition,definitionName:t.text},e.defiIdMap[t.definition]={bitrate:t.bitrate,definition:t.definition},"auto"!==t.definition&&"自动"!==t.definition||(s=!0)})),this.isOpenAutoDefi,this.isOpenAutoDefi&&!s){var l=i.autoDefiText||"auto",c={definition:"自动",bitrate:r.curDefinition.bitrate,text:l,url:"__auto__",selected:this.isPlayAutoDefi,name:"自动",vwidth:r.curDefinition.vwidth,vheight:r.curDefinition.vheight};o.definition.list.push(c)}}},{key:"destroy",value:function(){this._pluginInst.player.off(ABR_EVENTS.ABR_CHANGE,this._onAbrChange),this._destroyAbr()}}]),e}(),DESTROYED="DESTROYED",REAL_TIME_SPEED_EVENT="real_time_speed",_playerPlayNext=null,_playerStartInit=null,_playerChangeDefinition=null,_playerSwitchUrl=null,CODEC_TYPE={H264:"h264",H265:"h265"},_realTimeSpeed=0,Mp4EncryptPlayer=function(e){_inherits$5(o,BasePlugin);var t,r,n=_createSuper$5(o);function o(e){var t,r;return _classCallCheck$8(this,o),_defineProperty$5(_assertThisInitialized$5(r=n.call(this,e)),"_replayHook",(function(e){"xgmse-video"===r.player.config.mediaType?r._onReplay():r.useVideoLoad||(r._defInited=!1,r.log("replayHook ",r.playerConfig.url),r.player.video.load(),r.playerStartInit(r.playerConfig.url))})),_defineProperty$5(_assertThisInitialized$5(r),"_retryHook",(function(){var e=_assertThisInitialized$5(r),t=e.player,n=e.playerConfig,o=e.config,i=t.currentTime;if(r.codecType!==CODEC_TYPE.H265||o.supportHevc){r._defInited=!1;var a=r.config,s=a.drm,l=a.kid,c=a.secretKey,u=a.keyValue;if(s||l||c||u)r.initAwManager(),r.playerStartInit(n.url);else{if(r.useVideoLoad=!0,"Array"===util$1.typeOf(n.url)){var $=n.url.length;t.video.src=n.url[$-1].src}else t.video.src=n.url;t.currentTime=i,t.play()}}else r.log("h265 retryHook ",n.vid),r._onDegrade("retry");return!1})),_defineProperty$5(_assertThisInitialized$5(r),"_playHook",(function(e){r._usePaused=!1})),_defineProperty$5(_assertThisInitialized$5(r),"_pauseHook",(function(e){r._usePaused=!0})),_defineProperty$5(_assertThisInitialized$5(r),"abrSwitchURL",function(){var e=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(t){var n,o,i,a,s,l;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=_assertThisInitialized$5(r),o=n.playerConfig,i=o.definition.list,a=0,s=0;case 4:if(!(s<i.length)){e.next=11;break}if(t.definition!==i[s].definition){e.next=8;break}return a=s,e.abrupt("break",11);case 8:s++,e.next=4;break;case 11:l=r.player.curDefinition,r.changeDefinition(i[a],l,!0);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),_defineProperty$5(_assertThisInitialized$5(r),"changeDefineCanPlay",(function(e,t,n,o){var i=_assertThisInitialized$5(r).player;i.ended?i.currentTime=0:(r.log("[oldChangeDefinition],this._changeDefState,",r._changeDefState),i.currentTime=r._changeDefState?r._changeDefState.currentTime:e,(r._changeDefState?r._changeDefState.paused:t)?i.pause():i.play(),r._changeDefState=null,i.emit(AFTER_DEFINITION_CHANGE,{from:n,to:o}))})),_defineProperty$5(_assertThisInitialized$5(r),"changeDefinition",(function(e,t,n){var o=_assertThisInitialized$5(r),i=o.player,a=o.playerConfig,s=o.mp4;if(t||(t=i.curDefinition),r.useVideoLoad)return"__auto__"===e.url&&(e.url=i.config.definition.list[0].url),void _playerChangeDefinition.call(r.player,e,t);if(r._switchBitRateWay&&!n)return r.log("changeDefinition old"),void r.oldChangeDefinition(e,t);var l="自动"===e.definition||"auto"===e.definition;if(n)r.log("[switchBitrate:ABR], ready to switch bitRate, ",e.bitrate);else{var c=!1;if(l)r._abrService&&r._abrService.enable(),c=!0;else if(r._abrService&&r._abrService.disable(),!e.bitrate||e.bitrate<=0)for(var u=0;u<a.definition.list.length;u++)e.definition===a.definition.list[u].definition&&(e.bitrate=a.definition.list[u].bitrate);i.emit(DEFINITION_CHANGE,{from:t,to:e}),_setTimeout((function(){r._abrService&&r._abrService.updateAutoDefiDesc(i.curDefinition.definition,!l)})),c&&(e=i.curDefinition),r.log("[switchBitrate:CBS],switch bitRate, ",e.bitrate)}i.curDefinition=e;var $=i.definitionList,d=_filterInstanceProperty($).call($,(function(e){return e.definition===i.curDefinition.definition}));d.length>0&&(e=d[0]),s&&(r.config.keyValue=e.keyValue,r.config.kid=e.kid,r.config.secretKey=e.secretKey,r.config.drm=e.drm,r.config.getLicenseUrl=e.getLicenseUrl,r._getLicense().then(_asyncToGenerator$2(_regeneratorRuntime$2().mark((function t(){var o,l,c,u,$,d;return _regeneratorRuntime$2().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a.url=e.url,a.backupURL=e.backupURL,o=0,l=!1,r._abrService&&r._abrService.isCurrentInAbr()?(c=i.getBufferedRange(i.buffered2),(o=c[1])<i.currentTime&&(o=i.currentTime,r.log("bufferRange is invaild,adjust",c,",timeStart,",o)),r.log("[switchBitrate:ABR],switch bufferedList, ",r.player.buffered2?r.player.buffered2.bufferedList:null,",curtime,",i.currentTime,",bufferRange,",c)):(o=i.currentTime,l=!0),(u=s.getFragmentIdx(o))<0&&(u=r._curLoadSegmentIdx),r.log("switchBitrate:point,",u,",startTime,",s.timeRange[u].startTime,",currentTime,",i.currentTime),l&&i.emit("definitionSwitchTime",s.timeRange[u].startTime+1),r.changeState("changeDefinition",{abr:n,fragIndex:u,startTime:s.timeRange[u].startTime,currentTime:i.currentTime}),!s){t.next=14;break}return t.next=13,s.cancelLoading();case 13:s._metaLoading&&(s._metaLoading=!1);case 14:return!(($=i.getBufferedRange(i.buffered))[1]>0&&$[1]-i.currentTime>5)||r._abrService&&r._abrService.isCurrentInAbr()||(r.mse.clearOpqueues(CONTENT_TYPES.VIDEO),r.mse.reuse(i.currentTime+5,$[1])),s.resetFragmentLoadState(u),r._curLoadSegmentIdx=u,t.next=20,r.mp4.changeBitRate(e);case 20:d={width:e.width||e.vwidth,height:e.height||e.vheight},i.emit("RESOLUTION_UPDATE",d);case 22:case"end":return t.stop()}}),t)})))).catch((function(t){console.error(t),t.errorType="GET_LICENSE_ERROR",r.emit("error",t),r.changeState("LICENSE_ERROR",{d:e.definition})})))})),_defineProperty$5(_assertThisInitialized$5(r),"_onVideoError",(function(e){r.log("video err,",e)})),_defineProperty$5(_assertThisInitialized$5(r),"_onPlaying",(function(){r._waitAdjustTimeCnt>0&&r._waitInBufferTimer&&(r._waitAdjustTimeCnt-=1,r.log("[waitInBuffer resume play], waitAdjustTimeCnt,",r._waitAdjustTimeCnt)),clearTimeout(r._waitInBufferTimer),r._waitInBufferTimer=null,r.log("[Index] onPlaying, timeNow,",util.nowTime());var e=_assertThisInitialized$5(r),t=e.mp4,n=e.player,o=r.config.resumePlayWaterLevel;if(t){if(!r.playFlag||n.currentTime<1)r.playFlag=!0;else if(!(t&&t.meta&&t.meta.duration-n.currentTime<=o)&&o>0&&r.playFlag){var i=n.getBufferedRange(n.buffered2);i[1]-n.currentTime<o?(n.paused||(n.pause(),r.log("[!!!!!buffer not rich, pause],time,",util.nowTime(),", currentTime, ",n.currentTime,", bufferEnd,",i[1])),clearTimeout(r.checkResumePlayTimer),r.checkResumePlayTimer=_setTimeout(r._onPlaying,o/2*1e3)):n.paused&&(r.log("[!!!!!buffer rich, play],time,",util.nowTime(),", currentTime, ",n.currentTime,", bufferEnd,",i[1]),clearTimeout(r.checkResumePlayTimer),r.checkResumePlayTimer=null,n.play())}}else r.checkResumePlayTimer>0&&(clearTimeout(r.checkResumePlayTimer),r.checkResumePlayTimer=null,n.paused&&n.play())})),_defineProperty$5(_assertThisInitialized$5(r),"_lowDecoder",(function(){var e="function"==typeof r.player.video.getStats?r.player.video.getStats():null;r.log("H265 lowdecode: ".concat(r.playerConfig.vid," "),e,", h265Degrade, ",r.config.h265Degrade),r.config.h265Degrade&&r._onDegrade()})),_defineProperty$5(_assertThisInitialized$5(r),"_onError",(function(e){console.log("H265 onError: ".concat(r.playerConfig.vid," "),e,", h265Degrade, ",r.config.h265Degrade),r._onDegrade(e)})),_defineProperty$5(_assertThisInitialized$5(r),"_onDegrade",(function(e){var t,n,o=_assertThisInitialized$5(r),i=o.player,a=o.playerConfig,s=o.config;i.video.removeEventListener("lowdecode",r._onDegrade),i.video.removeEventListener("error",r._onError),null===(t=r.mp4)||void 0===t||t.destroy();var l=i.currentTime;if(console.log("[h265 degrade], vid,",a.vid,",currtime,",l),r.emit("H265_DEGRADE",{reason:e?"error":"lowdecode",currentTime:l}),null!=s&&s.H264Config){var c=s.H264Config;s.drm=(null==c?void 0:c.drm)||null,s.getLicenseUrl=(null==c?void 0:c.getLicenseUrl)||null,s.kid=(null==c?void 0:c.kid)||null,s.keyValue=(null==c?void 0:c.keyValue)||null,s.secretKey=(null==c?void 0:c.secretKey)||null,s.isEncrypt=(null==c?void 0:c.isEncrypt)||null,s.useEME=(null==c?void 0:c.useEME)||null}var u={mp4encryptplayer:s,mediaType:"video",codecType:CODEC_TYPE.H264};(null==a||null===(n=a.H264DefinitionList)||void 0===n?void 0:n.length)>0?(i.config.definition.list=a.H264DefinitionList,i.config.url=a.H264DefinitionList[0].url,i.config.defaultBitrate=a.H264DefinitionList[0].bitrate,i.config.defaultDefinition=a.H264DefinitionList[0].definition,i.playNext(u),i.once("canplay",(function(){i.currentTime=l}))):(console.error("H265 error,degrade h264 but no h264 url"),r.emit("error",e))})),_defineProperty$5(_assertThisInitialized$5(r),"_onMp4MetaReady",(function(e){console.log(">>>>_onMp4MetaReady",util.nowTime()),r.firstFrameTime.metaload=r.mp4.firstFrameTime.metaload,r.firstFrameTime.bitrate=r.player.curDefinition.bitrate;var t=r.playerConfig.vid,n=r._checkMetaInfo(e),o=r.mp4.checkCodecH265();if(r.changeState("MP4_META_READY",{is265:o?1:0}),n)return r.removeAndRejectInitPromise(n),void r._errorHandler(n);try{if(r._initEME(r.mp4,e),r.codecType!==CODEC_TYPE.H265||r.config.supportHevc){if(!(r.player.video instanceof HTMLVideoElement))return void console.error("".concat(r.player.config.mediaType," is not match"));r._initMse(e)}else{var i,a,s;if(!o||r.player.video instanceof HTMLVideoElement)return void console.error(_concatInstanceProperty(i=_concatInstanceProperty(a=_concatInstanceProperty(s="[Index] ".concat(t," config_codec ")).call(s,r.codecType," and meta_codec ")).call(a,e.videoCodec," is not match or supportHevc is ")).call(i,r.config.supportHevc));r._initH265MseProxy()}r._initPromise.resolve()}catch(e){r.removeAndRejectInitPromise(e),console.error("[Index] ".concat(t," _initEME error"),e);var l=new Errors(r.player,{errorType:"runtime",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.other1,errorMessage:null==e?void 0:e.message,vid:t,mediaError:{code:ERROR_CODES.other1,message:null==e?void 0:e.message}});r._errorHandler(l)}if(r.mp4&&r.mp4.timeRange){var c,u=[];_everyInstanceProperty(c=r.mp4.timeRange).call(c,(function(e){return u.push({startTime:e.startTime,endTime:e.endTime}),!0})),r.emit("KEYFRAMETIME",u)}r._loadData()})),_defineProperty$5(_assertThisInitialized$5(r),"_onMp4Error",(function(e){var t=r.playerConfig.vid;console.error("[Index] _onMp4Error",t,e),r.changeState("MP4_ERROR",e),r._initPromise&&"pending"===r._initPromise.state&&r.removeAndRejectInitPromise(e),r._errorHandler(e)})),_defineProperty$5(_assertThisInitialized$5(r),"_onMp4Progress",(function(e){r.emit("progress_event",e)})),_defineProperty$5(_assertThisInitialized$5(r),"_onMp4DataCallBack",(function(){r.mse&&!r.mse.ready&&r.openMSE(),r._isMseInit&&r._onTimeUpdate()})),_defineProperty$5(_assertThisInitialized$5(r),"_updateDrmConfig",(function(e){var t=_assertThisInitialized$5(r),n=t.config,o=t.mp4;e.kid&&n.keyValue?n.drm={clearKeys:_defineProperty$5({},e.kid,n.keyValue)}:!e.kid&&n.keyValue&&(n.useEME=!1),o.useEME=n.useEME;var i=n.drm;n.useEME||(o.kidValue=n.keyValue||(i&&i.clearKeys?i.clearKeys[_Object$keys(i.clearKeys)[0]]:null)),r.eme&&i&&i.clearKeys&&n.useEME&&r.eme.updateDrm(i)})),_defineProperty$5(_assertThisInitialized$5(r),"_onVideoTimeUpdate",(function(){r.useVideoLoad||null!==r._requestTimer||!r._offineLine&&r._startProgress(),r.useVideoLoad&&r.checkIfCanPreload()})),_defineProperty$5(_assertThisInitialized$5(r),"_onBufferedReset",(function(e){r.mp4&&r.mp4.videoTrak&&r.mp4.resetFragmentLoadState(0)})),_defineProperty$5(_assertThisInitialized$5(r),"_onOnlineHandler",(function(){r._offineLine=!1;var e=_assertThisInitialized$5(r).config;r.log("online useVideoLoad:",r.useVideoLoad,r._hasStartProgressBack),r.useVideoLoad?r.player.src=e._mainURL:(r._hasStartProgressBack&&r._startProgress(),r._hasStartProgressBack=!1)})),_defineProperty$5(_assertThisInitialized$5(r),"_onOfflineHandler",(function(){r._offineLine=!0,r.log("offline, ",r._hasStartProgress),r._hasStartProgress&&(r._stopProgress(),r._hasStartProgressBack=!0)})),_defineProperty$5(_assertThisInitialized$5(r),"_loadDataSuccess",(function(e){if(!r.isDestroy&&(r.mse||r.mseProxy)){e.state&&r._firstSegState<0&&(r._firstSegState=1),r.log("[loadFragment] _loadDataSuccess ",_JSON$stringify(e.context.range),",dataLen,",e.buffer?e.buffer.byteLength:0,e.state),r.firstFrameTime.startload_stmux<0&&(r.firstFrameTime.startload_stmux=r.mp4.firstFrameTime.startMuxTime,r.firstFrameTime.firstmux=r.mp4.firstFrameTime.firstmux),r.firstFrameTime.loadst_loadeddata<0&&(r.firstFrameTime.loaddata=util.nowTime()-r.loadstart);try{e.initSeg&&(r._appendInitSeg(e.initSeg),(!e.buffer||e.buffer.byteLength<1)&&(r.log("no data, must load data"),r._onTimeUpdate()));var t=e.buffer,n=e.state,o=e.context,i=e.videoTrack,a=e.audioTrack;if(r.debugInfo.loadIndx=o?o.fragIndex:-1,r.mse&&n&&(!t||t.byteLength<=0)&&o.fragIndex===r.mp4.timeRange.length-1){var s=r.player.buffered;r.bufferEndTime=s.end(s.length-1),r._isEnded(),r.log("loaded ended !!!==>>>",_JSON$stringify(o.range),", fragIndex,",o.fragIndex,", bufferEndTime,",r.bufferEndTime,",meta_duration,",r.mp4.meta.duration)}if(r.mse&&n&&o.fragIndex===r.mp4.timeRange.length-1&&(!t||t.byteLength<=0)){var l=r.player.buffered;r.bufferEndTime=l.end(l.length-1),r._isEnded(),r.log("load ended !!!==>>>",r.playerConfig.vid,_JSON$stringify(o.range),", fragIndex,",o.fragIndex,", bufferEndTime,",r.bufferEndTime,",meta_duration,",r.mp4.meta.duration)}if(t&&r.mse){if(t&&t.byteLength>0){r._appendBuffer(CONTENT_TYPES.VIDEO,t,o,n);var c=r.getDataBitRate(o.fragIndex);r.player.emit("addVideoBufferEnd",{start:Math.floor(o.startPts),end:o.endPts,bandwidth:c.bitrate})}}else if(r.mseProxy&&(i&&i.samples.length>0||a&&a.samples.length>0)){var u=i.samples.length>0?i.samples[0].sampleOffset:-1,$=i.samples.length>0?i.samples[i.samples.length-1].sampleOffset:-1,d=a.samples.length>0?a.samples[0].sampleOffset:-1,p=a.samples.length>0?a.samples[a.samples.length-1].sampleOffset:-1;r.log("[livevideo] appendBuffer,index,",o.fragIndex,",range,",_JSON$stringify(e.context.range),",videoIdxRange,",u,"-",$,",audioIdxRange,",d,"-",p,", timeRange,",o.timeRange),r.mseProxy.appendBuffer(i,a)}}catch(e){r.changeState("APPEND_DATA_ERROR"),r.log("appendBuffer error",e);var y=new Errors(r.player,{errorType:"runtime",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.mse,vid:r.player.config.vid,errorMessage:e.message,mediaError:{code:ERROR_CODES.mse,message:e.message}});r._errorHandler(y)}}})),_defineProperty$5(_assertThisInitialized$5(r),"_onWaiting",(function(){var e=_assertThisInitialized$5(r),t=e.player,n=e.config,o=e.playerConfig;clearTimeout(r._waitInBufferTimer),r._waitInBufferTimer=null;var i=t.currentTime;console.log("[>>>>onWaiting],currentTime, ",i,util.nowTime());var a=t.bufferedPoint;a.end>0&&a.end-t.currentTime>=2&&(r._waitAdjustTimeCnt<n.waitJampBufferMaxCnt?r._waitInBufferTimer=_setTimeout((function(){r._waitAdjustTimeCnt++,t.currentTime=t.currentTime+.5,r.log("[waitInBufferTimeout], waitAdjustTimeCnt,",r._waitAdjustTimeCnt,",curtime,",i,util.nowTime())}),n.waitingInBufferTimeOut):r._errorHandler(new Errors(r.player,{errorType:"waitInBuffer",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.onWaitInBufferRange,errorMessage:"onWait_in_buffer",vid:o.vid})))})),_defineProperty$5(_assertThisInitialized$5(r),"_onEnded",(function(){r.log("[player.onEnded], stopProgress"),r.player&&r.off("waiting",r._onWaiting),r._stopProgress()})),_defineProperty$5(_assertThisInitialized$5(r),"_onReplay",(function(){var e=_assertThisInitialized$5(r),t=e.playerConfig,n=e.player;r._reset(),r._init(t.url).then((function(e){var t=e[0],o=e[1];n.video.src=o.url,r._startProgress(),r.mp4=t,r.mse=o,r.log("_replay play"),r.once("canplay",(function(){n.play(),r.on("waiting",r._onWaiting)}))}),(function(e){r.log("_errorHandler6",e),r._errorHandler(e)}))})),_defineProperty$5(_assertThisInitialized$5(r),"_onSeeking",_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){var t,n,o,i,a,s,l,c,u,$,d;return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.useVideoLoad){e.next=2;break}return e.abrupt("return");case 2:if(t=_assertThisInitialized$5(r),n=t.player,o=t.mp4,i=n.currentTime,r.changeState("seeking",{curTime:i}),r.log("[seekTime], curTime,",i,",buffer,",n.buffered2.bufferedList),o&&o.meta){e.next=8;break}return e.abrupt("return");case 8:if(r.endofstream=!1,o.bufferLoadedPos=-1,o._metaLoading=!1,a=n.bufferedPoint,s=!1,l=0,!(a.end>0)){e.next=23;break}if(s=!0,l=o.getFragmentIdx(a.end),r._curLoadSegmentIdx!==l){e.next=20;break}return r.log("[seeking in buffered range], seek fragIndex is current load segmentIdx",l),e.abrupt("return");case 20:o.seekTime=a.end,l<0&&(l=r._curLoadSegmentIdx),r.log("[seeking in buffered range], seekTime ",i,",bufferRange,",a.start,"-",a.end,", fragIndex,",l);case 23:return s||(o.seekTime=i,(l=o.getFragmentIdx(i))<0&&(l=r._curLoadSegmentIdx),r.log("[seekTime out buffer range], curTime,",i,", Idx,",l),c=_assertThisInitialized$5(r),(u=c.mse)&&u.isFull()&&($=n.buffered2.bufferedList,d=$[$.length-1],u.clearOpqueues(CONTENT_TYPES.VIDEO),r._checkRemoveSourceBuffer([d.start,d.end],n.currentTime,!0,!0))),e.next=26,o.cancelLoading();case 26:o.resetFragmentLoadState(l),r._curLoadSegmentIdx=l,r._onTimeUpdate(),r._isEnded();case 30:case"end":return e.stop()}}),e)})))),r._pendingPromises=[],r._allInitPromise=new ProxyPromise,r._isInit=!1,r._isEventInit=!1,r.playerId=r.player._pluginInfoId,r.preloader=null,r.gapJumpInst=null,r.log("playerId",r.playerId),r._tickInSeconds=r.config.tickInSeconds,r.awManager=null,r._useVideoLoad=!1,r.mse=null,r.mp4=null,r.eme=null,r._isMseInit=!1,r._awPromise=null,r._corePromise=null,r._initPromise=null,r._hasStartProgress=!1,r._hasStartProgressBack=!1,r._maxBufferLength=r.config.maxBufferLength,r._minBufferLength=r.config.minBufferLength,r._switchBitRateWay=r.config.switchBitRateWay,r._curLoadSegmentIdx=0,r._abrService=null,r._checkRemoveBufferLastTime=util.nowTime(),r.playFlag=!1,r.config.resumePlayWaterLevel=Math.min(r.config.minBufferLength,r.config.resumePlayWaterLevel),r.checkResumePlayTimer=null,r.loadstart=-1,r._loadStartEventTime=-1,r._waitAdjustTimeCnt=0,r._waitInBufferTimer=null,r._firstSegState=-1,r.codecType=r.playerConfig.codecType?r.playerConfig.codecType.toLowerCase():CODEC_TYPE.H264,r.playerConfig.vtype&&(r._vtype=r.playerConfig.vtype.toUpperCase()),r.firstFrameTime={newplayer:util.nowTime(),newplayer_initkernel:-1,initkernel_initmp4:-1,initmse_sbopen:-1,mseopen:-1,initmse_sbopendone:-1,metaload:-1,metaready_mseisopen:-1,metaready_initsegend:-1,startload_stmux:-1,firstmux:-1,apcnt:0,aplen:0,data_ap:-1,loadst_loadeddata:-1,loaddata:-1,new_loadeddata:-1,bitrate:-1},r.debugInfo={},r.states=[],r.removeVideo=null,r._lastCheckTime=util.nowTime(),r._changeDefState=null,r._defInited=!1,r.states=[],r.preLoadData=null,r.forPreloadTimeCache=null,r._usePaused=!1,r.endofstream=!1,r.bufferEndTime=-1,r.hitpreload=!1,window&&_indexOfInstanceProperty(t=window.location.href).call(t,"playerInstance=true")>-1&&(void 0===window.mp4PlayerInstanceList&&(window.mp4PlayerInstanceList=[]),window.mp4PlayerInstanceList.push(r.player)),r}return _createClass$8(o,[{key:"afterCreate",value:function(){var e=this,t=this.playerConfig,r=this.config,n=this.player;r.width=t.width||0,r.height=t.height||0,t.vid=t.vid||r.vid,MSE.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')&&(void 0===r.supportHevc&&null!=sniffer&&sniffer.isHevcSupported&&null!=sniffer&&sniffer.isHevcSupported()&&this.player.video instanceof HTMLVideoElement&&(r.supportHevc=!0),isEMESupported()||(r.useEME=!1),this.checkConfig(),r.onlyInit&&(t.autoplay=!1,t.videoInit=!1,this._hasStartProgress=!1,this._hasStartProgressBack=!1),t.useWaterLevel&&(!t.userGestureEventMiddleware&&(t.userGestureEventMiddleware=userGestureEventMiddleware),!t.videoEventMiddleware&&n.setEventsMiddleware(videoEventMiddleware)),this.gapJumpInst=new GapJump(this.player,this.playerConfig),this.preloader=r.isOpenPreload?new Mp4Preloader(this.config,this,this.bitRateAdapter):null,n.preloader=this.preloader,this._proxyPlayer(),this.initAwManager(),n.useHooks("replay",this._replayHook),n.useHooks("play",this._playHook),n.useHooks("pause",this._pauseHook),n.useHooks("retry",this._retryHook),n.video.addEventListener(CUSTOM_EVENTS.BUFFERED_RESET,this._onBufferedReset),this._bindNetworkStateChange(),this.on(TIME_UPDATE,this._onVideoTimeUpdate),this.on(LOADED_DATA,(function(){e.changeState("LOADED_DATA"),e.deleteVideo(),e._firstSegState=2,e._onTimeUpdate(),e._firstFrameTime()})),this.on(LOAD_START,(function(){e.changeState("LOAD_START"),e._loadStartEventTime=util.nowTime(),e.codecType!==CODEC_TYPE.H265||e.config.supportHevc||(e._isMseInit=!0,e._onTimeUpdate())})),this.on("xglog",(function(t){if("firstFrame"===t.eventType){var r=e.preLoadData&&e.preLoadData.definition?e.preLoadData.definition:-1;e.codecType===CODEC_TYPE.H264?console.log("[xgplayer-encrypt-mp4]>>>>firstFrame ",e.playerConfig.vid,t.fvt,", codectype: ",e.codecType,", hitpreload: ",e.hitpreload,", video: ",e._useVideoLoad,",curPlayBitrate: ",e.player.curDefinition.definition,", preloadBitrate: ",r,",metaLoad, ",e.firstFrameTime.metaload,", mseOpen: ",e.firstFrameTime.mseopen,",appendInit: ",e.firstFrameTime.metaready_initsegend):console.log("[xgplayer-encrypt-mp4]>>>>firstFrame ",e.playerConfig.vid,t.fvt,", codectype: ",e.codecType,", hitpreload: ",e.hitpreload,",curPlayBitrate: ",e.player.curDefinition.definition,", preloadBitrate: ",r,",metaLoad, ",e.firstFrameTime.metaload)}})),n.mp4MseFlag=!0)}},{key:"_startBufferCheck",value:function(){var e=this.player;if(e.video){var t=[];if(e.video.buffered){for(var r=0,n=e.video.buffered.length;r<n;r++)t.push([e.video.buffered.start(r),e.video.buffered.end(r)]);t.toString()!==this.lastBuffer&&(this.lastBuffer=t.toString(),this._onBufferReachThreshold())}}}},{key:"_onBufferReachThreshold",value:function(){var e=this.player,t=this.config;if(e.video){for(var r=e.video.buffered,n=0,o=0,i=0;i<r.length&&(n=r.start(i),o=r.end(i),!(n<=e.video.currentTime&&e.video.currentTime<=o));i++);o-e.video.currentTime>=t.bufferThreshold&&!this._hasTriggerBufferThreshold&&(this._hasTriggerBufferThreshold=!0,e.emit("BUFFER_THRESHOLD",o-e.video.currentTime))}}},{key:"_startUrlExpiredCheck",value:function(){var e=this.player.config;e.definition&&e.definition.list&&e.definition.list.length>0&&(this.urlExpireTimestamp=e.definition.list[0].url_expire||0,this._handleUrlExpire())}},{key:"checkConfig",value:function(){var e=this.playerConfig,t=this.config,r=e.defaultDefinition,n=e.defaultBitrate;if(!r){var o=this.playerConfig.definition;r=o&&o.defaultDefinition?o.defaultDefinition:t.definition}!n&&t.bitrate&&(n=t.bitrate),e.defaultDefinition=r,e.defaultBitrate=n}},{key:"beforePlayerInit",value:function(){var e=this.player,t=this;this._isInit||(BasePlugin.defineGetterOrSetter(e,{__url:{get:function(){return t.mse?t.mse.url:e.config.url},configurable:!0},downloadSpeed:{get:function(){return _realTimeSpeed/8},configurable:!0},playerVersion:{get:function(){return version},configurable:!0},menuCodeType:{get:function(){return t.mp4&&t.mp4.meta?t.mp4.meta.videoCodec:"avc"},configurable:!0},playerType:{get:function(){return"MP4"},configurable:!0},supportMenus:{get:function(){return{speed:e.mp4MseFlag,cdn:e.mp4MseFlag,resolution:e.mp4MseFlag}},configurable:!0},CDNUrl:{get:function(){return t.CDNUrl},configurable:!0},abrInstance:{get:function(){return t.abrInstance},configurable:!0},ext:{get:function(){var e,r,n,o,i,a,s=[];if(null!==(e=t.player)&&void 0!==e&&null!==(r=e.video)&&void 0!==r&&r.buffered)for(var l=t.player.video.buffered,c=0,u=l.length;c<u;c++)s.push([l.start(c),l.end(c)]);var $=[];if(t.mse)for(var d=Math.min(t.opQueueLen,5),p=0;p<d;p++)$.push(t.mse.opQueues.video[p].context);return{type:"MP4",usevideo:t.useVideoLoad,duration:null===(n=t.mp4)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.duration,loadseg:{loadIdx:t._curLoadSegmentIdx,loadTimeRange:null!==(i=t.mp4)&&void 0!==i&&i.timeRange?t.mp4.timeRange[t._curLoadSegmentIdx]:{},waitIdx:t.debugInfo.loadIndx,waitTimeRange:null!==(a=t.mp4)&&void 0!==a&&a.timeRange&&void 0!==t.debugInfo.loadIndx?t.mp4.timeRange[t.debugInfo.loadIndx]:{}},bufffer:s,speed:t.debugInfo.speed,states:t.states,mseque:$,url:t.playerConfig.url}},configurable:!0}}),this._isInit=!0)}},{key:"destroy",value:function(){var e=this.player;console.log("[Index] destroy",this.playerId),this.preloader&&this.preloader.destroy(this.playerId),e.preloader=null,e.removeHooks("replay",this._replayHook),e.removeHooks("play",this._playHook),e.removeHooks("pause",this._pauseHook),e.removeHooks("retry",this._retryHook),this._reset(),this._onDestroyWasm(),this.player.playNext=_playerPlayNext,this.player._startInit=_playerStartInit,this.player.changeDefinition=_playerChangeDefinition,this.player.switchURL=_playerSwitchUrl,this._unbindNetworkStateChange(),e.video&&e.video.removeEventListener(CUSTOM_EVENTS.BUFFERED_RESET,this._onBufferedReset),this._bufferCheckTimer&&clearInterval(this._bufferCheckTimer),this._removeBufferTimer&&(clearTimeout(this._removeBufferTimer),this._removeBufferTimer=null)}},{key:"initAwManager",value:function(){var e=this,t=this.config;this.awManager||(this.awManager=new AwManager(t.cdnHost,t.cdnBucket));var r=new ProxyPromise;if(r.id="aw",this._awPromise=r,t.isEncrypt){var n=new WasmManager;n.push(this.awManager.init()),n.startup().then((function(){n.destroy(),r.resolve()})).catch((function(t){n.destroy(),e._emitInitFail(t),r.reject()}))}else r.resolve()}},{key:"_proxyPlayer",value:function(){var e,t,r,n=this;"function"==typeof this.player.playNext&&(_playerPlayNext=this.player.playNext),this.player.playNext=function(){n.playNext.apply(n,arguments)},_playerStartInit=this.player._startInit,_playerSwitchUrl=this.player.switchURL,_playerChangeDefinition=this.player.changeDefinition,this.player._startInit=_bindInstanceProperty(e=this.playerStartInit).call(e,this),this.player.switchURL=_bindInstanceProperty(t=this.switchURL).call(t,this),this.player.changeDefinition=_bindInstanceProperty(r=this.changeDefinition).call(r,this)}},{key:"getInitBitrate",value:function(){var e=this,t=this.player,r=this.config,n=this.playerConfig,o=null,i=t.definitionList;if(i&&i.length>0){var a;if(_mapInstanceProperty(i).call(i,(function(t){var r=Mp4Preloader.generateUniqueKey({vid:n.vid,definition:t.definition||"",vtype:n.vtype,codecType:n.codecType});t.cacheKey=r,r&&!o&&e.preloader&&e.preloader.hasItemSameVid(r)&&((o=t).type="preload")})),o&&n.userSelectDefinition&&r.focusUserDefinition)console.log("[Index] getInitBitrate",_concatInstanceProperty(a="preloadDefinition: ".concat(o.definition," userSelectDefinition:")).call(a,n.userSelectDefinition)),n.userSelectDefinition!==o.definition&&(o=null);!o&&this.bitRateAdapter&&(this.bitRateAdapter.speed=MP4.speed,(o=this.getDefinitonFromAdapter(i,n.userSelectDefinition))&&(o.type="bitRateAdapter"))}return o&&o.url||(o="Array"===util$1.typeOf(n.url)&&n.url.length>0||"String"===util$1.typeOf(n.url)&&n.url?{url:n.url,definition:n.defaultDefinition,duration:n.duration||this.config.duration||0,bitrate:n.defaultBitrate||this._getBitrateByDefition(n.defaultDefinition),type:"default"}:i[i.length-1]),this.playerConfig.url=o.url,o.networkSpeed=MP4.speed,o.fileSize=util.getFileSize(o.bitrate,n.duration),t.curDefinition=o,o}},{key:"_setPlayerSrc",value:function(e){var t=this.player;this._removeVideoSource(),"Array"===util$1.typeOf(e)?(t.video.removeAttribute("src"),!t._detachSourceEvents&&_forEachInstanceProperty(e).call(e,(function(e){t.video.appendChild(util$1.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||"")}))})),t._attachSourceEvents(t.video,e),t.play()):(t.video.src=e,t.play()),t.mp4MseFlag=!1,t.emit("playertypechange")}},{key:"_removeVideoSource",value:function(e){var t=this.player,r=(e=e||t.video).children;if(r.length>0)for(t._detachSourceEvents(e);r.length>0;)e.removeChild(r[0])}},{key:"_getBitrateByDefition",value:function(e){var t=this.playerConfig,r=0;if(!t.definition||!t.definition.list)return r;for(var n=0;n<t.definition.list.length;n++){var o=t.definition.list[n];o.definition===e&&(r=o.bitrate)}return r}},{key:"_getDefinitionItem",value:function(e){for(var t=this.playerConfig,r=0;r<t.definition.list.length;r++){var n=t.definition.list[r];if(n.definition===e)return n}return null}},{key:"_initAbrDefinition",value:function(){var e,t=this.player,r=this.playerConfig;if(r.definition.list.length>0&&(t.curDefinition||(t.curDefinition=r.definition.list[0]),t.curDefinition.vwidth||_Object$assign(t.curDefinition,this._getDefinitionItem(t.curDefinition.definition)),this._abrService.updateAbrCacheData()),this._abrService&&this._abrService.isCurrentAutoDefi){var n=r.definition.list.length;t.curDefinition=r.definition.list[n-1]}for(var o=0;o<r.definition.list.length;o++){var i=r.definition.list[o];t.curDefinition.definition===i.definition?i.selected=!0:i.selected=!1}console.log("resourceReady",_concatInstanceProperty(e=r.definition.list).call(e)),this.player.emit("resourceReady",r.definition.list);var a=t.curDefinition.bitrate;if(!a)for(var s=0;s<r.definition.list.length;s++){var l=r.definition.list[s];l.definition===t.curDefinition.definition&&(a=l.bitrate)}this._abrService.updateBitrate(a)}},{key:"_initAbrService",value:(r=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){var t,r;return _regeneratorRuntime$2().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:if(t=this.playerConfig,(r=this.config).autoBitrateOpts&&r.autoBitrateOpts.isOpenAutoDefi){e.next=3;break}return e.abrupt("return");case 3:return this._abrService=new AbrService(this,this.abrSwitchURL),e.next=6,this._abrService.init({video:_concatInstanceProperty(n=t.definition.list).call(n)});case 6:this._initAbrDefinition();case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"_initMp4Kernel",value:function(){var e=this;this.firstFrameTime.newplayer_initkernel=util.nowTime()-this.firstFrameTime.newplayer,this.log("[===========], initMp4Kernel,",util.nowTime());var t=this.playerConfig,r=this.config,n=new ProxyPromise;try{var o=this._defInited?null:this.getInitBitrate();if(this._defInited=!0,this.log("curDefinition",o),this.log("[_initMp4Kernel] ".concat(t.vid," curDefinition"),o),!this._handlerUrl(t.url))return n.reject(new Error("emptyUrl")),n;if(r.forceVideoPlay&&(this.codecType===CODEC_TYPE.H264||r.supportHevc))return this.useVideoLoad=!0,n.reject("forceVideoPlay"),n;var i=[];i.push(this._getLicense()),i.push(this._checkPreloader()),_Promise.all(i).then((function(t){e.isDestroy&&n.reject(new Error("destroy"));var i=null;if(t&&t.length>0&&t[1]&&(i=t[1].data),i||!r.needPreloadCheck||e.codecType===CODEC_TYPE.H265&&!r.supportHevc)if(e._vtype&&"MP3"===e._vtype)e.useVideoLoad=!0,n.reject(new Error("vtype_not_MP4"));else{var a=r._mainURL;e._initMp4(a,i,{fileSize:o?o.fileSize:0}),e._initAbrService()}else e.useVideoLoad=!0,n.reject(new Error("no_preload"))})).catch((function(t){console.error(t),t.errorType="GET_LICENSE_ERROR",e.emit("error",t),e.changeState("LICENSE_ERROR",{d:o?o.definition:0}),n.reject(t)}))}catch(e){n.reject(e)}return n}},{key:"playerStartInit",value:function(e){var t=this;if(this.log("playerStartInit",this.player.hasStart),!this.isDestroy){if(!e||"__auto__"===e||"anytext"===e){var r,n=this.playerConfig,o=n.definition;if(o&&o.list&&o.list.length>0&&o.defaultDefinition)if(_mapInstanceProperty(r=o.list).call(r,(function(e){e.definition===o.defaultDefinition&&(n.url=e.url,t.player.curDefinition=e)})),!n.url||"__auto__"===e||"anytext"===e){var i=o.list[0];e=i.url,n.url=i.url,this.player.curDefinition=i}}if(this.useVideoLoad)_playerStartInit.call(this.player,e);else{this.player.mp4MseFlag=!0,this.bufferEndTime=-1,this._tm=(new Date).getTime(),this._reset();var a=this.playerConfig.vid;this.preloader&&this.preloader.cancelPreloadByVid(a),this.changeState("PLAYER_START_INIT"),this._awPromise.then((function(){if(!t.isDestroy){t.changeState("AW_OK INIT_MP4_KERNEL");var r=t._initMp4Kernel();t._initPromise=r,t._addPendingPromise(t._initPromise),r.then((function(r){var n;t.isDestroy||(t.log(_concatInstanceProperty(n="[Index] _initMp4Kernel.then vid:".concat(a," isDestroy")).call(n,t.isDestroy),r,t.mse?t.mse.url:""),t.mse&&(e=t.mse.url),t.changeState("PLAY_INIT_OK"),t._bindEvents(),t._startProgress())})).catch((function(r){var n,o,i=!!t._initPromise&&t._initPromise.isBreak;if(!t.isDestroy&&!i)if(console.error(_concatInstanceProperty(n=_concatInstanceProperty(o="_initMp4Kernel.catch: ".concat(a," isDestroy:")).call(o,t.isDestroy," _initPromise.isBreak:")).call(n,i),r),-499897!==r.errorCode){var s=r;s.errorCode||((s=new Errors(t.player,{errorType:"runtime",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.other,vid:t.playerConfig.vid,errorMessage:null==r?void 0:r.message,mediaError:{code:ERROR_CODES.other,message:null==r?void 0:r.message}})).url=e),t.changeState("PLAY_INIT_CATCH",{c:s.errorCode,m:s.message}),t.player.vtype="MP4_1",t.player.emit("playCatch",t.player.vtype,s)}else t._emitExpireEvent(r)})).finally((function(){var r;if(t._initPromise){var n=t._initPromise.isBreak;t._initPromise&&t._removePendingPromise(t._initPromise),t._initPromise=null,t._usePaused&&(t.playerConfig.autoplay=!1),t.codecType===CODEC_TYPE.H265&&"Array"===util$1.typeOf(e)&&(e=e[0].src),t.log(_concatInstanceProperty(r="_initMp4Kernel.finally:isDestroy".concat(t.isDestroy," _initPromise.isBreak:")).call(r,n)),t.log("[===========], playerStartInit,",util.nowTime()),t.changeState("PLAY_INIT_FINALLY"),!t.isDestroy&&!n&&_playerStartInit.call(t.player,e)}}))}})).catch((function(r){t.log("_awPromise.error",r),t.changeState("PLAY_INIT_CATCH"),!t.isDestroy&&_playerStartInit.call(t.player,e)})),this._abrService&&this._abrService.isCurrentInAbr()&&(this._abrService.enable(),this._abrService.execute())}}}},{key:"playNext",value:function(e){var t=this.player;this._defInited=!1,t.resetState(),t._currentTime=0,t._duration=0,t.isPlaying=!1,this._useVideoLoad=!1,t.pause(),this._reset(),e.vtype&&(this._vtype=e.vtype.toUpperCase()),t.setConfig(e);var r=this.codecType;this.codecType=e.codecType?e.codecType.toLowerCase():CODEC_TYPE.H264;var n=e[this.pluginName];n&&(this.config=_Object$assign(this.config,n)),r!==this.codecType&&this.h265_h264_switch(this.playerConfig.mediaType||"video"),this.checkConfig(),this.initAwManager(),this.log("[Index] playNext",e),t.play(),this.emit("playnext")}},{key:"h265_h264_switch",value:function(e){this.log("h265_switch_h264");var t=this.player,r=util$1.createDom(e,"",this.getVideoConfig(this.playerConfig),"xgplayer-".concat(e,"-img"));this.removeVideo=t.video,r.muted=t.video.muted,r.volume=t.video.volume,t.video=r,t.attachVideoEvents(t.video)}},{key:"getVideoConfig",value:function(e){var t=_Object$assign({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:2,mediaType:e.mediaType||"video"},e.videoConfig,e.videoAttributes);return e.loop&&(t.loop="loop"),t}},{key:"next",value:function(e){this.playNext(e)}},{key:"oldChangeDefinition",value:function(e,t){var r,n,o=this,i=this.config,a=this.player,s=this.playerConfig;a.emit(DEFINITION_CHANGE,{from:t,to:e}),a.emit(WAITING);var l=_filterInstanceProperty(r=a.definitionList).call(r,(function(t){return t.definition===e.definition||t.definition===Number(e.definition)})),c=_filterInstanceProperty(n=a.definitionList).call(n,(function(e){return e.definition===t.definition||e.definition===Number(t.definition)}));if(c.length>0&&(c[0].selected=!1),l.length>0){(e=l[0]).selected=!0,a.curDefinition=e,this.log("[oldChangeDefinition],currentTime,",a.currentTime,",from,",t,",to,",e);var u=a.currentTime,$=a.paused;this._changeDefState||(this._changeDefState={currentTime:u,paused:$},this.log("[oldChangeDefinition],currentTime,",a.currentTime,",pause,",$)),i.definition=e.definition,this.config.keyValue=e.keyValue,this.config.kid=e.kid,this.config.secretKey=e.secretKey,this.config.drm=e.drm,this.config.getLicenseUrl=e.getLicenseUrl,s.url=e.url,s.backupURL=e.backupURL,s.userSelectDefinition=e.definition,s.defaultDefinition=e.definition,i.focusUserDefinition=!0,a.currentTime=0,a.pause(),this._reset(),this._isMseInit=!1,this.eme=null,this._handlerUrl(e.url),this._changeDefineCanPlay&&a.off("canplay",this._changeDefineCanPlay),this._changeDefineCanPlay=function(){o.changeDefineCanPlay(u,$,t,e),o._changeDefineCanPlay=null},a.once("canplay",this._changeDefineCanPlay),this.player.video.load(),this.playerStartInit(s.url)}}},{key:"switchURL",value:function(e){if(this.useVideoLoad)_playerSwitchUrl.call(this.player,e);else{var t=this.player,r=this.playerConfig;this.config.keyValue=e.keyValue,r.url=e.url,r.backupURL=e.backupURL,t.currentTime=0,t.pause(),this.reset(),this._isMseInit=!1,this.eme=null,this._handlerUrl(e.url),t.video.removeAttribute("src"),this._removeVideoSource(),t.resetState()}}},{key:"_handlerUrl",value:function(e){var t,r=this.config,n=this.playerConfig;if(!e)return!1;var o=[];if("String"===util$1.typeOf(e))t=e,n.backupURL&&o.push(n.backupURL);else if("Array"===util$1.typeOf(e)&&e.length>0&&(t=e[0].src,e.length>1))for(var i=1;i<e.length;i++)o.push(util.extUrl(e[i].src,{__vid:n.vid}));return!(!t&&0===o.length)&&(r._mainURL=util.extUrl(t,{__vid:n.vid}),r._backupURL=o,!0)}},{key:"_firstFrameTime",value:function(){if(this.codecType===CODEC_TYPE.H264||this.config.supportHevc){if(this.firstFrameTime.new_loadeddata<0){this.firstFrameTime.loadst_loadeddata=util.nowTime()-this.loadstart,this.firstFrameTime.new_loadeddata=util.nowTime()-this.firstFrameTime.newplayer;var e={};for(var t in this.firstFrameTime)Object.prototype.hasOwnProperty.call(this.firstFrameTime,t)&&(this.log("======this.firstFrameTime======",t,", ",this.firstFrameTime[t]),e[t]=this.firstFrameTime[t])}}else if(this.codecType===CODEC_TYPE.H265){var r=this.player.video.getStats(),n=this.firstFrameTime.metaload,o=this.firstFrameTime.startMuxTime;this.firstFrameTime=r,this.firstFrameTime.metaload=n,this.firstFrameTime.startload_stmux=o,this.firstFrameTime.firstmux=this.mp4?this.mp4.firstFrameTime.firstmux:-1;for(var i=0;i<r.bootStats.length;i++)this.firstFrameTime[r.bootStats[i].action]=r.bootStats[i].dot;delete this.firstFrameTime.bootStats,this.log("======this.firstFrameTime===>>",_JSON$stringify(this.firstFrameTime))}}},{key:"_bindEvents",value:function(){var e=this,t=this.config,r=this.player;this._isEventInit||(this.on("seeking",this._onSeeking),this.on("waiting",this._onWaiting),this.on("ended",this._onEnded),this.on("error",this._onVideoError),this.on("playing",this._onPlaying),this.on("detectGap",(function(){t.gapDegrade&&t.useEME&&(t.useEME=!1,e._replay())})),this.on("error",(function(t){e.changeState("video_error",{code:t.code,message:t.message,videoType:e.useVideoLoad})})),r.setEventsMiddleware({error:function(t,r){var n=t.originalEvent;e.changeState("video_error",{code:n.code,message:n.message,videoType:e.useVideoLoad}),e.log("error middleware",t,",useVideoLoad,",e.useVideoLoad),e.useVideoLoad&&r(t.eventName,n)}})),this._isEventInit=!0}},{key:"deleteVideo",value:function(){if(this.removeVideo){var e=this.removeVideo.parentNode;e&&e.removeChild(this.removeVideo),this.removeVideo=null,this.log("[_removeVideoSource]")}}},{key:"_unbindEvents",value:function(){this.off("seeking",this._onSeeking),this.off("waiting",this._onWaiting),this.off("ended",this._onEnded),this.off("playing",this._onPlaying),this._isEventInit=!1}},{key:"changeState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._pTime||(this._pTime=util.nowTime());var r=util.nowTime()-this._pTime,n=util.nowTime()-this._sTime;this.log(">>>changeState[".concat(e,"]"),r,n,t),this.states.push({state:e,t1:r,t2:n,data:t}),this._pTime=util.nowTime();var o=util.nowTime()-this._pTime;t.state=e,o&&(t.t=o)}},{key:"checkIfCanPreload",value:function(){var e=this.player,t=this.useVideoLoad,r=this.config;if(r.isOpenPreload){var n=t?5:r.minBufferLength,o=e.currentTime+n;o=o>e.duration?e.duration:o;var i=(t?e.getBufferedRange(e.buffered):e.getBufferedRange(e.buffered2))[1]-o;e.currentTime>=n&&(i>0||Math.abs(i)<1)&&this.preloader&&this.preloader.checkCanPreloadNext()&&this.emit("PRELOAD_NEXT")}}},{key:"_getLicense",value:function(){var e=this,t=this.config,r=t.vid,n=t.kid,o=t.secretKey,i=new ProxyPromise,a={method:"getLicense",success:0};if(n||o){var s=getKeyValue(r,n,o,this);s.id="licensePromise",this._addPendingPromise(s),s.then((function(t){e._removePendingPromise(s),t.clearKeys?e.config.drm=t:e.config.keyValue=t,a.success=1,i.resolve(a)})).catch((function(t){e.log("licensePromise reject"),a.success=0,a.error=t,i.reject(a)}))}else a.success=0,i.resolve(a);return i}},{key:"softDecode",get:function(){var e,t;return"xg-video"===(null===(e=this.player)||void 0===e||null===(t=e.config)||void 0===t?void 0:t.mediaType)}},{key:"_initH265MseProxy",value:function(){this.player.video instanceof HTMLVideoElement&&this.h265_h264_switch(this.playerConfig.mediaType);var e=this.player.video;this.softDecode&&e.setPlayMode&&e.setPlayMode("VOD"),this.mseProxy=e,this.softDecode&&(this.player.forceDegradeToVideo=function(){},this.player.video.addEventListener("lowdecode",this._lowDecoder),this.player.video.addEventListener("error",this._onError))}},{key:"removeAndRejectInitPromise",value:function(e){this._initPromise&&(this._removePendingPromise(this._initPromise),this._initPromise.reject(e))}},{key:"_initMp4",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.firstFrameTime.initkernel_initmp4=util.nowTime()-this.firstFrameTime.newplayer-this.firstFrameTime.newplayer_initkernel;var o=this.config,i=this.player,a=this.playerConfig;this.mp4&&(this.mp4.off(MP4_EVENTS.META_READY,this._onMp4MetaReady),this.mp4.off(MP4_EVENTS.ERROR,this._onMp4Error),this.mp4.off(MP4_EVENTS.UPDATEEME,this._updateDrmConfig),this.mp4.off(MP4_EVENTS.TASK_PROGRESS,this._onMp4Progress),this.mp4.off(MP4_EVENTS.MOOV_REQ_PROGRESS,this._onMp4DataCallBack),this.mp4.destroy(),this.mp4=null),this.changeState("MP4_NEW",{}),this.mp4=new MP4(e,i.curDefinition.bitrate,{segmentDuration:o.segmentMinDuration,enableWorker:o.enableWorker,codecType:this.codecType,chunkSize:o.preloadSize,loadSize:800,duration:a.duration||0,fileSize:n.fileSize||0,playerId:this.playerId,vid:a.vid,useUrlRange:o.useUrlRange,retryCount:o.retryCount,retryDelay:o.retryDelay,onProcessMinLen:o.onProcessMinLen,supportHevc:o.supportHevc,reqOptions:o.reqOptions},this,null,r,this.config._backupURL,this.firstFrameTime,""),this.mp4.once(MP4_EVENTS.META_READY,this._onMp4MetaReady),this.mp4.on(MP4_EVENTS.ERROR,this._onMp4Error),this.mp4.on(MP4_EVENTS.UPDATEEME,this._updateDrmConfig),this.mp4.on(MP4_EVENTS.TASK_PROGRESS,this._onMp4Progress),this.mp4.on(MP4_EVENTS.MOOV_REQ_PROGRESS,this._onMp4DataCallBack),this.mp4.on(MP4_EVENTS.CHANGE_URL,(function(e){t.player&&t.player.emit("initialUrl",{url:e})})),this.mp4.MP4Loader.on(REAL_TIME_SPEED_EVENT,(function(e){_realTimeSpeed=e.speed,t.debugInfo.speed||(t.debugInfo.speed=[]),t.debugInfo.speed.push(_realTimeSpeed),t.debugInfo.speed.length>10&&t.debugInfo.speed.shift(),t.emit(REAL_TIME_SPEED_EVENT,e)})),this.changeState("MP4_INIT",{}),this.mp4.init(r)}},{key:"_checkPreloader",value:function(){var e=this,t=this.playerConfig,r=new ProxyPromise,n={method:"checkPreloader",success:0,type:"error",cacheKey:""};this.changeState("CHECK_PRELOAD");var o=this.player.curDefinition,i=o.cacheKey?o.cacheKey:Mp4Preloader.generateUniqueKey({vid:t.vid,definition:o.definition||"",vtype:t.vtype,codecType:t.codecType});return n.cacheKey=i,this.preloader&&i?this.preloader.getPreLoadData(i).then((function(t){console.log(">>>>check Preloader result",i,t),t?(e.preLoadData=t,e.emit("PRELOAD_INFO",e.preLoadData),n.success=1,n.data=t,e.changeState("PRELOAD_OK",{l:e.preLoadData.byteLength,ck:i}),t.mediaSegList&&t.mediaSegList.length>0||t.buffer&&t.buffer.byteLength>0?e.hitpreload=!0:e.hitpreload=!1,r.resolve(n)):(e.preLoadData=null,e.changeState("PRELOAD_ERROR",{t:0}),n.success=0,n.error=new Error("none_preload"),r.resolve(n))})):(this.changeState("PRELOAD_ERROR",{t:2}),n.success=0,n.error=new Error("no_preloader"),r.resolve(n)),r}},{key:"_initEME",value:function(e,t){var r=this.player,n=this.config,o=e.checkCodecH265();n.useEME=!(!1===n.useEME||o),this._updateDrmConfig(t),this.log("config.useEME: ",n.useEME);var i=n.drm;!this.eme&&i&&i.clearKeys&&n.useEME&&(this.eme=new EME(i)),n.useEME&&this.eme&&(this.eme.setOptions('video/mp4; codecs="avc1.64001E"','audio/mp4; codecs="mp4a.40.2"'),this.eme.SetupEME(r.video))}},{key:"_initMse",value:function(e){var t,r=this,n=this.playerConfig;this.mse&&(this.mse.destroy(),this.mse=null);var o,i=this.mp4&&this.mp4.checkCodecH265(),a=!!e.videoCodec,s=!!e.audioCodec;o=a&&s?i?'video/mp4; codecs="hev1.1.6.L93.B0, mp4a.40.5"':'video/mp4; codecs="avc1.64001E, mp4a.40.5"':a?i?'video/mp4; codecs="hev1.1.6.L93.B0"':'video/mp4; codecs="avc1.64001E"':'video/mp4; codecs="mp4a.40.5"';var l=_defineProperty$5({},CONTENT_TYPES.VIDEO,{mimeType:"video/mp4",codec:o});this.mse=new MSE(n.mediaType,_bindInstanceProperty(t=this.log).call(t,this)),this.mse.on(MSE_EVENTS.MSE_OPEN,(function(e){r.firstFrameTime.initmse_sbopen=e.costtime,r._loadStartEventTime>0&&(r.firstFrameTime.mseopen=util.nowTime()-r._loadStartEventTime),r.changeState("MSE_OPEN")})),this.mse.on(MSE_EVENTS.MSE_OPEN_DONE,(function(e){r.firstFrameTime.initmse_sbopendone=e.costtime,r.changeState("MSE_OPEN_DONE"),r._isMseInit=!0,r._onTimeUpdate()})),this.mse.on(MSE_EVENTS.MSE_ERROR,(function(e){if(console.log("[MSE error]",e),e&&r.mse&&r.mse.isFull()){var t=r.player.getBufferedRange(r.player.buffered2);r._checkRemoveSourceBuffer(t,r.player.currentTime,!0)}else{var o=new Errors(r.player,{errorType:"runtime",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.mseAppend,errorMessage:e.message,vid:n.vid,mediaError:{code:ERROR_CODES.mseAppend,message:e.message}});r._errorHandler(o)}})),this.mse.on(MSE_EVENTS.UPDATE_END,(function(e){var t=e.context,n=e.costtime;if(t&&t.isinit)r.firstFrameTime.metaready_initsegend=n,r.log("player appendBuffer end ==>>>",t||null,", costTime,",n),r.changeState("MSE_INITSEG_OK");else if(r.log("player appendBuffer end ==>>>",t||null,", costTime,",n,", opt,",e.name,",bufferRange,",r.player.getBufferedRange()),r.firstFrameTime.loadst_loadeddata<0&&(r._firstSegState<0&&r._onTimeUpdate(),r.firstFrameTime.apcnt++,r.firstFrameTime.aplen+=t?t.dataLen:0,r.firstFrameTime.data_ap+=n,r.changeState("APPEND_DATA_OK",{costime:n,dataLen:t?t.dataLen:0})),r.mse&&t.state&&t.fragIndex===r.mp4.timeRange.length-1){var o=r.player.buffered;r.bufferEndTime=o.end(o.length-1),r._isEnded(),r.log("loaded ended !!!==>>>",t.range,", fragIndex,",t.fragIndex,", bufferEndTime,",r.bufferEndTime,",meta_duration,",r.mp4.meta.duration)}})),this.changeState("MSE_INIT"),this.mse.init(l)}},{key:"_appendInitSeg",value:function(e){this.mp4&&this.mse&&(this.changeState("MSE_INITSEG"),this.log("[=======ready_append_init]",util.nowTime(),",mseDone,",!!this.mse&&this.mse.ready,",isopen,",!!this.mse&&this.mse.isMediaSourceOpen()),!this.mse.ready&&this.openMSE(),this.firstFrameTime.metaready_mseisopen=this.mse&&this.mse.ready?1:0,this.mse.appendBuffer(CONTENT_TYPES.VIDEO,e,{vid:this.playerConfig.vid,range:null,dataLen:e.byteLength,isinit:!0}),this.mp4.useEME&&this.eme&&this.eme.emit("encrypted"))}},{key:"_checkMetaInfo",value:function(e){var t=null;return e?null:(t={errorCode:ERROR_CODES.metaError,errorMessage:"meta is null",errorType:"demux",errorTypeCode:ERROR_TYPES.demux},new Errors(this.player,_objectSpread2$3(_objectSpread2$3({},t),{},{vid:this.playerConfig.vid,mediaError:{code:t.errorCode,message:t.errorMessage}})))}},{key:"_stopProgress",value:function(){this._hasStartProgress=!1,this._requestTimer&&(this._requestTimer.stop(),this._requestTimer=null),this._bufferBreakTimer&&(clearTimeout(this._bufferBreakTimer),this._bufferBreakTimer=null,this._bufferBreakFlag=void 0)}},{key:"_bindNetworkStateChange",value:function(){window.addEventListener("online",this._onOnlineHandler),window.addEventListener("offline",this._onOfflineHandler)}},{key:"_unbindNetworkStateChange",value:function(){window.removeEventListener("online",this._onOnlineHandler),window.removeEventListener("offline",this._onOfflineHandler)}},{key:"_onSuperStart",value:function(e){var t=this,r=this.player;log$3("_onSuperStart:".concat(e),this.mse),r.video.src=e,this.once("canplay",(function(){r.play(),t.on("waiting",t._onWaiting)}))}},{key:"openMSE",value:function(){var e=this.mse;!e.ready&&e.isMediaSourceOpen()&&(this.log("[=======主动调用_onSourceOpen start]",util.nowTime()),e._onSourceOpen(),this.log("[=======主动调用_onSourceOpen, end ]",util.nowTime(),"mseDone,",e.ready))}},{key:"_appendBuffer",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=this.mse,i=this.playerConfig.vid;this.log("player appendBuffer start ==>>>",i,r.range,t.byteLength,", queueLen,",o&&o.opQueues[e]?o.opQueues[e].length:null),o.ready||(this.openMSE(),this.firstFrameTime.metaready_mseisopen=this.mse&&this.mse.ready?2:-1),o.appendBuffer(e,t,{vid:i,fragIndex:r.fragIndex,range:r.range,dataLen:t.byteLength,state:n})}},{key:"_loadData",value:(t=_asyncToGenerator$2(_regeneratorRuntime$2().mark((function e(){return _regeneratorRuntime$2().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.onLine){e.next=2;break}return e.abrupt("return");case 2:if(this.mp4&&this._isMseInit){e.next=5;break}return this.log("loadData, player.mp4 null",this._isMseInit),e.abrupt("return");case 5:return this.loadstart<0&&(this.loadstart=util.nowTime()),e.prev=6,e.next=9,this.mp4.load(this._curLoadSegmentIdx,this._loadDataSuccess);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.error("[Index] _loadData error",this.playerConfig.vid,e.t0);case 14:case"end":return e.stop()}}),e,this,[[6,11]])}))),function(){return t.apply(this,arguments)})},{key:"getDataBitRate",value:function(e){var t=this.mp4,r=this.playerConfig;if(!t)return 0;for(var n=t.getDataBitRate(e),o=r.definition.list,i=0,a=0;a<o.length;a++)if(o[a].bitrate===n){i=o[a];break}return i}},{key:"_loadStuckCheck",value:function(){var e=this,t=this.config,r=this.playerConfig,n=this.player;t.disableBufferBreakCheck||(n.currentTime-(this._lastCurrentTime||0)>.1||n.paused?1!==this._bufferBreakFlag&&2!==this._bufferBreakFlag||(this.log("视频没有卡死,重置卡死标记"),this._bufferBreakFlag=0,clearTimeout(this._bufferBreakTimer),this._bufferBreakFlag=null):this._bufferBreakFlag||(this._bufferBreakFlag=1,this.log("卡死计时开始! 持续".concat(BUFFER_BREAK,"毫秒则确认卡死")),this._bufferBreakTimer=_setTimeout((function(){e.isDestroy||(1===e._bufferBreakFlag&&(e._bufferBreakFlag=2,e.log("确认卡死!!!"),e._errorHandler(new Errors(e.player,{errorType:"runtime",errorTypeCode:ERROR_TYPES.runtime,errorCode:ERROR_CODES.waitTimeout,errorMessage:"wait_timeout",vid:r.vid}))),e._bufferBreakTimer=null)}),BUFFER_BREAK)),this._lastCurrentTime=n.currentTime)}},{key:"_doubleCheckBuffer",value:function(e){var t=this.player;if(!(e.startTime>t.currentTime))return!0;if(!t.video||!t.video.buffered)return!0;var r=t.video.buffered;if(1===r.length)return!0;for(var n=!1,o=0;o<r.length;o++){var i=r.start(o)-.5,a=r.end(o)+.5;if(i<=e.startTime&&e.endTime<=a){n=!0;break}}return n}},{key:"_onTimeUpdate",value:function(){var e=this,t=this.mse,r=this.mp4,n=this.player;if(this.useVideoLoad)this.checkIfCanPreload();else if(r){var o=r.timeRange;if(o&&!(o.length<1)&&1!==this._firstSegState){var i=n.getBufferedRange(n.buffered2);if((t||this.mseProxy)&&r&&r.canDownload){util.nowTime()-this._lastCheckTime>1e3&&(this._lastCheckTime=util.nowTime(),this._loadStuckCheck(),this._startUrlExpiredCheck(),this._checkRemoveSourceBuffer(i,n.currentTime));var a=n.paused?n.currentTime+this._minBufferLength:n.currentTime+this._maxBufferLength;i[1]-a<0&&_everyInstanceProperty(o).call(o,(function(t,r){if(t.downloaded){if(e._doubleCheckBuffer(t))return!0;t.downloaded=!1,t.isLoading=!1,e.log("".concat(r," download state error, no buffer, download again"))}t.startTime-n.currentTime<e._maxBufferLength?(e._curLoadSegmentIdx=r,e.log("[onTimeUpdate],load index==>>>, ",r,",IdxTimeRange, ",t.startTime,"-",t.endTime,",buffEnd, ",i[1],",playCurTime,",n.currentTime,", bufferLen,",i[1]-n.currentTime,",bufferRangeList,",e.player.buffered2?e.player.buffered2.bufferedList:null),e._loadData()):e.log("[onTimeUpdate] not load index==>>>",r,",IdxTimeRange, ",t.startTime,"-",t.endTime,",playCurTime,",n.currentTime,",bufferRangeList,",e.player.buffered2?e.player.buffered2.bufferedList:null)})),this.checkIfCanPreload(),this.playFlag&&!this._hasTriggerBufferThreshold&&this._startBufferCheck(),this._isEnded()}}}}},{key:"_reset",value:function(){for(var e in this.states=[],this.hitpreload=!1,this._sTime=util.nowTime(),this._usePaused=!1,this._firstSegState=-1,this.useVideoLoad=!1,this._isMseInit=!1,this.endofstream=!1,this._curLoadSegmentIdx=0,this.preLoadData=null,this.forPreloadTimeCache=null,this.playFlag=!1,this._waitAdjustTimeCnt=0,this._initPromise&&"pending"===this._initPromise.state&&this._initPromise.reject("DESTROYED"),clearTimeout(this.checkResumePlayTimer),this.checkResumePlayTimer=null,this._stopProgress(),this.mp4&&(this.mp4.off(MP4_EVENTS.META_READY,this._onMp4MetaReady),this.mp4.off(MP4_EVENTS.ERROR,this._onMp4Error),this.mp4.off(MP4_EVENTS.UPDATEEME,this._updateDrmConfig),this.mp4.off(MP4_EVENTS.TASK_PROGRESS,this._onMp4Progress),this.mp4.off(MP4_EVENTS.MOOV_REQ_PROGRESS,this._onMp4DataCallBack),this.mp4.destroy(),this.mp4=null),this.mse&&(this.mse.destroy(),this.mse=null),this.mseProxy&&(this.player.video.removeEventListener("lowdecode",this._onDegrade),this.player.video.removeEventListener("error",this._onError)),this._clearMediaKeys(),this._unloadVideo(),this._cancelPendingPromises(),this._abrService&&(this._abrService.destroy(),this._abrService=null),this.firstFrameTime)Object.prototype.hasOwnProperty.call(this.firstFrameTime,e)&&(this.firstFrameTime[e]="apcnt"===e||"aplen"===e?0:"newplayer"===e?util.nowTime():-1);clearTimeout(this._waitInBufferTimer),this._waitInBufferTimer=null,this.loadstart=-1,this._loadStartEventTime=-1,this.startLoadData=-1}},{key:"removeErrorUrls",value:function(e,t,r){return-499897!==e.errorCode&&-499892!==e.errorCode||this._emitExpireEvent(e),r}},{key:"_errorHandler",value:function(e){var t=this.player,r=this.playerConfig,n=this.preLoadData;if(t){if(this.useVideoLoad)return console.log("useVideoLoad final error!!!!, ",r.vid,e),void this.emit("error",e);if("object"!==_typeof$4(e)){var o={};o.err=e,e=o}var i=t.paused;e.vid=r.vid,e.preloadHit=n&&n.byteLength>0?1:0,e.preloadCached=n?n.duration:0,e=new Errors(t,e),this.log("_errorHandle","preState is ".concat(i),e),!e.url&&(e.url=t.src),this.player.vtype="MP4_2",this.player.emit("playCatch",this.player.vtype,e),e.errd&&"object"===_typeof$4(e.errd)&&this.mp4&&(e.errd.url=this.mp4.url,e.url=this.mp4.url),e.codectype=this.codecType,this.emit("DATA_REPORT",e),this.mp4&&this.mp4.url&&this.removeErrorUrls(e,this.mp4.url,r.url),this.log("error task cancel"),this.mp4&&this.mp4.cancelLoading(),this._abrService&&this._abrService.disable(),this.mp4&&(this.mp4.canDownload=!1),this.mp4&&this.mp4.bufferCache&&this.mp4.bufferCache.clear(),this._startDegradedPlayback(e)}}},{key:"_startDegradedPlayback",value:function(e){var t=this;this.mp4&&(this.mp4.canDownload=!1);var r=this.player,n=this.playerConfig;if(this.endofstream=!1,this._currentTime=r.currentTime||0,this.player.pause(),this._reset(),this._replay=null,this.codecType===CODEC_TYPE.H265)console.log("h265 err,degrade use 264 play",n.vid),this._onDegrade(e);else if(this.codecType===CODEC_TYPE.H264)if(this.config.drm){var o;if(this.config.drm)_mapInstanceProperty(o=_Object$keys(this.config.drm)).call(o,(function(r){t.config.drm&&(e[r]=t.config.drm[r])}));console.log("final error !!!!, ",n.vid,e),this.emit("error",e)}else this.useVideoLoad=!0,this._setPlayerSrc(n.url),this.once("canplay",(function(){t._currentTime&&(r.currentTime=t._currentTime),!r.paused&&r.play()}))}},{key:"_startProgress",value:function(){var e=this;this._hasStartProgress||(this._stopProgress(),this._requestTimer=new Timer((function(){e._requestTimer&&e._onTimeUpdate()})),this._requestTimer.tickEvery(this._tickInSeconds),this._hasStartProgress=!0)}},{key:"_unloadVideo",value:function(){var e=this.player;try{this.log("unloadVideo src ".concat(e.video.src)),e.video&&e.video.src&&(e.video.removeAttribute("src"),e.video.load())}catch(e){this.log("unloadVideo error",e)}}},{key:"_addPendingPromise",value:function(e){this._pendingPromises.push(e)}},{key:"_removePendingPromise",value:function(e){var t;this.log("removePendingPromise",e.id);var r,n=_indexOfInstanceProperty(t=this._pendingPromises).call(t,e);n>-1&&_spliceInstanceProperty(r=this._pendingPromises).call(r,n,1)}},{key:"_cancelPendingPromises",value:function(){var e;this._pendingPromises.length>0&&_forEachInstanceProperty(e=this._pendingPromises).call(e,(function(e){e.reject(DESTROYED)}));this._pendingPromises=[]}},{key:"_onMediaExpired",value:function(){this._stopProgress(),this.emit(CUSTOM_EVENTS.MEDIA_EXPIRED)}},{key:"_onDestroyWasm",value:function(){this.awManager&&(this.awManager.destroy(),this.awManager=null)}},{key:"_isEnded",value:function(){var e=this.player,t=this.mp4,r=e.bufferedPoint,n=r?r.end:0;return!this.endofstream&&this.bufferEndTime>0&&this.mse&&this.bufferEndTime-e.currentTime<.5&&(this.log("[check player isEnded],deal mse.endOfStream, currentTime,",e.currentTime,", bufferend,",n,", duration,",t.meta.duration),this.endofstream=!0,this.mse.endOfStream()),!!(t&&t.meta&&t.meta.duration-e.currentTime<.5)&&(this._stopProgress(),this.log("[check player isEnded],stopProgress and endOfStream,currentTime, ",e.currentTime,", bufferend,",n,", duration,",t.meta.duration),this.mse&&this.mse.endOfStream(),!0)}},{key:"_clearMediaKeys",value:function(){var e=this.player;e.video&&"function"==typeof e.video.setMediaKeys&&e.video.setMediaKeys(null).catch((function(){}))}},{key:"_checkRemoveSourceBuffer",value:function(e,t,r,n){var o=this,i=this.mse,a=this.mp4,s=this.player;if(i&&a&&s&&(r&&(clearTimeout(this._removeBufferTimer),this._removeBufferTimer=null),e||(e=s.getBufferedRange(s.buffered2)),t||(t=s.currentTime),!(!r&&util.nowTime()-this._checkRemoveBufferLastTime<=this.config.removeBufferLen||this.endofstream)&&(this._checkRemoveBufferLastTime=util.nowTime(),e&&e[0]>=0&&(t-e[0]>this.config.removeBufferLen||i.isFull())))){var l=n?e[1]:t-(i.isFull()?0:15),c=a.getFragmentIdx(l);if(c>=0&&(n||a.timeRange[c].startTime<t)){var u=Math.floor(Math.min(a.timeRange[c].startTime,e[1]));e[0]<u?(this.log("[checkremoveSourceBuffer], remove range==>>>",e[0],u),i.reuse(e[0],u)):i.isFull()&&!this._removeBufferTimer&&(this.log("[after 10s, go on checkremoveSourceBuffer], currentTime==>>>",t,", buffer start,",e[0]),this._removeBufferTimer=_setTimeout((function(){o._checkRemoveSourceBuffer(null,null,!0)}),1e4))}}}},{key:"onMediaUpdate",value:function(e){var t=e.vid,r=e.kid,n=e.url,o=this.player,i=this.config;if(t===this.playerConfig.vid&&r===i.kid&&n){this.playerConfig.url=n,this._handlerUrl(n);var a=i._mainURL;return this.useVideoLoad?o.src=n:this.mp4&&this.mp4.update(a),!0}return!1}},{key:"enableAutoBuffer",value:function(e){var t=this;if(e){if(!this._allInitPromise)return void this.log("player destroyed!!");this._allInitPromise.then((function(){t.log("enableAutoBuffer true"),t._startProgress()}))}else this._stopProgress(),this.log("enableAutoBuffer false")}},{key:"bitRateAdapter",get:function(){return this.player&&this.player.plugins&&this.config.needAutoBitrate?this.player.plugins.bitrateselector:null}},{key:"getDefinitonFromAdapter",value:function(e,t){if(!this.bitRateAdapter)return null;var r=this.bitRateAdapter;return r.getSuitableBitrate?r.getSuitableBitrate(e,t):r.bitRateAdapter?r.bitRateAdapter.select(e):null}},{key:"addPreloader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.playerId=this.playerId,this.preloader?this.preloader.addPreloader(e,this.playerId,this.playerConfig.vid):this.log("preloader has destroyed")}},{key:"addPreloaderList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.preloader?this.preloader.addPreloaderList(e,this.playerId,this.playerConfig.vid):this.log("preloader has destroyed")}},{key:"changeUserSelectDefinition",value:function(e){this.preloader&&e&&this.preloader.changeUserSelectDefinition(e)}},{key:"log",value:function(e){for(var t,r,n=this.playerConfig,o=n&&n.vid?_concatInstanceProperty(t="[Index]".concat(n.vid," ")).call(t,e):"[Index] ".concat(e),i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];log$3.apply(void 0,_concatInstanceProperty(r=[o]).call(r,a))}},{key:"_emitInitFail",value:function(e){this.log("initFail, reason:",e),this.emit(CUSTOM_EVENTS.INIT_FAIL,e)}},{key:"emitParseError",value:function(){this.log("parseError"),this.emit(CUSTOM_EVENTS.PARSE_ERROR)}},{key:"useVideoLoad",get:function(){return this._useVideoLoad},set:function(e){this._useVideoLoad=e}},{key:"ready",get:function(){return this._allInitPromise}},{key:"speed",get:function(){return _parseInt$1(MP4.speed,10)}},{key:"version",get:function(){return version}},{key:"realTimeSpeed",get:function(){return _realTimeSpeed}},{key:"opQueueLen",get:function(){var e=this.mse&&this.mse.opQueues?this.mse.opQueues.video:[];return e?e.length:0}},{key:"loadSegmentTimeRange",get:function(){if(!this.mp4)return[0,0,0,0];var e=this.mp4.timeRange;if(e&&e.length>0&&this._curLoadSegmentIdx&&this._curLoadSegmentIdx<e.length){var t=e[this._curLoadSegmentIdx];if(t.isLoading){var r,n=this.mp4.getFragRange(this._curLoadSegmentIdx);return _concatInstanceProperty(r=[Number(t.startTime),Number(t.endTime)]).call(r,_toConsumableArray$4(n))}}return[0,0,0,0]}},{key:"preloadState",get:function(){return this.preloader&&this.preloader.loadingCount}},{key:"moovSize",get:function(){return 0}},{key:"isDestroy",get:function(){return!this.player}},{key:"cancelPreloadTask",value:function(){this.preloader&&this.preloader.cancelLoading(this.player.playerId)}},{key:"CDNUrl",get:function(){var e=this.playerConfig.url,t=document.createElement("a");return t.href=e,t.host}},{key:"abrInstance",get:function(){return this._abrService?this._abrService.abrInstance:null}},{key:"_handleUrlExpire",value:function(){var e=this,t=this.config,r=this.player,n=r.paused;(new Date).getTime()/1e3>=this.urlExpireTimestamp&&this.urlExpireTimestamp>0&&!n&&t.getServerTime&&(r.serverTimeDiffPromise=r.serverTimeDiffPromise||t.getServerTime().catch((function(){return 0})),r.serverTimeDiffPromise.then((function(t){if(t&&(r.serverTimeDiff=(new Date).getTime()/1e3-t),(new Date).getTime()/1e3>=e.urlExpireTimestamp+r.serverTimeDiff){e.urlExpireTimestamp=(new Date).getTime()/1e3+86400;var n=new NetWorkError("network",ERROR_CODES[403]);e._emitExpireEvent(n)}})))}},{key:"_emitExpireEvent",value:function(e){var t=this.player,r=(new Date).getTime()/1e3;this.emitExpireTimestamp?r-this.emitExpireTimestamp>300&&(this.emitExpireTimestamp=r,t.emit("MEDIA_EXPIRED",e)):(this.emitExpireTimestamp=r,t.emit("MEDIA_EXPIRED",e))}}],[{key:"registerPreloader",value:function(e,t){e.vtype=VTYPES.MP4,Mp4Preloader.BitRateAdapter=t,new Mp4Preloader(e,this)}},{key:"pluginName",get:function(){return"Mp4EncryptPlayer"}},{key:"defaultConfig",get:function(){return{onlyInit:!1,useWaterLevel:!1,maxBufferLength:10,minBufferLength:5,tickInSeconds:.2,getLicenseUrl:"",xhrSetup:{},retryCount:1,retryDelay:1e3,preloadCacheType:1,needPreloadRangeList:!1,cdnHost:"",cdnBucket:"",isEncrypt:!1,isOpenPreload:!0,needPreloadCheck:!1,preloadTime:0,preloadMaxCacheCount:0,needAutoBitrate:!0,keyValue:null,drm:null,switchBitRateWay:!1,enableWorker:!1,bufferThreshold:10,removeBufferLen:40,focusUserDefinition:!1,resumePlayWaterLevel:2,waitJampBufferMaxCnt:3,waitingInBufferTimeOut:5e3,h265Degrade:!1,forceVideoPlay:!1,segmentMinDuration:2,supportHevc:void 0,H264Config:null}}},{key:"speed",get:function(){return _realTimeSpeed}},{key:"realTimeSpeed",get:function(){return _realTimeSpeed}},{key:"version",get:function(){return version}}]),o}();Mp4EncryptPlayer.isSupported=isSupported,Mp4EncryptPlayer.isEMESupported=isEMESupported,Mp4EncryptPlayer.isSupportedWithXgmse=isSupportedWithXgmse,Mp4EncryptPlayer.isMediaSourceSupported=isMediaSourceSupported,Mp4EncryptPlayer.isWebAssemblySupported=isWebAssemblySupported,Mp4EncryptPlayer.getPlayLicenses=getPlayLicenses,Mp4EncryptPlayer.CUSTOM_EVENTS=CUSTOM_EVENTS,Mp4EncryptPlayer.Mp4Preloader=Mp4Preloader;export{Mp4EncryptPlayer as default};
|
|
2
|
-
//# sourceMappingURL=esm/veplayer.plugin.mp4.production.js.map
|