@volcengine/veplayer-plugin 2.3.0 → 2.4.0-rc.1

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.
Files changed (41) hide show
  1. package/esm/index.d.ts +1 -0
  2. package/esm/index.development.js +4878 -1534
  3. package/esm/index.production.js +5 -5
  4. package/esm/veplayer.plugin.flv.development.js +352 -197
  5. package/esm/veplayer.plugin.flv.production.js +1 -1
  6. package/esm/veplayer.plugin.hls.development.js +656 -261
  7. package/esm/veplayer.plugin.hls.production.js +1 -1
  8. package/package.json +21 -1
  9. package/umd/index.d.ts +1 -0
  10. package/umd/veplayer.plugin.flv.development.js +348 -193
  11. package/umd/veplayer.plugin.flv.production.js +1 -1
  12. package/umd/veplayer.plugin.hls.development.js +650 -255
  13. package/umd/veplayer.plugin.hls.production.js +1 -1
  14. package/esm/veplayer.plugin.drm.development.js +0 -1577
  15. package/esm/veplayer.plugin.drm.production.js +0 -2
  16. package/esm/veplayer.plugin.mp4.development.js +0 -38039
  17. package/esm/veplayer.plugin.mp4.production.js +0 -2
  18. package/esm/veplayer.plugin.rtm.development.js +0 -5587
  19. package/esm/veplayer.plugin.rtm.production.js +0 -2
  20. package/esm/veplayer.plugin.shaka.development.js +0 -15973
  21. package/esm/veplayer.plugin.shaka.production.js +0 -20
  22. package/esm/veplayer.plugin.time.shift.development.css +0 -63
  23. package/esm/veplayer.plugin.time.shift.development.js +0 -339
  24. package/esm/veplayer.plugin.time.shift.production.css +0 -1
  25. package/esm/veplayer.plugin.time.shift.production.js +0 -2
  26. package/esm/veplayer.plugin.xgvideo.development.js +0 -19097
  27. package/esm/veplayer.plugin.xgvideo.production.js +0 -2
  28. package/umd/veplayer.plugin.drm.development.js +0 -1579
  29. package/umd/veplayer.plugin.drm.production.js +0 -1
  30. package/umd/veplayer.plugin.mp4.development.js +0 -38043
  31. package/umd/veplayer.plugin.mp4.production.js +0 -1
  32. package/umd/veplayer.plugin.rtm.development.js +0 -5589
  33. package/umd/veplayer.plugin.rtm.production.js +0 -1
  34. package/umd/veplayer.plugin.shaka.development.js +0 -15977
  35. package/umd/veplayer.plugin.shaka.production.js +0 -1
  36. package/umd/veplayer.plugin.time.shift.development.css +0 -63
  37. package/umd/veplayer.plugin.time.shift.development.js +0 -342
  38. package/umd/veplayer.plugin.time.shift.production.css +0 -1
  39. package/umd/veplayer.plugin.time.shift.production.js +0 -1
  40. package/umd/veplayer.plugin.xgvideo.development.js +0 -19099
  41. package/umd/veplayer.plugin.xgvideo.production.js +0 -1
@@ -1,20 +0,0 @@
1
- function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var defineProperty$e={exports:{}},check=function(e){return e&&e.Math==Math&&e},global$s=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),fails$C=function(e){try{return!!e()}catch(e){return!0}},fails$B=fails$C,functionBindNative=!fails$B((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$3=Function.prototype,apply$7=FunctionPrototype$3.apply,call$z=FunctionPrototype$3.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$4?call$z.bind(apply$7):function(){return call$z.apply(apply$7,arguments)}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$2=Function.prototype,call$y=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$2.bind.bind(call$y,call$y),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$y.apply(e,arguments)}},uncurryThis$E=functionUncurryThis,toString$i=uncurryThis$E({}.toString),stringSlice$5=uncurryThis$E("".slice),classofRaw$2=function(e){return stringSlice$5(toString$i(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$D=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$D(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$r=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$A=fails$C,descriptors=!fails$A((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$x=Function.prototype.call,functionCall=NATIVE_BIND$2?call$x.bind(call$x):function(){return call$x.apply(call$x,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$b=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$b&&!$propertyIsEnumerable$1.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$b(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$1;var match,version,createPropertyDescriptor$8=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$C=functionUncurryThis,fails$z=fails$C,classof$i=classofRaw$2,$Object$6=Object,split$3=uncurryThis$C("".split),indexedObject=fails$z((function(){return!$Object$6("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$i(e)?split$3(e,""):$Object$6(e)}:$Object$6,isNullOrUndefined$8=function(e){return null==e},isNullOrUndefined$7=isNullOrUndefined$8,$TypeError$m=TypeError,requireObjectCoercible$8=function(e){if(isNullOrUndefined$7(e))throw $TypeError$m("Can't call method on "+e);return e},IndexedObject$3=indexedObject,requireObjectCoercible$7=requireObjectCoercible$8,toIndexedObject$b=function(e){return IndexedObject$3(requireObjectCoercible$7(e))},isCallable$q=isCallable$r,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$n=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$q(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$q(e)},path$w={},path$v=path$w,global$r=global$s,isCallable$p=isCallable$r,aFunction=function(e){return isCallable$p(e)?e:void 0},getBuiltIn$k=function(e,t){return arguments.length<2?aFunction(path$v[e])||aFunction(global$r[e]):path$v[e]&&path$v[e][t]||global$r[e]&&global$r[e][t]},uncurryThis$B=functionUncurryThis,objectIsPrototypeOf=uncurryThis$B({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$q=global$s,userAgent$6=engineUserAgent,process$4=global$q.process,Deno$1=global$q.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&userAgent$6&&(!(match=userAgent$6.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$6.match(/Chrome\/(\d+)/))&&(version=+match[1]);var engineV8Version=version,V8_VERSION$3=engineV8Version,fails$y=fails$C,global$p=global$s,$String$5=global$p.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$y((function(){var e=Symbol();return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$j=getBuiltIn$k,isCallable$o=isCallable$r,isPrototypeOf$s=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$5=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$j("Symbol");return isCallable$o(t)&&isPrototypeOf$s(t.prototype,$Object$5(e))},$String$4=String,tryToString$9=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$n=isCallable$r,tryToString$8=tryToString$9,$TypeError$l=TypeError,aCallable$l=function(e){if(isCallable$n(e))return e;throw $TypeError$l(tryToString$8(e)+" is not a function")},aCallable$k=aCallable$l,isNullOrUndefined$6=isNullOrUndefined$8,getMethod$3=function(e,t){var r=e[t];return isNullOrUndefined$6(r)?void 0:aCallable$k(r)},call$w=functionCall,isCallable$m=isCallable$r,isObject$m=isObject$n,$TypeError$k=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$m(r=e.toString)&&!isObject$m(n=call$w(r,e)))return n;if(isCallable$m(r=e.valueOf)&&!isObject$m(n=call$w(r,e)))return n;if("string"!==t&&isCallable$m(r=e.toString)&&!isObject$m(n=call$w(r,e)))return n;throw $TypeError$k("Can't convert object to primitive value")},shared$7={exports:{}},isPure=!0,global$o=global$s,defineProperty$d=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$d(global$o,e,{value:t,configurable:!0,writable:!0})}catch(r){global$o[e]=t}return t},global$n=global$s,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$n[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$7.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$7.exports,requireObjectCoercible$6=requireObjectCoercible$8,$Object$4=Object,toObject$c=function(e){return $Object$4(requireObjectCoercible$6(e))},uncurryThis$A=functionUncurryThis,toObject$b=toObject$c,hasOwnProperty=uncurryThis$A({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$b(e),t)},uncurryThis$z=functionUncurryThis,id$2=0,postfix=Math.random(),toString$h=uncurryThis$z(1..toString),uid$4=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$h(++id$2+postfix,36)},global$m=global$s,shared$6=sharedExports,hasOwn$o=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$m.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$r=function(e){return hasOwn$o(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$4&&hasOwn$o(Symbol$5,e)?Symbol$5[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$v=functionCall,isObject$l=isObject$n,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$q=wellKnownSymbol$r,$TypeError$j=TypeError,TO_PRIMITIVE=wellKnownSymbol$q("toPrimitive"),toPrimitive$7=function(e,t){if(!isObject$l(e)||isSymbol$4(e))return e;var r,n=getMethod$2(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$v(n,e,t),!isObject$l(r)||isSymbol$4(r))return r;throw $TypeError$j("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$6=toPrimitive$7,isSymbol$3=isSymbol$5,toPropertyKey$4=function(e){var t=toPrimitive$6(e,"string");return isSymbol$3(t)?t:t+""},global$l=global$s,isObject$k=isObject$n,document$3=global$l.document,EXISTS$1=isObject$k(document$3)&&isObject$k(document$3.createElement),documentCreateElement$1=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$k=descriptors,fails$x=fails$C,createElement$1=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$k&&!fails$x((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$j=descriptors,call$u=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$7=createPropertyDescriptor$8,toIndexedObject$a=toIndexedObject$b,toPropertyKey$3=toPropertyKey$4,hasOwn$n=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$j?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$a(e),t=toPropertyKey$3(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$n(e,t))return createPropertyDescriptor$7(!call$u(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$w=fails$C,isCallable$l=isCallable$r,replacement=/#|\.prototype\./,isForced$2=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$l(t)?fails$w(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,uncurryThis$y=functionUncurryThisClause,aCallable$j=aCallable$l,NATIVE_BIND$1=functionBindNative,bind$w=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$j(e),void 0===t?e:NATIVE_BIND$1?bind$w(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$i=descriptors,fails$v=fails$C,v8PrototypeDefineBug=DESCRIPTORS$i&&fails$v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$j=isObject$n,$String$3=String,$TypeError$i=TypeError,anObject$i=function(e){if(isObject$j(e))return e;throw $TypeError$i($String$3(e)+" is not an object")},DESCRIPTORS$h=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$h=anObject$i,toPropertyKey$2=toPropertyKey$4,$TypeError$h=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$h?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$h(e),t=toPropertyKey$2(t),anObject$h(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$h(e),t=toPropertyKey$2(t),anObject$h(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$h("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$g=descriptors,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$6=createPropertyDescriptor$8,createNonEnumerableProperty$9=DESCRIPTORS$g?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$6(1,r))}:function(e,t,r){return e[t]=r,e},global$k=global$s,apply$6=functionApply,uncurryThis$x=functionUncurryThisClause,isCallable$k=isCallable$r,getOwnPropertyDescriptor$a=objectGetOwnPropertyDescriptor.f,isForced$1=isForced_1,path$u=path$w,bind$v=functionBindContext,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$m=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,i){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,i)}return apply$6(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,i,o,a,s,l,c,u,p=e.target,f=e.global,d=e.stat,h=e.proto,y=f?global$k:d?global$k[p]:(global$k[p]||{}).prototype,g=f?path$u:path$u[p]||createNonEnumerableProperty$8(path$u,p,{})[p],$=g.prototype;for(o in t)n=!(r=isForced$1(f?o:p+(d?".":"#")+o,e.forced))&&y&&hasOwn$m(y,o),s=g[o],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$a(y,o))&&u.value:y[o]),a=n&&l?l:t[o],n&&typeof s==typeof a||(c=e.bind&&n?bind$v(a,global$k):e.wrap&&n?wrapConstructor(a):h&&isCallable$k(a)?uncurryThis$x(a):a,(e.sham||a&&a.sham||s&&s.sham)&&createNonEnumerableProperty$8(c,"sham",!0),createNonEnumerableProperty$8(g,o,c),h&&(hasOwn$m(path$u,i=p+"Prototype")||createNonEnumerableProperty$8(path$u,i,{}),createNonEnumerableProperty$8(path$u[i],o,a),e.real&&$&&(r||!$[o])&&createNonEnumerableProperty$8($,o,a)))},$$1N=_export,DESCRIPTORS$f=descriptors,defineProperty$c=objectDefineProperty.f;$$1N({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$c,sham:!DESCRIPTORS$f},{defineProperty:defineProperty$c});var path$t=path$w,Object$5=path$t.Object,defineProperty$b=defineProperty$e.exports=function(e,t,r){return Object$5.defineProperty(e,t,r)};Object$5.defineProperty.sham&&(defineProperty$b.sham=!0);var definePropertyExports=defineProperty$e.exports,parent$2v=definePropertyExports,defineProperty$a=parent$2v,parent$2u=defineProperty$a,defineProperty$9=parent$2u,parent$2t=defineProperty$9,defineProperty$8=parent$2t,defineProperty$7=defineProperty$8,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$7),classof$h=classofRaw$2,isArray$d=Array.isArray||function(e){return"Array"==classof$h(e)},ceil$1=Math.ceil,floor$3=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$3:ceil$1)(t)},trunc2=mathTrunc,toIntegerOrInfinity$7=function(e){var t=+e;return t!=t||0===t?0:trunc2(t)},toIntegerOrInfinity$6=toIntegerOrInfinity$7,min$4=Math.min,toLength$3=function(e){return e>0?min$4(toIntegerOrInfinity$6(e),9007199254740991):0},toLength$2=toLength$3,lengthOfArrayLike$b=function(e){return toLength$2(e.length)},$TypeError$g=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$2=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$g("Maximum allowed index exceeded");return e},toPropertyKey$1=toPropertyKey$4,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$8,createProperty$6=function(e,t,r){var n=toPropertyKey$1(t);n in e?definePropertyModule$3.f(e,n,createPropertyDescriptor$5(0,r)):e[n]=r},wellKnownSymbol$p=wellKnownSymbol$r,TO_STRING_TAG$4=wellKnownSymbol$p("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$j=isCallable$r,classofRaw=classofRaw$2,wellKnownSymbol$o=wellKnownSymbol$r,TO_STRING_TAG$3=wellKnownSymbol$o("toStringTag"),$Object$3=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$g=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$3(e),TO_STRING_TAG$3))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable$j(t.callee)?"Arguments":n},uncurryThis$w=functionUncurryThis,isCallable$i=isCallable$r,store$1=sharedStore,functionToString=uncurryThis$w(Function.toString);isCallable$i(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$1.inspectSource,uncurryThis$v=functionUncurryThis,fails$u=fails$C,isCallable$h=isCallable$r,classof$f=classof$g,getBuiltIn$i=getBuiltIn$k,inspectSource$1=inspectSource$2,noop=function(){},empty=[],construct$6=getBuiltIn$i("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$4=uncurryThis$v(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$h(e))return!1;try{return construct$6(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$h(e))return!1;switch(classof$f(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$4(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$6||fails$u((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isArray$c=isArray$d,isConstructor$3=isConstructor$4,isObject$i=isObject$n,wellKnownSymbol$n=wellKnownSymbol$r,SPECIES$5=wellKnownSymbol$n("species"),$Array$3=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$c(e)&&(t=e.constructor,(isConstructor$3(t)&&(t===$Array$3||isArray$c(t.prototype))||isObject$i(t)&&null===(t=t[SPECIES$5]))&&(t=void 0)),void 0===t?$Array$3:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},fails$t=fails$C,wellKnownSymbol$m=wellKnownSymbol$r,V8_VERSION$2=engineV8Version,SPECIES$4=wellKnownSymbol$m("species"),arrayMethodHasSpeciesSupport$5=function(e){return V8_VERSION$2>=51||!fails$t((function(){var t=[];return(t.constructor={})[SPECIES$4]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$1M=_export,fails$s=fails$C,isArray$b=isArray$d,isObject$h=isObject$n,toObject$a=toObject$c,lengthOfArrayLike$a=lengthOfArrayLike$b,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$2,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$l=wellKnownSymbol$r,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$l("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$s((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$h(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$b(e)},FORCED$9=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$1M({target:"Array",proto:!0,arity:1,forced:FORCED$9},{concat:function(e){var t,r,n,i,o,a=toObject$a(this),s=arraySpeciesCreate$2(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(o=-1===t?a:arguments[t]))for(i=lengthOfArrayLike$a(o),doesNotExceedSafeInteger$1(l+i),r=0;r<i;r++,l++)r in o&&createProperty$5(s,l,o[r]);else doesNotExceedSafeInteger$1(l+1),createProperty$5(s,l++,o);return s.length=l,s}});var classof$e=classof$g,$String$2=String,toString$g=function(e){if("Symbol"===classof$e(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$2(e)},objectDefineProperties={},toIntegerOrInfinity$5=toIntegerOrInfinity$7,max$4=Math.max,min$3=Math.min,toAbsoluteIndex$4=function(e,t){var r=toIntegerOrInfinity$5(e);return r<0?max$4(r+t,0):min$3(r,t)},toIndexedObject$9=toIndexedObject$b,toAbsoluteIndex$3=toAbsoluteIndex$4,lengthOfArrayLike$9=lengthOfArrayLike$b,createMethod$5=function(e){return function(t,r,n){var i,o=toIndexedObject$9(t),a=lengthOfArrayLike$9(o),s=toAbsoluteIndex$3(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$u=functionUncurryThis,hasOwn$l=hasOwnProperty_1,toIndexedObject$8=toIndexedObject$b,indexOf$7=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$c=uncurryThis$u([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$8(e),i=0,o=[];for(r in n)!hasOwn$l(hiddenKeys$5,r)&&hasOwn$l(n,r)&&push$c(o,r);for(;t.length>i;)hasOwn$l(n,r=t[i++])&&(~indexOf$7(o,r)||push$c(o,r));return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$3=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$e=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$g=anObject$i,toIndexedObject$7=toIndexedObject$b,objectKeys$2=objectKeys$3;objectDefineProperties.f=DESCRIPTORS$e&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$g(e);for(var r,n=toIndexedObject$7(t),i=objectKeys$2(t),o=i.length,a=0;o>a;)definePropertyModule$2.f(e,r=i[a++],n[r]);return e};var activeXDocument,getBuiltIn$h=getBuiltIn$k,html$2=getBuiltIn$h("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$d=shared$5("keys"),sharedKey$4=function(e){return keys$d[e]||(keys$d[e]=uid$2(e))},anObject$f=anObject$i,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html$1=html$2,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$f(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertyNamesExternal={},toAbsoluteIndex$2=toAbsoluteIndex$4,lengthOfArrayLike$8=lengthOfArrayLike$b,createProperty$4=createProperty$6,$Array$2=Array,max$3=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$8(e),i=toAbsoluteIndex$2(t,n),o=toAbsoluteIndex$2(void 0===r?n:r,n),a=$Array$2(max$3(o-i,0)),s=0;i<o;i++,s++)createProperty$4(a,s,e[i]);return a.length=s,a},classof$d=classofRaw$2,toIndexedObject$6=toIndexedObject$b,$getOwnPropertyNames$1=objectGetOwnPropertyNames.f,arraySlice$8=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames$1(e)}catch(e){return arraySlice$8(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$d(e)?getWindowNames(e):$getOwnPropertyNames$1(toIndexedObject$6(e))};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$8=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$7(e,t,r),e},defineProperty$6=objectDefineProperty,defineBuiltInAccessor$5=function(e,t,r){return defineProperty$6.f(e,t,r)},wellKnownSymbolWrapped={},wellKnownSymbol$k=wellKnownSymbol$r;wellKnownSymbolWrapped.f=wellKnownSymbol$k;var set$e,get$3,has$8,path$s=path$w,hasOwn$k=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$5=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$s.Symbol||(path$s.Symbol={});hasOwn$k(t,e)||defineProperty$5(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$t=functionCall,getBuiltIn$g=getBuiltIn$k,wellKnownSymbol$j=wellKnownSymbol$r,defineBuiltIn$7=defineBuiltIn$8,symbolDefineToPrimitive=function(){var e=getBuiltIn$g("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$j("toPrimitive");t&&!t[n]&&defineBuiltIn$7(t,n,(function(e){return call$t(r,this)}),{arity:1})},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$c=classof$g,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$c(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$4=objectDefineProperty.f,createNonEnumerableProperty$6=createNonEnumerableProperty$9,hasOwn$j=hasOwnProperty_1,toString$f=objectToString,wellKnownSymbol$i=wellKnownSymbol$r,TO_STRING_TAG$2=wellKnownSymbol$i("toStringTag"),setToStringTag$9=function(e,t,r,n){if(e){var i=r?e:e.prototype;hasOwn$j(i,TO_STRING_TAG$2)||defineProperty$4(i,TO_STRING_TAG$2,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$6(i,"toString",toString$f)}},global$j=global$s,isCallable$g=isCallable$r,WeakMap$1=global$j.WeakMap,weakMapBasicDetection=isCallable$g(WeakMap$1)&&/native code/.test(String(WeakMap$1)),NATIVE_WEAK_MAP$1=weakMapBasicDetection,global$i=global$s,isObject$g=isObject$n,createNonEnumerableProperty$5=createNonEnumerableProperty$9,hasOwn$i=hasOwnProperty_1,shared$4=sharedStore,sharedKey$2=sharedKey$4,hiddenKeys$2=hiddenKeys$6,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$5=global$i.TypeError,WeakMap=global$i.WeakMap,enforce=function(e){return has$8(e)?get$3(e):set$e(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$g(t)||(r=get$3(t)).type!==e)throw TypeError$5("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP$1||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$e=function(e,t){if(store.has(e))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$3=function(e){return store.get(e)||{}},has$8=function(e){return store.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$2[STATE]=!0,set$e=function(e,t){if(hasOwn$i(e,STATE))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$5(e,STATE,t),t},get$3=function(e){return hasOwn$i(e,STATE)?e[STATE]:{}},has$8=function(e){return hasOwn$i(e,STATE)}}var internalState={set:set$e,get:get$3,has:has$8,enforce:enforce,getterFor:getterFor},bind$u=functionBindContext,uncurryThis$t=functionUncurryThis,IndexedObject$2=indexedObject,toObject$9=toObject$c,lengthOfArrayLike$7=lengthOfArrayLike$b,arraySpeciesCreate$1=arraySpeciesCreate$3,push$b=uncurryThis$t([].push),createMethod$4=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,c,u,p){for(var f,d,h=toObject$9(l),y=IndexedObject$2(h),g=bind$u(c,u),$=lengthOfArrayLike$7(y),m=0,v=p||arraySpeciesCreate$1,b=t?v(l,$):r||a?v(l,0):void 0;$>m;m++)if((s||m in y)&&(d=g(f=y[m],m,h),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:push$b(b,f)}else switch(e){case 4:return!1;case 7:push$b(b,f)}return o?-1:n||i?i:b}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$1L=_export,global$h=global$s,call$s=functionCall,uncurryThis$s=functionUncurryThis,DESCRIPTORS$d=descriptors,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$r=fails$C,hasOwn$h=hasOwnProperty_1,isPrototypeOf$r=objectIsPrototypeOf,anObject$e=anObject$i,toIndexedObject$5=toIndexedObject$b,toPropertyKey=toPropertyKey$4,$toString$2=toString$g,createPropertyDescriptor$4=createPropertyDescriptor$8,nativeObjectCreate=objectCreate,objectKeys$1=objectKeys$3,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$6=defineBuiltIn$8,defineBuiltInAccessor$4=defineBuiltInAccessor$5,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$h=wellKnownSymbol$r,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$8=setToStringTag$9,InternalStateModule$8=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$8=InternalStateModule$8.set,getInternalState$2=InternalStateModule$8.getterFor(SYMBOL),ObjectPrototype$2=Object[PROTOTYPE],$Symbol=global$h.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],TypeError$4=global$h.TypeError,QObject=global$h.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$2.f,nativeDefineProperty=definePropertyModule$1.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$a=uncurryThis$s([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDescriptor=DESCRIPTORS$d&&fails$r((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$2,t);n&&delete ObjectPrototype$2[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$2&&nativeDefineProperty(ObjectPrototype$2,t,n)}:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$8(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$d||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$2&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$e(e);var n=toPropertyKey(t);return anObject$e(r),hasOwn$h(AllSymbols,n)?(r.enumerable?(hasOwn$h(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$h(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor$4(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$e(e);var r=toIndexedObject$5(t),n=objectKeys$1(r).concat($getOwnPropertySymbols(r));return $forEach$1(n,(function(t){DESCRIPTORS$d&&!call$s($propertyIsEnumerable,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPropertyKey(e),r=call$s(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$2&&hasOwn$h(AllSymbols,t)&&!hasOwn$h(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$h(this,t)||!hasOwn$h(AllSymbols,t)||hasOwn$h(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$5(e),n=toPropertyKey(t);if(r!==ObjectPrototype$2||!hasOwn$h(AllSymbols,n)||hasOwn$h(ObjectPrototypeSymbols,n)){var i=nativeGetOwnPropertyDescriptor$1(r,n);return!i||!hasOwn$h(AllSymbols,n)||hasOwn$h(r,HIDDEN)&&r[HIDDEN][n]||(i.enumerable=!0),i}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$5(e)),r=[];return $forEach$1(t,(function(e){hasOwn$h(AllSymbols,e)||hasOwn$h(hiddenKeys$1,e)||push$a(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$2,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$5(e)),n=[];return $forEach$1(r,(function(e){!hasOwn$h(AllSymbols,e)||t&&!hasOwn$h(ObjectPrototype$2,e)||push$a(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$6(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$r(SymbolPrototype,this))throw TypeError$4("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$2(arguments[0]):void 0,t=uid$1(e),r=function(e){this===ObjectPrototype$2&&call$s(r,ObjectPrototypeSymbols,e),hasOwn$h(this,HIDDEN)&&hasOwn$h(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor$4(1,e))};return DESCRIPTORS$d&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$2,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$2(this).tag})),defineBuiltIn$6($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable,definePropertyModule$1.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$2.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$h(e),e)},DESCRIPTORS$d&&defineBuiltInAccessor$4(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}})),$$1L({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach$1(objectKeys$1(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$l(e)})),$$1L({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1L({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$d},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1L({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$8($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$1K=_export,getBuiltIn$f=getBuiltIn$k,hasOwn$g=hasOwnProperty_1,toString$e=toString$g,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$1K({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$e(e);if(hasOwn$g(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$f("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1J=_export,hasOwn$f=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$7=tryToString$9,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$1J({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$2(e))throw TypeError(tryToString$7(e)+" is not a symbol");if(hasOwn$f(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$r=functionUncurryThis,arraySlice$7=uncurryThis$r([].slice),uncurryThis$q=functionUncurryThis,isArray$a=isArray$d,isCallable$f=isCallable$r,classof$b=classofRaw$2,toString$d=toString$g,push$9=uncurryThis$q([].push),getJsonReplacerFunction=function(e){if(isCallable$f(e))return e;if(isArray$a(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?push$9(r,i):"number"!=typeof i&&"Number"!=classof$b(i)&&"String"!=classof$b(i)||push$9(r,toString$d(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$a(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},$$1I=_export,getBuiltIn$e=getBuiltIn$k,apply$5=functionApply,call$r=functionCall,uncurryThis$p=functionUncurryThis,fails$q=fails$C,isCallable$e=isCallable$r,isSymbol$1=isSymbol$5,arraySlice$6=arraySlice$7,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String$1=String,$stringify=getBuiltIn$e("JSON","stringify"),exec$3=uncurryThis$p(/./.exec),charAt$5=uncurryThis$p("".charAt),charCodeAt$2=uncurryThis$p("".charCodeAt),replace$5=uncurryThis$p("".replace),numberToString$1=uncurryThis$p(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$q((function(){var e=getBuiltIn$e("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$q((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$6(arguments),n=getReplacerFunction(t);if(isCallable$e(n)||void 0!==e&&!isSymbol$1(e))return r[1]=function(e,t){if(isCallable$e(n)&&(t=call$r(n,this,$String$1(e),t)),!isSymbol$1(t))return t},apply$5($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$5(r,t-1),i=charAt$5(r,t+1);return exec$3(low,e)&&!exec$3(hi,i)||exec$3(hi,e)&&!exec$3(low,n)?"\\u"+numberToString$1(charCodeAt$2(e,0),16):e};$stringify&&$$1I({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$6(arguments),i=apply$5(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof i?replace$5(i,tester,fixIllFormed):i}});var $$1H=_export,NATIVE_SYMBOL=symbolConstructorDetection,fails$p=fails$C,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,toObject$8=toObject$c,FORCED$8=!NATIVE_SYMBOL||fails$p((function(){getOwnPropertySymbolsModule$2.f(1)}));$$1H({target:"Object",stat:!0,forced:FORCED$8},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$2.f;return t?t(toObject$8(e)):[]}});var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("asyncIterator");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("hasInstance");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("isConcatSpreadable");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("iterator");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("match");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("matchAll");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("replace");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("search");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("species");var defineWellKnownSymbol$b=wellKnownSymbolDefine;defineWellKnownSymbol$b("split");var defineWellKnownSymbol$a=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$a("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$d=getBuiltIn$k,defineWellKnownSymbol$9=wellKnownSymbolDefine,setToStringTag$7=setToStringTag$9;defineWellKnownSymbol$9("toStringTag"),setToStringTag$7(getBuiltIn$d("Symbol"),"Symbol");var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("unscopables");var global$g=global$s,setToStringTag$6=setToStringTag$9;setToStringTag$6(global$g.JSON,"JSON",!0);var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,path$r=path$w,symbol$5=path$r.Symbol,iterators={},DESCRIPTORS$c=descriptors,hasOwn$e=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$c&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$e(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$c||DESCRIPTORS$c&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$o=fails$C,correctPrototypeGetter=!fails$o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$d=hasOwnProperty_1,isCallable$d=isCallable$r,toObject$7=toObject$c,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object$2=Object,ObjectPrototype$1=$Object$2.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object$2.getPrototypeOf:function(e){var t=toObject$7(e);if(hasOwn$d(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$d(r)&&t instanceof r?r.prototype:t instanceof $Object$2?ObjectPrototype$1:null},fails$n=fails$C,isCallable$c=isCallable$r,isObject$f=isObject$n,create$c=objectCreate,getPrototypeOf$8=objectGetPrototypeOf,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$g=wellKnownSymbol$r,ITERATOR$9=wellKnownSymbol$g("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$8(getPrototypeOf$8(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$f(IteratorPrototype$1)||fails$n((function(){var e={};return IteratorPrototype$1[ITERATOR$9].call(e)!==e}));isCallable$c((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$c(IteratorPrototype$1))[ITERATOR$9])||defineBuiltIn$5(IteratorPrototype$1,ITERATOR$9,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype=iteratorsCore.IteratorPrototype,create$b=objectCreate,createPropertyDescriptor$3=createPropertyDescriptor$8,setToStringTag$5=setToStringTag$9,Iterators$6=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var i=t+" Iterator";return e.prototype=create$b(IteratorPrototype,{next:createPropertyDescriptor$3(+!n,r)}),setToStringTag$5(e,i,!1,!0),Iterators$6[i]=returnThis$1,e},uncurryThis$o=functionUncurryThis,aCallable$i=aCallable$l,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$o(aCallable$i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$b=isCallable$r,$String=String,$TypeError$f=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$b(e))return e;throw $TypeError$f("Can't set "+$String(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$d=anObject$i,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$d(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1G=_export,call$q=functionCall,FunctionName=functionName,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$7=objectGetPrototypeOf,setToStringTag$4=setToStringTag$9,defineBuiltIn$4=defineBuiltIn$8,wellKnownSymbol$f=wellKnownSymbol$r,Iterators$5=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER;FunctionName.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$8=wellKnownSymbol$f("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,i,o,a){createIteratorConstructor$1(r,t,n);var s,l,c,u=function(e){if(e===i&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",f=!1,d=e.prototype,h=d[ITERATOR$8]||d["@@iterator"]||i&&d[i],y=!BUGGY_SAFARI_ITERATORS&&h||u(i),g="Array"==t&&d.entries||h;if(g&&(s=getPrototypeOf$7(g.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$4(s,p,!0,!0),Iterators$5[p]=returnThis),PROPER_FUNCTION_NAME$1&&i==VALUES&&h&&h.name!==VALUES&&(f=!0,y=function(){return call$q(h,this)}),i)if(l={values:u(VALUES),keys:o?y:u(KEYS),entries:u(ENTRIES)},a)for(c in l)(BUGGY_SAFARI_ITERATORS||f||!(c in d))&&defineBuiltIn$4(d,c,l[c]);else $$1G({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||f},l);return a&&d[ITERATOR$8]!==y&&defineBuiltIn$4(d,ITERATOR$8,y,{name:i}),Iterators$5[t]=y,l},createIterResultObject$3=function(e,t){return{value:e,done:t}},toIndexedObject$4=toIndexedObject$b,Iterators$4=iterators,InternalStateModule$7=internalState;objectDefineProperty.f;var defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$3,ARRAY_ITERATOR="Array Iterator",setInternalState$7=InternalStateModule$7.set,getInternalState$1=InternalStateModule$7.getterFor(ARRAY_ITERATOR);defineIterator$2(Array,"Array",(function(e,t){setInternalState$7(this,{type:ARRAY_ITERATOR,target:toIndexedObject$4(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$2(void 0,!0)):createIterResultObject$2("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$4.Arguments=Iterators$4.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$4=domIterables,global$f=global$s,classof$a=classof$g,createNonEnumerableProperty$4=createNonEnumerableProperty$9,Iterators$3=iterators,wellKnownSymbol$e=wellKnownSymbol$r,TO_STRING_TAG$1=wellKnownSymbol$e("toStringTag");for(var COLLECTION_NAME in DOMIterables$4){var Collection=global$f[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$a(CollectionPrototype)!==TO_STRING_TAG$1&&createNonEnumerableProperty$4(CollectionPrototype,TO_STRING_TAG$1,COLLECTION_NAME),Iterators$3[COLLECTION_NAME]=Iterators$3.Array}var parent$2s=symbol$5,symbol$4=parent$2s,defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var parent$2r=symbol$4,symbol$3=parent$2r,defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("asyncDispose");var $$1F=_export,getBuiltIn$c=getBuiltIn$k,uncurryThis$n=functionUncurryThis,Symbol$4=getBuiltIn$c("Symbol"),keyFor2=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$n(Symbol$4.prototype.valueOf);$$1F({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}}});for(var $$1E=_export,shared=sharedExports,getBuiltIn$b=getBuiltIn$k,uncurryThis$m=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$d=wellKnownSymbol$r,Symbol$3=getBuiltIn$b("Symbol"),$isWellKnown=Symbol$3.isWellKnown,getOwnPropertyNames$7=getBuiltIn$b("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$m(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks"),i=0,symbolKeys=getOwnPropertyNames$7(Symbol$3),symbolKeysLength=symbolKeys.length;i<symbolKeysLength;i++)try{var symbolKey=symbolKeys[i];isSymbol(Symbol$3[symbolKey])&&wellKnownSymbol$d(symbolKey)}catch(e){}$$1E({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames$7(WellKnownSymbolsStore),i=n.length;r<i;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("matcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("metadataKey");var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("observable");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadata");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$2q=symbol$3,symbol$2=parent$2q,symbol$1=symbol$2,_Symbol$1=getDefaultExportFromCjs(symbol$1),uncurryThis$l=functionUncurryThis,toIntegerOrInfinity$4=toIntegerOrInfinity$7,toString$c=toString$g,requireObjectCoercible$5=requireObjectCoercible$8,charAt$4=uncurryThis$l("".charAt),charCodeAt$1=uncurryThis$l("".charCodeAt),stringSlice$4=uncurryThis$l("".slice),createMethod$3=function(e){return function(t,r){var n,i,o=toString$c(requireObjectCoercible$5(t)),a=toIntegerOrInfinity$4(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$1(o,a))<55296||n>56319||a+1===s||(i=charCodeAt$1(o,a+1))<56320||i>57343?e?charAt$4(o,a):n:e?stringSlice$4(o,a,a+2):i-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$3=stringMultibyte.charAt,toString$b=toString$g,InternalStateModule$6=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$6=InternalStateModule$6.set,getInternalState=InternalStateModule$6.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",(function(e){setInternalState$6(this,{type:STRING_ITERATOR,string:toString$b(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$1(void 0,!0):(e=charAt$3(r,n),t.index+=e.length,createIterResultObject$1(e,!1))}));var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$2p=iterator$5,iterator$4=parent$2p,parent$2o=iterator$4,iterator$3=parent$2o,parent$2n=iterator$3,iterator$2=parent$2n,iterator$1=iterator$2,_Symbol$iterator$1=getDefaultExportFromCjs(iterator$1);function _typeof$1(e){return(_typeof$1="function"==typeof _Symbol$1&&"symbol"==typeof _Symbol$iterator$1?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol$1&&e.constructor===_Symbol$1&&e!==_Symbol$1.prototype?"symbol":typeof e})(e)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$5=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$2m=toPrimitive$5,toPrimitive$4=parent$2m,parent$2l=toPrimitive$4,toPrimitive$3=parent$2l,parent$2k=toPrimitive$3,toPrimitive$2=parent$2k,toPrimitive$1=toPrimitive$2,_Symbol$toPrimitive$1=getDefaultExportFromCjs(toPrimitive$1);function _toPrimitive$1(e,t){if("object"!==_typeof$1(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$1(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$1(t)?t:String(t)}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$1(e,_toPropertyKey$1(n.key),n)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),_Object$defineProperty$1(e,"prototype",{writable:!1}),e}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var $$1D=_export,DESCRIPTORS$b=descriptors,create$a=objectCreate;$$1D({target:"Object",stat:!0,sham:!DESCRIPTORS$b},{create:create$a});var path$q=path$w,Object$4=path$q.Object,create$9=function(e,t){return Object$4.create(e,t)},parent$2j=create$9,create$8=parent$2j,parent$2i=create$8,create$7=parent$2i,parent$2h=create$7,create$6=parent$2h,create$5=create$6,_Object$create$1=getDefaultExportFromCjs(create$5),$$1C=_export,setPrototypeOf$7=objectSetPrototypeOf;$$1C({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$7});var path$p=path$w,setPrototypeOf$6=path$p.Object.setPrototypeOf,parent$2g=setPrototypeOf$6,setPrototypeOf$5=parent$2g,parent$2f=setPrototypeOf$5,setPrototypeOf$4=parent$2f,parent$2e=setPrototypeOf$4,setPrototypeOf$3=parent$2e,setPrototypeOf$2=setPrototypeOf$3,_Object$setPrototypeOf$1=getDefaultExportFromCjs(setPrototypeOf$2),uncurryThis$k=functionUncurryThis,aCallable$h=aCallable$l,isObject$e=isObject$n,hasOwn$c=hasOwnProperty_1,arraySlice$5=arraySlice$7,NATIVE_BIND=functionBindNative,$Function=Function,concat$9=uncurryThis$k([].concat),join$3=uncurryThis$k([].join),factories={},construct$5=function(e,t,r){if(!hasOwn$c(factories,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";factories[t]=$Function("C,a","return new C("+join$3(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$h(this),r=t.prototype,n=arraySlice$5(arguments,1),i=function(){var r=concat$9(n,arraySlice$5(arguments));return this instanceof i?construct$5(t,r.length,r):t.apply(e,r)};return isObject$e(r)&&(i.prototype=r),i},$$1B=_export,bind$t=functionBind;$$1B({target:"Function",proto:!0,forced:Function.bind!==bind$t},{bind:bind$t});var path$o=path$w,entryVirtual$n=function(e){return path$o[e+"Prototype"]},entryVirtual$m=entryVirtual$n,bind$s=entryVirtual$m("Function").bind,isPrototypeOf$q=objectIsPrototypeOf,method$k=bind$s,FunctionPrototype=Function.prototype,bind$r=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$q(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$k:t},parent$2d=bind$r,bind$q=parent$2d,parent$2c=bind$q,bind$p=parent$2c,parent$2b=bind$p,bind$o=parent$2b,bind$n=bind$o,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$n);function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf$1?_bindInstanceProperty$1(r=_Object$setPrototypeOf$1).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$1(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty$1(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}var isConstructor$2=isConstructor$4,tryToString$6=tryToString$9,$TypeError$e=TypeError,aConstructor$3=function(e){if(isConstructor$2(e))return e;throw $TypeError$e(tryToString$6(e)+" is not a constructor")},$$1A=_export,getBuiltIn$a=getBuiltIn$k,apply$4=functionApply,bind$m=functionBind,aConstructor$2=aConstructor$3,anObject$c=anObject$i,isObject$d=isObject$n,create$4=objectCreate,fails$m=fails$C,nativeConstruct=getBuiltIn$a("Reflect","construct"),ObjectPrototype=Object.prototype,push$8=[].push,NEW_TARGET_BUG=fails$m((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$m((function(){nativeConstruct((function(){}))})),FORCED$7=NEW_TARGET_BUG||ARGS_BUG;$$1A({target:"Reflect",stat:!0,forced:FORCED$7,sham:FORCED$7},{construct:function(e,t){aConstructor$2(e),anObject$c(t);var r=arguments.length<3?e:aConstructor$2(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return apply$4(push$8,n,t),new(apply$4(bind$m,e,n))}var i=r.prototype,o=create$4(isObject$d(i)?i:ObjectPrototype),a=apply$4(e,o,t);return isObject$d(a)?a:o}});var path$n=path$w,construct$4=path$n.Reflect.construct,parent$2a=construct$4,construct$3=parent$2a,parent$29=construct$3,construct$2=parent$29,parent$28=construct$2,construct$1=parent$28,construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),$$1z=_export,fails$l=fails$C,toObject$6=toObject$c,nativeGetPrototypeOf=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,FAILS_ON_PRIMITIVES$4=fails$l((function(){nativeGetPrototypeOf(1)}));$$1z({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$4,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$6(e))}});var path$m=path$w,getPrototypeOf$6=path$m.Object.getPrototypeOf,parent$27=getPrototypeOf$6,getPrototypeOf$5=parent$27,parent$26=getPrototypeOf$5,getPrototypeOf$4=parent$26,parent$25=getPrototypeOf$4,getPrototypeOf$3=parent$25,getPrototypeOf$2=getPrototypeOf$3,_Object$getPrototypeOf$1=getDefaultExportFromCjs(getPrototypeOf$2);function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf$1?_bindInstanceProperty$1(t=_Object$getPrototypeOf$1).call(t):function(e){return e.__proto__||_Object$getPrototypeOf$1(e)})(e)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=_Reflect$construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _defineProperty$1(e,t,r){return(t=_toPropertyKey$1(t))in e?_Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fails$k=fails$C,arrayMethodIsStrict$7=function(e,t){var r=[][e];return!!r&&fails$k((function(){r.call(null,t||function(){return 1},1)}))},$forEach=arrayIteration.forEach,arrayMethodIsStrict$6=arrayMethodIsStrict$7,STRICT_METHOD$4=arrayMethodIsStrict$6("forEach"),arrayForEach=STRICT_METHOD$4?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)},$$1y=_export,forEach$8=arrayForEach;$$1y({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});var entryVirtual$l=entryVirtual$n,forEach$7=entryVirtual$l("Array").forEach,parent$24=forEach$7,forEach$6=parent$24,classof$9=classof$g,hasOwn$b=hasOwnProperty_1,isPrototypeOf$p=objectIsPrototypeOf,method$j=forEach$6,ArrayPrototype$i=Array.prototype,DOMIterables$3={DOMTokenList:!0,NodeList:!0},forEach$5=function(e){var t=e.forEach;return e===ArrayPrototype$i||isPrototypeOf$p(ArrayPrototype$i,e)&&t===ArrayPrototype$i.forEach||hasOwn$b(DOMIterables$3,classof$9(e))?method$j:t},parent$23=forEach$5,forEach$4=parent$23,parent$22=forEach$4,forEach$3=parent$22,forEach$2=forEach$3,forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),tryToString$5=tryToString$9,$TypeError$d=TypeError,deletePropertyOrThrow$2=function(e,t){if(!delete e[t])throw $TypeError$d("Cannot delete property "+tryToString$5(t)+" of "+tryToString$5(e))},arraySlice$4=arraySliceSimple,floor$2=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$2(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$4(e,0,n),t),mergeSort(arraySlice$4(e,n),t),t)},insertionSort=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},arraySort$1=mergeSort,userAgent$5=engineUserAgent,firefox=userAgent$5.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$4=engineUserAgent,webkit=userAgent$4.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$1x=_export,uncurryThis$j=functionUncurryThis,aCallable$g=aCallable$l,toObject$5=toObject$c,lengthOfArrayLike$6=lengthOfArrayLike$b,deletePropertyOrThrow$1=deletePropertyOrThrow$2,toString$a=toString$g,fails$j=fails$C,internalSort=arraySort$1,arrayMethodIsStrict$5=arrayMethodIsStrict$7,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],nativeSort=uncurryThis$j(test.sort),push$7=uncurryThis$j(test.push),FAILS_ON_UNDEFINED=fails$j((function(){test.sort(void 0)})),FAILS_ON_NULL=fails$j((function(){test.sort(null)})),STRICT_METHOD$3=arrayMethodIsStrict$5("sort"),STABLE_SORT=!fails$j((function(){if(V8)return V8<70;if(!(FF&&FF>3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var e,t,r,n,i="";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),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}})),FORCED$6=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$3||!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$a(t)>toString$a(r)?1:-1}};$$1x({target:"Array",proto:!0,forced:FORCED$6},{sort:function(e){void 0!==e&&aCallable$g(e);var t=toObject$5(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);var r,n,i=[],o=lengthOfArrayLike$6(t);for(n=0;n<o;n++)n in t&&push$7(i,t[n]);for(internalSort(i,getSortCompare(e)),r=lengthOfArrayLike$6(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)deletePropertyOrThrow$1(t,n++);return t}});var entryVirtual$k=entryVirtual$n,sort$6=entryVirtual$k("Array").sort,isPrototypeOf$o=objectIsPrototypeOf,method$i=sort$6,ArrayPrototype$h=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$h||isPrototypeOf$o(ArrayPrototype$h,e)&&t===ArrayPrototype$h.sort?method$i:t},parent$21=sort$5,sort$4=parent$21,parent$20=sort$4,sort$3=parent$20,parent$1$=sort$3,sort$2=parent$1$,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),$$1w=_export,uncurryThis$i=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$4=arrayMethodIsStrict$7,nativeIndexOf=uncurryThis$i([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$5=NEGATIVE_ZERO$1||!arrayMethodIsStrict$4("indexOf");$$1w({target:"Array",proto:!0,forced:FORCED$5},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var entryVirtual$j=entryVirtual$n,indexOf$6=entryVirtual$j("Array").indexOf,isPrototypeOf$n=objectIsPrototypeOf,method$h=indexOf$6,ArrayPrototype$g=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$g||isPrototypeOf$n(ArrayPrototype$g,e)&&t===ArrayPrototype$g.indexOf?method$h:t},parent$1_=indexOf$5,indexOf$4=parent$1_,parent$1Z=indexOf$4,indexOf$3=parent$1Z,parent$1Y=indexOf$3,indexOf$2=parent$1Y,indexOf$1=indexOf$2,indexOf2=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf2),$$1v=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES$1=!1})),$$1v({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$i=entryVirtual$n,find$8=entryVirtual$i("Array").find,isPrototypeOf$m=objectIsPrototypeOf,method$g=find$8,ArrayPrototype$f=Array.prototype,find$7=function(e){var t=e.find;return e===ArrayPrototype$f||isPrototypeOf$m(ArrayPrototype$f,e)&&t===ArrayPrototype$f.find?method$g:t},parent$1X=find$7,find$6=parent$1X,parent$1W=find$6,find$5=parent$1W,parent$1V=find$5,find$4=parent$1V,find$3=find$4,find$2=find$3,_findInstanceProperty=getDefaultExportFromCjs(find$2),entryVirtual$h=entryVirtual$n,concat$8=entryVirtual$h("Array").concat,isPrototypeOf$l=objectIsPrototypeOf,method$f=concat$8,ArrayPrototype$e=Array.prototype,concat$7=function(e){var t=e.concat;return e===ArrayPrototype$e||isPrototypeOf$l(ArrayPrototype$e,e)&&t===ArrayPrototype$e.concat?method$f:t},parent$1U=concat$7,concat$6=parent$1U,parent$1T=concat$6,concat$5=parent$1T,parent$1S=concat$5,concat$4=parent$1S,concat$3=concat$4,concat$2=concat$3,_concatInstanceProperty=getDefaultExportFromCjs(concat$2),$$1u=_export,toObject$4=toObject$c,nativeKeys=objectKeys$3,fails$i=fails$C,FAILS_ON_PRIMITIVES$3=fails$i((function(){nativeKeys(1)}));$$1u({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$3},{keys:function(e){return nativeKeys(toObject$4(e))}});var path$l=path$w,keys$c=path$l.Object.keys,parent$1R=keys$c,keys$b=parent$1R,parent$1Q=keys$b,keys$a=parent$1Q,parent$1P=keys$a,keys$9=parent$1P,keys$8=keys$9,keys$7=keys$8,_Object$keys=getDefaultExportFromCjs(keys$7),$$1t=_export,isArray$9=isArray$d,isConstructor$1=isConstructor$4,isObject$c=isObject$n,toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$5=lengthOfArrayLike$b,toIndexedObject$3=toIndexedObject$b,createProperty$3=createProperty$6,wellKnownSymbol$c=wellKnownSymbol$r,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,nativeSlice=arraySlice$7,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("slice"),SPECIES$3=wellKnownSymbol$c("species"),$Array$1=Array,max$2=Math.max;$$1t({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{slice:function(e,t){var r,n,i,o=toIndexedObject$3(this),a=lengthOfArrayLike$5(o),s=toAbsoluteIndex$1(e,a),l=toAbsoluteIndex$1(void 0===t?a:t,a);if(isArray$9(o)&&(r=o.constructor,(isConstructor$1(r)&&(r===$Array$1||isArray$9(r.prototype))||isObject$c(r)&&null===(r=r[SPECIES$3]))&&(r=void 0),r===$Array$1||void 0===r))return nativeSlice(o,s,l);for(n=new(void 0===r?$Array$1:r)(max$2(l-s,0)),i=0;s<l;s++,i++)s in o&&createProperty$3(n,i,o[s]);return n.length=i,n}});var entryVirtual$g=entryVirtual$n,slice$6=entryVirtual$g("Array").slice,isPrototypeOf$k=objectIsPrototypeOf,method$e=slice$6,ArrayPrototype$d=Array.prototype,slice$5=function(e){var t=e.slice;return e===ArrayPrototype$d||isPrototypeOf$k(ArrayPrototype$d,e)&&t===ArrayPrototype$d.slice?method$e:t},parent$1O=slice$5,slice$4=parent$1O,parent$1N=slice$4,slice$3=parent$1N,parent$1M=slice$3,slice$2=parent$1M,slice$1=slice$2,slice2=slice$1,_sliceInstanceProperty=getDefaultExportFromCjs(slice2),DESCRIPTORS$a=descriptors,isArray$8=isArray$d,$TypeError$c=TypeError,getOwnPropertyDescriptor$9=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$a&&!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$8(e)&&!getOwnPropertyDescriptor$9(e,"length").writable)throw $TypeError$c("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},$$1s=_export,toObject$3=toObject$c,toAbsoluteIndex=toAbsoluteIndex$4,toIntegerOrInfinity$3=toIntegerOrInfinity$7,lengthOfArrayLike$4=lengthOfArrayLike$b,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$2,arraySpeciesCreate=arraySpeciesCreate$3,createProperty$2=createProperty$6,deletePropertyOrThrow=deletePropertyOrThrow$2,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("splice"),max$1=Math.max,min$2=Math.min;$$1s({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{splice:function(e,t){var r,n,i,o,a,s,l=toObject$3(this),c=lengthOfArrayLike$4(l),u=toAbsoluteIndex(e,c),p=arguments.length;for(0===p?r=n=0:1===p?(r=0,n=c-u):(r=p-2,n=min$2(max$1(toIntegerOrInfinity$3(t),0),c-u)),doesNotExceedSafeInteger(c+r-n),i=arraySpeciesCreate(l,n),o=0;o<n;o++)(a=u+o)in l&&createProperty$2(i,o,l[a]);if(i.length=n,r<n){for(o=u;o<c-n;o++)s=o+r,(a=o+n)in l?l[s]=l[a]:deletePropertyOrThrow(l,s);for(o=c;o>c-n+r;o--)deletePropertyOrThrow(l,o-1)}else if(r>n)for(o=c-n;o>u;o--)s=o+r-1,(a=o+n-1)in l?l[s]=l[a]:deletePropertyOrThrow(l,s);for(o=0;o<r;o++)l[o+u]=arguments[o+2];return setArrayLength(l,c-n+r),i}});var entryVirtual$f=entryVirtual$n,splice$8=entryVirtual$f("Array").splice,isPrototypeOf$j=objectIsPrototypeOf,method$d=splice$8,ArrayPrototype$c=Array.prototype,splice$7=function(e){var t=e.splice;return e===ArrayPrototype$c||isPrototypeOf$j(ArrayPrototype$c,e)&&t===ArrayPrototype$c.splice?method$d:t},parent$1L=splice$7,splice$6=parent$1L,parent$1K=splice$6,splice$5=parent$1K,parent$1J=splice$5,splice$4=parent$1J,splice$3=splice$4,splice$2=splice$3,_spliceInstanceProperty=getDefaultExportFromCjs(splice$2),getBuiltIn$9=getBuiltIn$k,uncurryThis$h=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$b=anObject$i,concat$1=uncurryThis$h([].concat),ownKeys$3=getBuiltIn$9("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$1.f(anObject$b(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$a=hasOwnProperty_1,ownKeys$2=ownKeys$3,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys$2(t),i=definePropertyModule.f,o=getOwnPropertyDescriptorModule$1.f,a=0;a<n.length;a++){var s=n[a];hasOwn$a(e,s)||r&&hasOwn$a(r,s)||i(e,s,o(t,s))}},isObject$b=isObject$n,createNonEnumerableProperty$3=createNonEnumerableProperty$9,installErrorCause$1=function(e,t){isObject$b(t)&&"cause"in t&&createNonEnumerableProperty$3(e,"cause",t.cause)},uncurryThis$g=functionUncurryThis,$Error$1=Error,replace$4=uncurryThis$g("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$4(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$h=fails$C,createPropertyDescriptor$2=createPropertyDescriptor$8,errorStackInstallable=!fails$h((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$2(1,7)),7!==e.stack)})),createNonEnumerableProperty$2=createNonEnumerableProperty$9,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$2(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$b=wellKnownSymbol$r,Iterators$2=iterators,ITERATOR$7=wellKnownSymbol$b("iterator"),ArrayPrototype$b=Array.prototype,isArrayIteratorMethod$2=function(e){return void 0!==e&&(Iterators$2.Array===e||ArrayPrototype$b[ITERATOR$7]===e)},classof$8=classof$g,getMethod$1=getMethod$3,isNullOrUndefined$5=isNullOrUndefined$8,Iterators$1=iterators,wellKnownSymbol$a=wellKnownSymbol$r,ITERATOR$6=wellKnownSymbol$a("iterator"),getIteratorMethod$a=function(e){if(!isNullOrUndefined$5(e))return getMethod$1(e,ITERATOR$6)||getMethod$1(e,"@@iterator")||Iterators$1[classof$8(e)]},call$p=functionCall,aCallable$f=aCallable$l,anObject$a=anObject$i,tryToString$4=tryToString$9,getIteratorMethod$9=getIteratorMethod$a,$TypeError$b=TypeError,getIterator$3=function(e,t){var r=arguments.length<2?getIteratorMethod$9(e):t;if(aCallable$f(r))return anObject$a(call$p(r,e));throw $TypeError$b(tryToString$4(e)+" is not iterable")},call$o=functionCall,anObject$9=anObject$i,getMethod=getMethod$3,iteratorClose$4=function(e,t,r){var n,i;anObject$9(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$o(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return anObject$9(n),r},bind$l=functionBindContext,call$n=functionCall,anObject$8=anObject$i,tryToString$3=tryToString$9,isArrayIteratorMethod$1=isArrayIteratorMethod$2,lengthOfArrayLike$3=lengthOfArrayLike$b,isPrototypeOf$i=objectIsPrototypeOf,getIterator$2=getIterator$3,getIteratorMethod$8=getIteratorMethod$a,iteratorClose$3=iteratorClose$4,$TypeError$a=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$v=function(e,t,r){var n,i,o,a,s,l,c,u=r&&r.that,p=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),y=bind$l(t,u),g=function(e){return n&&iteratorClose$3(n,"normal",e),new Result(!0,e)},$=function(e){return p?(anObject$8(e),h?y(e[0],e[1],g):y(e[0],e[1])):h?y(e,g):y(e)};if(f)n=e.iterator;else if(d)n=e;else{if(!(i=getIteratorMethod$8(e)))throw $TypeError$a(tryToString$3(e)+" is not iterable");if(isArrayIteratorMethod$1(i)){for(o=0,a=lengthOfArrayLike$3(e);a>o;o++)if((s=$(e[o]))&&isPrototypeOf$i(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$2(e,i)}for(l=f?e.next:n.next;!(c=call$n(l,n)).done;){try{s=$(c.value)}catch(e){iteratorClose$3(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$i(ResultPrototype,s))return s}return new Result(!1)},toString$9=toString$g,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$9(e)},$$1r=_export,isPrototypeOf$h=objectIsPrototypeOf,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$3=objectCreate,createNonEnumerableProperty$1=createNonEnumerableProperty$9,createPropertyDescriptor$1=createPropertyDescriptor$8,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$u=iterate$v,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$9=wellKnownSymbol$r,TO_STRING_TAG=wellKnownSymbol$9("toStringTag"),$Error=Error,push$6=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$h(AggregateErrorPrototype,this);setPrototypeOf$1?r=setPrototypeOf$1($Error(),n?getPrototypeOf$1(this):AggregateErrorPrototype):(r=n?this:create$3(AggregateErrorPrototype),createNonEnumerableProperty$1(r,TO_STRING_TAG,"Error")),void 0!==t&&createNonEnumerableProperty$1(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var i=[];return iterate$u(e,push$6,{that:i}),createNonEnumerableProperty$1(r,"errors",i),r};setPrototypeOf$1?setPrototypeOf$1($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$3($Error.prototype,{constructor:createPropertyDescriptor$1(1,$AggregateError),message:createPropertyDescriptor$1(1,""),name:createPropertyDescriptor$1(1,"AggregateError")});$$1r({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,classof$7=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$7(process),getBuiltIn$8=getBuiltIn$k,defineBuiltInAccessor$3=defineBuiltInAccessor$5,wellKnownSymbol$8=wellKnownSymbol$r,DESCRIPTORS$9=descriptors,SPECIES$2=wellKnownSymbol$8("species"),setSpecies$2=function(e){var t=getBuiltIn$8(e);DESCRIPTORS$9&&t&&!t[SPECIES$2]&&defineBuiltInAccessor$3(t,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$g=objectIsPrototypeOf,$TypeError$9=TypeError,anInstance$6=function(e,t){if(isPrototypeOf$g(t,e))return e;throw $TypeError$9("Incorrect invocation")},anObject$7=anObject$i,aConstructor$1=aConstructor$3,isNullOrUndefined$4=isNullOrUndefined$8,wellKnownSymbol$7=wellKnownSymbol$r,SPECIES$1=wellKnownSymbol$7("species"),speciesConstructor$2=function(e,t){var r,n=anObject$7(e).constructor;return void 0===n||isNullOrUndefined$4(r=anObject$7(n)[SPECIES$1])?t:aConstructor$1(r)},$TypeError$8=TypeError,validateArgumentsLength$5=function(e,t){if(e<t)throw $TypeError$8("Not enough arguments");return e},userAgent$3=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$3),global$e=global$s,apply$3=functionApply,bind$k=functionBindContext,isCallable$a=isCallable$r,hasOwn$9=hasOwnProperty_1,fails$g=fails$C,html=html$2,arraySlice$3=arraySlice$7,createElement=documentCreateElement$1,validateArgumentsLength$4=validateArgumentsLength$5,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set$d=global$e.setImmediate,clear=global$e.clearImmediate,process$3=global$e.process,Dispatch=global$e.Dispatch,Function$2=global$e.Function,MessageChannel=global$e.MessageChannel,String$1=global$e.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$g((function(){$location=global$e.location}));var run=function(e){if(hasOwn$9(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$e.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$d&&clear||(set$d=function(e){validateArgumentsLength$4(arguments.length,1);var t=isCallable$a(e)?e:Function$2(e),r=arraySlice$3(arguments,1);return queue$2[++counter]=function(){apply$3(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$k(port.postMessage,port)):global$e.addEventListener&&isCallable$a(global$e.postMessage)&&!global$e.importScripts&&$location&&"file:"!==$location.protocol&&!fails$g(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$e.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$d,clear:clear},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$2=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$2)&&"undefined"!=typeof Pebble,userAgent$1=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$1),global$d=global$s,bind$j=functionBindContext,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$d.MutationObserver||global$d.WebKitMutationObserver,document$2=global$d.document,process$2=global$d.process,Promise$1=global$d.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$8(global$d,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise$6=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$j(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$3?notify$1=function(){process$2.nextTick(flush)}:(macrotask=bind$j(macrotask,global$d),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$c=global$s,promiseNativeConstructor=global$c.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$2&&"object"==typeof window&&"object"==typeof document,global$b=global$s,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$9=isCallable$r,isForced=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$6=wellKnownSymbol$r,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES=wellKnownSymbol$6("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$9(global$b.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",(function(){var e=inspectSource(NativePromiseConstructor$5),t=e!==String(NativePromiseConstructor$5);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$2.catch||!NativePromisePrototype$2.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$5((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES]=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$e=aCallable$l,$TypeError$7=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$7("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$e(t),this.reject=aCallable$e(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$1q=_export,IS_NODE$1=engineIsNode,global$a=global$s,call$m=functionCall,defineBuiltIn$3=defineBuiltIn$8,setToStringTag$3=setToStringTag$9,setSpecies$1=setSpecies$2,aCallable$d=aCallable$l,isCallable$8=isCallable$r,isObject$a=isObject$n,anInstance$5=anInstance$6,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$5=internalState,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$6=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$5.getterFor(PROMISE),setInternalState$5=InternalStateModule$5.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$3=global$a.TypeError,document$1=global$a.document,process$1=global$a.process,newPromiseCapability$1=newPromiseCapabilityModule$6.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$a.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$a(e)||!isCallable$8(t=e.then))&&t},callReaction=function(e,t){var r,n,i,o=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=o:(u&&u.enter(),r=s(o),u&&(u.exit(),i=!0)),r===e.promise?c(TypeError$3("Promise-chain cycle")):(n=isThenable(r))?call$m(n,r,l,c):l(r)):c(o)}catch(e){u&&!i&&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,i;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$a.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(i=global$a["on"+e])?i(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$m(task,global$a,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process$1.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$m(task,global$a,(function(){var t=e.facade;IS_NODE$1?process$1.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$3("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$m(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)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$5(this,PromisePrototype),aCallable$d(e),call$m(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$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$3(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$8(e)||e,n.fail=isCallable$8(t)&&t,n.domain=IS_NODE$1?process$1.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$i(internalResolve,t),this.reject=bind$i(internalReject,t)},newPromiseCapabilityModule$6.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$1q({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$3(PromiseConstructor,PROMISE,!1,!0),setSpecies$1(PROMISE);var wellKnownSymbol$5=wellKnownSymbol$r,ITERATOR$5=wellKnownSymbol$5("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$5]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$2=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$5]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$2,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1((function(e){NativePromiseConstructor$3.all(e).then(void 0,(function(){}))})),$$1p=_export,call$l=functionCall,aCallable$c=aCallable$l,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$4=perform$6,iterate$t=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$1p({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.resolve,i=r.reject,o=perform$4((function(){var r=aCallable$c(t.resolve),o=[],a=0,s=1;iterate$t(e,(function(e){var l=a++,c=!1;s++,call$l(r,t,e).then((function(e){c||(c=!0,o[l]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var $$1o=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$1o({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$1n=_export,call$k=functionCall,aCallable$b=aCallable$l,newPromiseCapabilityModule$4=newPromiseCapability$2,perform$3=perform$6,iterate$s=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$1n({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$4.f(t),n=r.reject,i=perform$3((function(){var i=aCallable$b(t.resolve);iterate$s(e,(function(e){call$k(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var $$1m=_export,call$j=functionCall,newPromiseCapabilityModule$3=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$1m({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$3.f(this);return call$j(t.reject,void 0,e),t.promise}});var anObject$6=anObject$i,isObject$9=isObject$n,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(e,t){if(anObject$6(e),isObject$9(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$1l=_export,getBuiltIn$7=getBuiltIn$k,IS_PURE$1=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$7("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$1l({target:"Promise",stat:!0,forced:IS_PURE$1},{resolve:function(e){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,e)}});var $$1k=_export,call$i=functionCall,aCallable$a=aCallable$l,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$2=perform$6,iterate$r=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$1k({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,i=r.reject,o=perform$2((function(){var r=aCallable$a(t.resolve),i=[],o=0,a=1;iterate$r(e,(function(e){var s=o++,l=!1;a++,call$i(r,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var $$1j=_export,call$h=functionCall,aCallable$9=aCallable$l,getBuiltIn$6=getBuiltIn$k,newPromiseCapabilityModule$1=newPromiseCapability$2,perform$1=perform$6,iterate$q=iterate$v,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$1j({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$6("AggregateError"),n=newPromiseCapabilityModule$1.f(t),i=n.resolve,o=n.reject,a=perform$1((function(){var n=aCallable$9(t.resolve),a=[],s=0,l=1,c=!1;iterate$q(e,(function(e){var u=s++,p=!1;l++,call$h(n,t,e).then((function(e){p||c||(c=!0,i(e))}),(function(e){p||c||(p=!0,a[u]=e,--l||o(new r(a,PROMISE_ANY_ERROR)))}))})),--l||o(new r(a,PROMISE_ANY_ERROR))}));return a.error&&o(a.value),n.promise}});var $$1i=_export,NativePromiseConstructor=promiseNativeConstructor,fails$f=fails$C,getBuiltIn$5=getBuiltIn$k,isCallable$7=isCallable$r,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$f((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));$$1i({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn$5("Promise")),r=isCallable$7(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}});var path$k=path$w,promise$5=path$k.Promise,parent$1I=promise$5,promise$4=parent$1I,parent$1H=promise$4,promise$3=parent$1H,$$1h=_export,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$1h({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule.f(this),r=perform(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$1G=promise$3,promise$2=parent$1G,promise$1=promise$2,promise=promise$1,_Promise=getDefaultExportFromCjs(promise),whitespaces$4="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$f=functionUncurryThis,requireObjectCoercible$4=requireObjectCoercible$8,toString$8=toString$g,whitespaces$3=whitespaces$4,replace$3=uncurryThis$f("".replace),ltrim=RegExp("^["+whitespaces$3+"]+"),rtrim=RegExp("(^|[^"+whitespaces$3+"])["+whitespaces$3+"]+$"),createMethod$2=function(e){return function(t){var r=toString$8(requireObjectCoercible$4(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"$1")),r}},stringTrim={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},global$9=global$s,fails$e=fails$C,uncurryThis$e=functionUncurryThis,toString$7=toString$g,trim$8=stringTrim.trim,whitespaces$2=whitespaces$4,$parseInt$1=global$9.parseInt,Symbol$2=global$9.Symbol,ITERATOR$4=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$e(hex.exec),FORCED$4=8!==$parseInt$1(whitespaces$2+"08")||22!==$parseInt$1(whitespaces$2+"0x16")||ITERATOR$4&&!fails$e((function(){$parseInt$1(Object(ITERATOR$4))})),numberParseInt=FORCED$4?function(e,t){var r=trim$8(toString$7(e));return $parseInt$1(r,t>>>0||(exec$2(hex,r)?16:10))}:$parseInt$1,$$1g=_export,$parseInt=numberParseInt;$$1g({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var path$j=path$w,_parseInt$6=path$j.parseInt,parent$1F=_parseInt$6,_parseInt$5=parent$1F,parent$1E=_parseInt$5,_parseInt$4=parent$1E,parent$1D=_parseInt$4,_parseInt$3=parent$1D,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$1f=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("map");$$1f({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$e=entryVirtual$n,map$c=entryVirtual$e("Array").map,isPrototypeOf$f=objectIsPrototypeOf,method$c=map$c,ArrayPrototype$a=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$a||isPrototypeOf$f(ArrayPrototype$a,e)&&t===ArrayPrototype$a.map?method$c:t},parent$1C=map$b,map$a=parent$1C,parent$1B=map$a,map$9=parent$1B,parent$1A=map$9,map$8=parent$1A,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),$$1e=_export,isArray$7=isArray$d;$$1e({target:"Array",stat:!0},{isArray:isArray$7});var path$i=path$w,isArray$6=path$i.Array.isArray,parent$1z=isArray$6,isArray$5=parent$1z,parent$1y=isArray$5,isArray$4=parent$1y,parent$1x=isArray$4,isArray$3=parent$1x,isArray$2=isArray$3,isArray$1=isArray$2,_Array$isArray=getDefaultExportFromCjs(isArray$1),entryVirtual$d=entryVirtual$n,keys$6=entryVirtual$d("Array").keys,parent$1w=keys$6,keys$5=parent$1w,classof$6=classof$g,hasOwn$8=hasOwnProperty_1,isPrototypeOf$e=objectIsPrototypeOf,method$b=keys$5,ArrayPrototype$9=Array.prototype,DOMIterables$2={DOMTokenList:!0,NodeList:!0},keys$4=function(e){var t=e.keys;return e===ArrayPrototype$9||isPrototypeOf$e(ArrayPrototype$9,e)&&t===ArrayPrototype$9.keys||hasOwn$8(DOMIterables$2,classof$6(e))?method$b:t},parent$1v=keys$4,keys$3=parent$1v,parent$1u=keys$3,keys$2=parent$1u,keys$1=keys$2,keys3=keys$1,_keysInstanceProperty=getDefaultExportFromCjs(keys3),$$1d=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("filter");$$1d({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$c=entryVirtual$n,filter$6=entryVirtual$c("Array").filter,isPrototypeOf$d=objectIsPrototypeOf,method$a=filter$6,ArrayPrototype$8=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$8||isPrototypeOf$d(ArrayPrototype$8,e)&&t===ArrayPrototype$8.filter?method$a:t},parent$1t=filter$5,filter$4=parent$1t,parent$1s=filter$4,filter$3=parent$1s,parent$1r=filter$3,filter$2=parent$1r,filter$1=filter$2,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),path$h=path$w,getOwnPropertySymbols$5=path$h.Object.getOwnPropertySymbols,parent$1q=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1q,parent$1p=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1p,parent$1o=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1o,getOwnPropertySymbols$1=getOwnPropertySymbols$2,getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),getOwnPropertyDescriptor$7={exports:{}},$$1c=_export,fails$d=fails$C,toIndexedObject$2=toIndexedObject$b,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$8=descriptors,FORCED$3=!DESCRIPTORS$8||fails$d((function(){nativeGetOwnPropertyDescriptor(1)}));$$1c({target:"Object",stat:!0,forced:FORCED$3,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor(toIndexedObject$2(e),t)}});var path$g=path$w,Object$3=path$g.Object,getOwnPropertyDescriptor$6=getOwnPropertyDescriptor$7.exports=function(e,t){return Object$3.getOwnPropertyDescriptor(e,t)};Object$3.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$6.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$7.exports,parent$1n=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$5=parent$1n,parent$1m=getOwnPropertyDescriptor$5,getOwnPropertyDescriptor$4=parent$1m,parent$1l=getOwnPropertyDescriptor$4,getOwnPropertyDescriptor$3=parent$1l,getOwnPropertyDescriptor$2=getOwnPropertyDescriptor$3,getOwnPropertyDescriptor$1=getOwnPropertyDescriptor$2,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$1),$$1b=_export,DESCRIPTORS$7=descriptors,ownKeys$1=ownKeys$3,toIndexedObject$1=toIndexedObject$b,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,createProperty$1=createProperty$6;$$1b({target:"Object",stat:!0,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$1(e),i=getOwnPropertyDescriptorModule.f,o=ownKeys$1(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&createProperty$1(a,t,r);return a}});var path$f=path$w,getOwnPropertyDescriptors$5=path$f.Object.getOwnPropertyDescriptors,parent$1k=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1k,parent$1j=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1j,parent$1i=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1i,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$7={exports:{}},$$1a=_export,DESCRIPTORS$6=descriptors,defineProperties$6=objectDefineProperties.f;$$1a({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$6},{defineProperties:defineProperties$6});var path$e=path$w,Object$2=path$e.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$2.defineProperties(e,t)};Object$2.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1h=definePropertiesExports,defineProperties$4=parent$1h,parent$1g=defineProperties$4,defineProperties$3=parent$1g,parent$1f=defineProperties$3,defineProperties$2=parent$1f,defineProperties$1=defineProperties$2,defineProperties4=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties4),defineProperty$3=defineProperty$7,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator),create$2=create$5,_Object$create=getDefaultExportFromCjs(create$2),setPrototypeOf=setPrototypeOf$2,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf),bind$h=bind$n,_bindInstanceProperty=getDefaultExportFromCjs(bind$h),getPrototypeOf2=getPrototypeOf$2,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf2),getIteratorMethod$7=getIteratorMethod$a,getIteratorMethod_1=getIteratorMethod$7,parent$1e=getIteratorMethod_1,getIteratorMethod$6=parent$1e,parent$1d=getIteratorMethod$6,getIteratorMethod$5=parent$1d,parent$1c=getIteratorMethod$5,getIteratorMethod$4=parent$1c,getIteratorMethod$3=getIteratorMethod$4,getIteratorMethod$2=getIteratorMethod$3,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$2),anObject$5=anObject$i,iteratorClose$2=iteratorClose$4,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$5(r)[0],r[1]):t(r)}catch(t){iteratorClose$2(e,"throw",t)}},bind$g=functionBindContext,call$g=functionCall,toObject$2=toObject$c,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$2=lengthOfArrayLike$b,createProperty=createProperty$6,getIterator$1=getIterator$3,getIteratorMethod$1=getIteratorMethod$a,$Array=Array,arrayFrom$1=function(e){var t=toObject$2(e),r=isConstructor3(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=bind$g(i,n>2?arguments[2]:void 0));var a,s,l,c,u,p,f=getIteratorMethod$1(t),d=0;if(!f||this===$Array&&isArrayIteratorMethod(f))for(a=lengthOfArrayLike$2(t),s=r?new this(a):$Array(a);a>d;d++)p=o?i(t[d],d):t[d],createProperty(s,d,p);else for(u=(c=getIterator$1(t,f)).next,s=r?new this:[];!(l=call$g(u,c)).done;d++)p=o?callWithSafeIterationClosing(c,i,[l.value,d],!0):l.value,createProperty(s,d,p);return s.length=d,s},$$19=_export,from$9=arrayFrom$1,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$19({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$9});var path$d=path$w,from$8=path$d.Array.from,parent$1b=from$8,from$7=parent$1b,parent$1a=from$7,from$6=parent$1a,parent$19=from$6,from$5=parent$19,from$4=from$5,from$3=from$4,_Array$from=getDefaultExportFromCjs(from$3),toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function ownKeys2(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys2(Object(i),!0)).call(r,(function(t){_defineProperty(e,t,i[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(i)):_forEachInstanceProperty(n=ownKeys2(Object(i))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(i,t))}))}return e}function _typeof(e){return(_typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}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 _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 _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!==_typeof$1(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$1(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$1(t)?t:String(t)}var DESCRIPTORS$5=descriptors,uncurryThis$d=functionUncurryThis,call$f=functionCall,fails$c=fails$C,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$c,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$2=Object.defineProperty,concat2=uncurryThis$d([].concat),objectAssign=!$assign||fails$c((function(){if(DESCRIPTORS$5&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$1(e),n=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;n>i;)for(var s,l=IndexedObject$1(arguments[i++]),c=o?concat2(objectKeys(l),o(l)):objectKeys(l),u=c.length,p=0;u>p;)s=c[p++],DESCRIPTORS$5&&!call$f(a,l,s)||(r[s]=l[s]);return r}:$assign,$$18=_export,assign$7=objectAssign;$$18({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$c=path$w,assign$6=path$c.Object.assign,parent$18=assign$6,assign$5=parent$18,parent$17=assign$5,assign$4=parent$17,parent$16=assign$4,assign$3=parent$16,assign$2=assign$3,assign$1=assign$2,_Object$assign=getDefaultExportFromCjs(assign$1),$$17=_export,$some=arrayIteration.some,arrayMethodIsStrict$3=arrayMethodIsStrict$7,STRICT_METHOD$2=arrayMethodIsStrict$3("some");$$17({target:"Array",proto:!0,forced:!STRICT_METHOD$2},{some:function(e){return $some(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$b=entryVirtual$n,some$6=entryVirtual$b("Array").some,isPrototypeOf$c=objectIsPrototypeOf,method$9=some$6,ArrayPrototype$7=Array.prototype,some$5=function(e){var t=e.some;return e===ArrayPrototype$7||isPrototypeOf$c(ArrayPrototype$7,e)&&t===ArrayPrototype$7.some?method$9:t},parent$15=some$5,some$4=parent$15,parent$14=some$4,some$3=parent$14,parent$13=some$3,some$2=parent$13,some$1=some$2,some2=some$1,_someInstanceProperty=getDefaultExportFromCjs(some2),toIntegerOrInfinity$2=toIntegerOrInfinity$7,toString$6=toString$g,requireObjectCoercible$3=requireObjectCoercible$8,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$6(requireObjectCoercible$3(this)),r="",n=toIntegerOrInfinity$2(e);if(n<0||n==1/0)throw $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$c=functionUncurryThis,toLength$1=toLength$3,toString$5=toString$g,$repeat=stringRepeat,requireObjectCoercible$2=requireObjectCoercible$8,repeat2=uncurryThis$c($repeat),stringSlice$3=uncurryThis$c("".slice),ceil=Math.ceil,createMethod$1=function(e){return function(t,r,n){var i,o,a=toString$5(requireObjectCoercible$2(t)),s=toLength$1(r),l=a.length,c=void 0===n?" ":toString$5(n);return s<=l||""==c?a:((o=repeat2(c,ceil((i=s-l)/c.length))).length>i&&(o=stringSlice$3(o,0,i)),e?a+o:o+a)}},stringPad={start:createMethod$1(!1),end:createMethod$1(!0)},userAgent=engineUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent),$$16=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$16({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$n,padStart$6=entryVirtual$a("String").padStart,isPrototypeOf$b=objectIsPrototypeOf,method$8=padStart$6,StringPrototype$3=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$3||isPrototypeOf$b(StringPrototype$3,e)&&t===StringPrototype$3.padStart?method$8:t},parent$12=padStart$5,padStart$4=parent$12,parent$11=padStart$4,padStart$3=parent$11,parent$10=padStart$3,padStart$2=parent$10,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2),engineIsBun="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,global$8=global$s,apply$2=functionApply,isCallable$6=isCallable$r,ENGINE_IS_BUN=engineIsBun,USER_AGENT=engineUserAgent,arraySlice$2=arraySlice$7,validateArgumentsLength$3=validateArgumentsLength$5,Function$1=global$8.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var e=global$8.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,i){var o=validateArgumentsLength$3(arguments.length,1)>r,a=isCallable$6(n)?n:Function$1(n),s=o?arraySlice$2(arguments,r):[],l=o?function(){apply$2(a,this,s)}:a;return t?e(l,i):e(l)}:e},$$15=_export,global$7=global$s,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(global$7.setInterval,!0);$$15({global:!0,bind:!0,forced:global$7.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$14=_export,global$6=global$s,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(global$6.setTimeout,!0);$$14({global:!0,bind:!0,forced:global$6.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$b=path$w,setInterval$4=path$b.setInterval,parent$$=setInterval$4,setInterval$3=parent$$,parent$_=setInterval$3,setInterval$2=parent$_,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),path$a=path$w,setTimeout$5=path$a.setTimeout,parent$Z=setTimeout$5,setTimeout$4=parent$Z,parent$Y=setTimeout$4,setTimeout$3=parent$Y,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),$$13=_export,$every=arrayIteration.every,arrayMethodIsStrict$2=arrayMethodIsStrict$7,STRICT_METHOD$1=arrayMethodIsStrict$2("every");$$13({target:"Array",proto:!0,forced:!STRICT_METHOD$1},{every:function(e){return $every(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$9=entryVirtual$n,every$6=entryVirtual$9("Array").every,isPrototypeOf$a=objectIsPrototypeOf,method$7=every$6,ArrayPrototype$6=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$6||isPrototypeOf$a(ArrayPrototype$6,e)&&t===ArrayPrototype$6.every?method$7:t},parent$X=every$5,every$4=parent$X,parent$W=every$4,every$3=parent$W,parent$V=every$3,every$2=parent$V,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),global$5=global$s,fails$b=fails$C,uncurryThis$b=functionUncurryThis,toString$4=toString$g,trim$7=stringTrim.trim,whitespaces$1=whitespaces$4,charAt$2=uncurryThis$b("".charAt),$parseFloat$1=global$5.parseFloat,Symbol$1=global$5.Symbol,ITERATOR$3=Symbol$1&&Symbol$1.iterator,FORCED$2=1/$parseFloat$1(whitespaces$1+"-0")!=-1/0||ITERATOR$3&&!fails$b((function(){$parseFloat$1(Object(ITERATOR$3))})),numberParseFloat=FORCED$2?function(e){var t=trim$7(toString$4(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt$2(t,0)?-0:r}:$parseFloat$1,$$12=_export,$parseFloat=numberParseFloat;$$12({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var path$9=path$w,_parseFloat$6=path$9.parseFloat,parent$U=_parseFloat$6,_parseFloat$5=parent$U,parent$T=_parseFloat$5,_parseFloat$4=parent$T,parent$S=_parseFloat$4,_parseFloat$3=parent$S,_parseFloat$2=_parseFloat$3,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME=functionName.PROPER,fails$a=fails$C,whitespaces=whitespaces$4,non="​…᠎",stringTrimForced=function(e){return fails$a((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e}))},$$11=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$11({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var entryVirtual$8=entryVirtual$n,trim$6=entryVirtual$8("String").trim,isPrototypeOf$9=objectIsPrototypeOf,method$6=trim$6,StringPrototype$2=String.prototype,trim$5=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$9(StringPrototype$2,e)&&t===StringPrototype$2.trim?method$6:t},parent$R=trim$5,trim$4=parent$R,parent$Q=trim$4,trim$3=parent$Q,parent$P=trim$3,trim$2=parent$P,trim$1=trim$2,trim2=trim$1,_trimInstanceProperty=getDefaultExportFromCjs(trim2),$$10=_export,uncurryThis$a=functionUncurryThis,$Date=Date,thisTimeValue=uncurryThis$a($Date.prototype.getTime);$$10({target:"Date",stat:!0},{now:function(){return thisTimeValue(new $Date)}});var _context,path$8=path$w,now$5=path$8.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,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.info,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.warn,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.error,e]).call(t,o))}}},XgplayerTimeRange=function(){function e(t){_classCallCheck(this,e),this.bufferedList=t}return _createClass(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={};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.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]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,_forEachInstanceProperty(e=_Object$keys(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},util.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 i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&util.addClass(i,r),t)_forEachInstanceProperty(o=_Object$keys(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(e){return XG_DEBUG.logError("util.createDomFromHtml",e),null}},util.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(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util.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.hasClass(e,t)||(e.className&&"object"===_typeof(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util.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.hasClass(e,t))_forEachInstanceProperty(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util.toggleClass=function(e,t){var r;e&&_forEachInstanceProperty(r=t.split(/\s+/g)).call(r,(function(t){util.hasClass(e,t)?util.removeClass(e,t):util.addClass(e,t)}))},util.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util.typeOf(e[r]))t.push(e[r]);else if("Object"===util.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.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.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},util.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util).call(util,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util).call(util,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util).call(util,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util.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.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util.deepCopy=function(e,t){var r;if("Object"===util.typeOf(t)&&"Object"===util.typeOf(e))return _forEachInstanceProperty(r=_Object$keys(t)).call(r,(function(r){if("Object"!==util.typeOf(t[r])||t[r]instanceof Node)if("Array"===util.typeOf(t[r])){var n;e[r]="Array"===util.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.deepCopy(e[r],t[r])})),e},util.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util.typeOf(t[r])&&"Array"===util.typeOf(e[r])?"Array"===util.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray(t[r])):util.typeOf(e[r])!==util.typeOf(t[r])||null===e[r]||"Object"!==util.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util.deepMerge(e[r],t[r])})),e},util.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.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.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=_setInterval(_bindInstanceProperty(r).call(r,e),n))},util.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=_setTimeout((function(){t(),util.clearTimeout(e,n)}),r);return e._timers.push(n),n},util.clearTimeout=function(e,t){var r=e._timers;if("Array"===util.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.clearAllTimers=function(e){var t=e._timers;"Array"===util.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util.createImgBtn=function(e,t,r,n){var i,o,a,s,l,c,u,p,f,d,h,y,g=util.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(g.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(_everyInstanceProperty(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(_indexOfInstanceProperty(r).call(r,e)>-1&&_indexOfInstanceProperty(n).call(n,e)>-1)||(u=_parseFloat$1(_trimInstanceProperty(t=_sliceInstanceProperty(r).call(r,0,_indexOfInstanceProperty(r).call(r,e))).call(t)),p=_parseFloat$1(_trimInstanceProperty(i=_sliceInstanceProperty(n).call(n,0,_indexOfInstanceProperty(n).call(n,e))).call(i)),f=e,!1)})),g.style.width=_concatInstanceProperty(o="".concat(u)).call(o,f),g.style.height=_concatInstanceProperty(a="".concat(p)).call(a,f),g.style.backgroundSize=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="".concat(u)).call(c,f," ")).call(l,p)).call(s,f),g.style.margin="start"===e?_concatInstanceProperty(d=_concatInstanceProperty(h=_concatInstanceProperty(y="-".concat(p/2)).call(y,f," auto auto -")).call(h,u/2)).call(d,f):"auto 5px auto 5px");return g},util.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(_parseInt$1(e,16))})),_concatInstanceProperty(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},util.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util.checkIsFunction=function(e){return e&&"function"==typeof e},util.checkIsObject=function(e){return null!==e&&"object"===_typeof(e)},util.hide=function(e){e.style.display="none"},util.show=function(e,t){e.style.display=t||"block"},util.isUndefined=function(e){if(null==e)return!0},util.isNotNull=function(e){return!(null==e)},util.setStyleFromCsstext=function(e,t){if(t)if("String"===util.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.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 i=n.replace(/\s+/g,"").split(";"),o={},a={};return _mapInstanceProperty(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(checkIsIn(t[0],r)?o[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]})),o},util.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.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.stopPropagation=function(e){e&&e.stopPropagation()},util.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util.checkTouchSupport=function(){return"ontouchstart"in window},util.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 i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new XgplayerTimeRange(i)},util.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.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util.getHostFromUrl=function(e){if("String"!==util.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},util.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.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util.createPositionBar=function(e,t){var r=util.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util.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")},i=_Object$keys(n);return _forEachInstanceProperty(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=_concatInstanceProperty(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},util.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},util.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 i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},util.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.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,l=o.cTime,c=o.offset;return e<a?l:e>=a&&e<=s?e-c:e>s&&n>=i-1?s:-1},util.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 i=t[r].start;return r-1<0?i+e:i+(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),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||n&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:n,isPc:!(s||n||r||a),isSymbian:r,isWindowsPhone:t,isFireFox:i}},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 i=MediaSource.isTypeSupported(r.contentType),o=MediaSource.isTypeSupported(n.contentType);return _Promise.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(e){return _Promise.resolve(t)}}},URL_CHANGE="urlchange";function callHandler(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,_concatInstanceProperty(n=[e]).call(n,o));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,_concatInstanceProperty(t=[e]).call(t,i))})):r.call.apply(r,_concatInstanceProperty(s=[e]).call(s,o)))}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,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,_concatInstanceProperty(a=[this]).call(a,_sliceInstanceProperty(Array.prototype).call(arguments)))}catch(t){var l,c;throw t.message=_concatInstanceProperty(l=_concatInstanceProperty(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(l,t.message),t}if(this.__hooks&&this.__hooks[e])try{var u,p,f,d=(p=this.__hooks[e]).call.apply(p,_concatInstanceProperty(u=[this,this]).call(u,_sliceInstanceProperty(Array.prototype).call(arguments)));if(d)if(d.then)d.then((function(e){var r;!1!==e&&callHandler.apply(void 0,_concatInstanceProperty(r=[o,t,n.next]).call(r,_toConsumableArray(i)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty(f=[this,t,n.next]).call(f,_sliceInstanceProperty(Array.prototype).call(arguments)));else if(void 0===d){var h;callHandler.apply(void 0,_concatInstanceProperty(h=[this,t,n.next]).call(h,_sliceInstanceProperty(Array.prototype).call(arguments)))}}catch(t){var y,g;throw t.message=_concatInstanceProperty(y=_concatInstanceProperty(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(y,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(this,e),util.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(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.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,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,_concatInstanceProperty(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=_objectSpread2(_objectSpread2({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];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,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];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.clearAllTimers(this),util.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}(),$$$=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),$$$({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$7=entryVirtual$n,findIndex$7=entryVirtual$7("Array").findIndex,isPrototypeOf$8=objectIsPrototypeOf,method$5=findIndex$7,ArrayPrototype$5=Array.prototype,findIndex$6=function(e){var t=e.findIndex;return e===ArrayPrototype$5||isPrototypeOf$8(ArrayPrototype$5,e)&&t===ArrayPrototype$5.findIndex?method$5:t},parent$L=findIndex$6,findIndex$5=parent$L,parent$K=findIndex$5,findIndex$4=parent$K,parent$J=findIndex$4,findIndex$3=parent$J,findIndex$2=findIndex$3,findIndex$1=findIndex$2,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex$1),fails$9=fails$C,wellKnownSymbol$4=wellKnownSymbol$r,DESCRIPTORS$4=descriptors,IS_PURE=isPure,ITERATOR$2=wellKnownSymbol$4("iterator"),urlConstructorDetection=!fails$9((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.size&&(IS_PURE||!DESCRIPTORS$4)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$2]||"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$9=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$9(regexSeparators.exec),floor$1=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$9("".charCodeAt),join$2=uncurryThis$9([].join),push$5=uncurryThis$9([].push),replace$2=uncurryThis$9("".replace),split$2=uncurryThis$9("".split),toLowerCase$1=uncurryThis$9("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=charCodeAt(e,r++);if(i>=55296&&i<=56319&&r<n){var o=charCodeAt(e,r++);56320==(64512&o)?push$5(t,((1023&i)<<10)+(1023&o)+65536):(push$5(t,i),r--)}else push$5(t,i)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$1(e/damp):e>>1,e+=floor$1(e/t);e>baseMinusTMin*tMax>>1;)e=floor$1(e/baseMinusTMin),n+=base;return floor$1(n+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,r,n=[],i=(e=ucs2decode(e)).length,o=initialN,a=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$5(n,fromCharCode(r));var l=n.length,c=l;for(l&&push$5(n,delimiter);c<i;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=o&&r<u&&(u=r);var p=c+1;if(u-o>floor$1((maxInt-a)/p))throw $RangeError(OVERFLOW_ERROR);for(a+=(u-o)*p,o=u,t=0;t<e.length;t++){if((r=e[t])<o&&++a>maxInt)throw $RangeError(OVERFLOW_ERROR);if(r==o){for(var f=a,d=base;;){var h=d<=s?tMin:d>=s+tMax?tMax:d-s;if(f<h)break;var y=f-h,g=base-h;push$5(n,fromCharCode(digitToBasic(h+y%g))),f=floor$1(y/g),d+=base}push$5(n,fromCharCode(digitToBasic(f))),s=adapt(a,p,c==l),a=0,c++}}a++,o++}return join$2(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],i=split$2(replace$2(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<i.length;t++)r=i[t],push$5(n,exec$1(regexNonASCII,r)?"xn--"+encode(r):r);return join$2(n,".")},defineBuiltIn$2=defineBuiltIn$8,defineBuiltIns$4=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$2(e,n,t[n],r);return e},$$_=_export,global$4=global$s,call$e=functionCall,uncurryThis$8=functionUncurryThis,DESCRIPTORS$3=descriptors,USE_NATIVE_URL$2=urlConstructorDetection,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$2=defineBuiltInAccessor$5,defineBuiltIns$3=defineBuiltIns$4,setToStringTag$2=setToStringTag$9,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$4=internalState,anInstance$4=anInstance$6,isCallable$5=isCallable$r,hasOwn$7=hasOwnProperty_1,bind$f=functionBindContext,classof$5=classof$g,anObject$4=anObject$i,isObject$8=isObject$n,$toString$1=toString$g,create$1=objectCreate,createPropertyDescriptor=createPropertyDescriptor$8,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$a,validateArgumentsLength$2=validateArgumentsLength$5,wellKnownSymbol$3=wellKnownSymbol$r,arraySort=arraySort$1,ITERATOR$1=wellKnownSymbol$3("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$4=InternalStateModule$4.set,getInternalParamsState=InternalStateModule$4.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$4.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor5=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$3)return global$4[e];var t=getOwnPropertyDescriptor5(global$4,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers&&Headers.prototype,RegExp$1=global$4.RegExp,TypeError$2=global$4.TypeError,decodeURIComponent$1=global$4.decodeURIComponent,encodeURIComponent$1=global$4.encodeURIComponent,charAt$1=uncurryThis$8("".charAt),join$1=uncurryThis$8([].join),push$4=uncurryThis$8([].push),replace$1=uncurryThis$8("".replace),shift$1=uncurryThis$8([].shift),splice$1=uncurryThis$8([].splice),split$1=uncurryThis$8("".split),stringSlice$2=uncurryThis$8("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$1("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent$1(e)}catch(t){return e}},deserialize=function(e){var t=replace$1(e,plus," "),r=4;try{return decodeURIComponent$1(t)}catch(e){for(;r;)t=replace$1(t,percentSequence(r--),percentDecode);return t}},find$1=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$1(encodeURIComponent$1(e),find$1,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$4(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$8(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$1(e,0)?stringSlice$2(e,1):e:$toString$1(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,l=getIteratorMethod(e);if(l)for(r=(t=getIterator(e,l)).next;!(n=call$e(r,t)).done;){if(o=(i=getIterator(anObject$4(n.value))).next,(a=call$e(o,i)).done||(s=call$e(o,i)).done||!call$e(o,i).done)throw TypeError$2("Expected sequence with length 2");push$4(this.entries,{key:$toString$1(a.value),value:$toString$1(s.value)})}else for(var c in e)hasOwn$7(e,c)&&push$4(this.entries,{key:c,value:$toString$1(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=split$1(t,"="),push$4(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$1(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$4(r,serialize(e.key)+"="+serialize(e.value));return join$1(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$4(this,URLSearchParamsPrototype);var e=setInternalState$4(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$3||(this.length=e.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns$3(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$2(arguments.length,2);var r=getInternalParamsState(this);push$4(r.entries,{key:$toString$1(e),value:$toString$1(t)}),DESCRIPTORS$3||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$1(e),i=0;i<r.length;)r[i].key===n?splice$1(r,i,1):i++;DESCRIPTORS$3||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=[],i=0;i<t.length;i++)t[i].key===r&&push$4(n,t[i].value);return n},has:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$2(arguments.length,1);for(var r,n=getInternalParamsState(this),i=n.entries,o=!1,a=$toString$1(e),s=$toString$1(t),l=0;l<i.length;l++)(r=i[l]).key===a&&(o?splice$1(i,l--,1):(o=!0,r.value=s));o||push$4(i,{key:a,value:s}),DESCRIPTORS$3||(this.length=i.length),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$f(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$1(URLSearchParamsPrototype,ITERATOR$1,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$1(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),DESCRIPTORS$3&&defineBuiltInAccessor$2(URLSearchParamsPrototype,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$_({global:!0,constructor:!0,forced:!USE_NATIVE_URL$2},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$2&&isCallable$5(Headers)){var headersHas=uncurryThis$8(HeadersPrototype.has),headersSet=uncurryThis$8(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$8(e)){var t,r=e.body;if(classof$5(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers(e.headers):new Headers,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$1(e,{body:createPropertyDescriptor(0,$toString$1(r)),headers:createPropertyDescriptor(0,t)})}return e};if(isCallable$5(nativeFetch)&&$$_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$5(NativeRequest)){var RequestConstructor=function(e){return anInstance$4(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$Z=_export,DESCRIPTORS$2=descriptors,USE_NATIVE_URL$1=urlConstructorDetection,global$3=global$s,bind$e=functionBindContext,uncurryThis$7=functionUncurryThis,defineBuiltIn=defineBuiltIn$8,defineBuiltInAccessor$1=defineBuiltInAccessor$5,anInstance$3=anInstance$6,hasOwn$6=hasOwnProperty_1,assign2=objectAssign,arrayFrom=arrayFrom$1,arraySlice$1=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$g,setToStringTag$1=setToStringTag$9,validateArgumentsLength$1=validateArgumentsLength$5,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule$3=internalState,setInternalState$3=InternalStateModule$3.set,getInternalURLState=InternalStateModule$3.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$3.URL,TypeError$1=global$3.TypeError,parseInt$1=global$3.parseInt,floor=Math.floor,pow=Math.pow,charAt=uncurryThis$7("".charAt),exec=uncurryThis$7(/./.exec),join=uncurryThis$7([].join),numberToString=uncurryThis$7(1..toString),pop=uncurryThis$7([].pop),push$3=uncurryThis$7([].push),replace=uncurryThis$7("".replace),shift=uncurryThis$7([].shift),split=uncurryThis$7("".split),stringSlice$1=uncurryThis$7("".slice),toLowerCase=uncurryThis$7("".toLowerCase),unshift=uncurryThis$7([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,i,o,a,s,l=split(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=l[n]))return e;if(o=10,i.length>1&&"0"==charAt(i,0)&&(o=exec(HEX_START,i)?16:8,i=stringSlice$1(i,8==o?1:2)),""===i)a=0;else{if(!exec(10==o?DEC:8==o?OCT:HEX,i))return e;a=parseInt$1(i,o)}push$3(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow(256,5-t))return null}else if(a>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow(256,3-n);return s},parseIPv6=function(e){var t,r,n,i,o,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,p=0,f=function(){return charAt(e,p)};if(":"==f()){if(":"!=charAt(e,1))return;p+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=r=0;r<4&&exec(HEX,f());)t=16*t+parseInt$1(f(),16),p++,r++;if("."==f()){if(0==r)return;if(p-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;p++}if(!exec(DIGIT,f()))return;for(;exec(DIGIT,f());){if(o=parseInt$1(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;p++}l[c]=256*l[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;l[c++]=t}else{if(null!==u)return;p++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t},serializeHost=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor(e/256);return join(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=numberToString(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign2({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn$6(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec(ALPHA,charAt(e,0))&&(":"==(r=charAt(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice$1(e,0,2))&&(2==e.length||"/"===(t=charAt(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,i,o,a=$toString(e);if(t){if(i=this.parse(a))throw TypeError$1(i);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),i=this.parse(a,null,n))throw TypeError$1(i);(o=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=o}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s=this,l=t||SCHEME_START,c=0,u="",p=!1,f=!1,d=!1;for(e=$toString(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);c<=n.length;){switch(i=n[c],l){case SCHEME_START:if(!i||!exec(ALPHA,i)){if(t)return INVALID_SCHEME;l=NO_SCHEME;continue}u+=toLowerCase(i),l=SCHEME;break;case SCHEME:if(i&&(exec(ALPHANUMERIC,i)||"+"==i||"-"==i||"."==i))u+=toLowerCase(i);else{if(":"!=i){if(t)return INVALID_SCHEME;u="",l=NO_SCHEME,c=0;continue}if(t&&(s.isSpecial()!=hasOwn$6(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$3(s.path,""),l=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=i)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==i){s.scheme=r.scheme,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,l=FRAGMENT;break}l="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=i||"/"!=n[c+1]){l=RELATIVE;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES,c++;break;case PATH_OR_AUTHORITY:if("/"==i){l=AUTHORITY;break}l=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,i==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query;else if("/"==i||"\\"==i&&s.isSpecial())l=RELATIVE_SLASH;else if("?"==i)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.path.length--,l=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){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,"/"!=i||"/"!=charAt(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=i&&"\\"!=i){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==i){p&&(u="%40"+u),p=!0,o=arrayFrom(u);for(var h=0;h<o.length;h++){var y=o[h];if(":"!=y||d){var g=percentEncode(y,userinfoPercentEncodeSet);d?s.password+=g:s.username+=g}else d=!0}u=""}else if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(p&&""==u)return INVALID_AUTHORITY;c-=arrayFrom(u).length+1,u="",l=HOST}else u+=i;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){l=FILE_HOST;continue}if(":"!=i||f){if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&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}"["==i?f=!0:"]"==i&&(f=!1),u+=i}else{if(""==u)return INVALID_HOST;if(a=s.parseHost(u))return a;if(u="",l=PORT,t==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,i)){if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||t){if(""!=u){var $=parseInt$1(u,10);if($>65535)return INVALID_PORT;s.port=s.isSpecial()&&$===specialSchemes[s.scheme]?null:$,u=""}if(t)return;l=PATH_START;continue}return INVALID_PORT}u+=i;break;case FILE:if(s.scheme="file","/"==i||"\\"==i)l=FILE_SLASH;else{if(!r||"file"!=r.scheme){l=PATH;continue}if(i==EOF)s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query;else if("?"==i)s.host=r.host,s.path=arraySlice$1(r.path),s.query="",l=QUERY;else{if("#"!=i){startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))||(s.host=r.host,s.path=arraySlice$1(r.path),s.shortenPath()),l=PATH;continue}s.host=r.host,s.path=arraySlice$1(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}}break;case FILE_SLASH:if("/"==i||"\\"==i){l=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join(arraySlice$1(n,c),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$3(s.path,r.path[0]):s.host=r.host),l=PATH;continue;case FILE_HOST:if(i==EOF||"/"==i||"\\"==i||"?"==i||"#"==i){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+=i;break;case PATH_START:if(s.isSpecial()){if(l=PATH,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=EOF&&(l=PATH,"/"!=i))continue}else s.fragment="",l=FRAGMENT;else s.query="",l=QUERY;break;case PATH:if(i==EOF||"/"==i||"\\"==i&&s.isSpecial()||!t&&("?"==i||"#"==i)){if(isDoubleDot(u)?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||push$3(s.path,"")):isSingleDot(u)?"/"==i||"\\"==i&&s.isSpecial()||push$3(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt(u,0)+":"),push$3(s.path,u)),u="","file"==s.scheme&&(i==EOF||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==i?(s.query="",l=QUERY):"#"==i&&(s.fragment="",l=FRAGMENT)}else u+=percentEncode(i,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==i?(s.query="",l=QUERY):"#"==i?(s.fragment="",l=FRAGMENT):i!=EOF&&(s.path[0]+=percentEncode(i,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=i?i!=EOF&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":percentEncode(i,C0ControlPercentEncodeSet)):(s.fragment="",l=FRAGMENT);break;case FRAGMENT:i!=EOF&&(s.fragment+=percentEncode(i,fragmentPercentEncodeSet))}c++}},parseHost:function(e){var t,r,n;if("["==charAt(e,0)){if("]"!=charAt(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice$1(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$6(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,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=serializeHost(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+join(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$1(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString(e))?this.query=null:("?"==charAt(e,0)&&(e=stringSlice$1(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString(e))?("#"==charAt(e,0)&&(e=stringSlice$1(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$3(this,URLPrototype),r=validateArgumentsLength$1(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$3(t,new URLState(e,!1,r));DESCRIPTORS$2||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$2&&(defineBuiltInAccessor$1(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$1(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$1(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$1(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$1(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$1(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$1(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$1(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$1(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$1(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$1(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$1(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn(URLConstructor,"createObjectURL",bind$e(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn(URLConstructor,"revokeObjectURL",bind$e(nativeRevokeObjectURL,NativeURL))}setToStringTag$1(URLConstructor,"URL"),$$Z({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1,sham:!DESCRIPTORS$2},{URL:URLConstructor});var $$Y=_export,getBuiltIn$4=getBuiltIn$k,fails$8=fails$C,validateArgumentsLength=validateArgumentsLength$5,toString$3=toString$g,USE_NATIVE_URL=urlConstructorDetection,URL$1=getBuiltIn$4("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL&&fails$8((function(){URL$1.canParse()}));$$Y({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength(arguments.length,1),r=toString$3(e),n=t<2||void 0===arguments[1]?void 0:toString$3(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$7=path$w,url$5=path$7.URL,parent$I=url$5,url$4=parent$I,parent$H=url$4,url$3=parent$H,parent$G=url$3,url$2=parent$G,url$1=url$2,url=url$1,_URL=getDefaultExportFromCjs(url),path$6=path$w,apply$1=functionApply;path$6.JSON||(path$6.JSON={stringify:JSON.stringify});var stringify$5=function(e,t,r){return apply$1(path$6.JSON.stringify,null,arguments)},parent$F=stringify$5,stringify$4=parent$F,parent$E=stringify$4,stringify$3=parent$E,parent$D=stringify$3,stringify$2=parent$D,stringify$1=stringify$2,stringify2=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify2),isObject$7=isObject$n,classof$4=classofRaw$2,wellKnownSymbol$2=wellKnownSymbol$r,MATCH$1=wellKnownSymbol$2("match"),isRegexp=function(e){var t;return isObject$7(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$4(e))},isRegExp=isRegexp,$TypeError$6=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$6("The method doesn't accept regular expressions");return e},wellKnownSymbol$1=wellKnownSymbol$r,MATCH=wellKnownSymbol$1("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},$$X=_export,uncurryThis$6=functionUncurryThisClause,toLength=toLength$3,toString$2=toString$g,notARegExp$1=notARegexp,requireObjectCoercible$1=requireObjectCoercible$8,correctIsRegExpLogic$1=correctIsRegexpLogic,nativeStartsWith=uncurryThis$6("".startsWith),stringSlice=uncurryThis$6("".slice),min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic$1("startsWith");$$X({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC},{startsWith:function(e){var t=toString$2(requireObjectCoercible$1(this));notARegExp$1(e);var r=toLength(min$1(arguments.length>1?arguments[1]:void 0,t.length)),n=toString$2(e);return nativeStartsWith?nativeStartsWith(t,n,r):stringSlice(t,r,r+n.length)===n}});var entryVirtual$6=entryVirtual$n,startsWith$6=entryVirtual$6("String").startsWith,isPrototypeOf$7=objectIsPrototypeOf,method$4=startsWith$6,StringPrototype$1=String.prototype,startsWith$5=function(e){var t=e.startsWith;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$7(StringPrototype$1,e)&&t===StringPrototype$1.startsWith?method$4:t},parent$C=startsWith$5,startsWith$4=parent$C,parent$B=startsWith$4,startsWith$3=parent$B,parent$A=startsWith$3,startsWith$2=parent$A,startsWith$1=startsWith$2,startsWith2=startsWith$1,_startsWithInstanceProperty=getDefaultExportFromCjs(startsWith2),$$W=_export,$includes=arrayIncludes.includes,fails$7=fails$C,BROKEN_ON_SPARSE=fails$7((function(){return!Array(1).includes()}));$$W({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$5=entryVirtual$n,includes$7=entryVirtual$5("Array").includes,$$V=_export,uncurryThis$5=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$8,toString$1=toString$g,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$5("".indexOf);$$V({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$1(requireObjectCoercible(this)),toString$1(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$4=entryVirtual$n,includes$6=entryVirtual$4("String").includes,isPrototypeOf$6=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$4=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$4||isPrototypeOf$6(ArrayPrototype$4,e)&&t===ArrayPrototype$4.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$6(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$z=includes$5,includes$4=parent$z,parent$y=includes$4,includes$3=parent$y,parent$x=includes$3,includes$2=parent$x,includes$1=includes$2,includes3=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes3),internalMetadata={exports:{}},fails$6=fails$C,arrayBufferNonExtensible=fails$6((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$5=fails$C,isObject$6=isObject$n,classof$3=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES$2=fails$5((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES$2||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$6(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof$3(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$4=fails$C,freezing=!fails$4((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$U=_export,uncurryThis$4=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$5=isObject$n,hasOwn$5=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible$1=objectIsExtensible,uid=uid$4,FREEZING$2=freezing,REQUIRED=!1,METADATA=uid("meta"),id$1=0,setMetadata=function(e){defineProperty$1(e,METADATA,{value:{objectID:"O"+id$1++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$5(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$5(e,METADATA)){if(!isExtensible$1(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData$1=function(e,t){if(!hasOwn$5(e,METADATA)){if(!isExtensible$1(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze$1=function(e){return FREEZING$2&&REQUIRED&&isExtensible$1(e)&&!hasOwn$5(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$4([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===METADATA){t(n,i,1);break}return n},$$U({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData$1,onFreeze:onFreeze$1};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$T=_export,isObject$4=isObject$n,onFreeze=internalMetadataExports.onFreeze,FREEZING$1=freezing,fails$3=fails$C,$seal=Object.seal,FAILS_ON_PRIMITIVES$1=fails$3((function(){$seal(1)}));$$T({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1,sham:!FREEZING$1},{seal:function(e){return $seal&&isObject$4(e)?$seal(onFreeze(e)):e}});var path$5=path$w,seal$6=path$5.Object.seal,parent$w=seal$6,seal$5=parent$w,parent$v=seal$5,seal$4=parent$v,parent$u=seal$4,seal$3=parent$u,seal$2=seal$3,seal$1=seal$2,_Object$seal=getDefaultExportFromCjs(seal$1),entryVirtual$3=entryVirtual$n,entries$6=entryVirtual$3("Array").entries,parent$t=entries$6,entries$5=parent$t,classof$2=classof$g,hasOwn$4=hasOwnProperty_1,isPrototypeOf$5=objectIsPrototypeOf,method$3=entries$5,ArrayPrototype$3=Array.prototype,DOMIterables$1={DOMTokenList:!0,NodeList:!0},entries$4=function(e){var t=e.entries;return e===ArrayPrototype$3||isPrototypeOf$5(ArrayPrototype$3,e)&&t===ArrayPrototype$3.entries||hasOwn$4(DOMIterables$1,classof$2(e))?method$3:t},parent$s=entries$4,entries$3=parent$s,parent$r=entries$3,entries$2=parent$r,entries$1=entries$2,entries2=entries$1,_entriesInstanceProperty=getDefaultExportFromCjs(entries2),$$S=_export,global$2=global$s,InternalMetadataModule$1=internalMetadataExports,fails$2=fails$C,createNonEnumerableProperty=createNonEnumerableProperty$9,iterate$p=iterate$v,anInstance$2=anInstance$6,isCallable$4=isCallable$r,isObject$3=isObject$n,setToStringTag=setToStringTag$9,defineProperty5=objectDefineProperty.f,forEach3=arrayIteration.forEach,DESCRIPTORS$1=descriptors,InternalStateModule$2=internalState,setInternalState$2=InternalStateModule$2.set,internalStateGetterFor$2=InternalStateModule$2.getterFor,collection$3=function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=global$2[e],l=s&&s.prototype,c={};if(DESCRIPTORS$1&&isCallable$4(s)&&(o||l.forEach&&!fails$2((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$2(anInstance$2(t,u),{type:e,collection:new s}),null!=r&&iterate$p(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,p=internalStateGetterFor$2(e);forEach3(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||createNonEnumerableProperty(u,e,(function(r,n){var i=p(this).collection;if(!t&&o&&!isObject$3(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||defineProperty5(u,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=r.getConstructor(t,e,i,a),InternalMetadataModule$1.enable();return setToStringTag(n,e,!1,!0),c[e]=n,$$S({global:!0,forced:!0},c),o||r.setStrong(n,e,i),n},uncurryThis$3=functionUncurryThis,defineBuiltIns$2=defineBuiltIns$4,getWeakData=internalMetadataExports.getWeakData,anInstance$1=anInstance$6,anObject$3=anObject$i,isNullOrUndefined$3=isNullOrUndefined$8,isObject$2=isObject$n,iterate$o=iterate$v,ArrayIterationModule=arrayIteration,hasOwn$3=hasOwnProperty_1,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,find2=ArrayIterationModule.find,findIndex2=ArrayIterationModule.findIndex,splice2=uncurryThis$3([].splice),id=0,uncaughtFrozenStore=function(e){return e.frozen||(e.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(e,t){return find2(e.entries,(function(e){return e[0]===t}))};UncaughtFrozenStore.prototype={get:function(e){var t=findUncaughtFrozen(this,e);if(t)return t[1]},has:function(e){return!!findUncaughtFrozen(this,e)},set:function(e,t){var r=findUncaughtFrozen(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=findIndex2(this.entries,(function(t){return t[0]===e}));return~t&&splice2(this.entries,t,1),!!~t}};var InternalWeakMap,collectionWeak$1={getConstructor:function(e,t,r,n){var i=e((function(e,i){anInstance$1(e,o),setInternalState$1(e,{type:t,id:id++,frozen:void 0}),isNullOrUndefined$3(i)||iterate$o(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=internalStateGetterFor$1(t),s=function(e,t,r){var n=a(e),i=getWeakData(anObject$3(t),!0);return!0===i?uncaughtFrozenStore(n).set(t,r):i[n.id]=r,e};return defineBuiltIns$2(o,{delete:function(e){var t=a(this);if(!isObject$2(e))return!1;var r=getWeakData(e);return!0===r?uncaughtFrozenStore(t).delete(e):r&&hasOwn$3(r,t.id)&&delete r[t.id]},has:function(e){var t=a(this);if(!isObject$2(e))return!1;var r=getWeakData(e);return!0===r?uncaughtFrozenStore(t).has(e):r&&hasOwn$3(r,t.id)}}),defineBuiltIns$2(o,r?{get:function(e){var t=a(this);if(isObject$2(e)){var r=getWeakData(e);return!0===r?uncaughtFrozenStore(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},FREEZING=freezing,global$1=global$s,uncurryThis$2=functionUncurryThis,defineBuiltIns$1=defineBuiltIns$4,InternalMetadataModule=internalMetadataExports,collection$2=collection$3,collectionWeak=collectionWeak$1,isObject$1=isObject$n,enforceInternalState=internalState.enforce,fails$1=fails$C,NATIVE_WEAK_MAP=weakMapBasicDetection,$Object$1=Object,isArray2=Array.isArray,isExtensible2=$Object$1.isExtensible,isFrozen=$Object$1.isFrozen,isSealed=$Object$1.isSealed,freeze=$Object$1.freeze,seal2=$Object$1.seal,FROZEN={},SEALED={},IS_IE11=!global$1.ActiveXObject&&"ActiveXObject"in global$1,wrapper=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},$WeakMap=collection$2("WeakMap",wrapper,collectionWeak),WeakMapPrototype=$WeakMap.prototype,nativeSet=uncurryThis$2(WeakMapPrototype.set),hasMSEdgeFreezingBug=function(){return FREEZING&&fails$1((function(){var e=freeze([]);return nativeSet(new $WeakMap,e,1),!isFrozen(e)}))};if(NATIVE_WEAK_MAP)if(IS_IE11){InternalWeakMap=collectionWeak.getConstructor(wrapper,"WeakMap",!0),InternalMetadataModule.enable();var nativeDelete=uncurryThis$2(WeakMapPrototype.delete),nativeHas=uncurryThis$2(WeakMapPrototype.has),nativeGet=uncurryThis$2(WeakMapPrototype.get);defineBuiltIns$1(WeakMapPrototype,{delete:function(e){if(isObject$1(e)&&!isExtensible2(e)){var t=enforceInternalState(this);return t.frozen||(t.frozen=new InternalWeakMap),nativeDelete(this,e)||t.frozen.delete(e)}return nativeDelete(this,e)},has:function(e){if(isObject$1(e)&&!isExtensible2(e)){var t=enforceInternalState(this);return t.frozen||(t.frozen=new InternalWeakMap),nativeHas(this,e)||t.frozen.has(e)}return nativeHas(this,e)},get:function(e){if(isObject$1(e)&&!isExtensible2(e)){var t=enforceInternalState(this);return t.frozen||(t.frozen=new InternalWeakMap),nativeHas(this,e)?nativeGet(this,e):t.frozen.get(e)}return nativeGet(this,e)},set:function(e,t){if(isObject$1(e)&&!isExtensible2(e)){var r=enforceInternalState(this);r.frozen||(r.frozen=new InternalWeakMap),nativeHas(this,e)?nativeSet(this,e,t):r.frozen.set(e,t)}else nativeSet(this,e,t);return this}})}else hasMSEdgeFreezingBug()&&defineBuiltIns$1(WeakMapPrototype,{set:function(e,t){var r;return isArray2(e)&&(isFrozen(e)?r=FROZEN:isSealed(e)&&(r=SEALED)),nativeSet(this,e,t),r==FROZEN&&freeze(e),r==SEALED&&seal2(e),this}});var path$4=path$w,weakMap$5=path$4.WeakMap,parent$q=weakMap$5,weakMap$4=parent$q,parent$p=weakMap$4,weakMap$3=parent$p,tryToString$2=tryToString$9,aWeakMap$2=function(e){if("object"==typeof e&&"has"in e&&"get"in e&&"set"in e)return e;throw TypeError(tryToString$2(e)+" is not a weakmap")},caller$3=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$k,caller$2=caller$3,weakMapHelpers={WeakMap:getBuiltIn$3("WeakMap"),set:caller$2("set",2),get:caller$2("get",1),has:caller$2("has",1),remove:caller$2("delete",1)},$$R=_export,aWeakMap$1=aWeakMap$2,WeakMapHelpers=weakMapHelpers,get$2=WeakMapHelpers.get,has$7=WeakMapHelpers.has,set$c=WeakMapHelpers.set;$$R({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=aWeakMap$1(this);return has$7(i,e)?(r=get$2(i,e),"update"in t&&(r=t.update(r,e,i),set$c(i,e,r)),r):(n=t.insert(e,i),set$c(i,e,n),n)}});var bind$d=functionBindContext,call$d=functionCall,aCallable$8=aCallable$l,aConstructor=aConstructor$3,isNullOrUndefined$2=isNullOrUndefined$8,iterate$n=iterate$v,push$2=[].push,collectionFrom=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return aConstructor(this),(t=void 0!==a)&&aCallable$8(a),isNullOrUndefined$2(e)?new this:(r=[],t?(n=0,i=bind$d(a,o>2?arguments[2]:void 0),iterate$n(e,(function(e){call$d(push$2,r,i(e,n++))}))):iterate$n(e,push$2,{that:r}),new this(r))},$$Q=_export,from$2=collectionFrom;$$Q({target:"WeakMap",stat:!0,forced:!0},{from:from$2});var arraySlice=arraySlice$7,collectionOf=function(){return new this(arraySlice(arguments))},$$P=_export,of$2=collectionOf;$$P({target:"WeakMap",stat:!0,forced:!0},{of:of$2});var $$O=_export,aWeakMap=aWeakMap$2,remove$4=weakMapHelpers.remove;$$O({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aWeakMap(this),r=!0,n=0,i=arguments.length;n<i;n++)e=remove$4(t,arguments[n]),r=r&&e;return!!r}});var call$c=functionCall,aCallable$7=aCallable$l,isCallable$3=isCallable$r,anObject$2=anObject$i,$TypeError$5=TypeError,mapUpsert=function(e,t){var r,n=anObject$2(this),i=aCallable$7(n.get),o=aCallable$7(n.has),a=aCallable$7(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$3(t)&&!isCallable$3(s))throw $TypeError$5("At least one callback required");return call$c(o,n,e)?(r=call$c(i,n,e),isCallable$3(t)&&(r=t(r),call$c(a,n,e,r))):isCallable$3(s)&&(r=s(),call$c(a,n,e,r)),r},$$N=_export,upsert$2=mapUpsert;$$N({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:upsert$2});var parent$o=weakMap$3,weakMap$2=parent$o,weakMap$1=weakMap$2,weakMap=weakMap$1,_WeakMap=getDefaultExportFromCjs(weakMap),create4=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$5,defineBuiltIns=defineBuiltIns$4,bind$c=functionBindContext,anInstance=anInstance$6,isNullOrUndefined$1=isNullOrUndefined$8,iterate$m=iterate$v,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$2={getConstructor:function(e,t,r,n){var i=e((function(e,i){anInstance(e,o),setInternalState(e,{type:t,index:create4(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(e.size=0),isNullOrUndefined$1(i)||iterate$m(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=internalStateGetterFor(t),s=function(e,t,r){var n,i,o=a(e),s=l(e,t);return s?s.value=r:(o.last=s={index:i=fastKey(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),DESCRIPTORS?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var r,n=a(e),i=fastKey(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),DESCRIPTORS?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$c(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(o,r?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS&&defineBuiltInAccessor(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=internalStateGetterFor(t),o=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection$1=collection$3,collectionStrong$1=collectionStrong$2;collection$1("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong$1);var path$3=path$w,map$5=path$3.Map,parent$n=map$5,map$4=parent$n,parent$m=map$4,map$3=parent$m,$$M=_export,from$1=collectionFrom;$$M({target:"Map",stat:!0,forced:!0},{from:from$1});var $$L=_export,of$1=collectionOf;$$L({target:"Map",stat:!0,forced:!0},{of:of$1});var tryToString$1=tryToString$9,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$1(e)+" is not a map")},getBuiltIn$2=getBuiltIn$k,caller$1=caller$3,Map$5=getBuiltIn$2("Map"),mapHelpers={Map:Map$5,set:caller$1("set",2),get:caller$1("get",1),has:caller$1("has",1),remove:caller$1("delete",1),proto:Map$5.prototype},$$K=_export,aMap$d=aMap$e,remove$3=mapHelpers.remove;$$K({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$d(this),r=!0,n=0,i=arguments.length;n<i;n++)e=remove$3(t,arguments[n]),r=r&&e;return!!r}});var $$J=_export,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$1=MapHelpers$4.get,has$6=MapHelpers$4.has,set$b=MapHelpers$4.set;$$J({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=aMap$c(this);return has$6(i,e)?(r=get$1(i,e),"update"in t&&(r=t.update(r,e,i),set$b(i,e,r)),r):(n=t.insert(e,i),set$b(i,e,n),n)}});var call$b=functionCall,iterateSimple$8=function(e,t,r){for(var n,i,o=r||e.next;!(n=call$b(o,e)).done;)if(void 0!==(i=t(n.value)))return i},iterateSimple$7=iterateSimple$8,mapIterate=function(e,t,r){return r?iterateSimple$7(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},$$I=_export,bind$b=functionBindContext,aMap$b=aMap$e,iterate$l=mapIterate;$$I({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$l(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$H=_export,bind$a=functionBindContext,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$k=mapIterate,Map$4=MapHelpers$3.Map,set$a=MapHelpers$3.set;$$H({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$k(t,(function(e,i){r(e,i,t)&&set$a(n,i,e)})),n}});var $$G=_export,bind$9=functionBindContext,aMap$9=aMap$e,iterate$j=mapIterate;$$G({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$j(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$F=_export,bind$8=functionBindContext,aMap$8=aMap$e,iterate$i=mapIterate;$$F({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$i(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$E=_export,call$a=functionCall,uncurryThis$1=functionUncurryThis,isCallable$2=isCallable$r,aCallable$6=aCallable$l,iterate$h=iterate$v,Map$3=mapHelpers.Map,push$1=uncurryThis$1([].push);$$E({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$2(this)?this:Map$3);aCallable$6(t);var n=aCallable$6(r.has),i=aCallable$6(r.get),o=aCallable$6(r.set);return iterate$h(e,(function(e){var a=t(e);call$a(n,r,a)?push$1(call$a(i,r,a),e):call$a(o,r,a,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$D=_export,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$g=mapIterate;$$D({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$g(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$C=_export,call$9=functionCall,iterate$f=iterate$v,isCallable$1=isCallable$r,aCallable$5=aCallable$l,Map$2=mapHelpers.Map;$$C({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$1(this)?this:Map$2);aCallable$5(t);var n=aCallable$5(r.set);return iterate$f(e,(function(e){call$9(n,r,t(e),e)})),r}});var $$B=_export,aMap$6=aMap$e,iterate$e=mapIterate;$$B({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$e(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$A=_export,bind$7=functionBindContext,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$d=mapIterate,Map$1=MapHelpers$2.Map,set$9=MapHelpers$2.set;$$A({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$d(t,(function(e,i){set$9(n,r(e,i,t),e)})),n}});var $$z=_export,bind$6=functionBindContext,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$c=mapIterate,Map=MapHelpers$1.Map,set$8=MapHelpers$1.set;$$z({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$c(t,(function(e,i){set$8(n,i,r(e,i,t))})),n}});var $$y=_export,aMap$3=aMap$e,iterate$b=iterate$v,set$7=mapHelpers.set;$$y({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$b(arguments[n++],(function(e,r){set$7(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$x=_export,aCallable$4=aCallable$l,aMap$2=aMap$e,iterate$a=mapIterate,$TypeError$4=TypeError;$$x({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$4(e),iterate$a(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw $TypeError$4("Reduce of empty map with no initial value");return n}});var $$w=_export,bind$5=functionBindContext,aMap$1=aMap$e,iterate$9=mapIterate;$$w({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$9(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$v=_export,aCallable$3=aCallable$l,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$3=TypeError,get2=MapHelpers.get,has$5=MapHelpers.has,set$6=MapHelpers.set;$$v({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$3(t);var i=has$5(r,e);if(!i&&n<3)throw $TypeError$3("Updating absent value");var o=i?get2(r,e):aCallable$3(n>2?arguments[2]:void 0)(e,r);return set$6(r,e,t(o,e,r)),r}});var $$u=_export,upsert$1=mapUpsert;$$u({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$t=_export,upsert2=mapUpsert;$$t({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$l=map$3,map$2=parent$l,map$1=map$2,map2=map$1,_Map=getDefaultExportFromCjs(map2),entryVirtual$2=entryVirtual$n,values$6=entryVirtual$2("Array").values,parent$k=values$6,values$5=parent$k,classof$1=classof$g,hasOwn$2=hasOwnProperty_1,isPrototypeOf$4=objectIsPrototypeOf,method$2=values$5,ArrayPrototype$2=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},values$4=function(e){var t=e.values;return e===ArrayPrototype$2||isPrototypeOf$4(ArrayPrototype$2,e)&&t===ArrayPrototype$2.values||hasOwn$2(DOMIterables,classof$1(e))?method$2:t},parent$j=values$4,values$3=parent$j,parent$i=values$3,values$2=parent$i,values$1=values$2,values2=values$1,_valuesInstanceProperty=getDefaultExportFromCjs(values2),sameValue=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},$$s=_export,is$6=sameValue;$$s({target:"Object",stat:!0},{is:is$6});var path$2=path$w,is$5=path$2.Object.is,parent$h=is$5,is$4=parent$h,parent$g=is$4,is$3=parent$g,parent$f=is$3,is$2=parent$f,is$1=is$2,is2=is$1,_Object$is=getDefaultExportFromCjs(is2),apply=functionApply,toIndexedObject=toIndexedObject$b,toIntegerOrInfinity$1=toIntegerOrInfinity$7,lengthOfArrayLike$1=lengthOfArrayLike$b,arrayMethodIsStrict$1=arrayMethodIsStrict$7,min=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict$1("lastIndexOf"),FORCED$1=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED$1?function(e){if(NEGATIVE_ZERO)return apply($lastIndexOf,this,arguments)||0;var t=toIndexedObject(this),r=lengthOfArrayLike$1(t),n=r-1;for(arguments.length>1&&(n=min(n,toIntegerOrInfinity$1(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$r=_export,lastIndexOf$7=arrayLastIndexOf;$$r({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var entryVirtual$1=entryVirtual$n,lastIndexOf$6=entryVirtual$1("Array").lastIndexOf,isPrototypeOf$3=objectIsPrototypeOf,method$1=lastIndexOf$6,ArrayPrototype$1=Array.prototype,lastIndexOf$5=function(e){var t=e.lastIndexOf;return e===ArrayPrototype$1||isPrototypeOf$3(ArrayPrototype$1,e)&&t===ArrayPrototype$1.lastIndexOf?method$1:t},parent$e=lastIndexOf$5,lastIndexOf$4=parent$e,parent$d=lastIndexOf$4,lastIndexOf$3=parent$d,parent$c=lastIndexOf$3,lastIndexOf$2=parent$c,lastIndexOf$1=lastIndexOf$2,lastIndexOf2=lastIndexOf$1,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf2),aCallable$2=aCallable$l,toObject=toObject$c,IndexedObject=indexedObject,lengthOfArrayLike=lengthOfArrayLike$b,$TypeError$2=TypeError,createMethod=function(e){return function(t,r,n,i){aCallable$2(r);var o=toObject(t),a=IndexedObject(o),s=lengthOfArrayLike(o),l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw $TypeError$2("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(i=r(i,a[l],l,o));return i}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$q=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$7,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&engineV8Version>79&&engineV8Version<83,FORCED=CHROME_BUG||!arrayMethodIsStrict("reduce");$$q({target:"Array",proto:!0,forced:FORCED},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var entryVirtual=entryVirtual$n,reduce$6=entryVirtual("Array").reduce,isPrototypeOf$2=objectIsPrototypeOf,method=reduce$6,ArrayPrototype=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype||isPrototypeOf$2(ArrayPrototype,e)&&t===ArrayPrototype.reduce?method:t},parent$b=reduce$5,reduce$4=parent$b,parent$a=reduce$4,reduce$3=parent$a,parent$9=reduce$3,reduce$2=parent$9,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),collection=collection$3,collectionStrong=collectionStrong$2;collection("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var path$1=path$w,set$5=path$1.Set,parent$8=set$5,set$4=parent$8,tryToString=tryToString$9,aSet$g=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(tryToString(e)+" is not a set")},getBuiltIn$1=getBuiltIn$k,caller=caller$3,Set$5=getBuiltIn$1("Set"),SetPrototype=Set$5.prototype,setHelpers={Set:Set$5,add:caller("add",1),has:caller("has",1),remove:caller("delete",1),proto:SetPrototype},iterateSimple$6=iterateSimple$8,setIterate=function(e,t,r){return r?iterateSimple$6(e.keys(),t):e.forEach(t)},SetHelpers$5=setHelpers,iterate$8=setIterate,Set$4=SetHelpers$5.Set,add$6=SetHelpers$5.add,setClone=function(e){var t=new Set$4;return iterate$8(e,(function(e){add$6(t,e)})),t},setSize=function(e){return e.size},aCallable$1=aCallable$l,anObject$1=anObject$i,call$8=functionCall,toIntegerOrInfinity=toIntegerOrInfinity$7,$TypeError$1=TypeError,max=Math.max,SetRecord=function(e,t,r,n){this.set=e,this.size=t,this.has=r,this.keys=n};SetRecord.prototype={getIterator:function(){return anObject$1(call$8(this.keys,this.set))},includes:function(e){return call$8(this.has,this.set,e)}};var getSetRecord$7=function(e){anObject$1(e);var t=+e.size;if(t!=t)throw $TypeError$1("Invalid size");return new SetRecord(e,max(toIntegerOrInfinity(t),0),aCallable$1(e.has),aCallable$1(e.keys))},aSet$f=aSet$g,SetHelpers$4=setHelpers,clone$2=setClone,size$4=setSize,getSetRecord$6=getSetRecord$7,iterateSet$2=setIterate,iterateSimple$5=iterateSimple$8,has$4=SetHelpers$4.has,remove$2=SetHelpers$4.remove,setDifference=function(e){var t=aSet$f(this),r=getSetRecord$6(e),n=clone$2(t);return size$4(t)<=r.size?iterateSet$2(t,(function(e){r.includes(e)&&remove$2(n,e)})):iterateSimple$5(r.getIterator(),(function(e){has$4(t,e)&&remove$2(n,e)})),n},setMethodAcceptSetLike$7=function(){return!1},$$p=_export,difference2=setDifference,setMethodAcceptSetLike$6=setMethodAcceptSetLike$7;$$p({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$6()},{difference:difference2});var aSet$e=aSet$g,SetHelpers$3=setHelpers,size$3=setSize,getSetRecord$5=getSetRecord$7,iterateSet$1=setIterate,iterateSimple$4=iterateSimple$8,Set$3=SetHelpers$3.Set,add$5=SetHelpers$3.add,has$3=SetHelpers$3.has,setIntersection=function(e){var t=aSet$e(this),r=getSetRecord$5(e),n=new Set$3;return size$3(t)>r.size?iterateSimple$4(r.getIterator(),(function(e){has$3(t,e)&&add$5(n,e)})):iterateSet$1(t,(function(e){r.includes(e)&&add$5(n,e)})),n},$$o=_export,intersection2=setIntersection,setMethodAcceptSetLike$5=setMethodAcceptSetLike$7,INCORRECT=!setMethodAcceptSetLike$5();$$o({target:"Set",proto:!0,real:!0,forced:INCORRECT},{intersection:intersection2});var aSet$d=aSet$g,has$2=setHelpers.has,size$2=setSize,getSetRecord$4=getSetRecord$7,iterateSet=setIterate,iterateSimple$3=iterateSimple$8,iteratorClose$1=iteratorClose$4,setIsDisjointFrom=function(e){var t=aSet$d(this),r=getSetRecord$4(e);if(size$2(t)<=r.size)return!1!==iterateSet(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==iterateSimple$3(n,(function(e){if(has$2(t,e))return iteratorClose$1(n,"normal",!1)}))},$$n=_export,isDisjointFrom2=setIsDisjointFrom,setMethodAcceptSetLike$4=setMethodAcceptSetLike$7;$$n({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$4()},{isDisjointFrom:isDisjointFrom2});var aSet$c=aSet$g,size$1=setSize,iterate$7=setIterate,getSetRecord$3=getSetRecord$7,setIsSubsetOf=function(e){var t=aSet$c(this),r=getSetRecord$3(e);return!(size$1(t)>r.size)&&!1!==iterate$7(t,(function(e){if(!r.includes(e))return!1}),!0)},$$m=_export,isSubsetOf2=setIsSubsetOf,setMethodAcceptSetLike$3=setMethodAcceptSetLike$7;$$m({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$3()},{isSubsetOf:isSubsetOf2});var aSet$b=aSet$g,has$1=setHelpers.has,size2=setSize,getSetRecord$2=getSetRecord$7,iterateSimple$2=iterateSimple$8,iteratorClose=iteratorClose$4,setIsSupersetOf=function(e){var t=aSet$b(this),r=getSetRecord$2(e);if(size2(t)<r.size)return!1;var n=r.getIterator();return!1!==iterateSimple$2(n,(function(e){if(!has$1(t,e))return iteratorClose(n,"normal",!1)}))},$$l=_export,isSupersetOf2=setIsSupersetOf,setMethodAcceptSetLike$2=setMethodAcceptSetLike$7;$$l({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$2()},{isSupersetOf:isSupersetOf2});var aSet$a=aSet$g,SetHelpers$2=setHelpers,clone$1=setClone,getSetRecord$1=getSetRecord$7,iterateSimple$1=iterateSimple$8,add$4=SetHelpers$2.add,has2=SetHelpers$2.has,remove$1=SetHelpers$2.remove,setSymmetricDifference=function(e){var t=aSet$a(this),r=getSetRecord$1(e).getIterator(),n=clone$1(t);return iterateSimple$1(r,(function(e){has2(t,e)?remove$1(n,e):add$4(n,e)})),n},$$k=_export,symmetricDifference2=setSymmetricDifference,setMethodAcceptSetLike$1=setMethodAcceptSetLike$7;$$k({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$1()},{symmetricDifference:symmetricDifference2});var aSet$9=aSet$g,add$3=setHelpers.add,clone=setClone,getSetRecord=getSetRecord$7,iterateSimple=iterateSimple$8,setUnion=function(e){var t=aSet$9(this),r=getSetRecord(e).getIterator(),n=clone(t);return iterateSimple(r,(function(e){add$3(n,e)})),n},$$j=_export,union2=setUnion,setMethodAcceptSetLike=setMethodAcceptSetLike$7;$$j({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike()},{union:union2});var parent$7=set$4,set$3=parent$7,$$i=_export,from3=collectionFrom;$$i({target:"Set",stat:!0,forced:!0},{from:from3});var $$h=_export,of2=collectionOf;$$h({target:"Set",stat:!0,forced:!0},{of:of2});var $$g=_export,aSet$8=aSet$g,add$2=setHelpers.add;$$g({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=aSet$8(this),t=0,r=arguments.length;t<r;t++)add$2(e,arguments[t]);return e}});var $$f=_export,aSet$7=aSet$g,remove=setHelpers.remove;$$f({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aSet$7(this),r=!0,n=0,i=arguments.length;n<i;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$e=_export,bind$4=functionBindContext,aSet$6=aSet$g,iterate$6=setIterate;$$e({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=aSet$6(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$6(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var classof=classof$g,hasOwn$1=hasOwnProperty_1,isNullOrUndefined=isNullOrUndefined$8,wellKnownSymbol=wellKnownSymbol$r,Iterators=iterators,ITERATOR=wellKnownSymbol("iterator"),$Object=Object,isIterable$1=function(e){if(isNullOrUndefined(e))return!1;var t=$Object(e);return void 0!==t[ITERATOR]||"@@iterator"in t||hasOwn$1(Iterators,classof(t))},getBuiltIn=getBuiltIn$k,isCallable=isCallable$r,isIterable=isIterable$1,isObject=isObject$n,Set$2=getBuiltIn("Set"),isSetLike=function(e){return isObject(e)&&"number"==typeof e.size&&isCallable(e.has)&&isCallable(e.keys)},toSetLike$7=function(e){return isSetLike(e)?e:isIterable(e)?new Set$2(e):e},$$d=_export,call$7=functionCall,toSetLike$6=toSetLike$7,$difference=setDifference;$$d({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return call$7($difference,this,toSetLike$6(e))}});var $$c=_export,bind$3=functionBindContext,aSet$5=aSet$g,SetHelpers$1=setHelpers,iterate$5=setIterate,Set$1=SetHelpers$1.Set,add$1=SetHelpers$1.add;$$c({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aSet$5(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=new Set$1;return iterate$5(t,(function(e){r(e,e,t)&&add$1(n,e)})),n}});var $$b=_export,bind$2=functionBindContext,aSet$4=aSet$g,iterate$4=setIterate;$$b({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=aSet$4(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0),n=iterate$4(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}});var $$a=_export,call$6=functionCall,toSetLike$5=toSetLike$7,$intersection=setIntersection;$$a({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return call$6($intersection,this,toSetLike$5(e))}});var $$9=_export,call$5=functionCall,toSetLike$4=toSetLike$7,$isDisjointFrom=setIsDisjointFrom;$$9({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return call$5($isDisjointFrom,this,toSetLike$4(e))}});var $$8=_export,call$4=functionCall,toSetLike$3=toSetLike$7,$isSubsetOf=setIsSubsetOf;$$8({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return call$4($isSubsetOf,this,toSetLike$3(e))}});var $$7=_export,call$3=functionCall,toSetLike$2=toSetLike$7,$isSupersetOf=setIsSupersetOf;$$7({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return call$3($isSupersetOf,this,toSetLike$2(e))}});var $$6=_export,uncurryThis=functionUncurryThis,aSet$3=aSet$g,iterate$3=setIterate,toString4=toString$g,arrayJoin=uncurryThis([].join),push=uncurryThis([].push);$$6({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=aSet$3(this),r=void 0===e?",":toString4(e),n=[];return iterate$3(t,(function(e){push(n,e)})),arrayJoin(n,r)}});var $$5=_export,bind$1=functionBindContext,aSet$2=aSet$g,SetHelpers=setHelpers,iterate$2=setIterate,Set=SetHelpers.Set,add=SetHelpers.add;$$5({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=aSet$2(this),r=bind$1(e,arguments.length>1?arguments[1]:void 0),n=new Set;return iterate$2(t,(function(e){add(n,r(e,e,t))})),n}});var $$4=_export,aCallable=aCallable$l,aSet$1=aSet$g,iterate$1=setIterate,$TypeError=TypeError;$$4({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aSet$1(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable(e),iterate$1(t,(function(i){r?(r=!1,n=i):n=e(n,i,i,t)})),r)throw $TypeError("Reduce of empty set with no initial value");return n}});var $$3=_export,bind2=functionBindContext,aSet=aSet$g,iterate=setIterate;$$3({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=aSet(this),r=bind2(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e){if(r(e,e,t))return!0}),!0)}});var $$2=_export,call$2=functionCall,toSetLike$1=toSetLike$7,$symmetricDifference=setSymmetricDifference;$$2({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return call$2($symmetricDifference,this,toSetLike$1(e))}});var $$1=_export,call$1=functionCall,toSetLike=toSetLike$7,$union=setUnion;$$1({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return call$1($union,this,toSetLike(e))}});var parent$6=set$3,set$2=parent$6,set$1=set$2,set2=set$1,_Set=getDefaultExportFromCjs(set2),$=_export,fails=fails$C,getOwnPropertyNames$6=objectGetOwnPropertyNamesExternal.f,FAILS_ON_PRIMITIVES=fails((function(){return!Object.getOwnPropertyNames(1)}));$({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{getOwnPropertyNames:getOwnPropertyNames$6});var path=path$w,Object$1=path.Object,getOwnPropertyNames$5=function(e){return Object$1.getOwnPropertyNames(e)},parent$5=getOwnPropertyNames$5,getOwnPropertyNames$4=parent$5,parent$4=getOwnPropertyNames$4,getOwnPropertyNames$3=parent$4,parent$3=getOwnPropertyNames$3,getOwnPropertyNames$2=parent$3,getOwnPropertyNames$1=getOwnPropertyNames$2,getOwnPropertyNames5=getOwnPropertyNames$1,_Object$getOwnPropertyNames=getDefaultExportFromCjs(getOwnPropertyNames5),anObject=anObject$i,regexpFlags=function(){var e=anObject(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=functionCall,hasOwn2=hasOwnProperty_1,isPrototypeOf$1=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn2(e,"flags")||!isPrototypeOf$1(RegExpPrototype$1,e)?t:call(regExpFlags,e)},getRegExpFlags=regexpGetFlags,flags$6=getRegExpFlags,isPrototypeOf=objectIsPrototypeOf,flags$5=flags$6,RegExpPrototype=RegExp.prototype,flags_1=function(e){return e===RegExpPrototype||isPrototypeOf(RegExpPrototype,e)?flags$5(e):e.flags},parent$2=flags_1,flags$4=parent$2,parent$1=flags$4,flags$3=parent$1,parent=flags$3,flags$2=parent,flags$1=flags$2,flags=flags$1,_flagsInstanceProperty=getDefaultExportFromCjs(flags),shakaPlayer_compiled={};!function(e){!function(){var t="undefined"!=typeof window?window:commonjsGlobal,r={};for(var n in function(e,t,r){var n,i,o,a,s,l,c,u,p,f="function"==typeof _Object$defineProperties?_Object$defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},d=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function h(){h=function(){},_Symbol||(d.Symbol=g)}var y,g=(y=0,function(e){return"jscomp_symbol_"+(e||"")+y++});function $(){h();var e=_Symbol.iterator;e||(e=_Symbol.iterator=_Symbol("iterator")),"function"!=typeof Array.prototype[e]&&f(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return m(this)}}),$=function(){}}function m(e){var t=0;return v((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))}function v(e){return $(),(e={next:e})[_Symbol.iterator]=function(){return this},e}function b(e){$();var t=_getIteratorMethod(e);return t?t.call(e):m(e)}function S(e,t){if(t){for(var r=d,n=e.split("."),i=0;i<n.length-1;i++){var o=n[i];o in r||(r[o]={}),r=r[o]}(o=t(i=r[n=n[n.length-1]]))!=i&&null!=o&&f(r,n,{configurable:!0,writable:!0,value:o})}}function I(e){return function(e){function t(t){return e.next(t)}function r(t){return e.throw(t)}return new _Promise((function(n,i){!function e(o){o.done?n(o.value):_Promise.resolve(o.value).then(t,r).then(e,i)}(e.next())}))}(e())}S("Promise",(function(e){function t(e){this.h=0,this.l=void 0,this.g=[];var t=this.i();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function r(){this.g=null}function n(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.h=function(e){null==this.g&&(this.g=[],this.j()),this.g.push(e)},r.prototype.j=function(){var e=this;this.i((function(){e.m()}))};var i=_setTimeout;r.prototype.i=function(e){i(e,0)},r.prototype.m=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.l(e)}}}this.g=null},r.prototype.l=function(e){this.i((function(){throw e}))},t.prototype.i=function(){function e(e){return function(n){r||(r=!0,e.call(t,n))}}var t=this,r=!1;return{resolve:e(this.C),reject:e(this.j)}},t.prototype.C=function(e){if(e===this)this.j(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(_typeof$1(e)){case"object":var r=null!=e;break e;case"function":r=!0;break e;default:r=!1}r?this.A(e):this.m(e)}},t.prototype.A=function(e){var t=void 0;try{t=e.then}catch(e){return void this.j(e)}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.j=function(e){this.o(2,e)},t.prototype.m=function(e){this.o(1,e)},t.prototype.o=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.l=t,this.u()},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)o.h(this.g[e]);this.g=null}};var o=new r;return t.prototype.F=function(e){var t=this.i();e.nc(t.resolve,t.reject)},t.prototype.J=function(e,t){var r=this.i();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},t.prototype.then=function(e,r){function n(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){o(e)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.nc(n(e,i),n(r,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.nc=function(e,t){function r(){switch(n.h){case 1:e(n.l);break;case 2:t(n.l);break;default:throw Error("Unexpected state: "+n.h)}}var n=this;null==this.g?o.h(r):this.g.push(r)},t.resolve=n,t.reject=function(e){return new t((function(t,r){r(e)}))},t.race=function(e){return new t((function(t,r){for(var i=b(e),o=i.next();!o.done;o=i.next())n(o.value).nc(t,r)}))},t.all=function(e){var r=b(e),i=r.next();return i.done?n([]):new t((function(e,t){function o(t){return function(r){a[t]=r,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,n(i.value).nc(o(a.length-1),t),i=r.next()}while(!i.done)}))},t})),S("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return _Promise.resolve(e()).then((function(){return t}))}),(function(t){return _Promise.resolve(e()).then((function(){throw t}))}))}}));var P,_="function"==typeof _Object$create?_Object$create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof _Object$setPrototypeOf)P=_Object$setPrototypeOf;else{var w;e:{var E={};try{E.__proto__={a:!0},w=E.a;break e}catch(y){}w=!1}P=w?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var T=P;function O(e,t){if(e.prototype=_(t.prototype),e.prototype.constructor=e,T)T(e,t);else for(var r in t)if("prototype"!=r)if(_Object$defineProperties){var n=_Object$getOwnPropertyDescriptor(t,r);n&&_Object$defineProperty(e,r,n)}else e[r]=t[r];e.Lg=t.prototype}function A(){this.l=!1,this.i=null,this.B=void 0,this.s=1,this.h=this.j=0,this.o=this.g=null}function C(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function R(e,t){e.g={ce:t,ne:!0},e.s=e.j||e.h}function x(e,t,r){return e.s=r,{value:t}}function M(e){e.s=0}function k(e,t,r){e.j=t,null!=r&&(e.h=r)}function N(e,t){e.j=0,e.h=t||0}function j(e,t){e.s=t,e.j=0}function D(e){e.j=0;var t=e.g.ce;return e.g=null,t}function L(e){e.o=[e.g],e.j=0,e.h=0}function U(e,t){var r,n=_spliceInstanceProperty(r=e.o).call(r,0)[0];(n=e.g=e.g||n)?n.ne?e.s=e.j||e.h:null!=n.I&&e.h<n.I?(e.s=n.I,e.g=null):e.s=e.h:e.s=t}function F(e){this.g=new A,this.h=e}function B(e,t,r,n){try{var i=t.call(e.g.i,r);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.l=!1,i;var o=i.value}catch(t){return e.g.i=null,R(e.g,t),K(e)}return e.g.i=null,n.call(e.g,o),K(e)}function K(e){for(;e.g.s;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(t){e.g.B=void 0,R(e.g,t)}if(e.g.l=!1,e.g.g){if(t=e.g.g,e.g.g=null,t.ne)throw t.ce;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function H(e){this.next=function(t){return C(e.g),e.g.i?t=B(e,e.g.i.next,t,e.g.m):(e.g.m(t),t=K(e)),t},this.throw=function(t){return C(e.g),e.g.i?t=B(e,e.g.i.throw,t,e.g.m):(R(e.g,t),t=K(e)),t},this.return=function(t){return function(e,t){C(e.g);var r=e.g.i;return r?B(e,"return"in r?r.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),K(e))}(e,t)},$(),this[_Symbol$iterator]=function(){return this}}function V(e,t){return H.prototype=e.prototype,new H(new F(t))}function G(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function W(e,t,r){e instanceof String&&(e=String(e));for(var n=e.length,i=0;i<n;i++){var o=e[i];if(t.call(r,o,i,e))return{le:i,Qe:o}}return{le:-1,Qe:void 0}}function z(e,t,r){if(null==e)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return e+""}A.prototype.m=function(e){this.B=e},A.prototype.return=function(e){this.g={return:e},this.s=this.h},A.prototype.I=function(e){this.s=e},S("Array.prototype.keys",(function(e){return e||function(){return function(e,t){$(),e instanceof String&&(e+="");var r=0,n={next:function(){if(r<e.length){var i=r++;return{value:t(i,e[i]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[_Symbol$iterator]=function(){return n},n}(this,(function(e){return e}))}})),S("WeakMap",(function(e){function t(e){if(this.g=(o+=Math.random()+1).toString(),e){h(),$(),e=b(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function r(e){G(e,i)||f(e,i,{value:{}})}function n(e){var t=Object[e];t&&(Object[e]=function(e){return r(e),t(e)})}if(function(){if(!e||!_Object$seal)return!1;try{var t=_Object$seal({}),r=_Object$seal({}),n=new e([[t,2],[r,3]]);return 2==n.get(t)&&3==n.get(r)&&(n.delete(t),n.set(r,4),!n.has(t)&&4==n.get(r))}catch(e){return!1}}())return e;var i="$jscomp_hidden_"+Math.random();n("freeze"),n("preventExtensions"),n("seal");var o=0;return t.prototype.set=function(e,t){if(r(e),!G(e,i))throw Error("WeakMap key fail: "+e);return e[i][this.g]=t,this},t.prototype.get=function(e){return G(e,i)?e[i][this.g]:void 0},t.prototype.has=function(e){return G(e,i)&&G(e[i],this.g)},t.prototype.delete=function(e){return!(!G(e,i)||!G(e[i],this.g))&&delete e[i][this.g]},t})),S("Map",(function(e){function t(){var e={};return e.Na=e.next=e.head=e}function r(e,t){var r=e.g;return v((function(){if(r){for(;r.head!=e.g;)r=r.Na;for(;r.next!=r.head;)return r=r.next,{done:!1,value:t(r)};r=null}return{done:!0,value:void 0}}))}function n(e,t){var r=t&&_typeof$1(t);"object"==r||"function"==r?o.has(t)?r=o.get(t):(r=""+ ++a,o.set(t,r)):r="p_"+t;var n=e.h[r];if(n&&G(e.h,r))for(var i=0;i<n.length;i++){var s=n[i];if(t!=t&&s.key!=s.key||t===s.key)return{id:r,list:n,index:i,ga:s}}return{id:r,list:n,index:-1,ga:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=b(e);for(var r;!(r=e.next()).done;)r=r.value,this.set(r[0],r[1])}}if(function(){if(!e||"function"!=typeof e||!_entriesInstanceProperty(e.prototype)||"function"!=typeof _Object$seal)return!1;try{var t=_Object$seal({x:4}),r=new e(b([[t,"s"]]));if("s"!=r.get(t)||1!=r.size||r.get({x:4})||r.set({x:4},"t")!=r||2!=r.size)return!1;var n=_entriesInstanceProperty(r).call(r),i=n.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=n.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!n.next().done)}catch(e){return!1}}())return e;h(),$();var o=new _WeakMap;i.prototype.set=function(e,t){var r=n(this,e);return r.list||(r.list=this.h[r.id]=[]),r.ga?r.ga.value=t:(r.ga={next:this.g,Na:this.g.Na,head:this.g,key:e,value:t},r.list.push(r.ga),this.g.Na.next=r.ga,this.g.Na=r.ga,this.size++),this},i.prototype.delete=function(e){var t;return!(!(e=n(this,e)).ga||!e.list)&&(_spliceInstanceProperty(t=e.list).call(t,e.index,1),e.list.length||delete this.h[e.id],e.ga.Na.next=e.ga.next,e.ga.next.Na=e.ga.Na,e.ga.head=null,this.size--,!0)},i.prototype.clear=function(){this.h={},this.g=this.g.Na=t(),this.size=0},i.prototype.has=function(e){return!!n(this,e).ga},i.prototype.get=function(e){return(e=n(this,e).ga)&&e.value},i.prototype.entries=function(){return r(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return r(this,(function(e){return e.key}))},i.prototype.values=function(){return r(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var r,n=_entriesInstanceProperty(this).call(this);!(r=n.next()).done;){r=r.value,e.call(t,r[1],r[0],this)}},i.prototype[_Symbol$iterator]=_entriesInstanceProperty(i.prototype);var a=0;return i})),S("Set",(function(e){function t(e){if(this.g=new _Map,e){e=b(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!_entriesInstanceProperty(e.prototype)||"function"!=typeof _Object$seal)return!1;try{var t=_Object$seal({x:4}),r=new e(b([t]));if(!r.has(t)||1!=r.size||r.add(t)!=r||1!=r.size||r.add({x:4})!=r||2!=r.size)return!1;var n=_entriesInstanceProperty(r).call(r),i=n.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&(!(i=n.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&n.next().done)}catch(e){return!1}}()?e:(h(),$(),t.prototype.add=function(e){return this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){var e;return _entriesInstanceProperty(e=this.g).call(e)},t.prototype.values=function(){var e;return _valuesInstanceProperty(e=this.g).call(e)},t.prototype.keys=_valuesInstanceProperty(t.prototype),t.prototype[_Symbol$iterator]=_valuesInstanceProperty(t.prototype),t.prototype.forEach=function(e,t){var r,n=this;_forEachInstanceProperty(r=this.g).call(r,(function(r){return e.call(t,r,r,n)}))},t)})),S("Array.prototype.findIndex",(function(e){return e||function(e,t){return W(this,e,t).le}})),S("Array.prototype.find",(function(e){return e||function(e,t){return W(this,e,t).Qe}})),S("String.prototype.startsWith",(function(e){return e||function(e,t){for(var r=z(this,e,"startsWith"),n=r.length,i=e.length,o=Math.max(0,Math.min(0|t,r.length)),a=0;a<i&&o<n;)if(r[o++]!=e[a++])return!1;return a>=i}})),S("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),S("Array.prototype.includes",(function(e){return e||function(e,t){var r=this;r instanceof String&&(r=String(r));var n=r.length,i=t||0;for(0>i&&(i=Math.max(i+n,0));i<n;i++){var o=r[i];if(o===e||_Object$is(o,e))return!0}return!1}})),S("String.prototype.includes",(function(e){return e||function(e,t){var r;return-1!==_indexOfInstanceProperty(r=z(this,e,"includes")).call(r,e,t||0)}})),S("Array.from",(function(e){return e||function(e,t,r){$(),t=null!=t?t:function(e){return e};var n=[],i=_getIteratorMethod(e);if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)n.push(t.call(r,i.value));else{i=e.length;for(var o=0;o<i;o++)n.push(t.call(r,e[o]))}return n}}));var q="function"==typeof _Object$assign?_Object$assign:function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)G(n,i)&&(e[i]=n[i])}return e};S("Object.assign",(function(e){return e||q}));var Y=this;function X(e,t){var r,n=e.split("."),i=Y;n[0]in i||!i.execScript||i.execScript("var "+n[0]);for(;n.length&&(r=n.shift());)n.length||void 0===t?i=i[r]?i[r]:i[r]={}:i[r]=t}function J(e,t){function r(){}r.prototype=t.prototype,e.Lg=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.Wg=function(e,r,n){return t.prototype[r].apply(e,_sliceInstanceProperty(Array.prototype).call(arguments,2))}}function Q(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function Z(e,t,r){var n=Math.pow(e.i,t);r=r*(1-n)+n*e.g,isNaN(r)||(e.g=r,e.h+=t)}function ee(e){return e.g/(1-Math.pow(e.i,e.h))}function te(){this.h=new Q(2),this.i=new Q(5),this.g=0}Y.g=!0,te.prototype.getBandwidthEstimate=function(e){return 128e3>this.g?e:Math.min(ee(this.h),ee(this.i))};var re={sb:0,kc:function(){},ba:function(){},error:function(){},v:function(){},info:function(){},debug:function(){},K:function(){},O:function(){}};function ne(e,t,r,n){for(var i=[],o=3;o<arguments.length;++o)i[o-3]=arguments[o];this.severity=e,this.category=t,this.code=r,this.data=i,this.handled=!1}e.console&&_bindInstanceProperty(e.console.log)&&(re.ba=_bindInstanceProperty(n=console.warn).call(n,console),re.kc=_bindInstanceProperty(i=console.error).call(i,console),1<=re.sb&&(re.error=_bindInstanceProperty(o=console.error).call(o,console)),2<=re.sb&&(re.v=_bindInstanceProperty(a=console.warn).call(a,console)),3<=re.sb&&(re.info=_bindInstanceProperty(s=console.info).call(s,console)),4<=re.sb&&(re.debug=_bindInstanceProperty(l=console.log).call(l,console)),5<=re.sb&&(re.K=_bindInstanceProperty(c=console.debug).call(c,console)),6<=re.sb&&(re.O=_bindInstanceProperty(u=console.debug).call(u,console))),X("shaka.util.Error",ne),ne.prototype.toString=function(){return"shaka.util.Error "+_JSON$stringify(this,null," ")},ne.Severity={RECOVERABLE:1,CRITICAL:2},ne.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},ne.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};
2
- /*
3
- @license
4
- Copyright 2008 The Closure Library Authors
5
- SPDX-License-Identifier: Apache-2.0
6
- */
7
- var ie=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;
8
- /*
9
- @license
10
- Copyright 2006 The Closure Library Authors
11
- SPDX-License-Identifier: Apache-2.0
12
- */function oe(e){var t;e instanceof oe?(ae(this,e.Ba),this.pb=e.pb,this.Aa=e.Aa,se(this,e.Ob),this.pa=e.pa,le(this,e.g.clone()),this.bb=e.bb):e&&(t=String(e).match(ie))?(ae(this,t[1]||"",!0),this.pb=ce(t[2]||""),this.Aa=ce(t[3]||"",!0),se(this,t[4]),this.pa=ce(t[5]||"",!0),le(this,t[6]||"",!0),this.bb=ce(t[7]||"")):this.g=new $e(null)}function ae(e,t,r){e.Ba=r?ce(t,!0):t,e.Ba&&(e.Ba=e.Ba.replace(/:$/,""))}function se(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ob=t}else e.Ob=null}function le(e,t,r){t instanceof $e?e.g=t:(r||(t=ue(t,ye)),e.g=new $e(t))}function ce(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ue(e,t,r){return"string"==typeof e?(e=encodeURI(e).replace(t,pe),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function pe(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(p=oe.prototype).Ba="",p.pb="",p.Aa="",p.Ob=null,p.pa="",p.bb="",p.toString=function(){var e=[],t=this.Ba;if(t&&e.push(ue(t,fe,!0),":"),t=this.Aa){e.push("//");var r=this.pb;r&&e.push(ue(r,fe,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ob)&&e.push(":",String(t))}return(t=this.pa)&&(this.Aa&&"/"!=t.charAt(0)&&e.push("/"),e.push(ue(t,"/"==t.charAt(0)?he:de,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.bb)&&e.push("#",ue(t,ge)),e.join("")},p.resolve=function(e){var t=this.clone();"data"===t.Ba&&(t=new oe);var r=!!e.Ba;r?ae(t,e.Ba):r=!!e.pb,r?t.pb=e.pb:r=!!e.Aa,r?t.Aa=e.Aa:r=null!=e.Ob;var n=e.pa;if(r)se(t,e.Ob);else if(r=!!e.pa){if("/"!=n.charAt(0))if(this.Aa&&!this.pa)n="/"+n;else{var i,o=_lastIndexOfInstanceProperty(i=t.pa).call(i,"/");-1!=o&&(n=t.pa.substr(0,o+1)+n)}if(".."==n||"."==n)n="";else if(-1!=_indexOfInstanceProperty(n).call(n,"./")||-1!=_indexOfInstanceProperty(n).call(n,"/.")){o=0==_lastIndexOfInstanceProperty(n).call(n,"/",0),n=n.split("/");for(var a=[],s=0;s<n.length;){var l=n[s++];"."==l?o&&s==n.length&&a.push(""):".."==l?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),o&&s==n.length&&a.push("")):(a.push(l),o=!0)}n=a.join("/")}}return r?t.pa=n:r=""!==e.g.toString(),r?le(t,e.g.clone()):r=!!e.bb,r&&(t.bb=e.bb),t},p.clone=function(){return new oe(this)};var fe=/[#\/\?@]/g,de=/[#\?:]/g,he=/[#\?]/g,ye=/[#\?@]/g,ge=/#/g;function $e(e){this.g=e||null}(p=$e.prototype).na=null,p.qc=null,p.add=function(e,t){if(!this.na&&(this.na={},this.qc=0,this.g))for(var r=this.g.split("&"),n=0;n<r.length;n++){var i,o=_indexOfInstanceProperty(i=r[n]).call(i,"="),a=null;if(0<=o){var s=r[n].substring(0,o);a=r[n].substring(o+1)}else s=r[n];s=decodeURIComponent(s.replace(/\+/g," ")),a=a||"",this.add(s,decodeURIComponent(a.replace(/\+/g," ")))}return this.g=null,(r=this.na.hasOwnProperty(e)&&this.na[e])||(this.na[e]=r=[]),r.push(t),this.qc++,this},p.toString=function(){if(this.g)return this.g;if(!this.na)return"";var e,t=[];for(e in this.na)for(var r=encodeURIComponent(e),n=this.na[e],i=0;i<n.length;i++){var o=r;""!==n[i]&&(o+="="+encodeURIComponent(n[i])),t.push(o)}return this.g=t.join("&")},p.clone=function(){var e=new $e;if(e.g=this.g,this.na){var t,r={};for(t in this.na){var n;r[t]=_concatInstanceProperty(n=this.na[t]).call(n)}e.na=r,e.qc=this.qc}return e};var me={df:function(e,t){var r;return _reduceInstanceProperty(e).call(e,_bindInstanceProperty(r=function(e,t,r){return t.catch(_bindInstanceProperty(e).call(e,null,r))}).call(r,null,t),_Promise.reject())},Rc:function(e,t){return _concatInstanceProperty(e).call(e,t)},Bc:function(){},Ra:function(e){return null!=e}};function ve(e,t){var r,n,i;if(0==t.length)return e;var o=_mapInstanceProperty(t).call(t,(function(e){return new oe(e)}));return _mapInstanceProperty(r=_reduceInstanceProperty(n=_mapInstanceProperty(i=_mapInstanceProperty(e).call(e,(function(e){return new oe(e)}))).call(i,(function(e){var t;return _mapInstanceProperty(o).call(o,_bindInstanceProperty(t=e.resolve).call(t,e))}))).call(n,me.Rc,[])).call(r,(function(e){return e.toString()}))}function be(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}var Se={Za:"video",Sb:"audio",za:"text",Ug:"image",Sg:"application"},Ie=1/15;function Pe(){var e,t,r=new _Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function _e(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=Ae(e),e=escape(e);try{return decodeURIComponent(e)}catch(e){throw new ne(2,2,2004)}}function we(e,t,r){if(!e)return"";if(!r&&0!=e.byteLength%2)throw re.error("Data has an incorrect length, must be even."),new ne(2,2,2004);if(e instanceof ArrayBuffer)var n=e;else(r=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),n=r.buffer;e=Math.floor(e.byteLength/2),r=new Uint16Array(e),n=new DataView(n);for(var i=0;i<e;i++)r[i]=n.getUint16(2*i,t);return Ae(r)}function Ee(e){var t,r=new Uint8Array(e);if(239==r[0]&&187==r[1]&&191==r[2])return _e(r);if(254==r[0]&&255==r[1])return we(r.subarray(2),!1);if(255==r[0]&&254==r[1])return we(r.subarray(2),!0);var n=_bindInstanceProperty(t=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}).call(t,null,r);if(re.debug("Unable to find byte-order-mark, making an educated guess."),0==r[0]&&0==r[2])return we(e,!1);if(0==r[1]&&0==r[3])return we(e,!0);if(n(0)&&n(1)&&n(2)&&n(3))return _e(e);throw new ne(2,2,2003)}function Te(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t.buffer}function Oe(e,t){for(var r=new Uint8Array(2*e.length),n=new DataView(r.buffer),i=0;i<e.length;++i)n.setUint16(2*i,e.charCodeAt(i),t);return r.buffer}function Ae(e){if(!Ce)for(var t=function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}},r={size:65536};0<r.size;(r={size:r.size}).size/=2)if(t(r.size)){Ce=function(e){return function(t){for(var r="",n=0;n<t.length;n+=e.size)r+=String.fromCharCode.apply(null,t.subarray(n,n+e.size));return r}}(r);break}return Ce(e)}Pe.prototype.resolve=function(){},Pe.prototype.reject=function(){},X("shaka.util.StringUtils.fromUTF8",_e),X("shaka.util.StringUtils.fromUTF16",we),X("shaka.util.StringUtils.fromBytesAutoDetect",Ee),X("shaka.util.StringUtils.toUTF8",Te),X("shaka.util.StringUtils.toUTF16",Oe);var Ce=null;X("shaka.util.StringUtils.resetFromCharCode",(function(){Ce=null}));var Re={Mc:function(t,r){var n=Ae(t);return r=null==r||r,n=e.btoa(n).replace(/\+/g,"-").replace(/\//g,"_"),r?n:n.replace(/=*$/,"")}};function xe(){var e,t;this.g=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.l=[],this.i=[],this.j=!1,this.g.on("data",_bindInstanceProperty(e=this.o).call(e,this)),this.g.on("done",_bindInstanceProperty(t=this.m).call(t,this))}function Me(t,r){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(r?MediaSource.isTypeSupported(ke(r,t)):MediaSource.isTypeSupported(ke("audio",t))||MediaSource.isTypeSupported(ke("video",t)))}function ke(e,t){var r=t.replace(/mp2t/i,"mp4");"audio"==e&&(r=r.replace("video","audio"));var n=/avc1\.(66|77|100)\.(\d+)/.exec(r);if(n){var i="avc1.",o=n[1],a=Number(n[2]);i=("66"==o?i+"4200":"77"==o?i+"4d00":i+"6400")+(a>>4).toString(16),i+=(15&a).toString(16),r=r.replace(n[0],i)}return r}function Ne(e){this.h=e,this.g=null}function je(e){this.h=e,this.g=null}function De(e,t){var r={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.o=null==e.maxAttempts?r.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?r.baseDelay:e.baseDelay,this.m=null==e.fuzzFactor?r.fuzzFactor:e.fuzzFactor,this.l=null==e.backoffFactor?r.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Le(e){return I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:if(e.g>=e.o){if(!e.i)return t.return(_Promise.reject());e.g=1,e.h=e.j}return r=e.g,e.g++,0==r?t.return():(n=e.h*(1+(2*Math.random()-1)*e.m),x(t,new _Promise((function(e){new je(e).V(n/1e3)})),2));case 2:e.h*=e.l,M(t)}}))}))}function Ue(e,t){this.promise=e,this.se=t,this.g=!1}function Fe(e){return new Ue(_Promise.reject(e),(function(){return _Promise.resolve()}))}function Be(){var e=_Promise.reject(new ne(2,7,7001));return e.catch((function(){})),new Ue(e,(function(){return _Promise.resolve()}))}function Ke(e){return new Ue(_Promise.resolve(e),(function(){return _Promise.resolve()}))}function He(e){return new Ue(e,(function(){return e.catch((function(){}))}))}function Ve(e){return new Ue(_Promise.all(_mapInstanceProperty(e).call(e,(function(e){return e.promise}))),(function(){return _Promise.all(_mapInstanceProperty(e).call(e,(function(e){return e.abort()})))}))}function Ge(t,r){for(var n in r=void 0===r?{}:r)this[n]=r[n];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():_Date$now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function We(){this.g={}}function ze(){this.hd=new We,this.jc=this}function qe(e){var t=new _Set;return function e(r){switch(_typeof$1(r)){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||r.buffer&&r.buffer.constructor==ArrayBuffer)return r;if(t.has(r))return null;var n=r.constructor==Array;if(r.constructor!=Object&&!n)return null;t.add(r);var i,o=n?[]:{};for(i in r)o[i]=e(r[i]);return n&&(o.length=r.length),o}}(e)}function Ye(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Xe(e,t){var r=_indexOfInstanceProperty(e).call(e,t);-1<r&&_spliceInstanceProperty(e).call(e,r,1)}function Je(e,t,r){if(r||(r=Ye),e.length!=t.length)return!1;t=_sliceInstanceProperty(t).call(t);for(var n={},i=(e=b(e)).next();!i.done;n={item:n.item},i=e.next()){if(n.item=i.value,-1==(i=_findIndexInstanceProperty(t).call(t,function(e){return function(t){return r(e.item,t)}}(n))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Qe(){this.g=[]}function Ze(e,t){e.g.push(t.finally((function(){Xe(e.g,t)})))}function et(e){ze.call(this),this.j=!1,this.l=new Qe,this.g=new _Set,this.h=new _Set,this.i=e||null}X("shaka.util.Uint8ArrayUtils.toBase64",Re.Mc),Re.Ja=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r},X("shaka.util.Uint8ArrayUtils.fromBase64",Re.Ja),Re.$c=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},X("shaka.util.Uint8ArrayUtils.fromHex",Re.$c),Re.Nc=function(e){for(var t="",r=0;r<e.length;++r){var n=e[r].toString(16);1==n.length&&(n="0"+n),t+=n}return t},X("shaka.util.Uint8ArrayUtils.toHex",Re.Nc),Re.Ha=function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!=t[r])return!1;return!0},X("shaka.util.Uint8ArrayUtils.equal",Re.Ha),Re.concat=function(e){for(var t=[],r=0;r<arguments.length;++r)t[r]=arguments[r];for(var n=r=0;n<t.length;++n)r+=t[n].length;r=new Uint8Array(r);for(var i=n=0;i<t.length;++i)r.set(t[i],n),n+=t[i].length;return r},X("shaka.util.Uint8ArrayUtils.concat",_concatInstanceProperty(Re)),xe.prototype.destroy=function(){return this.g.dispose(),this.g=null,_Promise.resolve()},xe.prototype.o=function(e){this.i=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.l.push(t)},xe.prototype.m=function(){var e={data:_concatInstanceProperty(Re).apply(null,this.l),captions:this.i};this.h.resolve(e),this.j=!1},Ne.prototype.V=function(t){var r=this;this.stop();var n=!0,i=null;return this.g=function(){e.clearTimeout(i),n=!1},i=_setTimeout((function(){n&&r.h()}),1e3*t),this},Ne.prototype.stop=function(){this.g&&(this.g(),this.g=null)},X("shaka.util.Timer",je),je.prototype.Lc=function(){return this.stop(),this.h(),this},je.prototype.tickNow=je.prototype.Lc,je.prototype.V=function(e){var t=this;return this.stop(),this.g=new Ne((function(){t.h()})).V(e),this},je.prototype.tickAfter=je.prototype.V,je.prototype.Oa=function(e){var t=this;return this.stop(),this.g=new Ne((function(){t.g.V(e),t.h()})).V(e),this},je.prototype.tickEvery=je.prototype.Oa,je.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},je.prototype.stop=je.prototype.stop,X("shaka.util.AbortableOperation",Ue),Ue.failed=Fe,Ue.aborted=Be,Ue.completed=Ke,Ue.notAbortable=He,Ue.prototype.abort=function(){return this.g=!0,this.se()},Ue.prototype.abort=Ue.prototype.abort,Ue.all=Ve,Ue.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Ue.prototype.finally=Ue.prototype.finally,Ue.prototype.ca=function(e,t){function r(r){return function(s){if(i.g&&r)o.reject(a);else{var l=r?e:t;l?n=function(e,t,r){try{var n=e(t);return n&&n.promise&&n.abort?(r.resolve(n.promise),function(){return n.abort()}):(r.resolve(n),function(){return _Promise.resolve(n).then((function(){}),(function(){}))})}catch(e){return r.reject(e),function(){return _Promise.resolve()}}}(l,s,o):(r?o.resolve:o.reject)(s)}}}function n(){return o.reject(a),i.abort()}var i=this,o=new Pe,a=new ne(2,7,7001);return this.promise.then(r(!0),r(!1)),new Ue(o,(function(){return n()}))},Ue.prototype.chain=Ue.prototype.ca,X("shaka.util.FakeEvent",Ge),Ge.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Ge.prototype.stopImmediatePropagation=function(){this.g=!0},Ge.prototype.stopPropagation=function(){},(p=We.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},p.get=function(e){return(e=this.g[e])?_sliceInstanceProperty(e).call(e):null},p.getAll=function(){var e,t=[];for(e in this.g)t.push.apply(t,this.g[e]);return t},p.remove=function(e,t){var r=this.g[e];if(r)for(var n=0;n<r.length;++n)r[n]==t&&(_spliceInstanceProperty(r).call(r,n,1),--n)},p.forEach=function(e){for(var t in this.g)e(t,this.g[t])},p.size=function(){return _Object$keys(this.g).length},ze.prototype.addEventListener=function(e,t){this.hd.push(e,t)},ze.prototype.removeEventListener=function(e,t){this.hd.remove(e,t)},ze.prototype.dispatchEvent=function(e){for(var t=this.hd.get(e.type)||[],r=0;r<t.length;++r){e.target=this.jc,e.currentTarget=this.jc;var n=t[r];try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){re.error("Uncaught exception in event handler",e,e?e.message:null,e?e.stack:null)}if(e.g)break}return e.defaultPrevented},Qe.prototype.destroy=function(){var e,t=[];return _forEachInstanceProperty(e=this.g).call(e,(function(e){e.promise.catch((function(){})),t.push(e.abort())})),this.g=[],_Promise.all(t)},J(et,ze),X("shaka.net.NetworkingEngine",et),et.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},et.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var tt={};function rt(e,t,r){r=r||3;var n=tt[e];(!n||r>=n.priority)&&(tt[e]={priority:r,mg:t})}function nt(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function it(e,t,r,n,i,o,a){var s=new oe(r.uris[i]),l=s.Ba,c=!1;l||(l=location.protocol,ae(s,l=_sliceInstanceProperty(l).call(l,0,-1)),r.uris[i]=s.toString()),l=l.toLowerCase();var u,p=(l=tt[l])?l.mg:null;return p?He(Le(n)).ca((function(){return e.j?Be():(u=_Date$now(),p(r.uris[i],r,t,(function(r,n,i){e.i&&1==t&&(e.i(r,n),c=!0,a.g=i)})))})).ca((function(e){return null==e.timeMs&&(e.timeMs=_Date$now()-u),{response:e,Nf:c}}),(function(s){if(s&&7001==s.code)throw s;if(e.j)return Be();if(s&&1==s.severity)return e.dispatchEvent(new Ge("retry",{error:s instanceof ne?s:null})),i=(i+1)%r.uris.length,it(e,t,r,n,i,s,a);throw s||o})):Fe(new ne(2,1,1e3,s))}function ot(){this.g=0}function at(e,t,r){Ue.call(this,e,t),this.h=r}function st(){}function lt(){this.g=new We}function ct(e,t,r,n){this.target=e,this.type=t,this.listener=r,this.g=function(e,t){var r;if(null==t)return!1;if("boolean"==typeof t)return t;var n=new _Set(["passive","capture"]);return _filterInstanceProperty(r=_Object$keys(t)).call(r,(function(e){return!n.has(e)})),function(e){var t=ut;if(null==t){t=!1;try{var r={},n={get:function(){return t=!0,!1}};_Object$defineProperty(r,"passive",n),_Object$defineProperty(r,"capture",n),n=function(){},e.addEventListener("test",n,r),e.removeEventListener("test",n,r)}catch(e){t=!1}ut=t}return t||!1}(e)?t:t.capture||!1}(e,n),this.target.addEventListener(t,r,this.g)}et.registerScheme=rt,et.unregisterScheme=function(e){delete tt[e]},et.prototype.og=function(e){this.g.add(e)},et.prototype.registerRequestFilter=et.prototype.og,et.prototype.Ng=function(e){this.g.delete(e)},et.prototype.unregisterRequestFilter=et.prototype.Ng,et.prototype.bf=function(){this.g.clear()},et.prototype.clearAllRequestFilters=et.prototype.bf,et.prototype.pg=function(e){this.h.add(e)},et.prototype.registerResponseFilter=et.prototype.pg,et.prototype.Og=function(e){this.h.delete(e)},et.prototype.unregisterResponseFilter=et.prototype.Og,et.prototype.cf=function(){this.h.clear()},et.prototype.clearAllResponseFilters=et.prototype.cf,et.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},et.makeRequest=nt,et.prototype.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.destroy()},et.prototype.destroy=et.prototype.destroy,et.prototype.request=function(e,t){var r=this,n=new ot;if(this.j){var i=_Promise.reject(new ne(2,7,7001));return i.catch((function(){})),new at(i,(function(){return _Promise.resolve()}),n)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?qe(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=qe(t.uris),i=function(e,t,r){for(var n=Ke(void 0),i={},o=(e=b(e.g)).next();!o.done;i={Gd:i.Gd},o=e.next())i.Gd=o.value,n=n.ca(function(e){return function(){return e.Gd(t,r)}}(i));return n.ca(void 0,(function(e){if(e&&7001==e.code)throw e;throw new ne(2,1,1006,e)}))}(this,e,t);var o=i.ca((function(){return it(r,e,t,new De(t.retryParameters,!1),0,null,n)})),a=o.ca((function(t){return function(e,t,r){for(var n=Ke(void 0),i=(e=b(e.h)).next();!i.done;i=e.next()){var o;n=n.ca(_bindInstanceProperty(o=i.value).call(o,null,t,r.response))}return n.ca((function(){return r}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof ne&&(t=e.severity),new ne(t,1,1007,e)}))}(r,e,t)})),s=_Date$now(),l=0;i.promise.then((function(){l=_Date$now()-s}),(function(){}));var c=0;return o.promise.then((function(){c=_Date$now()}),(function(){})),i=new at((i=a.ca((function(t){var n=_Date$now()-c,i=t.response;return i.timeMs+=l,i.timeMs+=n,t.Nf||!r.i||i.fromCache||1!=e||r.i(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.se,n),Ze(this.l,i),i},et.prototype.request=et.prototype.request,et.NumBytesRemainingClass=ot,O(at,Ue),et.PendingRequest=at,at.all=Ve,at.notAbortable=He,at.completed=Ke,at.aborted=Be,at.failed=Fe,X("shaka.util.IReleasable",st),st.prototype.release=function(){},X("shaka.util.EventManager",lt),lt.prototype.release=function(){this.nb(),this.g=null},lt.prototype.release=lt.prototype.release,lt.prototype.H=function(e,t,r,n){this.g&&(e=new ct(e,t,r,n),this.g.push(t,e))},lt.prototype.listen=lt.prototype.H,lt.prototype.ya=function(e,t,r,n){var i=this;this.H(e,t,(function n(o){i.ta(e,t,n),r(o)}),n)},lt.prototype.listenOnce=lt.prototype.ya,lt.prototype.ta=function(e,t,r){if(this.g)for(var n=this.g.get(t)||[],i=(n=b(n)).next();!i.done;i=n.next())(i=i.value).target!=e||r!=i.listener&&r||(i.ta(),this.g.remove(t,i))},lt.prototype.unlisten=lt.prototype.ta,lt.prototype.nb=function(){if(this.g){for(var e=this.g.getAll(),t=(e=b(e)).next();!t.done;t=e.next())t.value.ta();this.g.g={}}},lt.prototype.removeAll=lt.prototype.nb,ct.prototype.ta=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1},ct.prototype.unlisten=ct.prototype.ta;var ut=void 0;function pt(e){return new oe(e=Ee(e)).Aa}function ft(e,t,r){function n(e){new DataView(i.buffer).setUint32(o,e.byteLength,!0),o+=4,i.set(e,o),o+=e.byteLength}if(!r||!r.byteLength)throw new ne(2,6,6015);t="string"==typeof t?new Uint8Array(Oe(t,!0)):new Uint8Array(t),e=Oe(e=Ee(e),!0);var i=new Uint8Array(12+e.byteLength+t.byteLength+r.byteLength),o=0;return n(new Uint8Array(e)),n(t),n(new Uint8Array(r)),i}function dt(e,t){for(var r=[],n=b(e),i=n.next();!i.done;i=n.next())r.push(t(i.value));return r}function ht(e,t){for(var r=b(e),n=r.next();!n.done;n=r.next())if(!t(n.value))return!1;return!0}function yt(e){var t,r=new _Map;return _forEachInstanceProperty(t=_Object$keys(e)).call(t,(function(t){r.set(t,e[t])})),r}function gt(e){var t={};return _forEachInstanceProperty(e).call(e,(function(e,r){t[r]=e})),t}function $t(e,t){var r=e;return t&&(r+='; codecs="'+t+'"'),r}function mt(e){return(e=e.split(/ *; */)).shift(),(e=_findInstanceProperty(e).call(e,(function(e){return _startsWithInstanceProperty(e).call(e,"codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function vt(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}X("shaka.util.FairPlayUtils.defaultGetContentId",pt),X("shaka.util.FairPlayUtils.initDataTransform",ft);var bt=(new _Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function St(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function It(e){return""!=Tt().canPlayType(e)}function Pt(){return Et("Tizen")}function _t(){var e;return!!navigator.vendor&&_includesInstanceProperty(e=navigator.vendor).call(e,"Apple")&&!Pt()}function wt(){if(!_t())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?_parseInt$1(e[1],10):null}function Et(e){var t;return _includesInstanceProperty(t=navigator.userAgent||"").call(t,e)}function Tt(){return At||(Ot||(Ot=new je((function(){At=null}))),(At=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(At=document.createElement("video")),Ot.V(1),At)}var Ot=null,At=null;function Ct(e,t){var r=this;t=void 0===t?1:t,this.J=e,this.C=new _Set,this.m=this.o=null,this.Z=!1,this.P=0,this.g=null,this.u=new lt,this.h=new _Map,this.F=[],this.A=new Pe,this.j=null,this.l=function(t){r.A.reject(t),e.onError(t)},this.wa=new _Map,this.da=new _Map,this.X=new je((function(){return function(e){var t=e.wa,r=e.da;r.clear(),_forEachInstanceProperty(t).call(t,(function(e,t){return r.set(t,e)})),t=_Array$from(_valuesInstanceProperty(r).call(r)),t.length&&_everyInstanceProperty(t).call(t,(function(e){return"expired"==e}))&&e.l(new ne(2,6,6014)),e.J.Dc(gt(r))}(r)})),this.i=!1,this.ua=new Pe,this.L=!1,this.M=[],this.va=!1,this.ea=new je((function(){!function(e){var t;_forEachInstanceProperty(t=e.h).call(t,(function(t,r){var n=t.xd,i=r.expiration;isNaN(i)&&(i=1/0),i!=n&&(e.J.onExpirationUpdated(r.sessionId,i),t.xd=i)}))}(r)})).Oa(t),this.A.catch((function(){}))}function Rt(e,t,r){return e.F=r,e.L=0<r.length,xt(e,t)}function xt(t,r){var n=function(t){if(t=yt(t.j.clearKeys),0==t.size)return null;var r=[],n=[];_forEachInstanceProperty(t).call(t,(function(e,t){var i=Re.$c(t),o=Re.$c(e);i={kty:"oct",kid:Re.Mc(i,!1),k:Re.Mc(o,!1)},r.push(i),n.push(i.kid)})),t=_JSON$stringify({keys:r});var i=_JSON$stringify({kids:n});return i=[{initData:new Uint8Array(Te(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(t);if(n)for(var i=b(r),o=i.next();!o.done;o=i.next())o.value.drmInfos=[n];for((n=_someInstanceProperty(r).call(r,(function(e){return 0<e.drmInfos.length})))||function(e,t){var r=[];_forEachInstanceProperty(t).call(t,(function(e,t){r.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var n=b(e),i=n.next();!i.done;i=n.next())i.value.drmInfos=r}(r,o=yt(t.j.servers)),o=(i=b(r)).next();!o.done;o=i.next())for(var a=(o=b(o.value.drmInfos)).next();!a.done;a=o.next())Yt(a.value,yt(t.j.servers),yt(t.j.advanced||{}));return o=function(e,t){for(var r=new _Set,n=b(t),i=n.next();!i.done;i=n.next()){var o=b(i.value.drmInfos);for(i=o.next();!i.done;i=o.next())r.add(i.value)}for(n=b(r),i=n.next();!i.done;i=n.next())Yt(i.value,yt(e.j.servers),yt(e.j.advanced||{}));o=e.L?"required":"optional";var a=e.L?["persistent-license"]:["temporary"];for(n=new _Map,r=b(r),i=r.next();!i.done;i=r.next())i=i.value,n.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:o,sessionTypes:a,label:i.keySystem,drmInfos:[]});for(r=b(t),i=r.next();!i.done;i=r.next()){o=(i=i.value).audio,a=i.video;var s=o?Ut(o):"",l=a?Ut(a):"",c=b(i.drmInfos);for(i=c.next();!i.done;i=c.next()){i=i.value;var u=n.get(i.keySystem);u.drmInfos.push(i),i.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required"),i.persistentStateRequired&&(u.persistentState="required"),o&&(u.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),"ac-3"==o.codecs.toLowerCase()&&Pt()&&u.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:$t(o.mimeType,"ec-3")})),a&&u.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:l})}}return n}(t,r),o.size?(o=Ft(t,o),n?o:o.catch((function(){}))):(t.Z=!0,_Promise.resolve())}function Mt(e){return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:if(!(e.o&&e.g&&e.g.serverCertificate&&e.g.serverCertificate.length)){t.I(0);break}return k(t,3),x(t,e.o.setServerCertificate(e.g.serverCertificate),5);case 5:t.B||re.v("Server certificates are not supported by the key system. The server certificate has been ignored."),j(t,0);break;case 3:return r=D(t),t.return(_Promise.reject(new ne(2,6,6004,r.message)))}}))}))}function kt(e){var t,r=e.g?e.g.initData:[];return _forEachInstanceProperty(r).call(r,(function(t){return Nt(e,t.initDataType,t.initData)})),_forEachInstanceProperty(t=e.F).call(t,(function(t){return Bt(e,t)})),r.length||e.F.length||e.A.resolve(),e.A}function Nt(e,t,r){for(var n,i=_valuesInstanceProperty(n=e.h).call(n),o=(i=b(i)).next();!o.done;o=i.next())if(Re.Ha(r,o.value.initData)&&!Et("Tizen 2"))return void re.debug("Ignoring duplicate init data.");!function(e,t,r){var n,i;try{if(e.L){re.K("Creating new persistent session");var o=e.o.createSession("persistent-license")}else re.K("Creating new temporary session"),o=e.o.createSession()}catch(t){return void e.l(new ne(2,6,6005,t.message))}e.u.H(o,"message",_bindInstanceProperty(n=e.ye).call(n,e)),e.u.H(o,"keystatuseschange",_bindInstanceProperty(i=e.we).call(i,e)),e.h.set(o,{initData:r,loaded:!1,xd:1/0,Ga:null});try{r=e.j.initDataTransform(r,e.g)}catch(r){return t=r,r instanceof ne||(t=new ne(2,6,6016,r)),void e.l(t)}o.generateRequest(t,r).catch((function(t){if(!e.i){if(e.h.delete(o),t.errorCode&&t.errorCode.systemCode){var r=t.errorCode.systemCode;0>r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.l(new ne(2,6,6006,t.message,t,r))}}))}(e,t,r)}function jt(e){return e?e.keySystem:""}function Dt(e,t){if(navigator.userAgent.match(/Edge\//))return!0;if(t=t.toLowerCase(),Pt()&&_includesInstanceProperty(t).call(t,'codecs="ac-3"')){var r=t.replace("ac-3","ec-3");return e.C.has(t)||e.C.has(r)}return e.C.has(t)}function Lt(e){var t;return e=dt(e=_keysInstanceProperty(t=e.h).call(t),(function(e){return e.sessionId})),_Array$from(e)}function Ut(e){var t=$t(e.mimeType,e.codecs);return Me(t)?ke(e.type,t):t}function Ft(e,t){var r,n,i,o,a;if(1==t.size&&t.has(""))return _Promise.reject(new ne(2,6,6e3));for(var s=b(_valuesInstanceProperty(t).call(t)),l=s.next();!l.done;l=s.next())0==(l=l.value).audioCapabilities.length&&delete l.audioCapabilities,0==l.videoCapabilities.length&&delete l.videoCapabilities;var c=s=new Pe;return _forEachInstanceProperty(r=[!0,!1]).call(r,_bindInstanceProperty(n=function(e){var r=this;_forEachInstanceProperty(t).call(t,(function(t,n){var i,o;_someInstanceProperty(i=t.drmInfos).call(i,(function(e){return!!e.licenseServerUri}))==e&&(c=c.catch(_bindInstanceProperty(o=function(){if(!this.i)return navigator.requestMediaKeySystemAccess(n,[t])}).call(o,r)))}))}).call(n,e)),c=(c=c.catch((function(){return _Promise.reject(new ne(2,6,6001))}))).then(_bindInstanceProperty(i=function(e){if(this.i)return _Promise.reject();this.C.clear();var r=e.getConfiguration(),n=r.videoCapabilities||[],i=b(r.audioCapabilities||[]);for(r=i.next();!r.done;r=i.next())this.C.add(r.value.contentType.toLowerCase());for(r=(n=b(n)).next();!r.done;r=n.next())this.C.add(r.value.contentType.toLowerCase());n=e.keySystem,i=[];var o=[],a=[],s=[];return function(e,t,r,n,i){_forEachInstanceProperty(e).call(e,(function(e){var o;if(_includesInstanceProperty(t).call(t,e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(_someInstanceProperty(r).call(r,(function(t){return Re.Ha(t,e.serverCertificate)}))||r.push(e.serverCertificate)),e.initData&&_forEachInstanceProperty(o=e.initData).call(o,(function(e){_someInstanceProperty(n).call(n,(function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&Re.Ha(t.initData,e.initData)}))||n.push(e)})),e.keyIds)for(var a=0;a<e.keyIds.length;++a)_includesInstanceProperty(i).call(i,e.keyIds[a])||i.push(e.keyIds[a])}))}((r=t.get(e.keySystem)).drmInfos,i,o,a,s),1<o.length&&re.v("Multiple unique server certificates found! Only the first will be used."),1<i.length&&re.v("Multiple unique license server URIs found! Only the first will be used."),this.g={keySystem:n,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==r.distinctiveIdentifier,persistentStateRequired:"required"==r.persistentState,audioRobustness:(r.audioCapabilities?r.audioCapabilities[0].robustness:"")||"",videoRobustness:(r.videoCapabilities?r.videoCapabilities[0].robustness:"")||"",serverCertificate:o[0],initData:a,keyIds:s},this.g.licenseServerUri?e.createMediaKeys():_Promise.reject(new ne(2,6,6012,this.g.keySystem))}).call(i,e)).then(_bindInstanceProperty(o=function(e){if(this.i)return _Promise.reject();re.info("Created MediaKeys object for key system",this.g.keySystem),this.o=e,this.Z=!0}).call(o,e)).catch(_bindInstanceProperty(a=function(e){if(!this.i)return this.g=null,this.C.clear(),e instanceof ne?_Promise.reject(e):_Promise.reject(new ne(2,6,6002,e.message))}).call(a,e)),s.reject(),c}function Bt(e,t){var r,n,i,o;try{re.K("Attempting to load an offline session",t);var a=e.o.createSession("persistent-license")}catch(t){var s=new ne(2,6,6005,t.message);return e.l(s),_Promise.reject(s)}e.u.H(a,"message",_bindInstanceProperty(r=e.ye).call(r,e)),e.u.H(a,"keystatuseschange",_bindInstanceProperty(n=e.we).call(n,e));var l={initData:null,loaded:!1,xd:1/0,Ga:null};return e.h.set(a,l),a.load(t).then(_bindInstanceProperty(i=function(e){return this.i?_Promise.reject():(re.O("Loaded offline session",t,e),e?(l.loaded=!0,qt(this)&&this.A.resolve(),a):(this.h.delete(a),void this.l(new ne(2,6,6013))))}).call(i,e),_bindInstanceProperty(o=function(e){this.i||(this.h.delete(a),this.l(new ne(2,6,6005,e.message)))}).call(o,e))}function Kt(e,t){var r;if(_startsWithInstanceProperty(r=jt(t)).call(r,"com.apple.fps")){var n=t.serverCertificate;e=ft(e,pt(e),n)}return e}function Ht(e,t){var r,n,i,o,a=t.target;re.K("Sending license request for session",a.sessionId,"of type",t.messageType);var s=e.h.get(a),l=e.g.licenseServerUri,c=e.j.advanced[e.g.keySystem];"individualization-request"==t.messageType&&c&&c.individualizationServer&&(l=c.individualizationServer),(l=nt([l],e.j.retryParameters)).body=t.message,l.method="POST",l.licenseRequestType=t.messageType,l.sessionId=a.sessionId,"com.microsoft.playready"!=e.g.keySystem&&"com.chromecast.playready"!=e.g.keySystem||function(e){var t=we(e.body,!0,!0);if(_includesInstanceProperty(t).call(t,"PlayReadyKeyMessage")){re.debug("Unwrapping PlayReady request.");for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),n=0;n<r.length;++n)e.headers[r[n].getElementsByTagName("name")[0].textContent]=r[n].getElementsByTagName("value")[0].textContent;e.body=Re.Ja(t.getElementsByTagName("Challenge")[0].textContent).buffer}else re.debug("PlayReady request is already unwrapped."),e.headers["Content-Type"]="text/xml; charset=utf-8"}(l),_startsWithInstanceProperty(r=e.g.keySystem).call(r,"com.apple.fps")&&e.j.fairPlayTransform&&function(e){var t=new Uint8Array(e.body);t="spc="+Re.Mc(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=Te(t)}(l);var u=_Date$now();e.J.Ib.request(2,l).promise.then(_bindInstanceProperty(n=function(e){var t,r;return this.i?_Promise.reject():(_startsWithInstanceProperty(t=this.g.keySystem).call(t,"com.apple.fps")&&this.j.fairPlayTransform&&function(e){try{var t=_e(e.data)}catch(e){return}t=_trimInstanceProperty(t).call(t),"<ckc>"===t.substr(0,5)&&"</ckc>"===t.substr(-6)&&(t=_sliceInstanceProperty(t).call(t,5,-6));try{t=JSON.parse(t).ckc}catch(e){}e.data=Re.Ja(t).buffer}(e),this.P+=(_Date$now()-u)/1e3,re.K("Updating session",a.sessionId),a.update(e.data).then(_bindInstanceProperty(r=function(){var e=this;this.J.onEvent(new Ge("drmsessionupdate")),s&&(s.Ga&&s.Ga.resolve(),new je((function(){s.loaded=!0,qt(e)&&e.A.resolve()})).V(Jt))}).call(r,this)))}).call(n,e),_bindInstanceProperty(i=function(e){this.i||(e=new ne(2,6,6007,e),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(i,e)).catch(_bindInstanceProperty(o=function(e){this.i||(e=new ne(2,6,6008,e.message),this.l(e),s&&s.Ga&&s.Ga.reject(e))}).call(o,e))}function Vt(){var e;var t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],r=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],n=new _Map;return t=_mapInstanceProperty(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ")).call(e,(function(e){return t=e,I((function e(){var i,o,a;return V(e,(function(e){switch(e.s){case 1:return k(e,2),x(e,navigator.requestMediaKeySystemAccess(t,r),4);case 4:return i=e.B,a=!!(o=i.getConfiguration().sessionTypes)&&_includesInstanceProperty(o).call(o,"persistent-license"),Et("Tizen 3")&&(a=!1),n.set(t,{persistentState:a}),x(e,i.createMediaKeys(),5);case 5:j(e,0);break;case 2:D(e),n.set(t,null),M(e)}}))}));var t})),_Promise.all(t).then((function(){return gt(n)}))}function Gt(e,t){var r,n=t.audio,i=t.video;if(n&&n.encrypted&&!Dt(e,n=Ut(n))||i&&i.encrypted&&!Dt(e,i=Ut(i)))return!1;var o=jt(e.g);return 0==t.drmInfos.length||_someInstanceProperty(r=t.drmInfos).call(r,(function(e){return e.keySystem==o}))}function Wt(e,t){if(!e.length)return t;if(!t.length)return e;for(var r=[],n=0;n<e.length;n++)for(var i=0;i<t.length;i++)if(e[n].keySystem==t[i].keySystem){var o=e[n];i=t[i];var a=[];a=_concatInstanceProperty(a).call(a,o.initData||[]),a=_concatInstanceProperty(a).call(a,i.initData||[]);var s=[];s=_concatInstanceProperty(s).call(s,o.keyIds),s=_concatInstanceProperty(s).call(s,i.keyIds),r.push({keySystem:o.keySystem,licenseServerUri:o.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:o.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:o.persistentStateRequired||i.persistentStateRequired,videoRobustness:o.videoRobustness||i.videoRobustness,audioRobustness:o.audioRobustness||i.audioRobustness,serverCertificate:o.serverCertificate||i.serverCertificate,initData:a,keyIds:s});break}return r}function zt(e){return I((function t(){var r;return V(t,(function(t){var n;if(1===t.s)return r=_Array$from(_keysInstanceProperty(n=e.h).call(n)),e.h.clear(),x(t,_Promise.all(_mapInstanceProperty(r).call(r,(function(e){return I((function t(){return V(t,(function(t){switch(t.s){case 1:return re.K("Closing session",e.sessionId),k(t,2),x(t,function(e){return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:return r=new _Promise((function(e,t){new je(t).V(Xt)})),k(t,2),x(t,_Promise.race([_Promise.all([e.close(),e.closed]),r]),4);case 4:j(t,0);break;case 2:D(t),re.v("Timeout waiting for session close"),M(t)}}))}))}(e),4);case 4:j(t,0);break;case 2:D(t),M(t)}}))}))}))),0)}))}))}function qt(e){var t;return ht(e=_valuesInstanceProperty(t=e.h).call(t),(function(e){return e.loaded}))}function Yt(t,r,n){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(r.size&&(r=r.get(t.keySystem)||"",t.licenseServerUri=r),t.keyIds||(t.keyIds=[]),(n=n.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=n.persistentStateRequired),t.videoRobustness||(t.videoRobustness=n.videoRobustness),t.audioRobustness||(t.audioRobustness=n.audioRobustness),t.serverCertificate||(t.serverCertificate=n.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}(p=Ct.prototype).destroy=function(){var e=this;return I((function t(){return V(t,(function(t){switch(t.s){case 1:return e.i?x(t,e.ua,0):(e.i=!0,x(t,function(e){return I((function t(){return V(t,(function(t){switch(t.s){case 1:return e.u.release(),e.u=null,e.A.reject(),e.ea.stop(),e.ea=null,e.X.stop(),e.X=null,x(t,zt(e),2);case 2:if(!e.m){t.I(3);break}return k(t,4),x(t,e.m.setMediaKeys(null),6);case 6:j(t,5);break;case 4:D(t);case 5:e.m=null;case 3:e.g=null,e.C.clear(),e.o=null,e.F=[],e.j=null,e.l=null,e.J=null,M(t)}}))}))}(e),4));case 4:e.ua.resolve(),t.I(0)}}))}))},p.configure=function(e){this.j=e},p.Ub=function(e){var t=this;if(!this.o)return this.u.ya(e,"encrypted",(function(){t.l(new ne(2,6,6010))})),_Promise.resolve();this.m=e,this.u.ya(this.m,"play",(function(){for(var e=0;e<t.M.length;e++)Ht(t,t.M[e]);t.va=!0,t.M=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.m&&this.u.H(this.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return zt(t)})),e=(e=this.m.setMediaKeys(this.o)).catch((function(e){return _Promise.reject(new ne(2,6,6003,e.message))}));var r=Mt(this);return _Promise.all([e,r]).then((function(){if(t.i)return _Promise.reject();kt(t),t.g.initData.length||t.F.length||t.u.H(t.m,"encrypted",(function(e){return Nt(t,e.initDataType,new Uint8Array(e.initData))}))})).catch((function(e){if(!t.i)return _Promise.reject(e)}))},p.Xb=function(){for(var e,t=1/0,r=_keysInstanceProperty(e=this.h).call(e),n=(r=b(r)).next();!n.done;n=r.next())n=n.value,isNaN(n.expiration)||(t=Math.min(t,n.expiration));return t},p.ye=function(e){this.m&&this.j.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.va?this.M.push(e):Ht(this,e)},p.we=function(e){var t,r;e=e.target,re.O("Key status changed for session",e.sessionId);var n=this.h.get(e),i=!1;_forEachInstanceProperty(t=e.keyStatuses).call(t,_bindInstanceProperty(r=function(e,t){if("string"==typeof t){var r=t;t=e,e=r}if("com.microsoft.playready"==this.g.keySystem&&16==t.byteLength&&(Et("Trident/")||navigator.userAgent.match(/Edge?\//))){var o=(r=new DataView(t)).getUint32(0,!0),a=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,a,!1),r.setUint16(6,s,!1)}"com.microsoft.playready"==this.g.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(n.loaded=!0),"expired"==e&&(i=!0),r=Re.Nc(new Uint8Array(t)),this.wa.set(r,e)}).call(r,this));var o=e.expiration-_Date$now();(0>o||i&&1e3>o)&&n&&!n.Ga&&(re.debug("Session has expired",e.sessionId),this.h.delete(e),e.close().catch((function(){}))),qt(this)&&(this.A.resolve(),this.X.V(Qt))};var Xt=1,Jt=5,Qt=.5;function Zt(){this.g=new muxjs.mp4.CaptionParser,this.l=[],this.j={}}function er(){}function tr(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function rr(e,t,r){return r=void 0===r?0:r,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+r>=e.start(0)}function nr(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var r=0,n=e.length-1;0<=n&&e.end(n)>t;--n)r+=e.end(n)-Math.max(e.start(n),t);return r}function ir(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}function or(e,t,r){this.startTime=e,this.direction=pr,this.endTime=t,this.payload=r,this.region=new vr,this.position=null,this.positionAlign=ar,this.size=0,this.textAlign=sr,this.writingMode=fr,this.lineInterpretation=dr,this.line=null,this.lineHeight="",this.lineAlign=hr,this.displayAlign=cr,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=gr,this.fontStyle=$r,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}Zt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.l=t.videoTrackIds(e),this.j=t.timescale(e),this.g.init()},Zt.prototype.h=function(e,t){var r=new Uint8Array(e);(r=this.g.parse(r,this.l,this.j))&&r.captions&&t(r.captions),this.g.clearParsedCaptions()},Zt.prototype.i=function(){this.g.resetCaptionStream()},er.prototype.init=function(){},er.prototype.h=function(){},er.prototype.i=function(){},X("shaka.text.Cue",or),or.prototype.clone=function(){var e,t=new or(0,0,"");for(e in this){var r;t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=_sliceInstanceProperty(r=t[e]).call(r))}return t};var ar="auto";or.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ar};var sr="center",lr={LEFT:"left",RIGHT:"right",CENTER:sr,START:"start",END:"end"};or.textAlign=lr;var cr="after",ur={BEFORE:"before",CENTER:"center",AFTER:cr};or.displayAlign=ur;var pr="ltr";or.direction={HORIZONTAL_LEFT_TO_RIGHT:pr,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var fr="horizontal-tb";or.writingMode={HORIZONTAL_TOP_TO_BOTTOM:fr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var dr=0;or.lineInterpretation={LINE_NUMBER:dr,PERCENTAGE:1};var hr="start",yr={CENTER:"center",START:hr,END:"end"};or.lineAlign=yr;var gr=400;or.fontWeight={NORMAL:gr,BOLD:700};var $r="normal",mr={NORMAL:$r,ITALIC:"italic",OBLIQUE:"oblique"};function vr(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=br,this.scroll=Sr}or.fontStyle=mr,or.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},X("shaka.text.CueRegion",vr);var br=1;vr.units={PX:0,PERCENTAGE:br,LINES:2};var Sr="";function Ir(e){this.l=null,this.i=e,this.j=this.A=0,this.m=1/0,this.h=this.g=null,this.u="",this.o=new _Map}vr.scrollMode={NONE:Sr,UP:"up"};var Pr={};function _r(t){return!!(Pr[t]||e.muxjs&&"application/cea-608"==t)}function wr(e,t){"application/cea-608"!=t&&(e.l=new Pr[t])}function Er(e,t,r,n,i){for(var o=r+" "+n,a=new _Map,s=(t=b(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,a.has(s)||a.set(s,new _Map),a.get(s).has(o)||a.get(s).set(o,[]),l.startTime+=i,l.endTime+=i,l.startTime>=e.j&&l.startTime<e.m&&(l=new or(l.startTime,l.endTime,l.text),a.get(s).get(o).push(l),s==e.u&&e.i.append([l]))}for(o=(i=b(_keysInstanceProperty(a).call(a))).next();!o.done;o=i.next())for(o=o.value,e.o.has(o)||e.o.set(o,new _Map),s=(t=b(_keysInstanceProperty(c=a.get(o)).call(c))).next();!s.done;s=t.next()){var c;s=s.value,l=a.get(o).get(s),e.o.get(o).set(s,l)}e.g=null==e.g?Math.max(r,e.j):Math.min(e.g,Math.max(r,e.j)),e.h=Math.max(e.h,Math.min(n,e.m))}function Tr(e,t,r){this.j=e,this.l=r,this.h={},this.g=null,this.i={},this.o=new lt,this.F=!1,this.u={},this.A=t,this.C=new Pe,this.m=function(e,t){var r=new MediaSource;return e.o.ya(r,"sourceopen",(function(){_URL.revokeObjectURL(e.J),t.resolve()})),e.J=Or(r),e.j.src=e.J,r}(this,this.C),this.J=""}X("shaka.text.TextEngine.registerParser",(function(e,t){Pr[e]=t})),X("shaka.text.TextEngine.unregisterParser",(function(e){delete Pr[e]})),Ir.prototype.destroy=function(){return this.i=this.l=null,this.o.clear(),_Promise.resolve()},Ir.prototype.xc=function(e){try{return this.l.parseMedia(new Uint8Array(e),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(e){throw new ne(2,2,2009,e)}},Ir.prototype.remove=function(e,t){var r;return _Promise.resolve().then(_bindInstanceProperty(r=function(){!this.i||!this.i.remove(e,t)||null==this.g||t<=this.g||e>=this.h||(e<=this.g&&t>=this.h?this.g=this.h=null:e<=this.g&&t<this.h?this.g=t:e>this.g&&t>=this.h&&(this.h=e))}).call(r,this))};var Or=_URL.createObjectURL;function Ar(e){var t=$t(e.mimeType,e.codecs),r=function(e){var t=[e.mimeType];return _forEachInstanceProperty(bt).call(bt,(function(r,n){var i=e[n];i&&t.push(r+'="'+i+'"')})),t.join(";")}(e);return _r(t)||MediaSource.isTypeSupported(r)||Me(t,e.type)}function Cr(e,t){e.g||(e.g=new Ir(e.l)),wr(e.g,t)}function Rr(e){return!e.m||"ended"==e.m.readyState}function xr(e,t){if("text"==t)var r=e.g.g;else r=!(r=kr(e,t))||1==r.length&&1e-6>r.end(0)-r.start(0)?null:1==r.length&&0>r.start(0)?0:r.length?r.start(0):null;return r}function Mr(e,t){return"text"==t?e.g.h:tr(kr(e,t))}function kr(e,t){try{return e.h[t].buffered}catch(r){return t in e.h&&re.error("failed to get buffered range for "+t,r),null}}function Nr(t,r,n,i,o,a){var s,l;return"text"==r?function(e,t,r,n){var i;return _Promise.resolve().then(_bindInstanceProperty(i=function(){if(this.l&&this.i)if(null==r||null==n)this.l.parseInit(new Uint8Array(t));else{var e,i,o={periodStart:this.A,segmentStart:r,segmentEnd:n};o=_filterInstanceProperty(e=this.l.parseMedia(new Uint8Array(t),o)).call(e,_bindInstanceProperty(i=function(e){return e.startTime>=this.j&&e.startTime<this.m}).call(i,this)),this.i.append(o),null==this.g&&(this.g=Math.max(r,this.j)),this.h=Math.min(n,this.m)}}).call(i,e))}(t.g,n,i,o):t.u[r]?function(e,t){e.j=!0,e.h=new Pe,e.l=[],e.i=[];var r=new Uint8Array(t);return e.g.push(r),e.g.flush(),e.j&&e.h.reject(new ne(2,3,3018)),e.h}(t.u[r],n).then(_bindInstanceProperty(s=function(e){var t;return this.g||Cr(this,"text/vtt"),e.captions&&e.captions.length&&Er(this.g,e.captions,i,o,this.h.video.timestampOffset),Lr(this,r,_bindInstanceProperty(t=this.Me).call(t,this,r,e.data.buffer))}).call(s,t)):(a&&e.muxjs&&(t.g||Cr(t,"text/vtt"),null==i&&null==o?t.A.init(n):t.A.h(n,(function(e){e.length&&Er(t.g,e,i,o,t.h.video.timestampOffset)}))),Lr(t,r,_bindInstanceProperty(l=t.Me).call(l,t,r,n)))}function jr(e,t){var r=Mr(e,"video")||0;!function(e,t,r){if(e.u=t,t=e.o.get(t))for(var n=b(_keysInstanceProperty(t).call(t)),i=n.next();!i.done;i=n.next()){var o;(i=_filterInstanceProperty(o=t.get(i.value)).call(o,(function(e){return e.endTime<=r})))&&e.i.append(i)}}(e.g,t,r)}function Dr(e,t){var r;return"text"==t?e.g?(e.A.i(),e.g.remove(0,1/0)):_Promise.resolve():Lr(e,t,_bindInstanceProperty(r=e.Ne).call(r,e,t,0,e.m.duration))}function Lr(e,t,r){if(e.F)return _Promise.reject();if(r={start:r,p:new Pe},e.i[t].push(r),1==e.i[t].length)try{r.start()}catch(n){"QuotaExceededError"==n.name?r.p.reject(new ne(2,3,3017,t)):r.p.reject(new ne(2,3,3015,n)),Fr(e,t)}return r.p}function Ur(e,t){var r,n;if(e.F)return _Promise.reject();var i,o=[];for(i in e.h){var a,s=new Pe,l={start:_bindInstanceProperty(a=function(e){e.resolve()}).call(a,null,s),p:s};e.i[i].push(l),o.push(s),1==e.i[i].length&&l.start()}return _Promise.all(o).then(_bindInstanceProperty(r=function(){try{t()}catch(t){var e=_Promise.reject(new ne(2,3,3015,t))}for(var r in this.h)Fr(this,r);return e}).call(r,e),_bindInstanceProperty(n=function(e){throw e}).call(n,e))}function Fr(e,t){e.i[t].shift();var r=e.i[t][0];if(r)try{r.start()}catch(n){r.p.reject(new ne(2,3,3015,n)),Fr(e,t)}}function Br(e,t){return e=Hr(e),t=Hr(t),e.split("-")[0]==t.split("-")[0]}function Kr(e,t){e=Hr(e),t=Hr(t);var r=e.split("-"),n=t.split("-");return r[0]==n[0]&&1==r.length&&2==n.length}function Hr(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Wr.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Vr(e){return e.language?Hr(e.language):e.audio&&e.audio.language?Hr(e.audio.language):e.video&&e.video.language?Hr(e.video.language):"und"}function Gr(e,t){for(var r=Hr(e),n=new _Set,i=b(t),o=i.next();!o.done;o=i.next())n.add(Hr(o.value));for(o=(i=b(n)).next();!o.done;o=i.next())if((o=o.value)==r)return o;for(o=(i=b(n)).next();!o.done;o=i.next())if(Kr(o=o.value,r))return o;for(o=(i=b(n)).next();!o.done;o=i.next()){var a=o=o.value,s=r;if(a=Hr(a),s=Hr(s),a=a.split("-"),s=s.split("-"),2==a.length&&2==s.length&&a[0]==s[0])return o}for(o=(n=b(n)).next();!o.done;o=n.next())if(Kr(r,i=o.value))return i;return null}(p=Tr.prototype).destroy=function(){var e=this;this.F=!0;var t,r=[];for(t in this.i){var n=this.i[t],i=n[0];for(this.i[t]=_sliceInstanceProperty(n).call(n,0,1),i&&r.push(i.p.catch(me.Bc)),i=1;i<n.length;++i)n[i].p.reject()}for(var o in this.g&&r.push(this.g.destroy()),this.l&&r.push(this.l.destroy()),this.u)r.push(this.u[o].destroy());return _Promise.all(r).then((function(){e.o&&(e.o.release(),e.o=null),e.j&&(e.j.removeAttribute("src"),e.j.load(),e.j=null),e.m=null,e.g=null,e.l=null,e.h={},e.u={},e.A=null,e.i={}}))},p.init=function(e,t){var r=this;return I((function n(){var i;return V(n,(function(n){switch(n.s){case 1:return i=Se,x(n,r.C,2);case 2:_forEachInstanceProperty(e).call(e,(function(e,n){var o,a,s=$t(e.mimeType,e.codecs);n==i.za?Cr(r,s):(!t&&MediaSource.isTypeSupported(s)||!Me(s,n)||(r.u[n]=new xe,s=ke(n,s)),s=r.m.addSourceBuffer(s),r.o.H(s,"error",_bindInstanceProperty(o=r.Dg).call(o,r,n)),r.o.H(s,"updateend",_bindInstanceProperty(a=r.Lb).call(a,r,n)),r.h[n]=s,r.i[n]=[])})),M(n)}}))}))},p.bd=function(e){if(e.total=ir(this.j.buffered),e.audio=ir(kr(this,"audio")),e.video=ir(kr(this,"video")),e.text=[],this.g){var t=this.g.g,r=this.g.h;null!=t&&null!=r&&e.text.push({start:t,end:r})}},p.remove=function(e,t,r){var n;return"text"==e?this.g.remove(t,r):Lr(this,e,_bindInstanceProperty(n=this.Ne).call(n,this,e,t,r))},p.flush=function(e){var t;return"text"==e?_Promise.resolve():Lr(this,e,_bindInstanceProperty(t=this.lf).call(t,this,e))},p.endOfStream=function(e){var t;return Ur(this,_bindInstanceProperty(t=function(){Rr(this)||(e?this.m.endOfStream(e):this.m.endOfStream())}).call(t,this))},p.Fa=function(e){var t;return Ur(this,_bindInstanceProperty(t=function(){this.m.duration=e}).call(t,this))},p.ha=function(){return this.m.duration},p.Me=function(e,t){this.h[e].appendBuffer(t)},p.Ne=function(e,t,r){r<=t?this.Lb(e):this.h[e].remove(t,r)},p.Ve=function(e){var t=this.h[e].appendWindowStart,r=this.h[e].appendWindowEnd;this.h[e].abort(),this.h[e].appendWindowStart=t,this.h[e].appendWindowEnd=r,this.Lb(e)},p.lf=function(e){this.j.currentTime-=.001,this.Lb(e)},p.Cg=function(e,t){0>t&&(t+=.001),this.h[e].timestampOffset=t,this.Lb(e)},p.zg=function(e,t,r){this.h[e].appendWindowStart=0,this.h[e].appendWindowEnd=r,this.h[e].appendWindowStart=t,this.Lb(e)},p.Dg=function(e){this.i[e][0].p.reject(new ne(2,3,3014,this.j.error?this.j.error.code:0))},p.Lb=function(e){var t=this.i[e][0];t&&(t.p.resolve(),Fr(this,e))};var Wr=new _Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),zr={$d:function(e,t){var r,n=_reduceInstanceProperty(r=e.periods).call(r,(function(e,t){return _concatInstanceProperty(e).call(e,t.variants)}),[]);n=zr.ee(n,t),n=zr.Lf(n),n=zr.jf(n);for(var i=zr.kf(n),o=(n=b(e.periods)).next();!o.done;o=n.next()){var a;(o=o.value).variants=_filterInstanceProperty(a=o.variants).call(a,(function(e){return zr.he(e)==i||(re.debug("Dropping Variant (better codec available)",e),!1)}))}},Lf:function(e){for(var t=new We,r=(e=b(e)).next();!r.done;r=e.next()){r=r.value;var n=zr.he(r);t.push(n,r)}return t},jf:function(e){var t=0,r=new _Map,n=e.size();return _forEachInstanceProperty(e).call(e,(function(e,i){for(var o=b(i),a=o.next();!a.done;a=o.next()){var s=(a=a.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),r.has(s)||r.set(s,new We);var l=r.get(s);l.push(e,a),l.size()===n&&(t=Math.max(t,s))}}})),t?r.get(t):e},kf:function(e){var t="",r=1/0;return _forEachInstanceProperty(e).call(e,(function(e,n){for(var i=0,o=0,a=b(n),s=a.next();!s.done;s=a.next())i+=s.value.bandwidth||0,++o;i/=o,re.debug("codecs",e,"avg bandwidth",i),i<r&&(t=e,r=i)})),t},he:function(e){var t="";e.video&&(t=vt(e.video.codecs)[0]);var r="";return e.audio&&(r=vt(e.audio.codecs)[0]),t+"-"+r},rd:function(e,t,r){function n(e,t,r){return e>=t&&e<=r}var i=e.video;return!(i&&i.width&&i.height&&(!n(i.width,t.minWidth,Math.min(t.maxWidth,r.width))||!n(i.height,t.minHeight,Math.min(t.maxHeight,r.height))||!n(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!n(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!n(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Xd:function(e,t,r){var n=!1;return _forEachInstanceProperty(e).call(e,(function(e){var i=e.allowedByApplication;e.allowedByApplication=zr.rd(e,t,r),i!=e.allowedByApplication&&(n=!0)})),n},filterNewPeriod:function(e,t,r,n){var i,o;n.variants=_filterInstanceProperty(i=n.variants).call(i,(function(n){var i;if(e&&e.Z&&!Gt(e,n))return re.debug("Dropping variant - not compatible with key system",n),!1;var o=n.audio;return n=n.video,o&&!Ar(o)?(re.debug("Dropping variant - audio not compatible with platform",zr.fb(o)),!1):n&&!Ar(n)||Et("Xbox One")&&n&&(n.width&&1920<n.width||n.height&&1080<n.height)&&_includesInstanceProperty(i=n.codecs).call(i,"avc1.")?(re.debug("Dropping variant - video not compatible with platform",zr.fb(n)),!1):o&&t&&!zr.Yd(o,t)?(re.debug("Droping variant - not compatible with active audio","active audio",zr.fb(t),"variant.audio",zr.fb(o)),!1):!(n&&r&&!zr.Yd(n,r))||(re.debug("Droping variant - not compatible with active video","active video",zr.fb(r),"variant.video",zr.fb(n)),!1)})),n.textStreams=_filterInstanceProperty(o=n.textStreams).call(o,(function(e){var t=_r($t(e.mimeType,e.codecs));return t||re.debug("Dropping text stream. Is not supported by the platform.",e),t}))},Yd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Oc:function(e){var t,r,n=e.audio,i=e.video,o=n?n.codecs:null,a=i?i.codecs:null,s=[];a&&s.push(a),o&&s.push(o);var l=[];i&&l.push(i.mimeType),n&&l.push(n.mimeType),l=l[0]||null;var c=[];n&&c.push(n.kind),i&&c.push(i.kind),c=c[0]||null;var u=new _Set;return n&&_forEachInstanceProperty(t=n.roles).call(t,(function(e){return u.add(e)})),i&&_forEachInstanceProperty(r=i.roles).call(r,(function(e){return u.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:l,codecs:s.join(", "),audioCodec:o,videoCodec:a,primary:e.primary,roles:_Array$from(u),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},i&&(e.videoId=i.id,e.originalVideoId=i.originalId,e.width=i.width||null,e.height=i.height||null,e.frameRate=i.frameRate||null,e.pixelAspectRatio=i.pixelAspectRatio||null,e.videoBandwidth=i.bandwidth||null),n&&(e.audioId=n.id,e.originalAudioId=n.originalId,e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.audioBandwidth=n.bandwidth||null,e.label=n.label,e.audioRoles=n.roles),e},Kc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},gd:function(e){return e.__shaka_id||(e.__shaka_id=zr.Uf++),e.__shaka_id},Uf:0,Of:function(e){var t=zr.ke(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),t},je:function(e){var t=zr.ke(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind]),t},ke:function(e){return{id:zr.gd(e),active:!1,type:"",bandwidth:0,language:Hr(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},Gb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},Bf:function(e){return _filterInstanceProperty(e).call(e,(function(e){return zr.Gb(e)}))},ee:function(e,t){for(var r=_filterInstanceProperty(e).call(e,(function(e){return e.audio&&e.audio.channelsCount})),n=new _Map,i=(r=b(r)).next();!i.done;i=r.next()){var o=(i=i.value).audio.channelsCount;n.has(o)||n.set(o,[]),n.get(o).push(i)}return 0==(r=_Array$from(_keysInstanceProperty(n).call(n))).length?e:(i=_filterInstanceProperty(r).call(r,(function(e){return e<=t}))).length?n.get(Math.max.apply(null,i)):n.get(Math.min.apply(null,r))},Wb:function(e,t,r){var n,i=e,o=_filterInstanceProperty(e).call(e,(function(e){return e.primary}));o.length&&(i=o);var a=i.length?i[0].language:"";if(i=_filterInstanceProperty(i).call(i,(function(e){return e.language==a})),t){var s=Gr(Hr(t),_mapInstanceProperty(e).call(e,(function(e){return e.language})));s&&(i=_filterInstanceProperty(e).call(e,(function(e){return Hr(e.language)==s})))}if(r){if((e=zr.de(i,r)).length)return e;re.v("No exact match for the text role could be found.")}else if((e=_filterInstanceProperty(i).call(i,(function(e){return 0==e.roles.length}))).length)return e;return(e=_reduceInstanceProperty(n=_mapInstanceProperty(i).call(i,(function(e){return e.roles}))).call(n,me.Rc,[])).length?zr.de(i,e[0]):i},de:function(e,t){return _filterInstanceProperty(e).call(e,(function(e){var r;return _includesInstanceProperty(r=e.roles).call(r,t)}))},ie:function(e,t,r){for(var n=0;n<r.length;n++)if(r[n].audio==e&&r[n].video==t)return r[n];return null},Pf:function(e){return"audio"==e.type},Sf:function(e){return"video"==e.type},Kf:function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t},fb:function(e){return zr.Pf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:zr.Sf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function qr(){this.m=null,this.i=!1,this.h=new te,this.l=[],this.o=!1,this.g=this.j=null}function Yr(e,t){return e&&(t=_filterInstanceProperty(t).call(t,(function(t){return zr.rd(t,e,{width:1/0,height:1/0})}))),_sortInstanceProperty(t).call(t,(function(e,t){return e.bandwidth-t.bandwidth}))}function Xr(e,t){this.g=e,this.h=t}function Jr(e,t){var r=new Xr(2,6),n=en,i=n.g,o=r.h-i.h;(0<(r.g-i.g||o)?n.i:n.h)(n.g,r,e,t)}function Qr(e,t,r,n){re.ba([r,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",n].join(" "))}function Zr(e,t,r,n){re.kc([r,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",n].join(""))}X("shaka.abr.SimpleAbrManager",qr),qr.prototype.stop=function(){this.m=null,this.i=!1,this.l=[],this.j=null},qr.prototype.stop=qr.prototype.stop,qr.prototype.init=function(e){this.m=e},qr.prototype.init=qr.prototype.init,qr.prototype.chooseVariant=function(){var e=Yr(this.g.restrictions,this.l),t=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate);this.l.length&&!e.length&&(re.v("No variants met the ABR restrictions. Choosing a variant by lowest bandwidth."),e=[(e=Yr(null,this.l))[0]]);for(var r=e[0]||null,n=0;n<e.length;++n){var i=e[n],o=i.bandwidth/this.g.bandwidthDowngradeTarget,a=(e[n+1]||{bandwidth:1/0}).bandwidth/this.g.bandwidthUpgradeTarget;re.O("Bandwidth ranges:",(i.bandwidth/1e6).toFixed(3),(o/1e6).toFixed(3),(a/1e6).toFixed(3)),t>=o&&t<=a&&(r=i)}return this.j=_Date$now(),r},qr.prototype.chooseVariant=qr.prototype.chooseVariant,qr.prototype.enable=function(){this.i=!0},qr.prototype.enable=qr.prototype.enable,qr.prototype.disable=function(){this.i=!1},qr.prototype.disable=qr.prototype.disable,qr.prototype.segmentDownloaded=function(e,t){re.O("Segment downloaded:","deltaTimeMs="+e,"numBytes="+t,"lastTimeChosenMs="+this.j,"enabled="+this.i);var r=this.h;if(!(16e3>t)){var n=8e3*t/e,i=e/1e3;r.g+=t,Z(r.h,i,n),Z(r.i,i,n)}if(null!=this.j&&this.i)e:{if(re.O("Suggesting Streams..."),this.o){if(_Date$now()-this.j<1e3*this.g.switchInterval){re.O("Still within switch interval...");break e}}else{if(!(128e3<=this.h.g)){re.O("Still waiting for a good estimate...");break e}this.o=!0}r=this.chooseVariant(),n=this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate),re.debug("Calling switch_(), bandwidth="+Math.round(n/1e3)+" kbps"),this.m(r)}},qr.prototype.segmentDownloaded=qr.prototype.segmentDownloaded,qr.prototype.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)},qr.prototype.getBandwidthEstimate=qr.prototype.getBandwidthEstimate,qr.prototype.setVariants=function(e){this.l=e},qr.prototype.setVariants=qr.prototype.setVariants,qr.prototype.configure=function(e){this.g=e},qr.prototype.configure=qr.prototype.configure,Xr.prototype.toString=function(){return"v"+this.g+"."+this.h};var en=null,tn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),rn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),nn=["loop","playbackRate"],on=["pause","play"],an="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),sn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ln={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},cn=[["getConfiguration","configure"]],un=[["isTextTrackVisible","setTextTrackVisibility"]],pn="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),fn=["attach","detach","load","unload"];function dn(e){return _JSON$stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof Ge){var r={};for(i in t){var n=t[i];n&&"object"==_typeof$1(n)?"detail"==i&&(r[i]=n):i in Event||(r[i]=n)}return r}if(t instanceof Error){var i=new _Set(["name","message","stack"]);for(r in t)i.add(r);for(r=(n=b(_Object$getOwnPropertyNames(t))).next();!r.done;r=n.next())i.add(r.value);for(n={},r=(i=b(i)).next();!r.done;r=i.next())n[r=r.value]=t[r];i={__type__:"Error",contents:n}}else if(t instanceof TimeRanges)for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},r=0;r<t.length;++r)i.start.push(t.start(r)),i.end.push(t.end(r));else i=t instanceof Uint8Array?{__type__:"Uint8Array",entries:_Array$from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return i}}))}function hn(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var r=NaN;else if("-Infinity"==t)r=-1/0;else if("Infinity"==t)r=1/0;else if(t&&"object"==_typeof$1(t)&&"TimeRanges"==t.__type__)r=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==_typeof$1(t)&&"Uint8Array"==t.__type__)r=new Uint8Array(_entriesInstanceProperty(t));else if(t&&"object"==_typeof$1(t)&&"Error"==t.__type__){r=t.contents;var n,i=Error(r.message);for(n in r)i[n]=r[n];r=i}else r=t;return r}))}function yn(e,t,r,n,i,o){var a,s;this.X=e,this.j=new je(t),this.Z=r,this.u=!1,this.F=n,this.P=i,this.L=o,this.h=this.m=!1,this.M="",this.o=null,this.A=_bindInstanceProperty(a=this.yd).call(a,this),this.C=_bindInstanceProperty(s=this.ag).call(s,this),this.g={video:{},player:{}},this.J=0,this.i={},this.l=null,_n.add(this)}var gn=!1,$n=null;function mn(e){for(var t=b(_n),r=t.next();!r.done;r=t.next())vn(r.value,e)}function vn(e,t){re.debug("CastSender: onExistingSessionJoined");var r=e.L();e.l=new Pe,e.u=!0,e.Ad(r,t)}function bn(e){for(var t=b(_n),r=t.next();!r.done;r=t.next()){r=r.value;var n=e;re.debug("CastSender: receiver status",n),gn="available"==n,r.j.Lc()}}function Sn(e){var t=$n;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function In(e){for(var t in e.i){var r=e.i[t];delete e.i[t],r.reject(new ne(1,7,7e3))}}function Pn(e,t){var r=dn(t),n=$n;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",r,(function(){}),re.error)}catch(t){throw re.error("Cast session sendMessage threw",t),r=new ne(2,8,8005,t),e.F("player",new Ge("error",{detail:r})),e.Bb(),r}}(p=yn.prototype).destroy=function(){return _n.delete(this),In(this),$n&&Sn(this),this.j&&(this.j.stop(),this.j=null),this.P=this.F=null,this.h=this.m=!1,this.C=this.A=this.l=this.i=this.g=this.o=null,_Promise.resolve()},p.la=function(){return this.h},p.Dd=function(){return this.M},p.init=function(){if(this.X.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Lc();var t=new chrome.cast.SessionRequest(this.X);t=new chrome.cast.ApiConfig(t,_bindInstanceProperty(mn).call(mn,this),_bindInstanceProperty(bn).call(bn,this),"origin_scoped"),chrome.cast.initialize(t,(function(){re.debug("CastSender: init")}),(function(e){re.error("CastSender: init error",e)})),gn&&this.j.V(.02),(t=$n)&&t.status!=chrome.cast.SessionStatus.STOPPED?(re.debug("CastSender: re-using existing connection"),vn(this,t)):$n=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=wn),e.__onGCastApiAvailable!=wn&&re.ba("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},p.Md=function(e){this.o=e,this.h&&Pn(this,{type:"appData",appData:this.o})},p.cast=function(e){var t,r;return this.m?gn?this.h?_Promise.reject(new ne(1,8,8002)):(this.l=new Pe,chrome.cast.requestSession(_bindInstanceProperty(t=this.Ad).call(t,this,e),_bindInstanceProperty(r=this.ve).call(r,this)),this.l):_Promise.reject(new ne(1,8,8001)):_Promise.reject(new ne(1,8,8e3))},p.Bb=function(){if(this.h){if(In(this),$n){Sn(this);try{$n.stop((function(){}),(function(){}))}catch(e){}$n=null}this.yd()}},p.get=function(e,t){var r;if("video"==e){if(_includesInstanceProperty(on).call(on,t))return _bindInstanceProperty(r=this.Ee).call(r,this,e,t)}else if("player"==e){var n,i,o;if(ln[t]&&!this.get("player","isLive")())return function(){};if(_includesInstanceProperty(pn).call(pn,t))return _bindInstanceProperty(n=this.Ee).call(n,this,e,t);if(_includesInstanceProperty(fn).call(fn,t))return _bindInstanceProperty(i=this.rg).call(i,this,e,t);if(sn[t])return _bindInstanceProperty(o=this.Be).call(o,this,e,t)}return this.Be(e,t)},p.set=function(e,t,r){this.g[e][t]=r,Pn(this,{type:"set",targetName:e,property:t,value:r})},p.Ad=function(e,t){re.debug("CastSender: onSessionInitiated"),$n=t,t.addUpdateListener(this.A),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.C),this.yd(),Pn(this,{type:"init",initState:e,appData:this.o}),this.l.resolve()},p.ve=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.l.reject(new ne(2,8,t,e))},p.Be=function(e,t){return this.g[e][t]},p.Ee=function(e,t,r){for(var n=[],i=2;i<arguments.length;++i)n[i-2]=arguments[i];Pn(this,{type:"call",targetName:e,methodName:t,args:n})},p.rg=function(e,t,r){for(var n=[],i=2;i<arguments.length;++i)n[i-2]=arguments[i];i=new Pe;var o=this.J.toString();this.J++,this.i[o]=i;try{Pn(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:o})}catch(e){i.reject(e)}return i},p.yd=function(){var e=!!$n&&"connected"==$n.status;if(re.debug("CastSender: connection status",e),this.h&&!e){for(var t in this.P(),this.g)this.g[t]={};In(this)}this.M=(this.h=e)?$n.receiver.friendlyName:"",this.j.Lc()},p.ag=function(e,t){var r=hn(t);switch(re.O("CastSender: message",r),r.type){case"event":var n=r.event;this.F(r.targetName,new Ge(n.type,n));break;case"update":for(var i in n=r.update)for(var o in r=this.g[i]||{},n[i])r[o]=n[i][o];this.u&&(this.Z(),this.u=!1);break;case"asyncComplete":if(i=r.id,r=r.error,o=this.i[i],delete this.i[i],o)if(r){for(n in i=new ne(r.severity,r.category,r.code),r)i[n]=r[n];o.reject(i)}else o.resolve()}};var _n=new _Set;function wn(e){if(e)for(var t=(e=b(_n)).next();!t.done;t=e.next())t.value.init()}function En(e,t,r){var n=this;ze.call(this),this.i=e,this.h=t,this.o=this.l=this.j=this.u=this.m=null,this.C=r,this.A=new _Map,this.g=new yn(r,(function(){return An(n)}),(function(){return Cn(n)}),(function(e,t){return Mn(n,e,t)}),(function(){return Rn(n)}),(function(){return On(n)})),function(e){var t,r;for(var n in e.g.init(),e.o=new lt,_forEachInstanceProperty(tn).call(tn,_bindInstanceProperty(t=function(e){var t;this.o.H(this.i,e,_bindInstanceProperty(t=this.L).call(t,this))}).call(t,e)),_forEachInstanceProperty(an).call(an,_bindInstanceProperty(r=function(e){var t;this.o.H(this.h,e,_bindInstanceProperty(t=this.F).call(t,this))}).call(r,e)),e.m={},e.i){var i,o;_Object$defineProperty(e.m,n,{configurable:!1,enumerable:!0,get:_bindInstanceProperty(i=e.J).call(i,e,n),set:_bindInstanceProperty(o=e.M).call(o,e,n)})}e.u={},Tn(e,(function(t){_Object$defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return xn(e,t)}})})),function(e){var t=new _Map;Tn(e,(function(r,n){if(t.has(n)){var i=t.get(n);r.length<i.length?e.A.set(r,i):e.A.set(i,r)}else t.set(n,r)}))}(e),e.j=new ze,e.j.jc=e.m,e.l=new ze,e.l.jc=e.u}(this)}function Tn(e,t){function r(e){return"constructor"!=e&&"function"==typeof n[e]&&!i.has(e)}var n=e.h,i=new _Set;for(o in n)r(o)&&(i.add(o),t(o,n[o]));for(var o=_Object$getPrototypeOf(n),a=_Object$getPrototypeOf({});o&&o!=a;){for(var s=b(_Object$getOwnPropertyNames(o)),l=s.next();!l.done;l=s.next())r(l=l.value)&&(i.add(l),t(l,n[l]));o=_Object$getPrototypeOf(o)}}function On(e){var t,r,n,i={video:{},player:{},playerAfterLoad:{},manifest:e.h.tc(),startTime:null};return e.i.pause(),_forEachInstanceProperty(nn).call(nn,_bindInstanceProperty(t=function(e){i.video[e]=this.i[e]}).call(t,e)),e.i.ended||(i.startTime=e.i.currentTime),_forEachInstanceProperty(cn).call(cn,_bindInstanceProperty(r=function(e){var t=e[1];e=this.h[e[0]](),i.player[t]=e}).call(r,e)),_forEachInstanceProperty(un).call(un,_bindInstanceProperty(n=function(e){var t=e[1];e=this.h[e[0]](),i.playerAfterLoad[t]=e}).call(n,e)),i}function An(e){e.dispatchEvent(new Ge("caststatuschanged"))}function Cn(e){e.j.dispatchEvent(new Ge(e.m.paused?"pause":"play"))}function Rn(e){var t,r;_forEachInstanceProperty(cn).call(cn,_bindInstanceProperty(t=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(t,e));var n=e.g.get("player","getAssetUri")(),i=e.g.get("video","ended"),o=_Promise.resolve(),a=e.i.autoplay,s=null;i||(s=e.g.get("video","currentTime")),n&&(e.i.autoplay=!1,o=e.h.load(n,s));var l={};_forEachInstanceProperty(nn).call(nn,_bindInstanceProperty(r=function(e){l[e]=this.g.get("video",e)}).call(r,e)),o.then((function(){var t,r;e.i&&(_forEachInstanceProperty(nn).call(nn,_bindInstanceProperty(t=function(e){this.i[e]=l[e]}).call(t,e)),_forEachInstanceProperty(un).call(un,_bindInstanceProperty(r=function(e){var t=e[1];e=this.g.get("player",e[0])(),this.h[t](e)}).call(r,e)),e.i.autoplay=a,n&&e.i.play())}),(function(t){e.h.dispatchEvent(new Ge("error",{detail:t}))}))}function xn(e,t){var r,n,i,o,a;if(e.A.has(t)&&(t=e.A.get(t)),"addEventListener"==t)return _bindInstanceProperty(r=e.l.addEventListener).call(r,e.l);if("removeEventListener"==t)return _bindInstanceProperty(n=e.l.removeEventListener).call(n,e.l);if("getMediaElement"==t)return _bindInstanceProperty(i=function(){return this.m}).call(i,e);if("getSharedConfiguration"==t)return re.v("Can't share configuration across a network. Returning copy."),e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return e.g.la()&&re.v("NOTE: getNetworkingEngine() is always local!"),_bindInstanceProperty(o=e.h.Yb).call(o,e.h);if(e.g.la()){if("getManifest"==t||"drmInfo"==t)return function(){return re.ba(t+"() does not work while casting!"),null};if("getManifestUri"==t)return Jr("getManifestUri",'Please use "getAssetUri" instead.'),xn(e,"getAssetUri");if("attach"==t||"detach"==t)return function(){return re.ba(t+"() does not work while casting!"),_Promise.resolve()}}return e.g.la()&&0==_Object$keys(e.g.g.video).length&&sn[t]||!e.g.la()?_bindInstanceProperty(a=e.h[t]).call(a,e.h):e.g.get("player",t)}function Mn(e,t,r){e.g.la()&&("video"==t?e.j.dispatchEvent(r):"player"==t&&e.l.dispatchEvent(r))}function kn(e,t,r,n){var i=this;ze.call(this),this.g=e,this.h=t,this.i=new lt,this.L={video:e,player:t},this.C=r||function(){},this.M=n||function(e){return e},this.F=!1,this.m=!0,this.l=0,this.A=!1,this.u=!0,this.o=this.j=null,this.J=new je((function(){jn(i)})),function(e){var t,r,n,i,o,a,s,l,c,u,p,f,d,h=cast.receiver.CastReceiverManager.getInstance();h.onSenderConnected=_bindInstanceProperty(t=e.xe).call(t,e),h.onSenderDisconnected=_bindInstanceProperty(r=e.xe).call(r,e),h.onSystemVolumeChanged=_bindInstanceProperty(n=e.hf).call(n,e),e.o=h.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.o.onMessage=_bindInstanceProperty(i=e.Wf).call(i,e),e.j=h.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.j.onMessage=_bindInstanceProperty(o=e.fg).call(o,e),h.start(),_forEachInstanceProperty(tn).call(tn,_bindInstanceProperty(a=function(e){var t;this.i.H(this.g,e,_bindInstanceProperty(t=this.Ce).call(t,this,"video"))}).call(a,e)),_forEachInstanceProperty(an).call(an,_bindInstanceProperty(s=function(e){var t;this.i.H(this.h,e,_bindInstanceProperty(t=this.Ce).call(t,this,"player"))}).call(s,e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.Nd(3840,2160):e.h.Nd(1920,1080),e.i.H(e.g,"loadeddata",_bindInstanceProperty(l=function(){this.A=!0}).call(l,e)),e.i.H(e.h,"loading",_bindInstanceProperty(c=function(){this.m=!1,Nn(this)}).call(c,e)),e.i.H(e.g,"playing",_bindInstanceProperty(u=function(){this.m=!1,Nn(this)}).call(u,e)),e.i.H(e.g,"pause",_bindInstanceProperty(p=function(){Nn(this)}).call(p,e)),e.i.H(e.h,"unloading",_bindInstanceProperty(f=function(){this.m=!0,Nn(this)}).call(f,e)),e.i.H(e.g,"ended",_bindInstanceProperty(d=function(){var e=this;new je((function(){e.g&&e.g.ended&&(e.m=!0,Nn(e))})).V(5)}).call(d,e))}(this)}function Nn(e){var t;_Promise.resolve().then(_bindInstanceProperty(t=function(){this.h&&(this.dispatchEvent(new Ge("caststatuschanged")),Dn(this)||Fn(this))}).call(t,e))}function jn(e){var t;e.J.V(.5);var r={video:{},player:{}};if(_forEachInstanceProperty(rn).call(rn,_bindInstanceProperty(t=function(e){r.video[e]=this.g[e]}).call(t,e)),e.h.aa())for(var n in ln)0==e.l%ln[n]&&(r.player[n]=e.h[n]());for(var i in sn)0==e.l%sn[i]&&(r.player[i]=e.h[i]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(r.video.volume=n.level,r.video.muted=n.muted),e.A&&(e.l+=1),Un(e,{type:"update",update:r},e.j),Dn(e)}function Dn(e){return!(!e.u||!e.g.duration&&!e.h.aa())&&(Ln(e),e.u=!1,!0)}function Ln(e,t){t=void 0===t?0:t;var r={contentId:e.h.tc(),streamType:e.h.aa()?"LIVE":"BUFFERED",contentType:""};e.h.aa()||(r.duration=e.g.duration),Fn(e,t,r)}function Un(e,t,r,n){e.F&&(e=dn(t),n?r.getCastChannel(n).send(e):r.broadcast(e))}function Fn(e,t,r){t=void 0===t?0:t,r=void 0===r?null:r;var n=e.g.playbackRate,i=Bn;n={mediaSessionId:0,playbackRate:n,playerState:i=e.m?i.IDLE:e.h.jd()?i.Re:e.g.paused?i.Te:i.Ue,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}},r&&(n.media=r),Un(e,{requestId:t,type:"MEDIA_STATUS",status:[n]},e.o)}J(En,ze),X("shaka.cast.CastProxy",En),En.prototype.destroy=function(e){return e&&this.g.Bb(),this.o&&(this.o.release(),this.o=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.m=this.i=null,_Promise.all(e)},En.prototype.destroy=En.prototype.destroy,En.prototype.Mf=function(){return this.m},En.prototype.getVideo=En.prototype.Mf,En.prototype.Df=function(){return this.u},En.prototype.getPlayer=En.prototype.Df,En.prototype.Ye=function(){return this.g.m&&gn},En.prototype.canCast=En.prototype.Ye,En.prototype.la=function(){return this.g.la()},En.prototype.isCasting=En.prototype.la,En.prototype.Dd=function(){return this.g.Dd()},En.prototype.receiverName=En.prototype.Dd,En.prototype.cast=function(){var e,t=On(this);return this.g.cast(t).then(_bindInstanceProperty(e=function(){if(this.h)return this.h.Ud()}).call(e,this))},En.prototype.cast=En.prototype.cast,En.prototype.Md=function(e){this.g.Md(e)},En.prototype.setAppData=En.prototype.Md,En.prototype.Kg=function(){var e=this.g;if(e.h){var t,r,n=e.L();chrome.cast.requestSession(_bindInstanceProperty(t=e.Ad).call(t,e,n),_bindInstanceProperty(r=e.ve).call(r,e))}},En.prototype.suggestDisconnect=En.prototype.Kg,En.prototype.af=function(e){var t=this;return I((function r(){return V(r,(function(r){switch(r.s){case 1:return e==t.C?r.return():(t.C=e,t.g.Bb(),x(r,t.g.destroy(),2));case 2:t.g=null,t.g=new yn(e,(function(){return An(t)}),(function(){return Cn(t)}),(function(e,r){return Mn(t,e,r)}),(function(){return Rn(t)}),(function(){return On(t)})),t.g.init(),M(r)}}))}))},En.prototype.changeReceiverId=En.prototype.af,En.prototype.Bb=function(){this.g.Bb()},En.prototype.forceDisconnect=En.prototype.Bb,En.prototype.J=function(e){var t,r;if("addEventListener"==e)return _bindInstanceProperty(t=this.j.addEventListener).call(t,this.j);if("removeEventListener"==e)return _bindInstanceProperty(r=this.j.removeEventListener).call(r,this.j);if(this.g.la()&&0==_Object$keys(this.g.g.video).length){var n=this.i[e];if("function"!=typeof n)return n}return this.g.la()?this.g.get("video",e):("function"==typeof(e=this.i[e])&&(e=_bindInstanceProperty(e).call(e,this.i)),e)},En.prototype.M=function(e,t){this.g.la()?this.g.set("video",e,t):this.i[e]=t},En.prototype.L=function(e){this.g.la()||this.j.dispatchEvent(new Ge(e.type,e))},En.prototype.F=function(e){this.g.la()||this.l.dispatchEvent(e)},J(kn,ze),X("shaka.cast.CastReceiver",kn),kn.prototype.isConnected=function(){return this.F},kn.prototype.isConnected=kn.prototype.isConnected,kn.prototype.Rf=function(){return this.m},kn.prototype.isIdle=kn.prototype.Rf,kn.prototype.destroy=function(){var e=this;return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:return e.i&&(e.i.release(),e.i=null),r=[],e.h&&(r.push(e.h.destroy()),e.h=null),e.J&&(e.J.stop(),e.J=null),e.g=null,e.L=null,e.C=null,e.F=!1,e.m=!0,e.j=null,e.o=null,x(t,_Promise.all(r),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),M(t)}}))}))},kn.prototype.destroy=kn.prototype.destroy,(p=kn.prototype).xe=function(){this.l=0,this.u=!0,this.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Nn(this)},p.Ce=function(e,t){this.h&&(jn(this),Un(this,{type:"event",targetName:e,event:t},this.j))},p.hf=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Un(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.j),Un(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.j)},p.fg=function(e){var t,r,n,i=hn(e.data);switch(re.debug("CastReceiver: message",i),i.type){case"init":this.l=0,this.A=!1,this.u=!0,function(e,t,r){for(var n in t.player)e.h[n](t.player[n]);e.C(r),r=_Promise.resolve();var i=e.g.autoplay;t.manifest&&(e.g.autoplay=!1,r=e.h.load(t.manifest,t.startTime)),r.then((function(){if(e.h){for(var r in t.video)e.g[r]=t.video[r];for(var n in t.playerAfterLoad)e.h[n](t.playerAfterLoad[n]);e.g.autoplay=i,t.manifest&&(e.g.play(),Fn(e))}}),(function(t){e.h.dispatchEvent(new Ge("error",{detail:t}))}))}(this,i.initState,i.appData),jn(this);break;case"appData":this.C(i.appData);break;case"set":var o=i.targetName,a=i.property;if(i=i.value,"video"==o){var s=cast.receiver.CastReceiverManager.getInstance();if("volume"==a){s.setSystemVolumeLevel(i);break}if("muted"==a){s.setSystemVolumeMuted(i);break}}this.L[o][a]=i;break;case"call":(o=this.L[i.targetName])[i.methodName].apply(o,i.args);break;case"asyncCall":o=i.targetName,a=i.methodName,"player"==o&&"load"==a&&(this.l=0,this.A=!1),s=i.id,e=e.senderId;var l=this.L[o];i=l[a].apply(l,i.args),"player"==o&&"load"==a&&(i=i.then(_bindInstanceProperty(t=function(){this.u=!0}).call(t,this))),i.then(_bindInstanceProperty(r=this.Je).call(r,this,e,s,null),_bindInstanceProperty(n=this.Je).call(n,this,e,s))}},p.Wf=function(e){var t,r,n,i=hn(e.data);switch(re.debug("CastReceiver: message",i),i.type){case"PLAY":this.g.play(),Fn(this);break;case"PAUSE":this.g.pause(),Fn(this);break;case"SEEK":e=i.currentTime;var o=i.resumeState;null!=e&&(this.g.currentTime=Number(e)),o&&"PLAYBACK_START"==o?(this.g.play(),Fn(this)):o&&"PLAYBACK_PAUSE"==o&&(this.g.pause(),Fn(this));break;case"STOP":this.h.Ud().then(_bindInstanceProperty(t=function(){this.h&&Fn(this)}).call(t,this));break;case"GET_STATUS":Ln(this,Number(i.requestId));break;case"VOLUME":e=(o=i.volume).level,o=o.muted;var a=this.g.volume,s=this.g.muted;null!=e&&(this.g.volume=Number(e)),null!=o&&(this.g.muted=o),a==this.g.volume&&s==this.g.muted||Fn(this);break;case"LOAD":this.l=0,this.u=this.A=!1,e=i.media,o=i.currentTime,a=this.M(e.contentId),s=i.autoplay||!0,this.C(e.customData),s&&(this.g.autoplay=!0),this.h.load(a,o).then(_bindInstanceProperty(r=function(){this.h&&Ln(this)}).call(r,this)).catch(_bindInstanceProperty(n=function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),Un(this,{requestId:Number(i.requestId),type:t},this.o)}).call(n,this));break;default:re.v("Unrecognized message type from the generic Chromecast controller!",i.type),Un(this,{requestId:Number(i.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.o)}},p.Je=function(e,t,r){this.h&&Un(this,{type:"asyncComplete",id:t,error:r},this.j,e)};var Bn={IDLE:"IDLE",Ue:"PLAYING",Re:"BUFFERING",Te:"PAUSED"};function Kn(e,t){this.S=e,this.h=t==Hn,this.g=0}X("shaka.util.DataViewReader",Kn);var Hn=1;function Vn(){throw new ne(2,3,3e3)}function Gn(){this.i=[],this.h=[],this.g=!1}function Wn(e){for(var t=Jn(e);e.reader.Ca()&&!e.parser.g;)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function zn(e){for(var t=Jn(e),r=e.reader.N();0<r&&!e.parser.g;--r)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function qn(e){return function(t){e(t.reader.mb(t.reader.S.byteLength-t.reader.ka()))}}function Yn(e){for(var t=0,r=0;r<e.length;r++)t=t<<8|e.charCodeAt(r);return t}function Xn(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Jn(e){return 8+(e.has64BitSize?8:0)+(null!=_flagsInstanceProperty(e)?4:0)}function Qn(e){var t=this;this.g=[],this.h=[],this.data=[],(new Gn).box("moov",Wn).ma("pssh",(function(e){if(1<e.version)re.v("Unrecognized PSSH version found!");else{var r=e.reader.S;if(r=new Uint8Array(r.buffer,r.byteOffset-12,e.size),t.data.push(r),t.g.push(Re.Nc(e.reader.mb(16))),0<e.version){r=e.reader.N();for(var n=0;n<r;++n){var i=Re.Nc(e.reader.mb(16));t.h.push(i)}}}})).parse(e),0==this.data.length&&re.v("No pssh box found!")}Kn.Endianness={Tg:0,Vg:Hn},Kn.prototype.Ca=function(){return this.g<this.S.byteLength},Kn.prototype.hasMoreData=Kn.prototype.Ca,Kn.prototype.ka=function(){return this.g},Kn.prototype.getPosition=Kn.prototype.ka,Kn.prototype.sf=function(){return this.S.byteLength},Kn.prototype.getLength=Kn.prototype.sf,Kn.prototype.ra=function(){try{var e=this.S.getUint8(this.g);return this.g+=1,e}catch(e){Vn()}},Kn.prototype.readUint8=Kn.prototype.ra,Kn.prototype.dc=function(){try{var e=this.S.getUint16(this.g,this.h);return this.g+=2,e}catch(e){Vn()}},Kn.prototype.readUint16=Kn.prototype.dc,Kn.prototype.N=function(){try{var e=this.S.getUint32(this.g,this.h);return this.g+=4,e}catch(e){Vn()}},Kn.prototype.readUint32=Kn.prototype.N,Kn.prototype.De=function(){try{var e=this.S.getInt32(this.g,this.h);return this.g+=4,e}catch(e){Vn()}},Kn.prototype.readInt32=Kn.prototype.De,Kn.prototype.Pb=function(){try{if(this.h)var e=this.S.getUint32(this.g,!0),t=this.S.getUint32(this.g+4,!0);else t=this.S.getUint32(this.g,!1),e=this.S.getUint32(this.g+4,!1)}catch(e){Vn()}if(2097151<t)throw new ne(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},Kn.prototype.readUint64=Kn.prototype.Pb,Kn.prototype.mb=function(e){this.g+e>this.S.byteLength&&Vn();var t=new Uint8Array(this.S.buffer,this.S.byteOffset+this.g,e);return this.g+=e,t},Kn.prototype.readBytes=Kn.prototype.mb,Kn.prototype.U=function(e){this.g+e>this.S.byteLength&&Vn(),this.g+=e},Kn.prototype.skip=Kn.prototype.U,Kn.prototype.Fe=function(e){this.g<e&&Vn(),this.g-=e},Kn.prototype.rewind=Kn.prototype.Fe,Kn.prototype.seek=function(e){(0>e||e>this.S.byteLength)&&Vn(),this.g=e},Kn.prototype.seek=Kn.prototype.seek,Kn.prototype.Cd=function(){for(var e=this.g;this.Ca()&&0!=this.S.getUint8(this.g);)this.g+=1;return e=new Uint8Array(this.S.buffer,this.S.byteOffset+e,this.g-e),this.g+=1,_e(e)},Kn.prototype.readTerminatedString=Kn.prototype.Cd,X("shaka.util.Mp4Parser",Gn),Gn.prototype.box=function(e,t){var r=Yn(e);return this.i[r]=0,this.h[r]=t,this},Gn.prototype.box=Gn.prototype.box,Gn.prototype.ma=function(e,t){var r=Yn(e);return this.i[r]=1,this.h[r]=t,this},Gn.prototype.fullBox=Gn.prototype.ma,Gn.prototype.stop=function(){this.g=!0},Gn.prototype.stop=Gn.prototype.stop,Gn.prototype.parse=function(e,t){var r=new Uint8Array(e);for(r=new Kn(new DataView(r.buffer,r.byteOffset,r.byteLength),0),this.g=!1;r.Ca()&&!this.g;)this.Fc(0,r,t)},Gn.prototype.parse=Gn.prototype.parse,Gn.prototype.Fc=function(e,t,r){var n=t.ka(),i=t.N(),o=t.N(),a=!1;switch(re.O("Parsing MP4 box",Xn(o)),i){case 0:i=t.S.byteLength-n;break;case 1:i=t.Pb(),a=!0}var s=this.h[o];if(s){var l=null,c=null;1==this.i[o]&&(l=(c=t.N())>>>24,c&=16777215),o=n+i,r&&o>t.S.byteLength&&(o=t.S.byteLength),o-=t.ka(),t=0<o?t.mb(o):new Uint8Array(0),s({parser:this,partialOkay:r||!1,version:l,flags:c,reader:t=new Kn(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:n+e,has64BitSize:a})}else t.U(Math.min(n+i-t.ka(),t.S.byteLength-t.ka()))},Gn.prototype.parseNext=Gn.prototype.Fc,Gn.children=Wn,Gn.sampleDescription=zn,Gn.allData=qn,Gn.typeToString=Xn,Gn.headerSize=Jn;var Zn={sc:function(e,t){var r=Zn.Y(e,t);return 1!=r.length?null:r[0]},Yc:function(e,t,r){return 1!=(e=Zn.fe(e,t,r)).length?null:e[0]},Y:function(e,t){return _filterInstanceProperty(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.tagName==t}))},fe:function(e,t,r){return _filterInstanceProperty(Array.prototype).call(e.childNodes,(function(e){return e instanceof Element&&e.localName==r&&e.namespaceURI==t}))},getAttributeNS:function(e,t,r){return e.hasAttributeNS(t,r)?e.getAttributeNS(t,r):null},uc:function(e){var t;return _everyInstanceProperty(Array.prototype).call(e.childNodes,(function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}))?_trimInstanceProperty(t=e.textContent).call(t):null},R:function(e,t,r,n){n=void 0===n?null:n;var i=null;return null!=(e=e.getAttribute(t))&&(i=r(e)),null==i?n:i},jg:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ma:function(e){if(!e)return null;var t=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e);return t?(e=31536e3*Number(t[1]||null)+2592e3*Number(t[2]||null)+86400*Number(t[3]||null)+3600*Number(t[4]||null)+60*Number(t[5]||null)+Number(t[6]||null),isFinite(e)?e:null):(re.v("Invalid duration string:",e),null)},Hc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return 0==(e=Number(e))%1?e:null},Gc:function(e){return 0==(e=Number(e))%1&&0<e?e:null},Mb:function(e){return 0==(e=Number(e))%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},ff:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},Ae:function(e,t){var r=new DOMParser;try{var n=r.parseFromString(e,"text/xml")}catch(e){}if(n&&n.documentElement.tagName==t)var i=n.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ze:function(e,t){try{var r=_e(e);return Zn.Ae(r,t)}catch(e){}}},ei=(new _Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function ti(e,t,r){var n=function(e){for(var t=[],r=(e=b(e)).next();!r.done;r=e.next())(r=ii(r.value))&&t.push(r);return t}(e),i=null;e=[];var o=[],a=new _Set(_mapInstanceProperty(n).call(n,(function(e){return e.keyId})));if(a.delete(null),1<a.size)throw new ne(2,4,4010);if(r||(o=_filterInstanceProperty(n).call(n,(function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.Ge||(i=e.init||i,!1)}))).length&&(e=function(e,t,r){for(var n=[],i=(r=b(r)).next();!i.done;i=r.next()){i=i.value;var o=ei.get(i.Ge);if(o){var a;if(a=Zn.Yc(i.node,"urn:microsoft:playready","pro")){a=Re.Ja(a.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=a.length,c=s.length+16+l,u=new ArrayBuffer(c),p=new Uint8Array(u),f=0;(u=new DataView(u)).setUint32(f,c),f+=4,u.setUint32(f,1886614376),f+=4,u.setUint32(f,0),f+=4,p.set(s,f),f+=s.length,u.setUint32(f,l),f+=4,p.set(a,f),a=[{initData:p,initDataType:"cenc",keyId:i.keyId}]}else a=null;a=be(o,i.init||e||a),(o=ni.get(o))&&(a.licenseServerUri=o(i)),n.push(a)}else for(o=(i=b(i=t(i.node)||[])).next();!o.done;o=i.next())n.push(o.value)}return n}(i,t,o),0==e.length&&(e=[be("",i)])),n.length&&(r||!o.length))for(e=[],r=(t=b(_valuesInstanceProperty(ei).call(ei))).next();!r.done;r=t.next())"org.w3.clearkey"!=(r=r.value)&&e.push(be(r,i));if(a=_Array$from(a)[0]||null)for(r=(t=b(e)).next();!r.done;r=t.next())for(n=(r=b(r.value.initData)).next();!n.done;n=r.next())n.value.keyId=a;return{be:a,Xg:i,drmInfos:e,ge:!0}}var ri,ni=(new _Map).set("com.widevine.alpha",(function(e){return(e=Zn.Yc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){var t;return(e=Zn.Yc(e.node,"urn:microsoft:playready","pro"))?(e=Re.Ja(e.textContent),(e=_filterInstanceProperty(t=function(e){var t=0,r=new DataView(e).getUint32(t,!0);if(t+=4,r!==e.byteLength)return re.v("PlayReady Object with invalid length encountered."),[];t+=2,r=[];for(var n=new DataView(e);t<e.byteLength-1;){var i=n.getUint16(t,!0);t+=2;var o=n.getUint16(t,!0);t+=2;var a=new Uint8Array(e,t,o);r.push({type:i,value:a}),t+=o}return r}(e.buffer)).call(t,(function(e){return 1===e.type}))[0])?(e=we(e.value,!0),(e=Zn.Ae(e,"WRMHEADER"))?function(e){for(var t=(e=b(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var r=(t=b(t.value.childNodes)).next();!r.done;r=t.next())if((r=r.value)instanceof Element&&"LA_URL"==r.tagName)return r.textContent;return""}(e):""):""):""}));function ii(e){var t,r=e.getAttribute("schemeIdUri"),n=Zn.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),i=_mapInstanceProperty(t=Zn.fe(e,"urn:mpeg:cenc:2013","pssh")).call(t,Zn.uc);if(!r)return re.error("Missing required schemeIdUri attribute on","ContentProtection element",e),null;if(r=r.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),_includesInstanceProperty(n).call(n," ")))throw new ne(2,4,4009);var o=[];try{o=_mapInstanceProperty(i).call(i,(function(e){return{initDataType:"cenc",initData:Re.Ja(e),keyId:null}}))}catch(e){throw new ne(2,4,4007)}return{node:e,Ge:r,keyId:n,init:0<o.length?o:null}}function oi(e,t,r,n,i){var o={RepresentationID:t,Number:r,Bandwidth:n,Time:i};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,r,n,i){if("$$"==t)return"$";var a=o[r];if(null==a)return re.v("URL template does not have an available substitution for identifier",'"'+r+'":',e),t;switch("RepresentationID"==r&&n&&(re.v("URL template should not contain a width specifier for identifier",'"RepresentationID":',e),n=void 0),"Time"==r&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return n=_parseInt$1(n,10)||1,Array(Math.max(0,n-t.length)+1).join("0")+t}))}function ai(e,t){var r=si(e,t,"timescale"),n=1;r&&(n=Zn.Gc(r)||1),r=si(e,t,"duration"),(r=Zn.Gc(r||""))&&(r/=n);var i=si(e,t,"startNumber"),o=Number(si(e,t,"presentationTimeOffset"))||0,a=Zn.Mb(i||"");null!=i&&null!=a||(a=1);var s=li(e,t,"SegmentTimeline");if(i=null,s){i=n;var l=e.$.duration||1/0;s=Zn.Y(s,"S");for(var c=[],u=-o,p=0;p<s.length;++p){var f=s[p],d=Zn.R(f,"t",Zn.Mb),h=Zn.R(f,"d",Zn.Mb),y=Zn.R(f,"r",Zn.parseInt);if(null!=d&&(d-=o),!h){re.v('"S" element must have a duration:','ignoring the remaining "S" elements.',f);break}if(d=null!=d?d:u,0>(y=y||0))if(p+1<s.length){if(null==(y=Zn.R(s[p+1],"t",Zn.Mb))){re.v('An "S" element cannot have a negative repeat','if the next "S" element does not have a valid start time:','ignoring the remaining "S" elements.',f);break}if(d>=y){re.v('An "S" element cannot have a negative repeat','if its start time exceeds the next "S" element\'s start time:','ignoring the remaining "S" elements.',f);break}y=Math.ceil((y-d)/h)-1}else{if(1/0==l){re.v('The last "S" element cannot have a negative repeat',"if the Period has an infinite duration:",'ignoring the last "S" element.',f);break}if(d/i>=l){re.v('The last "S" element cannot have a negative repeat',"if its start time exceeds the Period's duration:",'igoring the last "S" element.',f);break}y=Math.ceil((l*i-d)/h)-1}for(0<c.length&&d!=u&&(Math.abs((d-u)/i)>=Ie&&re.v("SegmentTimeline contains a large gap/overlap:","the content may have errors in it.",f),c[c.length-1].end=d/i),f=0;f<=y;++f)u=d+h,c.push({start:d/i,end:u/i,Pg:d}),d=u}i=c}return{timescale:n,ia:r,ob:a,sa:o/n||0,Vd:o,W:i}}function si(e,t,r){var n,i,o;return _reduceInstanceProperty(n=_mapInstanceProperty(i=_filterInstanceProperty(o=[t(e.G),t(e.fa),t(e.qa)]).call(o,me.Ra)).call(i,(function(e){return e.getAttribute(r)}))).call(n,(function(e,t){return e||t}))}function li(e,t,r){var n,i,o;return _reduceInstanceProperty(n=_mapInstanceProperty(i=_filterInstanceProperty(o=[t(e.G),t(e.fa),t(e.qa)]).call(o,me.Ra)).call(i,(function(e){return Zn.sc(e,r)}))).call(n,(function(e,t){return e||t}))}function ci(e,t,r,n,i,o){if(o=void 0===o?0:o,Zn.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var a=function(e,t,r,n,i,o){for(var a=Zn.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Zn.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<e.attributes.length;l++){var c=e.attributes[l];"http://www.w3.org/1999/xlink"==c.namespaceURI&&(e.removeAttributeNS(c.namespaceURI,c.localName),--l)}if(5<=o)return Fe(new ne(2,4,4028));if("onLoad"!=s)return Fe(new ne(2,4,4027));var u=ve([n],[a]);return i.request(0,nt(u,t)).ca((function(n){if(!(n=Zn.ze(n.data,e.tagName)))return Fe(new ne(2,4,4001,a));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;n.childNodes.length;){var s=n.childNodes[0];n.removeChild(s),e.appendChild(s)}for(s=0;s<n.attributes.length;s++){var l=n.attributes[s].nodeName,c=n.getAttribute(l);e.setAttribute(l,c)}return ci(e,t,r,u[0],i,o+1)}))}(e,t,r,n,i,o);return r&&(a=a.ca(void 0,(function(){return ci(e,t,r,n,i,o)}))),a}a=[];for(var s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zn.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(e.removeChild(l),--s):"SegmentTimeline"!=l.tagName&&a.push(ci(l,t,r,n,i,o)))}return Ve(a).ca((function(){return e}))}function ui(e,t,r){this.i=e,this.h=t,this.g=r}function pi(e,t,r,n,i,o){this.position=e,this.startTime=t,this.endTime=r,this.i=n,this.h=i,this.g=o}function fi(e,t,r,n){var i,o=(new Gn).ma("sidx",(function(e){i=function(e,t,r,n){var i=[];n.reader.U(4);var o=n.reader.N();if(0==o)throw re.error("Invalid timescale."),new ne(2,3,3005);if(0==n.version)var a=n.reader.N(),s=n.reader.N();else a=n.reader.Pb(),s=n.reader.Pb();n.reader.U(2);var l=n.reader.dc();for(e=e+n.size+s,s=0;s<l;s++){var c=n.reader.N(),u=(2147483648&c)>>>31;c&=2147483647;var p=n.reader.N();if(n.reader.U(4),1==u)throw re.error("Heirarchical SIDXs are not supported."),new ne(2,3,3006);i.push(new pi(i.length,a/o-t,(a+p)/o-t,(function(){return r}),e,e+c-1)),a+=p,e+=c}return n.parser.stop(),i}(t,n,r,e)}));if(e&&o.parse(e),i)return i;throw re.error('Invalid box type, expected "sidx".'),new ne(2,3,3004)}function di(e){this.g=e}function hi(e,t){for(;e.g.length&&e.g[e.g.length-1].startTime>=t;)e.g.pop();for(;e.g.length&&0>=e.g[0].endTime;)e.g.shift();if(0!=e.g.length){var r=e.g[e.g.length-1];e.g[e.g.length-1]=new pi(r.position,r.startTime,t,r.i,r.h,r.g)}}function yi(e){this.h=e,this.g=new Kn(e,0),ri||(ri=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function gi(e){var t=$i(e);if(7<t.length)throw new ne(2,3,3002);for(var r=0,n=0;n<t.length;n++)r=256*r+t[n];t=r,r=$i(e);e:{n=Re.Ha;for(var i=0;i<ri.length;i++)if(n(r,ri[i])){n=!0;break e}n=!1}if(n)r=e.h.byteLength-e.g.ka();else{if(8==r.length&&224&r[1])throw new ne(2,3,3001);for(n=r[0]&(1<<8-r.length)-1,i=1;i<r.length;i++)n=256*n+r[i];r=n}return r=e.g.ka()+r<=e.h.byteLength?r:e.h.byteLength-e.g.ka(),n=new DataView(e.h.buffer,e.h.byteOffset+e.g.ka(),r),e.g.U(r),new mi(t,n)}function $i(e){var t,r=e.g.ra();for(t=1;8>=t&&!(r&1<<8-t);t++);if(8<t)throw new ne(2,3,3002);var n=new Uint8Array(t);for(n[0]=r,r=1;r<t;r++)n[r]=e.g.ra();return n}function mi(e,t){this.id=e,this.g=t}function vi(e){if(8<e.g.byteLength)throw new ne(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new ne(2,3,3001);for(var t=0,r=0;r<e.g.byteLength;r++){t=256*t+e.g.getUint8(r)}return t}function bi(){}function Si(e){var t=new yi(e.g);if(179!=(e=gi(t)).id)throw re.v("Not a CueTime element."),new ne(2,3,3013);if(e=vi(e),183!=(t=gi(t)).id)throw re.v("Not a CueTrackPositions element."),new ne(2,3,3012);t=new yi(t.g);for(var r=0;t.Ca();){var n=gi(t);if(241==n.id){r=vi(n);break}}return{Qg:e,qg:r}}function Ii(e,t){var r=li(e,t,"Initialization");if(!r)return null;var n=e.G.xa,i=r.getAttribute("sourceURL");i&&(n=ve(e.G.xa,[i])),i=0;var o=null;return(r=Zn.R(r,"range",Zn.Hc))&&(i=r.start,o=r.end),new ui((function(){return n}),i,o)}function Pi(e,t,r,n,i,o,a,s){var l=e.presentationTimeline,c=!e.zb||!e.$.ld,u=e.$.start,p=e.$.duration,f=t,d=null;return{createSegmentIndex:function(){var e=[f(n,i,o),"webm"==a?f(r.i(),r.h,r.g):null];return f=null,_Promise.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==a?fi(t,i,n,s):(new bi).parse(t,e,n,s),l.Jb(t,u),d=new di(t),c&&hi(d,p)}))},findSegmentPosition:function(e){return _findInstanceProperty(d).call(d,e)},getSegmentReference:function(e){return d.get(e)}}}function _i(e){return e.ec}function wi(e,t){var r,n,i,o=Ii(e,Ei),a=function(e){var t,r,n,i;return _mapInstanceProperty(t=_reduceInstanceProperty(r=_mapInstanceProperty(n=_filterInstanceProperty(i=[e.G.Ua,e.fa.Ua,e.qa.Ua]).call(i,me.Ra)).call(n,(function(e){return Zn.Y(e,"SegmentURL")}))).call(r,(function(e,t){return 0<e.length?e:t}))).call(t,(function(t){return t.getAttribute("indexRange")&&!e.me&&(e.me=!0,re.v("We do not support the SegmentURL@indexRange attribute on SegmentList. We only use the SegmentList@duration attribute or SegmentTimeline, which must be accurate.")),{Tf:t.getAttribute("media"),start:(t=Zn.R(t,"mediaRange",Zn.Hc,{start:0,end:null})).start,end:t.end}}))}(e),s=ai(e,Ei),l=s.ob;0==l&&(re.v("SegmentList@startNumber must be > 0"),l=1);var c=0;if(s.ia?c=s.ia*(l-1):s.W&&0<s.W.length&&(c=s.W[0].start),!(a={ia:s.ia,startTime:c,ob:l,sa:s.sa,W:s.W,jb:a}).ia&&!a.W&&1<a.jb.length)throw re.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies multiple segments,","but does not specify a segment duration or timeline.",e.G),new ne(2,4,4002);if(!a.ia&&!e.$.duration&&!a.W&&1==a.jb.length)throw re.v("SegmentList does not contain sufficient segment information:","the SegmentList specifies one segment,","but does not specify a segment duration, period duration,","or timeline.",e.G),new ne(2,4,4002);if(a.W&&0==a.W.length)throw re.v("SegmentList does not contain sufficient segment information:","the SegmentList has an empty timeline.",e.G),new ne(2,4,4002);return l=s=null,e.qa.id&&e.G.id&&(s=t[l=e.qa.id+","+e.G.id]),c=function(e,t,r,n){var i=n.jb.length;n.W&&n.W.length!=n.jb.length&&(i=Math.min(n.W.length,n.jb.length),re.v("The number of items in the segment timeline and the number of segment","URLs do not match, truncating",n.jb.length,"to",i));for(var o=[],a=n.startTime,s=0;s<i;s++){var l,c=n.jb[s],u=ve(r,[c.Tf]),p=void 0;p=null!=n.ia?a+n.ia:n.W?n.W[s].end:a+e,o.push(new pi(s+t,a,p,_bindInstanceProperty(l=function(e){return e}).call(l,null,u),c.start,c.end)),a=p}return o}(e.$.duration,a.ob,e.G.xa,a),s?(s.sd(c),l=e.presentationTimeline.$b(),s.Vc(l-e.$.start)):(e.presentationTimeline.Jb(c,e.$.start),s=new di(c),l&&e.zb&&(t[l]=s)),e.zb&&e.$.ld||hi(s,e.$.duration),{createSegmentIndex:_bindInstanceProperty(r=_Promise.resolve).call(r,_Promise),findSegmentPosition:_bindInstanceProperty(n=_findInstanceProperty(s)).call(n,s),getSegmentReference:_bindInstanceProperty(i=s.get).call(i,s),initSegmentReference:o,sa:a.sa}}function Ei(e){return e.Ua}function Ti(e,t,r,n){var i,o,a,s=function(e){var t=si(e,Oi,"initialization");if(!t)return null;var r=e.G.id,n=e.bandwidth||null,i=e.G.xa;return new ui((function(){var e=oi(t,r,null,n,null);return ve(i,[e])}),0,null)}(e),l=ai(e,Oi),c=si(e,Oi,"media"),u=si(e,Oi,"index");if(c=(l={ia:l.ia,timescale:l.timescale,ob:l.ob,sa:l.sa,Vd:l.Vd,W:l.W,qd:c,bc:u}).bc?1:0,c+=l.W?1:0,0==(c+=l.ia?1:0))throw re.error("SegmentTemplate does not contain any segment information:","the SegmentTemplate must contain either an index URL template","a SegmentTimeline, or a segment duration.",e.G),new ne(2,4,4002);if(1!=c&&(re.v("SegmentTemplate containes multiple segment information sources:","the SegmentTemplate should only contain an index URL template,","a SegmentTimeline or a segment duration.",e.G),l.bc?(re.info("Using the index URL template by default."),l.W=null):re.info("Using the SegmentTimeline by default."),l.ia=null),!l.bc&&!l.qd)throw re.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate's media URL template is missing.",e.G),new ne(2,4,4002);if(l.bc){if("mp4"!=(r=e.G.mimeType.split("/")[1])&&"webm"!=r)throw re.error("SegmentTemplate specifies an unsupported container type.",e.G),new ne(2,4,4006);if("webm"==r&&!s)throw re.error("SegmentTemplate does not contain sufficient segment information:","the SegmentTemplate uses a WebM container,","but does not contain an initialization URL template.",e.G),new ne(2,4,4005);n=oi(l.bc,e.G.id,null,e.bandwidth||null,null),e=Pi(e,t,s,n=ve(e.G.xa,[n]),0,null,r,l.sa)}else l.ia?(n||(e.presentationTimeline.ud(l.ia),e.presentationTimeline.vd(e.$.start)),e=function(e,t){var r,n=e.$.duration,i=t.ia,o=t.ob,a=t.timescale,s=t.qd,l=e.bandwidth||null,c=e.G.id,u=e.G.xa;return{createSegmentIndex:_bindInstanceProperty(r=_Promise.resolve).call(r,_Promise),findSegmentPosition:function(e){return 0>e||n&&e>=n?null:Math.floor(e/i)},getSegmentReference:function(e){var t=e*i,r=t+i;return n&&(r=Math.min(r,n)),0>r||n&&t>=n?null:new pi(e,t,r,(function(){var r=oi(s,c,e+o,l,t*a);return ve(u,[r])}),0,null)}}}(e,l)):(c=t=null,e.qa.id&&e.G.id&&(t=r[c=e.qa.id+","+e.G.id]),u=function(e,t){for(var r=[],n=0;n<t.W.length;n++){var i,o=n+t.ob;r.push(new pi(o,t.W[n].start,t.W[n].end,_bindInstanceProperty(i=function(e,t,r,n,i,o){var a;return e=oi(e,t,i,r,o),_mapInstanceProperty(a=ve(n,[e])).call(a,(function(e){return e.toString()}))}).call(i,null,t.qd,e.G.id,e.bandwidth||null,e.G.xa,o,t.W[n].Pg+t.Vd),0,null))}return r}(e,l),n=!e.zb||!e.$.ld,t?(n&&hi(new di(u),e.$.duration),t.sd(u),r=e.presentationTimeline.$b(),t.Vc(r-e.$.start)):(e.presentationTimeline.Jb(u,e.$.start),t=new di(u),c&&e.zb&&(r[c]=t)),n&&hi(t,e.$.duration),e={createSegmentIndex:_bindInstanceProperty(i=_Promise.resolve).call(i,_Promise),findSegmentPosition:_bindInstanceProperty(o=_findInstanceProperty(t)).call(o,t),getSegmentReference:_bindInstanceProperty(a=t.get).call(a,t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:s,sa:l.sa}}function Oi(e){return e.gc}X("shaka.media.InitSegmentReference",ui),ui.prototype.Tc=function(){return this.i()},ui.prototype.createUris=ui.prototype.Tc,ui.prototype.dd=function(){return this.h},ui.prototype.getStartByte=ui.prototype.dd,ui.prototype.cd=function(){return this.g},ui.prototype.getEndByte=ui.prototype.cd,X("shaka.media.SegmentReference",pi),pi.prototype.ka=function(){return this.position},pi.prototype.getPosition=pi.prototype.ka,pi.prototype.xc=function(){return this.startTime},pi.prototype.getStartTime=pi.prototype.xc,pi.prototype.qf=function(){return this.endTime},pi.prototype.getEndTime=pi.prototype.qf,pi.prototype.Tc=function(){return this.i()},pi.prototype.createUris=pi.prototype.Tc,pi.prototype.dd=function(){return this.h},pi.prototype.getStartByte=pi.prototype.dd,pi.prototype.cd=function(){return this.g},pi.prototype.getEndByte=pi.prototype.cd,X("shaka.media.SegmentIndex",di),di.prototype.destroy=function(){return this.g=null,_Promise.resolve()},di.prototype.destroy=di.prototype.destroy,di.prototype.find=function(e){for(var t=this.g.length-1,r=t;0<=r;--r){var n=this.g[r],i=r<t?this.g[r+1].startTime:n.endTime;if(e>=n.startTime&&e<i)return n.position}return this.g.length&&e<this.g[0].startTime?this.g[0].position:null},di.prototype.find=_findInstanceProperty(di.prototype),di.prototype.get=function(e){return 0==this.g.length||0>(e-=this.g[0].position)||e>=this.g.length?null:this.g[e]},di.prototype.get=di.prototype.get,di.prototype.offset=function(e){for(var t=0;t<this.g.length;++t)this.g[t].startTime+=e,this.g[t].endTime+=e},di.prototype.offset=di.prototype.offset,di.prototype.sd=function(e){for(var t=[],r=0,n=0;r<this.g.length&&n<e.length;){var i=this.g[r],o=e[n];i.startTime<o.startTime?(t.push(i),r++):(i.startTime>o.startTime?0==r?t.push(o):re.v("Refusing to rewrite original references on update!"):(.1<Math.abs(i.endTime-o.endTime)?t.push(new pi(i.position,o.startTime,o.endTime,o.i,o.h,o.g)):t.push(i),r++),n++)}for(;r<this.g.length;)t.push(this.g[r++]);if(t.length)for(r=t[t.length-1].position+1;n<e.length;)i=new pi(r++,(i=e[n++]).startTime,i.endTime,i.i,i.h,i.g),t.push(i);else t=e;this.g=t},di.prototype.merge=di.prototype.sd,di.prototype.Vc=function(e){for(var t=0;t<this.g.length;++t)if(this.g[t].endTime>e){var r;return void _spliceInstanceProperty(r=this.g).call(r,0,t)}this.g=[]},di.prototype.evict=di.prototype.Vc,yi.prototype.Ca=function(){return this.g.Ca()},bi.prototype.parse=function(e,t,r,n){var i;if(440786851!=gi(t=new yi(new DataView(t))).id)throw re.error("Not an EBML element."),new ne(2,3,3008);var o=gi(t);if(408125543!=o.id)throw re.error("Not a Segment element."),new ne(2,3,3009);for(t=o.g.byteOffset,o=new yi(o.g),i=null;o.Ca();){var a=gi(o);if(357149030==a.id){i=a;break}}if(!i)throw re.error("Not an Info element."),new ne(2,3,3010);for(o=new yi(i.g),i=1e6,a=null;o.Ca();){var s=gi(o);if(2807729==s.id)i=vi(s);else if(17545==s.id)if(4==(a=s).g.byteLength)a=a.g.getFloat32(0);else{if(8!=a.g.byteLength)throw new ne(2,3,3003);a=a.g.getFloat64(0)}}if(null==a)throw new ne(2,3,3011);if(i=a*(o=i/1e9),475249515!=(e=gi(new yi(new DataView(e)))).id)throw re.error("Not a Cues element."),new ne(2,3,3007);return function(e,t,r,n,i,o){function a(){return i}var s=[];e=new yi(e.g);for(var l=null,c=null;e.Ca();){var u=gi(e);if(187==u.id){var p=Si(u);p&&(u=r*p.Qg,p=t+p.qg,null!=l&&s.push(new pi(s.length,l-o,u-o,a,c,p-1)),l=u,c=p)}}return null!=l&&s.push(new pi(s.length,l-o,n-o,a,c,null)),s}(e,t,o,i,r,n)};var Ai={Nb:{},cc:{},Fd:function(e,t){Ai.cc[e]=t}};function Ci(e,t,r){this.j=e,this.Ic=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.u=0,this.A=!0,this.o=0,this.C=void 0===r||r}function Ri(e,t,r,n){return e=nt(e,n),0==t&&null==r||(e.headers.Range=r?"bytes="+t+"-"+r:"bytes="+t+"-"),e}function xi(){var e=this;this.h=this.g=null,this.j=[],this.i=null,this.u=[],this.m=1,this.A={},this.C=0,this.F=new Q(5),this.o=new je((function(){!function(e){I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:return re.info("Updating manifest..."),r=0,k(t,2),x(t,Mi(e),4);case 4:r=t.B,j(t,3);break;case 2:n=D(t),e.h&&(n.severity=1,e.h.onError(n));case 3:if(!e.h)return t.return();Di(e,r),M(t)}}))}))}(e)})),this.l=new Qe}function Mi(e){var t=_Date$now(),r=e.h.networkingEngine.request(0,nt(e.j,e.g.retryParameters));return Ze(e.l,r),r.promise.then((function(t){var r;if(e.h)return t.uri&&!_includesInstanceProperty(r=e.j).call(r,t.uri)&&e.j.unshift(t.uri),function(e,t,r){if(t=Zn.ze(t,"MPD"),!t)throw new ne(2,4,4001,r);return t=ci(t,e.g.retryParameters,e.g.dash.xlinkFailGracefully,r,e.h.networkingEngine),Ze(e.l,t),t.promise.then((function(t){return function(e,t,r){return I((function n(){var i,o,a,s,l,c,u,p,f,d,h,y,g,$,m,v,b,S,I,P,_,w,E,T;return V(n,(function(n){var O,A,C;switch(n.s){case 1:s=me,c=[r],0<(u=_filterInstanceProperty(O=_mapInstanceProperty(A=(l=Zn).Y(t,"Location")).call(A,l.uc)).call(O,s.Ra)).length&&(p=ve(c,u),c=e.j=p),f=_mapInstanceProperty(C=l.Y(t,"BaseURL")).call(C,l.uc),d=ve(c,f),h=e.g.dash.ignoreMinBufferTime,y=0,h||(y=l.R(t,"minBufferTime",l.Ma)),e.C=l.R(t,"minimumUpdatePeriod",l.Ma,-1),g=l.R(t,"availabilityStartTime",l.jg),$=l.R(t,"timeShiftBufferDepth",l.Ma),m=l.R(t,"maxSegmentDuration",l.Ma),v=t.getAttribute("type")||"static",b=e.g.dash.ignoreSuggestedPresentationDelay,S=null,b||(S=l.R(t,"suggestedPresentationDelay",l.Ma)),e.i?I=e.i.presentationTimeline:(P=Math.max(e.g.dash.defaultPresentationDelay,1.5*y),I=new Ci(g,null!=S?S:P,e.g.dash.autoCorrectDrift));for(var R={zb:"static"!=v,presentationTimeline:I,qa:null,$:null,fa:null,G:null,bandwidth:0,me:!1},k=d,N=Zn.R(t,"mediaPresentationDuration",Zn.Ma),j=[],D=0,L=Zn.Y(t,"Period"),U=0;U<L.length;U++){var F,B=L[U];D=Zn.R(B,"start",Zn.Ma,D);var K=Zn.R(B,"duration",Zn.Ma),H=null;if(U!=L.length-1){var V=Zn.R(L[U+1],"start",Zn.Ma);null!=V&&(H=V-D)}else null!=N&&(H=N-D);if(V=Ie,H&&K&&Math.abs(H-K)>V&&re.v("There is a gap/overlap between Periods",B),null==H&&(H=K),B=ki(e,R,k,{start:D,duration:H,node:B,ld:null==H||U==L.length-1}),j.push(B),K=R.qa.id,_includesInstanceProperty(F=e.u).call(F,K)||(e.u.push(K),e.i&&(e.h.filterNewPeriod(B),e.i.periods.push(B))),null==H){U!=L.length-1&&re.v("Skipping Period",U+1,"and any subsequent Periods:","Period",U+1,"does not have a valid start time.",j[U+1]),D=null;break}D+=H}if(null==e.i&&e.h.filterAllPeriods(j),null!=N?(D!=N&&re.v("@mediaPresentationDuration does not match the total duration of all","Periods."),i=j,o=N,a=!1):(i=j,o=D,a=!0),_=o,w=i,I.hc("static"==v),"static"!=v&&a||I.Fa(_||1/0),I.aa()&&!isNaN(e.g.availabilityWindowOverride)&&($=e.g.availabilityWindowOverride),null==$&&($=1/0),I.Pd($),I.ud(m||1),e.i){n.I(0);break}if(e.i={presentationTimeline:I,periods:w,offlineSessionIds:[],minBufferTime:y||0},!I.Pe()){n.I(0);break}return E=l.Y(t,"UTCTiming"),x(n,function(e,t,r){var n;r=_mapInstanceProperty(r).call(r,(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var i=e.g.dash.clockSyncUri;return!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),me.df(r,_bindInstanceProperty(n=function(e){var r=e.scheme;switch(e=e.value,r){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return Ui(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return Ui(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return r=Date.parse(e),isNaN(r)?0:r-_Date$now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return re.ba("NTP UTCTiming scheme is not supported"),_Promise.reject();default:return re.ba("Unrecognized scheme in UTCTiming element",r),_Promise.reject()}}).call(n,e)).catch((function(){return re.ba("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(e,d,E),4);case 4:if(T=n.B,!e.h)return n.return();I.Ke(T),M(n)}}))}))}(e,t,r)}))}(e,t.data,t.uri)})).then((function(){var r=(_Date$now()-t)/1e3;return Z(e.F,1,r),r}))}function ki(e,t,r,n){var i,o,a,s,l,c;if(t.qa=Li(n.node,null,r),t.$=n,t.qa.id||(re.info("No Period ID given for Period with start time "+n.start+", Assigning a default"),t.qa.id="__shaka_period_"+n.start),_forEachInstanceProperty(i=Zn.Y(n.node,"EventStream")).call(i,_bindInstanceProperty(o=e.kg).call(o,e,n.start,n.duration)),r=_filterInstanceProperty(a=_mapInstanceProperty(s=Zn.Y(n.node,"AdaptationSet")).call(s,_bindInstanceProperty(l=e.ig).call(l,e,t))).call(a,me.Ra),t.zb){t=[];for(var u=b(r),p=u.next();!p.done;p=u.next())for(var f=(p=b(p.value.tg)).next();!f.done;f=p.next())t.push(f.value);if(t.length!=new _Set(t).size)throw new ne(2,4,4018)}var d=_filterInstanceProperty(r).call(r,(function(e){return!e.Td}));if(_forEachInstanceProperty(c=_filterInstanceProperty(r).call(r,(function(e){return e.Td}))).call(c,(function(e){var t=e.Td.split(" ");_forEachInstanceProperty(d).call(d,(function(r){var n;_includesInstanceProperty(t).call(t,r.id)&&_forEachInstanceProperty(n=r.streams).call(n,(function(t){var r;t.trickModeVideo=_findInstanceProperty(r=e.streams).call(r,(function(e){return vt(t.codecs)[0]==vt(e.codecs)[0]}))}))}))})),t=Ni(d,"video"),u=Ni(d,"audio"),!t.length&&!u.length)throw new ne(2,4,4004);for(r=e.g.disableAudio,u.length&&!r||(u=[null]),r=e.g.disableVideo,t.length&&!r||(t=[null]),r=[],p=0;p<u.length;p++)for(f=0;f<t.length;f++)ji(e,u[p],t[f],r);if(t=[],!e.g.disableText)for(e=Ni(d,"text"),u=0;u<e.length;u++)t.push.apply(t,e[u].streams);return{startTime:n.start,textStreams:t,variants:r}}function Ni(e,t){return _filterInstanceProperty(e).call(e,(function(e){return e.contentType==t}))}function ji(e,t,r,n){if(t||r)if(t&&r){var i=t.drmInfos,o=r.drmInfos;if(!i.length||!o.length||0<Wt(i,o).length){o=Wt(t.drmInfos,r.drmInfos);for(var a=0;a<t.streams.length;a++)for(var s=0;s<r.streams.length;s++)i=(r.streams[s].bandwidth||0)+(t.streams[a].bandwidth||0),i={id:e.m++,language:t.language,primary:t.pd||r.pd,audio:t.streams[a],video:r.streams[s],bandwidth:i,drmInfos:o,allowedByApplication:!0,allowedByKeySystem:!0},n.push(i)}}else for(o=t||r,a=0;a<o.streams.length;a++)i=o.streams[a].bandwidth||0,i={id:e.m++,language:o.language||"und",primary:o.pd,audio:t?o.streams[a]:null,video:r?o.streams[a]:null,bandwidth:i,drmInfos:o.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},n.push(i)}function Di(e,t){0>e.C||e.o.V(Math.max(3,e.C-t,ee(e.F)))}function Li(e,t,r){var n,i;t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,wd:null,audioSamplingRate:null},r=r||t.xa;var o=Zn.Mb,a=Zn.ff,s=_mapInstanceProperty(n=Zn.Y(e,"BaseURL")).call(n,Zn.uc),l=e.getAttribute("contentType")||t.contentType,c=e.getAttribute("mimeType")||t.mimeType,u=e.getAttribute("codecs")||t.codecs;a=Zn.R(e,"frameRate",a)||t.frameRate;for(var p=e.getAttribute("sar")||t.pixelAspectRatio,f=Zn.Y(e,"InbandEventStream"),d=_sliceInstanceProperty(i=t.emsgSchemeIdUris).call(i),h=(f=b(f)).next();!h.done;h=f.next())h=h.value.getAttribute("schemeIdUri"),_includesInstanceProperty(d).call(d,h)||d.push(h);return f=function(e){for(var t=0;t<e.length;++t){var r=e[t],n=r.getAttribute("schemeIdUri");if(n&&(r=r.getAttribute("value")))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return _trimInstanceProperty(r).call(r).split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":var i=_parseInt$1(r,10);if(!i){re.v("Channel parsing failure! Ignoring scheme and value",n,r);continue}return i;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(i=_parseInt$1(r,16))){re.v("Channel parsing failure! Ignoring scheme and value",n,r);continue}for(e=0;i;)1&i&&++e,i>>=1;return e;default:re.v("Unrecognized audio channel scheme:",n,r)}}return null}(f=Zn.Y(e,"AudioChannelConfiguration"))||t.wd,h=Zn.R(e,"audioSamplingRate",o)||t.audioSamplingRate,l||(l=Fi(c,u)),{xa:ve(r,s),ec:Zn.sc(e,"SegmentBase")||t.ec,Ua:Zn.sc(e,"SegmentList")||t.Ua,gc:Zn.sc(e,"SegmentTemplate")||t.gc,width:Zn.R(e,"width",o)||t.width,height:Zn.R(e,"height",o)||t.height,contentType:l,mimeType:c,codecs:u,frameRate:a,pixelAspectRatio:p,emsgSchemeIdUris:d,id:e.getAttribute("id"),wd:f,audioSamplingRate:h}}function Ui(e,t,r,n){return(t=nt(t=ve(t,[r]),e.g.retryParameters)).method=n,t=e.h.networkingEngine.request(4,t),Ze(e.l,t),t.promise.then((function(e){if("HEAD"==n){if(!e.headers||!e.headers.date)return re.v("UTC timing response is missing","expected date header"),0;e=e.headers.date}else e=_e(e.data);return e=Date.parse(e),isNaN(e)?(re.v("Unable to parse date from UTC timing response"),0):e-_Date$now()}))}function Fi(e,t){return _r($t(e,t))?"text":e.split("/")[0]}function Bi(e,t,r,n){this.h=e,this.type=t,this.g=r,this.segments=n||null}function Ki(e,t,r,n){this.id=e,this.name=t,this.g=r,this.value=void 0===n?null:n}function Hi(e,t){this.name=e,this.value=t}function Vi(e,t,r){return(e=e.getAttribute(t))?e.value:r||null}function Gi(e,t){this.h=t,this.g=e}X("shaka.media.ManifestParser.registerParserByExtension",Ai.Fd),Ai.Qb=function(e,t){Ai.Nb[e]=t},X("shaka.media.ManifestParser.registerParserByMime",Ai.Qb),Ai.ng=function(){var e={};if(St()){for(var t in Ai.Nb)e[t]=!0;for(var r in Ai.cc)e[r]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var n=(r=b(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=r.next())e[n=n.value]=St()?!!Ai.Nb[n]:It(n);for(var i in t)e[i]=St()?!!Ai.cc[i]:It(t[i]);return e},Ai.create=function(e,t,r,n){return I((function i(){var o,a;return V(i,(function(i){switch(i.s){case 1:return k(i,2),x(i,Ai.rf(e,t,r,n),4);case 4:return o=i.B,i.return(new o);case 2:throw(a=D(i)).severity=2,a}}))}))},Ai.rf=function(e,t,r,n){return I((function i(){var o,a,s,l,c;return V(i,(function(i){switch(i.s){case 1:if(o=Ai,n){if(a=o.Nb[n.toLowerCase()])return i.return(a);re.v("Could not determine manifest type using MIME type ",n)}if(s=o.getExtension(e)){if(l=o.cc[s])return i.return(l);re.v("Could not determine manifest type for extension ",s)}else re.v("Could not find extension for ",e);if(n){i.I(2);break}return x(i,o.zf(e,t,r),3);case 3:if(n=i.B){if(c=Ai.Nb[n])return i.return(c);re.v("Could not determine manifest type using MIME type",n)}case 2:throw new ne(2,4,4e3,e)}}))}))},Ai.zf=function(e,t,r){return I((function n(){var i,o,a;return V(n,(function(n){switch(n.s){case 1:return(i=nt([e],r)).method="HEAD",x(n,t.request(0,i).promise,2);case 2:return o=n.B,a=o.headers["content-type"],n.return(a?a.toLowerCase().split(";").shift():"")}}))}))},Ai.getExtension=function(e){return 1==(e=new oe(e).pa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},Ai.isSupported=function(e,t){return!!St()&&(t in Ai.Nb||Ai.getExtension(e)in Ai.cc)},X("shaka.media.PresentationTimeline",Ci),Ci.prototype.ha=function(){return this.l},Ci.prototype.getDuration=Ci.prototype.ha,Ci.prototype.xf=function(){return this.g},Ci.prototype.getMaxSegmentDuration=Ci.prototype.xf,Ci.prototype.Fa=function(e){this.l=e},Ci.prototype.setDuration=Ci.prototype.Fa,Ci.prototype.Ff=function(){return this.j},Ci.prototype.getPresentationStartTime=Ci.prototype.Ff,Ci.prototype.Ke=function(e){this.u=e},Ci.prototype.setClockOffset=Ci.prototype.Ke,Ci.prototype.hc=function(e){this.A=e},Ci.prototype.setStatic=Ci.prototype.hc,Ci.prototype.Pd=function(e){this.m=e},Ci.prototype.setSegmentAvailabilityDuration=Ci.prototype.Pd,Ci.prototype.Ag=function(e){this.Ic=e},Ci.prototype.setDelay=Ci.prototype.Ag,Ci.prototype.pf=function(){return this.Ic},Ci.prototype.getDelay=Ci.prototype.pf,Ci.prototype.Jb=function(e,t){if(0!=e.length){var r=e[e.length-1].endTime+t;this.vd(e[0].startTime+t),this.g=_reduceInstanceProperty(e).call(e,(function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,r),null!=this.j&&this.C&&(this.j=(_Date$now()+this.u)/1e3-this.h-this.g),re.K("notifySegments:","maxSegmentDuration="+this.g)}},Ci.prototype.notifySegments=Ci.prototype.Jb,Ci.prototype.vd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},Ci.prototype.notifyMinSegmentStartTime=Ci.prototype.vd,Ci.prototype.ud=function(e){this.g=Math.max(this.g,e),re.K("notifyNewSegmentDuration:","maxSegmentDuration="+this.g)},Ci.prototype.notifyMaxSegmentDuration=Ci.prototype.ud,Ci.prototype.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},Ci.prototype.offset=Ci.prototype.offset,Ci.prototype.aa=function(){return 1/0==this.l&&!this.A},Ci.prototype.isLive=Ci.prototype.aa,Ci.prototype.ib=function(){return 1/0!=this.l&&!this.A},Ci.prototype.isInProgress=Ci.prototype.ib,Ci.prototype.$b=function(){if(1/0==this.m)return this.o;var e=this.Db()-this.m;return Math.max(this.o,e)},Ci.prototype.getSegmentAvailabilityStart=Ci.prototype.$b,Ci.prototype.Le=function(e){this.o=e},Ci.prototype.setUserSeekStart=Ci.prototype.Le,Ci.prototype.Db=function(){return this.aa()||this.ib()?Math.min(Math.max(0,(_Date$now()+this.u)/1e3-this.g-this.j),this.l):this.l},Ci.prototype.getSegmentAvailabilityEnd=Ci.prototype.Db,Ci.prototype.Zb=function(e){var t=Math.max(this.i,this.o);if(1/0==this.m)return Math.ceil(1e3*t)/1e3;var r=this.Db()-this.m;return e=Math.min(r+e,this.Ka()),Math.max(t,e)},Ci.prototype.getSafeSeekRangeStart=Ci.prototype.Zb,Ci.prototype.Cb=function(){return this.Zb(0)},Ci.prototype.getSeekRangeStart=Ci.prototype.Cb,Ci.prototype.Ka=function(){var e=this.aa()||this.ib()?this.Ic:0;return Math.max(0,this.Db()-e)},Ci.prototype.getSeekRangeEnd=Ci.prototype.Ka,Ci.prototype.Pe=function(){return!(null==this.j||null!=this.h&&this.C)},Ci.prototype.usingPresentationStartTime=Ci.prototype.Pe,X("shaka.dash.DashParser",xi),(p=xi.prototype).configure=function(e){this.g=e},p.start=function(e,t){var r=this;return I((function n(){var i;return V(n,(function(n){switch(n.s){case 1:return r.j=[e],r.h=t,x(n,Mi(r),2);case 2:if(i=n.B,r.h&&Di(r,i),!r.h)throw new ne(2,7,7001);return n.return(r.i)}}))}))},p.stop=function(){return this.g=this.h=null,this.j=[],this.i=null,this.u=[],this.A={},null!=this.o&&(this.o.stop(),this.o=null),this.l.destroy()},p.update=function(){var e;Mi(this).catch(_bindInstanceProperty(e=function(e){this.h&&this.h.onError(e)}).call(e,this))},p.onExpirationUpdated=function(){},p.ig=function(e,t){var r,n,i,o,a;if(e.fa=Li(t,e.qa,null),"image"==e.fa.contentType)return re.v("Skipping Image AdaptationSet",e.fa),null;var s=!1,l=Zn.Y(t,"Role"),c=_filterInstanceProperty(r=_mapInstanceProperty(l).call(l,(function(e){return e.getAttribute("value")}))).call(r,me.Ra),u=void 0,p="text"==e.fa.contentType;p&&(u="subtitle");for(var f=0;f<l.length;f++){var d=l[f].getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(d=l[f].getAttribute("value"),d){case"main":s=!0;break;case"caption":case"subtitle":u=d}}var h=null,y=!1;_forEachInstanceProperty(n=Zn.Y(t,"EssentialProperty")).call(n,(function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?h=e.getAttribute("value"):y=!0})),f=Zn.Y(t,"Accessibility");var g=new _Map;for(l={},d=(f=b(f)).next();!d.done;l={Vb:l.Vb},d=f.next()){var $,m=d.value;d=m.getAttribute("schemeIdUri"),m=m.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==d||"urn:scte:dash:cc:cea-708:2015"==d?(l.Vb=1,null!=m?_forEachInstanceProperty($=m.split(";")).call($,function(e){return function(t){if(_includesInstanceProperty(t).call(t,"=")){var r;t=t.split("=");var n=_startsWithInstanceProperty(r=t[0]).call(r,"CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else n="CC"+e.Vb,e.Vb+=2;g.set(n,Hr(t))}}(l)):g.set("CC1","und")):"urn:mpeg:dash:role:2011"==d&&null!=m&&(c.push(m),"captions"==m&&(u="caption"))}if(y)return null;var v=ti(l=Zn.Y(t,"ContentProtection"),this.g.dash.customScheme,this.g.dash.ignoreDrmInfo);if(l=Hr(t.getAttribute("lang")||"und"),f=t.getAttribute("label"),(d=Zn.Y(t,"Label"))&&d.length&&((d=d[0]).textContent&&(f=d.textContent)),d=Zn.Y(t,"Representation"),0==(c=_filterInstanceProperty(i=_mapInstanceProperty(d).call(d,_bindInstanceProperty(o=this.lg).call(o,this,e,v,u,l,f,s,c,g))).call(i,(function(e){return!!e}))).length){if(this.g.dash.ignoreEmptyAdaptationSet||p)return null;throw new ne(2,4,4003)}return e.fa.contentType&&"application"!=e.fa.contentType||(e.fa.contentType=Fi(c[0].mimeType,c[0].codecs),_forEachInstanceProperty(c).call(c,(function(t){t.type=e.fa.contentType}))),_forEachInstanceProperty(c).call(c,(function(e){var t;_forEachInstanceProperty(t=v.drmInfos).call(t,(function(t){e.keyId&&t.keyIds.push(e.keyId)}))})),p=_filterInstanceProperty(a=_mapInstanceProperty(d).call(d,(function(e){return e.getAttribute("id")}))).call(a,me.Ra),{id:e.fa.id||"__fake__"+this.m++,contentType:e.fa.contentType,language:l,pd:s,streams:c,drmInfos:v.drmInfos,Td:h,tg:p}},p.lg=function(e,t,r,n,i,o,a,s,l){if(e.G=Li(l,e.fa,null),!function(e){var t=e.ec?1:0;if(t+=e.Ua?1:0,t+=e.gc?1:0,0==t)return"text"==e.contentType||"application"==e.contentType||(re.v("Representation does not contain a segment information source:","the Representation must contain one of SegmentBase, SegmentList,",'SegmentTemplate, or explicitly indicate that it is "text".',e),!1);return 1!=t&&(re.v("Representation contains multiple segment information sources:","the Representation should only contain one of SegmentBase,","SegmentList, or SegmentTemplate.",e),e.ec?(re.info("Using SegmentBase by default."),e.Ua=null):re.info("Using SegmentList by default."),e.gc=null),!0}(e.G))return re.v("Skipping Representation",e.G),null;e.bandwidth=Zn.R(l,"bandwidth",Zn.Gc)||0;var c=e.G.contentType;c="text"==c||"application"==c;try{var u,p=_bindInstanceProperty(u=this.ug).call(u,this);if(e.G.ec)var f=function(e,t){var r=Number(si(e,_i,"presentationTimeOffset"))||0,n=si(e,_i,"timescale"),i=1;n&&(i=Zn.Gc(n)||1),r=r/i||0,n=Ii(e,_i);var o=e.G.contentType;if(i=e.G.mimeType.split("/")[1],"text"!=o&&"mp4"!=i&&"webm"!=i)throw re.error("SegmentBase specifies an unsupported container type.",e.G),new ne(2,4,4006);if("webm"==i&&!n)throw re.error("SegmentBase does not contain sufficient segment information:","the SegmentBase uses a WebM container,","but does not contain an Initialization element.",e.G),new ne(2,4,4005);o=li(e,_i,"RepresentationIndex");var a=si(e,_i,"indexRange"),s=e.G.xa;if(a=Zn.Hc(a||""),o){var l=o.getAttribute("sourceURL");l&&(s=ve(e.G.xa,[l])),a=Zn.R(o,"range",Zn.Hc,a)}if(!a)throw re.error("SegmentBase does not contain sufficient segment information:","the SegmentBase does not contain @indexRange","or a RepresentationIndex element.",e.G),new ne(2,4,4002);return{createSegmentIndex:(i=Pi(e,t,n,s,a.start,a.end,i,r)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:n,sa:r}}(e,p);else if(e.G.Ua)f=wi(e,this.A);else if(e.G.gc)f=Ti(e,p,this.A,!!this.i);else{var d,h=e.G.xa,y=e.$.duration||0;f={createSegmentIndex:_bindInstanceProperty(d=_Promise.resolve).call(d,_Promise),findSegmentPosition:function(e){return 0<=e&&e<y?1:null},getSegmentReference:function(e){return 1!=e?null:new pi(1,0,y,(function(){return h}),0,null)},initSegmentReference:null,sa:0}}}catch(e){if(c&&4002==e.code)return null;throw e}return l=function(e,t,r,n){var i,o=ti(e,t,n);if(r.ge)e=1==r.drmInfos.length&&!r.drmInfos[0].keySystem,t=0==o.drmInfos.length,(0==r.drmInfos.length||e&&!t)&&(r.drmInfos=o.drmInfos),r.ge=!1;else if(0<o.drmInfos.length&&(r.drmInfos=_filterInstanceProperty(i=r.drmInfos).call(i,(function(e){var t;return _someInstanceProperty(t=o.drmInfos).call(t,(function(t){return t.keySystem==e.keySystem}))})),0==r.drmInfos.length))throw new ne(2,4,4008);return o.be||r.be}(l=Zn.Y(l,"ContentProtection"),this.g.dash.customScheme,t,this.g.dash.ignoreDrmInfo),{id:this.m++,originalId:e.G.id,createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:f.initSegmentReference,presentationTimeOffset:f.sa,mimeType:e.G.mimeType,codecs:e.G.codecs,frameRate:e.G.frameRate,pixelAspectRatio:e.G.pixelAspectRatio,bandwidth:e.bandwidth,width:e.G.width,height:e.G.height,kind:r,encrypted:0<t.drmInfos.length,keyId:l,language:n,label:i,type:e.fa.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:e.G.emsgSchemeIdUris,roles:a,channelsCount:e.G.wd,audioSamplingRate:e.G.audioSamplingRate,closedCaptions:s}},p.kg=function(e,t,r){var n,i,o=Zn.Mb,a=r.getAttribute("schemeIdUri")||"",s=r.getAttribute("value")||"",l=Zn.R(r,"timescale",o)||1;_forEachInstanceProperty(n=Zn.Y(r,"Event")).call(n,_bindInstanceProperty(i=function(r){var n=Zn.R(r,"presentationTime",o)||0,i=Zn.R(r,"duration",o)||0;i=(n=n/l+e)+i/l,null!=t&&(n=Math.min(n,e+t),i=Math.min(i,e+t)),r={schemeIdUri:a,value:s,startTime:n,endTime:i,id:r.getAttribute("id")||"",eventElement:r},this.h.onTimelineRegionAdded(r)}).call(i,this))},p.ug=function(e,t,r){return e=Ri(e,t,r,this.g.retryParameters),e=this.h.networkingEngine.request(1,e),Ze(this.l,e),e.promise.then((function(e){return e.data}))},Ai.Fd("mpd",xi),Ai.Qb("application/dash+xml",xi),Ai.Qb("video/vnd.mpeg.dash.mpd",xi),Ki.prototype.toString=function(){var e;var t="#"+this.name,r=this.g?_mapInstanceProperty(e=this.g).call(e,(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&r.unshift(this.value),0<r.length&&(t+=":"+r.join(",")),t},Ki.prototype.getAttribute=function(e){var t,r=_filterInstanceProperty(t=this.g).call(t,(function(t){return t.name==e}));return r.length?r[0]:null};var Wi={Ab:function(e,t){return _filterInstanceProperty(e).call(e,(function(e){return e.name==t}))},cb:function(e,t){var r=Wi.Ab(e,t);return r.length?r[0]:null},Zc:function(e,t,r){return _filterInstanceProperty(e).call(e,(function(e){var n=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),n.value==t&&e.value==r}))},Sc:function(e,t){return ve([e],[t])[0]},kd:function(e){return/^#(?!EXT)/m.test(e)}};function zi(e){this.h=e,this.g=0}function qi(e){Yi(e,/[ \t]+/gm)}function Yi(e,t){t.lastIndex=e.g;var r=t.exec(e.h);return r=null==r?null:{position:r.index,length:r[0].length,wg:r},e.g==e.h.length||null==r||r.position!=e.g?null:(e.g+=r.length,r.wg)}function Xi(e){return e.g==e.h.length?null:(e=Yi(e,/[^ \t\n]*/gm))?e[0]:null}function Ji(){this.g=0}function Qi(e,t,r){var n;t=_e(t);var i=(t=_trimInstanceProperty(n=t.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).call(n)).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new ne(2,4,4015);t=0;for(var o=1;o<i.length;o++)if(!Wi.kd(i[o])){var a=eo(e,i[o]);if(--e.g,_includesInstanceProperty(to).call(to,a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(o+=1)}for(o=[],a=1;a<i.length;)if(Wi.kd(i[a]))a+=1;else{var s=eo(e,i[a]);if(_includesInstanceProperty(ro).call(ro,s.name)){if(1!=t)throw new ne(2,4,4017);return new Bi(r,t,o,e=Zi(e,r,i=_spliceInstanceProperty(i).call(i,a,i.length-a),o))}o.push(s),a+=1,"EXT-X-STREAM-INF"==s.name&&(s.g.push(new Hi("URI",i[a])),a+=1)}return new Bi(r,t,o)}function Zi(e,t,r,n){var i=[],o=[];return _forEachInstanceProperty(r).call(r,(function(r){if(/^(#EXT)/.test(r))r=eo(e,r),_includesInstanceProperty(to).call(to,r.name)?n.push(r):o.push(r);else{if(Wi.kd(r))return[];r=Wi.Sc(t,_trimInstanceProperty(r).call(r)),i.push(new Gi(r,o)),o=[]}})),i}function eo(e,t){var r=e.g++,n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new ne(2,4,4016,t);var i,o=n[1],a=n[2];if(n=[],a){var s;(s=Yi(a=new zi(a),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Yi(a,l);)n.push(new Hi(s[1],s[2]||s[3]))}return new Ki(r,o,n,i)}var to="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),ro="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function no(e){try{var t=no.parse(e);return Ke({uri:e,Bd:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return Fe(e)}}function io(){var e=this;this.g=this.j=null,this.ea=1,this.L=new _Map,this.Z=new _Set,this.h=new _Map,this.i=null,this.F="",this.C=new Ji,this.X=0,this.m=new je((function(){!function(e){I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:return re.info("Updating manifest..."),e.j?(k(t,2),x(t,e.update(),4)):t.return();case 4:r=e.X,e.m.V(r),j(t,0);break;case 2:if(n=D(t),!e.j)return t.return();n.severity=1,e.j.onError(n),e.m.V(.1),M(t)}}))}))}(e)})),this.l=wo,this.A=null,this.J=0,this.M=1/0,this.o=new Qe,this.P=[],this.u=new _Map,this.da=!1}function oo(e,t){return I((function r(){var n,i,o,a,s,l,c,u,p,f;return V(r,(function(r){switch(r.s){case 1:return n=Wi,i=Eo,o=t.We,x(r,Po(e,nt([o],e.g.retryParameters),0),2);case 2:if(a=r.B,1!=(s=Qi(e.C,a.data,a.uri)).type)throw new ne(2,4,4017);return c=(l=n.cb(s.g,"EXT-X-MEDIA-SEQUENCE"))?Number(l.value):0,u=t.stream,x(r,ho(e,t.Pc,s,c,u.mimeType,u.codecs),3);case 3:p=r.B,t.fc.g=p,f=p[p.length-1],n.cb(s.g,"EXT-X-ENDLIST")&&(Io(e,i.$a),e.i.Fa(f.endTime)),M(r)}}))}))}function ao(e){_forEachInstanceProperty(e).call(e,(function(e){if(e){var t=e.stream.codecs.split(",");t=_filterInstanceProperty(t).call(t,(function(e){return"mp4a.40.34"!=e})),e.stream.codecs=t.join(",")}}))}function so(e,t,r,n,i){return{id:e.ea++,language:t?t.language:"und",primary:!!t&&t.primary||!!r&&r.primary,audio:t,video:r,bandwidth:n,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function lo(e,t,r){return I((function n(){var i,o,a,s,l,c,u,p,f,d,h;return V(n,(function(n){switch(n.s){case 1:if(i=$o(t,"URI"),e.h.has(i))return n.return(e.h.get(i));if(o=$o(t,"TYPE").toLowerCase(),a=Se,"subtitles"==o&&(o=a.za),s=Hr(Vi(t,"LANGUAGE","und")),l=Vi(t,"NAME"),c=t.getAttribute("DEFAULT"),u="YES"==c,p=Vi(t,"CHANNELS"),"audio"==o)if(p){var y=p.split("/")[0];y=_parseInt$1(y,10)}else y=null;else y=null;return f=y,d=Vi(t,"CHARACTERISTICS"),x(n,co(e,i,r,o,s,u,l,f,null,d),2);case 2:return h=n.B,e.h.has(i)?n.return(e.h.get(i)):null==h?n.return(null):(e.L.set(t.id,h),e.h.set(i,h),n.return(h))}}))}))}function co(e,t,r,n,i,o,a,s,l,c){return I((function u(){var p,f,d,h,y,g,$,m,v,S,P,_,w,E,T,O,A,C,R,M,N,L,U,F,B,K,H,G;return V(u,(function(u){var W,z,q,Y;switch(u.s){case 1:return f=(p=Wi).Sc(e.F,t),x(u,Po(e,nt([f],e.g.retryParameters),0),2);case 2:if(d=u.B,f=d.uri,1!=(h=Qi(e.C,d.data,f)).type)throw new ne(2,4,4017);y=[],_forEachInstanceProperty(W=h.segments).call(W,(function(e){e=p.Ab(e.h,"EXT-X-KEY"),y.push.apply(y,e)})),g=!1,$=[],m=null;for(var X=b(y),J=X.next();!J.done;J=X.next())if(v=J.value,"NONE"!=(S=$o(v,"METHOD"))){if(g=!0,"AES-128"==S)return re.v("Unsupported HLS Encryption",S),e.da=!0,u.return(null);P=$o(v,"KEYFORMAT"),(w=(_=_o[P])?_(v):null)?(w.keyIds.length&&(m=w.keyIds[0]),$.push(w)):re.v("Unsupported HLS KEYFORMAT",P)}if(g&&!$.length)throw new ne(2,4,4026);return function(e,t){var r=Eo,n=Wi.cb(t.g,"EXT-X-PLAYLIST-TYPE"),i=Wi.cb(t.g,"EXT-X-ENDLIST");i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i?Io(e,r.$a):(Io(e,n?r.Wd:r.Se),r=mo(t.g,"EXT-X-TARGETDURATION"),r=Number(r.value),e.J=Math.max(r,e.J),e.M=Math.min(r,e.M))}(e,h),E=function(e,t){if(1==t.length)return t[0];var r=go(e,t);if(null!=r)return r;throw new ne(2,4,4025,t)}(n,r),x(u,function(e,t,r,n){return I((function i(){var o,a,s,l,c,u,p,f,d,h;return V(i,(function(i){switch(i.s){case 1:return o=Se,a=n.segments[0].g,s=new oe(a),l=s.pa.split(".").pop(),c=So[t],(u=c[l])?i.return(u):t==o.za?r&&"vtt"!=r&&"wvtt"!=r?i.return("application/mp4"):i.return("text/vtt"):((p=nt([a],e.g.retryParameters)).method="HEAD",x(i,Po(e,p,1),2));case 2:return f=i.B,(d=f.headers["content-type"])?i.return(d.split(";")[0]):(h=c.mp4,i.return(h))}}))}))}(e,n,E,h),3);case 3:return T=u.B,_includesInstanceProperty(bo).call(bo,T)&&(E=""),A=(O=p.cb(h.g,"EXT-X-MEDIA-SEQUENCE"))?Number(O.value):0,k(u,4),x(u,ho(e,t,h,A,T,E),6);case 6:C=u.B,j(u,5);break;case 4:if(4035==(R=D(u)).code)return re.ba("Skipping unsupported HLS stream",T,t),u.return(null);throw R;case 5:if(M=C[0].startTime,N=C[C.length-1].endTime,L=N-M,U=new di(C),F=uo(h),B=void 0,"text"==n&&(B="subtitle"),K=[],c)for(J=(X=b(c.split(","))).next();!J.done;J=X.next())H=J.value,K.push(H);return G={id:e.ea++,originalId:a,createSegmentIndex:_bindInstanceProperty(z=_Promise.resolve).call(z,_Promise),findSegmentPosition:_bindInstanceProperty(q=_findInstanceProperty(U)).call(q,U),getSegmentReference:_bindInstanceProperty(Y=U.get).call(Y,U),initSegmentReference:F,presentationTimeOffset:0,mimeType:T,codecs:E,kind:B,encrypted:g,keyId:m,language:i,label:a,type:n,primary:o,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:K,channelsCount:s,audioSamplingRate:null,closedCaptions:l},u.return({stream:G,fc:U,drmInfos:$,Pc:t,We:f,td:M,Yg:N,duration:L})}}))}))}function uo(e){var t=Wi.Ab(e.g,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new ne(2,4,4020);var r=$o(t=t[0],"URI"),n=Wi.Sc(e.h,r);return e=0,r=null,(t=Vi(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),r=(e=Number(e[1]))+t-1),new ui((function(){return[n]}),e,r)}function po(e,t,r,n){var i=t.h,o=t.g;t=mo(i,"EXTINF").value.split(","),t=n+Number(t[0]);var a=0,s=null;return(i=Wi.cb(i,"EXT-X-BYTERANGE"))&&(a=i.value.split("@"),i=Number(a[0]),s=(a=a[1]?Number(a[1]):e.g+1)+i-1),new pi(r,n,t,(function(){return[o]}),a,s)}function fo(e){var t;e.i&&(_forEachInstanceProperty(t=e.P).call(t,(function(t){e.i.Jb(t,0)})),e.P=[])}function ho(e,t,r,n,i,o){return I((function a(){var s,l,c,u,p,f,d,h,y,g;return V(a,(function(a){switch(a.s){case 1:return s=r.segments,l=[],c=s[0].g,u=po(null,s[0],n,0),p=uo(r),x(a,function(e,t,r,n,i,o){return I((function a(){var s,l,c,u,p,f,d,h,y;return V(a,(function(a){switch(a.s){case 1:if(e.A){if(s=e.h.get(t),l=s.fc,c=l.get(n.position))return re.K("Found segment start time in previous manifest"),a.return(c.startTime);re.debug("Unable to find segment start time in previous manifest!")}if(re.K("Fetching segment to find start time"),i=i.toLowerCase(),_includesInstanceProperty(bo).call(bo,i))throw re.ba("Raw formats are not yet supported. Skipping "+i),new ne(1,4,4035);if("video/webm"==i)throw re.ba("WebM in HLS is not yet supported. Skipping."),new ne(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){a.I(2);break}return u=[yo(e,n)],r&&u.push(yo(e,r)),x(a,_Promise.all(u),3);case 3:return p=a.B,f=p[0],d=p[1]||p[0],a.return(function(e,t,r,n){var i=0;if((new Gn).box("moov",Wn).box("trak",Wn).box("mdia",Wn).ma("mdhd",(function(e){e.reader.U(0==e.version?8:16),i=e.reader.N(),e.parser.stop()})).parse(n,!0),!i)throw re.error("Unable to find timescale in init segment!"),new ne(2,4,4030,e,t);var o=0,a=!1;if((new Gn).box("moof",Wn).box("traf",Wn).ma("tfdt",(function(e){o=(0==e.version?e.reader.N():e.reader.Pb())/i,a=!0,e.parser.stop()})).parse(r,!0),!a)throw new ne(2,4,4030,e,t);return o}(t,f.uri,f.data,d.data));case 2:if("video/mp2t"!=i){a.I(4);break}return x(a,yo(e,n),5);case 5:return h=a.B,a.return(function(e,t,r){function n(){o.seek(a+188),71!=(s=o.ra())&&(o.seek(a+192),s=o.ra()),71!=s&&(o.seek(a+204),s=o.ra()),71!=s&&i(),o.Fe(1)}function i(){throw new ne(2,4,4030,e,t)}for(var o=new Kn(new DataView(r),0),a=0,s=0;;)if(a=o.ka(),71!=(s=o.ra())&&i(),8191==(8191&(r=o.dc())))n();else if(16384&r){if(0!=(r=(48&o.ra())>>4)&&2!=r||i(),3==r&&(r=o.ra(),o.U(r)),1==o.N()>>8)return o.U(3),0!=(r=o.ra()>>6)&&1!=r||i(),0==o.ra()&&i(),(1073741824*((14&(r=o.ra()))>>1)+((65534&o.dc())<<14|(65534&o.dc())>>1))/9e4;n()}else n()}(t,h.uri,h.data));case 4:if("application/mp4"!=i&&!_startsWithInstanceProperty(i).call(i,"text/")){a.I(6);break}return x(a,yo(e,n),7);case 7:return y=a.B,a.return(function(e,t,r){return e=$t(e,t),_r(e)?(t=new Ir(null),wr(t,e),t.xc(r)):0}(i,o,y.data));case 6:throw new ne(2,4,4030,t)}}))}))}(e,t,p,u,i,o),2);case 2:f=a.B,re.debug("First segment",c.split("/").pop(),"starts at",f);for(var $=0;$<s.length;++$)d=s[$],h=l[l.length-1],y=0==$?f:h.endTime,g=po(h,d,n+$,y),l.push(g);return e.P.push(l),fo(e),a.return(l)}}))}))}function yo(e,t){return I((function r(){var n,i,o,a,s,l;return V(r,(function(r){switch(r.s){case 1:return n=1,i=Ri(t.i(),t.h,t.h+2048-1,e.g.retryParameters),o=Ri(t.i(),t.h,t.g,e.g.retryParameters),e.g.hls.useFullSegmentsForStartTime?r.return(Po(e,o,n)):(k(r,2),x(r,Po(e,i,n),4));case 4:return a=r.B,r.return(a);case 2:if(7001==(s=D(r)).code)throw s;return re.ba("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),x(r,Po(e,o,n),5);case 5:return l=r.B,r.return(l)}}))}))}function go(e,t){for(var r=vo[e],n=0;n<r.length;n++)for(var i=0;i<t.length;i++){var o,a;if(r[n].test(_trimInstanceProperty(o=t[i]).call(o)))return _trimInstanceProperty(a=t[i]).call(a)}return"text"==e?"":null}function $o(e,t){var r=e.getAttribute(t);if(!r)throw new ne(2,4,4023,t);return r.value}function mo(e,t){var r=Wi.cb(e,t);if(!r)throw new ne(2,4,4024,t);return r}X("shaka.net.DataUriPlugin",no),no.parse=function(t){var r=t.split(":");if(2>r.length||"data"!=r[0])throw re.error("Bad data URI, failed to parse scheme"),new ne(2,1,1004,t);if(2>(r=_sliceInstanceProperty(r).call(r,1).join(":").split(",")).length)throw re.error("Bad data URI, failed to extract encoding and MIME type"),new ne(2,1,1004,t);var n=r[0];t=e.decodeURIComponent(_sliceInstanceProperty(r).call(r,1).join(",")),r=n.split(";"),n=r[0];var i=!1;return 1<r.length&&"base64"==r[r.length-1]&&(i=!0,r.pop()),{data:i?Re.Ja(t).buffer:Te(t),contentType:n}},rt("data",no),X("shaka.hls.HlsParser",io),(p=io.prototype).configure=function(e){this.g=e},p.start=function(e,t){var r=this;return I((function n(){var i,o;return V(n,(function(n){switch(n.s){case 1:return r.j=t,x(n,Po(r,nt([e],r.g.retryParameters),0),2);case 2:return i=n.B,r.F=i.uri,x(n,function(e,t){return I((function r(){var n,i,o,a,s,l,c,u,p,f,d;return V(r,(function(r){switch(r.s){case 1:if(0!=(n=Qi(e.C,t,e.F)).type)throw new ne(2,4,4022);return x(r,function(e,t){return I((function r(){var n,i,o,a,s,l,c,u,p,f,d,h;return V(r,(function(r){var y,g,$;switch(r.s){case 1:return n=Wi,i=me,o=t.g,a=n.Ab(t.g,"EXT-X-MEDIA"),s=_filterInstanceProperty(a).call(a,_bindInstanceProperty(y=function(e){return"SUBTITLES"==$o(e,"TYPE")}).call(y,e)),l=_mapInstanceProperty(s).call(s,_bindInstanceProperty(g=function(e){var t=this;return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return t.g.disableText?r.return(null):(k(r,2),x(r,function(e,t){return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return $o(t,"TYPE"),x(r,lo(e,t,[]),2);case 2:return n=r.B,r.return(n.stream)}}))}))}(t,e),4));case 4:return r.return(r.B);case 2:if(n=D(r),t.g.hls.ignoreTextStreamFailures)return r.return(null);throw n}}))}))}).call(g,e)),c=_filterInstanceProperty(a).call(a,(function(e){return"CLOSED-CAPTIONS"==$o(e,"TYPE")})),function(e,t){for(var r=b(t),n=r.next();!n.done;n=r.next()){$o(n=n.value,"TYPE");var i=Vi(n,"LANGUAGE")||"und";i=Hr(i);var o=$o(n,"GROUP-ID");n=$o(n,"INSTREAM-ID"),e.u.get(o)||e.u.set(o,new _Map),e.u.get(o).set(n,i)}}(e,c),x(r,_Promise.all(l),2);case 2:return u=r.B,p=n.Ab(o,"EXT-X-STREAM-INF"),f=_mapInstanceProperty(p).call(p,_bindInstanceProperty($=function(e){return function(e,t,r){return I((function n(){var i,o,a,s,l,c,u,p,f,d,h,y,g,$,m,v,S,P,_,w,E,T,O,A,C,R,M,k,N;return V(n,(function(n){var j;switch(n.s){case 1:return i=Se,o=Wi,a=[],e.g.disableVideo||a.push("avc1.42E01E"),e.g.disableAudio||a.push("mp4a.40.2"),s=a.join(","),l=Vi(t,"CODECS",s),c=function(e){for(var t=new _Set,r=[],n=(e=b(e)).next();!n.done;n=e.next()){var i=vt(n=n.value)[0];t.has(i)?re.debug("Ignoring duplicate codec"):(r.push(n),t.add(i))}return r}(l.split(/\s*,\s*/)),u=t.getAttribute("RESOLUTION"),f=p=null,d=Vi(t,"FRAME-RATE"),h=Number(Vi(t,"AVERAGE-BANDWIDTH"))||Number($o(t,"BANDWIDTH")),u&&(y=u.value.split("x"),p=y[0],f=y[1]),g=o.Ab(r.g,"EXT-X-MEDIA"),g=_filterInstanceProperty(g).call(g,(function(e){return"CLOSED-CAPTIONS"!=$o(e,"TYPE")})),g=_filterInstanceProperty(g).call(g,(function(e){var t=Vi(e,"URI")||"";return"SUBTITLES"==(Vi(e,"TYPE")||"")||""!=t})),$=Vi(t,"AUDIO"),m=Vi(t,"VIDEO"),$?g=o.Zc(g,"AUDIO",$):m&&(g=o.Zc(g,"VIDEO",m)),(v=go(i.za,c))&&((S=Vi(t,"SUBTITLES"))&&(P=o.Zc(g,"SUBTITLES",S)).length&&(_=e.L.get(P[0].id))&&(_.stream.codecs=v),Xe(c,v)),w=_mapInstanceProperty(g).call(g,_bindInstanceProperty(j=function(e){return lo(this,e,c)}).call(j,e)),E=[],T=[],x(n,_Promise.all(w),2);case 2:if(A=n.B,A=_filterInstanceProperty(A).call(A,(function(e){return null!=e})),$?E=A:m&&(T=A),re.debug("Guessing stream type for",t.toString()),R=!1,E.length||T.length?E.length?(k=$o(t,"URI"),N=E[0].Pc,k==N?(re.debug("Guessing audio-only."),C=i.Sb,R=!0):(re.debug("Guessing video."),C=i.Za)):(re.debug("Guessing audio."),C=i.Sb):1==c.length?(M=go(i.Za,c),u||d||M?(re.debug("Guessing video-only."),C=i.Za):(re.debug("Guessing audio-only."),C=i.Sb)):(re.debug("Guessing multiplexed audio+video."),C=i.Za,c=[c.join(",")]),R){n.I(3);break}return x(n,function(e,t,r,n){return I((function i(){var o,a,s,l,c;return V(i,(function(i){switch(i.s){case 1:return o=Se,a=$o(t,"URI"),e.h.has(a)?i.return(e.h.get(a)):(s=Vi(t,"CLOSED-CAPTIONS"),l=null,n==o.Za&&s&&"NONE"!=s&&(l=e.u.get(s)),x(i,co(e,a,r,n,"und",!1,null,null,l,null),2));case 2:return null==(c=i.B)?i.return(null):e.h.has(a)?i.return(e.h.get(a)):(e.h.set(a,c),i.return(c))}}))}))}(e,t,c,C),4);case 4:O=n.B;case 3:if(O)O.stream.type==i.Sb?E=[O]:T=[O];else if(null===O)return re.debug("streamInfo is null"),n.return([]);return T&&ao(T),E&&ao(E),n.return(function(e,t,r,n,i,o,a){var s;_forEachInstanceProperty(r).call(r,_bindInstanceProperty(s=function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(o)||void 0,e.frameRate=Number(a)||void 0)}).call(s,e));var l=!!e.g&&e.g.disableAudio;t.length&&!l||(t=[null]);l=!!e.g&&e.g.disableVideo,(!r.length||l)&&(r=[null]);l=[];for(var c=(t=b(t)).next();!c.done;c=t.next()){c=c.value;for(var u=b(r),p=u.next();!p.done;p=u.next()){var f=p.value;p=c?c.stream:null;var d=f?f.stream:null,h=c?c.drmInfos:null,y=f?f.drmInfos:null;f=(f?f.Pc:"")+" - "+(c?c.Pc:"");var g=void 0;if(p&&d){if(h.length&&y.length&&!(0<Wt(h,y).length)){re.v("Incompatible DRM info in HLS variant. Skipping.");continue}g=Wt(h,y)}else p?g=h:d&&(g=y);e.Z.has(f)?re.debug("Skipping variant which only differs in text streams."):(p=so(e,p,d,n,g),l.push(p),e.Z.add(f))}}return l}(e,E,T,h,p,f,d))}}))}))}(this,e,t)}).call($,e)),x(r,_Promise.all(f),3);case 3:return d=r.B,h=_reduceInstanceProperty(d).call(d,i.Rc,[]),h=_filterInstanceProperty(h).call(h,(function(e){return null!=e})),r.return({startTime:0,variants:h,textStreams:_filterInstanceProperty(u).call(u,(function(e){return null!=e}))})}}))}))}(e,n),2);case 2:if(i=r.B,!e.j)throw new ne(2,7,7001);if(e.da&&0==i.variants.length)throw re.info("No stream is created, because we don't support AES-128","encryption yet"),new ne(2,4,4034);e.j.filterAllPeriods([i]),o=1/0,a=0,s=1/0;for(var h=b(_valuesInstanceProperty(g=e.h).call(g)),y=h.next();!y.done;y=h.next()){var g;l=y.value,o=Math.min(o,l.td),a=Math.max(a,l.td),"text"!=l.stream.type&&(s=Math.min(s,l.duration))}if(e.l!=Eo.$a?(e.i=new Ci(0,3*e.J),e.i.hc(!1)):(e.i=new Ci(null,0),e.i.hc(!0)),fo(e),e.l!=Eo.$a){for(e.X=e.M,c=Eo,e.l==c.Wd&&(u=e.i.Ic,isNaN(e.g.availabilityWindowOverride)||(u=e.g.availabilityWindowOverride),e.i.Pd(u)),p=0;95443.7176888889<=a;)p+=95443.7176888889,a-=95443.7176888889;if(p)for(re.debug("Offsetting live streams by",p,"to compensate for rollover"),y=(h=b(_valuesInstanceProperty($=e.h).call($))).next();!y.done;y=h.next()){var $;95443.7176888889>(f=y.value).td?(re.K("Offset applied to",f.stream.type),f.stream.presentationTimeOffset=-p,f.fc.offset(p)):re.K("Offset NOT applied to",f.stream.type)}}else for(e.i.Fa(s),e.i.offset(-o),y=(h=b(_valuesInstanceProperty(m=e.h).call(m))).next();!y.done;y=h.next()){var m;(d=y.value).stream.presentationTimeOffset=o,d.fc.offset(-o),hi(d.fc,s)}e.A={presentationTimeline:e.i,periods:[i],offlineSessionIds:[],minBufferTime:0},M(r)}}))}))}(r,i.data),3);case 3:return 0<(o=r.X)&&r.m.V(o),n.return(r.A)}}))}))},p.stop=function(){this.m&&(this.m.stop(),this.m=null);var e=[];return this.o&&(e.push(this.o.destroy()),this.o=null),this.g=this.j=null,this.L.clear(),this.Z.clear(),this.h.clear(),this.A=null,_Promise.all(e)},p.update=function(){if(this.l!=Eo.$a){for(var e=[],t=b(_valuesInstanceProperty(n=this.h).call(n)),r=t.next();!r.done;r=t.next()){var n;e.push(oo(this,r.value))}return _Promise.all(e)}},p.onExpirationUpdated=function(){};var vo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},bo=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],So={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function Io(e,t){e.l=t,e.i&&e.i.hc(e.l==Eo.$a),e.l!=Eo.$a||e.m.stop()}function Po(e,t,r){if(!e.o)throw new ne(2,7,7001);return t=e.j.networkingEngine.request(r,t),Ze(e.o,t),t.promise}var _o={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=$o(e,"METHOD");Jr("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");var r=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];return _includesInstanceProperty(r).call(r,t)?(t=$o(e,"URI"),t=no.parse(t),t=be("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=Vi(e,"KEYID"))&&(t.keyIds=[e.toLowerCase().substr(2)]),t):(re.error("Widevine in HLS is only supported with [",r.join(", "),"], not",t),null)}},wo="VOD",Eo={$a:wo,Se:"EVENT",Wd:"LIVE"};function To(){this.g=new _Map}function Oo(e,t,r){Ao(e,t).text=r}function Ao(e,t){return e.g.has(t)||e.g.set(t,new Co),e.g.get(t)}function Co(){this.text=this.variant=null}function Ro(e,t){this.g=e,this.h=new _Set([e]);for(var r=b(t=t||[]),n=r.next();!n.done;n=r.next())this.add(n.value)}function xo(e,t){var r;if(!(r=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(r=e.audio&&t.audio)){r=e.audio;var n=t.audio;r=!(r.channelsCount==n.channelsCount&&Mo(r,n)&&ko(r.roles,n.roles))}return!r&&(r=e.video&&t.video)&&(r=!(Mo(r=e.video,n=t.video)&&ko(r.roles,n.roles))),!r}function Mo(e,t){var r,n;if(e.mimeType!=t.mimeType)return!1;var i=_mapInstanceProperty(r=e.codecs.split(",")).call(r,(function(e){return vt(e)[0]})),o=_mapInstanceProperty(n=t.codecs.split(",")).call(n,(function(e){return vt(e)[0]}));if(i.length!=o.length)return!1;_sortInstanceProperty(i).call(i),_sortInstanceProperty(o).call(o);for(var a=0;a<i.length;a++)if(i[a]!=o[a])return!1;return!0}function ko(e,t){var r=new _Set(e),n=new _Set(t);if(r.delete("main"),n.delete("main"),r.size!=n.size)return!1;for(var i=(r=b(r)).next();!i.done;i=r.next())if(!n.has(i.value))return!1;return!0}function No(e){this.g=e,this.h=new jo(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function jo(e,t,r,n){this.i=e,this.j=t,this.g=r,this.h=void 0===n?"":n}function Do(){this.g=Fo,this.h=(new _Map).set(Fo,2).set(Uo,1)}function Lo(e,t,r){e.h.set(Fo,r).set(Uo,t)}Ai.Fd("m3u8",io),Ai.Qb("application/x-mpegurl",io),Ai.Qb("application/vnd.apple.mpegurl",io),Ro.prototype.add=function(e){return xo(this.g,e)?(this.h.add(e),!0):(re.v("Rejecting variant - not compatible with root."),!1)},Ro.prototype.values=function(){var e;return _valuesInstanceProperty(e=this.h).call(e)},No.prototype.create=function(e){var t=this,r=_filterInstanceProperty(e).call(e,(function(e){return xo(t.g,e)}));return r.length?new Ro(r[0],r):this.h.create(e)},jo.prototype.create=function(e){var t=[];t=function(e,t){var r=Hr(t),n=Gr(r,_mapInstanceProperty(e).call(e,(function(e){return Vr(e)})));return n?_filterInstanceProperty(e).call(e,(function(e){return n==Vr(e)})):[]}(e,this.i);var r=_filterInstanceProperty(e).call(e,(function(e){return e.primary}));for((e=function(e,t){return _filterInstanceProperty(e).call(e,(function(e){var r;return!!e.audio&&(t?_includesInstanceProperty(r=e.audio.roles).call(r,t):0==e.audio.roles.length)}))}(t=t.length?t:r.length?r:e,this.j)).length?t=e:re.v("No exact match for variant role could be found."),this.g&&((e=zr.ee(t,this.g)).length?t=e:re.v("No exact match for the channel count could be found.")),this.h&&(e=function(e,t){return _filterInstanceProperty(e).call(e,(function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length?t=e:re.v("No exact match for variant label could be found.")),e=new Ro(t[0]),r=(t=b(t)).next();!r.done;r=t.next())r=r.value,xo(e.g,r)&&e.add(r);return e};var Uo=0,Fo=1;function Bo(e,t){this.l=e,this.m=Ho(e),this.g=e.g.currentTime,this.j=_Date$now()/1e3,this.h=!1,this.o=t,this.i=function(){}}function Ko(e){this.g=e}function Ho(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.buffered,e=e.g.currentTime;for(var r=0;r<t.length;r++){var n=t.start(r),i=t.end(r);if(!(e<n-.1||e>i-.5)){t=!0;break e}}t=!1}return t}function Vo(e,t,r,n,i){var o=this;this.g=e,this.F=t,this.C=r,this.u=i,this.j=new lt,this.o=!1,this.A=e.readyState,this.i=!1,this.h=n,this.m=!1,this.j.H(e,"waiting",(function(){return Go(o)})),this.l=new je((function(){Go(o)})).Oa(.25)}function Go(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.o)return}else e.o=!1;if(!e.g.paused||0==e.g.currentTime){var t;if(e.g.readyState!=e.A&&(e.i=!1,e.A=e.g.readyState),!(t=!e.h)){var r=(t=e.h).l,n=Ho(r),i=r.g.currentTime,o=_Date$now()/1e3;t.g==i&&t.m==n||(t.j=o,t.g=i,t.m=n,t.h=!1),(n=(i=o-t.j)>=t.o&&n&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=r.g.currentTime),t=!n}if(t){o=e.C.smallGapLimit,t=e.g.currentTime;e:{if((r=e.g.buffered)&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(n=navigator.userAgent.match(/Edge\//)||Et("Trident/")||Pt()||Et("CrKey")?.5:.1,i=0;i<r.length;i++)if(r.start(i)>t&&(0==i||r.end(i-1)-t<=n)){n=i;break e}n=null}if(null!=n&&(0!=n||e.m)){i=r.start(n);var a=e.F.Ka();if(!(i>=a)){o=(a=i-t)<=o;var s=!1;if(!(.001>a)){if(!o&&!e.i){e.i=!0;var l=new Ge("largegap",{currentTime:t,gapSize:a});l.cancelable=!0,e.u(l),e.C.jumpLargeGaps&&!l.defaultPrevented?s=!0:re.info("Ignoring large gap at",t,"size",a)}(o||s)&&(0==n?re.info("Jumping forward",a,"seconds because of gap before start time of",i):re.info("Jumping forward",a,"seconds because of gap starting at",r.end(n-1),"and ending at",i),e.g.currentTime=i)}}}}}}}function Wo(e){var t=this;this.i=e,this.g=new _Set,this.h=new je((function(){zo(t,!1)})).Oa(.25)}function zo(e,t){for(var r=b(e.g),n=r.next();!n.done;n=r.next())n.value.l(e.i.currentTime,t)}function qo(e){for(var t=[],r=(e=b(e)).next();!r.done;r=e.next())for(var n=(r=b(r.value.variants)).next();!n.done;n=r.next())t.push(n.value);return t}function Yo(e,t){for(var r=null,n=b(e),i=n.next();!i.done;i=n.next())t>=(i=i.value).startTime&&(r=i);return r}function Xo(e){this.i=e,this.g=null,this.h=function(){}}function Jo(e){var t=this;this.g=e,this.j=!1,this.i=this.g.wc(),this.h=new je((function(){t.g.pe(.25*t.i)}))}function Qo(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.wc()!=t&&e.g.Od(t))}catch(e){}e.h.Oa(.25),0!=e.g.wc()&&e.g.Od(0)}function Zo(e,t,r,n){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?n():(t=ea.get(t),r.ya(e,t,n))}Bo.prototype.release=function(){this.l=null,this.i=function(){}},Vo.prototype.release=function(){this.j&&(this.j.release(),this.j=null),null!=this.l&&(this.l.stop(),this.l=null),this.h&&(this.h.release(),this.h=null),this.g=this.F=this.u=null},Vo.prototype.zd=function(){this.m=!0,Go(this)},Wo.prototype.release=function(){this.h.stop();for(var e=b(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},Xo.prototype.release=function(){this.g=this.i=null,this.h=function(){}},Xo.prototype.l=function(e){var t=this.g,r=this.i.periods;t!=(e=Yo(r,e)||r[0])&&this.h(e),this.g=e},Jo.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},Jo.prototype.set=function(e){this.i=e,Qo(this)},Jo.prototype.vc=function(){return this.g.vc()};var ea=new _Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]]);function ta(e,t,r){var n=this;this.g=e,this.l=t,this.j=r,this.m=!1,this.h=new lt,this.i=new aa(e),Zo(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ia(n,n.j)}))}function ra(e){return e.m?e.g.currentTime:e.j}function na(e,t){0<e.g.readyState?sa(e.i,t):Zo(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){ia(e,e.j)}))}function ia(e,t){.001>Math.abs(e.g.currentTime-t)?oa(e):(e.h.ya(e.g,"seeking",(function(){oa(e)})),sa(e.i,0==e.g.currentTime?t:e.g.currentTime))}function oa(e){e.m=!0,e.h.H(e.g,"seeking",(function(){return e.l()}))}function aa(e){var t=this;this.h=e,this.m=10,this.l=this.i=this.j=0,this.g=new je((function(){0>=t.j?(re.v(["Failed to move playhead from",t.i,"to",t.l].join(" ")),t.g.stop()):t.h.currentTime!=t.i?t.g.stop():(t.h.currentTime=t.l,t.j--)}))}function sa(e,t){e.i=e.h.currentTime,e.l=t,e.j=e.m,e.h.currentTime=t,e.g.Oa(.1)}function la(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new lt,Zo(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i?t.j=!0:(t.h.ya(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function ca(e,t,r,n,i,o){var a=this;this.i=e,this.g=t.presentationTimeline,this.J=t.minBufferTime||0,this.m=r,this.F=i,this.u=null,this.j=new Vo(e,t.presentationTimeline,r,function(e,t){if(!t.stallEnabled)return null;var r=t.stallSkip,n=new Bo(new Ko(e),t.stallThreshold);return function(e,t){e.i=t}(n,(function(t,n){re.debug("Stall detected at "+t+" for "+n+" seconds."),r?(re.debug("Seeking forward "+r+" seconds to break stall."),e.currentTime+=r):(re.debug("Pausing and unpausing to break stall."),e.pause(),e.play())})),n}(e,r),o),this.h=new ta(e,(function(){e:{var e=a.j;e.o=!0,e.m=!1,e.i=!1,e=ra(a.h);var t=pa(a,e);if(.001<Math.abs(t-e)){var r=_Date$now()/1e3;if(!a.u||a.u<r-1){a.u=r,na(a.h,t),e=void 0;break e}}re.K("Seek to "+e),a.F(),e=void 0}return e}),function(e,t){return null==t?t=1/0>e.g.ha()?e.g.Cb():e.g.Ka():0>t&&(t=e.g.Ka()+t),ua(e,fa(e,t))}(this,n)),this.o=new je((function(){if(0!=a.i.readyState&&!a.i.paused){var e=ra(a.h),t=a.g.Cb(),r=a.g.Ka();3>r-t&&(t=r-3),e<t&&(t=pa(a,e),re.info("Jumping forward "+(t-e)+" seconds to catch up with the seek range."),a.i.currentTime=t)}})).Oa(.25)}function ua(e,t){var r=e.g.ha();return t>=r?r-e.m.durationBackoff:t}function pa(e,t){var r=_bindInstanceProperty(rr).call(rr,null,e.i.buffered),n=Math.max(e.J,e.m.rebufferingGoal),i=e.m.safeSeekOffset,o=e.g.Cb(),a=e.g.Ka(),s=e.g.ha();3>a-o&&(o=a-3);var l=e.g.Zb(n),c=e.g.Zb(i);return n=e.g.Zb(n+i),t>=s?(re.K("Playhead past duration."),ua(e,t)):t>a?(re.K("Playhead past end."),a):t<o?r(c)?(re.K("Playhead before start & start is buffered"),c):(re.K("Playhead before start & start is unbuffered"),n):t>=l||r(t)?(re.K("Playhead in safe region or in buffered region."),t):(re.K("Playhead outside safe region & in unbuffered region."),n)}function fa(e,t){var r=e.g.Cb();return t<r||t>(r=e.g.Ka())?r:t}function da(e){var t=this;this.h=function(){},this.g=new _Set,this.j=e,this.i=new je((function(){for(var e=t.j(),r=b(t.g),n=r.next();!n.done;n=r.next())(n=n.value).endTime<e.start&&t.g.delete(n)})).Oa(2)}function ha(e){var t=this;this.m=e,this.j=new _Map,this.g=function(){},this.h=function(){},this.i=function(){},this.o=[{rb:null,qb:ga,hb:function(e,r){return t.g(e,r)}},{rb:ya,qb:ga,hb:function(e,r){return t.g(e,r)}},{rb:$a,qb:ga,hb:function(e,r){return t.g(e,r)}},{rb:ga,qb:ya,hb:function(e,r){return t.h(e,r)}},{rb:ga,qb:$a,hb:function(e,r){return t.h(e,r)}},{rb:ya,qb:$a,hb:function(e,r){return t.i(e,r)}},{rb:$a,qb:ya,hb:function(e,r){return t.i(e,r)}}]}ta.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},aa.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},la.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.g=null},la.prototype.A=function(e){this.i=this.j?this.i:e},la.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0},la.prototype.C=function(){},ca.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.stop(),this.o=null),this.i=this.h=this.g=this.m=null,this.F=function(){}},ca.prototype.A=function(e){na(this.h,e)},ca.prototype.l=function(){var e=ra(this.h);return 0<this.i.readyState&&!this.i.paused?fa(this,e):e},ca.prototype.C=function(){this.j.zd()},da.prototype.release=function(){this.h=function(){},this.g.clear(),this.i.stop()},ha.prototype.release=function(){this.m=null,this.j.clear(),this.g=function(){},this.h=function(){},this.i=function(){}},ha.prototype.l=function(e,t){for(var r=b(this.m.g),n=r.next();!n.done;n=r.next()){n=n.value;var i=this.j.get(n),o=e<n.startTime?ya:e>n.endTime?$a:ga;this.j.set(n,o);for(var a=b(this.o),s=a.next();!s.done;s=a.next())(s=s.value).rb==i&&s.qb==o&&s.hb(n,t)}};var ya=1,ga=2,$a=3;function ma(e,t){this.g=t,this.i=e,this.l=null,this.u=1,this.F=_Promise.resolve(),this.m=[],this.o=new _Map,this.h=new _Map,this.C=!1,this.M=null,this.L=this.j=this.A=!1,this.J=0}function va(e){return Sa(e,"audio")}function ba(e){return Sa(e,"video")}function Sa(e,t){var r=e.h.get(t);return r?r.Ta||r.stream:null}function Ia(e,t){return I((function r(){var n,i,o,a,s,l,c,u,p;return V(r,(function(r){switch(r.s){case 1:return n=Se,x(r,Dr(e.g.T,n.za),2);case 2:return e.J++,e.L=!1,i=e.J,o=e.g.T,a=new _Map,s=new _Set,a.set(n.za,t),s.add(t),x(r,o.init(a,!1),3);case 3:return e.j?r.return():x(r,Ca(e,s),4);case 4:if(e.j)return r.return();l=e.g.T.l.isTextVisible()||e.l.alwaysStreamText,e.J!=i||e.h.has(n.za)||e.L||!l||(c=e.g.eb(),u=La(e,c),p=Oa(t,u,0),e.h.set(n.za,p),Ka(e,p,0)),M(r)}}))}))}function Pa(e,t){var r=e.h.get("video");if(r){var n=r.stream;if(n)if(re.debug("setTrickPlay",t),t){var i=n.trickModeVideo;i&&!r.Ta&&(re.debug("Engaging trick mode stream",i),wa(e,i,!1,0,!1),r.Ta=n)}else(n=r.Ta)&&(re.debug("Restoring non-trick-mode stream",n),r.Ta=null,wa(e,n,!0,0,!1))}}function _a(e,t,r,n){var i=!1;if(t.video){var o=wa(e,t.video,r,n,!1);i=i||o}return t.audio&&(e=wa(e,t.audio,r,n,!1),i=i||e),i}function wa(e,t,r,n,i){var o,a,s,l=e.h.get(t.type);if(!l&&"text"==t.type&&e.l.ignoreTextStreamFailures)return Ia(e,t),!0;if(!l)return!1;var c=Ua(e,t),u=_everyInstanceProperty(o=_Array$from(_valuesInstanceProperty(a=e.h).call(a))).call(o,(function(e){return e.oa==l.oa}));return r&&c!=l.oa&&u?(re.debug("switch: switching to stream in another Period; clearing buffer and changing Periods"),_forEachInstanceProperty(s=e.h).call(s,(function(t){Ea(e,t)})),!0):(l.Ta&&(re.debug("switch during trick play mode",t),t.trickModeVideo?(l.Ta=t,t=t.trickModeVideo,re.debug("switch found trick play stream",t)):(l.Ta=null,re.debug("switch found no special trick play stream"))),!(!(u=e.m[c])||!u.Rb)&&(!(!(u=e.o.get(t.id))||!u.Rb)&&(l.stream!=t||i?("text"==t.type&&Cr(e.g.T,$t(t.mimeType,t.codecs)),l.stream=t,l.Ac=!0,re.debug("switch: switching to Stream "+Wa(l)),function(e,t,r){if(!t.lb)return!1;var n=e.g.eb(),i=Mr(e.g.T,t.type),o=Ma(e,t,n,i,r);return r=o&&o.g?o.g-o.h:null,o&&!r&&(r=(o.endTime-o.xc())*t.stream.bandwidth/8),!isNaN(r)&&((o=t.stream.initSegmentReference)&&(r+=(o.g?o.g-o.h:null)||0),o=e.g.getBandwidthEstimate(),8*r/o<i-n-Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal)||t.lb.h.g>r)}(e,l,c)&&(re.info("Aborting current segment request to switch."),l.lb.abort()),r&&(l.ab?l.Qc=!0:l.Sa?(l.Wa=!0,l.oc=n,l.Qc=!0):(Ha(l),Ba(e,l,!0,n).catch((function(t){e.g&&e.g.onError(t)})))),!0):(re.debug("switch: Stream "+Wa(l)+" already active"),!1))))}function Ea(e,t){var r=Wa(t);t.ab?re.debug(r,"clear: already clearing the buffer"):t.Wa?re.debug(r,"clear: already waiting"):t.Sa?(re.debug(r,"clear: currently updating"),t.Wa=!0,t.oc=0):null==xr(e.g.T,t.type)?(re.debug(r,"clear: nothing buffered"),null==t.Pa&&Ka(e,t,0)):(re.debug(r,"clear: handling right now"),Ha(t),Ba(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)})))}function Ta(e,t,r,n,i){return I((function o(){var a,s,l,c,u,p,f;return V(o,(function(o){switch(o.s){case 1:return a=e.g.eb(),s=La(e,a),l=Se,c=new _Map,u=new _Set,t&&(c.set(l.Sb,t),u.add(t)),r&&(c.set(l.Za,r),u.add(r)),n&&(c.set(l.za,n),u.add(n)),p=e.g.T,f=e.l.forceTransmuxTS,x(o,p.init(c,f),2);case 2:return e.j?o.return():(function(e){var t=e.i.presentationTimeline.ha();1/0>t?e.g.T.Fa(t):e.g.T.Fa(Math.pow(2,32))}(e),x(o,Ca(e,u),3));case 3:if(e.j)return o.return();_forEachInstanceProperty(c).call(c,(function(t,r){if(!e.h.has(r)){var n=Oa(t,s,i);e.h.set(r,n),Ka(e,n,0)}})),M(o)}}))}))}function Oa(e,t,r){return{stream:e,type:e.type,Hb:null,La:null,Ta:null,Ac:!0,oa:t,endOfStream:!1,Sa:!1,Pa:null,Wa:!1,oc:0,Qc:!1,ab:!1,Ed:!1,ac:!1,Hd:r||0,lb:null}}function Aa(e,t){var r,n,i,o=e.m[t];if(o)return re.debug("(all) Period "+t+" is being or has been set up"),o.promise;re.debug("(all) setting up Period "+t),o={promise:new Pe,Rb:!1},e.m[t]=o;for(var a=new _Set,s=b(e.i.periods[t].variants),l=s.next();!l.done;l=s.next())(l=l.value).video&&a.add(l.video),l.video&&l.video.trickModeVideo&&a.add(l.video.trickModeVideo),l.audio&&a.add(l.audio);for(l=(s=b(e.i.periods[t].textStreams)).next();!l.done;l=s.next())a.add(l.value);return e.F=e.F.then(_bindInstanceProperty(r=function(){if(!this.j)return Ca(this,a)}).call(r,e)).then(_bindInstanceProperty(n=function(){this.j||(this.m[t].promise.resolve(),this.m[t].Rb=!0,re.K("(all) setup Period "+t))}).call(n,e)).catch(_bindInstanceProperty(i=function(e){this.j||(this.m[t].promise.catch((function(){})),this.m[t].promise.reject(),delete this.m[t],re.v("(all) failed to setup Period "+t),this.g.onError(e))}).call(i,e)),o.promise}function Ca(e,t){return I((function r(){var n,i,o,a,s,l,c;return V(r,(function(r){switch(r.s){case 1:n=[];for(var u=b(t),p=u.next();!p.done;p=u.next())i=p.value,(o=e.o.get(i.id))?(re.debug("(all) Stream "+i.id+" is being or has been set up"),n.push(o.promise)):(re.K("(all) setting up Stream "+i.id),e.o.set(i.id,{promise:new Pe,Rb:!1}),n.push(i.createSegmentIndex()));return k(r,2),x(r,_Promise.all(n),4);case 4:if(e.j)return r.return();j(r,3);break;case 2:if(a=D(r),e.j)return r.return();for(p=(r=b(t)).next();!p.done;p=r.next())s=p.value,e.o.get(s.id).promise.catch((function(){})),e.o.get(s.id).promise.reject(),e.o.delete(s.id);throw a;case 3:for(p=(u=b(t)).next();!p.done;p=u.next())l=p.value,(c=e.o.get(l.id)).Rb||(c.promise.resolve(),c.Rb=!0,re.K("(all) setup Stream "+l.id));M(r)}}))}))}function Ra(e,t){if(!e.j){var r=Wa(t);if(!t.Sa&&null!=t.Pa&&!t.ab)if(t.Pa=null,t.Wa)re.debug(r,"skipping update and clearing the buffer"),Ba(e,t,t.Qc,t.oc);else{var n,i;try{var o=function(e,t){var r,n;if(ja(t))return jr(e.g.T,t.stream.originalId||""),null;var i=Wa(t),o=e.g.eb(),a=xa(e,t,o);re.O(i,"timeNeeded="+a);var s=Ua(e,t.stream),l=La(e,a),c=function(e,t,r){return"text"==t?null==(e=e.g).h||e.h<r?0:e.h-Math.max(r,e.g):nr(e=kr(e,t),r)}(e.g.T,t.type,o);re.O(i,"update_:","presentationTime="+o,"bufferedAhead="+c);var u=Math.max(e.i.minBufferTime||0,e.l.rebufferingGoal,e.l.bufferingGoal)*e.u;if(a>=e.i.presentationTimeline.ha())return re.debug(i,"buffered to end of presentation"),t.endOfStream=!0,"video"==t.type&&(a=e.h.get("text"))&&"application/cea-608"==a.stream.mimeType&&(a.endOfStream=!0),null;if(t.endOfStream=!1,t.oa=l,l!=s)return re.debug(i,"need Period "+l,"presentationTime="+o,"timeNeeded="+a,"currentPeriodIndex="+s),null;if(c>=u)return re.O(i,"buffering goal met"),.5;if(i=Mr(e.g.T,t.type),i=Ma(e,t,o,i,s),!i)return 1;var p=1/0;return _forEachInstanceProperty(r=_Array$from(_valuesInstanceProperty(n=e.h).call(n))).call(r,(function(t){ja(t)||(t=xa(e,t,o),p=Math.min(p,t))})),a>=p+e.i.presentationTimeline.g?1:(t.Hd=0,function(e,t,r,n,i){var o,a,s,l=Wa(t),c=e.i.periods[n];re.K(l,"fetchAndAppend_:","presentationTime="+r,"currentPeriod.startTime="+c.startTime,"reference.position="+i.position,"reference.startTime="+i.startTime,"reference.endTime="+i.endTime);var u=t.stream,p=e.i.presentationTimeline.ha(),f=e.i.periods[n+1];n=function(e,t,r,n,i){var o;if(!t.Ac)return _Promise.resolve();var a=Wa(t);return r=e.i.periods[r].startTime-t.stream.presentationTimeOffset,re.K(a,"setting timestamp offset to "+r),re.K(a,"setting append window start to "+n),re.K(a,"setting append window end to "+i),n=function(e,t,r,n,i){var o,a,s;return"text"==t?(e.g.A=r,(e=e.g).j=n,e.m=i,_Promise.resolve()):_Promise.all([Lr(e,t,_bindInstanceProperty(o=e.Ve).call(o,e,t)),Lr(e,t,_bindInstanceProperty(a=e.Cg).call(a,e,t,r)),Lr(e,t,_bindInstanceProperty(s=e.zg).call(s,e,t,n,i))])}(e.g.T,t.type,r,n,i),t.stream.initSegmentReference?(re.K(a,"fetching init segment"),e=Fa(e,t,t.stream.initSegmentReference).then(_bindInstanceProperty(o=function(e){if(!this.j)return re.K(a,"appending init segment"),Nr(this.g.T,t.type,e,null,null,t.stream.closedCaptions&&0<t.stream.closedCaptions.size)}).call(o,e)).catch((function(e){return t.Ac=!0,_Promise.reject(e)})),_Promise.all([n,e])):n}(e,t,n,Math.max(0,c.startTime-.1),f?f.startTime+.01:p),t.Sa=!0,t.Ac=!1,re.O(l,"fetching segment"),p=Fa(e,t,i),_Promise.all([n,p]).then(_bindInstanceProperty(o=function(e){if(!this.j&&!this.A)return function(e,t,r,n,i,o,a){var s,l,c,u=Wa(t),p=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new Gn).ma("emsg",_bindInstanceProperty(s=e.P).call(s,e,n,o,i.emsgSchemeIdUris)).parse(a),function(e,t,r){var n,i=Wa(t);re.O(i,"checking buffer length");var o=Math.max(e.l.bufferBehind,e.i.presentationTimeline.g),a=xr(e.g.T,t.type);if(null==a)return re.O(i,"buffer behind okay because nothing buffered:","presentationTime="+r,"bufferBehind="+o),_Promise.resolve();var s=r-a,l=s-o;return.01>=l?(re.O(i,"buffer behind okay:","presentationTime="+r,"bufferedBehind="+s,"bufferBehind="+o,"underflow="+Math.abs(l)),_Promise.resolve()):(re.K(i,"buffer behind too large:","presentationTime="+r,"bufferedBehind="+s,"bufferBehind="+o,"overflow="+l),e.g.T.remove(t.type,a,a+l).then(_bindInstanceProperty(n=function(){this.j||re.K(i,"evicted "+l+" seconds")}).call(n,e)))}(e,t,r).then(_bindInstanceProperty(l=function(){if(!this.j)return re.K(u,"appending media segment"),Nr(this.g.T,t.type,a,o.startTime+n.startTime,o.endTime+n.startTime,p)}).call(l,e)).then(_bindInstanceProperty(c=function(){if(!this.j)return re.O(u,"appended media segment"),t.Hb=i,t.La=o,_Promise.resolve()}).call(c,e))}(this,t,r,c,u,i,e[1])}).call(o,e)).then(_bindInstanceProperty(a=function(){this.j||this.A||(t.Sa=!1,t.Ed=!1,t.Wa||this.g.zd(),Ka(this,t,0),function(e,t,r){if(!e.C){var n,i=Wa(t);if(1==(t=_Array$from(_valuesInstanceProperty(n=e.h).call(n))).length&&"text"==t[0].type||(e.C=_everyInstanceProperty(t).call(t,(function(e){return"text"==e.type||!e.Wa&&!e.ab&&e.La}))),e.C){var o;for(re.debug(i,"startup complete"),r=Ua(e,r),e.m[r]||Aa(e,r).then(_bindInstanceProperty(o=function(){this.j||(re.K(i,"calling onCanSwitch()..."),this.g.te())}).call(o,e)).catch(me.Bc),r=0;r<e.i.periods.length;++r)Aa(e,r).catch(me.Bc);e.g.gg&&(re.K(i,"calling onStartupComplete()..."),e.g.gg())}}}(this,t,u),re.K(l,"finished fetch and append"))}).call(a,e)).catch(_bindInstanceProperty(s=function(e){this.j||this.A||(t.Sa=!1,"text"==t.type&&this.l.ignoreTextStreamFailures?(1001==e.code?re.v(l,"Text stream failed to download. Proceeding without it."):re.v(l,"Text stream failed to parse. Proceeding without it."),this.h.delete("text")):7001==e.code?(t.Sa=!1,t.Pa=null,Ka(this,t,0)):3017==e.code?function(e,t,r){var n,i,o=Wa(t);if(_someInstanceProperty(n=_Array$from(_valuesInstanceProperty(i=e.h).call(i))).call(n,(function(e){return e!=t&&e.Ed})))re.debug(o,"MediaSource threw QuotaExceededError:","waiting for another stream to recover...");else{var a=Math.round(100*e.u);if(20<a)e.u-=.2;else{if(!(4<a))return re.error(o,"MediaSource threw QuotaExceededError too many times"),t.ac=!0,e.A=!0,void e.g.onError(r);e.u-=.04}re.v(o,"MediaSource threw QuotaExceededError:","reducing buffering goals by "+(100-Math.round(100*e.u))+"%"),t.Ed=!0}Ka(e,t,4)}(this,t,e):(re.error(l,"failed fetch and append: code="+e.code),t.ac=!0,e.severity=2,Ga(this,e)))}).call(s,e))}(e,t,o,s,i),null)}(e,t);null!=o&&(Ka(e,t,o),t.ac=!1)}catch(t){return void Ga(e,t)}o=_Array$from(_valuesInstanceProperty(n=e.h).call(n)),function(e,t){var r=Wa(t),n=Ua(e,t.stream);if(t.oa!=n){var i,o,a=t.oa,s=_Array$from(_valuesInstanceProperty(i=e.h).call(i));_everyInstanceProperty(s).call(s,(function(e){return e.oa==a||ja(e)}))?_everyInstanceProperty(s).call(s,Da)?(re.debug(r,"all need Period "+a),Aa(e,a).then(_bindInstanceProperty(o=function(){var e;if(!this.j)if(_everyInstanceProperty(s).call(s,_bindInstanceProperty(e=function(e){var t=Da(e),r=Ua(this,e.stream);return!!ja(e)||t&&e.oa==a&&r!=a}).call(e,this))){var t,n,i=this.i.periods[a];re.K(r,"calling onChooseStreams()...");var o=this.g.ue(i),l=new _Map;o.variant&&o.variant.video&&l.set("video",o.variant.video),o.variant&&o.variant.audio&&l.set("audio",o.variant.audio),o.text&&l.set("text",o.text);for(var c=(o=b(_keysInstanceProperty(t=this.h).call(t))).next();!c.done;c=o.next())if(c=c.value,!l.has(c)&&"text"!=c)return re.error(r,"invalid Streams chosen: missing "+c+" Stream"),void this.g.onError(new ne(2,5,5005));for(c=(o=b(_Array$from(_keysInstanceProperty(l).call(l)))).next();!c.done;c=o.next())if(c=c.value,!this.h.has(c)){if("text"!=c)return re.error(r,"invalid Streams chosen: unusable "+c+" Stream"),void this.g.onError(new ne(2,5,5005));Ta(this,null,null,l.get("text"),i.startTime),l.delete(c)}for(c=(o=b(_Array$from(_keysInstanceProperty(n=this.h).call(n)))).next();!c.done;c=o.next()){c=c.value;var u=this.h.get(c),p=l.get(c);if(p){var f=ja(u);f&&(u.oa=a,u.Hd=i.startTime),wa(this,p,!1,0,!1),f&&ja(u)||Ka(this,this.h.get(c),0)}else this.h.delete(c)}re.K(r,"calling onCanSwitch()..."),this.g.te()}else re.debug(r,"ignoring transition to Period",a,"since another is happening")}).call(o,e)).catch(me.Bc)):re.debug(r,"all MediaStates need Period "+a+", but not all MediaStates are idle"):re.debug(r,"not all MediaStates need Period "+a)}}(e,t),e.C&&_everyInstanceProperty(o).call(o,(function(e){return e.endOfStream}))&&(re.K(r,"calling endOfStream()..."),e.g.T.endOfStream().then(_bindInstanceProperty(i=function(){if(!this.j){var e=this.g.T.ha();0!=e&&e<this.i.presentationTimeline.ha()&&this.i.presentationTimeline.Fa(e)}}).call(i,e)))}}}function xa(e,t,r){return t.Hb&&t.La?(r=Ua(e,t.Hb),e.i.periods[r].startTime+t.La.endTime):Math.max(r,t.Hd)}function Ma(e,t,r,n,i){var o=Wa(t);return t.La&&t.stream==t.Hb?(n=t.La.position+1,re.O(o,"next position known:","position="+n),Na(e,t,i,n)):(t.La?(re.K(o,"next position unknown: another Stream buffered"),o=Ua(e,t.Hb),o=ka(e,t,e.i.periods[o].startTime+t.La.endTime,i)):(re.K(o,"next position unknown: nothing buffered"),o=ka(e,t,n||r,i)),null==o?null:(r=null,null==n&&(r=Na(e,t,i,Math.max(0,o-1))),r||Na(e,t,i,o)))}function ka(e,t,r,n){var i=Wa(t);return e=e.i.periods[n],re.debug(i,"looking up segment:","presentationTime="+r,"currentPeriod.startTime="+e.startTime),r=Math.max(0,r-e.startTime),null==(t=t.stream.findSegmentPosition(r))&&re.v(i,"cannot find segment:","currentPeriod.startTime="+e.startTime,"lookupTime="+r),t}function Na(e,t,r,n){var i=Wa(t);return r=e.i.periods[r],(t=t.stream.getSegmentReference(n))?(e=(n=e.i.presentationTimeline).$b(),n=n.Db(),r.startTime+t.endTime<e||r.startTime+t.startTime>n?(re.O(i,"segment is not available:","currentPeriod.startTime="+r.startTime,"reference.startTime="+t.startTime,"reference.endTime="+t.endTime,"availabilityStart="+e,"availabilityEnd="+n),null):t):(re.K(i,"segment does not exist:","currentPeriod.startTime="+r.startTime,"position="+n),null)}function ja(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Da(e){return!e.Sa&&null==e.Pa&&!e.Wa&&!e.ab}function La(e,t){var r,n=Yo(e.i.periods,t+Ie);return n?_indexOfInstanceProperty(r=e.i.periods).call(r,n):0}function Ua(e,t){for(var r=e.i.periods,n=0;n<r.length;n++){for(var i=r[n],o=new _Set,a=b(i.variants),s=a.next();!s.done;s=a.next())(s=s.value).audio&&o.add(s.audio),s.video&&o.add(s.video),s.video&&s.video.trickModeVideo&&o.add(s.video.trickModeVideo);for(a=(i=b(i.textStreams)).next();!a.done;a=i.next())o.add(a.value);if(o.has(t))return n}return-1}function Fa(e,t,r){var n=Ri(r.i(),r.h,r.g,e.l.retryParameters);return re.O("fetching: reference=",r),e=e.g.Ib.request(1,n),t.lb=e,e.promise.then((function(e){return t.lb=null,e.data}))}function Ba(e,t,r,n){return I((function i(){var o,a,s,l;return V(i,(function(i){var c;switch(i.s){case 1:return o=Wa(t),t.Wa=!1,t.Qc=!1,t.oc=0,t.ab=!0,t.Hb=null,t.La=null,re.debug(o,"clearing buffer"),n?(s=e.g.eb(),l=e.g.T.ha(),a=e.g.T.remove(t.type,s+n,l)):a=Dr(e.g.T,t.type).then(_bindInstanceProperty(c=function(){if(!this.j&&r)return this.g.T.flush(t.type)}).call(c,e)),x(i,a,2);case 2:if(e.j)return i.return();re.debug(o,"cleared buffer"),t.ab=!1,t.endOfStream=!1,Ka(e,t,0),M(i)}}))}))}function Ka(e,t,r){var n=Wa(t),i=t.type;"text"!=i||e.h.has(i)?(re.O(n,"updating in "+r+" seconds"),t.Pa=new Ne((function(){return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return k(r,2),x(r,Ra(e,t),4);case 4:j(r,0);break;case 2:n=D(r),e.g&&e.g.onError(n),M(r)}}))}))})).V(r)):re.K(n,"Text stream is unloaded. No update is needed.")}function Ha(e){null!=e.Pa&&(e.Pa.stop(),e.Pa=null)}function Va(e){return I((function t(){return V(t,(function(t){if(1===t.s){if(e.lb)return x(t,e.lb.abort(),0);t.I(0)}}))}))}function Ga(e,t){var r;Le(e.M).then(_bindInstanceProperty(r=function(){this.j||(this.g.onError(t),t.handled||this.l.failureCallback(t))}).call(r,e))}function Wa(e){return"("+e.type+":"+e.stream.id+")"}function za(e,t,r,n,i,o){if(200<=r&&299>=r&&202!=r)return{uri:i||n,Bd:n,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Ee(t)}catch(e){}throw re.debug("HTTP error text:",i),new ne(401==r||403==r?2:1,1,1001,n,r,i,e,o)}function qa(e,t,r,n){var i,o=new qa.h;_forEachInstanceProperty(i=yt(t.headers)).call(i,(function(e,t){o.append(t,e)}));var a=new qa.g,s={Zd:!1,Oe:!1};if(e=new Ue(e=qa.u(e,r,{body:t.body||void 0,headers:o,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,n),(function(){return s.Zd=!0,a.abort(),_Promise.resolve()})),t=t.retryParameters.timeout){var l=new je((function(){s.Oe=!0,a.abort()}));l.V(t/1e3),e.finally((function(){l.stop()}))}return e}function Ya(e,t,r,n){var i=new Ya.j,o=_Date$now(),a=0;return new Ue(new _Promise((function(s,l){for(var c in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){l(new ne(1,1,7001,e,r))},i.onload=function(t){var n;t=t.target;for(var i=_trimInstanceProperty(n=t.getAllResponseHeaders()).call(n).split("\r\n"),o={},a=(i=b(i)).next();!a.done;a=i.next())o[(a=a.value.split(": "))[0].toLowerCase()]=_sliceInstanceProperty(a).call(a,1).join(": ");try{var c=za(o,t.response,t.status,e,t.responseURL,r);s(c)}catch(e){l(e)}},i.onerror=function(t){l(new ne(1,1,1002,e,t,r))},i.ontimeout=function(){l(new ne(1,1,1003,e,r))},i.onprogress=function(e){var t=_Date$now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(n(t-o,e.loaded-a,e.total-e.loaded),a=e.loaded,o=t)},t.headers)i.setRequestHeader(c.toLowerCase(),t.headers[c]);i.send(t.body)})),(function(){return i.abort(),_Promise.resolve()}))}function Xa(){this.g=this.j=this.h=0,this.i=new _Map,this.l=0}function Ja(e,t,r){this.m=e,this.h=new _Map,this.i=!1,this.l=t,this.j=r,this.g=new Xa}function Qa(e,t,r,n,i,o){var a=function(e,t){e.h+=t;var r=e.l;return e.l++,e.i.set(r,t),r}(e.g,n);n=e.h.get(t)||_Promise.resolve(),e.h.set(t,n.then((function(){return I((function t(){var n,s,l,c,u,p;return V(t,(function(t){switch(t.s){case 1:return x(t,function(e,t){return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return x(r,e.m.request(1,t).promise,2);case 2:return n=r.B,r.return(n.data)}}))}))}(e,r),2);case 2:if(n=t.B,e.i)throw new ne(2,9,7001);if(i)for(var f in s=new Uint8Array(n),(l=new Qn(s)).data)c=Number(f),u=l.data[c],p=l.g[c],e.j(u,p);return e.g.close(a,n.byteLength),f=e.g,e.l(0==f.h?0:f.j/f.h,e.g.g),t.return(o(n))}}))}))})))}function Za(e,t){var r=this;this.i=e,this.h=e.objectStore(t),this.g=new Pe,e.onabort=function(e){e.preventDefault(),r.g.reject()},e.onerror=function(e){e.preventDefault(),r.g.reject()},e.oncomplete=function(){r.g.resolve()}}function es(e,t){return new _Promise((function(r,n){var i=e.h.openCursor();i.onerror=n,i.onsuccess=function(e){if(!(e=e.target.result))return r();t(e.key,e.value,e),e.continue()}}))}function ts(e){this.h=e,this.g=[]}function rs(e,t){return ns(e,t,"readwrite")}function ns(e,t,r){var n=new Za(r=e.h.transaction([t],r),t);return e.g.push(n),n.promise().then((function(){Xe(e.g,n)}),(function(){Xe(e.g,n)})),n}function is(e,t,r){this.h=new ts(e),this.i=t,this.g=r}function os(e){return _Promise.reject(new ne(2,9,9011,"Cannot add new value to "+e))}function as(e,t,r,n){t=(e=rs(e.h,t)).store();for(var i={},o=(r=b(r)).next();!o.done;i={key:i.key},o=r.next())i.key=o.value,t.delete(i.key).onsuccess=function(e){return function(){return n(e.key)}}(i);return e.promise()}function ss(e,t,r){return I((function n(){var i,o,a,s,l,c,u;return V(n,(function(n){switch(n.s){case 1:for(i=ns(e.h,t,"readonly"),o=i.store(),a={},s=[],l={},c=b(r),u=c.next();!u.done;l={request:l.request,key:l.key},u=c.next())l.key=u.value,l.request=o.get(l.key),l.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),a[e.key]=e.request.result}}(l);return x(n,i.promise(),2);case 2:if(s.length)throw new ne(2,9,9012,"Could not find values for "+s);return n.return(_mapInstanceProperty(r).call(r,(function(e){return a[e]})))}}))}))}function ls(e){this.g=new ts(e)}function cs(){this.g=new _Map}function us(e,t,r){if(!(e=e.g.get(t)))throw new ne(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(r)))throw new ne(2,9,9013,"Could not find cell with name "+r);return t}function ps(e,t){fs.set(e,t)}ma.prototype.destroy=function(){var e=this;return I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:r=[];for(var i=b(_valuesInstanceProperty(a=e.h).call(a)),o=i.next();!o.done;o=i.next()){var a;Ha(n=o.value),r.push(Va(n))}return x(t,_Promise.all(r),2);case 2:e.h.clear(),e.o.clear(),e.g=null,e.i=null,e.F=null,e.m=null,e.l=null,e.j=!0,M(t)}}))}))},ma.prototype.configure=function(e){this.l=e,this.M=new De({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},ma.prototype.start=function(){var e=this;return I((function t(){var r,n,i;return V(t,(function(t){switch(t.s){case 1:return r=e.g.eb(),n=La(e,r),(i=e.g.ue(e.i.periods[n])).variant||i.text?x(t,Ta(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,r),2):(re.error("init: no Streams chosen"),t.return(new ne(2,5,5005)));case 2:if(e.j)return t.return();re.debug("init: completed initial Stream setup"),e.g&&e.g.Yf&&(re.K("init: calling onInitialStreamsSetup()..."),e.g.Yf()),M(t)}}))}))},ma.prototype.P=function(e,t,r,n){var i=n.reader.Cd(),o=n.reader.Cd(),a=n.reader.N(),s=n.reader.N(),l=n.reader.N(),c=n.reader.N();n=n.reader.mb(n.reader.S.byteLength-n.reader.ka()),e=e.startTime+t.startTime+s/a,_includesInstanceProperty(r).call(r,i)&&("urn:mpeg:dash:event:2012"==i?this.g.Zf():this.g.onEvent(new Ge("emsg",{detail:{startTime:e,endTime:e+l/a,schemeIdUri:i,value:o,timescale:a,presentationTimeDelta:s,eventDuration:l,id:c,messageData:n}})))},X("shaka.net.HttpFetchPlugin",qa),qa.u=function(e,t,r,n,i){return I((function o(){var a,s,l,c,u,p,f,d,h,y,g,$,m;return V(o,(function(o){switch(o.s){case 1:return a=qa.l,s=qa.i,p=u=0,f=_Date$now(),k(o,2),x(o,a(e,r),4);case 4:return l=o.B,d=l.clone().body.getReader(),y=(h=l.headers.get("Content-Length"))?_parseInt$1(h,10):0,new s({start:function(e){!function t(){return I((function r(){var n,o,a;return V(r,(function(r){switch(r.s){case 1:return k(r,2),x(r,d.read(),4);case 4:n=r.B,j(r,3);break;case 2:return o=D(r),re.K("error reading from stream",o.message),r.return();case 3:n.done||(u+=n.value.byteLength),(100<(a=_Date$now())-f||n.done)&&(i(a-f,u-p,y-u),p=u,f=a),n.done?e.close():(e.enqueue(n.value),t()),M(r)}}))}))}()}}),x(o,l.arrayBuffer(),5);case 5:c=o.B,j(o,3);break;case 2:if(g=D(o),n.Zd)throw new ne(1,1,7001,e,t);if(n.Oe)throw new ne(1,1,1003,e,t);throw new ne(1,1,1002,e,g,t);case 3:return $={},m=l.headers,_forEachInstanceProperty(m).call(m,(function(e,t){$[_trimInstanceProperty(t).call(t)]=e})),o.return(za($,c,l.status,e,l.url,t))}}))}))},qa.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},qa.isSupported=qa.isSupported,qa.l=e.fetch,qa.g=e.AbortController,qa.i=e.ReadableStream,qa.h=e.Headers,qa.isSupported()&&(rt("http",qa,2),rt("https",qa,2)),X("shaka.net.HttpXHRPlugin",Ya),Ya.j=e.XMLHttpRequest,rt("http",Ya,1),rt("https",Ya,1),Xa.prototype.close=function(e,t){if(this.i.has(e)){var r=this.i.get(e);this.i.delete(e),this.j+=r,this.g+=t}},Ja.prototype.destroy=function(){var e;return this.i=!0,_Promise.all(_valuesInstanceProperty(e=this.h).call(e)).then((function(){}),(function(){}))},Za.prototype.abort=function(){try{this.i.abort()}catch(e){}return this.g.catch((function(){}))},Za.prototype.store=function(){return this.h},Za.prototype.promise=function(){return this.g},ts.prototype.destroy=function(){var e;return _Promise.all(_mapInstanceProperty(e=this.g).call(e,(function(e){return e.abort()})))},(p=is.prototype).destroy=function(){return this.h.destroy()},p.hasFixedKeySpace=function(){return!0},p.addSegments=function(){return os(this.i)},p.removeSegments=function(e,t){return as(this,this.i,e,t)},p.getSegments=function(e){var t=this;return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return x(r,ss(t,t.i,e),2);case 2:return n=r.B,r.return(_mapInstanceProperty(n).call(n,(function(e){return t.ae(e)})))}}))}))},p.addManifests=function(){return os(this.g)},p.updateManifestExpiration=function(e,t){var r=rs(this.h,this.g),n=r.store();return n.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,n.put(r,e))},r.promise()},p.removeManifests=function(e,t){return as(this,this.g,e,t)},p.getManifests=function(e){var t=this;return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return x(r,ss(t,t.g,e),2);case 2:return n=r.B,r.return(_mapInstanceProperty(n).call(n,(function(e){return t.pc(e)})))}}))}))},p.getAllManifests=function(){var e=this;return I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:return r=ns(e.h,e.g,"readonly"),n=new _Map,x(t,es(r,(function(t,r){n.set(t,e.pc(r))})),2);case 2:return x(t,r.promise(),3);case 3:return t.return(n)}}))}))},p.ae=function(e){return e},p.pc=function(e){return e},p.add=function(e,t){var r=this;return I((function n(){var i,o,a,s;return V(n,(function(n){switch(n.s){case 1:i=rs(r.h,e),o=i.store(),a=[];for(var l=b(t),c=l.next();!c.done;c=l.next())s=c.value,o.add(s).onsuccess=function(e){a.push(e.target.result)};return x(n,i.promise(),2);case 2:return n.return(a)}}))}))},ls.prototype.destroy=function(){return this.g.destroy()},ls.prototype.getAll=function(){var e=this;return I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:return r=ns(e.g,"session-ids","readonly"),n=[],x(t,es(r,(function(e,t){n.push(t)})),2);case 2:return x(t,r.promise(),3);case 3:return t.return(n)}}))}))},ls.prototype.add=function(e){for(var t=rs(this.g,"session-ids"),r=t.store(),n=(e=b(e)).next();!n.done;n=e.next())r.add(n.value);return t.promise()},ls.prototype.remove=function(e){var t=this;return I((function r(){var n;return V(r,(function(r){switch(r.s){case 1:return x(r,es(n=rs(t.g,"session-ids"),(function(t,r,n){0<=_indexOfInstanceProperty(e).call(e,r.sessionId)&&n.delete()})),2);case 2:return x(r,n.promise(),0)}}))}))},cs.prototype.destroy=function(){for(var e=[],t=b(_valuesInstanceProperty(n=this.g).call(n)),r=t.next();!r.done;r=t.next()){var n;e.push(r.value.destroy())}return this.g.clear(),_Promise.all(e)},cs.prototype.init=function(){var e=this;_forEachInstanceProperty(fs).call(fs,(function(t,r){var n=t();n?e.g.set(r,n):re.info("Skipping "+r+" as it is not supported on this platform")}));for(var t=[],r=b(_valuesInstanceProperty(i=this.g).call(i)),n=r.next();!n.done;n=r.next()){var i;t.push(n.value.init())}return _Promise.all(t)},cs.prototype.erase=function(){var e=this;return I((function t(){var r,n,i;return V(t,(function(t){var o;switch(t.s){case 1:return r=_Array$from(_valuesInstanceProperty(o=e.g).call(o)),(n=0<r.length)||_forEachInstanceProperty(i=fs).call(i,(function(e){(e=e())&&r.push(e)})),x(t,_Promise.all(_mapInstanceProperty(r).call(r,(function(e){return e.erase()}))),2);case 2:if(!n)return x(t,_Promise.all(_mapInstanceProperty(r).call(r,(function(e){return e.destroy()}))),0);t.I(0)}}))}))},X("shaka.offline.StorageMuxer.register",ps),X("shaka.offline.StorageMuxer.unregister",(function(e){fs.delete(e)}));var fs=new _Map;function ds(e){is.apply(this,arguments)}function hs(e){var t,r;return function(e){var t,r,n=_filterInstanceProperty(t=e.streams).call(t,(function(e){return"audio"==e.contentType})),i=_filterInstanceProperty(r=e.streams).call(r,(function(e){return"video"==e.contentType}));if(!_everyInstanceProperty(n).call(n,(function(e){return e.variantIds}))||!_everyInstanceProperty(i).call(i,(function(e){return e.variantIds}))){_forEachInstanceProperty(n).call(n,(function(e){e.variantIds=[]})),_forEachInstanceProperty(i).call(i,(function(e){e.variantIds=[]}));var o=0;if(i.length&&!n.length){re.debug("Found video-only content. Creating variants for video.");var a=o++;_forEachInstanceProperty(i).call(i,(function(e){e.variantIds.push(a)}))}if(!i.length&&n.length){re.debug("Found audio-only content. Creating variants for audio.");var s=o++;_forEachInstanceProperty(n).call(n,(function(e){e.variantIds.push(s)}))}i.length&&n.length&&(re.debug("Found audio-video content. Creating variants."),_forEachInstanceProperty(n).call(n,(function(e){_forEachInstanceProperty(i).call(i,(function(t){var r=o++;e.variantIds.push(r),t.variantIds.push(r)}))})))}}(e),_forEachInstanceProperty(t=e.streams).call(t,(function(){})),{startTime:e.startTime,streams:_mapInstanceProperty(r=e.streams).call(r,ys)}}function ys(e){var t,r=e.initSegmentUri?$s(e.initSegmentUri):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyId:e.keyId,segments:_mapInstanceProperty(t=e.segments).call(t,gs),variantIds:e.variantIds}}function gs(e){var t=$s(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function $s(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new ne(2,9,9004,"Could not parse uri "+e)}function ms(e,t,r,n){is.call(this,e,t,r),this.j=n}function vs(){this.l=this.i=this.h=this.g=this.j=null}function bs(e,t,r,n){this.g=e,this.l=t,this.j=r,this.i=n,this.h=["offline:",e,"/",t,"/",r,"/",n].join("")}function Ss(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var r=e[2];if(!r)return null;var n=e[3];return n&&null!=t?new bs(t,r,n,Number(e[4])):null}function Is(e,t){this.h=e,this.g=t}function Ps(e,t,r){var n,i,o,a,s,l=_filterInstanceProperty(n=t.streams).call(n,(function(e){return"audio"==e.contentType})),c=_filterInstanceProperty(i=t.streams).call(i,(function(e){return"video"==e.contentType}));return l=function(e,t,r){for(var n=new _Set,i=b(t),o=i.next();!o.done;o=i.next()){var a=b(o.value.variantIds);for(o=a.next();!o.done;o=a.next())n.add(o.value)}for(i=b(r),o=i.next();!o.done;o=i.next())for(a=b(o.value.variantIds),o=a.next();!o.done;o=a.next())n.add(o.value);for(i=new _Map,n=b(n),o=n.next();!o.done;o=n.next())o=o.value,i.set(o,{id:o,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=b(t),n=t.next();!n.done;n=t.next())for(n=n.value,o=_s(e,n),a=b(n.variantIds),n=a.next();!n.done;n=a.next())(n=i.get(n.value)).language=o.language,n.primary=n.primary||o.primary,n.audio=o;for(r=b(r),t=r.next();!t.done;t=r.next())for(n=t.value,t=_s(e,n),o=b(n.variantIds),n=o.next();!n.done;n=o.next())(n=i.get(n.value)).primary=n.primary||t.primary,n.video=t;return i}(e,l,c),c=_mapInstanceProperty(o=_filterInstanceProperty(a=t.streams).call(a,(function(e){return"text"==e.contentType}))).call(o,(function(t){return _s(e,t)})),_forEachInstanceProperty(s=t.streams).call(s,(function(n){var i;n=_mapInstanceProperty(i=n.segments).call(i,(function(t,r){return ws(e,r,t)})),r.Jb(n,t.startTime)})),{startTime:t.startTime,variants:_Array$from(_valuesInstanceProperty(l).call(l)),textStreams:c}}function _s(e,t){var r,n=_mapInstanceProperty(r=t.segments).call(r,(function(t,r){return ws(e,r,t)})),i=new di(n);return n={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return _Promise.resolve()},findSegmentPosition:function(e){return _findInstanceProperty(i).call(i,e)},getSegmentReference:function(e){return i.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,pixelAspectRatio:t.pixelAspectRatio||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=t.initSegmentKey&&(n.initSegmentReference=function(e,t){var r=new bs("segment",e.h,e.g,t);return new ui((function(){return[r.toString()]}),0,null)}(e,t.initSegmentKey)),n}function ws(e,t,r){var n=new bs("segment",e.h,e.g,r.dataKey);return new pi(t,r.startTime,r.endTime,(function(){return[n.toString()]}),0,null)}function Es(){this.g=null}function Ts(e){var t=Ss(e);return t&&"manifest"==t.g?Ts.m(e):t&&"segment"==t.g?Ts.o(t.key(),t):Fe(new ne(2,1,9004,e))}function Os(e,t,r){return I((function n(){var i,o,a,s,l,c;return V(n,(function(n){switch(n.s){case 1:i=[];for(var u=[],p=b(r),f=p.next();!f.done;f=p.next()){f=f.value;for(var d=!1,h=b(u),y=h.next();!y.done;y=h.next())if(As((y=y.value).info,f)){y.sessionIds.push(f.sessionId),d=!0;break}d||u.push({info:f,sessionIds:[f.sessionId]})}o=b(u),a=o.next();case 2:if(a.done){n.I(4);break}return s=a.value,l=function(e,t,r){return I((function n(){var i,o,a,s;return V(n,(function(n){var l;switch(n.s){case 1:return i=new Ct({Ib:t,onError:function(){},Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(n,2),i.configure(e),x(n,function(e,t,r,n,i,o){var a=new _Map;return a.set(t,{audioCapabilities:i,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:n,initData:null,keyIds:null}]}),Ft(e,a)}(i,r.info.keySystem,r.info.licenseUri,r.info.serverCertificate,r.info.audioCapabilities,r.info.videoCapabilities),4);case 4:j(n,3);break;case 2:return o=D(n),re.v("Error initializing EME",o),x(n,i.destroy(),5);case 5:case 9:return n.return([]);case 3:return k(n,6),x(n,Mt(i),8);case 8:j(n,7);break;case 6:return a=D(n),re.v("Error setting server certificate",a),x(n,i.destroy(),9);case 7:return s=[],x(n,_Promise.all(_mapInstanceProperty(l=r.sessionIds).call(l,(function(e){return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:return k(t,2),x(t,function(e,t){return I((function r(){var n,i,o;return V(r,(function(r){switch(r.s){case 1:return x(r,Bt(e,t),2);case 2:return(n=r.B)?(i=[],(o=e.h.get(n))&&(o.Ga=new Pe,i.push(o.Ga)),re.O("Attempting to remove session",t),i.push(n.remove()),x(r,_Promise.all(i),0)):(re.O("Ignoring attempt to remove missing session",t),r.return())}}))}))}(i,e),4);case 4:s.push(e),j(t,0);break;case 2:r=D(t),re.v("Error deleting offline session",r),M(t)}}))}))}))),10);case 10:return x(n,i.destroy(),11);case 11:return n.return(s)}}))}))}(e,t,s),x(n,l,5);case 5:c=n.B,i=_concatInstanceProperty(i).call(i,c),a=o.next(),n.I(2);break;case 4:return n.return(i)}}))}))}function As(e,t){function r(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Je(e.audioCapabilities,t.audioCapabilities,r)&&Je(e.videoCapabilities,t.videoCapabilities,r)}function Cs(e,t){var r={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},n=this;this.m=t,this.i=e,this.j=r,this.o=null,this.l=[],this.h=this.g=null,this.u=!0,this.A=_Promise.resolve().then((function(){return function(e){return I((function t(){return V(t,(function(t){if(1===t.s){if(e.u){if(0==e.l.length||e.g&&!e.g.gb)var r=!1;else{e.g&&(e.g.Da.kb(),e.g=null);var n=(r=e.l.shift()).create(e.j);n?(r.Da.Kb(),e.g={node:n.node,payload:n.payload,gb:n.gb,Da:r.Da}):r.Da.Ec(),r=!0}return r?r=_Promise.resolve():e.g?r=function(e){return I((function t(){var r,n;return V(t,(function(t){switch(t.s){case 1:return e.i=e.m.Af(e.i,e.j,e.g.node,e.g.payload),k(t,2),e.h=e.m.ef(e.i,e.j,e.g.payload),x(t,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Da.Cc(),e.g=null),j(t,0);break;case 2:return 7001==(r=D(t)).code?e.g.Da.kb():e.g.Da.onError(r),e.g=null,e.h=null,n=e,x(t,e.m.handleError(e.j,r),5);case 5:n.i=t.B,M(t)}}))}))}(e):(e.m.Xf(e.i),e.o=new Pe,r=e.o),x(t,r,1)}t.I(0)}}))}))}(n)}))}function Rs(e,t){var r={Kb:function(){},Cc:function(){},kb:function(){},onError:function(){},Ec:function(){},$g:function(){}};return e.l.push({create:t,Da:r}),e.h&&e.h.abort(),xs(e),r}function xs(e){e.o&&(e.o.resolve(),e.o=null)}function Ms(e){this.g=null;for(var t=0;t<e.textTracks.length;++t){var r=e.textTracks[t];r.mode="disabled","Shaka Player TextTrack"==r.label&&(this.g=r)}this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function ks(e){if(e.startTime>=e.endTime)return re.v("Invalid cue times: "+e.startTime+" - "+e.endTime),null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Ns(e,t){var r=e.mode;e.mode="showing"==r?"showing":"hidden";for(var n=e.cues,i=n.length-1;0<=i;i--){var o=n[i];o&&t(o)&&e.removeCue(o)}e.mode=r}function js(e,t,r,n,i){var o,a=i in n,s=!0;for(o in t){var l=i+"."+o,c=a?n[i]:r[o];a||o in r?void 0===t[o]?void 0===c||a?delete e[o]:e[o]=qe(c):c.constructor==Object&&t[o]&&t[o].constructor==Object?(e[o]||(e[o]=qe(c)),l=js(e[o],t[o],c,n,l),s=s&&l):_typeof$1(t[o])!=_typeof$1(c)||null==t[o]||"function"!=typeof t[o]&&t[o].constructor!=c.constructor?(re.kc("Invalid config, wrong type for "+l),s=!1):("function"==typeof r[o]&&r[o].length!=t[o].length&&re.ba("Unexpected number of arguments for "+l),e[o]=t[o]):(re.kc("Invalid config, unrecognized key "+l),s=!1)}return s}function Ds(e,t){for(var r={},n=r,i=0,o=0;!(0>(i=_indexOfInstanceProperty(e).call(e,".",i)));)0!=i&&"\\"==e[i-1]||(n[o=e.substring(o,i).replace(/\\\./g,".")]={},n=n[o],o=i+1),i+=1;return n[e.substring(o).replace(/\\\./g,".")]=t,r}function Ls(){}function Us(){var e=5e5,t=1/0;navigator.connection&&(navigator.connection.downlink&&(e=1e6*navigator.connection.downlink),navigator.connection.saveData&&(t=360));var r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Kt,fairPlayTransform:!0,updateExpirationTime:1},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return re.error("Unhandled streaming error",e),[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};(Et("Web0S")||Pt()||Et("CrKey"))&&(i.stallSkip=0);var o={trackSelectionCallback:function(e){return I((function t(){return V(t,(function(t){if(1===t.s)return t.return(e)}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:r,manifest:n,streaming:i,offline:o,abrFactory:qr,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return o.trackSelectionCallback=function(e){return I((function t(){return V(t,(function(t){if(1===t.s)return t.return(function(e,t){var r=_filterInstanceProperty(e).call(e,(function(e){return"variant"==e.type})),n=[],i=Gr(t,_mapInstanceProperty(r).call(r,(function(e){return e.language})));i&&(n=_filterInstanceProperty(r).call(r,(function(e){return Hr(e.language)==i}))),0==n.length&&(n=_filterInstanceProperty(r).call(r,(function(e){return e.primary}))),0==n.length&&(1<new _Set(_mapInstanceProperty(r).call(r,(function(e){return e.language}))).size&&re.v("Could not choose a good audio track based on language preferences or primary tracks. An arbitrary language will be stored!"),n=r);var o=_filterInstanceProperty(n).call(n,(function(e){return e.height&&480>=e.height}));if(o.length&&(_sortInstanceProperty(o).call(o,(function(e,t){return t.height-e.height})),n=_filterInstanceProperty(o).call(o,(function(e){return e.height==o[0].height}))),r=[],n.length){var a=Math.floor(n.length/2);_sortInstanceProperty(n).call(n,(function(e,t){return e.bandwidth-t.bandwidth})),r.push(n[a])}for(n=b(e),a=n.next();!a.done;a=n.next())"text"==(a=a.value).type&&r.push(a);return r}(e,a.preferredAudioLanguage))}))}))},a}function Fs(e,t,r){var n={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return js(e,t,r||Us(),n,"")}function Bs(){this.g=null,this.h=[]}function Ks(e,t){if(null==e.g)e.g={timestamp:_Date$now()/1e3,state:t,duration:0};else{var r=_Date$now()/1e3;e.g.duration=r-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:r,state:t,duration:0})}}function Hs(e,t){var r=0;e.g&&e.g.state==t&&(r+=e.g.duration);for(var n=b(e.h),i=n.next();!i.done;i=n.next())r+=(i=i.value).state==t?i.duration:0;return r}function Vs(){this.h=this.i=null,this.g=[]}function Gs(){this.j=this.C=this.m=this.h=this.o=this.u=this.A=this.l=this.F=NaN,this.g=new Bs,this.i=new Vs}function Ws(t,r){var n=this;ze.call(this),this.o=Nl,this.g=null,this.ub=!1,this.l=new lt,this.Uc=this.u=this.Tb=this.i=this.C=this.j=this.rc=this.L=this.ic=this.J=this.wb=this.A=this.M=this.m=this.X=null,this.re=1e9,this.lc=new _Set,this.yb=!0,this.wa=null,this.qe=!1,this.oe=0,this.va=null,this.Z=new To,this.h=il(this),this.mc={width:1/0,height:1/0},this.F=null,this.tb=new jo(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.ua=this.h.preferredTextLanguage,this.Xa=this.h.preferredTextRole,this.Wc=[],r&&r(this),this.X=function(e){return new et((function(t,r){e.u&&e.u.segmentDownloaded(t,r)}))}(this),this.l.H(e,"online",(function(){n.Id()})),this.P={name:"detach"},this.da={name:"attach"},this.Qa={name:"unload"},this.nd={name:"manifest-parser"},this.md={name:"manifest"},this.vb={name:"media-source"},this.ad={name:"drm-engine"},this.ea={name:"load"},this.od={name:"src-equals-drm-engine"},this.xb={name:"src-equals"};var i=new _Map;i.set(this.da,(function(e,t){return He(function(e,t,r){return null==t.D&&(t.D=r.D,e.l.H(t.D,"error",(function(){var t=Sl(e);t&&e.Va(t)}))),e.g=t.D,_Promise.resolve()}(n,e,t))})),i.set(this.P,(function(e){return e.D&&(n.l.ta(e.D,"error"),e.D=null),n.g=null,He(e=_Promise.resolve())})),i.set(this.Qa,(function(e){return He(Xs(n,e))})),i.set(this.vb,(function(t){return t=function(t,r){return I((function n(){var i,o,a,s;return V(n,(function(n){switch(n.s){case 1:return i=e.muxjs?new Zt:new er,o=t.h.textDisplayFactory,a=new o,t.fd=o,x(n,(s=new Tr(r.D,i,a)).C,2);case 2:t.M=s,M(n)}}))}))}(n,t),He(t)})),i.set(this.nd,(function(e,t){var r=function(e,t,r){return I((function n(){var i,o,a,s;return V(n,(function(n){switch(n.s){case 1:if(t.Ia=r.Ia,t.mimeType=r.mimeType,t.uri=r.uri,i=t.uri,o=e.X,e.Tb=i,t.Ia){e.C=t.Ia(),n.I(2);break}return a=e,x(n,Ai.create(i,o,e.h.manifest.retryParameters,t.mimeType),3);case 3:a.C=n.B;case 2:s=qe(e.h.manifest),r.D&&"AUDIO"===r.D.nodeName&&(s.disableVideo=!0),e.C.configure(s),M(n)}}))}))}(n,e,t);return He(r)})),i.set(this.md,(function(e){return function(e,t){var r=t.uri,n=e.X;e.rc=new da((function(){return e.He()})),function(e,t){e.h=t}(e.rc,(function(t){bl(e,"timelineregionadded",t)}));var i={networkingEngine:n,filterNewPeriod:function(t){return e.Xc(t)},filterAllPeriods:function(t){return ol(e,t)},onTimelineRegionAdded:function(t){var r=e.rc;e:{for(var n=b(r.g),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){n=i;break e}n=null}null==n&&(r.g.add(t),r.h(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Va(t)}};return new Ue(_Promise.resolve().then((function(){return I((function t(){var n;return V(t,(function(t){switch(t.s){case 1:return n=e,x(t,e.C.start(r,i),2);case 2:if(n.i=t.B,e.dispatchEvent(new Ge("manifestparsed")),0==e.i.periods.length)throw new ne(2,4,4014);!function(e){function t(e){var t;return e.video&&e.audio||e.video&&_includesInstanceProperty(t=e.video.codecs).call(t,",")}_someInstanceProperty(e).call(e,(function(e){var r;return _someInstanceProperty(r=e.variants).call(r,t)}))&&(re.debug("Found variant with audio and video content, so filtering out audio-only content in all periods."),_forEachInstanceProperty(e).call(e,(function(e){var r;e.variants=_filterInstanceProperty(r=e.variants).call(r,t)})))}(e.i.periods),M(t)}}))}))})),(function(){return re.info("Aborting parser step..."),e.C.stop()}))}(n,e)})),i.set(this.ad,(function(e){return e=function(e,t){return I((function r(){return V(r,(function(r){switch(r.s){case 1:return e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Il(e,t)},onExpirationUpdated:function(t,r){Pl(e,t,r)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),x(r,Rt(e.m,qo(e.i.periods),e.i.offlineSessionIds),2);case 2:return x(r,e.m.Ub(t.D),3);case 3:ol(e,e.i.periods),M(r)}}))}))}(n,e),He(e)})),i.set(this.ea,(function(e,t){return He(function(e,t,r){return I((function n(){var i,o,a,s,l,c,u,p,f,d;return V(n,(function(n){var h,y,g;switch(n.s){case 1:return t.startTime=r.startTime,i=t.D,o=t.uri,e.Tb=o,e.J=new Jo({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),e.F=new Gs,a=function(){return ul(e)},s=function(){return cl(e)},e.l.H(i,"playing",a),e.l.H(i,"pause",a),e.l.H(i,"ended",a),e.l.H(i,"ratechange",s),l=e.h.abrFactory,e.u&&e.Uc==l||(e.Uc=l,e.u=new l,e.u.configure(e.h.abr)),function(e,t){for(var r=0;r<t.length;r++){for(var n=t[r],i=new _Map,o=b(n.variants),a=o.next();!a.done;a=o.next())if((a=a.value).video&&a.video.closedCaptions){a=a.video;for(var s=b(_keysInstanceProperty(c=a.closedCaptions).call(c)),l=s.next();!l.done;l=s.next()){var c;if(l=l.value,!i.has(l)){var u,p={id:e.re++,originalId:l,createSegmentIndex:_bindInstanceProperty(u=_Promise.resolve).call(u,_Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:a.closedCaptions.get(l),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:a.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(l,p)}}}for(o=(i=b(_valuesInstanceProperty(i).call(i))).next();!o.done;o=i.next())n.textStreams.push(o.value)}}(e,e.i.periods),e.tb=new jo(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.ua=e.h.preferredTextLanguage,e.Xa=e.h.preferredTextRole,function(e,t,r){0<t&&(e.aa()?re.v("|playRangeStart| has been configured for live content. Ignoring the setting."):e.Le(t)),r<e.ha()&&(e.aa()?re.v("|playRangeEnd| has been configured for live content. Ignoring the setting."):e.Fa(r))}(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.u.init((function(t,r,n){r=void 0!==r&&r,n=void 0===n?0:n,re.debug("switch_");e:{for(var i=b(e.i.periods),o=i.next();!o.done;o=i.next()){var a;if(o=o.value,_includesInstanceProperty(a=o.variants).call(a,t)){i=o;break e}}i=null}rl(e,i,t,!0),e.j&&_a(e.j,t,r,n)&&hl(e)})),e.A=function(e,t){return new ca(e.g,e.i,e.h.streaming,t,(function(){e.wb&&zo(e.wb,!0),e.j&&function(e){var t,r,n;function i(t){var r=e.g.T;return t="text"==t?null!=(t=r.g).g&&null!=t.h&&o>=t.g&&o<t.h:rr(t=kr(r,t),o,a)}var o=e.g.eb(),a=e.l.smallGapLimit,s=!1,l=La(e,o);if(ht(_valuesInstanceProperty(t=e.h).call(t),(function(e){return e.oa==l})))for(var c=b(_keysInstanceProperty(p=e.h).call(p)),u=c.next();!u.done;u=c.next()){var p;i(u=u.value)||(Ea(e,e.h.get(u)),s=!0)}else ht(_keysInstanceProperty(r=e.h).call(r),i)||(re.debug("(all): seeked: unbuffered seek: clearing all buffers"),_forEachInstanceProperty(n=e.h).call(n,(function(t){Ea(e,t)})),s=!0);s||re.debug("(all): seeked: buffered seek: presentationTime="+o)}(e.j),e.L&&Zs(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.wb=function(e){var t=new Xo(e.i);!function(e,t){e.h=t}(t,(function(){yl(e)}));var r=new ha(e.rc);!function(e,t,r,n){e.g=t,e.h=r,e.i=n}(r,(function(t){bl(e,"timelineregionenter",t)}),(function(t){bl(e,"timelineregionexit",t)}),(function(t,r){r||(bl(e,"timelineregionenter",t),bl(e,"timelineregionexit",t))}));var n=new Wo(e.g);return n.g.add(t),n.g.add(r),n}(e),c=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),Qs(e,c),e.j=function(e){var t,r,n,i,o;return new ma(e.i,{eb:function(){return e.A.l()},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},T:e.M,Ib:e.X,ue:_bindInstanceProperty(t=e.Vf).call(t,e),te:_bindInstanceProperty(r=e.Ze).call(r,e),onError:_bindInstanceProperty(n=e.Va).call(n,e),onEvent:function(t){return e.dispatchEvent(t)},Zf:_bindInstanceProperty(i=e.$f).call(i,e),zd:_bindInstanceProperty(o=e.eg).call(o,e)})}(e),e.j.configure(e.h.streaming),zr.$d(e.i,e.h.preferredAudioChannelCount),e.o=jl,e.dispatchEvent(new Ge("streaming")),x(n,e.j.start(),2);case 2:e.h.streaming.startAtSegmentBoundary&&(u=e.A.l(),p=function(e,t){function r(e,t){if(!e)return null;var r=e.findSegmentPosition(t-o.startTime);return null==r?null:(r=e.getSegmentReference(r))?r.startTime+o.startTime:null}var n=va(e.j),i=ba(e.j),o=Al(e);return n=r(n,t),i=r(i,t),null!=i&&null!=n?Math.max(i,n):null!=i?i:null!=n?n:t}(e,u),e.A.A(p)),_forEachInstanceProperty(h=e.i.periods).call(h,_bindInstanceProperty(y=e.Xc).call(y,e)),yl(e),hl(e),f=Al(e)||e.i.periods[0],d=_someInstanceProperty(g=f.variants).call(g,(function(e){return e.primary})),e.h.preferredAudioLanguage||d||re.v("No preferred audio language set. We will choose an arbitrary language initially"),pl(e,f.variants),e.l.ya(i,"loadedmetadata",(function(){e.F.h=_Date$now()/1e3-r.Rd})),M(n)}}))}))}(n,e,t))})),i.set(this.od,(function(e,t){var r=function(e,t,r){return I((function n(){var i,o;return V(n,(function(n){var a;switch(n.s){case 1:return i=Se,e.m=Js(e,{Ib:e.X,onError:function(t){e.Va(t)},Dc:function(t){Il(e,t)},onExpirationUpdated:function(t,r){Pl(e,t,r)},onEvent:function(t){e.dispatchEvent(t)}}),e.m.configure(e.h.drm),o={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:_bindInstanceProperty(a=_Promise.resolve).call(a,_Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r.mimeType?r.mimeType.split(";")[0]:"video/mp4",codecs:r.mimeType?mt(r.mimeType):"",encrypted:!0,keyId:null,language:"und",label:null,type:i.Za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},x(n,Rt(e.m,[o],[]),2);case 2:return x(n,e.m.Ub(t.D),0)}}))}))}(n,e,t);return He(r)})),i.set(this.xb,(function(e,t){return function(e,t,r){function n(){return ul(e)}if(t.uri=r.uri,t.startTime=r.startTime,e.Tb=t.uri,e.F=new Gs,e.A=new la(t.D),null!=t.startTime&&e.A.A(t.startTime),e.J=new Jo({wc:function(){return t.D.playbackRate},vc:function(){return t.D.defaultPlaybackRate},Od:function(e){t.D.playbackRate=e},pe:function(e){t.D.currentTime+=e}}),Qs(e,e.h.streaming.rebufferingGoal),e.l.H(t.D,"playing",n),e.l.H(t.D,"pause",n),e.l.H(t.D,"ended",n),e.l.H(t.D,"ratechange",(function(){return cl(e)})),"none"!=e.g.preload&&e.l.ya(t.D,"loadedmetadata",(function(){e.F.h=_Date$now()/1e3-r.Rd})),e.g.audioTracks&&(e.l.H(e.g.audioTracks,"addtrack",(function(){return yl(e)})),e.l.H(e.g.audioTracks,"removetrack",(function(){return yl(e)})),e.l.H(e.g.audioTracks,"change",(function(){return yl(e)}))),e.g.textTracks){var i=e.g.textTracks;e.l.H(i,"addtrack",(function(){return yl(e)})),e.l.H(i,"removetrack",(function(){return yl(e)})),e.l.H(i,"change",(function(){return yl(e)}))}t.D.src=t.uri,(Pt()||Et("Web0S"))&&t.D.load(),e.o=Dl,e.dispatchEvent(new Ge("streaming"));var o=new Pe;Zo(e.g,HTMLMediaElement.HAVE_METADATA,e.l,(function(){o.resolve()}));var a=!1;return e.Wc.push((function(){a=!0})),Zo(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,(function(){return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:if(a)return t.return();if(function(e){var t=e.h.preferredAudioLanguage;if(""!=t){e.Jd(t);var r=e.h.preferredVariantRole;""!=r&&e.Jd(t,r)}}(e),r=tl(e),_findInstanceProperty(r).call(r,(function(e){return"disabled"!=e.mode}))){t.I(2);break}return x(t,new _Promise((function(t){e.l.ya(e.g.textTracks,"change",t),new je(t).V(1)})),2);case 2:if(a)return t.return();!function(e){var t=e.h.preferredTextLanguage;if(""!=t){e.Kd(t);var r=e.h.preferredTextRole;""!=r&&e.Kd(t,r)}}(e),M(t)}}))}))})),e.g.error?o.reject(Sl(e)):"none"==e.g.preload&&(re.ba('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),o.resolve()),e.l.ya(e.g,"error",(function(){o.reject(Sl(e))})),new Ue(o,(function(){return o.reject(new ne(2,7,7001)),_Promise.resolve()}))}(n,e,t)})),this.Ya=new Cs(this.P,{Af:function(e,t,r,i){var o=null;return e==n.P&&(o=r==n.P?n.P:n.da),e==n.da&&(o=r==n.P||t.D!=i.D?n.P:r==n.da?n.da:r==n.vb||r==n.ea?n.vb:r==n.xb?n.od:null),e==n.vb&&(o=r==n.ea&&t.D==i.D?n.nd:n.Qa),e==n.nd&&(o=xl(n.ea,n.md,n.Qa,r,t,i)),e==n.md&&(o=xl(n.ea,n.ad,n.Qa,r,t,i)),e==n.ad&&(o=xl(n.ea,n.ea,n.Qa,r,t,i)),e==n.od&&(o=r==n.xb&&t.D==i.D?n.xb:n.Qa),e!=n.ea&&e!=n.xb||(o=n.Qa),e==n.Qa&&(o=i.D&&t.D==i.D?n.da:n.P),o},ef:function(e,t,r){return n.dispatchEvent(new Ge("onstatechange",{state:e.name})),i.get(e)(t,r)},handleError:function(e,t){return I((function r(){return V(r,(function(r){switch(r.s){case 1:return re.v("The walker saw an error:"),t instanceof ne?re.v("Error Code:",t.code):(re.v("Error Message:",t.message),re.v("Error Stack:",t.stack)),x(r,Xs(n,e),2);case 2:return r.return(e.D?n.da:n.P)}}))}))},Xf:function(e){n.dispatchEvent(new Ge("onstateidle",{state:e.name}))}}),t&&this.Ub(t,!0)}O(ds,is),ds.prototype.updateManifestExpiration=function(e,t){var r=rs(this.h,this.g),n=r.store(),i=new Pe;return n.get(e).onsuccess=function(r){(r=r.target.result)?(r.expiration=t,n.put(r),i.resolve()):i.reject(new ne(2,9,9012,"Could not find values for "+e))},r.promise().then((function(){return i}))},ds.prototype.pc=function(e){var t;return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:_mapInstanceProperty(t=e.periods).call(t,hs),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},ds.prototype.ae=function(e){return{data:e.data}},O(ms,is),ms.prototype.hasFixedKeySpace=function(){return this.j},ms.prototype.addSegments=function(e){return this.j?os(this.i):this.add(this.i,e)},ms.prototype.addManifests=function(e){return this.j?os(this.g):this.add(this.g,e)},ms.prototype.pc=function(e){return null==e.expiration&&(e.expiration=1/0),e},(p=vs.prototype).init=function(){var t=this,r=new Pe,n=e.indexedDB.open("shaka_offline_db",4);return n.onsuccess=function(e){e=e.target.result,t.j=e;var n=e.objectStoreNames;n.contains("manifest")&&n.contains("segment")?(re.debug("Mounting v1 idb storage cell"),n=new ds(e,"segment","manifest")):n=null,t.g=n,(n=e.objectStoreNames).contains("manifest-v2")&&n.contains("segment-v2")?(re.debug("Mounting v2 idb storage cell"),n=new ms(e,"segment-v2","manifest-v2",!0)):n=null,t.h=n,(n=e.objectStoreNames).contains("manifest-v3")&&n.contains("segment-v3")?(re.debug("Mounting v3 idb storage cell"),n=new ms(e,"segment-v3","manifest-v3",!1)):n=null,t.i=n,e.objectStoreNames.contains("session-ids")?(re.debug("Mounting session ID idb storage cell"),e=new ls(e)):e=null,t.l=e,r.resolve()},n.onupgradeneeded=function(e){e=e.target.result;for(var t=b(["segment-v3","manifest-v3","session-ids"]),r=t.next();!r.done;r=t.next())r=r.value,e.objectStoreNames.contains(r)||e.createObjectStore(r,{autoIncrement:!0})},n.onerror=function(e){r.reject(new ne(2,9,9001,n.error)),e.preventDefault()},r},p.destroy=function(){var e=this;return I((function t(){return V(t,(function(t){switch(t.s){case 1:if(!e.g){t.I(2);break}return x(t,e.g.destroy(),2);case 2:if(!e.h){t.I(4);break}return x(t,e.h.destroy(),4);case 4:if(!e.i){t.I(6);break}return x(t,e.i.destroy(),6);case 6:if(!e.l){t.I(8);break}return x(t,e.l.destroy(),8);case 8:e.j&&e.j.close(),M(t)}}))}))},p.getCells=function(){var e=new _Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),e},p.getEmeSessionCell=function(){return this.l},p.erase=function(){var t=this;return I((function r(){return V(r,(function(r){switch(r.s){case 1:if(!t.g){r.I(2);break}return x(r,t.g.destroy(),2);case 2:if(!t.h){r.I(4);break}return x(r,t.h.destroy(),4);case 4:if(!t.i){r.I(6);break}return x(r,t.i.destroy(),6);case 6:return t.j&&t.j.close(),x(r,function(){var t=new Pe,r=e.indexedDB.deleteDatabase("shaka_offline_db");return r.onblocked=function(){re.v("Deleting","shaka_offline_db","is being blocked")},r.onsuccess=function(){t.resolve()},r.onerror=function(e){t.reject(new ne(2,9,9001,r.error)),e.preventDefault()},t}(),8);case 8:return t.j=null,t.g=null,t.h=null,t.i=null,x(r,t.init(),0)}}))}))},ps("idb",(function(){return Et("CrKey")||!e.indexedDB?null:new vs})),bs.prototype.Ea=function(){return this.l},bs.prototype.ja=function(){return this.j},bs.prototype.key=function(){return this.i},bs.prototype.toString=function(){return this.h},(p=Es.prototype).configure=function(){},p.start=function(e){var t=this;return I((function r(){var n,i,o,a,s;return V(r,(function(r){switch(r.s){case 1:return n=Ss(e),t.g=n,null==n||"manifest"!=n.g?r.return(_Promise.reject(new ne(2,1,9004,n))):(i=new cs,N(r,2),x(r,i.init(),4));case 4:return x(r,us(i,n.Ea(),n.ja()),5);case 5:return x(r,r.B.getManifests([n.key()]),6);case 6:return o=r.B,a=o[0],s=new Is(n.Ea(),n.ja()),r.return(function(e,t){var r,n=new Ci(null,0);n.Fa(t.duration);var i=_mapInstanceProperty(r=t.periods).call(r,(function(t){return Ps(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&_forEachInstanceProperty(i).call(i,(function(e){var t;_forEachInstanceProperty(t=e.variants).call(t,(function(e){e.drmInfos=o}))})),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:i}}(s,a));case 2:return L(r),x(r,i.destroy(),7);case 7:U(r,0)}}))}))},p.stop=function(){return _Promise.resolve()},p.update=function(){},p.onExpirationUpdated=function(e,t){var r=this;return I((function n(){var i,o,a,s,l,c,u,p;return V(n,(function(n){var f;switch(n.s){case 1:return i=r.g,o=new cs,k(n,2,3),x(n,o.init(),5);case 5:return x(n,us(o,i.Ea(),i.ja()),6);case 6:return x(n,(a=n.B).getManifests([i.key()]),7);case 7:if(s=n.B,l=s[0],c=_includesInstanceProperty(f=l.sessionIds).call(f,e),u=null==l.expiration||l.expiration>t,!c||!u){n.I(3);break}return re.debug("Updating expiration for stored content"),x(n,a.updateManifestExpiration(i.key(),t),3);case 3:return L(n),x(n,o.destroy(),10);case 10:U(n,0);break;case 2:p=D(n),re.error("There was an error updating",i,p),n.I(3)}}))}))},Ai.Qb("application/x-offline-manifest",Es),X("shaka.offline.OfflineScheme",Ts),Ts.m=function(e){return Ke(e={uri:e,Bd:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},Ts.o=function(e,t){var r=new cs;return Ke(void 0).ca((function(){return r.init()})).ca((function(){return us(r,t.Ea(),t.ja())})).ca((function(e){return e.getSegments([t.key()])})).ca((function(e){return{uri:t,Bd:t,data:e[0].data,headers:{}}})).finally((function(){return r.destroy()}))},rt("offline",Ts),Cs.prototype.destroy=function(){var e=this;return I((function t(){return V(t,(function(t){switch(t.s){case 1:return e.u=!1,e.h&&e.h.abort(),xs(e),x(t,e.A,2);case 2:e.g&&e.g.Da.kb();for(var r=b(e.l),n=r.next();!n.done;n=r.next())n.value.Da.kb();e.g=null,e.l=[],e.m=null,M(t)}}))}))},X("shaka.text.SimpleTextDisplayer",Ms),Ms.prototype.remove=function(e,t){return!!this.g&&(Ns(this.g,(function(r){return r.startTime<t&&r.endTime>e})),!0)},Ms.prototype.remove=Ms.prototype.remove,Ms.prototype.append=function(e){var t,r,n,i=ks,o=_mapInstanceProperty(e).call(e,(function(e){if(e.nestedCues.length){var t,r=_mapInstanceProperty(t=e.nestedCues).call(t,(function(e){return e.spacer?"\n":e.payload+" "})).join("").replace(/ $/m,"");(e=e.clone()).nestedCues=[],e.payload=r}return e})),a=[];e=this.g.cues?_Array$from(this.g.cues):[];for(var s={},l=(o=b(o)).next();!l.done;s={Fb:s.Fb},l=o.next())s.Fb=l.value,_someInstanceProperty(e).call(e,function(e){return function(t){return t.startTime==e.Fb.startTime&&t.endTime==e.Fb.endTime&&t.text==e.Fb.payload}}(s))||(l=i(s.Fb))&&a.push(l);_forEachInstanceProperty(t=_sortInstanceProperty(r=_sliceInstanceProperty(a).call(a)).call(r,(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?_indexOfInstanceProperty(a).call(a,t)-_indexOfInstanceProperty(a).call(a,e):_indexOfInstanceProperty(a).call(a,e)-_indexOfInstanceProperty(a).call(a,t)}))).call(t,_bindInstanceProperty(n=function(e){this.g.addCue(e)}).call(n,this))},Ms.prototype.append=Ms.prototype.append,Ms.prototype.destroy=function(){return this.g&&Ns(this.g,(function(){return!0})),this.g=null,_Promise.resolve()},Ms.prototype.destroy=Ms.prototype.destroy,Ms.prototype.isTextVisible=function(){return"showing"==this.g.mode},Ms.prototype.isTextVisible=Ms.prototype.isTextVisible,Ms.prototype.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},Ms.prototype.setTextVisibility=Ms.prototype.setTextVisibility,X("shaka.util.ConfigUtils.mergeConfigObjects",js),X("shaka.util.ConfigUtils.convertToConfigObject",Ds),X("shaka.util.PlayerConfiguration",Ls),Ls.mergeConfigObjects=Fs,J(Ws,ze),X("shaka.Player",Ws),Ws.prototype.destroy=function(){var e=this;return I((function t(){var r;return V(t,(function(t){switch(t.s){case 1:return e.o==kl?t.return():(e.o=kl,r=Rs(e.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}})),x(t,new _Promise((function(t){r.Kb=function(){re.info("Preparing to destroy walker...")},r.Cc=function(){t(),e.dispatchEvent(new Ge("loaded"))},r.kb=function(){t()},r.onError=function(){t()},r.Ec=function(){t()}})),2));case 2:return x(t,e.Ya.destroy(),3);case 3:if(e.l&&(e.l.release(),e.l=null),e.Uc=null,e.u=null,e.h=null,!e.X){t.I(0);break}return x(t,e.X.destroy(),5);case 5:e.X=null,M(t)}}))}))},Ws.prototype.destroy=Ws.prototype.destroy,Ws.version="v2.5.23";var zs=["2","5"];en=new function(e){this.g=e,this.i=Qr,this.h=Zr}(new Xr(Number(zs[0]),Number(zs[1])));var qs=["output-restricted","internal-error"],Ys={};function Xs(e,t){return I((function r(){var n;return V(r,(function(r){var i;switch(r.s){case 1:return e.o!=kl&&(e.o=Nl),n=_mapInstanceProperty(i=e.Wc).call(i,(function(e){return e()})),e.Wc=[],x(r,_Promise.all(n),2);case 2:if(e.dispatchEvent(new Ge("unloading")),t.Ia=null,t.mimeType=null,t.startTime=null,t.uri=null,t.D&&(e.l.ta(t.D,"loadedmetadata"),e.l.ta(t.D,"playing"),e.l.ta(t.D,"pause"),e.l.ta(t.D,"ended"),e.l.ta(t.D,"ratechange")),e.wb&&(e.wb.release(),e.wb=null),e.ic&&(e.ic.stop(),e.ic=null),!e.C){r.I(3);break}return x(r,e.C.stop(),4);case 4:e.C=null;case 3:if(!e.u){r.I(5);break}return x(r,e.u.stop(),5);case 5:if(!e.j){r.I(7);break}return x(r,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.J&&(e.J.release(),e.J=null),e.A&&(e.A.release(),e.A=null),!e.M){r.I(9);break}return x(r,e.M.destroy(),10);case 10:e.M=null;case 9:if(!t.D||!t.D.src){r.I(11);break}return x(r,new _Promise((function(e){return new je(e).V(.1)})),12);case 12:t.D.removeAttribute("src"),t.D.load();case 11:if(!e.m){r.I(13);break}return x(r,e.m.destroy(),14);case 14:e.m=null;case 13:e.Z.g.clear(),e.Tb=null,e.L=null,e.lc.clear(),e.i=null,e.F=null,e.fd=null,e.yb=!0,ll(e),M(r)}}))}))}function Js(e,t){return new Ct(t,e.h.drm.updateExpirationTime)}function Qs(e,t){e.L=new Do,e.L.g=Uo,Lo(e.L,t,Math.min(.5,t/2)),ll(e),e.ic=new je((function(){Zs(e)})).Oa(.25)}function Zs(e){switch(e.o){case Dl:var t=!!e.g.ended||tr(e.g.buffered)>=e.g.duration-1;break;case jl:e:if(e.g.ended||Rr(e.M))t=!0;else{if(e.i.presentationTimeline.aa()){var r=e.i.presentationTimeline.Db();if(tr(e.g.buffered)>=r){t=!0;break e}}t=!1}break;default:t=!1}var n=nr(e.g.buffered,e.g.currentTime),i=t,o=(r=e.L).h.get(r.g);t=r.g,n=i||n>=o?Fo:Uo,r.g=n,t!=n&&ll(e)}function el(e){if(e.C){var t=qe(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.C.configure(t)}if(e.m&&e.m.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{var r,n;_forEachInstanceProperty(r=e.i.periods).call(r,_bindInstanceProperty(n=e.Xc).call(n,e))}catch(t){e.Va(t)}var i=va(e.j),o=ba(e.j);t=Al(e),i=zr.ie(i,o,t.variants),e.u&&i&&i.allowedByApplication&&i.allowedByKeySystem?pl(e,t.variants):(re.debug("Choosing new streams after changing configuration"),fl(e,t))}if(e.M&&(t=e.h.textDisplayFactory,e.fd!=t)){i=new t;var a=(o=e.M).l;o.l=i,a&&(i.setTextVisibility(a.isTextVisible()),a.destroy()),o.g&&(o.g.i=i),e.fd=t,e.j&&((i=(t=e.j).h.get("text"))&&wa(t,i.stream,!0,0,!0))}e.u&&(e.u.configure(e.h.abr),e.h.abr.enabled&&!e.yb?e.u.enable():e.u.disable(),vl(e)),e.L&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),Lo(e.L,t,Math.min(.5,t/2)))}function tl(e){var t;return _filterInstanceProperty(t=_Array$from(e.g.textTracks)).call(t,(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function rl(e,t,r,n){Ao(e.Z,t).variant=r,(e=e.F.i).i!=r&&(e.i=r,e.g.push({timestamp:_Date$now()/1e3,id:r.id,type:"variant",fromAdaptation:n,bandwidth:r.bandwidth}))}function nl(e,t,r,n){Oo(e.Z,t,r),(e=e.F.i).h!=r&&(e.h=r,e.g.push({timestamp:_Date$now()/1e3,id:r.id,type:"text",fromAdaptation:n,bandwidth:null}))}function il(e){var t=Us();return t.streaming.failureCallback=function(t){var r=[1001,1002,1003];e.aa()&&_includesInstanceProperty(r).call(r,t.code)&&(t.severity=1,re.v("Live streaming error. Retrying automatically..."),e.Id())},t.textDisplayFactory=function(){return new Ms(e.g)},t}function ol(e,t){var r,n,i=e.j?va(e.j):null,o=e.j?ba(e.j):null;if(_forEachInstanceProperty(t).call(t,_bindInstanceProperty(r=zr.filterNewPeriod).call(r,null,e.m,i,o)),i=function(e,t){var r=0;return _forEachInstanceProperty(e).call(e,(function(e){r+=t(e)?1:0})),r}(t,(function(e){var t;return _someInstanceProperty(t=e.variants).call(t,zr.Gb)})),0==i)throw new ne(2,4,4032);if(i<t.length)throw new ne(2,4,4011);_forEachInstanceProperty(t).call(t,_bindInstanceProperty(n=function(e){zr.Xd(e.variants,this.h.restrictions,this.mc)&&this.j&&Al(this)==e&&yl(this),_l(this,e.variants)}).call(n,e))}function al(e,t,r,n){return r=void 0!==r&&r,n=void 0===n?0:n,e.yb?(e.wa=t,e.qe=r,e.oe=n,!0):((t=_a(e.j,t,r,n))&&gl(e),t)}function sl(e,t){if(e.yb)return e.va=t,!0;var r=wa(e.j,t,!0,0,!1);return r&&$l(e),r}function ll(e){var t=e.jd();if(e.F&&e.L&&e.A){var r=e.J;r.j=t,Qo(r),ul(e)}e.dispatchEvent(new Ge("buffering",{buffering:t}))}function cl(e){var t=e.g.playbackRate;0!=t&&e.J.set(t)}function ul(e){if(e.F&&e.L){var t=e.F.g;e.L.g==Uo?Ks(t,"buffering"):e.g.paused?Ks(t,"paused"):e.g.ended?Ks(t,"ended"):Ks(t,"playing")}}function pl(e,t){try{_l(e,t)}catch(t){return e.Va(t),null}var r=_filterInstanceProperty(t).call(t,(function(e){return zr.Gb(e)}));return r=e.tb.create(r),e.u.setVariants(_Array$from(_valuesInstanceProperty(r).call(r))),e.u.chooseVariant()}function fl(e,t){var r=dl(e,t,!1),n=zr.Wb(t.textStreams,e.ua,e.Xa)[0]||null,i=!1;n&&(e.h.streaming.alwaysStreamText||e.zc())&&(nl(e,t,n,!0),i=sl(e,n)),(r||i)&&hl(e)}function dl(e,t,r){r=void 0===r||r;var n=pl(e,t.variants),i=!1;return n&&(rl(e,t,n,!0),i=al(e,n,!0)),r&&i&&hl(e),i}function hl(e){wl(e,new Ge("adaptation"))}function yl(e){wl(e,new Ge("trackschanged"))}function gl(e){wl(e,new Ge("variantchanged"))}function $l(e){wl(e,new Ge("textchanged"))}function ml(e){wl(e,new Ge("texttrackvisibility"))}function vl(e){wl(e,new Ge("abrstatuschanged",{Zg:e.h.abr.enabled}))}function bl(e,t,r){e.dispatchEvent(new Ge(t,{detail:{schemeIdUri:r.schemeIdUri,value:r.value,startTime:r.startTime,endTime:r.endTime,id:r.id,eventElement:r.eventElement}}))}function Sl(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var r=e.g.error.msExtendedCode;return r&&(0>r&&(r+=Math.pow(2,32)),r=r.toString(16)),new ne(2,3,3016,t,r,e.g.error.message)}function Il(e,t){if(e.j){var r,n=Al(e),i=!1,o=_Object$keys(t);0==o.length&&re.v("Got a key status event without any key statuses, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks.");var a=1==o.length&&"00"==o[0];a&&re.v("Got a synthetic key status event, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks."),o.length&&_forEachInstanceProperty(r=e.i.periods).call(r,(function(e){var r;_forEachInstanceProperty(r=e.variants).call(r,(function(e){var r;_forEachInstanceProperty(r=zr.Kf(e)).call(r,(function(r){var n=e.allowedByKeySystem;r.keyId&&(r=t[a?"00":r.keyId],e.allowedByKeySystem=!!r&&!_includesInstanceProperty(qs).call(qs,r)),n!=e.allowedByKeySystem&&(i=!0)}))}))})),o=va(e.j);var s=ba(e.j);(o=zr.ie(o,s,n.variants))&&!o.allowedByKeySystem&&(re.debug("Choosing new variants after key status changed"),dl(e,n)),i&&(yl(e),pl(e,n.variants))}}function Pl(e,t,r){e.C&&e.C.onExpirationUpdated&&e.C.onExpirationUpdated(t,r),e.dispatchEvent(new Ge("expirationupdated"))}function _l(e,t){var r=e.m?gt(e.m.da):{},n=_Object$keys(r);n=n.length&&"00"==n[0];for(var i=!1,o=!1,a=[],s=[],l=b(t),c=l.next();!c.done;c=l.next()){var u=[];(c=c.value).audio&&u.push(c.audio),c.video&&u.push(c.video);for(var p=(u=b(u)).next();!p.done;p=u.next())if((p=p.value).keyId){var f=r[n?"00":p.keyId];f?_includesInstanceProperty(qs).call(qs,f)&&(_includesInstanceProperty(s).call(s,f)||s.push(f)):_includesInstanceProperty(a).call(a,p.keyId)||a.push(p.keyId)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):o=!0}if(!i)throw new ne(2,4,4012,{hasAppRestrictions:o,missingKeys:a,restrictedKeyStatuses:s})}function wl(e,t){I((function r(){return V(r,(function(r){switch(r.s){case 1:return x(r,_Promise.resolve(),2);case 2:e.o!=kl&&e.dispatchEvent(t),M(r)}}))}))}function El(e){for(var t=new _Set,r=(e=b(e)).next();!r.done;r=e.next())(r=r.value).language?t.add(Hr(r.language)):t.add("und");return t}function Tl(e){for(var t=new _Map,r=(e=b(e)).next();!r.done;r=e.next()){var n=r.value;r="und";var i=[];for(n.language&&(r=Hr(n.language)),(i="variant"==n.type?n.audioRoles:n.roles)&&i.length||(i=[""]),t.has(r)||t.set(r,new _Set),i=(n=b(i)).next();!i.done;i=n.next())i=i.value,t.get(r).add(i)}var o=[];return _forEachInstanceProperty(t).call(t,(function(e,t){for(var r=b(e),n=r.next();!n.done;n=r.next())o.push({language:t,role:n.value})})),o}function Ol(e){var t;return null==(e=Al(e))?[]:_filterInstanceProperty(t=e.variants).call(t,(function(e){return zr.Gb(e)}))}function Al(e){for(var t=e.A.l(),r=null,n=(e=b(e.i.periods)).next();!n.done;n=e.next())(n=n.value).startTime<=t&&(r=n);return r}function Cl(e){var t=Al(e);return Ao(e.Z,t).variant}function Rl(){return new ne(2,7,7e3)}function xl(e,t,r,n,i,o){return n==e&&i.D==o.D&&i.uri==o.uri&&i.mimeType==o.mimeType&&i.Ia==o.Ia?t:r}function Ml(e){return new _Promise((function(t,r){e.kb=function(){return r(Rl())},e.Cc=function(){return t()},e.onError=function(e){return r(e)},e.Ec=function(){return r(Rl())}}))}Ws.registerSupportPlugin=function(e,t){Ys[e]=t},Ws.isBrowserSupported=function(){if(!(_Promise&&e.Uint8Array&&_forEachInstanceProperty(Array.prototype)))return!1;var t=wt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!St()||It("application/x-mpegurl"))},Ws.probeSupport=function(){return Vt().then((function(e){for(var t=Ai.ng(),r={},n=b('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=n.next();!i.done;i=n.next()){r[i=i.value]=St()?!!_r(i)||(MediaSource.isTypeSupported(i)||Me(i)):It(i);var o=i.split(";")[0];r[o]=r[o]||r[i]}for(var a in e={manifest:t,media:r,drm:e},Ys)e[a]=Ys[a]();return e}))},Ws.prototype.Ub=function(e,t){if(t=void 0===t||t,this.o==kl)return _Promise.reject(Rl());var r={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};r.D=e,St()||(t=!1);var n=t?this.vb:this.da,i=Rs(this.Ya,(function(){return{node:n,payload:r,gb:!1}}));return i.Kb=function(){return re.info("Starting attach...")},Ml(i)},Ws.prototype.attach=Ws.prototype.Ub,Ws.prototype.detach=function(){var e=this;if(this.o==kl)return _Promise.reject(Rl());var t=Rs(this.Ya,(function(){return{node:e.P,payload:{Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},gb:!1}}));return t.Kb=function(){return re.info("Starting detach...")},Ml(t)},Ws.prototype.detach=Ws.prototype.detach,Ws.prototype.Ud=function(e){var t=this;if(e=void 0===e||e,this.o==kl)return _Promise.reject(Rl());St()||(e=!1);var r={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null},n=Rs(this.Ya,(function(n){var i=n.D&&e?t.vb:n.D?t.da:t.P;return r.D=n.D,{node:i,payload:r,gb:!1}}));return n.Kb=function(){return re.info("Starting unload...")},Ml(n)},Ws.prototype.unload=Ws.prototype.Ud,Ws.prototype.load=function(e,t,r){if(this.o==kl)return _Promise.reject(Rl());this.dispatchEvent(new Ge("loading"));var n={Ia:null,D:null,mimeType:null,startTime:null,Rd:null,uri:null};n.uri=e,n.Rd=_Date$now()/1e3,r&&"string"!=typeof r&&(Jr("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),n.Ia=function(){return new r}),r&&"string"==typeof r&&(n.mimeType=r),void 0!==t&&(n.startTime=t);var i=function(e,t){if(t.Ia)return!1;if(!St())return!0;var r=t.mimeType,n=t.uri||"";return r||(r={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Ai.getExtension(n)]),!!r&&(""!=(t.D||Tt()).canPlayType(r)&&(!Ai.isSupported(n,r)||_t()&&e.h.streaming.useNativeHlsOnSafari))}(this,n)?this.xb:this.ea,o=Rs(this.Ya,(function(e){return null==e.D?null:(n.D=e.D,{node:i,payload:n,gb:!0})}));return o.Kb=function(){return re.info("Starting load of "+e+"...")},new _Promise((function(e,t){o.Ec=function(){return t(new ne(2,7,7002))},o.Cc=function(){return e()},o.kb=function(){return t(Rl())},o.onError=function(e){return t(e)}}))},Ws.prototype.load=Ws.prototype.load,Ws.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var r=Fs(this.h,e,il(this));return el(this),r},Ws.prototype.configure=Ws.prototype.configure,Ws.prototype.getConfiguration=function(){var e=il(this);return Fs(e,this.h,il(this)),e},Ws.prototype.getConfiguration=Ws.prototype.getConfiguration,Ws.prototype.vg=function(){for(var e in this.h)delete this.h[e];Fs(this.h,il(this),il(this)),el(this)},Ws.prototype.resetConfiguration=Ws.prototype.vg,Ws.prototype.tf=function(){return this.o},Ws.prototype.getLoadMode=Ws.prototype.tf,Ws.prototype.yf=function(){return this.g},Ws.prototype.getMediaElement=Ws.prototype.yf,Ws.prototype.Yb=function(){return this.X},Ws.prototype.getNetworkingEngine=Ws.prototype.Yb,Ws.prototype.tc=function(){return this.Tb},Ws.prototype.getAssetUri=Ws.prototype.tc,Ws.prototype.wf=function(){return Jr("getManifestUri",'Please use "getAssetUri" instead.'),this.tc()},Ws.prototype.getManifestUri=Ws.prototype.wf,Ws.prototype.aa=function(){return this.i?this.i.presentationTimeline.aa():!(!this.g||!this.g.src)&&1/0==this.g.duration},Ws.prototype.isLive=Ws.prototype.aa,Ws.prototype.ib=function(){return!!this.i&&this.i.presentationTimeline.ib()},Ws.prototype.isInProgress=Ws.prototype.ib,Ws.prototype.Qf=function(){if(this.i){if(!this.i.periods.length)return!1;var e=this.i.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},Ws.prototype.isAudioOnly=Ws.prototype.Qf,Ws.prototype.He=function(){if(this.i){var e=this.i.presentationTimeline;return{start:e.Cb(),end:e.Ka()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},Ws.prototype.seekRange=Ws.prototype.He,Ws.prototype.keySystem=function(){return jt(this.drmInfo())},Ws.prototype.keySystem=Ws.prototype.keySystem,Ws.prototype.drmInfo=function(){return this.m?this.m.g:null},Ws.prototype.drmInfo=Ws.prototype.drmInfo,Ws.prototype.Xb=function(){return this.m?this.m.Xb():1/0},Ws.prototype.getExpiration=Ws.prototype.Xb,Ws.prototype.jd=function(){return!!this.L&&this.L.g==Uo},Ws.prototype.isBuffering=Ws.prototype.jd,Ws.prototype.Cf=function(){if(this.J){var e=this.J;e=e.j?0:e.i}else e=0;return e},Ws.prototype.getPlaybackRate=Ws.prototype.Cf,Ws.prototype.Mg=function(e){0==e?re.ba("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J&&this.J.set(e),this.o==jl&&Pa(this.j,1<Math.abs(e)))},Ws.prototype.trickPlay=Ws.prototype.Mg,Ws.prototype.$e=function(){var e=this.J.vc();this.o==Dl&&this.J.set(e),this.o==jl&&(this.J.set(e),Pa(this.j,!1))},Ws.prototype.cancelTrickPlay=Ws.prototype.$e,Ws.prototype.ed=function(){var e;if(this.i&&this.A){for(var t=Cl(this),r=[],n=b(Ol(this)),i=n.next();!i.done;i=n.next()){i=i.value;var o=zr.Oc(i);o.active=i==t,r.push(o)}return r}return this.g&&this.g.audioTracks?_mapInstanceProperty(e=_Array$from(this.g.audioTracks)).call(e,(function(e){return zr.je(e)})):[]},Ws.prototype.getVariantTracks=Ws.prototype.ed,Ws.prototype.Eb=function(){var e;if(this.i&&this.A){for(var t=function(e){var t=Al(e);if(null==t)return null;if(!Ao(e.Z,t).text){var r=zr.Wb(t.textStreams,e.ua,e.Xa);r.length&&Oo(e.Z,t,r[0])}return Ao(e.Z,t).text}(this),r=[],n=b(function(e){var t,r=Al(e);return null==r?[]:_filterInstanceProperty(t=r.textStreams).call(t,(function(t){return!e.lc.has(t)}))}(this)),i=n.next();!i.done;i=n.next()){i=i.value;var o=zr.Kc(i);o.active=i==t,r.push(o)}return r}return this.g&&this.g.src&&this.g.textTracks?_mapInstanceProperty(e=tl(this)).call(e,(function(e){return zr.Of(e)})):[]},Ws.prototype.getTextTracks=Ws.prototype.Eb,Ws.prototype.Ld=function(e){if(this.i&&this.j){var t,r=Al(this),n=_findInstanceProperty(t=r.textStreams).call(t,(function(t){return t.id==e.id}));n?(nl(this,r,n,!1),sl(this,n),this.ua=n.language):re.error("No stream with id",e.id)}else if(this.g&&this.g.src&&this.g.textTracks){for(n=(r=b(r=tl(this))).next();!n.done;n=r.next())n=n.value,zr.gd(n)==e.id?n.mode=this.ub?"showing":"hidden":n.mode="disabled";$l(this)}},Ws.prototype.selectTextTrack=Ws.prototype.Ld,Ws.prototype.xg=function(){var e;Jr("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var t=_filterInstanceProperty(e=this.Eb()).call(e,(function(e){return"application/cea-608"==e.mimeType}));0<t.length?this.Ld(t[0]):re.v("Unable to find the text track embedded in the video.")},Ws.prototype.selectEmbeddedTextTrack=Ws.prototype.xg,Ws.prototype.Rg=function(){var e;Jr("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var t=_filterInstanceProperty(e=this.Eb()).call(e,(function(e){return e.active}))[0];return!!t&&"application/cea-608"==t.mimeType},Ws.prototype.usingEmbeddedTextTrack=Ws.prototype.Rg,Ws.prototype.Ie=function(e,t,r){if(r=void 0===r?0:r,this.i&&this.j){var n,i=Al(this);this.h.abr.enabled&&re.ba("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var o=_findInstanceProperty(n=i.variants).call(n,(function(t){return t.id==e.id}));o?zr.Gb(o)?(rl(this,i,o,!1),al(this,o,t,r),this.tb=new No(o),pl(this,i.variants)):re.error("Unable to switch to restricted track",e.id):re.error("No variant with id",e.id)}else if(this.g&&this.g.audioTracks){for(r=(t=b(t=_Array$from(this.g.audioTracks))).next();!r.done;r=t.next())r=r.value,zr.gd(r)==e.id&&(r.enabled=!0);gl(this)}},Ws.prototype.selectVariantTrack=Ws.prototype.Ie,Ws.prototype.nf=function(){return Tl(this.ed())},Ws.prototype.getAudioLanguagesAndRoles=Ws.prototype.nf,Ws.prototype.Jf=function(){return Tl(this.Eb())},Ws.prototype.getTextLanguagesAndRoles=Ws.prototype.Jf,Ws.prototype.mf=function(){return _Array$from(El(this.ed()))},Ws.prototype.getAudioLanguages=Ws.prototype.mf,Ws.prototype.If=function(){return _Array$from(El(this.Eb()))},Ws.prototype.getTextLanguages=Ws.prototype.If,Ws.prototype.Jd=function(e,t){if(this.i&&this.A){var r=Al(this);if(this.tb=new jo(e,t||"",0,""),!this.h.abr.enabled){var n=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},i=Al(this)||this.i.periods[0],o=Ao(this.Z,i).variant,a=this.tb.create(i.variants);i=null;for(var s=(a=b(_valuesInstanceProperty(a).call(a))).next();!s.done;s=a.next())s=s.value,(!i||n(i,o)>n(s,o))&&(i=s);if(i)return r=zr.Oc(i),void this.Ie(r,!0)}dl(this,r)}else if(this.g&&this.g.audioTracks){for(i=_Array$from(this.g.audioTracks),r=Hr(e),o=n=null,a=(i=b(i)).next();!a.done;a=i.next()){var l;a=a.value,Hr((s=zr.je(a)).language)==r&&(n=a,t?_includesInstanceProperty(l=s.roles).call(l,t)&&(o=a):0==s.roles.length&&(o=a))}o?(o.enabled=!0,gl(this)):n&&(n.enabled=!0,gl(this))}},Ws.prototype.selectAudioLanguage=Ws.prototype.Jd,Ws.prototype.Kd=function(e,t){if(this.i&&this.A){var r=Al(this);this.ua=e,this.Xa=t||"";var n=zr.Wb(r.textStreams,this.ua,this.Xa)[0]||null;n&&(nl(this,r,n,!1),(this.h.streaming.alwaysStreamText||this.zc())&&sl(this,n))}else{var i,o=Hr(e);(r=_filterInstanceProperty(i=this.Eb()).call(i,(function(e){var r;return Hr(e.language)==o&&(!t||_includesInstanceProperty(r=e.roles).call(r,t))}))[0])&&this.Ld(r)}},Ws.prototype.selectTextLanguage=Ws.prototype.Kd,Ws.prototype.yg=function(e){if(this.i&&this.A){for(var t=Al(this),r=null,n=b(Ol(this)),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){r=i;break}null==r?re.v("No variants were found with label: "+e+". Ignoring the request to switch."):(this.tb=new jo(r.language,"",0,e),dl(this,t))}},Ws.prototype.selectVariantsByLabel=Ws.prototype.yg,Ws.prototype.zc=function(){var e,t=this.ub;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?_someInstanceProperty(e=tl(this)).call(e,(function(e){return"showing"==e.mode})):t},Ws.prototype.isTextTrackVisible=Ws.prototype.zc,Ws.prototype.Bg=function(e){var t=this;return I((function r(){var n,i,o,a;return V(r,(function(r){switch(r.s){case 1:if(t.ub==(n=!!e))return r.return();if(t.ub=n,t.o!=jl){if(t.g&&t.g.src&&t.g.textTracks)for(var s=b(tl(t)),l=s.next();!l.done;l=s.next())"disabled"!=(i=l.value).mode&&(i.mode=n?"showing":"hidden");r.I(2);break}if(t.M.l.setTextVisibility(n),t.h.streaming.alwaysStreamText){r.I(2);break}if(!n){!function(e){e.L=!0;var t=e.h.get("text");t&&(Ha(t),Va(t).catch((function(){})),e.h.delete("text"))}(t.j),r.I(2);break}if(Sa(t.j,"text")){r.I(2);break}if(o=Al(t),!(0<(a=zr.Wb(o.textStreams,t.ua,t.Xa)).length)){r.I(2);break}return x(r,Ia(t.j,a[0]),2);case 2:ml(t),M(r)}}))}))},Ws.prototype.setTextTrackVisibility=Ws.prototype.Bg,Ws.prototype.Ef=function(){if(!this.aa())return re.v("getPlayheadTimeAsDate is for live streams!"),null;var e=this.Ya.j,t=0;if(this.A)t=this.A.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.j+this.g.currentTime)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?(re.v("EXT-X-PROGRAM-DATETIME required to get playhead time as Date!"),null):new Date(e.getTime()+1e3*t)):(re.v("No way to get playhead time as Date!"),null)},Ws.prototype.getPlayheadTimeAsDate=Ws.prototype.Ef,Ws.prototype.Gf=function(){if(!this.aa())return re.v("getPresentationStartTimeAsDate is for live streams!"),null;if(this.i)return new Date(1e3*this.i.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?(re.v("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),null):e}return re.v("No way to get presentation start time as Date!"),null},Ws.prototype.getPresentationStartTimeAsDate=Ws.prototype.Gf,Ws.prototype.bd=function(){var e={total:[],audio:[],video:[],text:[]};return this.o==Dl&&(e.total=ir(this.g.buffered)),this.o==jl&&this.M.bd(e),e},Ws.prototype.getBufferedInfo=Ws.prototype.bd,Ws.prototype.getStats=function(){if(this.o!=jl&&this.o!=Dl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};ul(this);var e=this.g;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.F,r=Number(e.totalVideoFrames);t.A=Number(e.droppedVideoFrames),t.u=r,this.F.o=Number(e.corruptedVideoFrames)}this.m?e=(e=this.m).P?e.P:NaN:e=NaN,this.F.m=e,this.o==jl&&((e=Cl(this))&&(this.F.C=e.bandwidth),e&&e.video&&(t=this.F,r=e.video.height||NaN,t.F=e.video.width||NaN,t.l=r),e=this.u.getBandwidthEstimate(),this.F.j=e);var n=this.F;e=n.F,t=n.l,r=n.C;for(var i=n.u,o=n.A,a=n.o,s=n.j,l=n.h,c=Hs(n.g,"playing"),u=Hs(n.g,"paused"),p=Hs(n.g,"buffering"),f=n.m,d=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var r=[],n=b(e.h),i=n.next();!i.done;i=n.next())r.push(t(i.value));return e.g&&r.push(t(e.g)),r}(n.g),h=[],y=(n=b(n.i.g)).next();!y.done;y=n.next())y=y.value,h.push({timestamp:y.timestamp,id:y.id,type:y.type,fromAdaptation:y.fromAdaptation,bandwidth:y.bandwidth});return{width:e,height:t,streamBandwidth:r,decodedFrames:i,droppedFrames:o,corruptedFrames:a,estimatedBandwidth:s,loadLatency:l,playTime:c,pauseTime:u,bufferingTime:p,licenseTime:f,stateHistory:d,switchHistory:h}},Ws.prototype.getStats=Ws.prototype.getStats,Ws.prototype.addTextTrack=function(e,t,r,n,i,o){var a=this;return I((function s(){var l,c,u,p,f,d,h,y,g;return V(s,(function(s){var $,m;switch(s.s){case 1:if(a.o==Dl)throw re.error("Cannot add text when loaded with src="),Error("State error!");if(a.o!=jl)throw re.error("Must call load() and wait for it to resolve before adding text tracks."),Error("State error!");if(l=Al(a),c=Se,u=_indexOfInstanceProperty($=a.i.periods).call($,l),f=(p=u+1)>=a.i.periods.length?a.i.presentationTimeline.ha():a.i.periods[p].startTime,1/0==(d=f-l.startTime))throw new ne(1,4,4033);return h=new pi(1,0,d,(function(){return[e]}),0,null),y={id:a.re++,originalId:null,createSegmentIndex:_bindInstanceProperty(m=_Promise.resolve).call(m,_Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?h:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:n,codecs:i||"",kind:r,encrypted:!1,keyId:null,language:t,label:o||null,type:c.za,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},a.lc.add(y),l.textStreams.push(y),x(s,Ia(a.j,y),2);case 2:return(g=Sa(a.j,"text"))&&Oo(a.Z,l,g),a.lc.delete(y),re.debug("Choosing new streams after adding a text stream"),fl(a,l),yl(a),s.return(zr.Kc(y))}}))}))},Ws.prototype.addTextTrack=Ws.prototype.addTextTrack,Ws.prototype.Nd=function(e,t){this.mc.width=e,this.mc.height=t},Ws.prototype.setMaxHardwareResolution=Ws.prototype.Nd,Ws.prototype.Id=function(){if(this.o==jl){var e=this.j;if(e.j)re.error("Unable to retry after StreamingEngine is destroyed!"),e=!1;else if(e.A)re.error("Unable to retry after StreamingEngine encountered a fatal error!"),e=!1;else{for(var t=b(_valuesInstanceProperty(n=e.h).call(n)),r=t.next();!r.done;r=t.next()){var n,i=Wa(r=r.value);r.ac&&(re.info(i,"Retrying after failure..."),r.ac=!1,Ka(e,r,.1))}e=!0}}else e=!1;return e},Ws.prototype.retryStreaming=Ws.prototype.Id,Ws.prototype.uf=function(){return this.i},Ws.prototype.getManifest=Ws.prototype.uf,Ws.prototype.vf=function(){return this.C?this.C.constructor:null},Ws.prototype.getManifestParserFactory=Ws.prototype.vf,(p=Ws.prototype).Xc=function(e){var t=this.j?va(this.j):null,r=this.j?ba(this.j):null;if(zr.filterNewPeriod(this.m,t,r,e),t=e.variants,!_someInstanceProperty(t).call(t,zr.Gb))throw new ne(2,4,4011);if(_l(this,e.variants),zr.Xd(t,this.h.restrictions,this.mc)&&this.j&&Al(this)==e&&yl(this),(e=this.m?this.m.g:null)&&this.m.o)for(r=(t=b(t)).next();!r.done;r=t.next())for(var n=(r=b(r.value.drmInfos)).next();!n.done;n=r.next())if((n=n.value).keySystem==e.keySystem)for(var i=(n=b(n.initData||[])).next();!i.done;i=n.next())i=i.value,Nt(this.m,i.initDataType,i.initData)},p.Vf=function(e){re.debug("onChooseStreams_",e);try{var t,r;re.O("onChooseStreams_, choosing variant from ",e.variants),re.O("onChooseStreams_, choosing text from ",e.textStreams),this.yb=!0,this.u.disable(),vl(this),re.debug("Choosing new streams after period changed");var n=pl(this,e.variants),i=zr.Wb(e.textStreams,this.ua,this.Xa)[0]||null;this.wa&&(_includesInstanceProperty(t=e.variants).call(t,this.wa)&&(n=this.wa),this.wa=null),this.va&&(_includesInstanceProperty(r=e.textStreams).call(r,this.va)&&(i=this.va),this.va=null),n&&rl(this,e,n,!0),i&&nl(this,e,i,!0);var o=this.j,a=o.h.get("video");if(a)var s=o.i.periods[a.oa];else{var l=o.h.get("audio");s=l?o.i.periods[l.oa]:null}var c=n?n.audio:null;if(!s&&i){var u;if(u=c){e=i;var p=Hr(this.h.preferredTextLanguage),f=Hr(c.language),d=Hr(e.language);u=Br(d,p)&&!Br(f,d)}u&&(this.ub=!0),this.ub&&this.M.l.setTextVisibility(!0),ml(this)}var h=this.h.streaming.alwaysStreamText||this.zc()?{variant:n,text:i}:{variant:n,text:null};return re.O("onChooseStreams_, chose variant ",h.variant),re.O("onChooseStreams_, chose text ",h.text),h}catch(e){return this.Va(e),{variant:null,text:null}}},p.Ze=function(){re.debug("canSwitch_"),this.yb=!1,this.h.abr.enabled&&(this.u.enable(),vl(this)),this.wa&&(_a(this.j,this.wa,this.qe,this.oe),gl(this),this.wa=null),this.va&&(wa(this.j,this.va,!0,0,!1),$l(this),this.va=null)},p.$f=function(){this.C&&this.C.update&&this.C.update()},p.eg=function(){this.A&&this.A.C()},p.Va=function(e){if(this.o!=kl){var t=new Ge("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var kl=0,Nl=1,jl=2,Dl=3;function Ll(e,t){var r=Ps(new Is(e.Ea(),e.ja()),t.periods[0],new Ci(null,0)),n=t.appMetadata||{};return r=Ul(r),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:r,appMetadata:n}}function Ul(e){for(var t=[],r=zr.Bf(e.variants),n=(r=b(r)).next();!n.done;n=r.next())t.push(zr.Oc(n.value));for(r=(e=b(e.textStreams)).next();!r.done;r=e.next())t.push(zr.Kc(r.value));return t}function Fl(){this.g={}}function Bl(e,t){var r=t.audio,n=t.video;if(r&&!n&&(e.g[r.id]=r.bandwidth||t.bandwidth),!r&&n&&(e.g[n.id]=n.bandwidth||t.bandwidth),r&&n){var i=r.bandwidth||393216,o=n.bandwidth||t.bandwidth-i;0>=o&&(re.v("Audio bit rate consumes variants bandwidth. Setting video bandwidth to match variant's bandwidth."),o=t.bandwidth),e.g[r.id]=i,e.g[n.id]=o}}function Kl(e,t){var r=e.g[t];return null==r&&(r=0,re.error("Asking for bitrate of stream not given to the estimator")),0==r&&re.v("Using bitrate of 0, this stream won't affect progress"),r}function Hl(e){this.g=!1,this.h=new Pe,this.i=e}function Vl(e){var t,r=new Wl;_forEachInstanceProperty(t=e.periods).call(t,(function(e,t){var n=ql(e.variants);if(0==t)for(var i=(n=b(n.g)).next();!i.done;i=n.next())r.add(i.value);else!function(e,t){var r;e.g=_filterInstanceProperty(r=e.g).call(r,(function(e){return zl(t,e)}))}(r,n)}));for(var n=(e=b(e.periods)).next();!n.done;n=e.next()){var i;(n=n.value).variants=_filterInstanceProperty(i=n.variants).call(i,(function(e){return zl(r,new Gl(e))}))}}function Gl(e){var t=e.audio;e=e.video,this.h=t?t.mimeType:null,this.g=t?t.codecs.split(".")[0]:null,this.j=e?e.mimeType:null,this.i=e?e.codecs.split(".")[0]:null}function Wl(){this.g=[]}function zl(e,t){var r;return _someInstanceProperty(r=e.g).call(r,(function(e){return t.h==e.h&&t.g==e.g&&t.j==e.j&&t.i==e.i}))}function ql(e){for(var t=new Wl,r=(e=b(e)).next();!r.done;r=e.next())t.add(new Gl(r.value));return t}function Yl(e){var t=this;if(e&&e.constructor!=Ws)throw new ne(2,9,9008);this.h=this.g=null,e?(this.g=e.h,this.h=e.Yb()):(this.g=Us(),this.h=new et),this.j=!1,this.i=[],this.l=[];var r=!e;this.m=new Hl((function(){return I((function e(){var n;return V(e,(function(e){var i;switch(e.s){case 1:return n=function(){},x(e,_Promise.all(_mapInstanceProperty(i=t.l).call(i,(function(e){return e.then(n,n)}))),2);case 2:if(!r){e.I(3);break}return x(e,t.h.destroy(),3);case 3:t.g=null,t.h=null,M(e)}}))}))}))}function Xl(){if(St())e:{for(var e=b(_valuesInstanceProperty(fs).call(fs)),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Jl(e,t){for(var r=[],n=b(e.periods),i=n.next();!i.done;i=n.next())for(var o=(i=b(i.value.streams)).next();!o.done;o=i.next())o=o.value,t&&"video"==o.contentType?r.push({contentType:$t(o.mimeType,o.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=o.contentType||r.push({contentType:$t(o.mimeType,o.codecs),robustness:e.drmInfo.audioRobustness});return r}function Ql(e,t,r){return I((function n(){return V(n,(function(n){if(1===n.s)return x(n,function(e,t,r,n){return I((function i(){var o,a,s;return V(i,(function(i){var l;switch(i.s){case 1:return n.drmInfo?(o=function(e){var t,r=_Array$from(_keysInstanceProperty(t=e.g).call(t));if(!r.length)throw new ne(2,9,9e3,"No supported storage mechanisms found");return e.g.get(r[0]).getEmeSessionCell()}(r),a=_mapInstanceProperty(l=n.sessionIds).call(l,(function(e){return{sessionId:e,keySystem:n.drmInfo.keySystem,licenseUri:n.drmInfo.licenseServerUri,serverCertificate:n.drmInfo.serverCertificate,audioCapabilities:Jl(n,!1),videoCapabilities:Jl(n,!0)}})),x(i,Os(t,e,a),2)):i.return();case 2:return s=i.B,x(i,o.remove(s),3);case 3:return x(i,o.add(_filterInstanceProperty(a).call(a,(function(e){return-1==_indexOfInstanceProperty(s).call(s,e.sessionId)}))),0)}}))}))}(e.h,e.g.drm,r,t),0)}))}))}function Zl(e,t,r,n){function i(){s+=1,e.g.offline.progressCallback(l,s/a)}var o=function(e){var t,r=[];return _forEachInstanceProperty(t=e.periods).call(t,(function(e){var t;_forEachInstanceProperty(t=e.streams).call(t,(function(e){var t;null!=e.initSegmentKey&&r.push(e.initSegmentKey),_forEachInstanceProperty(t=e.segments).call(t,(function(e){r.push(e.dataKey)}))}))})),r}(n),a=o.length+1,s=0,l=Ll(r,n);return _Promise.all([t.removeSegments(o,i),t.removeManifests([r.key()],i)])}function ec(e,t,r,n,i,o){var a={id:o.id,originalId:o.originalId,primary:o.primary,presentationTimeOffset:o.presentationTimeOffset||0,contentType:o.type,mimeType:o.mimeType,codecs:o.codecs,frameRate:o.frameRate,pixelAspectRatio:o.pixelAspectRatio,kind:o.kind,language:o.language,label:o.label,width:o.width||null,height:o.height||null,initSegmentKey:null,encrypted:o.encrypted,keyId:o.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.$b();var s=o.id,l=o.initSegmentReference;return l&&(l=Ri(l.i(),l.h,l.g,e.g.streaming.retryParameters),Qa(t,s,l,.5*Kl(n,o.id),!0,(function(t){return I((function n(){var i;return V(n,(function(n){switch(n.s){case 1:return x(n,r.addSegments([{data:t}]),2);case 2:i=n.B,e.i.push(i[0]),a.initSegmentKey=i[0],M(n)}}))}))}))),function(e,t,r){for(var n=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);n;)r(n),n=e.getSegmentReference(++t)}(o,i,(function(i){var l=Ri(i.i(),i.h,i.g,e.g.streaming.retryParameters);Qa(t,s,l,function(e,t,r){return r=r.endTime-r.startTime,Kl(e,t)*r}(n,o.id,i),!1,(function(t){return I((function n(){var o;return V(n,(function(n){switch(n.s){case 1:return x(n,r.addSegments([{data:t}]),2);case 2:o=n.B,e.i.push(o[0]),a.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:o[0]}),M(n)}}))}))}))})),a}function tc(e){if(e.m.g)throw new ne(2,9,7001)}function rc(){if(!Xl())throw new ne(2,9,9e3)}function nc(e,t){return I((function r(){return V(r,(function(r){switch(r.s){case 1:return e.l.push(t),N(r,2),x(r,t,4);case 4:return r.return(r.B);case 2:L(r),Xe(e.l,t),U(r,0)}}))}))}function ic(e){var t,r,n=new _Set(_mapInstanceProperty(t=e.variants).call(t,(function(e){return e.video}))),i=new _Set(_mapInstanceProperty(r=e.variants).call(r,(function(e){return e.audio})));e=e.textStreams,1<n.size&&re.v("Multiple video tracks selected to be stored");for(var o=(n=b(i)).next();!o.done;o=n.next()){o=o.value;for(var a=b(i),s=a.next();!s.done;s=a.next())o!=(s=s.value)&&o.language==s.language&&re.v("Similar audio tracks were selected to be stored",o.id,s.id)}for(n=(i=b(e)).next();!n.done;n=i.next())for(n=n.value,a=(o=b(e)).next();!a.done;a=o.next())n!=(a=a.value)&&n.language==a.language&&re.v("Similar text tracks were selected to be stored",n.id,a.id)}Ws.LoadMode={DESTROYED:kl,NOT_LOADED:Nl,MEDIA_SOURCE:jl,SRC_EQUALS:Dl},Hl.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},Wl.prototype.add=function(e){zl(this,e)||this.g.push(e)},X("shaka.offline.Storage",Yl),Yl.support=Xl,Yl.prototype.destroy=function(){return this.m.destroy()},Yl.prototype.destroy=Yl.prototype.destroy,Yl.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Ds(e,t));var r=e,n=!1;return null!=r.trackSelectionCallback&&(n=!0,r.offline=r.offline||{},r.offline.trackSelectionCallback=r.trackSelectionCallback,delete r.trackSelectionCallback),null!=r.progressCallback&&(n=!0,r.offline=r.offline||{},r.offline.progressCallback=r.progressCallback,delete r.progressCallback),null!=r.usePersistentLicense&&(n=!0,r.offline=r.offline||{},r.offline.usePersistentLicense=r.usePersistentLicense,delete r.usePersistentLicense),n&&Jr("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Fs(this.g,e)},Yl.prototype.configure=Yl.prototype.configure,Yl.prototype.getConfiguration=function(){var e=Us();return Fs(e,this.g,Us()),e},Yl.prototype.getConfiguration=Yl.prototype.getConfiguration,Yl.prototype.Yb=function(){return this.h},Yl.prototype.getNetworkingEngine=Yl.prototype.Yb,Yl.prototype.store=function(e,t,r){var n=this;return nc(this,function(e,t,r,n){return I((function i(){var o,a,s,l,c,u,p,f,d;return V(i,(function(i){switch(i.s){case 1:return rc(),e.j?i.return(_Promise.reject(new ne(2,9,9006))):(e.j=!0,x(i,function(e,t,r){return I((function n(){var i,o,a,s,l,c;return V(n,(function(n){switch(n.s){case 1:return i=null,o=e.h,a={networkingEngine:o,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},x(n,r(),2);case 2:return(s=n.B).configure(e.g.manifest),tc(e),N(n,3),x(n,s.start(t,a),5);case 5:return l=n.B,tc(e),c=function(e){for(var t=new _Set,r=(e=b(e.periods)).next();!r.done;r=e.next()){for(var n=b((r=r.value).textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(n=(r=b(r.variants)).next();!n.done;n=r.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video)}return t}(l),x(n,_Promise.all(dt(c,(function(e){return e.createSegmentIndex()}))),6);case 6:if(tc(e),i)throw i;return n.return(l);case 3:return L(n),x(n,s.stop(),7);case 7:U(n,0)}}))}))}(e,t,n),2));case 2:if(o=i.B,tc(e),!(!o.presentationTimeline.aa()&&!o.presentationTimeline.ib()))throw new ne(2,9,9005,t);return a=null,s=new cs,c=l=null,k(i,3,4),x(i,function(e,t,r){return I((function n(){var i,o,a;return V(n,(function(n){switch(n.s){case 1:return i=new Ct({Ib:e.h,onError:r,Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o=qo(t.periods),a=e.g,i.configure(a.drm),x(n,function(e,t,r){return e.F=[],e.L=r,xt(e,t)}(i,o,a.offline.usePersistentLicense),2);case 2:return x(n,Mt(i),3);case 3:return x(n,kt(i),4);case 4:return n.return(i)}}))}))}(e,o,(function(e){c=c||e})),6);case 6:if(a=i.B,tc(e),c)throw c;return x(i,function(e,t,r){return I((function n(){var i,o;return V(n,(function(n){switch(n.s){case 1:return i={width:1/0,height:1/0},function(e,t,r){for(var n=(e=b(e.periods)).next();!n.done;n=e.next()){var i;(n=n.value).variants=_filterInstanceProperty(i=n.variants).call(i,(function(e){return zr.rd(e,t,r)}))}}(t,e.g.restrictions,i),function(e){for(var t=(e=b(e.periods)).next();!t.done;t=e.next()){var r;(t=t.value).variants=_filterInstanceProperty(r=t.variants).call(r,(function(e){var t=!0;return e.audio&&(t=t&&Ar(e.audio)),e.video&&(t=t&&Ar(e.video)),t}))}}(t),function(e,t){for(var r=b(e.periods),n=r.next();!n.done;n=r.next()){var i;(n=n.value).variants=_filterInstanceProperty(i=n.variants).call(i,(function(e){return Gt(t,e)}))}}(t,r),Vl(t),o=e.g.preferredAudioChannelCount,zr.$d(t,o),x(n,function(e,t){return I((function r(){var n,i,o,a;return V(r,(function(r){var s;switch(r.s){case 1:n=null,i=b(e.periods),o=i.next();case 2:if(o.done){r.I(0);break}return a=o.value,n&&(a.variants=_filterInstanceProperty(s=a.variants).call(s,(function(e){return zl(n,new Gl(e))}))),x(r,t(a),5);case 5:n=ql(a.variants),o=i.next(),r.I(2)}}))}))}(t,(function(t){return I((function r(){var n,i,o,a,s,l,c,u;return V(r,(function(r){var p,f;switch(r.s){case 1:n=zr,i=[];for(var d=b(t.variants),h=d.next();!h.done;h=d.next())o=h.value,i.push(n.Oc(o));for(h=(d=b(t.textStreams)).next();!h.done;h=d.next())a=h.value,i.push(n.Kc(a));return x(r,e.g.offline.trackSelectionCallback(i),2);case 2:for(s=r.B,l=new _Set,c=new _Set,h=(d=b(s)).next();!h.done;h=d.next())"variant"==(u=h.value).type&&l.add(u.id),"text"==u.type&&c.add(u.id);t.variants=_filterInstanceProperty(p=t.variants).call(p,(function(e){return l.has(e.id)})),t.textStreams=_filterInstanceProperty(f=t.textStreams).call(f,(function(e){return c.has(e.id)})),M(r)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new ne(2,4,4014);for(var t=(e=b(e.periods)).next();!t.done;t=e.next())ic(t.value)})(t),M(n)}}))}))}(e,o,a),7);case 7:return x(i,s.init(),8);case 8:return tc(e),x(i,function(e){var t,r=null;if(_forEachInstanceProperty(t=e.g).call(t,(function(e,t){var n;_forEachInstanceProperty(n=e.getCells()).call(n,(function(e,n){e.hasFixedKeySpace()||r||(r={path:{Ea:t,ja:n},ja:e})}))})),r)return r;throw new ne(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return l=i.B,tc(e),x(i,function(e,t,r,n,i,o){return I((function a(){var s,l,c,u,p,f,d,h,y,g;return V(a,(function(a){var $,m;switch(a.s){case 1:return s=function(e,t,r){var n=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.ha(),size:0,expiration:n,tracks:t=Ul(t.periods[0]),appMetadata:r}}(i,n,o),l=_someInstanceProperty($=n.periods).call($,(function(e){var t;return _someInstanceProperty(t=e.variants).call(t,(function(e){return e.drmInfos&&e.drmInfos.length}))})),c=_someInstanceProperty(m=n.periods).call(m,(function(e){var t;return _someInstanceProperty(t=e.variants).call(t,(function(e){var t;return _someInstanceProperty(t=e.drmInfos).call(t,(function(e){return e.initData&&e.initData.length}))}))})),p=null,(u=l&&!c)&&(f=r.g,p=oc.get(f.keySystem)),d=new Ja(e.h,(function(t,r){s.size=r,e.g.offline.progressCallback(s,t)}),(function(t,n){u&&e.g.offline.usePersistentLicense&&p==n&&Nt(r,"cenc",t)})),N(a,2),y=h=function(e,t,r,n,i,o,a){var s,l=new Fl,c=_mapInstanceProperty(s=i.periods).call(s,(function(n){return function(e,t,r,n,i,o){for(var a,s=b(o.variants),l=s.next();!l.done;l=s.next())Bl(n,l.value);for(s=b(o.textStreams),l=s.next();!l.done;l=s.next())n.g[l.value.id]=52;s=function(e){for(var t=new _Set,r=b(e.textStreams),n=r.next();!n.done;n=r.next())t.add(n.value);for(e=b(e.variants),r=e.next();!r.done;r=e.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video);return t}(o);var c=new _Map;for(s=b(s),l=s.next();!l.done;l=s.next()){var u=ec(e,t,r,n,i,l=l.value);c.set(l.id,u)}return _forEachInstanceProperty(a=o.variants).call(a,(function(e){e.audio&&c.get(e.audio.id).variantIds.push(e.id),e.video&&c.get(e.video.id).variantIds.push(e.id)})),{startTime:o.startTime,streams:_Array$from(_valuesInstanceProperty(c).call(c))}}(e,t,r,l,i,n)})),u=n.g,p=e.g.offline.usePersistentLicense;return u&&p&&(u.initData=[]),{originalManifestUri:o,duration:i.presentationTimeline.ha(),size:0,expiration:n.Xb(),periods:c,sessionIds:p?Lt(n):[],drmInfo:u,appMetadata:a}}(e,d,t,r,n,i,o),x(a,function(e){return I((function t(){return V(t,(function(t){var r;switch(t.s){case 1:return x(t,_Promise.all(_valuesInstanceProperty(r=e.h).call(r)),2);case 2:return t.return(e.g.g)}}))}))}(d),4);case 4:if(y.size=a.B,h.expiration=r.Xb(),g=Lt(r),h.sessionIds=e.g.offline.usePersistentLicense?g:[],l&&e.g.offline.usePersistentLicense&&!g.length)throw new ne(2,9,9007);return a.return(h);case 2:return L(a),x(a,d.destroy(),5);case 5:U(a,0)}}))}))}(e,l.ja,a,o,t,r),10);case 10:if(u=i.B,tc(e),c)throw c;return x(i,l.ja.addManifests([u]),11);case 11:return p=i.B,tc(e),f=new bs("manifest",l.path.Ea,l.path.ja,p[0]),i.return(Ll(f,u));case 4:return L(i),e.j=!1,e.i=[],x(i,s.destroy(),12);case 12:if(!a){i.I(13);break}return x(i,a.destroy(),13);case 13:U(i,0);break;case 3:if(d=D(i),!l){i.I(15);break}return x(i,l.ja.removeSegments(e.i,(function(){})),15);case 15:throw c||d}}))}))}(this,e,t||{},(function(){return I((function t(){var i,o;return V(t,(function(t){switch(t.s){case 1:return r&&"string"!=typeof r?(Jr("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=r,t.return(new i)):x(t,Ai.create(e,n.h,n.g.manifest.retryParameters,r),2);case 2:return o=t.B,t.return(o)}}))}))})))},Yl.prototype.store=Yl.prototype.store,Yl.prototype.Hf=function(){return this.j},Yl.prototype.getStoreInProgress=Yl.prototype.Hf,Yl.prototype.remove=function(e){return nc(this,function(e,t){return I((function r(){var n,i,o,a,s,l;return V(r,(function(r){switch(r.s){case 1:return rc(),null==(n=Ss(t))||"manifest"!=n.g?r.return(_Promise.reject(new ne(2,9,9004,t))):(i=n,o=new cs,N(r,2),x(r,o.init(),4));case 4:return x(r,us(o,i.Ea(),i.ja()),5);case 5:return x(r,(a=r.B).getManifests([i.key()]),6);case 6:return s=r.B,l=s[0],x(r,_Promise.all([Ql(e,l,o),Zl(e,a,i,l)]),2);case 2:return L(r),x(r,o.destroy(),8);case 8:U(r,0)}}))}))}(this,e))},Yl.prototype.remove=Yl.prototype.remove,Yl.prototype.sg=function(){return nc(this,function(e){return I((function t(){var r,n,i,o,a,s,l,c,u;return V(t,(function(t){switch(t.s){case 1:return rc(),r=e.h,n=e.g.drm,i=new cs,o=!1,N(t,2),x(t,i.init(),4);case 4:for(a=[],function(e,t){var r;_forEachInstanceProperty(r=e.g).call(r,(function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),s=_Promise.resolve(),l={},c=b(a),u=c.next();!u.done;l={Jc:l.Jc},u=c.next())l.Jc=u.value,s=s.then(function(e){return function(){return I((function t(){var i,a;return V(t,(function(t){switch(t.s){case 1:return x(t,e.Jc.getAll(),2);case 2:return i=t.B,x(t,Os(n,r,i),3);case 3:return a=t.B,x(t,e.Jc.remove(a),4);case 4:a.length!=i.length&&(o=!0),M(t)}}))}))}}(l));return x(t,s,2);case 2:return L(t),x(t,i.destroy(),6);case 6:U(t,3);break;case 3:return t.return(!o)}}))}))}(this))},Yl.prototype.removeEmeSessions=Yl.prototype.sg,Yl.prototype.list=function(){return nc(this,I((function e(){var t,r,n;return V(e,(function(e){switch(e.s){case 1:return rc(),t=[],r=new cs,N(e,2),x(e,r.init(),4);case 4:return n=_Promise.resolve(),function(e,t){var r;_forEachInstanceProperty(r=e.g).call(r,(function(e,r){var n;_forEachInstanceProperty(n=e.getCells()).call(n,(function(e,n){t({Ea:r,ja:n},e)}))}))}(r,(function(e,r){n=n.then((function(){return I((function n(){var i;return V(n,(function(n){switch(n.s){case 1:return x(n,r.getAllManifests(),2);case 2:i=n.B,_forEachInstanceProperty(i).call(i,(function(r,n){var i=Ll(new bs("manifest",e.Ea,e.ja,n),r);t.push(i)})),M(n)}}))}))}))})),x(e,n,2);case 2:return L(e),x(e,r.destroy(),6);case 6:U(e,3);break;case 3:return e.return(t)}}))})))},Yl.prototype.list=Yl.prototype.list,Yl.deleteAll=function(){return I((function e(){var t;return V(e,(function(e){switch(e.s){case 1:return t=new cs,N(e,2),x(e,t.erase(),2);case 2:return L(e),x(e,t.destroy(),5);case 5:U(e,0)}}))}))};var oc=(new _Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Ys.offline=Xl,X("shaka.polyfill.installAll",(function(){for(var e=0;e<lc.length;++e)try{lc[e].Xe()}catch(e){re.ba("Error installing polyfill!",e)}}));var ac,sc,lc=[];function cc(e,t){for(var r={priority:t=t||0,Xe:e},n=0;n<lc.length;n++)if(lc[n].priority<t)return void _spliceInstanceProperty(lc).call(lc,n,0,r);lc.push(r)}function uc(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var r=new Event(t,e);else(r=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(r)}function pc(e,t,r){if("input"==e&&"range"===this.type)e="change";HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,r)}function fc(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var r=[],n=0;n<arguments.length;++n)r[n]=arguments[n];return(r=e.apply(this,r)).abort=function(){},r}}function dc(e,t){re.debug("PatchedMediaKeysApple.requestMediaKeySystemAccess");try{var r=new hc(e,t);return _Promise.resolve(r)}catch(e){return _Promise.reject(e)}}function hc(e,t){if(re.debug("PatchedMediaKeysApple.MediaKeySystemAccess"),this.keySystem=e,_startsWithInstanceProperty(e).call(e,"com.apple.fps"))for(var r=b(t),n=r.next();!n.done;n=r.next()){var i=n.value;if("required"==i.persistentState)n=null;else{n={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var o=!1,a=!1;if(i.audioCapabilities)for(var s=b(i.audioCapabilities),l=s.next();!l.done;l=s.next())if((l=l.value).contentType){o=!0;var c=l.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,c)&&(n.audioCapabilities.push(l),a=!0)}if(i.videoCapabilities)for(l=(i=b(i.videoCapabilities)).next();!l.done;l=i.next())(s=l.value).contentType&&(o=!0,l=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(n.videoCapabilities.push(s),a=!0));o||(a=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),n=a?n:null}if(n)return void(this.g=n)}throw(r=Error("Unsupported keySystem")).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function yc(e){re.debug("PatchedMediaKeysApple.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&$c(t,null),delete this.mediaKeys,(this.mediaKeys=e)?$c(e,this):_Promise.resolve()}function gc(e){re.debug("PatchedMediaKeysApple.MediaKeys"),this.h=new WebKitMediaKeys(e),this.g=new lt}function $c(e,t){if(e.g.nb(),!t)return _Promise.resolve();e.g.H(t,"webkitneedkey",vc);try{return Zo(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),_Promise.resolve()}catch(e){return _Promise.reject(e)}}function mc(e){re.debug("PatchedMediaKeysApple.MediaKeySession"),ze.call(this),this.h=null,this.l=e,this.i=this.g=null,this.j=new lt,this.sessionId="",this.expiration=NaN,this.closed=new Pe,this.keyStatuses=new Sc}function vc(e){if(re.debug("PatchedMediaKeysApple.onWebkitNeedKey_",e),e=new Uint8Array(e.initData),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Te(e=we(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=e,this.dispatchEvent(t)}function bc(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.g=t,e.dispatchEvent(new Ge("keystatuseschange"))}function Sc(){this.size=0,this.g=void 0}function Ic(e,t){re.debug("PatchedMediaKeysMs.requestMediaKeySystemAccess");try{var r=new Pc(e,t);return _Promise.resolve(r)}catch(e){return _Promise.reject(e)}}function Pc(e,t){re.debug("PatchedMediaKeysMs.MediaKeySystemAccess"),this.keySystem=e;for(var r=!1,n=0;n<t.length;++n){var i=t[n],o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},a=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var l=i.audioCapabilities[s];if(l.contentType){a=!0;var c=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,c)&&(o.audioCapabilities.push(l),r=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(l=i.videoCapabilities[s]).contentType&&(a=!0,c=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,c)&&(o.videoCapabilities.push(l),r=!0));if(a||(r=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(r=!1),r)return void(this.g=o)}throw(r=Error("Unsupported keySystem")).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function _c(e){re.debug("PatchedMediaKeysMs.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Ec(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Ec(e,this):_Promise.resolve()}function wc(e){re.debug("PatchedMediaKeysMs.MediaKeys"),this.h=new MSMediaKeys(e),this.g=new lt}function Ec(e,t){if(e.g.nb(),!t)return _Promise.resolve();e.g.H(t,"msneedkey",Oc);try{return Zo(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.msSetMediaKeys(e.h)})),_Promise.resolve()}catch(e){return _Promise.reject(e)}}function Tc(e){re.debug("PatchedMediaKeysMs.MediaKeySession"),ze.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new lt,this.sessionId="",this.expiration=NaN,this.closed=new Pe,this.keyStatuses=new Cc}function Oc(e){if(re.debug("PatchedMediaKeysMs.onMsNeedKey_",e),e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=function(e){if(!e)return e;var t=new Qn(e);if(1>=t.data.length)return e;e=[];for(var r={},n=(t=b(t.data)).next();!n.done;r={yc:r.yc},n=t.next())r.yc=n.value,_someInstanceProperty(e).call(e,function(e){return function(t){return Re.Ha(t,e.yc)}}(r))||e.push(r.yc);return _concatInstanceProperty(Re).apply(Re,e instanceof Array?e:function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(b(e)))}(e.initData).buffer,this.dispatchEvent(t)}}function Ac(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.g=t,e.dispatchEvent(new Ge("keystatuseschange"))}function Cc(){this.size=0,this.g=void 0}function Rc(){return re.debug("PatchedMediaKeysNop.requestMediaKeySystemAccess"),_Promise.reject(Error("The key system specified is not supported."))}function xc(e){return re.debug("PatchedMediaKeysNop.setMediaKeys"),null==e?_Promise.resolve():_Promise.reject(Error("MediaKeys not supported."))}function Mc(){throw new TypeError("Illegal constructor.")}function kc(){throw new TypeError("Illegal constructor.")}X("shaka.polyfill.register",cc),cc((function(){qu()}),-1),cc((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(_Object$defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),_Object$defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",uc),document.addEventListener("webkitfullscreenerror",uc),document.addEventListener("mozfullscreenchange",uc),document.addEventListener("mozfullscreenerror",uc),document.addEventListener("MSFullscreenChange",uc),document.addEventListener("MSFullscreenError",uc)}})),cc((function(){re.debug("InputEvent.install"),Et("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(re.info("Patching input event support on IE."),HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=pc)})),cc((function(){navigator.languages||_Object$defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),cc((function(){re.debug("mathRound.install")})),cc((function(){re.debug("MediaSource.install");var t=wt();e.MediaSource?e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(re.info("Patching Chromecast MSE bugs."),function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var r=t.split(/ *; */);return r.shift(),_someInstanceProperty(r).call(r,(function(e){return _startsWithInstanceProperty(e).call(e,"codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}()):t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(re.info("Patching Safari 11 & 12 MSE bugs."),fc(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,r){return e.call(this,t,r-.001)}}()):(re.info("Patching Safari 13 MSE bugs."),fc())):Et("Tizen 2")||Et("Tizen 3")||Et("Tizen 4")?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=vt(t)[0]&&e(t)}}():re.info("Using native MSE as-is."):re.info("No MSE implementation available.")})),hc.prototype.createMediaKeys=function(){re.debug("PatchedMediaKeysApple.MediaKeySystemAccess.createMediaKeys");var e=new gc(this.keySystem);return _Promise.resolve(e)},hc.prototype.getConfiguration=function(){return re.debug("PatchedMediaKeysApple.MediaKeySystemAccess.getConfiguration"),this.g},gc.prototype.createSession=function(e){if(re.debug("PatchedMediaKeysApple.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new mc(this.h)},gc.prototype.setServerCertificate=function(e){return re.debug("PatchedMediaKeysApple.MediaKeys.setServerCertificate"),_Promise.resolve(!0)},J(mc,ze),(p=mc.prototype).generateRequest=function(e,t){re.debug("PatchedMediaKeysApple.MediaKeySession.generateRequest"),this.g=new Pe;try{var r,n,i;this.h=this.l.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.h.sessionId||"",this.j.H(this.h,"webkitkeymessage",_bindInstanceProperty(r=this.Gg).call(r,this)),this.j.H(this.h,"webkitkeyadded",_bindInstanceProperty(n=this.Eg).call(n,this)),this.j.H(this.h,"webkitkeyerror",_bindInstanceProperty(i=this.Fg).call(i,this)),bc(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},p.load=function(){return re.debug("PatchedMediaKeysApple.MediaKeySession.load"),_Promise.reject(Error("MediaKeySession.load not yet supported"))},p.update=function(e){re.debug("PatchedMediaKeysApple.MediaKeySession.update"),this.i=new Pe;try{this.h.update(new Uint8Array(e))}catch(e){this.i.reject(e)}return this.i},p.close=function(){re.debug("PatchedMediaKeysApple.MediaKeySession.close");try{this.h.close(),this.closed.resolve(),this.j.nb()}catch(e){this.closed.reject(e)}return this.closed},p.remove=function(){return re.debug("PatchedMediaKeysApple.MediaKeySession.remove"),_Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},p.Gg=function(e){re.debug("PatchedMediaKeysApple.onWebkitKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new Ge("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},p.Eg=function(e){re.debug("PatchedMediaKeysApple.onWebkitKeyAdded_",e),this.i&&(bc(this,"usable"),this.i.resolve(),this.i=null)},p.Fg=function(e){if(re.debug("PatchedMediaKeysApple.onWebkitKeyError_",e),(e=Error("EME PatchedMediaKeysApple key error")).errorCode=this.h.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.i)this.i.reject(e),this.i=null;else switch(this.h.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:bc(this,"output-not-allowed");break;default:bc(this,"internal-error")}},(p=Sc.prototype).forEach=function(e){this.g&&e(this.g,ac)},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=ac;return!(!this.g||!Re.Ha(new Uint8Array(e),new Uint8Array(t)))},p.entries=function(){},p.keys=function(){},p.values=function(){},cc((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(re.info("Using Apple-prefixed EME"),ac=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yc,e.MediaKeys=gc,e.MediaKeySystemAccess=hc,navigator.requestMediaKeySystemAccess=dc)})),Pc.prototype.createMediaKeys=function(){re.debug("PatchedMediaKeysMs.MediaKeySystemAccess.createMediaKeys");var e=new wc(this.keySystem);return _Promise.resolve(e)},Pc.prototype.getConfiguration=function(){return re.debug("PatchedMediaKeysMs.MediaKeySystemAccess.getConfiguration"),this.g},wc.prototype.createSession=function(e){if(re.debug("PatchedMediaKeysMs.MediaKeys.createSession"),"temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Tc(this.h)},wc.prototype.setServerCertificate=function(){return re.debug("PatchedMediaKeysMs.MediaKeys.setServerCertificate"),_Promise.resolve(!1)},J(Tc,ze),(p=Tc.prototype).generateRequest=function(e,t){re.debug("PatchedMediaKeysMs.MediaKeySession.generateRequest"),this.g=new Pe;try{var r,n,i;this.i=this.l.createSession("video/mp4",new Uint8Array(t),null),this.j.H(this.i,"mskeymessage",_bindInstanceProperty(r=this.dg).call(r,this)),this.j.H(this.i,"mskeyadded",_bindInstanceProperty(n=this.bg).call(n,this)),this.j.H(this.i,"mskeyerror",_bindInstanceProperty(i=this.cg).call(i,this)),Ac(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},p.load=function(){return re.debug("PatchedMediaKeysMs.MediaKeySession.load"),_Promise.reject(Error("MediaKeySession.load not yet supported"))},p.update=function(e){re.debug("PatchedMediaKeysMs.MediaKeySession.update"),this.h=new Pe;try{this.i.update(new Uint8Array(e))}catch(e){this.h.reject(e)}return this.h},p.close=function(){re.debug("PatchedMediaKeysMs.MediaKeySession.close");try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(e){this.closed.reject(e)}return this.closed},p.remove=function(){return re.debug("PatchedMediaKeysMs.MediaKeySession.remove"),_Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},p.dg=function(e){re.debug("PatchedMediaKeysMs.onMsKeyMessage_",e),this.g&&(this.g.resolve(),this.g=null),this.dispatchEvent(new Ge("message",{messageType:null==this.keyStatuses.g?"license-request":"license-renewal",message:e.message.buffer}))},p.bg=function(e){re.debug("PatchedMediaKeysMs.onMsKeyAdded_",e),this.g?(re.debug("Simulating completion for a PR persistent license."),Ac(this,"usable"),this.g.resolve(),this.g=null):this.h&&(Ac(this,"usable"),this.h.resolve(),this.h=null)},p.cg=function(e){if(re.debug("PatchedMediaKeysMs.onMsKeyError_",e),(e=Error("EME PatchedMediaKeysMs key error")).errorCode=this.i.error,null!=this.g)this.g.reject(e),this.g=null;else if(null!=this.h)this.h.reject(e),this.h=null;else switch(this.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ac(this,"output-not-allowed");break;default:Ac(this,"internal-error")}},(p=Cc.prototype).forEach=function(e){this.g&&e(this.g,sc)},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=sc;return!(!this.g||!Re.Ha(new Uint8Array(e),new Uint8Array(t)))},p.entries=function(){},p.keys=function(){},p.values=function(){},cc((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(re.info("Using ms-prefixed EME v20140218"),sc=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=_c,e.MediaKeys=wc,e.MediaKeySystemAccess=Pc,navigator.requestMediaKeySystemAccess=Ic)})),Mc.prototype.createSession=function(){},Mc.prototype.setServerCertificate=function(){},kc.prototype.getConfiguration=function(){},kc.prototype.createMediaKeys=function(){},cc((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(re.info("EME not available."),navigator.requestMediaKeySystemAccess=Rc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xc,e.MediaKeys=Mc,e.MediaKeySystemAccess=kc)}),-10);var Nc,jc="";function Dc(e){return jc?jc+e.charAt(0).toUpperCase()+_sliceInstanceProperty(e).call(e,1):e}function Lc(e,t){re.debug("PatchedMediaKeysWebkit.requestMediaKeySystemAccess");try{var r=new Fc(e,t);return _Promise.resolve(r)}catch(e){return _Promise.reject(e)}}function Uc(e){re.debug("PatchedMediaKeysWebkit.setMediaKeys");var t=this.mediaKeys;return t&&t!=e&&Kc(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Kc(e,this),_Promise.resolve()}function Fc(e,t){re.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess"),this.g=this.keySystem=e;var r=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",r=!1);var n=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var o=0;o<t.length;++o){var a=t[o],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:a.initDataTypes,sessionTypes:["temporary"],label:a.label},l=!1;if(a.audioCapabilities)for(var c=0;c<a.audioCapabilities.length;++c){var u=a.audioCapabilities[c];if(u.contentType){l=!0;var p=u.contentType.split(";")[0];i.canPlayType(p,this.g)&&(s.audioCapabilities.push(u),n=!0)}}if(a.videoCapabilities)for(c=0;c<a.videoCapabilities.length;++c)(u=a.videoCapabilities[c]).contentType&&(l=!0,i.canPlayType(u.contentType,this.g)&&(s.videoCapabilities.push(u),n=!0));if(l||(n=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(r?(s.persistentState="required",s.sessionTypes=["persistent-license"]):n=!1),n)return void(this.h=s)}throw r="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(r="None of the requested configurations were supported."),(r=Error(r)).name="NotSupportedError",r.code=DOMException.NOT_SUPPORTED_ERR,r}function Bc(e){re.debug("PatchedMediaKeysWebkit.MediaKeys"),this.l=e,this.h=null,this.g=new lt,this.i=[],this.j={}}function Kc(e,t){var r,n,i,o;e.h=t,e.g.nb();var a=jc;t&&(e.g.H(t,a+"needkey",_bindInstanceProperty(r=e.hg).call(r,e)),e.g.H(t,a+"keymessage",_bindInstanceProperty(n=e.Jg).call(n,e)),e.g.H(t,a+"keyadded",_bindInstanceProperty(i=e.Hg).call(i,e)),e.g.H(t,a+"keyerror",_bindInstanceProperty(o=e.Ig).call(o,e)))}function Hc(e,t){var r=e.j[t];return r?(re.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",r),r):(r=e.i.shift())?(r.sessionId=t,e.j[t]=r,re.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_",r),r):null}function Vc(e,t,r){re.debug("PatchedMediaKeysWebkit.MediaKeySession"),ze.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=r,this.sessionId="",this.expiration=NaN,this.closed=new Pe,this.keyStatuses=new zc}function Gc(e,t,r){if(e.m)return _Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(r)var n=new Uint8Array(Te("LOAD_SESSION|"+r));else{var i=Te("PERSISTENT|"),o=new Uint8Array(i.byteLength+t.byteLength);o.set(new Uint8Array(i),0),o.set(new Uint8Array(t),i.byteLength),n=o}else n=new Uint8Array(t)}catch(e){return _Promise.reject(e)}e.h=new Pe;var a=Dc("generateKeyRequest");try{e.j[a](e.i,n)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,_Promise.reject(t);new je((function(){try{e.j[a](e.i,n)}catch(t){e.h.reject(t),e.h=null}})).V(.01)}return e.h}function Wc(e,t){var r=e.keyStatuses;r.size=null==t?0:1,r.g=t,e.dispatchEvent(new Ge("keystatuseschange"))}function zc(){this.size=0,this.g=void 0}function qc(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Yc(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,_Promise.resolve()):_Promise.reject(Error("PiP not allowed by video element"))}function Xc(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,_Promise.resolve()):_Promise.reject(Error("No picture in picture element found"))}function Jc(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Qc(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Zc(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function eu(t,r,n){return new e.TextTrackCue(t,r,n)}function tu(t,r,n){return new e.TextTrackCue(t+"-"+r+"-"+n,t,r,n)}function ru(){}Fc.prototype.createMediaKeys=function(){re.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.createMediaKeys");var e=new Bc(this.g);return _Promise.resolve(e)},Fc.prototype.getConfiguration=function(){return re.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.getConfiguration"),this.h},(p=Bc.prototype).createSession=function(e){if(re.debug("PatchedMediaKeysWebkit.MediaKeys.createSession"),"temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Vc(t,this.l,e),this.i.push(e),e},p.setServerCertificate=function(){return re.debug("PatchedMediaKeysWebkit.MediaKeys.setServerCertificate"),_Promise.resolve(!1)},p.hg=function(e){re.debug("PatchedMediaKeysWebkit.onWebkitNeedKey_",e);var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",e.initData instanceof ArrayBuffer?t.initData=e.initData:t.initData=e.initData.buffer,this.h.dispatchEvent(t)},p.Jg=function(e){re.debug("PatchedMediaKeysWebkit.onWebkitKeyMessage_",e);var t=Hc(this,e.sessionId);t?(e=new Ge("message",{messageType:null==t.keyStatuses.g?"licenserequest":"licenserenewal",message:e.message}),re.debug("PatchedMediaKeysWebkit.MediaKeySession.generated"),t.h&&(t.h.resolve(),t.h=null),t.dispatchEvent(e)):re.error("Session not found",e.sessionId)},p.Hg=function(e){re.debug("PatchedMediaKeysWebkit.onWebkitKeyAdded_",e),(e=Hc(this,e.sessionId))&&(re.debug("PatchedMediaKeysWebkit.MediaKeySession.ready"),Wc(e,"usable"),e.g&&e.g.resolve(),e.g=null)},p.Ig=function(e){re.debug("PatchedMediaKeysWebkit.onWebkitKeyError_",e);var t=Hc(this,e.sessionId);t&&t.handleError(e)},J(Vc,ze),(p=Vc.prototype).handleError=function(e){re.debug("PatchedMediaKeysWebkit.MediaKeySession.handleError",e);var t=Error("EME v0.1b key error"),r=e.errorCode;r.systemCode=e.systemCode,t.errorCode=r,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Wc(this,"output-restricted"):Wc(this,1==t?"expired":"internal-error"))},p.Qd=function(e,t){var r,n;if(this.g)this.g.then(_bindInstanceProperty(r=this.Qd).call(r,this,e,t)).catch(_bindInstanceProperty(n=this.Qd).call(n,this,e,t));else{if(this.g=e,"webkit-org.w3.clearkey"==this.i){var i=_e(t),o=JSON.parse(i);"oct"!=_keysInstanceProperty(o)[0].kty&&(this.g.reject(Error("Response is not a valid JSON Web Key Set.")),this.g=null),i=Re.Ja(_keysInstanceProperty(o)[0].k),o=Re.Ja(_keysInstanceProperty(o)[0].kid)}else i=new Uint8Array(t),o=null;var a=Dc("addKey");try{this.j[a](this.i,i,o,this.sessionId)}catch(e){this.g.reject(e),this.g=null}}},p.generateRequest=function(e,t){return re.debug("PatchedMediaKeysWebkit.MediaKeySession.generateRequest"),Gc(this,t,null)},p.load=function(e){return re.debug("PatchedMediaKeysWebkit.MediaKeySession.load"),"persistent-license"==this.l?Gc(this,null,e):_Promise.reject(Error("Not a persistent session."))},p.update=function(e){re.debug("PatchedMediaKeysWebkit.MediaKeySession.update",e);var t=new Pe;return this.Qd(t,e),t},p.close=function(){if(re.debug("PatchedMediaKeysWebkit.MediaKeySession.close"),"persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Dc("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},p.remove=function(){return re.debug("PatchedMediaKeysWebkit.MediaKeySession.remove"),"persistent-license"!=this.l?_Promise.reject(Error("Not a persistent session.")):this.close()},(p=zc.prototype).forEach=function(e){this.g&&e(this.g,Nc)},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=Nc;return!(!this.g||!Re.Ha(new Uint8Array(e),new Uint8Array(t)))},p.entries=function(){},p.keys=function(){},p.values=function(){},cc((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)re.info("Using webkit-prefixed EME v0.1b"),jc="webkit";else{if(!HTMLMediaElement.prototype.generateKeyRequest)return;re.info("Using nonprefixed EME v0.1b")}Nc=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=Lc,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Uc,e.MediaKeys=Bc,e.MediaKeySystemAccess=Fc}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(re.debug("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Yc,_Object$defineProperty(t,"disablePictureInPicture",{get:Jc,set:Qc,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Xc,document.addEventListener("webkitpresentationmodechanged",qc,!0))}})),cc((function(){if(re.debug("VideoPlayPromise.install"),e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),cc((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Zc)}})),cc((function(){if(e.VTTCue)re.info("Using native VTTCue.");else if(e.TextTrackCue){var t=TextTrackCue.length;if(3==t)re.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=eu;else if(6==t)re.info("Using VTTCue polyfill from 6 argument TextTrackCue."),e.VTTCue=tu;else{try{var r=!!eu(1,2,"")}catch(e){r=!1}r&&(re.info("Using VTTCue polyfill from 3 argument TextTrackCue."),e.VTTCue=eu)}}else re.error("VTTCue not available.")})),X("shaka.text.TtmlTextParser",ru),ru.prototype.parseInit=function(){},ru.prototype.parseInit=ru.prototype.parseInit,ru.prototype.parseMedia=function(e,t){var r=_e(e),n=[],i=new DOMParser,o=null;if(""==r)return n;try{o=i.parseFromString(r,"text/xml")}catch(e){throw new ne(2,2,2005,"Failed to parse TTML.")}if(o){if(r=o.getElementsByTagName("parsererror")[0])throw new ne(2,2,2005,r.textContent);if(!(i=o.getElementsByTagName("tt")[0]))throw new ne(2,2,2005,"TTML does not contain <tt> tag.");var a=Zn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Zn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Zn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),c=Zn.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(o=i.getAttribute("xml:space")||"default",r=Zn.getAttributeNS(i,"http://www.w3.org/ns/ttml#styling","extent"),"default"!=o&&"preserve"!=o)throw new ne(2,2,2005,"Invalid xml:space value: "+o);o="default"==o,a=new Ou(a,s,l,c),s=gu(i.getElementsByTagName("metadata")[0]),l=gu(i.getElementsByTagName("styling")[0]),c=gu(i.getElementsByTagName("layout")[0]);for(var u=[],p=0;p<c.length;p++){var f,d,h=c[p],y=l,g=r,$=new vr,m=h.getAttribute("xml:id");if(m)$.id=m,m=null,g&&(m=ou.exec(g)||su.exec(g)),g=m?Number(m[1]):null,m=m?Number(m[2]):null,(f=Iu(h,y,"extent"))&&(null!=(f=(d=ou.exec(f))||su.exec(f))&&($.width=null!=g?100*Number(f[1])/g:Number(f[1]),$.height=null!=m?100*Number(f[2])/m:Number(f[2]),$.widthUnits=d||null!=g?br:0,$.heightUnits=d||null!=m?br:0)),(h=Iu(h,y,"origin"))&&(null!=(f=(d=ou.exec(h))||su.exec(h))&&($.viewportAnchorX=null!=g?100*Number(f[1])/g:Number(f[1]),$.viewportAnchorY=null!=m?100*Number(f[2])/m:Number(f[2]),$.viewportAnchorUnits=d||null!=g?br:0));else re.v("TtmlTextParser parser encountered a region with no id. Region will be ignored."),$=null;$&&u.push($)}for(r=$u(i.getElementsByTagName("body")[0]),i=(r=b(r)).next();!i.done;i=r.next())(i=vu(i.value,t.periodStart,a,s,l,c,u,o,!1))&&n.push(i)}return n},ru.prototype.parseMedia=ru.prototype.parseMedia;var nu,iu,ou=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,au=/^(\d+px|\d+em)$/,su=/^(\d+)px (\d+)px$/,lu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,cu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,uu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pu=/^(\d*(?:\.\d*)?)f$/,fu=/^(\d*(?:\.\d*)?)t$/,du=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,hu={left:hr,center:"center",right:"end",start:hr,end:"end"},yu={left:"line-left",center:"center",right:"line-right"};function gu(e){var t=[];if(!e)return t;for(var r=b(e.childNodes),n=r.next();!n.done;n=r.next())(n=n.value).nodeType==Node.ELEMENT_NODE&&"br"!==n.nodeName&&(n=gu(n),t=_concatInstanceProperty(t).call(t,n));return t.length||t.push(e),t}function $u(e){if(!e)return[];for(var t=[],r=(e=b(e.childNodes)).next();!r.done;r=e.next())(r=r.value)instanceof Element&&(r.hasAttribute("begin")?t.push(r):t=_concatInstanceProperty(t).call(t,$u(r)));return t}function mu(e,t){for(var r="",n=b(e.childNodes),i=n.next();!i.done;i=n.next()){var o;"br"==(i=i.value).nodeName&&e.childNodes[0]!==i?r+="\n":i.childNodes&&0<i.childNodes.length?r+=mu(i,t):t?r+=i=(i=_trimInstanceProperty(o=i.textContent).call(o)).replace(/\s+/g," "):r+=i.textContent}return r}function vu(e,t,r,n,i,o,a,s,l){var c;if(l&&"br"==e.nodeName)return(e=new or(0,0,"")).spacer=!0,e;var u=/^[\s\n]*$/.test(e.textContent),p=e.nodeType==Node.ELEMENT_NODE&&!e.hasAttribute("begin")&&!e.hasAttribute("end");if(e.nodeType!=Node.ELEMENT_NODE||p&&u||p&&!l)return null;s="default"==(e.getAttribute("xml:space")||(s?"default":"preserve")),u=Eu(e.getAttribute("begin"),r),p=Eu(e.getAttribute("end"),r);var f=Eu(e.getAttribute("dur"),r);if(null==p&&null!=f&&(p=u+f),!l&&(null==u||null==p))throw new ne(2,2,2001);if(u=l&&null==u?0:u+t,p=l&&null==p?0:p+t,f="",l=[],_findInstanceProperty(c=_Array$from(e.childNodes)).call(c,(function(e){return e.nodeType===Node.TEXT_NODE&&/\S+/.test(e.textContent)})))f=mu(e,s);else for(var d=b(e.childNodes),h=d.next();!h.done;h=d.next())(h=vu(h.value,t,r,n,i,o,a,s,!0))&&(h.startTime=h.startTime||u,h.endTime=h.endTime||p,l.push(h));if((t=new or(u,p,f)).nestedCues=l,(o=wu(e,"region",o,"")[0])&&o.getAttribute("xml:id")){var y=o.getAttribute("xml:id");t.region=_filterInstanceProperty(a).call(a,(function(e){return e.id==y}))[0]}return function(e,t,r,n,i){"rtl"==Su(t,r,i,"direction")&&(e.direction="rtl");var o=Su(t,r,i,"writingMode");"tb"==o||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=pr),(o=Su(t,r,i,"textAlign"))?(e.positionAlign=yu[o],e.lineAlign=hu[o],e.textAlign=lr[o.toUpperCase()]):e.textAlign="start",(o=Su(t,r,i,"displayAlign"))&&(e.displayAlign=ur[o.toUpperCase()]);(o=Su(t,r,i,"color"))&&(e.color=o);(o=Su(t,r,i,"backgroundColor"))&&(e.backgroundColor=o);(o=Su(t,r,i,"fontFamily"))&&(e.fontFamily=o);(o=Su(t,r,i,"fontWeight"))&&"bold"==o&&(e.fontWeight=700),(o=Su(t,r,i,"wrapOption"))&&"noWrap"==o&&(e.wrapLine=!1),(o=Su(t,r,i,"lineHeight"))&&o.match(au)&&(e.lineHeight=o),(o=Su(t,r,i,"fontSize"))&&o.match(au)&&(e.fontSize=o),(o=Su(t,r,i,"fontStyle"))&&(e.fontStyle=mr[o.toUpperCase()]);if(n){var a;o=n.getAttribute("imageType")||n.getAttribute("imagetype");var s=n.getAttribute("encoding");n=_trimInstanceProperty(a=n.textContent).call(a),"PNG"==o&&"Base64"==s&&n&&(e.backgroundImage="data:image/png;base64,"+n)}(r=Iu(r,i,"textDecoration"))&&bu(e,r),(t=Pu(t,i,"textDecoration"))&&bu(e,t)}(t,e,o,n=wu(e,"backgroundImage",n,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0],i),t}function bu(e,t){for(var r,n,i,o,a,s,l=t.split(" "),c=0;c<l.length;c++)switch(l[c]){case"underline":_includesInstanceProperty(r=e.textDecoration).call(r,"underline")||e.textDecoration.push("underline");break;case"noUnderline":_includesInstanceProperty(n=e.textDecoration).call(n,"underline")&&Xe(e.textDecoration,"underline");break;case"lineThrough":_includesInstanceProperty(i=e.textDecoration).call(i,"lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":_includesInstanceProperty(o=e.textDecoration).call(o,"lineThrough")&&Xe(e.textDecoration,"lineThrough");break;case"overline":_includesInstanceProperty(a=e.textDecoration).call(a,"overline")||e.textDecoration.push("overline");break;case"noOverline":_includesInstanceProperty(s=e.textDecoration).call(s,"overline")&&Xe(e.textDecoration,"overline")}}function Su(e,t,r,n){return(e=Pu(e,r,n))?e:Iu(t,r,n)}function Iu(e,t,r){if(!e)return null;for(var n=gu(e),i=0;i<n.length;i++){var o=Zn.getAttributeNS(n[i],"http://www.w3.org/ns/ttml#styling",r);if(o)return o}return _u(e,t,r)}function Pu(e,t,r){var n=Zn.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",r);return n||_u(e,t,r)}function _u(e,t,r){e=wu(e,"style",t,"");for(var n=null,i=0;i<e.length;i++){var o=Zn.getAttributeNS(e[i],"http://www.w3.org/ns/ttml#styling",r);o||(o=Pu(e[i],t,r)),o&&(n=o)}return n}function wu(e,t,r,n,i){var o=[];if(!e||1>r.length)return o;var a=e;for(e=null;a&&!(e=i?Zn.getAttributeNS(a,i,t):a.getAttribute(t))&&(a=a.parentNode)instanceof Element;);if(t=e)for(i=(t=b(t=t.split(" "))).next();!i.done;i=t.next())for(i=i.value,a=(e=b(r)).next();!a.done;a=e.next())if(n+(a=a.value).getAttribute("xml:id")==i){o.push(a);break}return o}function Eu(e,t){var r=null;if(lu.test(e)){r=lu.exec(e);var n=Number(r[1]),i=Number(r[2]),o=Number(r[3]),a=Number(r[4]);r=(o+=(a+=(Number(r[5])||0)/t.h)/t.frameRate)+60*i+3600*n}else cu.test(e)?r=Tu(cu,e):uu.test(e)?r=Tu(uu,e):pu.test(e)?(r=pu.exec(e),r=Number(r[1])/t.frameRate):fu.test(e)?(r=fu.exec(e),r=Number(r[1])/t.g):du.test(e)&&(r=Tu(du,e));return r}function Tu(e,t){var r=e.exec(t);return null==r||""==r[0]?null:(Number(r[4])||0)/1e3+(Number(r[3])||0)+60*(Number(r[2])||0)+3600*(Number(r[1])||0)}function Ou(e,t,r,n){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(n),0==this.g&&(this.g=e?this.frameRate*this.h:1),r&&(e=/^(\d+) (\d+)$/g.exec(r))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function Au(){this.g=new ru}function Cu(){}function Ru(e,t,r){var n;if(n=/^align:(start|middle|center|end|left|right)$/.exec(t))t=n[1],e.textAlign="middle"==t?sr:lr[t.toUpperCase()];else if(n=/^vertical:(lr|rl)$/.exec(t))e.writingMode="lr"==n[1]?"vertical-lr":"vertical-rl";else if(n=/^size:([\d.]+)%$/.exec(t))e.size=Number(n[1]);else if(n=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))e.position=Number(n[1]),n[2]&&(t=n[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center");else{if(!(n=/^region:(.*)$/.exec(t))){e:{if(r=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))e.lineInterpretation=1,e.line=Number(r[1]),r[2]&&(e.lineAlign=yr[r[2].toUpperCase()]);else{if(!(r=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))){e=!1;break e}e.lineInterpretation=dr,e.line=Number(r[1]),r[2]&&(e.lineAlign=yr[r[2].toUpperCase()])}e=!0}return e}(t=function(e,t){var r=_filterInstanceProperty(e).call(e,(function(e){return e.id==t}));return r.length?r[0]:(re.v("VTT parser could not find a region with id: ",t," The region will be ignored."),null)}(r,n[1]))&&(e.region=t)}return!0}function xu(e){if(null==(e=Yi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),r=Number(e[3]);return 59<t||59<r?null:Number(e[4])/1e3+r+60*t+3600*(Number(e[1])||0)}function Mu(){this.g=null}function ku(e,t,r){var n,i,o;return(new Gn).box("payl",qn((function(e){n=_e(e)}))).box("iden",qn((function(e){i=_e(e)}))).box("sttg",qn((function(e){o=_e(e)}))).parse(e),n?function(e,t,r,n,i){if(e=new or(n,i,e),t&&(e.id=t),r)for(t=new zi(r),r=Xi(t);r;)Ru(e,r,[])||re.v("VTT parser encountered an invalid VTT setting: ",r," The setting will be ignored."),qi(t),r=Xi(t);return e}(n,i,o,t,r):null}
13
- /*
14
- @license
15
- EME Encryption Scheme Polyfill
16
- Copyright 2019 Google LLC
17
- SPDX-License-Identifier: Apache-2.0
18
- */
19
- function Nu(){}function ju(){nu?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(nu=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Du):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Du(e,t){var r=this;return I((function n(){var i;return V(n,(function(n){switch(n.s){case 1:return console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),x(n,nu.call(r,e,t),2);case 2:return Wu(i=n.B)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=nu,n.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Lu,n.return(Lu.call(r,e,t)))}}))}))}function Lu(e,t){var r=this;return I((function n(){var i,o,a,s,l,c,u,p;return V(n,(function(n){switch(n.s){case 1:console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Gu(e),o=[];for(var f=b(t),d=f.next();!d.done;d=f.next())a=d.value,s=Uu(a.videoCapabilities,i),l=Uu(a.audioCapabilities,i),a.videoCapabilities&&a.videoCapabilities.length&&!s.length||a.audioCapabilities&&a.audioCapabilities.length&&!l.length||((c=_Object$assign({},a)).videoCapabilities=s,c.audioCapabilities=l,o.push(c));if(!o.length)throw(u=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",u.code=DOMException.NOT_SUPPORTED_ERR,u;return x(n,nu.call(r,e,o),2);case 2:return p=n.B,n.return(new Vu(p,i))}}))}))}function Uu(e,t){return e?_filterInstanceProperty(e).call(e,(function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function Fu(){}function Bu(){iu?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(iu=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ku):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Ku(e){var t=this;return I((function r(){var n,i;return V(r,(function(r){switch(r.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),x(r,iu.call(t,e),2);case 2:return n=r.B,e.keySystemConfiguration?(i=n.keySystemAccess)&&Wu(i)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=iu,r.return(n)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Hu,r.return(Hu.call(t,e))):r.return(n)}}))}))}function Hu(e){var t=this;return I((function r(){var n,i,o,a,s,l,c,u,p;return V(r,(function(r){switch(r.s){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,o=i.keySystem,a=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,n=Gu(o),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},a&&a!=n||s&&s!=n)?r.return(l):x(r,iu.call(t,e),2);case 2:if((c=r.B).keySystemAccess){c.keySystemAccess=new Vu(c.keySystemAccess,n),r.I(3);break}if(!e.keySystemConfiguration){r.I(3);break}var f=e.keySystemConfiguration,d=[],h=[];return f.audio&&d.push({robustness:f.audio.robustness||"",contentType:e.audio.contentType}),f.video&&h.push({robustness:f.video.robustness||"",contentType:e.video.contentType}),f={initDataTypes:f.initDataType?[f.initDataType]:[],distinctiveIdentifier:f.distinctiveIdentifier,persistentState:f.persistentState,sessionTypes:f.sessionTypes},d.length&&(f.audioCapabilities=d),h.length&&(f.videoCapabilities=h),u=f,p=c,x(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[u]),5);case 5:p.keySystemAccess=r.B;case 3:return r.return(c)}}))}))}function Vu(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Gu(e){return _startsWithInstanceProperty(e).call(e,"com.widevine")||_startsWithInstanceProperty(e).call(e,"com.microsoft")||_startsWithInstanceProperty(e).call(e,"com.adobe")||_startsWithInstanceProperty(e).call(e,"org.w3")?"cenc":_startsWithInstanceProperty(e).call(e,"com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Wu(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function zu(){}function qu(){ju(),Bu()}Pr["application/ttml+xml"]=ru,X("shaka.text.Mp4TtmlParser",Au),Au.prototype.parseInit=function(e){var t=!1;if((new Gn).box("moov",Wn).box("trak",Wn).box("mdia",Wn).box("minf",Wn).box("stbl",Wn).ma("stsd",zn).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new ne(2,2,2007)},Au.prototype.parseInit=Au.prototype.parseInit,Au.prototype.parseMedia=function(e,t){var r,n=!1,i=[];if((new Gn).box("mdat",qn(_bindInstanceProperty(r=function(e){n=!0,i=_concatInstanceProperty(i).call(i,this.g.parseMedia(e,t))}).call(r,this))).parse(e),!n)throw new ne(2,2,2007);return i},Au.prototype.parseMedia=Au.prototype.parseMedia,Pr['application/mp4; codecs="stpp"']=Au,Pr['application/mp4; codecs="stpp.ttml.im1t"']=Au,Pr['application/mp4; codecs="stpp.TTML.im1t"']=Au,X("shaka.text.VttTextParser",Cu),Cu.prototype.parseInit=function(){},Cu.prototype.parseInit=Cu.prototype.parseInit,Cu.prototype.parseMedia=function(e,t){var r,n=_e(e);if(n=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new ne(2,2,2e3);var i=t.segmentStart;if(null==i&&(i=0,_includesInstanceProperty(r=n[0]).call(r,"X-TIMESTAMP-MAP"))){var o=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);if(o&&a){if(null==(i=xu(new zi(o[1]))))throw new ne(2,2,2e3);i=t.periodStart+(Number(a[1])/9e4-i)}}a=[];var s=n[0].split("\n");for(o=1;o<s.length;o++)if(/^Region:/.test(s[o])){var l=new zi(s[o]),c=new vr;Xi(l),qi(l);for(var u=Xi(l);u;){var p;e:{var f=c,d=u;if(p=/^id=(.*)$/.exec(d))f.id=p[1];else if(p=/^width=(\d{1,2}|100)%$/.exec(d))f.width=Number(p[1]);else if(p=/^lines=(\d+)$/.exec(d))f.height=Number(p[1]),f.heightUnits=2;else if(p=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))f.regionAnchorX=Number(p[1]),f.regionAnchorY=Number(p[2]);else if(p=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))f.viewportAnchorX=Number(p[1]),f.viewportAnchorY=Number(p[2]);else{if(!/^scroll=up$/.exec(d)){p=!1;break e}f.scroll="up"}p=!0}p||re.v("VTT parser encountered an invalid VTTRegion setting: ",u," The setting will be ignored."),qi(l),u=Xi(l)}a.push(c)}for(o=[],l=1;l<n.length;l++){if(p=s=n[l].split("\n"),f=i,s=a,1==p.length&&!p[0]||/^NOTE($|[ \t])/.test(p[0])||"STYLE"==p[0])s=null;else{var h,y;c=null,_includesInstanceProperty(h=p[0]).call(h,"--\x3e")||(c=p[0],_spliceInstanceProperty(p).call(p,0,1)),d=xu(u=new zi(p[0]));var g=Yi(u,/[ \t]+--\x3e[ \t]+/g),$=xu(u);if(null==d||null==g||null==$)throw new ne(2,2,2001);for(p=new or(d+f,$+f,_trimInstanceProperty(y=_sliceInstanceProperty(p).call(p,1).join("\n")).call(y)),qi(u),f=Xi(u);f;)Ru(p,f,s)||re.v("VTT parser encountered an invalid VTT setting: ",f," The setting will be ignored."),qi(u),f=Xi(u);null!=c&&(p.id=c),s=p}s&&o.push(s)}return o},Cu.prototype.parseMedia=Cu.prototype.parseMedia,Pr["text/vtt"]=Cu,Pr['text/vtt; codecs="vtt"']=Cu,Pr['text/vtt; codecs="wvtt"']=Cu,X("shaka.text.Mp4VttParser",Mu),Mu.prototype.parseInit=function(e){var t,r=!1;if((new Gn).box("moov",Wn).box("trak",Wn).box("mdia",Wn).ma("mdhd",_bindInstanceProperty(t=function(e){0==e.version?(e.reader.U(4),e.reader.U(4),this.g=e.reader.N(),e.reader.U(4)):(e.reader.U(8),e.reader.U(8),this.g=e.reader.N(),e.reader.U(8)),e.reader.U(4)}).call(t,this)).box("minf",Wn).box("stbl",Wn).ma("stsd",zn).box("wvtt",(function(){r=!0})).parse(e),!this.g)throw new ne(2,2,2008);if(!r)throw new ne(2,2,2008)},Mu.prototype.parseInit=Mu.prototype.parseInit,Mu.prototype.parseMedia=function(e,t){var r=this;if(!this.g)throw re.error("No init segment for MP4+VTT!"),new ne(2,2,2008);var n,i=0,o=[],a=[],s=!1,l=!1,c=!1,u=null;if((new Gn).box("moof",Wn).box("traf",Wn).ma("tfdt",(function(e){s=!0,i=0==e.version?e.reader.N():e.reader.Pb()})).ma("tfhd",(function(e){var t=_flagsInstanceProperty(e);(e=e.reader).U(4),1&t&&e.U(8),2&t&&e.U(4),u=8&t?e.N():null})).ma("trun",(function(e){l=!0;var t=e.version,r=_flagsInstanceProperty(e),n=(e=e.reader).N();1&r&&e.U(4),4&r&&e.U(4);for(var i=[],a=0;a<n;a++){var s={duration:null,sampleSize:null,Sd:null};256&r&&(s.duration=e.N()),512&r&&(s.sampleSize=e.N()),1024&r&&e.U(4),2048&r&&(s.Sd=0==t?e.N():e.De()),i.push(s)}o=i})).box("mdat",qn((function(e){c=!0,n=e}))).parse(e),!c&&!s&&!l)throw new ne(2,2,2008);var p=i,f=new Kn(new DataView(n.buffer,n.byteOffset,n.byteLength),0);return _forEachInstanceProperty(o).call(o,(function(e){var n=e.duration||u,o=e.Sd?i+e.Sd:p;p=o+(n||0);var s=0;do{var l=f.N();s+=l;var c=f.N(),d=null;"vttc"==(c=Xn(c))?8<l&&(d=f.mb(l-8)):("vtte"!=c&&re.error("Unknown box "+c+"! Skipping!"),f.U(l-8)),n?d&&a.push(ku(d,t.periodStart+o/r.g,t.periodStart+p/r.g)):re.error("WVTT sample duration unknown, and no default found!")}while(e.sampleSize&&s<e.sampleSize)})),_filterInstanceProperty(a).call(a,me.Ra)},Mu.prototype.parseMedia=Mu.prototype.parseMedia,Pr['application/mp4; codecs="wvtt"']=Mu,X("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),X("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),X("shaka.util.Dom.asHTMLElement",(function(e){return e})),X("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),X("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),X("EmeEncryptionSchemePolyfill",Nu),Nu.install=ju,X("McEncryptionSchemePolyfill",Fu),Fu.install=Bu,Vu.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=b(e.videoCapabilities),r=t.next();!r.done;r=t.next())r.value.encryptionScheme=this.g;if(e.audioCapabilities)for(r=(t=b(e.audioCapabilities)).next();!r.done;r=t.next())r.value.encryptionScheme=this.g;return e},Vu.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},X("EncryptionSchemePolyfills",zu),zu.install=qu,void 0!==r&&r.gf&&(r.gf=zu)}.call(r,t,t,void 0),r.shaka)e[n]=r.shaka[n]}()}(shakaPlayer_compiled);var Shaka=getDefaultExportFromCjs(shakaPlayer_compiled),ShakaJsPlugin=function(e){_inherits(r,BasePlugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"onAdaptation_",(function(){var e=n.shakaplayer.getVariantTracks();_forEachInstanceProperty(e).call(e,(function(e){if(e.active)for(var t=0;t<this.content.length;++t){var r=this.content[t];r.value===e.id?r.selected=!0:r.selected=!1}}))})),Shaka.polyfill.installAll(),n}return _createClass$1(r,[{key:"afterCreate",value:function(){var e=this;this.content=[],this.url=this.player.config.url,Shaka.Player.isBrowserSupported()&&this.on(URL_CHANGE,(function(t){/^blob/.test(t)||(e.url=t,e.loadUrl(t))}))}},{key:"beforePlayerInit",value:function(){if(!Shaka.Player.isBrowserSupported())throw new Error("Browser not supported!");this._initShaka()}},{key:"destroy",value:function(){this.shakaplayer&&(this.shakaplayer.destroy(),this.shakaplayer=null)}},{key:"_initShaka",value:function(){var e=this.player;this.shakaplayer=new Shaka.Player(e.video),this.shakaplayer.addEventListener("error",(function(e){console.error("Error code",e.detail.code,"object",e.detail)})),this.config.shakaOpts&&this.shakaplayer.configure(this.config.shakaOpts),this.shakaplayer.getNetworkingEngine().registerRequestFilter((function(e,t){e===Shaka.net.NetworkingEngine.RequestType.LICENSE&&(t.headers["CWIP-Auth-Header"]="VGhpc0lzQVRlc3QK")})),this.shakaplayer.addEventListener("adaptation",this.onAdaptation_);this.shakaplayer.configure({abr:{enabled:!1}}),this.loadUrl(this.url)}},{key:"loadUrl",value:function(e){var t=this;this.shakaplayer.load(e).then((function(){console.log(" this.onTracksChanged_"),t.onTracksChanged_()})).catch((function(e){console.trace("event",e),console.error("Error code",e.detail.code,"object",e.detail)}))}},{key:"onTracksChanged_",value:function(){this.updateVariantTracks_()}},{key:"updateVariantTracks_",value:function(){var e=this.shakaplayer.getVariantTracks();_sortInstanceProperty(e).call(e,(function(e,t){return e.bandwidth-t.bandwidth})),this.updateTrackOptions_(e)}},{key:"updateTrackOptions_",value:function(e){var t=this,r={variant:function(e){var t="";return e.width&&e.height&&(t+=e.height+"P"),t}};this.content=[],_forEachInstanceProperty(e).call(e,(function(e){var n={};n.textContent=r[e.type](e),n.track=e,n.value=e.id,n.selected=e.active,t.content.push(n)})),this.updateDefinition()}},{key:"updateDefinition",value:function(){"mobile"!==sniffer.device&&console.log("updateDefinition",this.content)}}],[{key:"pluginName",get:function(){return"ShakaPlugin"}},{key:"defaultConfig",get:function(){return{shakaOpts:{}}}},{key:"isSupported",value:function(){return Shaka.Player.isBrowserSupported()}}]),r}();export{ShakaJsPlugin as default};
20
- //# sourceMappingURL=esm/veplayer.plugin.shaka.production.js.map